|
|
@@ -9,9 +9,11 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.mysql.jdbc.StringUtils;
|
|
|
import com.xintong.visualinspection.bean.Constant;
|
|
|
+import com.xintong.visualinspection.bean.Log;
|
|
|
import com.xintong.visualinspection.bean.Task;
|
|
|
import com.xintong.visualinspection.bean.TaskStatus;
|
|
|
import com.xintong.visualinspection.bean.UserClassCount;
|
|
|
+import com.xintong.visualinspection.dao.master.LogDao;
|
|
|
import com.xintong.visualinspection.dao.master.TaskDao;
|
|
|
import com.xintong.visualinspection.service.BaseService;
|
|
|
import com.xintong.visualinspection.service.TaskService;
|
|
|
@@ -27,7 +29,8 @@ public class TaskServiceImpl extends BaseService implements TaskService {
|
|
|
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(TaskServiceImpl.class);
|
|
|
@Autowired
|
|
|
private TaskDao taskDao;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private LogDao logDao;
|
|
|
@Override
|
|
|
public List<Task> getAll() {
|
|
|
// TODO Auto-generated method stub
|
|
|
@@ -123,6 +126,15 @@ public class TaskServiceImpl extends BaseService implements TaskService {
|
|
|
taskDao.insertStatus(status);
|
|
|
}
|
|
|
|
|
|
+ //考核人员不一致保存日志
|
|
|
+ if(task.getChecked_person()!=null && (!oldTask.getChecked_person().equals(task.getChecked_person()))){
|
|
|
+ Log log = new Log();
|
|
|
+ log.setTask_id(task.getId());
|
|
|
+ log.setUpdate_user(task.getUpdate_user());
|
|
|
+ log.setDept_id(oldTask.getChecked_dept());
|
|
|
+ log.setContent("更改考核人员:"+oldTask.getChecked_person()+"-->"+task.getChecked_person());
|
|
|
+ logDao.insert(log);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|