|
@@ -540,6 +540,36 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
|
|
|
retMsg = "解锁成功";
|
|
|
}
|
|
|
return R.ok("200", retMsg, orderLockVo.getId());
|
|
|
+ }else{
|
|
|
+ Date lockStartTime = orderLockVo.getLockStartTime();
|
|
|
+ if(lockStartTime != null){
|
|
|
+ // 获取排程参数设置
|
|
|
+ List<ApsScheduleConfigDo> apsConfigs = apsScheduleConfigService.list();
|
|
|
+ // 默认最小排程时间
|
|
|
+ Integer defaultStartStartSchedulerun = 8;
|
|
|
+ if (!apsConfigs.isEmpty()) {
|
|
|
+ defaultStartStartSchedulerun = apsConfigs.get(0).getStartschedulerun();
|
|
|
+ }
|
|
|
+ if (defaultStartStartSchedulerun == null || defaultStartStartSchedulerun <= 0) {
|
|
|
+ defaultStartStartSchedulerun = 8;
|
|
|
+ }
|
|
|
+ Date date = orderLockGetSearChDate(lockStartTime, defaultStartStartSchedulerun, lockMark);
|
|
|
+ List<ApsProcessOperationProcessEquDo> processDetailInfoByLockTime = this.baseMapper.getProcessDetailInfoByLockTime(date, lockMark);
|
|
|
+ if(processDetailInfoByLockTime != null && processDetailInfoByLockTime.size()>0){
|
|
|
+ List<String> lpeus = processDetailInfoByLockTime.stream().map(ApsProcessOperationProcessEquDo::getId).collect(Collectors.toList());
|
|
|
+ apsProcessOperationProcessEquService.update(new LambdaUpdateWrapper<ApsProcessOperationProcessEquDo>()
|
|
|
+ .in(ApsProcessOperationProcessEquDo::getId, lpeus)
|
|
|
+ .set(ApsProcessOperationProcessEquDo::getLockmarkdetail, lockMark));
|
|
|
+ String retMsg = "";
|
|
|
+ // 锁定
|
|
|
+ if (LOCKMARK_Y.equals(lockMark)) {
|
|
|
+ retMsg = "锁定成功";
|
|
|
+ }else if (LOCKMARK_N.equals(lockMark)) {
|
|
|
+ retMsg = "解锁成功";
|
|
|
+ }
|
|
|
+ return R.ok("200", retMsg, lpeus);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return R.ok("200", "没有需要操作的数据", orderLockVo.getId());
|
|
|
}
|