|
|
@ -5,9 +5,11 @@ import cn.afterturn.easypoi.word.WordExportUtil; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper; |
|
|
|
import com.hnac.hzims.common.logs.utils.StringUtils; |
|
|
|
import com.hnac.hzims.common.logs.utils.StringUtils; |
|
|
|
import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity; |
|
|
|
import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity; |
|
|
|
import com.hnac.hzims.operational.access.feign.IOperAccessTaskClient; |
|
|
|
import com.hnac.hzims.operational.access.feign.IOperAccessTaskClient; |
|
|
@ -250,16 +252,21 @@ public class TicketProcessServiceImpl implements TicketProcessService { |
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
//更新安全措施
|
|
|
|
//更新安全措施
|
|
|
|
|
|
|
|
try { |
|
|
|
List<WorkTicketSafetyMeasureEntity> safetyMeasuresList = workTicketVo.getSafetyMeasuresList(); |
|
|
|
List<WorkTicketSafetyMeasureEntity> safetyMeasuresList = workTicketVo.getSafetyMeasuresList(); |
|
|
|
if (CollectionUtils.isNotEmpty(safetyMeasuresList)) { |
|
|
|
if (CollectionUtils.isNotEmpty(safetyMeasuresList)) { |
|
|
|
log.info("获取安全措施的数据:{}", safetyMeasuresList); |
|
|
|
log.info("获取安全措施的数据:{}", safetyMeasuresList); |
|
|
|
safetyMeasuresList.forEach(item -> { |
|
|
|
for (WorkTicketSafetyMeasureEntity item : safetyMeasuresList) { |
|
|
|
if (ObjectUtils.isNotEmpty(item.getTicketId())) { |
|
|
|
if (ObjectUtils.isNotEmpty(item.getId())) { |
|
|
|
LambdaQueryWrapper<WorkTicketSafetyMeasureEntity> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
workTicketSafetyMeasureService.updateById(item); |
|
|
|
queryWrapper.eq(WorkTicketSafetyMeasureEntity::getTicketId, item.getTicketId()); |
|
|
|
}else { |
|
|
|
workTicketSafetyMeasureService.update(item, queryWrapper); |
|
|
|
item.setTicketId(workTicketInfo.getId()); |
|
|
|
|
|
|
|
workTicketSafetyMeasureService.save(item); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
//工作票工作任务组
|
|
|
|
//工作票工作任务组
|
|
|
|
// List<WorkTicketContentEntity> workTicketContentDtoList = workTicketVo.getWorkTicketContentDtoList();
|
|
|
|
// List<WorkTicketContentEntity> workTicketContentDtoList = workTicketVo.getWorkTicketContentDtoList();
|
|
|
@ -299,7 +306,9 @@ public class TicketProcessServiceImpl implements TicketProcessService { |
|
|
|
//工作结束
|
|
|
|
//工作结束
|
|
|
|
WorkTicketFinish workTicketFinish = workTicketVo.getWorkTicketFinish(); |
|
|
|
WorkTicketFinish workTicketFinish = workTicketVo.getWorkTicketFinish(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
if (ObjectUtils.isNotEmpty(workTicketFinish) && 99 == workTicket.getFlowStatus().intValue()) { |
|
|
|
|
|
|
|
|
|
|
|
log.info("工作结束==============>"+ (workTicket.getFlowStatus().intValue())); |
|
|
|
|
|
|
|
if (ObjectUtils.isNotEmpty(workTicketFinish)) { |
|
|
|
WorkTicketFinish ticketFinish = workTicketFinishService.selectByTicketId(workTicketInfo.getId()); |
|
|
|
WorkTicketFinish ticketFinish = workTicketFinishService.selectByTicketId(workTicketInfo.getId()); |
|
|
|
log.info("获取工作结束:{}", workTicketFinish); |
|
|
|
log.info("获取工作结束:{}", workTicketFinish); |
|
|
|
if (ObjectUtils.isEmpty(workTicketFinish.getId()) || ObjectUtils.isEmpty(ticketFinish)) { |
|
|
|
if (ObjectUtils.isEmpty(workTicketFinish.getId()) || ObjectUtils.isEmpty(ticketFinish)) { |
|
|
@ -427,6 +436,7 @@ public class TicketProcessServiceImpl implements TicketProcessService { |
|
|
|
workTicket.setFlowTaskName("结束"); |
|
|
|
workTicket.setFlowTaskName("结束"); |
|
|
|
workTicket.setNextStepOperator(" "); |
|
|
|
workTicket.setNextStepOperator(" "); |
|
|
|
workTicket.setStepOperator(" "); |
|
|
|
workTicket.setStepOperator(" "); |
|
|
|
|
|
|
|
workTicket.setFlowStatus(999); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
workTicket.setFlowTaskId(taskId); |
|
|
|
workTicket.setFlowTaskId(taskId); |
|
|
|
workTicket.setFlowTaskName(response.getTaskName()); |
|
|
|
workTicket.setFlowTaskName(response.getTaskName()); |
|
|
@ -856,7 +866,7 @@ public class TicketProcessServiceImpl implements TicketProcessService { |
|
|
|
WorkTicketDelayEntity workTicketDelay = workTicketVo.getWorkTicketDelay(); |
|
|
|
WorkTicketDelayEntity workTicketDelay = workTicketVo.getWorkTicketDelay(); |
|
|
|
log.info("工作票延期: {}", workTicketDelay); |
|
|
|
log.info("工作票延期: {}", workTicketDelay); |
|
|
|
if (ObjectUtils.isNotEmpty(workTicketDelay)) { |
|
|
|
if (ObjectUtils.isNotEmpty(workTicketDelay)) { |
|
|
|
result.putAll(PdfUtils.objectToMapResult(workTicket, result)); |
|
|
|
result.putAll(PdfUtils.objectToMapResult(workTicketDelay, result)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
result.putAll(PdfUtils.objectToMapResult(new WorkTicketDelayEntity(), result)); |
|
|
|
result.putAll(PdfUtils.objectToMapResult(new WorkTicketDelayEntity(), result)); |
|
|
|
} |
|
|
|
} |
|
|
@ -978,7 +988,6 @@ public class TicketProcessServiceImpl implements TicketProcessService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//许可人确认工作票终结
|
|
|
|
//许可人确认工作票终结
|
|
|
|
|
|
|
|
|
|
|
|
if (WordHelper.isNoneBlank(result, "workEndTime")) { |
|
|
|
if (WordHelper.isNoneBlank(result, "workEndTime")) { |
|
|
|
log.info("许可人确认工作票终结"); |
|
|
|
log.info("许可人确认工作票终结"); |
|
|
|
//负责人
|
|
|
|
//负责人
|
|
|
@ -1065,12 +1074,32 @@ public class TicketProcessServiceImpl implements TicketProcessService { |
|
|
|
* @param maps 新的Map |
|
|
|
* @param maps 新的Map |
|
|
|
* @param i 索引 |
|
|
|
* @param i 索引 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private static void listWichMap(List<Map<String, Object>> matterLibraryListFive, List<Map<String, Object>> matterLibraryListFlow, List<Map<String, Object>> maps, int i) { |
|
|
|
private static void listWichMap(List<Map<String, Object>> matterLibraryListFive, |
|
|
|
Map<String, Object> stringObjectMap = matterLibraryListFive.get(i); |
|
|
|
List<Map<String, Object>> matterLibraryListFlow, List<Map<String, Object>> maps, int i) { |
|
|
|
Map<String, Object> stringObjectMap1 = matterLibraryListFlow.get(i); |
|
|
|
|
|
|
|
HashMap<String, Object> objectObjectHashMap = new HashMap<>(); |
|
|
|
HashMap<String, Object> objectObjectHashMap = new HashMap<>(); |
|
|
|
|
|
|
|
if (matterLibraryListFive.size() > 0) { |
|
|
|
|
|
|
|
if (matterLibraryListFive.size() <= i) { |
|
|
|
|
|
|
|
objectObjectHashMap.put("safetyMeasure", ""); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
Map<String, Object> stringObjectMap = matterLibraryListFive.get(i); |
|
|
|
objectObjectHashMap.put("safetyMeasure", stringObjectMap.get("safetyMeasure")); |
|
|
|
objectObjectHashMap.put("safetyMeasure", stringObjectMap.get("safetyMeasure")); |
|
|
|
objectObjectHashMap.put("safetyMeasure1", stringObjectMap1.get("safetyMeasure")); |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
objectObjectHashMap.put("safetyMeasure", ""); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (matterLibraryListFlow.size() > 0) { |
|
|
|
|
|
|
|
if (matterLibraryListFlow.size() <= i) { |
|
|
|
|
|
|
|
objectObjectHashMap.put("safetyMeasure1", ""); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
Map<String, Object> stringObjectMap = matterLibraryListFive.get(i); |
|
|
|
|
|
|
|
objectObjectHashMap.put("safetyMeasure1", stringObjectMap.get("safetyMeasure")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
objectObjectHashMap.put("safetyMeasure1", ""); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
maps.add(objectObjectHashMap); |
|
|
|
maps.add(objectObjectHashMap); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|