|
|
|
@ -762,11 +762,11 @@ public class ChangeManagementServiceImpl extends ServiceImpl<ChangeManagementMap |
|
|
|
List<ChangeCountersignatureItemEntity> itemList = data.getChooseCSItemList().stream().map(a -> { |
|
|
|
a.setChangeNo(data.getChangeNo()); |
|
|
|
a.setCreateBy(data.getCreateBy()); |
|
|
|
if (a.getItemExecutionDate() == null) { |
|
|
|
//a.setItemExecutionDate(new Date()); |
|
|
|
LocalDateTime now = LocalDateTime.now(); |
|
|
|
a.setItemExecutionDate(Date.from(now.atZone(ZoneId.systemDefault()).toInstant())); |
|
|
|
} |
|
|
|
// if (a.getItemExecutionDate() == null) { |
|
|
|
// //a.setItemExecutionDate(new Date()); |
|
|
|
// LocalDateTime now = LocalDateTime.now(); |
|
|
|
// a.setItemExecutionDate(Date.from(now.atZone(ZoneId.systemDefault()).toInstant())); |
|
|
|
// } |
|
|
|
return a; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
changeManagementMapper.chooseCSItemSave(itemList); |
|
|
|
@ -1905,7 +1905,7 @@ public class ChangeManagementServiceImpl extends ServiceImpl<ChangeManagementMap |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 提交 |
|
|
|
* TP执行 |
|
|
|
* @param data |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@ -1923,7 +1923,32 @@ public class ChangeManagementServiceImpl extends ServiceImpl<ChangeManagementMap |
|
|
|
cData.setRoleId(4); |
|
|
|
List<PlmProcessControllBaseData> controlList = requestManageMapper.getProcessSelect2(cData); |
|
|
|
if (controlList.isEmpty()) { |
|
|
|
throw new RuntimeException("当前节点不能点击执行,请检查流程节点配置!"); |
|
|
|
throw new RuntimeException("当前节点不能点击TP执行,请检查流程节点配置!"); |
|
|
|
} |
|
|
|
// 提交 |
|
|
|
submitChange(data); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 会签执行 |
|
|
|
* @param data |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void csExecute(ChangeRequestVo data) { |
|
|
|
// 判断节点的特殊管控 (TP执行信息特殊管控) |
|
|
|
List<ProcessFormEntity> processFormList = changeManagementMapper.queryRequestId(data.getSite(), "", data.getChangeNo()); |
|
|
|
if (processFormList.isEmpty()) { |
|
|
|
throw new RuntimeException("流程请求ID获取有误!"); |
|
|
|
} |
|
|
|
PlmProcessControllBaseData cData = new PlmProcessControllBaseData(); |
|
|
|
cData.setSite(data.getSite()); |
|
|
|
cData.setNodeId(processFormList.get(0).getNodeId()); |
|
|
|
cData.setWorkflowId(processFormList.get(0).getWorkflowId()); |
|
|
|
cData.setRoleId(5); |
|
|
|
List<PlmProcessControllBaseData> controlList = requestManageMapper.getProcessSelect2(cData); |
|
|
|
if (controlList.isEmpty()) { |
|
|
|
throw new RuntimeException("当前节点不能点击会签执行,请检查流程节点配置!"); |
|
|
|
} |
|
|
|
// 提交 |
|
|
|
submitChange(data); |
|
|
|
|