|
|
@ -4,14 +4,19 @@ import cn.afterturn.easypoi.excel.entity.TemplateExportParams; |
|
|
|
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.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import com.hnac.hzims.operational.access.constants.AccessConstants; |
|
|
|
import com.hnac.hzims.operational.access.constants.AccessConstants; |
|
|
|
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; |
|
|
|
import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceTaskDTO; |
|
|
|
import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceTaskDTO; |
|
|
|
import com.hnac.hzims.operational.maintenance.feign.ITaskClient; |
|
|
|
import com.hnac.hzims.operational.maintenance.feign.ITaskClient; |
|
|
|
|
|
|
|
import com.hnac.hzims.ticket.areamonthly.vo.AreaMonthlyVo; |
|
|
|
|
|
|
|
import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo; |
|
|
|
|
|
|
|
import com.hnac.hzims.ticket.areamonthly.vo.StandardWorkVo; |
|
|
|
import com.hnac.hzims.ticket.aspect.AroundFlow; |
|
|
|
import com.hnac.hzims.ticket.aspect.AroundFlow; |
|
|
|
import com.hnac.hzims.ticket.constants.TicketConstants; |
|
|
|
import com.hnac.hzims.ticket.constants.TicketConstants; |
|
|
|
import com.hnac.hzims.ticket.utils.ExcelUtil; |
|
|
|
import com.hnac.hzims.ticket.utils.ExcelUtil; |
|
|
@ -29,10 +34,12 @@ import com.hnac.hzims.ticket.workTicket.wrapper.WorkTicketInfoWrapper; |
|
|
|
import com.hnac.hzims.vo.SafeCheckStatisticVO; |
|
|
|
import com.hnac.hzims.vo.SafeCheckStatisticVO; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
|
|
import lombok.var; |
|
|
|
import org.apache.commons.collections.map.HashedMap; |
|
|
|
import org.apache.commons.collections.map.HashedMap; |
|
|
|
import org.apache.poi.ss.usermodel.Workbook; |
|
|
|
import org.apache.poi.ss.usermodel.Workbook; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
|
|
|
|
import org.springblade.core.mp.support.BladePage; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
@ -43,6 +50,7 @@ import org.springblade.flow.core.feign.IFlowClient; |
|
|
|
import org.springblade.flow.core.vo.ComleteTask; |
|
|
|
import org.springblade.flow.core.vo.ComleteTask; |
|
|
|
import org.springblade.system.user.entity.User; |
|
|
|
import org.springblade.system.user.entity.User; |
|
|
|
import org.springblade.system.user.feign.IUserClient; |
|
|
|
import org.springblade.system.user.feign.IUserClient; |
|
|
|
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Propagation; |
|
|
|
import org.springframework.transaction.annotation.Propagation; |
|
|
@ -133,6 +141,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 工作票延期 进入许可人确认工作票延期 |
|
|
|
* 工作票延期 进入许可人确认工作票延期 |
|
|
|
|
|
|
|
* |
|
|
|
* @param ticketId 工作票ID |
|
|
|
* @param ticketId 工作票ID |
|
|
|
* @param status 状态 |
|
|
|
* @param status 状态 |
|
|
|
* @param completeTask 工作流进行 |
|
|
|
* @param completeTask 工作流进行 |
|
|
@ -180,8 +189,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
WorkTicketInfoEntity workTicketInfoEntity = this.getById(id); |
|
|
|
WorkTicketInfoEntity workTicketInfoEntity = this.getById(id); |
|
|
|
if (ObjectUtil.isEmpty(workTicketInfoEntity)) { |
|
|
|
if (ObjectUtil.isEmpty(workTicketInfoEntity)) { |
|
|
|
return R.fail("未查询到该ID对应的记录"); |
|
|
|
return R.fail("未查询到该ID对应的记录"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else{ |
|
|
|
|
|
|
|
WorkTicketInfoVO workTicketInfoVO = WorkTicketInfoWrapper.build().entityVO(workTicketInfoEntity); |
|
|
|
WorkTicketInfoVO workTicketInfoVO = WorkTicketInfoWrapper.build().entityVO(workTicketInfoEntity); |
|
|
|
|
|
|
|
|
|
|
|
/**获取工作票安全措施列表**/ |
|
|
|
/**获取工作票安全措施列表**/ |
|
|
@ -287,8 +295,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
Map<String, Object> workTicketInfoMap = new HashMap<>(); |
|
|
|
Map<String, Object> workTicketInfoMap = new HashMap<>(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
workTicketInfoMap = PdfUtils.objectToMap(workTicketInfoVO); |
|
|
|
workTicketInfoMap = PdfUtils.objectToMap(workTicketInfoVO); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
catch (Exception e) { |
|
|
|
|
|
|
|
log.info("转换对象失败!"); |
|
|
|
log.info("转换对象失败!"); |
|
|
|
} |
|
|
|
} |
|
|
|
//安全措施
|
|
|
|
//安全措施
|
|
|
@ -303,8 +310,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
map.put("status", status); |
|
|
|
map.put("status", status); |
|
|
|
return map; |
|
|
|
return map; |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
workTicketInfoMap.put("matterLibraryListOne", new ArrayList<Map<String, String>>(1)); |
|
|
|
workTicketInfoMap.put("matterLibraryListOne", new ArrayList<Map<String, String>>(1)); |
|
|
|
} |
|
|
|
} |
|
|
|
if (ObjectUtil.isNotEmpty(measureMap.get(TicketConstants.MEASURE_TYPE_TWO))) { |
|
|
|
if (ObjectUtil.isNotEmpty(measureMap.get(TicketConstants.MEASURE_TYPE_TWO))) { |
|
|
@ -315,8 +321,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
map.put("status", status); |
|
|
|
map.put("status", status); |
|
|
|
return map; |
|
|
|
return map; |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
workTicketInfoMap.put("matterLibraryListTwo", new ArrayList<Map<String, String>>(1)); |
|
|
|
workTicketInfoMap.put("matterLibraryListTwo", new ArrayList<Map<String, String>>(1)); |
|
|
|
} |
|
|
|
} |
|
|
|
if (ObjectUtil.isNotEmpty(measureMap.get(TicketConstants.MEASURE_TYPE_THREE))) { |
|
|
|
if (ObjectUtil.isNotEmpty(measureMap.get(TicketConstants.MEASURE_TYPE_THREE))) { |
|
|
@ -327,8 +332,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
map.put("status", status); |
|
|
|
map.put("status", status); |
|
|
|
return map; |
|
|
|
return map; |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
workTicketInfoMap.put("matterLibraryListThree", new ArrayList<Map<String, String>>(1)); |
|
|
|
workTicketInfoMap.put("matterLibraryListThree", new ArrayList<Map<String, String>>(1)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -342,8 +346,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
if (CollectionUtil.isNotEmpty(signFlow)) { |
|
|
|
if (CollectionUtil.isNotEmpty(signFlow)) { |
|
|
|
workTicketInfoMap.put("signer", signFlow.get(0).getCreateUserName()); |
|
|
|
workTicketInfoMap.put("signer", signFlow.get(0).getCreateUserName()); |
|
|
|
workTicketInfoMap.put("signTime", DateUtil.format(signFlow.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
workTicketInfoMap.put("signTime", DateUtil.format(signFlow.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
workTicketInfoMap.put("signer", ""); |
|
|
|
workTicketInfoMap.put("signer", ""); |
|
|
|
workTicketInfoMap.put("signTime", ""); |
|
|
|
workTicketInfoMap.put("signTime", ""); |
|
|
|
} |
|
|
|
} |
|
|
@ -351,8 +354,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
if (Func.isNotEmpty(workTicketInfoVO.getLicenseTime())) { |
|
|
|
if (Func.isNotEmpty(workTicketInfoVO.getLicenseTime())) { |
|
|
|
workTicketInfoMap.put("licensorConfirm", workTicketInfoVO.getLicensorName()); |
|
|
|
workTicketInfoMap.put("licensorConfirm", workTicketInfoVO.getLicensorName()); |
|
|
|
workTicketInfoMap.put("licenseTime", DateUtil.format(workTicketInfoVO.getLicenseTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
workTicketInfoMap.put("licenseTime", DateUtil.format(workTicketInfoVO.getLicenseTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
workTicketInfoMap.put("licensorConfirm", ""); |
|
|
|
workTicketInfoMap.put("licensorConfirm", ""); |
|
|
|
workTicketInfoMap.put("licenseTime", ""); |
|
|
|
workTicketInfoMap.put("licenseTime", ""); |
|
|
|
} |
|
|
|
} |
|
|
@ -364,8 +366,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
workTicketInfoMap.put("receivePrincipal", receiveFlow.get(0).getCreateUserName()); |
|
|
|
workTicketInfoMap.put("receivePrincipal", receiveFlow.get(0).getCreateUserName()); |
|
|
|
workTicketInfoMap.put("receiveTime", DateUtil.format(receiveFlow.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
workTicketInfoMap.put("receiveTime", DateUtil.format(receiveFlow.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
workTicketInfoMap.put("principalConfirm", workTicketInfoVO.getPrincipalName()); |
|
|
|
workTicketInfoMap.put("principalConfirm", workTicketInfoVO.getPrincipalName()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else{ |
|
|
|
|
|
|
|
workTicketInfoMap.put("receivePrincipal", ""); |
|
|
|
workTicketInfoMap.put("receivePrincipal", ""); |
|
|
|
workTicketInfoMap.put("receiveTime", ""); |
|
|
|
workTicketInfoMap.put("receiveTime", ""); |
|
|
|
workTicketInfoMap.put("principalConfirm", ""); |
|
|
|
workTicketInfoMap.put("principalConfirm", ""); |
|
|
@ -376,8 +377,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
if (CollectionUtil.isNotEmpty(confirmFlow)) { |
|
|
|
if (CollectionUtil.isNotEmpty(confirmFlow)) { |
|
|
|
workTicketInfoMap.put("confirmPrincipal", confirmFlow.get(0).getCreateUserName()); |
|
|
|
workTicketInfoMap.put("confirmPrincipal", confirmFlow.get(0).getCreateUserName()); |
|
|
|
workTicketInfoMap.put("confirmTime", DateUtil.format(confirmFlow.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
workTicketInfoMap.put("confirmTime", DateUtil.format(confirmFlow.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else{ |
|
|
|
|
|
|
|
workTicketInfoMap.put("confirmPrincipal", ""); |
|
|
|
workTicketInfoMap.put("confirmPrincipal", ""); |
|
|
|
workTicketInfoMap.put("confirmTime", ""); |
|
|
|
workTicketInfoMap.put("confirmTime", ""); |
|
|
|
} |
|
|
|
} |
|
|
@ -388,8 +388,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
workTicketInfoMap.put("finisher", finishFlow.get(0).getCreateUserName()); |
|
|
|
workTicketInfoMap.put("finisher", finishFlow.get(0).getCreateUserName()); |
|
|
|
workTicketInfoMap.put("finishTime", DateUtil.format(finishFlow.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
workTicketInfoMap.put("finishTime", DateUtil.format(finishFlow.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
workTicketInfoMap.put("principalFinish", workTicketInfoVO.getPrincipalName()); |
|
|
|
workTicketInfoMap.put("principalFinish", workTicketInfoVO.getPrincipalName()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
workTicketInfoMap.put("finisher", ""); |
|
|
|
workTicketInfoMap.put("finisher", ""); |
|
|
|
workTicketInfoMap.put("finishTime", ""); |
|
|
|
workTicketInfoMap.put("finishTime", ""); |
|
|
|
workTicketInfoMap.put("principalFinish", ""); |
|
|
|
workTicketInfoMap.put("principalFinish", ""); |
|
|
@ -403,8 +402,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
workTicketInfoMap.put("groundSwitchCount", ObjectUtil.isNotEmpty(endFlow.get(0).getGroundSwitchCount()) ? endFlow.get(0).getGroundSwitchCount() : ""); |
|
|
|
workTicketInfoMap.put("groundSwitchCount", ObjectUtil.isNotEmpty(endFlow.get(0).getGroundSwitchCount()) ? endFlow.get(0).getGroundSwitchCount() : ""); |
|
|
|
workTicketInfoMap.put("groundWireCode", ObjectUtil.isNotEmpty(endFlow.get(0).getGroundWireCode()) ? endFlow.get(0).getGroundWireCode() : ""); |
|
|
|
workTicketInfoMap.put("groundWireCode", ObjectUtil.isNotEmpty(endFlow.get(0).getGroundWireCode()) ? endFlow.get(0).getGroundWireCode() : ""); |
|
|
|
workTicketInfoMap.put("groundWireCount", ObjectUtil.isNotEmpty(endFlow.get(0).getGroundWireCount()) ? endFlow.get(0).getGroundWireCount() : ""); |
|
|
|
workTicketInfoMap.put("groundWireCount", ObjectUtil.isNotEmpty(endFlow.get(0).getGroundWireCount()) ? endFlow.get(0).getGroundWireCount() : ""); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
workTicketInfoMap.put("endLicensor", ""); |
|
|
|
workTicketInfoMap.put("endLicensor", ""); |
|
|
|
workTicketInfoMap.put("endTime", ""); |
|
|
|
workTicketInfoMap.put("endTime", ""); |
|
|
|
workTicketInfoMap.put("groundSwitchCount", ""); |
|
|
|
workTicketInfoMap.put("groundSwitchCount", ""); |
|
|
@ -418,8 +416,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
workTicketInfoMap.put("changePrincipal", workTicketPrincipalChangeVOList.get(0).getChangePrincipalName()); |
|
|
|
workTicketInfoMap.put("changePrincipal", workTicketPrincipalChangeVOList.get(0).getChangePrincipalName()); |
|
|
|
workTicketInfoMap.put("principalChangeSigner", workTicketPrincipalChangeVOList.get(0).getCreateUserName()); |
|
|
|
workTicketInfoMap.put("principalChangeSigner", workTicketPrincipalChangeVOList.get(0).getCreateUserName()); |
|
|
|
workTicketInfoMap.put("principalChangeTime", DateUtil.format(workTicketPrincipalChangeVOList.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
workTicketInfoMap.put("principalChangeTime", DateUtil.format(workTicketPrincipalChangeVOList.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
workTicketInfoMap.put("initPrincipal", ""); |
|
|
|
workTicketInfoMap.put("initPrincipal", ""); |
|
|
|
workTicketInfoMap.put("changePrincipal", ""); |
|
|
|
workTicketInfoMap.put("changePrincipal", ""); |
|
|
|
workTicketInfoMap.put("principalChangeSigner", ""); |
|
|
|
workTicketInfoMap.put("principalChangeSigner", ""); |
|
|
@ -433,8 +430,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
DateUtil.format(mc.getCreateTime(), TicketConstants.TICKET_DATE_PATTERN).concat(":").concat(mc.getChangeMembersName())).collect(Collectors.joining(";")); |
|
|
|
DateUtil.format(mc.getCreateTime(), TicketConstants.TICKET_DATE_PATTERN).concat(":").concat(mc.getChangeMembersName())).collect(Collectors.joining(";")); |
|
|
|
workTicketInfoMap.put("membersChangeSituation", membersChangeSituation); |
|
|
|
workTicketInfoMap.put("membersChangeSituation", membersChangeSituation); |
|
|
|
workTicketInfoMap.put("memberChangePrincipal", membersChangeList.get(0).getCreateUserName()); |
|
|
|
workTicketInfoMap.put("memberChangePrincipal", membersChangeList.get(0).getCreateUserName()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
workTicketInfoMap.put("membersChangeSituation", ""); |
|
|
|
workTicketInfoMap.put("membersChangeSituation", ""); |
|
|
|
workTicketInfoMap.put("memberChangePrincipal", ""); |
|
|
|
workTicketInfoMap.put("memberChangePrincipal", ""); |
|
|
|
} |
|
|
|
} |
|
|
@ -447,8 +443,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
workTicketInfoMap.put("delayPrincipalTime", DateUtil.format(workTicketDelayVO.getCreateTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
workTicketInfoMap.put("delayPrincipalTime", DateUtil.format(workTicketDelayVO.getCreateTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
workTicketInfoMap.put("delayLicensor", workTicketDelayVO.getLicensorName()); |
|
|
|
workTicketInfoMap.put("delayLicensor", workTicketDelayVO.getLicensorName()); |
|
|
|
workTicketInfoMap.put("delayLicenseTime", DateUtil.format(workTicketDelayVO.getLicenseTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
workTicketInfoMap.put("delayLicenseTime", DateUtil.format(workTicketDelayVO.getLicenseTime(), TicketConstants.TICKET_DATE_PATTERN)); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
workTicketInfoMap.put("delayTime", ""); |
|
|
|
workTicketInfoMap.put("delayTime", ""); |
|
|
|
workTicketInfoMap.put("delayPrincipal", ""); |
|
|
|
workTicketInfoMap.put("delayPrincipal", ""); |
|
|
|
workTicketInfoMap.put("delayPrincipalTime", ""); |
|
|
|
workTicketInfoMap.put("delayPrincipalTime", ""); |
|
|
@ -468,8 +463,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
return map; |
|
|
|
return map; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
workTicketInfoMap.put("operateMapList", operateMapList); |
|
|
|
workTicketInfoMap.put("operateMapList", operateMapList); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
List<Map<String, String>> operateMapList = new ArrayList<>(); |
|
|
|
List<Map<String, String>> operateMapList = new ArrayList<>(); |
|
|
|
Map<String, String> map = new HashMap<>(4); |
|
|
|
Map<String, String> map = new HashMap<>(4); |
|
|
|
map.put("startTime", ""); |
|
|
|
map.put("startTime", ""); |
|
|
@ -533,11 +527,9 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
|
|
|
|
|
|
|
|
if (TicketConstants.FirstWorkTicketFlowStatusEnum.LICENSE.getStatus().equals(req.getStatus())) { |
|
|
|
if (TicketConstants.FirstWorkTicketFlowStatusEnum.LICENSE.getStatus().equals(req.getStatus())) { |
|
|
|
req.setSigner(AuthUtil.getUserId()); |
|
|
|
req.setSigner(AuthUtil.getUserId()); |
|
|
|
} |
|
|
|
} else if (TicketConstants.FirstWorkTicketFlowStatusEnum.CONFIRM_MEASURE_PRINCIPAL.getStatus().equals(req.getStatus())) { |
|
|
|
else if(TicketConstants.FirstWorkTicketFlowStatusEnum.CONFIRM_MEASURE_PRINCIPAL.getStatus().equals(req.getStatus())){ |
|
|
|
|
|
|
|
req.setLicensor(AuthUtil.getUserId()); |
|
|
|
req.setLicensor(AuthUtil.getUserId()); |
|
|
|
} |
|
|
|
} else if (TicketConstants.FirstWorkTicketFlowStatusEnum.INVALID.getStatus().equals(req.getStatus())) { |
|
|
|
else if(TicketConstants.FirstWorkTicketFlowStatusEnum.INVALID.getStatus().equals(req.getStatus())){ |
|
|
|
|
|
|
|
this.invalidTicket(req); |
|
|
|
this.invalidTicket(req); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -633,6 +625,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 获取queryWrapper |
|
|
|
* 获取queryWrapper |
|
|
|
|
|
|
|
* |
|
|
|
* @param req |
|
|
|
* @param req |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -717,6 +710,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 许可人通过线下工作票 |
|
|
|
* 许可人通过线下工作票 |
|
|
|
|
|
|
|
* |
|
|
|
* @param req |
|
|
|
* @param req |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -745,6 +739,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 完成线下工作票 |
|
|
|
* 完成线下工作票 |
|
|
|
|
|
|
|
* |
|
|
|
* @param ticketAccessTaskDto |
|
|
|
* @param ticketAccessTaskDto |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -816,15 +811,12 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
}}); |
|
|
|
}}); |
|
|
|
if (CollectionUtil.isEmpty(infoEntityList)) { |
|
|
|
if (CollectionUtil.isEmpty(infoEntityList)) { |
|
|
|
code = TicketConstants.TicketCodePreEnum.DQ_WORK.getPrefix().concat("-").concat(tym).concat("-001"); |
|
|
|
code = TicketConstants.TicketCodePreEnum.DQ_WORK.getPrefix().concat("-").concat(tym).concat("-001"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
code = TicketConstants.TicketCodePreEnum.DQ_WORK.getPrefix().concat("-").concat(tym).concat("-").concat(String.format("%03d", infoEntityList.size() + 1)); |
|
|
|
code = TicketConstants.TicketCodePreEnum.DQ_WORK.getPrefix().concat("-").concat(tym).concat("-").concat(String.format("%03d", infoEntityList.size() + 1)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
catch(Exception e){ |
|
|
|
|
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} finally { |
|
|
|
finally{ |
|
|
|
|
|
|
|
lock.unlock(); |
|
|
|
lock.unlock(); |
|
|
|
} |
|
|
|
} |
|
|
|
return code; |
|
|
|
return code; |
|
|
@ -832,6 +824,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 获取安全检查工作票项统计 |
|
|
|
* 获取安全检查工作票项统计 |
|
|
|
|
|
|
|
* |
|
|
|
* @param startDate 开始时间 |
|
|
|
* @param startDate 开始时间 |
|
|
|
* @param endDate 结束时间 |
|
|
|
* @param endDate 结束时间 |
|
|
|
* @param dept 机构ID |
|
|
|
* @param dept 机构ID |
|
|
@ -844,6 +837,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 验证角色是否能查询到相关人员 |
|
|
|
* 验证角色是否能查询到相关人员 |
|
|
|
|
|
|
|
* |
|
|
|
* @param deptId 机构ID |
|
|
|
* @param deptId 机构ID |
|
|
|
* @param roleAliasArray 角色 按逗号分隔 |
|
|
|
* @param roleAliasArray 角色 按逗号分隔 |
|
|
|
* @return |
|
|
|
* @return |
|
|
@ -868,4 +862,60 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
|
|
|
|
|
|
|
|
return R.data(result); |
|
|
|
return R.data(result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 根据月份和区域查询工作票列表详情 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param pageEntity |
|
|
|
|
|
|
|
* @param areaVo |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public BladePage<StandardWorkVo> workTicketListByMonthAndArea(Page<WorkTicketInfoEntity> pageEntity, |
|
|
|
|
|
|
|
StandardTicketWithAreaVo areaVo) { |
|
|
|
|
|
|
|
//1.查询
|
|
|
|
|
|
|
|
QueryWrapper<WorkTicketInfoEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//开票来源
|
|
|
|
|
|
|
|
queryWrapper.lambda().eq(Func.isNotEmpty(areaVo.getTaskType()), WorkTicketInfoEntity::getTaskType, |
|
|
|
|
|
|
|
areaVo.getTaskType()); |
|
|
|
|
|
|
|
//编号
|
|
|
|
|
|
|
|
queryWrapper.lambda().like(Func.isNotEmpty(areaVo.getCode()), WorkTicketInfoEntity::getCode, areaVo.getCode()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//状态
|
|
|
|
|
|
|
|
queryWrapper.lambda().eq(Func.isNotEmpty(areaVo.getStatus()), WorkTicketInfoEntity::getStatus, |
|
|
|
|
|
|
|
areaVo.getStatus()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//开始时间
|
|
|
|
|
|
|
|
queryWrapper.lambda().lt(Func.isNotEmpty(areaVo.getStartTime()), WorkTicketInfoEntity::getCreateTime, |
|
|
|
|
|
|
|
areaVo.getStartTime()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//结束时间
|
|
|
|
|
|
|
|
queryWrapper.lambda().le(Func.isNotEmpty(areaVo.getEndTime()), WorkTicketInfoEntity::getCreateTime, |
|
|
|
|
|
|
|
areaVo.getEndTime()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
queryWrapper.eq("create_dept", areaVo.getAreaId()); |
|
|
|
|
|
|
|
queryWrapper.eq(areaVo.getYearMonth() != null, "date_format(create_time,'%Y-%m')", |
|
|
|
|
|
|
|
areaVo.getYearMonth()); |
|
|
|
|
|
|
|
Page<WorkTicketInfoEntity> workTicketInfoEntityPage = baseMapper.selectPage(pageEntity, queryWrapper); |
|
|
|
|
|
|
|
//数据转换
|
|
|
|
|
|
|
|
List<StandardWorkVo> standardWorkList = new ArrayList<>(); |
|
|
|
|
|
|
|
if (CollectionUtil.isNotEmpty(workTicketInfoEntityPage.getRecords())) { |
|
|
|
|
|
|
|
standardWorkList = workTicketInfoEntityPage.getRecords() |
|
|
|
|
|
|
|
.stream().map(workTicketInfoEntity -> { |
|
|
|
|
|
|
|
StandardWorkVo standardWorkVo = new StandardWorkVo(); |
|
|
|
|
|
|
|
BeanUtils.copyProperties(workTicketInfoEntity, standardWorkVo); |
|
|
|
|
|
|
|
return standardWorkVo; |
|
|
|
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPage<StandardWorkVo> page = new Page<>(); |
|
|
|
|
|
|
|
page.setRecords(standardWorkList); |
|
|
|
|
|
|
|
page.setTotal(workTicketInfoEntityPage.getTotal()); |
|
|
|
|
|
|
|
page.setCurrent(workTicketInfoEntityPage.getCurrent()); |
|
|
|
|
|
|
|
page.setSize(workTicketInfoEntityPage.getSize()); |
|
|
|
|
|
|
|
BladePage<StandardWorkVo> bladePage = BladePage.of(page); |
|
|
|
|
|
|
|
return bladePage; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|