Commit 34623b64 authored by chenhao's avatar chenhao

bug 5569

parent aeb3fdd1
...@@ -13,7 +13,8 @@ public enum RuleTypeEnum { ...@@ -13,7 +13,8 @@ public enum RuleTypeEnum {
计划提交("计划提交", "addPlan","auditPage", RuleConstant.WEB, RuleConstant.TASK), 计划提交("计划提交", "addPlan","auditPage", RuleConstant.WEB, RuleConstant.TASK),
计划审核("计划审核", "planAudit", "auditPage", RuleConstant.APP_WEB, RuleConstant.NOTIFY), 计划审核("计划审核", "planAudit", "auditPage", RuleConstant.APP_WEB, RuleConstant.NOTIFY),
计划审核完成("计划审核完成", "planAuditAll", "formulatePage", RuleConstant.APP_WEB, RuleConstant.TASK), 计划审核完成("计划审核完成", "planAuditAll", "formulatePage", RuleConstant.APP_WEB, RuleConstant.TASK),
计划生成("计划生成", "addPlanTask", null, RuleConstant.APP, RuleConstant.NOTIFY), 消息型计划生成("计划生成", "addPlanTask", null, RuleConstant.APP, RuleConstant.NOTIFY),
任务型计划生成("计划生成", "addPlanTask", null, RuleConstant.APP, RuleConstant.TASK),
计划完成("计划完成", "planCompleted", null, RuleConstant.APP_WEB, RuleConstant.NOTIFY), 计划完成("计划完成", "planCompleted", null, RuleConstant.APP_WEB, RuleConstant.NOTIFY),
// 隐患 // 隐患
......
...@@ -139,41 +139,40 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -139,41 +139,40 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void reGenPlanTask(HashMap<String, Object> param) throws ParseException { public void reGenPlanTask(HashMap<String, Object> param) throws ParseException {
//1.公共参数准备 // 1.公共参数准备
String planId = param.get("planId").toString();//重做的计划编号id String planId = param.get("planId").toString();// 重做的计划编号id
String strBeginDate = param.get("beginDate").toString();//开始日期(yyyy-MM-dd) String strBeginDate = param.get("beginDate").toString();// 开始日期(yyyy-MM-dd)
String strEndDate = param.get("endDate").toString();//结束日期(yyyy-MM-dd) String strEndDate = param.get("endDate").toString();// 结束日期(yyyy-MM-dd)
String flag = param.get("changeFlag").toString();//是否记为合格标记:0-否,1-是 String flag = param.get("changeFlag").toString();// 是否记为合格标记:0-否,1-是
Plan plan = iplanDao.findById(Long.parseLong(planId)).get();// Plan plan = iplanDao.findById(Long.parseLong(planId)).get();//
if (StringUtil.isNotEmpty(plan.getUserId())) { if (StringUtil.isNotEmpty(plan.getUserId())) {
//2.数据必输校验,不满足直接return,不再向下进行 // 2.数据必输校验,不满足直接return,不再向下进行
Boolean fileFlag = PlanTaskUtil.checkMustFile(plan); Boolean fileFlag = PlanTaskUtil.checkMustFile(plan);
if (!fileFlag) { if (!fileFlag) {
return; return;
} }
//3.计算生成数据的日期区间(前10位:yyyy-MM-dd) // 3.计算生成数据的日期区间(前10位:yyyy-MM-dd)
CalDateVo vo = PlanTaskUtil.reGenPlanTaskData(plan, strBeginDate, strEndDate); CalDateVo vo = PlanTaskUtil.reGenPlanTaskData(plan, strBeginDate, strEndDate);
if (null == vo) {//计划未开始,则结束 if (null == vo) {// 计划未开始,则结束
return; return;
} }
if (!vo.getIsGenData()) {// 日期不符合条件直接结束
if (!vo.getIsGenData()) {//日期不符合条件直接结束
return; return;
} }
//3.删除planTask表,按照计划id+日期 // 3.删除planTask表,按照计划id+日期
deletePlanTaskAndDet(param); deletePlanTaskAndDet(param);
//5.执行数据生成(具体时间 + 人员) // 5.执行数据生成(具体时间 + 人员)
List<HashMap<String, Object>> list = genAllExeDate(plan, vo, XJConstant.REGEN_FLAG); List<HashMap<String, Object>> list = genAllExeDate(plan, vo, XJConstant.REGEN_FLAG);
//6.插入planTask及planTaskDetail // 6.插入planTask及planTaskDetail
insertPlanTaskAndDet(list, plan, flag, new Date()); insertPlanTaskAndDet(list, plan, flag, new Date());
//7.重新统计计划 // 7.重新统计计划
if (ObjectUtils.isEmpty(plan.getUserId())) { if (ObjectUtils.isEmpty(plan.getUserId())) {
return; return;
} }
...@@ -182,7 +181,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -182,7 +181,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
} }
@Override @Override
public void reformStatisticsPlanTask(String strBginDate, String strEndDate, String userId, String orgCode) throws ParseException { public void reformStatisticsPlanTask(String strBginDate, String strEndDate, String userId, String orgCode)
throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date startTime = sdf.parse(strBginDate); Date startTime = sdf.parse(strBginDate);
...@@ -280,10 +280,14 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -280,10 +280,14 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
Map<String, String> depMap = new HashMap<>(); Map<String, String> depMap = new HashMap<>();
if (!CollectionUtils.isEmpty(userList)) { if (!CollectionUtils.isEmpty(userList)) {
userIds = String.join(",", userList); userIds = String.join(",", userList);
List<AgencyUserModel> userModelList = remoteSecurityService.listUserByUserIds(toke, product, appKey, userIds); List<AgencyUserModel> userModelList = remoteSecurityService.listUserByUserIds(toke, product, appKey,
userMap = userModelList.stream().collect(Collectors.toMap(AgencyUserModel::getUserId, AgencyUserModel::getRealName, (k1, k2) -> k2)); userIds);
userMap = userModelList.stream().collect(
Collectors.toMap(AgencyUserModel::getUserId, AgencyUserModel::getRealName, (k1, k2) -> k2));
for (AgencyUserModel agencyUserModel : userModelList) { for (AgencyUserModel agencyUserModel : userModelList) {
LoginName.put(agencyUserModel.getUserId(), agencyUserModel.getMobile() != null ? agencyUserModel.getMobile() : agencyUserModel.getLandlinePhone()); LoginName.put(agencyUserModel.getUserId(),
agencyUserModel.getMobile() != null ? agencyUserModel.getMobile()
: agencyUserModel.getLandlinePhone());
} }
} }
// if(!CollectionUtils.isEmpty(deptList)){ // if(!CollectionUtils.isEmpty(deptList)){
...@@ -301,14 +305,15 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -301,14 +305,15 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
// }); // });
// } // }
// } // }
//新安全 // 新安全
content.forEach(s -> { content.forEach(s -> {
StringBuffer buffer = new StringBuffer(); StringBuffer buffer = new StringBuffer();
if (s.getUserDept().indexOf("@") > 0) { if (s.getUserDept().indexOf("@") > 0) {
String[] dept = s.getUserDept().split(","); String[] dept = s.getUserDept().split(",");
Arrays.asList(dept).stream().forEach(x -> { Arrays.asList(dept).stream().forEach(x -> {
String[] deptTemp = x.split("@"); String[] deptTemp = x.split("@");
List<LinkedHashMap> deptL = remoteSecurityService.listDepartmentByDeptIds(toke, product, appKey, deptTemp[1]); List<LinkedHashMap> deptL = remoteSecurityService.listDepartmentByDeptIds(toke, product, appKey,
deptTemp[1]);
if (deptL.size() > 0) { if (deptL.size() > 0) {
buffer.append(deptL.get(0).get("departmentName")).append(","); buffer.append(deptL.get(0).get("departmentName")).append(",");
} else { } else {
...@@ -318,7 +323,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -318,7 +323,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}); });
} else { } else {
String[] deptTemp = s.getUserDept().split(","); String[] deptTemp = s.getUserDept().split(",");
List<LinkedHashMap> deptL = remoteSecurityService.listDepartmentByDeptIds(toke, product, appKey, deptTemp[1]); List<LinkedHashMap> deptL = remoteSecurityService.listDepartmentByDeptIds(toke, product, appKey,
deptTemp[1]);
if (deptL.size() > 0) { if (deptL.size() > 0) {
buffer.append(deptL.get(0).get("departmentName")).append(","); buffer.append(deptL.get(0).get("departmentName")).append(",");
} else { } else {
...@@ -339,7 +345,6 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -339,7 +345,6 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
c.setUserName(userNames.toString()); c.setUserName(userNames.toString());
}); });
return content; return content;
} }
...@@ -349,70 +354,143 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -349,70 +354,143 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void taskExecution(String runDate) { public void taskExecution(String runDate) {
//1.扫描plan表查询,需要生成执行数据的任务信息,无则return // 1.扫描plan表查询,需要生成执行数据的任务信息,无则return
Date now = new Date();//今天 Date now = new Date();// 今天
if (runDate != null) {//上送则已上送的为准 if (runDate != null) {// 上送则已上送的为准
now = DateUtil.str2Date(runDate, "yyyyMMdd"); now = DateUtil.str2Date(runDate, "yyyyMMdd");
} }
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
String strDate = df.format(now); String strDate = df.format(now);
String tomorrow = DateUtil.getIntervalDateStr(now, 1, "yyyy-MM-dd");//下一天 String tomorrow = DateUtil.getIntervalDateStr(now, 1, "yyyy-MM-dd");// 下一天
// 根据计划状态5,6和next_gen_date查询需要生成任务的计划 // 根据计划状态5,6和next_gen_date查询需要生成任务的计划
List<Plan> planList = iplanDao.queryScheduledPlan(strDate, String.valueOf(PlanStatusEnum.EXAMINE_DEVELOPED.getValue()), String.valueOf(PlanStatusEnum.IN_EXECUTION.getValue())); List<Plan> planList = iplanDao.queryScheduledPlan(strDate,
String.valueOf(PlanStatusEnum.EXAMINE_DEVELOPED.getValue()),
String.valueOf(PlanStatusEnum.IN_EXECUTION.getValue()));
if (planList == null || planList.size() <= 0) { if (planList == null || planList.size() <= 0) {
log.info(strDate + " " + " 暂无待生成执行数据的计划"); log.info(strDate + " " + " 暂无待生成执行数据的计划");
return; return;
} }
//2.循环遍历执行 // 2.循环遍历执行
HashMap<String, Object> paramMap = new HashMap<String, Object>();
for (Plan plan : planList) {
if (StringUtils.isEmpty(plan.getUserId()))
continue;
paramMap.clear();
paramMap.put("id", plan.getId());
// 2.1计划数据合法性校验
Boolean fileFlag = PlanTaskUtil.checkMustFile(plan);
if (!fileFlag) {
paramMap.put("next_gen_date", tomorrow);
planMapper.updPlanStatusOrGenDate(paramMap);// 更新为明天
continue;
}
// 2.2.计算生成数据的日期区间
CalDateVo vo = PlanTaskUtil.reGenPlanTaskData(plan, tomorrow, tomorrow);
// 计划未开始,则更新生成时间为明天
if (null == vo) {
paramMap.put("next_gen_date", tomorrow);
planMapper.updPlanStatusOrGenDate(paramMap);// 更新为明天
continue;
}
// 计划已过期,则更新status = 7,已完成
if (!vo.getIsGenData()) {
paramMap.put("status", PlanStatusEnum.COMPLETED.getValue());
planMapper.updPlanStatusOrGenDate(paramMap);
continue;
}
// 2.3.执行数据生成(具体时间 + 人员)
List<HashMap<String, Object>> list = genAllExeDate(plan, vo, XJConstant.SCHED_FLAG);
if (XJConstant.UPD_PLAN_GEN_DATE.equals(vo.getUpdFlag())) {
paramMap.put("next_gen_date", tomorrow);
planMapper.updPlanStatusOrGenDate(paramMap);// 更新为明天
continue;
} else if (XJConstant.UPD_PLAN_STATUS.equals(vo.getUpdFlag())) {
paramMap.put("status", XJConstant.PLAN_STATUS_STOP);
planMapper.updPlanStatusOrGenDate(paramMap);// 更新status = 1,停用
continue;
}
// 2.4.删除今天可能重做生成的数据(计划重做后进行了计划的编辑)
if (iplanTaskDao.findById(plan.getPlanTaskId()) != null
&& plan.getFirstFlag() == XJConstant.PLAN_FIRST_STATUS_YES)
if (iplanTaskDao.existsById(plan.getPlanTaskId())) {
iplanTaskDao.deleteById(plan.getPlanTaskId());
}
// 2.5.插入planTask及planTaskDetail
insertPlanTaskAndDet(list, plan, XJConstant.SCHED_FLAG, now);
}
}
/*
* 用于隐患导入之后的任务生成,不能使用时间获取所有的任务,而是当前时间的任务
*
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void taskExecutionImportPlan(List<Plan> planList) {
Date now = new Date();// 今天
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
String strDate = df.format(now);
String tomorrow = DateUtil.getIntervalDateStr(now, 1, "yyyy-MM-dd");// 下一天
if (planList == null || planList.size() <= 0) {
log.info(" 暂无待生成执行数据的计划");
return;
}
// 2.循环遍历执行
HashMap<String, Object> paramMap = new HashMap<String, Object>(); HashMap<String, Object> paramMap = new HashMap<String, Object>();
for (Plan plan : planList) { for (Plan plan : planList) {
if (StringUtils.isEmpty(plan.getUserId())) if (StringUtils.isEmpty(plan.getUserId()))
continue; continue;
paramMap.clear(); paramMap.clear();
paramMap.put("id", plan.getId()); paramMap.put("id", plan.getId());
//2.1计划数据合法性校验 // 2.1计划数据合法性校验
Boolean fileFlag = PlanTaskUtil.checkMustFile(plan); Boolean fileFlag = PlanTaskUtil.checkMustFile(plan);
if (!fileFlag) { if (!fileFlag) {
paramMap.put("next_gen_date", tomorrow); paramMap.put("next_gen_date", tomorrow);
planMapper.updPlanStatusOrGenDate(paramMap);//更新为明天 planMapper.updPlanStatusOrGenDate(paramMap);// 更新为明天
continue; continue;
} }
//2.2.计算生成数据的日期区间 // 2.2.计算生成数据的日期区间
CalDateVo vo = PlanTaskUtil.reGenPlanTaskData(plan, tomorrow, tomorrow); CalDateVo vo = PlanTaskUtil.reGenPlanTaskData(plan, tomorrow, tomorrow);
//计划未开始,则更新生成时间为明天 // 计划未开始,则更新生成时间为明天
if (null == vo) { if (null == vo) {
paramMap.put("next_gen_date", tomorrow); paramMap.put("next_gen_date", tomorrow);
planMapper.updPlanStatusOrGenDate(paramMap);//更新为明天 planMapper.updPlanStatusOrGenDate(paramMap);// 更新为明天
continue; continue;
} }
//计划已过期,则更新status = 7,已完成 // 计划已过期,则更新status = 7,已完成
if (!vo.getIsGenData()) { if (!vo.getIsGenData()) {
paramMap.put("status", PlanStatusEnum.COMPLETED.getValue()); paramMap.put("status", PlanStatusEnum.COMPLETED.getValue());
planMapper.updPlanStatusOrGenDate(paramMap); planMapper.updPlanStatusOrGenDate(paramMap);
continue; continue;
} }
//2.3.执行数据生成(具体时间 + 人员) // 2.3.执行数据生成(具体时间 + 人员)
List<HashMap<String, Object>> list = genAllExeDate(plan, vo, XJConstant.SCHED_FLAG); List<HashMap<String, Object>> list = genAllExeDate(plan, vo, XJConstant.SCHED_FLAG);
if (XJConstant.UPD_PLAN_GEN_DATE.equals(vo.getUpdFlag())) { if (XJConstant.UPD_PLAN_GEN_DATE.equals(vo.getUpdFlag())) {
paramMap.put("next_gen_date", tomorrow); paramMap.put("next_gen_date", tomorrow);
planMapper.updPlanStatusOrGenDate(paramMap);//更新为明天 planMapper.updPlanStatusOrGenDate(paramMap);// 更新为明天
continue; continue;
} else if (XJConstant.UPD_PLAN_STATUS.equals(vo.getUpdFlag())) { } else if (XJConstant.UPD_PLAN_STATUS.equals(vo.getUpdFlag())) {
paramMap.put("status", XJConstant.PLAN_STATUS_STOP); paramMap.put("status", XJConstant.PLAN_STATUS_STOP);
planMapper.updPlanStatusOrGenDate(paramMap);//更新status = 1,停用 planMapper.updPlanStatusOrGenDate(paramMap);// 更新status = 1,停用
continue; continue;
} }
//2.4.删除今天可能重做生成的数据(计划重做后进行了计划的编辑) // 2.4.删除今天可能重做生成的数据(计划重做后进行了计划的编辑)
if (iplanTaskDao.findById(plan.getPlanTaskId()) != null && plan.getFirstFlag() == XJConstant.PLAN_FIRST_STATUS_YES) if (iplanTaskDao.findById(plan.getPlanTaskId()) != null
&& plan.getFirstFlag() == XJConstant.PLAN_FIRST_STATUS_YES)
if (iplanTaskDao.existsById(plan.getPlanTaskId())) { if (iplanTaskDao.existsById(plan.getPlanTaskId())) {
iplanTaskDao.deleteById(plan.getPlanTaskId()); iplanTaskDao.deleteById(plan.getPlanTaskId());
} }
//2.5.插入planTask及planTaskDetail // 2.5.插入planTask及planTaskDetail
insertPlanTaskAndDet(list, plan, XJConstant.SCHED_FLAG, now); insertPlanTaskAndDet(list, plan, XJConstant.SCHED_FLAG, now);
} }
} }
...@@ -441,22 +519,21 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -441,22 +519,21 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
* @return * @return
*/ */
public List<HashMap<String, Object>> genAllExeDate(Plan plan, CalDateVo vo, String flag) { public List<HashMap<String, Object>> genAllExeDate(Plan plan, CalDateVo vo, String flag) {
//1.生成前8位日期(yyyy-MM-dd) // 1.生成前8位日期(yyyy-MM-dd)
List<HashMap<String, Date>> list = PlanTaskUtil.genExeDate(plan, vo, flag); List<HashMap<String, Date>> list = PlanTaskUtil.genExeDate(plan, vo, flag);
if (list == null || list.size() <= 0) { if (list == null || list.size() <= 0) {
vo.setUpdFlag(XJConstant.UPD_PLAN_GEN_DATE); vo.setUpdFlag(XJConstant.UPD_PLAN_GEN_DATE);
return null; return null;
} }
//2.生成完整时间(yyyy-MM-dd HH:mm:ss) // 2.生成完整时间(yyyy-MM-dd HH:mm:ss)
List<HashMap<String, Object>> timeList = PlanTaskUtil.genWholeExeDate(list, plan); List<HashMap<String, Object>> timeList = PlanTaskUtil.genWholeExeDate(list, plan);
if (timeList == null || timeList.size() <= 0) { if (timeList == null || timeList.size() <= 0) {
vo.setUpdFlag(XJConstant.UPD_PLAN_STATUS); vo.setUpdFlag(XJConstant.UPD_PLAN_STATUS);
} }
//3.生成含有人员信息的日期执行数据 // 3.生成含有人员信息的日期执行数据
return PlanTaskUtil.genWholeExeData(timeList, plan); return PlanTaskUtil.genWholeExeData(timeList, plan);
} }
/** /**
* plantask及det入库 * plantask及det入库
* *
...@@ -484,7 +561,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -484,7 +561,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
String endTime = list.get(i).get("END_TIME").toString(); String endTime = list.get(i).get("END_TIME").toString();
String userId = list.get(i).get("USER_ID") == null ? "-1" : list.get(i).get("USER_ID").toString(); String userId = list.get(i).get("USER_ID") == null ? "-1" : list.get(i).get("USER_ID").toString();
String userName = list.get(i).get("USER_NAME") == null ? "" : list.get(i).get("USER_NAME").toString(); String userName = list.get(i).get("USER_NAME") == null ? "" : list.get(i).get("USER_NAME").toString();
PlanTask planTask = iplanTaskDao.findByUserIdAndBeginTimeAndEndTimeAndPlanIdAndRouteId(userId, startTime, endTime, plan.getId(), plan.getRouteId()); PlanTask planTask = iplanTaskDao.findByUserIdAndBeginTimeAndEndTimeAndPlanIdAndRouteId(userId,
startTime, endTime, plan.getId(), plan.getRouteId());
if (planTask != null) { if (planTask != null) {
continue; continue;
} }
...@@ -498,7 +576,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -498,7 +576,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
planTask.setUserId(userId); planTask.setUserId(userId);
planTask.setPointNum(pointNum); planTask.setPointNum(pointNum);
if (XJConstant.FIX_DATE_NO.equals(isFixDate)) { if (XJConstant.FIX_DATE_NO.equals(isFixDate)) {
if (sdf.parse(startTime).getTime() <= now.getTime() && sdf.parse(endTime).getTime() >= now.getTime()) { if (sdf.parse(startTime).getTime() <= now.getTime()
&& sdf.parse(endTime).getTime() >= now.getTime()) {
planTask.setFinishStatus(XJConstant.TASK_STATUS_DEAL); planTask.setFinishStatus(XJConstant.TASK_STATUS_DEAL);
planTask.setFinishNum(0); planTask.setFinishNum(0);
} else { } else {
...@@ -508,7 +587,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -508,7 +587,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
} }
} }
} else { } else {
if (sdf.parse(startTime).getTime() <= now.getTime() && sdf.parse(endTime).getTime() >= now.getTime()) { if (sdf.parse(startTime).getTime() <= now.getTime()
&& sdf.parse(endTime).getTime() >= now.getTime()) {
planTask.setFinishStatus(XJConstant.TASK_STATUS_DEAL); planTask.setFinishStatus(XJConstant.TASK_STATUS_DEAL);
planTask.setFinishNum(0); planTask.setFinishNum(0);
} }
...@@ -560,22 +640,24 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -560,22 +640,24 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
} }
// 3.如果为自动任务调用,则更新id,如果重做或且下次时间大于等于明天,则更新planTaskId到plan表 // 3.如果为自动任务调用,则更新id,如果重做或且下次时间大于等于明天,则更新planTaskId到plan表
Date genDate = DateUtil.str2Date(list.get(list.size() - 1).get("NEXT_GEN_DATE").toString(), "yyyy-MM-dd");//下次生成日期 Date genDate = DateUtil.str2Date(list.get(list.size() - 1).get("NEXT_GEN_DATE").toString(), "yyyy-MM-dd");// 下次生成日期
//明天 // 明天
Date tomorrow = DateUtil.getIntervalDate(now, 1); Date tomorrow = DateUtil.getIntervalDate(now, 1);
String strGenDate = list.get(list.size() - 1).get("NEXT_GEN_DATE").toString().substring(0, 10); String strGenDate = list.get(list.size() - 1).get("NEXT_GEN_DATE").toString().substring(0, 10);
HashMap<String, Object> paramMap = new HashMap<String, Object>(); HashMap<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("id", plan.getId()); paramMap.put("id", plan.getId());
paramMap.put("next_gen_date", strGenDate); paramMap.put("next_gen_date", strGenDate);
if (XJConstant.SCHED_FLAG.equals(flag)) { if (XJConstant.SCHED_FLAG.equals(flag)) {
paramMap.put("plan_task_id", 0);//修改为初始值 paramMap.put("plan_task_id", 0);// 修改为初始值
paramMap.put("first_flag", XJConstant.PLAN_FIRST_STATUS_NO); paramMap.put("first_flag", XJConstant.PLAN_FIRST_STATUS_NO);
} else if (!XJConstant.SCHED_FLAG.equals(flag) && (genDate.getTime() - tomorrow.getTime() >= 0) && XJConstant.FIX_DATE_NO.equals(plan.getIsFixedDate())) {//更新日期及plantaskId到plan表 } else if (!XJConstant.SCHED_FLAG.equals(flag) && (genDate.getTime() - tomorrow.getTime() >= 0)
&& XJConstant.FIX_DATE_NO.equals(plan.getIsFixedDate())) {// 更新日期及plantaskId到plan表
long planTaskId = iplanTaskDao.findMaxIdByBatchNo(batchNo); long planTaskId = iplanTaskDao.findMaxIdByBatchNo(batchNo);
paramMap.put("plan_task_id", planTaskId);// 更新新的任务id到plan paramMap.put("plan_task_id", planTaskId);// 更新新的任务id到plan
paramMap.put("first_flag", XJConstant.PLAN_FIRST_STATUS_NO); paramMap.put("first_flag", XJConstant.PLAN_FIRST_STATUS_NO);
} }
if (DateUtil.str2Date(strGenDate, "yyyy-MM-dd").getTime() - now.getTime() < 0 || org.apache.commons.lang.StringUtils.isBlank(strGenDate)) { if (DateUtil.str2Date(strGenDate, "yyyy-MM-dd").getTime() - now.getTime() < 0
|| org.apache.commons.lang.StringUtils.isBlank(strGenDate)) {
paramMap.put("next_gen_date", DateUtil.formatDatrToStr(now, "yyyy-MM-dd")); paramMap.put("next_gen_date", DateUtil.formatDatrToStr(now, "yyyy-MM-dd"));
} }
planMapper.updPlanStatusOrGenDate(paramMap);// 更新下次任务生成日期 planMapper.updPlanStatusOrGenDate(paramMap);// 更新下次任务生成日期
...@@ -591,14 +673,14 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -591,14 +673,14 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
List<Point> pointList = pointMapper.getPointByPlanId(String.valueOf(plan.getId())); List<Point> pointList = pointMapper.getPointByPlanId(String.valueOf(plan.getId()));
if (!ValidationUtil.isEmpty(pointList)) { if (!ValidationUtil.isEmpty(pointList)) {
List<String> originalIdList = Lists.transform(pointList, Point::getOriginalId); List<String> originalIdList = Lists.transform(pointList, Point::getOriginalId);
List<OrgUsrFormDto> personList = List<OrgUsrFormDto> personList = jcsFeignClient
jcsFeignClient.getPersonListByCompanyIdList(Joiner.on(",").join(originalIdList)).getResult(); .getPersonListByCompanyIdList(Joiner.on(",").join(originalIdList)).getResult();
List<String> personIdList = Lists.transform(personList, OrgUsrFormDto::getAmosOrgId); List<String> personIdList = Lists.transform(personList, OrgUsrFormDto::getAmosOrgId);
List<RoleModel> roleList = List<RoleModel> roleList = Privilege.roleClient.queryRoleList(supervisionPersonChargerRole, null)
Privilege.roleClient.queryRoleList(supervisionPersonChargerRole, null).getResult(); .getResult();
if (!ValidationUtil.isEmpty(roleList)) { if (!ValidationUtil.isEmpty(roleList)) {
List<AgencyUserModel> agencyUserModelList = Privilege.agencyUserClient.queryByRoleId( List<AgencyUserModel> agencyUserModelList = Privilege.agencyUserClient
String.valueOf(roleList.get(0).getSequenceNbr()), null).getResult(); .queryByRoleId(String.valueOf(roleList.get(0).getSequenceNbr()), null).getResult();
if (!ValidationUtil.isEmpty(agencyUserModelList)) { if (!ValidationUtil.isEmpty(agencyUserModelList)) {
agencyUserModelList.forEach(userModel -> { agencyUserModelList.forEach(userModel -> {
if (personIdList.contains(userModel.getUserId())) { if (personIdList.contains(userModel.getUserId())) {
...@@ -610,7 +692,16 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -610,7 +692,16 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
} }
log.info(String.format("计划对象:%s", JSON.toJSON(plan))); log.info(String.format("计划对象:%s", JSON.toJSON(plan)));
// 规则推送消息 // 规则推送消息
rulePlanService.addPlanRule(plan, null, RuleTypeEnum.计划生成, extraUserIds);//根据bug4150 将此处的计划生成的枚举值变成了消息,既TASK -> NOTIFY rulePlanService.addPlanRule(plan, null, RuleTypeEnum.消息型计划生成, extraUserIds);// 根据bug4150 将此处的计划生成的枚举值变成了消息,既TASK ->
// NOTIFY
String userIdString = plan.getUserId();
if (org.apache.commons.lang3.StringUtils.isNotBlank(userIdString)) {
String[] userIdArr = userIdString.split(",");
List<String> userIdList = Arrays.asList(userIdArr);
// 规则推送消息
rulePlanService.addPlanRule(plan, null, RuleTypeEnum.任务型计划生成, userIdList);
// 根据bug5569
}
} }
@Override @Override
...@@ -644,8 +735,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -644,8 +735,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Override @Override
public Page<HashMap<String, Object>> getPlanTasks(HashMap<String, Object> params, CommonPageable pageParam) { public Page<HashMap<String, Object>> getPlanTasks(HashMap<String, Object> params, CommonPageable pageParam) {
List<HashMap<String, Object>> content = Lists.newArrayList(); List<HashMap<String, Object>> content = Lists.newArrayList();
ReginParams reginParam = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId() ReginParams reginParam = JSON.parseObject(redisUtils
, RequestContext.getToken())).toString(), ReginParams.class); .get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(),
ReginParams.class);
params.put("loginUserId", reginParam.getPersonIdentity().getPersonSeq()); params.put("loginUserId", reginParam.getPersonIdentity().getPersonSeq());
long total = planTaskMapper.getPlanTasksCount(params); long total = planTaskMapper.getPlanTasksCount(params);
if (total == 0) { if (total == 0) {
...@@ -656,7 +748,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -656,7 +748,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
content = planTaskMapper.getPlanTasks(params); content = planTaskMapper.getPlanTasks(params);
content.forEach(c -> { content.forEach(c -> {
if (c.containsKey("finishStatus")) { if (c.containsKey("finishStatus")) {
String finishStatusDesc = PlanTaskFinishStatusEnum.getName(Integer.parseInt(c.get("finishStatus").toString())); String finishStatusDesc = PlanTaskFinishStatusEnum
.getName(Integer.parseInt(c.get("finishStatus").toString()));
c.put("finishStatusDesc", finishStatusDesc); c.put("finishStatusDesc", finishStatusDesc);
} }
}); });
...@@ -673,7 +766,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -673,7 +766,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
Map map = new HashMap(); Map map = new HashMap();
map = planTaskMapper.queryPlanTaskById(planTaskId); map = planTaskMapper.queryPlanTaskById(planTaskId);
if (map.containsKey("finishStatus")) { if (map.containsKey("finishStatus")) {
String finishStatusDesc = PlanTaskFinishStatusEnum.getName(Integer.parseInt(map.get("finishStatus").toString())); String finishStatusDesc = PlanTaskFinishStatusEnum
.getName(Integer.parseInt(map.get("finishStatus").toString()));
map.put("finishStatusDesc", finishStatusDesc); map.put("finishStatusDesc", finishStatusDesc);
} }
return map; return map;
...@@ -743,17 +837,21 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -743,17 +837,21 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
Map<String, String> depMap = new HashMap<>(); Map<String, String> depMap = new HashMap<>();
if (!CollectionUtils.isEmpty(userList)) { if (!CollectionUtils.isEmpty(userList)) {
userIds = String.join(",", userList); userIds = String.join(",", userList);
List<AgencyUserModel> userModelList = remoteSecurityService.listUserByUserIds(toke, product, appKey, userIds); List<AgencyUserModel> userModelList = remoteSecurityService.listUserByUserIds(toke, product, appKey,
userMap = userModelList.stream().collect(Collectors.toMap(AgencyUserModel::getUserId, AgencyUserModel::getRealName, (k1, k2) -> k2)); userIds);
userMap = userModelList.stream().collect(
Collectors.toMap(AgencyUserModel::getUserId, AgencyUserModel::getRealName, (k1, k2) -> k2));
for (AgencyUserModel agencyUserModel : userModelList) { for (AgencyUserModel agencyUserModel : userModelList) {
LoginName.put(agencyUserModel.getUserId(), agencyUserModel.getMobile() != null ? agencyUserModel.getMobile() : agencyUserModel.getLandlinePhone()); LoginName.put(agencyUserModel.getUserId(),
agencyUserModel.getMobile() != null ? agencyUserModel.getMobile()
: agencyUserModel.getLandlinePhone());
} }
} }
if (!CollectionUtils.isEmpty(deptList)) { if (!CollectionUtils.isEmpty(deptList)) {
String dept = String.join(",", deptList); String dept = String.join(",", deptList);
List<LinkedHashMap> deptL = remoteSecurityService.listDepartmentByDeptIds(toke, product, appKey, dept); List<LinkedHashMap> deptL = remoteSecurityService.listDepartmentByDeptIds(toke, product, appKey, dept);
if (deptL != null && deptL.size() > 0) { if (deptL != null && deptL.size() > 0) {
//新安全 // 新安全
content.forEach(s -> { content.forEach(s -> {
Set<String> set1 = deptMap.get(s.getId()); Set<String> set1 = deptMap.get(s.getId());
if (!ValidationUtil.isEmpty(set1)) { if (!ValidationUtil.isEmpty(set1)) {
...@@ -795,7 +893,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -795,7 +893,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
long total = planTaskMapper.countChkExListData(param); long total = planTaskMapper.countChkExListData(param);
List<CheckChkExListBo> content = planTaskMapper.getChkExList(param); List<CheckChkExListBo> content = planTaskMapper.getChkExList(param);
//获取用户联系方式 // 获取用户联系方式
String userIds = ""; String userIds = "";
Set<String> set = new HashSet<>(); Set<String> set = new HashSet<>();
content.forEach(s -> { content.forEach(s -> {
...@@ -808,8 +906,10 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -808,8 +906,10 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
Map<String, AgencyUserModel> agencyUserModelMap = new HashMap<>(); Map<String, AgencyUserModel> agencyUserModelMap = new HashMap<>();
if (!CollectionUtils.isEmpty(userList)) { if (!CollectionUtils.isEmpty(userList)) {
userIds = String.join(",", userList); userIds = String.join(",", userList);
List<AgencyUserModel> userModelList = remoteSecurityService.listUserByUserIds(toke, product, appKey, userIds); List<AgencyUserModel> userModelList = remoteSecurityService.listUserByUserIds(toke, product, appKey,
agencyUserModelMap = userModelList.stream().collect(Collectors.toMap(AgencyUserModel::getUserId, Function.identity())); userIds);
agencyUserModelMap = userModelList.stream()
.collect(Collectors.toMap(AgencyUserModel::getUserId, Function.identity()));
} }
for (CheckChkExListBo bo : content) { for (CheckChkExListBo bo : content) {
ArrayList<String> names = new ArrayList<>(); ArrayList<String> names = new ArrayList<>();
...@@ -845,7 +945,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -845,7 +945,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
} }
@Override @Override
public AppPointCheckRespone queryPointPlanTaskDetail(String toke, String product, String appKey, Long planTaskId, Long pointId) { public AppPointCheckRespone queryPointPlanTaskDetail(String toke, String product, String appKey, Long planTaskId,
Long pointId) {
AppPointCheckRespone pointCheckRespone = new AppPointCheckRespone(); AppPointCheckRespone pointCheckRespone = new AppPointCheckRespone();
Check check = checkDao.findByPlanTaskIdAndPointId(planTaskId, pointId); Check check = checkDao.findByPlanTaskIdAndPointId(planTaskId, pointId);
if (check != null) { if (check != null) {
...@@ -853,11 +954,12 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -853,11 +954,12 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
} else { } else {
PointCheckDetailBo planPointInfo = planTaskMapper.getPointPlanTaskInfo(planTaskId, pointId); PointCheckDetailBo planPointInfo = planTaskMapper.getPointPlanTaskInfo(planTaskId, pointId);
if (planPointInfo != null) { if (planPointInfo != null) {
List<String> userIds = Arrays.asList(planPointInfo.getUsername().split(",")); List<String> userIds = Arrays.asList(planPointInfo.getUsername().split(","));
List<AgencyUserModel> userModelList = remoteSecurityService.listUserByUserIds(toke, product, appKey, planPointInfo.getUsername()); List<AgencyUserModel> userModelList = remoteSecurityService.listUserByUserIds(toke, product, appKey,
Map<String, String> userModelMap = userModelList.stream().collect(Collectors.toMap(AgencyUserModel::getUserId, AgencyUserModel::getRealName, (k1, k2) -> k2)); planPointInfo.getUsername());
Map<String, String> userModelMap = userModelList.stream().collect(
Collectors.toMap(AgencyUserModel::getUserId, AgencyUserModel::getRealName, (k1, k2) -> k2));
if (userModelMap != null) { if (userModelMap != null) {
List<String> userNameList = new ArrayList<>(); List<String> userNameList = new ArrayList<>();
for (String userId : userIds) { for (String userId : userIds) {
...@@ -867,7 +969,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -867,7 +969,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
userNameList.remove(null); userNameList.remove(null);
pointCheckRespone.setUsername(Joiner.on(",").join(userNameList)); pointCheckRespone.setUsername(Joiner.on(",").join(userNameList));
} }
DepartmentModel departmentBo = remoteSecurityService.getDepartmentByDeptId(toke, product, appKey, planPointInfo.getUsername()); DepartmentModel departmentBo = remoteSecurityService.getDepartmentByDeptId(toke, product, appKey,
planPointInfo.getUsername());
if (departmentBo != null) { if (departmentBo != null) {
pointCheckRespone.setDepartmentName(departmentBo.getDepartmentName()); pointCheckRespone.setDepartmentName(departmentBo.getDepartmentName());
} }
...@@ -876,7 +979,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -876,7 +979,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
pointCheckRespone.setPointNo(planPointInfo.getPointNo()); pointCheckRespone.setPointNo(planPointInfo.getPointNo());
pointCheckRespone.setPointStatus("0"); pointCheckRespone.setPointStatus("0");
pointCheckRespone.setPlanName(planPointInfo.getPlanName()); pointCheckRespone.setPlanName(planPointInfo.getPlanName());
List<PointCheckDetailBo> pointInputs = planTaskMapper.getPointInputByRouteIdAndPointId(planPointInfo.getRouteId(), planPointInfo.getPointId()); List<PointCheckDetailBo> pointInputs = planTaskMapper
.getPointInputByRouteIdAndPointId(planPointInfo.getRouteId(), planPointInfo.getPointId());
JSONObject appResponeMap = new JSONObject(); JSONObject appResponeMap = new JSONObject();
pointInputs.forEach(action -> { pointInputs.forEach(action -> {
AppCheckInputRespone input = new AppCheckInputRespone(); AppCheckInputRespone input = new AppCheckInputRespone();
...@@ -909,7 +1013,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -909,7 +1013,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
} }
@Override @Override
public AppPointCheckRespone queryPointPlanTaskDetailInVersion2(String toke, String product, String appKey, Long planTaskId, Long pointId) { public AppPointCheckRespone queryPointPlanTaskDetailInVersion2(String toke, String product, String appKey,
Long planTaskId, Long pointId) {
AppPointCheckRespone pointCheckRespone = new AppPointCheckRespone(); AppPointCheckRespone pointCheckRespone = new AppPointCheckRespone();
Check check = checkDao.findByPlanTaskIdAndPointId(planTaskId, pointId); Check check = checkDao.findByPlanTaskIdAndPointId(planTaskId, pointId);
if (check != null) { if (check != null) {
...@@ -923,14 +1028,16 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -923,14 +1028,16 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
pointCheckRespone.setPointNo(planPointInfo.getPointNo()); pointCheckRespone.setPointNo(planPointInfo.getPointNo());
pointCheckRespone.setPointStatus("0"); pointCheckRespone.setPointStatus("0");
pointCheckRespone.setPlanName(planPointInfo.getPlanName()); pointCheckRespone.setPlanName(planPointInfo.getPlanName());
List<AgencyUserModel> userModelList = remoteSecurityService.listUserByUserIds(toke, product, appKey, planPointInfo.getUserId()); List<AgencyUserModel> userModelList = remoteSecurityService.listUserByUserIds(toke, product, appKey,
planPointInfo.getUserId());
for (AgencyUserModel userModel : userModelList) { for (AgencyUserModel userModel : userModelList) {
pointCheckRespone.setUsername(userModel.getRealName()); pointCheckRespone.setUsername(userModel.getRealName());
} }
// DepartmentModel departmentModel= remoteSecurityService.getDepartmentByDeptId(toke, product, appKey,planPointInfo.getCheckDepartmentId()); // DepartmentModel departmentModel= remoteSecurityService.getDepartmentByDeptId(toke, product, appKey,planPointInfo.getCheckDepartmentId());
DepartmentModel departmentModel = new DepartmentModel(); DepartmentModel departmentModel = new DepartmentModel();
pointCheckRespone.setDepartmentName(departmentModel.getDepartmentName()); pointCheckRespone.setDepartmentName(departmentModel.getDepartmentName());
List<PointCheckDetailBo> pointInputs = planTaskMapper.getPointInputByRouteIdAndPointId(planPointInfo.getRouteId(), planPointInfo.getPointId()); List<PointCheckDetailBo> pointInputs = planTaskMapper
.getPointInputByRouteIdAndPointId(planPointInfo.getRouteId(), planPointInfo.getPointId());
JSONObject appResponeMap = new JSONObject(); JSONObject appResponeMap = new JSONObject();
pointInputs.forEach(action -> { pointInputs.forEach(action -> {
...@@ -1035,8 +1142,10 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -1035,8 +1142,10 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
} }
}); });
Toke toke = remoteSecurityService.getServerToken(); Toke toke = remoteSecurityService.getServerToken();
List<AgencyUserModel> userModelList = remoteSecurityService.listUserByUserIds(toke.getToke(), toke.getProduct(), toke.getAppKey(), Joiner.on(",").join(userIds)); List<AgencyUserModel> userModelList = remoteSecurityService.listUserByUserIds(toke.getToke(),
Map<String, String> userModelMap = userModelList.stream().collect(Collectors.toMap(AgencyUserModel::getUserId, AgencyUserModel::getRealName, (k1, k2) -> k2)); toke.getProduct(), toke.getAppKey(), Joiner.on(",").join(userIds));
Map<String, String> userModelMap = userModelList.stream().collect(
Collectors.toMap(AgencyUserModel::getUserId, AgencyUserModel::getRealName, (k1, k2) -> k2));
content.forEach(e -> { content.forEach(e -> {
StringBuffer userNames = new StringBuffer(); StringBuffer userNames = new StringBuffer();
...@@ -1085,8 +1194,10 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -1085,8 +1194,10 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
} }
}); });
Toke toke = remoteSecurityService.getServerToken(); Toke toke = remoteSecurityService.getServerToken();
List<AgencyUserModel> userModelList = remoteSecurityService.listUserByUserIds(toke.getToke(), toke.getProduct(), toke.getAppKey(), Joiner.on(",").join(userIds)); List<AgencyUserModel> userModelList = remoteSecurityService.listUserByUserIds(toke.getToke(),
Map<String, String> userModelMap = userModelList.stream().collect(Collectors.toMap(AgencyUserModel::getUserId, AgencyUserModel::getRealName, (k1, k2) -> k2)); toke.getProduct(), toke.getAppKey(), Joiner.on(",").join(userIds));
Map<String, String> userModelMap = userModelList.stream().collect(
Collectors.toMap(AgencyUserModel::getUserId, AgencyUserModel::getRealName, (k1, k2) -> k2));
content.forEach(e -> { content.forEach(e -> {
StringBuffer userNames = new StringBuffer(); StringBuffer userNames = new StringBuffer();
...@@ -1099,7 +1210,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -1099,7 +1210,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
map.put("beginTime", DateUtil.formatDatrToStr((Date) e.get("beginTime"), DateUtil.LONG_PATTERN)); map.put("beginTime", DateUtil.formatDatrToStr((Date) e.get("beginTime"), DateUtil.LONG_PATTERN));
map.put("endTime", DateUtil.formatDatrToStr((Date) e.get("endTime"), DateUtil.LONG_PATTERN)); map.put("endTime", DateUtil.formatDatrToStr((Date) e.get("endTime"), DateUtil.LONG_PATTERN));
map.put("leftName", "巡检点"); map.put("leftName", "巡检点");
map.put("titleName", userNames.substring(0, userNames.length() - 1) + "-" + e.get("name").toString() + "-" + e.get("STATUS").toString()); map.put("titleName", userNames.substring(0, userNames.length() - 1) + "-" + e.get("name").toString()
+ "-" + e.get("STATUS").toString());
String structName = ""; String structName = "";
if (!StringUtils.isEmpty(e.get("risk_source_id"))) { if (!StringUtils.isEmpty(e.get("risk_source_id"))) {
for (int i = 0; i < structList.size(); i++) { for (int i = 0; i < structList.size(); i++) {
......
...@@ -16,6 +16,7 @@ import org.springframework.data.domain.Page; ...@@ -16,6 +16,7 @@ import org.springframework.data.domain.Page;
import com.yeejoin.amos.supervision.business.param.CheckPtListPageParam; import com.yeejoin.amos.supervision.business.param.CheckPtListPageParam;
import com.yeejoin.amos.supervision.business.param.PlanTaskPageParam; import com.yeejoin.amos.supervision.business.param.PlanTaskPageParam;
import com.yeejoin.amos.supervision.core.common.response.AppPointCheckRespone; import com.yeejoin.amos.supervision.core.common.response.AppPointCheckRespone;
import com.yeejoin.amos.supervision.dao.entity.Plan;
import com.yeejoin.amos.supervision.dao.entity.PlanTask; import com.yeejoin.amos.supervision.dao.entity.PlanTask;
public interface IPlanTaskService { public interface IPlanTaskService {
...@@ -171,4 +172,6 @@ public interface IPlanTaskService { ...@@ -171,4 +172,6 @@ public interface IPlanTaskService {
List<Map<String, Object>> queryPlanTaskTimeAxis(Long userId, Integer createDate); List<Map<String, Object>> queryPlanTaskTimeAxis(Long userId, Integer createDate);
List<Map<String, Object>> queryTimeAxis(Long userId, Integer createDate); List<Map<String, Object>> queryTimeAxis(Long userId, Integer createDate);
void taskExecutionImportPlan(List<Plan> planList);
} }
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