فهرست منبع

Merge branch 'master' of http://git_xt.git.topm.win:8080/wenhongquan/VisualInspection

温红权 9 سال پیش
والد
کامیت
c583b05c9d
27فایلهای تغییر یافته به همراه603 افزوده شده و 316 حذف شده
  1. 10 8
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckRule.java
  2. 9 3
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Constant.java
  3. 30 13
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Score.java
  4. 25 7
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Task.java
  5. 27 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/TaskStatus.java
  6. 57 16
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckRuleController.java
  7. 6 6
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/ConstantController.java
  8. 47 16
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/ScoreController.java
  9. 53 16
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TaskController.java
  10. 6 6
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TeamClassController.java
  11. 6 6
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TeamController.java
  12. 13 9
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/CheckRuleDao.java
  13. 12 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/CommonDao.java
  14. 9 8
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/ScoreDao.java
  15. 10 8
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/TaskDao.java
  16. 53 40
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckRuleMapper.xml
  17. 7 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CommonMapper.xml
  18. 45 39
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/ScoreMapper.xml
  19. 75 38
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TaskMapper.xml
  20. 9 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/BaseService.java
  21. 2 3
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/CheckRuleService.java
  22. 4 4
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/ScoreService.java
  23. 2 3
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/TaskService.java
  24. 31 25
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckRuleServiceImpl.java
  25. 19 23
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/ScoreServiceImpl.java
  26. 35 18
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TaskServiceImpl.java
  27. 1 1
      VisualInspection_server/src/main/resources/errcode.properties

+ 10 - 8
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckRule.java

@@ -1,23 +1,25 @@
 package com.xintong.visualinspection.bean;
 
+import java.util.List;
+
 import lombok.Data;
 
 /**
- * 文件名:AssessmentMethod
+ * 文件名:CheckRule
  * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
  */
 @Data
 public class CheckRule {
     //编号
-    private Integer id;
+    private Long id;
     //名称
     private String name;
-    //类型
-    private Integer type;
-    //被考核人员类型
-    private String assessment_personnel_type;
+    //名称
+    private List<CheckItem> check_items;
+    //被考核人员
+    private String checked_person_type;
     //被考核职位
-    private Integer assessment_occupation_id;
+    private Long checked_position_id;
     //被考核部门id
-    private Integer assessment_department_id;
+    private Long checked_dept_id;
 }

+ 9 - 3
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Constant.java

@@ -1,8 +1,8 @@
 package com.xintong.visualinspection.bean;
-import lombok.Data;
-
 import org.hibernate.validator.constraints.NotEmpty;
 
+import lombok.Data;
+
 /**
  * 
  * 常量(字典)实体类
@@ -26,7 +26,7 @@ public class Constant{
 	private static final long serialVersionUID = -7765958097423155178L;
 	private Long id;
 	@NotEmpty(message="字典值不能为空")
-	private String code_value;
+	private Integer code_value;
 	@NotEmpty(message="字典名称不能为空")
 	private String code_name;
 	@NotEmpty(message="字典标识不能为空")
@@ -36,4 +36,10 @@ public class Constant{
 	private int valid;
 	private String remark;
 	private int sort_no;
+	
+	Constant(){}
+	public Constant(String code_flag, int code_value){
+		this.setCode_value(code_value);
+		this.setCode_flag(code_flag);
+	}
 }

+ 30 - 13
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Score.java

@@ -4,6 +4,10 @@ import lombok.Data;
 
 import java.util.Date;
 
+import org.springframework.format.annotation.DateTimeFormat;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
 /**
  * 文件名:ScoreDeducting
  * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
@@ -11,23 +15,36 @@ import java.util.Date;
 @Data
 public class Score {
     //编号
-    private Integer id;
-    //时间
-    private Date time;
-    //扣分内容
-    private String content;
+    private Long id;
+    //任务id
+    private Long task_id;
+    //更新时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date update_time;
     //图片数组
-    private String pictures;
+    private String pics;
     //视频数组
     private String videos;
-    //稽查任务编号
-    private Integer visual_inspection_task_id;
-    //名称
-    private String name;
     //考核项id
-    private Integer assessment_item_id;
+    private Long check_item_id;
+    //扣分内容
+    private String content;
     //考核人员ids
-    private String assessment_personnels;
+    private String checkman;
     //被考核人员id
-    private Integer check_personnel_id;
+    private Long checked_person;
+    //被考核部门
+    private Long checked_dept;
+    //备注
+    private String remark;
+    
+    //查询开始时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date start_time;
+    //查询结束时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date end_time;
 }

+ 25 - 7
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Task.java

@@ -4,6 +4,10 @@ import lombok.Data;
 
 import java.util.Date;
 
+import org.springframework.format.annotation.DateTimeFormat;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
 /**
  * 文件名:CheckTask
  * 版本信息:日期:2017/4/15 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
@@ -11,26 +15,40 @@ import java.util.Date;
 @Data
 public class Task{
     //编号
-    private Integer id;
+    private Long id;
+    //名称
+    private String name;
     //审核状态
     private Integer check_status;
     //视屏编号
     private String video_id;
+    //监控位置类型
+    private Integer checked_location_type;
     //监控位置
-    private String monitoring_position;
+    private String checked_location;
     //生成时间
-    private Date insert_time;
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date create_time;
     //考核办法ids
-    private String assessment_methods_ids;
-    //跟新时间
+    private String rule_id;
+    //更新时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
     private Date update_time;
     //考核人员ids
-    private String assessment_personnel_ids;
+    private Long checkman;
     //被考核人员id
-    private Integer check_personnel;
+    private Long checked_person;
+    //被考核部门id
+    private Long checked_dept;
     //结束考核时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
     private Date end_time;
     //开始审核时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
     private Date start_time;
     //备注
     private String remark;

+ 27 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/TaskStatus.java

@@ -0,0 +1,27 @@
+package com.xintong.visualinspection.bean;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 文件名:TaskStatus
+ * 版本信息:日期:2017/4/15 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Data
+public class TaskStatus{
+	//编号
+    private Long id;
+    //编号
+    private Long task_id;
+    //更新时间
+    private Date update_time;
+    //更新人id
+    private Long update_user;
+    //更新人
+    private String update_username;
+    //状态
+    private Integer check_status;
+    //状态名称
+    private String check_status_name;
+}

+ 57 - 16
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckRuleController.java

@@ -1,15 +1,18 @@
 package com.xintong.visualinspection.controller;
 
+import java.util.List;
+
 import javax.validation.Valid;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import com.xintong.visualinspection.bean.Constant;
-import com.xintong.visualinspection.service.ConstantService;
+import com.mysql.jdbc.StringUtils;
+import com.xintong.visualinspection.bean.CheckRule;
+import com.xintong.visualinspection.err.BusinessException;
+import com.xintong.visualinspection.service.CheckRuleService;
 
 /**
  * 文件名:TestController
@@ -20,45 +23,83 @@ import com.xintong.visualinspection.service.ConstantService;
 public class CheckRuleController extends BaseController {
 
     @Autowired
-    private ConstantService constantService;
+    private CheckRuleService checkRuleService;
 
    
     /**
-     * 添加常量
+     * 添加考核办法
      * @return
      * String
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/addConstant")
-    public String addConstant(@Valid @RequestBody Constant constant, BindingResult result){
-    	constantService.insert(constant);
+    @RequestMapping(value = "/add")
+    public String add(@Valid @RequestBody CheckRule checkRule){
+    	checkRuleService.insert(checkRule);
     	return super.returnSuccessResult("添加成功");
     }
     
     /**
-     * 修改常量
+     * 修改考核办法
      * @return
      * String
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/updateConstant")
-    public String updateConstant(@RequestBody Constant constant){
-    	constantService.update(constant);
+    @RequestMapping(value = "/update")
+    public String update(@Valid @RequestBody CheckRule checkRule){
+    	if(checkRule.getId()==null){
+    		throw new BusinessException(20002);
+    	}
+    	checkRuleService.update(checkRule);
     	return super.returnSuccessResult("修改成功");
     }
     
     /**
-     * 删除常量
+     * 删除考核办法
      * @return
      * String
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/deleteConstant")
-    public String deleteConstant(@RequestBody String id){
-    	constantService.delete(Long.parseLong(id));
+    @RequestMapping(value = "/delete")
+    public String delete(@RequestBody CheckRule checkRule){
+    	if(checkRule.getId()==null){
+    		throw new BusinessException(20002);
+    	}
+    	checkRuleService.delete(checkRule.getId());
     	return super.returnSuccessResult("删除成功");
     }
+    
+    /**
+     * 通过id获取考核办法
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/getById")
+    public String getById(@RequestBody CheckRule checkRule){
+    	if(checkRule.getId()==null){
+    		throw new BusinessException(20002);
+    	}
+    	CheckRule cr = checkRuleService.getById(checkRule.getId());
+    	return super.returnSuccessResult(cr);
+    }
+    
+    /**
+     * 通过名称获取考核办法
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/getByName")
+    public String getByName(@RequestBody CheckRule checkRule){
+    	if(StringUtils.isNullOrEmpty(checkRule.getName())){
+    		throw new BusinessException(21101);
+    	}
+    	List<CheckRule> crList = checkRuleService.getByName(checkRule.getName());
+    	return super.returnSuccessResult(crList);
+    }
 }

+ 6 - 6
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/ConstantController.java

@@ -33,8 +33,8 @@ public class ConstantController extends BaseController {
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/addConstant")
-    public String addConstant(@Valid @RequestBody Constant constant){
+    @RequestMapping(value = "/add")
+    public String add(@Valid @RequestBody Constant constant){
     	constantService.insert(constant);
     	return super.returnSuccessResult("添加成功");
     }
@@ -46,8 +46,8 @@ public class ConstantController extends BaseController {
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/updateConstant")
-    public String updateConstant(@RequestBody Constant constant){
+    @RequestMapping(value = "/update")
+    public String update(@RequestBody Constant constant){
     	constantService.update(constant);
     	return super.returnSuccessResult("修改成功");
     }
@@ -59,8 +59,8 @@ public class ConstantController extends BaseController {
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/deleteConstant")
-    public String deleteConstant(@RequestBody Constant constant){
+    @RequestMapping(value = "/delete")
+    public String delete(@RequestBody Constant constant){
     	if(constant.getId()==null){
     		throw new BusinessException(20002);
     	}

+ 47 - 16
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/ScoreController.java

@@ -1,15 +1,17 @@
 package com.xintong.visualinspection.controller;
 
+import java.util.List;
+
 import javax.validation.Valid;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import com.xintong.visualinspection.bean.Constant;
-import com.xintong.visualinspection.service.ConstantService;
+import com.xintong.visualinspection.bean.Score;
+import com.xintong.visualinspection.err.BusinessException;
+import com.xintong.visualinspection.service.ScoreService;
 
 /**
  * 文件名:TestController
@@ -20,45 +22,74 @@ import com.xintong.visualinspection.service.ConstantService;
 public class ScoreController extends BaseController {
 
     @Autowired
-    private ConstantService constantService;
+    private ScoreService scoreService;
 
    
     /**
-     * 添加常量
+     * 添加扣分项
      * @return
      * String
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/addConstant")
-    public String addConstant(@Valid @RequestBody Constant constant, BindingResult result){
-    	constantService.insert(constant);
+    @RequestMapping(value = "/add")
+    public String add(@Valid @RequestBody Score score){
+    	scoreService.insert(score);
     	return super.returnSuccessResult("添加成功");
     }
     
     /**
-     * 修改常量
+     * 修改扣分项
      * @return
      * String
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/updateConstant")
-    public String updateConstant(@RequestBody Constant constant){
-    	constantService.update(constant);
+    @RequestMapping(value = "/update")
+    public String update(@Valid @RequestBody Score score){
+    	scoreService.update(score);
     	return super.returnSuccessResult("修改成功");
     }
     
     /**
-     * 删除常量
+     * 删除扣分项
      * @return
      * String
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/deleteConstant")
-    public String deleteConstant(@RequestBody String id){
-    	constantService.delete(Long.parseLong(id));
+    @RequestMapping(value = "/delete")
+    public String delete(@RequestBody Score score){
+    	scoreService.delete(score.getId());
     	return super.returnSuccessResult("删除成功");
     }
+    
+    /**
+     * 通过任务id获取考核扣分项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/getByTaskId")
+    public String getByTaskId(@RequestBody Score score){
+    	if(score.getTask_id()==null){
+    		throw new BusinessException(20002);
+    	}
+    	List<Score> scorelist = scoreService.getScoreListByTaskId(score.getTask_id());
+    	return super.returnSuccessResult(scorelist);
+    }
+    
+    /**
+     * 通过多条件获取考核扣分项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/getScoreList")
+    public String getScoreList(@RequestBody Score score){
+    	List<Score> scorelist = scoreService.getScoreList(score);
+    	return super.returnSuccessResult(scorelist);
+    }
 }

+ 53 - 16
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TaskController.java

@@ -1,15 +1,17 @@
 package com.xintong.visualinspection.controller;
 
+import java.util.List;
+
 import javax.validation.Valid;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import com.xintong.visualinspection.bean.Constant;
-import com.xintong.visualinspection.service.ConstantService;
+import com.xintong.visualinspection.bean.Task;
+import com.xintong.visualinspection.err.BusinessException;
+import com.xintong.visualinspection.service.TaskService;
 
 /**
  * 文件名:TestController
@@ -20,45 +22,80 @@ import com.xintong.visualinspection.service.ConstantService;
 public class TaskController extends BaseController {
 
     @Autowired
-    private ConstantService constantService;
+    private TaskService taskService;
 
    
     /**
-     * 添加常量
+     * 添加考核任务
      * @return
      * String
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/addConstant")
-    public String addConstant(@Valid @RequestBody Constant constant, BindingResult result){
-    	constantService.insert(constant);
+    @RequestMapping(value = "/add")
+    public String add(@Valid @RequestBody Task task){
+    	taskService.insert(task);
     	return super.returnSuccessResult("添加成功");
     }
     
     /**
-     * 修改常量
+     * 修改考核任务
      * @return
      * String
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/updateConstant")
-    public String updateConstant(@RequestBody Constant constant){
-    	constantService.update(constant);
+    @RequestMapping(value = "/update")
+    public String update(@Valid @RequestBody Task task){
+    	if(task.getId()==null){
+    		throw new BusinessException(20002);
+    	}
+    	taskService.update(task);
     	return super.returnSuccessResult("修改成功");
     }
     
     /**
-     * 删除常量
+     * 删除考核任务
      * @return
      * String
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/deleteConstant")
-    public String deleteConstant(@RequestBody String id){
-    	constantService.delete(Long.parseLong(id));
+    @RequestMapping(value = "/delete")
+    public String delete(@RequestBody Task task){
+    	if(task.getId()==null){
+    		throw new BusinessException(20002);
+    	}
+    	taskService.delete(task.getId());
     	return super.returnSuccessResult("删除成功");
     }
+    
+    /**
+     * 通过id获取考核任务
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/getById")
+    public String getById(@RequestBody Task task){
+    	if(task.getId()==null){
+    		throw new BusinessException(20002);
+    	}
+    	Task t = taskService.getById(task.getId());
+    	return super.returnSuccessResult(t);
+    }
+    
+    /**
+     * 通过多条件获取考核任务
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/getTaskList")
+    public String getTaskList(@RequestBody Task task){
+    	List<Task> taskList = taskService.getTaskList(task);
+    	return super.returnSuccessResult(taskList);
+    }
 }

+ 6 - 6
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TeamClassController.java

@@ -32,8 +32,8 @@ public class TeamClassController extends BaseController {
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/addClass")
-    public String addClass(@Valid @RequestBody TeamClass teamClass){
+    @RequestMapping(value = "/add")
+    public String add(@Valid @RequestBody TeamClass teamClass){
     	teamClassService.insert(teamClass);
     	return super.returnSuccessResult("添加成功");
     }
@@ -45,8 +45,8 @@ public class TeamClassController extends BaseController {
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/updateClass")
-    public String updateClass(@Valid @RequestBody TeamClass teamClass){
+    @RequestMapping(value = "/update")
+    public String update(@Valid @RequestBody TeamClass teamClass){
     	teamClassService.update(teamClass);
     	return super.returnSuccessResult("修改成功");
     }
@@ -58,8 +58,8 @@ public class TeamClassController extends BaseController {
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/deleteClass")
-    public String deleteClass(@RequestBody TeamClass teamClass){
+    @RequestMapping(value = "/delete")
+    public String delete(@RequestBody TeamClass teamClass){
     	teamClassService.delete(teamClass.getId());
     	return super.returnSuccessResult("删除成功");
     }

+ 6 - 6
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TeamController.java

@@ -32,8 +32,8 @@ public class TeamController extends BaseController {
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/addTeam")
-    public String addTeam(@Valid @RequestBody Team team){
+    @RequestMapping(value = "/add")
+    public String add(@Valid @RequestBody Team team){
     	teamService.insert(team);
     	return super.returnSuccessResult("添加成功");
     }
@@ -45,8 +45,8 @@ public class TeamController extends BaseController {
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/updateTeam")
-    public String updateTeam(@Valid @RequestBody Team team){
+    @RequestMapping(value = "/update")
+    public String update(@Valid @RequestBody Team team){
     	teamService.update(team);
     	return super.returnSuccessResult("修改成功");
     }
@@ -58,8 +58,8 @@ public class TeamController extends BaseController {
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/deleteTeam")
-    public String deleteTeam(@RequestBody Team team){
+    @RequestMapping(value = "/delete")
+    public String delete(@RequestBody Team team){
     	teamService.delete(team.getId());
     	return super.returnSuccessResult("删除成功");
     }

+ 13 - 9
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/CheckRuleDao.java

@@ -1,21 +1,25 @@
 package com.xintong.visualinspection.dao.master;
 
-import com.xintong.visualinspection.bean.User;
+import java.util.List;
+
 import org.apache.ibatis.annotations.Mapper;
-import org.springframework.stereotype.Repository;
 
-import java.util.List;
+import com.xintong.visualinspection.bean.CheckItem;
+import com.xintong.visualinspection.bean.CheckRule;
 
 /**
- * 文件名:UserInfoDao
+ * 文件名:CheckRuleDao
  * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
  */
 @Mapper
 public interface CheckRuleDao  {
-    public List<User> getAll();
-    public User getOne(Long id);
-    public void insert(User user);
-    public void update(User user);
+    public List<CheckRule> getAll();
+    public CheckRule getOne(Long id);
+    public List<CheckRule> getByName(String name);
+    public void insert(CheckRule checkRule);
+    public void insertRuleItem(List<CheckItem> checkItems);
+    public void update(CheckRule checkRule);
     public void delete(Long id);
-    public User findByUserName(String username);
+    public void deleteRuleItem(Long id);
+    public Long getLastId();
 }

+ 12 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/CommonDao.java

@@ -0,0 +1,12 @@
+package com.xintong.visualinspection.dao.master;
+
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 文件名:CommoneDao
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Mapper
+public interface CommonDao  {
+    public Long getLastId();
+}

+ 9 - 8
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/ScoreDao.java

@@ -1,10 +1,10 @@
 package com.xintong.visualinspection.dao.master;
 
-import com.xintong.visualinspection.bean.User;
+import java.util.List;
+
 import org.apache.ibatis.annotations.Mapper;
-import org.springframework.stereotype.Repository;
 
-import java.util.List;
+import com.xintong.visualinspection.bean.Score;
 
 /**
  * 文件名:UserInfoDao
@@ -12,10 +12,11 @@ import java.util.List;
  */
 @Mapper
 public interface ScoreDao  {
-    public List<User> getAll();
-    public User getOne(Long id);
-    public void insert(User user);
-    public void update(User user);
+    public List<Score> getAll();
+    public Score getOne(Long id);
+    public List<Score> getScoreList(Score score);
+    public List<Score> getScoreListByTaskId(Long task_id);
+    public void insert(Score score);
+    public void update(Score score);
     public void delete(Long id);
-    public User findByUserName(String username);
 }

+ 10 - 8
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/TaskDao.java

@@ -1,10 +1,11 @@
 package com.xintong.visualinspection.dao.master;
 
-import com.xintong.visualinspection.bean.User;
+import java.util.List;
+
 import org.apache.ibatis.annotations.Mapper;
-import org.springframework.stereotype.Repository;
 
-import java.util.List;
+import com.xintong.visualinspection.bean.Task;
+import com.xintong.visualinspection.bean.TaskStatus;
 
 /**
  * 文件名:UserInfoDao
@@ -12,10 +13,11 @@ import java.util.List;
  */
 @Mapper
 public interface TaskDao  {
-    public List<User> getAll();
-    public User getOne(Long id);
-    public void insert(User user);
-    public void update(User user);
+    public List<Task> getAll();
+    public Task getOne(Long id);
+    public List<Task> getList(Task task);
+    public void insert(Task task);
+    public void insertStatus(TaskStatus taskStatus);
+    public void update(Task task);
     public void delete(Long id);
-    public User findByUserName(String username);
 }

+ 53 - 40
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckRuleMapper.xml

@@ -1,68 +1,81 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xintong.visualinspection.dao.master.CheckRuleDao" >
-    <resultMap id="BaseResultMap" type="com.xintong.visualinspection.bean.User" >
+    <resultMap id="BaseResultMap" type="com.xintong.visualinspection.bean.CheckRule" >
         <id column="id" property="id" jdbcType="INTEGER" />
-        <result column="username" property="username" jdbcType="VARCHAR" />
-        <result column="age" property="age" jdbcType="INTEGER" />
-        <result column="password" property="password" jdbcType="VARCHAR" />
-    </resultMap>
-    <resultMap id="userMap" type="com.xintong.visualinspection.bean.User">
-        <id property="id" column="ID"/>
-        <result property="username" column="username"/>
-        <result property="password" column="PASSWORD"/>
-        <collection property="roles" ofType="com.xintong.visualinspection.bean.Role">
-            <result column="name" property="name"/>
+        <result column="name" property="name" jdbcType="VARCHAR" />
+        <result column="checked_person_type" property="checked_person_type" jdbcType="INTEGER" />
+        <result column="checked_position_id" property="checked_position_id" jdbcType="INTEGER" />
+        <result column="checked_dept_id" property="checked_dept_id" jdbcType="INTEGER" />
+        <collection property="check_items" ofType="com.xintong.visualinspection.bean.CheckItem"  
+        	javaType="ArrayList">
+        	<id property="id"  column="id"/>   
+    		<result property="name"  column="name"/>  
         </collection>
     </resultMap>
 
+	<select id="selectItems" resultType="com.xintong.visualinspection.bean.CheckItem" parameterType="Long">  
+    	SELECT a.*,b.*
+        FROM check_rule a left join check_rule_item b on a.id=b.rule_id
+        WHERE id = #{id}
+  	</select>  
     <select id="getAll" resultMap="BaseResultMap"  >
-        SELECT
-        id,username,age,password
-        FROM sys_user
+        SELECT *
+        FROM check_rule
     </select>
 
     <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >
-        SELECT
-        id,username,age,password
-        FROM sys_user
+        SELECT a.*,b.*
+        FROM check_rule a left join check_rule_item b on a.id=b.rule_id
         WHERE id = #{id}
     </select>
+    
+    <select id="getByName"  parameterType="java.lang.String" resultMap="BaseResultMap"  >
+        SELECT *
+        FROM check_rule
+        WHERE name like CONCAT('%',#{name},'%') 
+    </select>
 
-    <insert id="insert" parameterType="com.xintong.visualinspection.bean.User" >
+    <insert id="insert" parameterType="com.xintong.visualinspection.bean.CheckRule" >
         INSERT INTO
-        sys_user
-        (username,age,password,TRUENAME,ORGANID,BIRTH,AGE,MOBILE,POSITIONID,SEX,WORKNO,IDNO)
+        check_rule
+        (name,checked_person_type,checked_position_id,checked_dept_id)
         VALUES
-        (#{username}, #{age},#{password},#{truename},#{deptId},#{birth},#{age},#{mobile},#{positionId},#{sex},#{workno},#{idno})
+        (#{name}, #{checked_person_type},#{checked_position_id},#{checked_dept_id})
     </insert>
-
-    <update id="update" parameterType="com.xintong.visualinspection.bean.User" >
+	
+	<insert id="insertRuleItem" parameterType="List" >
+        INSERT INTO check_rule_item
+        	(rule_id,item_id)
+        VALUES
+         <foreach collection ="list" item="item" index= "index" separator =",">
+        	(#{item.rule_id}, #{item.id})
+         </foreach >
+    </insert>
+    
+    <update id="update" parameterType="com.xintong.visualinspection.bean.CheckRule" >
         UPDATE
-        sys_user
+        check_rule
         SET
-        <if test="username != null">userName = #{username},</if>
-        <if test="age != null">age = #{age},</if>
-        <if test="password != null">password = #{password},</if>
-        id = #{id}
+        <if test="name != null">name = #{name},</if>
+        <if test="checked_person_type != null">checked_person_type = #{checked_person_type},</if>
+        <if test="checked_position_id != null">checked_position_id = #{checked_position_id},</if>
+        <if test="checked_dept_id != null">checked_dept_id = #{checked_dept_id}</if>
         WHERE
         id = #{id}
     </update>
-
+    
+    <delete id="deleteRuleItem" parameterType="java.lang.Long" >
+        DELETE FROM
+        	check_rule_item
+        WHERE
+        	rule_id = #{id}
+    </delete>
+    
     <delete id="delete" parameterType="java.lang.Long" >
         DELETE FROM
-        sys_user
+        check_rule
         WHERE
         id =#{id}
     </delete>
-
-
-    <select id="findByUserName" parameterType="String" resultMap="userMap">
-        select u.*
-        ,r.name
-        from sys_user u
-        LEFT JOIN sys_role_user sru on u.id= sru.Sys_User_id
-        LEFT JOIN sys_role r on sru.sys_role_id=r.id
-        where username= #{username}
-    </select>
 </mapper>

+ 7 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CommonMapper.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xintong.visualinspection.dao.master.CommonDao" >
+    <select id="getLastId" resultType="Long">
+    	select last_insert_id()
+    </select>
+</mapper>

+ 45 - 39
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/ScoreMapper.xml

@@ -1,68 +1,74 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xintong.visualinspection.dao.master.ScoreDao" >
-    <resultMap id="BaseResultMap" type="com.xintong.visualinspection.bean.User" >
+    <resultMap id="BaseResultMap" type="com.xintong.visualinspection.bean.Score" >
         <id column="id" property="id" jdbcType="INTEGER" />
-        <result column="username" property="username" jdbcType="VARCHAR" />
-        <result column="age" property="age" jdbcType="INTEGER" />
-        <result column="password" property="password" jdbcType="VARCHAR" />
-    </resultMap>
-    <resultMap id="userMap" type="com.xintong.visualinspection.bean.User">
-        <id property="id" column="ID"/>
-        <result property="username" column="username"/>
-        <result property="password" column="PASSWORD"/>
-        <collection property="roles" ofType="com.xintong.visualinspection.bean.Role">
-            <result column="name" property="name"/>
-        </collection>
+        <result column="task_id" property="task_id" jdbcType="INTEGER" />
+        <result column="update_time" property="update_time" jdbcType="DATE" />
+        <result column="pics" property="pics" jdbcType="VARCHAR" />
+        <result column="videos" property="videos" jdbcType="VARCHAR" />
+        <result column="check_item_id" property="check_item_id" jdbcType="INTEGER" />
+        <result column="content" property="content" jdbcType="VARCHAR" />
+        <result column="checkman" property="checkman" jdbcType="VARCHAR" />
+        <result column="checked_person" property="checked_person" jdbcType="INTEGER" />
+        <result column="checked_dept" property="checked_dept" jdbcType="INTEGER" />
+        <result column="remark" property="remark" jdbcType="VARCHAR" />
     </resultMap>
 
     <select id="getAll" resultMap="BaseResultMap"  >
-        SELECT
-        id,username,age,password
-        FROM sys_user
+        SELECT *
+        FROM check_score
     </select>
 
     <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >
-        SELECT
-        id,username,age,password
-        FROM sys_user
+        SELECT *
+        FROM check_score
         WHERE id = #{id}
     </select>
+    
+    <select id="getScoreList" parameterType="java.lang.Long" resultMap="BaseResultMap" >
+        SELECT *
+        FROM check_score
+        WHERE 1=1
+        	 <if test="checked_person != null">AND checked_person = #{checked_person}</if>
+        	 <if test="check_item_id != null">AND check_item_id = #{check_item_id}</if>
+        	 <if test="checked_dept != null">AND checked_dept = #{checked_dept}</if>
+        	 <if test="start_time != null">AND update_time &gt;= #{start_time}</if>
+        	 <if test="end_time != null">AND update_time &lt;= #{end_time}</if>
+    </select>
+    
+    <select id="getScoreListByTaskId" parameterType="java.lang.Long" resultMap="BaseResultMap" >
+        SELECT *
+        FROM check_score
+        WHERE task_id = #{task_id}
+    </select>
 
-    <insert id="insert" parameterType="com.xintong.visualinspection.bean.User" >
+    <insert id="insert" parameterType="com.xintong.visualinspection.bean.Score" >
         INSERT INTO
-        sys_user
-        (username,age,password,TRUENAME,ORGANID,BIRTH,AGE,MOBILE,POSITIONID,SEX,WORKNO,IDNO)
+        check_score
+        (task_id,update_time,pics,videos,check_item_id,content,checkman,checked_person,checked_dept,emark)
         VALUES
-        (#{username}, #{age},#{password},#{truename},#{deptId},#{birth},#{age},#{mobile},#{positionId},#{sex},#{workno},#{idno})
+        (#{task_id}, #{update_time},#{pics},#{videos},#{check_item_id},#{content},#{checkman},#{checked_person},#{checked_dept},#{remark})
     </insert>
 
-    <update id="update" parameterType="com.xintong.visualinspection.bean.User" >
+    <update id="update" parameterType="com.xintong.visualinspection.bean.Score" >
         UPDATE
-        sys_user
+        check_score
         SET
-        <if test="username != null">userName = #{username},</if>
-        <if test="age != null">age = #{age},</if>
-        <if test="password != null">password = #{password},</if>
-        id = #{id}
+        <if test="update_time != null">update_time = #{update_time},</if>
+        <if test="pics != null">pics = #{pics},</if>
+        <if test="videos != null">videos = #{videos},</if>
+        <if test="checkman != null">checkman = #{checkman},</if>
+        <if test="checked_person != null">checked_person = #{checked_person},</if>
+        remark=#{remark}
         WHERE
         id = #{id}
     </update>
 
     <delete id="delete" parameterType="java.lang.Long" >
         DELETE FROM
-        sys_user
+        check_score
         WHERE
         id =#{id}
     </delete>
-
-
-    <select id="findByUserName" parameterType="String" resultMap="userMap">
-        select u.*
-        ,r.name
-        from sys_user u
-        LEFT JOIN sys_role_user sru on u.id= sru.Sys_User_id
-        LEFT JOIN sys_role r on sru.sys_role_id=r.id
-        where username= #{username}
-    </select>
 </mapper>

+ 75 - 38
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TaskMapper.xml

@@ -1,68 +1,105 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xintong.visualinspection.dao.master.TaskDao" >
-    <resultMap id="BaseResultMap" type="com.xintong.visualinspection.bean.User" >
+    <resultMap id="BaseResultMap" type="com.xintong.visualinspection.bean.Task" >
         <id column="id" property="id" jdbcType="INTEGER" />
-        <result column="username" property="username" jdbcType="VARCHAR" />
-        <result column="age" property="age" jdbcType="INTEGER" />
-        <result column="password" property="password" jdbcType="VARCHAR" />
+        <result column="name" property="name" jdbcType="VARCHAR" />
+        <result column="check_status" property="check_status" jdbcType="INTEGER" />
+        <result column="video_id" property="video_id" jdbcType="VARCHAR" />
+        <result column="create_time" property="create_time" jdbcType="VARCHAR" />
+        <result column="update_time" property="update_time" jdbcType="VARCHAR" />
+        <result column="start_time" property="start_time" jdbcType="VARCHAR" />
+        <result column="end_time" property="end_time" jdbcType="VARCHAR" />
+        <result column="checkman" property="checkman" jdbcType="INTEGER" />
+        <result column="checked_person" property="checked_person" jdbcType="INTEGER" />
+        <result column="checked_dept" property="checked_dept" jdbcType="INTEGER" />
+        <result column="rule_id" property="rule_id" jdbcType="INTEGER" />
+        <result column="checked_location" property="checked_location" jdbcType="VARCHAR" />
+        <result column="checked_location_type" property="checked_location_type" jdbcType="INTEGER" />
+        <result column="remark" property="remark" jdbcType="VARCHAR" />
     </resultMap>
-    <resultMap id="userMap" type="com.xintong.visualinspection.bean.User">
+    <resultMap id="taskStatusMap" type="com.xintong.visualinspection.bean.TaskStatus">
         <id property="id" column="ID"/>
-        <result property="username" column="username"/>
-        <result property="password" column="PASSWORD"/>
-        <collection property="roles" ofType="com.xintong.visualinspection.bean.Role">
-            <result column="name" property="name"/>
-        </collection>
+        <result property="task_id" column="task_id"/>
+        <result property="update_time" column="update_time"/>
+        <result property="update_user" column="update_user"/>
+        <result property="update_username" column="update_username"/>
+        <result property="check_status" column="check_status"/>
+        <result property="check_status_name" column="check_status_name"/>
     </resultMap>
 
     <select id="getAll" resultMap="BaseResultMap"  >
-        SELECT
-        id,username,age,password
-        FROM sys_user
+        SELECT *
+        FROM check_task
     </select>
 
     <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >
-        SELECT
-        id,username,age,password
-        FROM sys_user
+        SELECT *
+        FROM check_task
         WHERE id = #{id}
     </select>
+    
+    <select id="getList" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap" >
+        SELECT *
+        FROM check_task
+        WHERE 1=1
+        	<if test="check_status != null">AND check_status = #{check_status}</if>
+        	<if test="start_time != null">AND create_time &gt;= #{start_time}</if>
+        	<if test="end_time != null">AND create_time &lt;= #{end_time}</if>
+        	<if test="checked_dept != null">AND checked_dept = #{checked_dept}</if>
+        	<if test="checkman != null">AND checkman = #{checkman}</if>
+        	<if test="checked_person != null">AND checked_person = #{checked_person}</if>
+    </select>
 
-    <insert id="insert" parameterType="com.xintong.visualinspection.bean.User" >
-        INSERT INTO
-        sys_user
-        (username,age,password,TRUENAME,ORGANID,BIRTH,AGE,MOBILE,POSITIONID,SEX,WORKNO,IDNO)
+    <insert id="insert" parameterType="com.xintong.visualinspection.bean.Task" >
+        INSERT INTO check_task
+        (name,check_status,video_id,create_time,update_time,start_time,
+        	end_time,checkman,checked_person,checked_dept,rule_id,checked_location,
+        	checked_location_type,remark
+        )
+        VALUES
+        (#{name}, #{check_status},#{video_id},#{create_time},#{update_time},#{start_time},
+        	#{end_time},#{checkman},#{checked_person},#{checked_dept},#{rule_id},#{checked_location},
+        	#{checked_location_type},#{remark}
+        )
+    </insert>
+    
+    <insert id="insertStatus" parameterType="com.xintong.visualinspection.bean.TaskStatus" >
+        INSERT INTO check_task_status
+        (task_id,update_time,update_user,update_username,check_status,
+        	check_status_name
+        )
         VALUES
-        (#{username}, #{age},#{password},#{truename},#{deptId},#{birth},#{age},#{mobile},#{positionId},#{sex},#{workno},#{idno})
+        (#{task_id}, #{update_time},#{update_user},#{update_username},#{check_status},
+        	#{check_status_name}
+        )
     </insert>
 
-    <update id="update" parameterType="com.xintong.visualinspection.bean.User" >
+    <update id="update" parameterType="com.xintong.visualinspection.bean.Task" >
         UPDATE
-        sys_user
+        check_task
         SET
-        <if test="username != null">userName = #{username},</if>
-        <if test="age != null">age = #{age},</if>
-        <if test="password != null">password = #{password},</if>
-        id = #{id}
+        <if test="name != null">name = #{name},</if>
+        <if test="check_status != null">check_status = #{check_status},</if>
+        <if test="video_id != null">video_id = #{video_id},</if>
+        <if test="update_time != null">update_time = #{update_time},</if>
+        <if test="start_time != null">start_time = #{start_time},</if>
+        <if test="end_time != null">end_time = #{end_time},</if>
+        <if test="checkman != null">checkman = #{checkman},</if>
+        <if test="checked_person != null">checked_person = #{checked_person},</if>
+        <if test="checked_dept != null">checked_dept = #{checked_dept},</if>
+        <if test="rule_id != null">rule_id = #{rule_id},</if>
+        <if test="checked_location != null">checked_location = #{checked_location},</if>
+        <if test="checked_location_type != null">checked_location_type = #{checked_location_type},</if>
+        remark = #{remark}
         WHERE
         id = #{id}
     </update>
 
     <delete id="delete" parameterType="java.lang.Long" >
         DELETE FROM
-        sys_user
+        check_task
         WHERE
         id =#{id}
     </delete>
-
-
-    <select id="findByUserName" parameterType="String" resultMap="userMap">
-        select u.*
-        ,r.name
-        from sys_user u
-        LEFT JOIN sys_role_user sru on u.id= sru.Sys_User_id
-        LEFT JOIN sys_role r on sru.sys_role_id=r.id
-        where username= #{username}
-    </select>
 </mapper>

+ 9 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/BaseService.java

@@ -1,8 +1,17 @@
 package com.xintong.visualinspection.service;
 
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.xintong.visualinspection.dao.master.CommonDao;
+import com.xintong.visualinspection.dao.master.ConstantDao;
+
 /**
  * 文件名:BaseService
  * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
  */
 public class BaseService {
+	@Autowired
+    protected CommonDao commonDao;
+	@Autowired
+	protected ConstantDao constantDao;
 }

+ 2 - 3
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/CheckRuleService.java

@@ -19,9 +19,8 @@ import com.xintong.visualinspection.bean.Constant;
  */
 public interface CheckRuleService {
     public List<CheckRule> getAll();
-    public Constant getById(Long id);
-    public List<CheckRule> getByFlag();
-    public Constant getByFlagAndValue(String flag, int value);
+    public CheckRule getById(Long id);
+    public List<CheckRule> getByName(String name);
     public void insert(CheckRule checkRule);
     public void update(CheckRule checkRule);
     public void delete(Long id);

+ 4 - 4
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/ScoreService.java

@@ -18,10 +18,10 @@ import com.xintong.visualinspection.bean.Score;
  *
  */
 public interface ScoreService {
-    public List<Score> getAll();
-    public Constant getById(Long id);
-    public List<Score> getByFlag();
-    public Constant getByFlagAndValue(String flag, int value);
+	public List<Score> getAll();
+    public Score getOne(Long id);
+    public List<Score> getScoreList(Score score);
+    public List<Score> getScoreListByTaskId(Long task_id);
     public void insert(Score score);
     public void update(Score score);
     public void delete(Long id);

+ 2 - 3
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/TaskService.java

@@ -19,9 +19,8 @@ import com.xintong.visualinspection.bean.Task;
  */
 public interface TaskService {
     public List<Task> getAll();
-    public Constant getById(Long id);
-    public List<Task> getByFlag();
-    public Constant getByFlagAndValue(String flag, int value);
+    public Task getById(Long id);
+    public List<Task> getTaskList(Task task);
     public void insert(Task task);
     public void update(Task task);
     public void delete(Long id);

+ 31 - 25
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckRuleServiceImpl.java

@@ -6,8 +6,8 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import com.xintong.visualinspection.bean.CheckItem;
 import com.xintong.visualinspection.bean.CheckRule;
-import com.xintong.visualinspection.bean.Constant;
 import com.xintong.visualinspection.dao.master.CheckRuleDao;
 import com.xintong.visualinspection.service.BaseService;
 import com.xintong.visualinspection.service.CheckRuleService;
@@ -25,48 +25,54 @@ public class CheckRuleServiceImpl extends BaseService implements CheckRuleServic
     @Autowired
     private CheckRuleDao checkRuleDao;
 
-
-	public List getAll() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-
-	public Constant getById(Long id) {
+	@Override
+	public List<CheckRule> getAll() {
 		// TODO Auto-generated method stub
-		return null;
+		return checkRuleDao.getAll();
 	}
 
-
-	public List getByFlag() {
+	@Override
+	public CheckRule getById(Long id) {
 		// TODO Auto-generated method stub
-		return null;
+		return checkRuleDao.getOne(id);
 	}
 
-
-	public Constant getByFlagAndValue(String flag, int value) {
+	@Override
+	public List<CheckRule> getByName(String name) {
 		// TODO Auto-generated method stub
-		return null;
+		return checkRuleDao.getByName(name);
 	}
 
-
+	@Override
 	public void insert(CheckRule checkRule) {
 		// TODO Auto-generated method stub
-		
+		checkRuleDao.insert(checkRule);
+		if(checkRule.getCheck_items()!=null && checkRule.getCheck_items().size()>0) {
+			Long id = checkRuleDao.getLastId();
+			for(CheckItem item:checkRule.getCheck_items()){
+				item.setRule_id(id);
+			}
+			checkRuleDao.insertRuleItem(checkRule.getCheck_items());
+		}
 	}
 
-
+	@Override
 	public void update(CheckRule checkRule) {
 		// TODO Auto-generated method stub
-		
+		checkRuleDao.update(checkRule);
+		checkRuleDao.deleteRuleItem(checkRule.getId());
+		if(checkRule.getCheck_items()!=null && checkRule.getCheck_items().size()>0) {
+			Long id = checkRule.getId();
+			for(CheckItem item:checkRule.getCheck_items()){
+				item.setRule_id(id);
+			}
+			checkRuleDao.insertRuleItem(checkRule.getCheck_items());
+		}
 	}
 
-
+	@Override
 	public void delete(Long id) {
 		// TODO Auto-generated method stub
-		
+		checkRuleDao.delete(id);
 	}
-
-
-    
 }

+ 19 - 23
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/ScoreServiceImpl.java

@@ -6,14 +6,13 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.xintong.visualinspection.bean.Constant;
 import com.xintong.visualinspection.bean.Score;
 import com.xintong.visualinspection.dao.master.ScoreDao;
 import com.xintong.visualinspection.service.BaseService;
 import com.xintong.visualinspection.service.ScoreService;
 
 /**
- * 文件名:UserServiceImpl
+ * 文件名:ScoreServiceImpl
  * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
  */
 @Service
@@ -25,48 +24,45 @@ public class ScoreServiceImpl extends BaseService implements ScoreService {
     @Autowired
     private ScoreDao scoreDao;
 
-
-	public List getAll() {
+	@Override
+	public List<Score> getAll() {
 		// TODO Auto-generated method stub
-		return null;
+		return scoreDao.getAll();
 	}
 
-
-	public Constant getById(Long id) {
+	@Override
+	public Score getOne(Long id) {
 		// TODO Auto-generated method stub
-		return null;
+		return scoreDao.getOne(id);
 	}
 
-
-	public List getByFlag() {
+	@Override
+	public List<Score> getScoreList(Score score) {
 		// TODO Auto-generated method stub
-		return null;
+		return scoreDao.getScoreList(score);
 	}
 
-
-	public Constant getByFlagAndValue(String flag, int value) {
+	@Override
+	public List<Score> getScoreListByTaskId(Long task_id) {
 		// TODO Auto-generated method stub
-		return null;
+		return scoreDao.getScoreListByTaskId(task_id);
 	}
 
-
+	@Override
 	public void insert(Score score) {
 		// TODO Auto-generated method stub
-		
+		scoreDao.insert(score);
 	}
 
-
+	@Override
 	public void update(Score score) {
 		// TODO Auto-generated method stub
-		
+		scoreDao.update(score);
 	}
 
-
+	@Override
 	public void delete(Long id) {
 		// TODO Auto-generated method stub
-		
+		scoreDao.delete(id);
 	}
-
-
-    
 }

+ 35 - 18
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TaskServiceImpl.java

@@ -1,5 +1,6 @@
 package com.xintong.visualinspection.service.impl;
 
+import java.util.Date;
 import java.util.List;
 
 import org.slf4j.LoggerFactory;
@@ -8,6 +9,7 @@ import org.springframework.stereotype.Service;
 
 import com.xintong.visualinspection.bean.Constant;
 import com.xintong.visualinspection.bean.Task;
+import com.xintong.visualinspection.bean.TaskStatus;
 import com.xintong.visualinspection.dao.master.TaskDao;
 import com.xintong.visualinspection.service.BaseService;
 import com.xintong.visualinspection.service.TaskService;
@@ -20,51 +22,66 @@ import com.xintong.visualinspection.service.TaskService;
 public class TaskServiceImpl extends BaseService implements TaskService {
 
     private static final org.slf4j.Logger logger = LoggerFactory.getLogger(TaskServiceImpl.class);
-
-
     @Autowired
     private TaskDao taskDao;
 
-
-	public List getAll() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-
-	public Constant getById(Long id) {
+	@Override
+	public List<Task> getAll() {
 		// TODO Auto-generated method stub
-		return null;
+		return taskDao.getAll();
 	}
 
 
-	public List getByFlag() {
+	@Override
+	public Task getById(Long id) {
 		// TODO Auto-generated method stub
-		return null;
+		return taskDao.getOne(id);
 	}
 
 
-	public Constant getByFlagAndValue(String flag, int value) {
+	@Override
+	public List<Task> getTaskList(Task task) {
 		// TODO Auto-generated method stub
-		return null;
+		return taskDao.getList(task);
 	}
 
 
+	@Override
 	public void insert(Task task) {
 		// TODO Auto-generated method stub
-		
+		taskDao.insert(task);
+		TaskStatus status = new TaskStatus();
+		status.setTask_id(commonDao.getLastId());
+		status.setUpdate_time(new Date());
+		status.setUpdate_user(task.getCheckman());
+		status.setUpdate_username("");
+		status.setCheck_status(task.getCheck_status());
+		String name = (constantDao.getByFlagAndValue(new Constant("task_status",task.getCheck_status()))).getCode_name();
+		status.setCheck_status_name(name);
+		taskDao.insertStatus(status);
 	}
 
 
+	@Override
 	public void update(Task task) {
 		// TODO Auto-generated method stub
-		
+		taskDao.update(task);
+		TaskStatus status = new TaskStatus();
+		status.setTask_id(task.getId());
+		status.setUpdate_time(new Date());
+		status.setUpdate_user(task.getCheckman());
+		status.setUpdate_username("");
+		status.setCheck_status(task.getCheck_status());
+		String name = (constantDao.getByFlagAndValue(new Constant("task_status",task.getCheck_status()))).getCode_name();
+		status.setCheck_status_name(name);
+		taskDao.insertStatus(status);
 	}
 
 
+	@Override
 	public void delete(Long id) {
 		// TODO Auto-generated method stub
-		
+		taskDao.delete(id);
 	}
 
 }

+ 1 - 1
VisualInspection_server/src/main/resources/errcode.properties

@@ -37,7 +37,7 @@
 #\u8003\u6838\u9879\u7ba1\u7406\u9519\u8bef
 21001=
 #\u8003\u6838\u529e\u6cd5\u7ba1\u7406\u9519\u8bef
-21101=
+21101=\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a
 #\u4efb\u52a1\u7ba1\u7406\u9519\u8bef
 21201=
 #\u6263\u5206\u7ba1\u7406\u9519\u8bef