|
|
@ -519,6 +519,10 @@ public class ErfExpApplyServiceImpl extends ServiceImpl<ErfExpApplyMapper, ErfEx |
|
|
public void plannerSchedule(ErfPlannerScheduleData data) { |
|
|
public void plannerSchedule(ErfPlannerScheduleData data) { |
|
|
log.info("=== 计划员排产 === 试验单: {}, 工单号: {}, 排产日期: {}", |
|
|
log.info("=== 计划员排产 === 试验单: {}, 工单号: {}, 排产日期: {}", |
|
|
data.getApplyNo(), data.getWorkOrderNo(), data.getScheduledDate()); |
|
|
data.getApplyNo(), data.getWorkOrderNo(), data.getScheduledDate()); |
|
|
|
|
|
ErfExpApply entity = this.getById(data.getApplyNo()); |
|
|
|
|
|
if (entity == null) { |
|
|
|
|
|
throw new XJException("试验单"+data.getApplyNo()+"不存在"); |
|
|
|
|
|
} |
|
|
QueryWrapper<ErfFlowNodeInstance> nodeQuery = new QueryWrapper<>(); |
|
|
QueryWrapper<ErfFlowNodeInstance> nodeQuery = new QueryWrapper<>(); |
|
|
nodeQuery.eq("apply_no", data.getApplyNo()) |
|
|
nodeQuery.eq("apply_no", data.getApplyNo()) |
|
|
.eq("node_code", "计划员排产") |
|
|
.eq("node_code", "计划员排产") |
|
|
@ -538,15 +542,11 @@ public class ErfExpApplyServiceImpl extends ServiceImpl<ErfExpApplyMapper, ErfEx |
|
|
ErfFlowNodeInstance otherNode = erfFlowNodeInstanceMapper.selectOne(otherNodeQuery); |
|
|
ErfFlowNodeInstance otherNode = erfFlowNodeInstanceMapper.selectOne(otherNodeQuery); |
|
|
if (otherNode != null) { |
|
|
if (otherNode != null) { |
|
|
String otherPlannerName = otherNode.getAssigneeName(); |
|
|
String otherPlannerName = otherNode.getAssigneeName(); |
|
|
throw new XJException("排产失败,已被计划员 " + otherPlannerName + " 处理"); |
|
|
|
|
|
|
|
|
throw new XJException("已被计划员 " + otherPlannerName + " 处理"); |
|
|
} else { |
|
|
} else { |
|
|
throw new XJException("排产失败,当前用户没有权限或已被其他人处理"); |
|
|
|
|
|
|
|
|
throw new XJException("当前用户没有权限或已被其他人处理"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
ErfExpApply entity = this.getById(data.getApplyNo()); |
|
|
|
|
|
if (entity == null) { |
|
|
|
|
|
throw new XJException("试验单不存在"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 更新工单号、排产日期和计划员信息(updateTime由MyBatis-Plus自动填充) |
|
|
// 更新工单号、排产日期和计划员信息(updateTime由MyBatis-Plus自动填充) |
|
|
entity.setWorkOrderNo(data.getWorkOrderNo()); |
|
|
entity.setWorkOrderNo(data.getWorkOrderNo()); |
|
|
|