Forráskód Böngészése

Merge branch 'njy' of http://git.xt.wenhq.top:8083/wenhongquan/VisualInspection into njy

MSI\liwei 4 éve
szülő
commit
3ef91d3753

+ 3 - 0
VisualInspection/js/util/video.js

@@ -147,6 +147,9 @@ function callFunc(func, param) {
     var origin = window.location.protocol + '//' + window.location.host;
     event.initMessageEvent(func, true, true, param, origin, 1234, window, null);
     document.dispatchEvent(event);
+    if(jsObj!=undefined){
+        eval("jsObj."+func+"("+param+")")
+    }
 }
 
 function playNext(index) {

+ 0 - 11
VisualInspection_server/profiles.xml

@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<profilesXml xmlns="http://maven.apache.org/PROFILES/1.0.0"
-             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-             xsi:schemaLocation="http://maven.apache.org/PROFILES/1.0.0 http://maven.apache.org/xsd/profiles-1.0.0.xsd">
-    <profiles>
-        <profile>
-            <id></id>
-            
-        </profile>
-    </profiles>
-</profilesXml>

+ 1 - 1
VisualInspection_server/src/main/java/com/xintong/GetOffWork.java

@@ -18,7 +18,7 @@ public class GetOffWork {
 
     private static final org.slf4j.Logger logger = LoggerFactory.getLogger(GetOffWork.class);
 
-    @Scheduled(cron = "0 6 9 * * ?")
+    @Scheduled(cron = "0 0 3 * * ?")
     public void confirmTasks() {
       // Date now = new Date();
 

+ 1 - 1
VisualInspection_server/src/main/java/com/xintong/system/securityTools/WebSecurityConfig.java

@@ -66,7 +66,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
                  "/**/*.js"
          ).permitAll()
          // 对于获取token的rest api要允许匿名访问
-         .antMatchers("/user/auth/**","/file/**","/druid/**","/dept/get/all","/user/get/**","/checkRule/getItemListByRuleType","/checkOther/**").permitAll()
+         .antMatchers("/user/auth/**","/file/**","/druid/**","/dept/get/all","/user/get/**","/checkRule/getItemListByRuleType","/checkOther/**","/changetime").permitAll()
          // 除上面外的所有请求全部需要鉴权认证
          .anyRequest().authenticated();
     	

+ 11 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TestController.java

@@ -5,6 +5,7 @@ import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.xintong.visualinspection.bean.Msg;
 import com.xintong.visualinspection.bean.User;
+import com.xintong.visualinspection.service.TaskService;
 import com.xintong.visualinspection.service.UserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.expression.SecurityExpressionRoot;
@@ -30,6 +31,9 @@ public class TestController {
     @Autowired
     private UserService userService;
 
+    @Autowired
+    private TaskService taskService;
+
 
     @RequestMapping("/")
     public String index(Model model, HttpServletRequest request){
@@ -46,6 +50,13 @@ public class TestController {
     }
 
 
+    @RequestMapping("/changetime")
+    public String changeTime(){
+        taskService.updateTaskZjList();
+        return "home";
+    }
+
+
 
     @RequestMapping("/login")
     public String login(){

+ 1 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TaskMapper.xml

@@ -94,6 +94,7 @@
         <if test="position_id != null">AND u.positionid = #{position_id}</if>
         <if test="appeal_result != null">AND ca.appeal_result = #{appeal_result}</if>
         <if test="checked_location_type != null">AND t.checked_location_type = #{checked_location_type}</if>
+        <if test="period_id != null">AND t.period_id = #{period_id}</if>
         <if test="hasScore == 1">AND
             t.id in (select task_id from check_score)
         </if>

+ 19 - 15
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TaskServiceImpl.java

@@ -239,7 +239,7 @@ public class TaskServiceImpl extends BaseService implements TaskService {
 		Date now =new Date();
 		Task task = new Task();
 		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-		SimpleDateFormat startFormat1 = new SimpleDateFormat("yyyy-MM-dd 07:5 0:00");
+		SimpleDateFormat startFormat1 = new SimpleDateFormat("yyyy-MM-dd 07:50:00");
 		SimpleDateFormat endFormat1 = new SimpleDateFormat("yyyy-MM-dd 09:30:00");
 		SimpleDateFormat startFormat2 = new SimpleDateFormat("yyyy-MM-dd 22:50:00");
 		SimpleDateFormat endFormat2 = new SimpleDateFormat("yyyy-MM-dd 23:30:00");
@@ -253,20 +253,24 @@ public class TaskServiceImpl extends BaseService implements TaskService {
 		List<Task> taskList = taskDao.getList(task);
 		try{
 			for(Task t : taskList) {
-				Date start = t.getStart_time();
-				Date end = t.getEnd_time();
-				if(t.getClass_type() == 1){
-					t.setStart_time(sdf.parse(startFormat1.format(start)));
-					t.setEnd_time(sdf.parse(endFormat1.format(end)));
-					taskDao.update(t);
-				}else if(t.getClass_type() == 3){
-					t.setStart_time(sdf.parse(startFormat2.format(start)));
-					t.setEnd_time(sdf.parse(endFormat2.format(end)));
-					taskDao.update(t);
-				}else if(t.getClass_type() == 2){
-					t.setStart_time(sdf.parse(startFormat3.format(start)));
-					t.setEnd_time(sdf.parse(endFormat3.format(end)));
-					taskDao.update(t);
+				if(t.getCheck_status()==1||t.getCheck_status()==2) {
+					Date start = t.getStart_time();
+					Date end = t.getEnd_time();
+					if (t.getClass_type() == 1) {
+						t.setStart_time(sdf.parse(startFormat1.format(start)));
+						t.setEnd_time(sdf.parse(endFormat1.format(end)));
+						taskDao.update(t);
+					} else if (t.getClass_type() == 3) {
+						t.setStart_time(sdf.parse(startFormat2.format(start)));
+						t.setEnd_time(sdf.parse(endFormat2.format(end)));
+						taskDao.update(t);
+					} else if (t.getClass_type() == 2) {
+						t.setStart_time(sdf.parse(startFormat3.format(start)));
+						t.setEnd_time(sdf.parse(endFormat3.format(end)));
+						taskDao.update(t);
+					}
+				}else {
+					continue;
 				}
 
 			}