Commit 339deec8 authored by hongguangwu's avatar hongguangwu

MVP1.6.7-写为不完整

parent 472a52db
......@@ -124,5 +124,5 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
* 批量刷新项目档案的是否完整状态
* @return
*/
void batchUpdateEmpProjectCompleteStatus(@Param("idList") List<String> idList);
void batchUpdateEmpProjectCompleteStatus(@Param("idList") List<String> idList, @Param("isComplete") String isComplete);
}
......@@ -151,17 +151,24 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
List<TCompleteMonitorFlagVo> flagList = baseMapper.checkEmpProjectCompleteFlag(null);
if (!flagList.isEmpty()) {
List<String> projectIdList = new ArrayList<>();
List<String> projectNotIdList = new ArrayList<>();
String projectId;
for(TCompleteMonitorFlagVo flagVo : flagList) {
boolean flag = checkObjFieldIsNull(flagVo);
projectId = flagVo.getEmpProjectId();
if(!flag){
projectId = flagVo.getEmpProjectId();
projectIdList.add(projectId);
} else {
projectNotIdList.add(projectId);
}
}
//批量更新
if (!projectIdList.isEmpty()) {
projectMapper.batchUpdateEmpProjectCompleteStatus(projectIdList);
projectMapper.batchUpdateEmpProjectCompleteStatus(projectIdList, CommonConstants.ZERO_STRING);
}
//批量更新-不完整
if (!projectIdList.isEmpty()) {
projectMapper.batchUpdateEmpProjectCompleteStatus(projectNotIdList, CommonConstants.ONE_STRING);
}
}
......@@ -188,17 +195,23 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
List<TCompleteMonitorFlagVo> flagList = baseMapper.checkEmpProjectCompleteFlag(deptNo);
if (!flagList.isEmpty()) {
List<String> projectIdList = new ArrayList<>();
List<String> projectNotIdList = new ArrayList<>();
String projectId;
for(TCompleteMonitorFlagVo flagVo : flagList) {
boolean flag = checkObjFieldIsNull(flagVo);
projectId = flagVo.getEmpProjectId();
if(!flag){
projectId = flagVo.getEmpProjectId();
projectIdList.add(projectId);
} else {
projectNotIdList.add(projectId);
}
}
//批量更新
if (!projectIdList.isEmpty()) {
projectMapper.batchUpdateEmpProjectCompleteStatus(projectIdList);
projectMapper.batchUpdateEmpProjectCompleteStatus(projectIdList, CommonConstants.ZERO_STRING);
}
if (!projectNotIdList.isEmpty()) {
projectMapper.batchUpdateEmpProjectCompleteStatus(projectNotIdList, CommonConstants.ONE_STRING);
}
}
......
......@@ -1089,7 +1089,7 @@
<!-- 批量刷新项目档案的是否完整状态 -->
<update id="batchUpdateEmpProjectCompleteStatus">
update t_employee_project a set a.IS_COMPLETE = '0' where a.id in
update t_employee_project a set a.IS_COMPLETE = #{isComplete} where a.id in
<foreach item="item" index="index" collection="idList" open="(" separator="," close=")">
#{item}
</foreach>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment