计划模块(工单修改BUG解决)

highway
wws 1 year ago
parent 207e8ccf6e
commit fd56a296d7

@ -167,13 +167,21 @@ public class ProOrderWorkorderController extends BaseController {
ArrayList<String> strings = new ArrayList<>();
for (ProOrderWorkorder proOrderWorkorder : proOrderWorkorders) {
String status = proOrderWorkorder.getStatus();
strings.add(status);
// strings.add(status);
// 更新代码逻辑-wws
if (status.equals("w0")){
strings.add(proOrderWorkorder.getWorkorderId());
} else {
throw new ServiceException("工单已经下单,不能删除!");
}
// 判断是否含有湿料计划 boolean值存在为true不存在为false
if (proWetMaterialPlanDetailService.selectProWetMaterialPlanDetailByWorkId(proOrderWorkorder.getWorkorderId())) {
throw new ServiceException("工单已创建湿料计划,不能删除!");
}
}
String[] orderWorkerIds= strings.toArray(new String[0]);
// 更新代码逻辑-wws
/*
for (String orderWorkerId : orderWorkerIds) {
if (orderWorkerId.equals("w0")){
return toAjax(proOrderWorkorderService.deleteProOrderWorkorderByWorkorderIds(workorderIds));
@ -181,6 +189,7 @@ public class ProOrderWorkorderController extends BaseController {
throw new ServiceException("工单已经下单,不能删除!");
}
}
*/
// ProOrderWorkorder proOrderWorkorder = new ProOrderWorkorder();
@ -197,7 +206,11 @@ public class ProOrderWorkorderController extends BaseController {
// throw new ServiceException("订单未拆分或工单已经下单");
// }
// }
return toAjax(proOrderWorkorderService.deleteProOrderWorkorderByWorkorderIds(workorderIds));
// 更新代码逻辑-wws
//return toAjax(proOrderWorkorderService.deleteProOrderWorkorderByWorkorderIds(workorderIds));
return toAjax(proOrderWorkorderService.deleteProOrderWorkorderByWorkorderIds(orderWorkerIds));
}
/**

@ -22,7 +22,7 @@ public interface ProOrderWorkorderMapper {
/**
*
*
* @param workorderId code
* @param workorderId id code
* @return
*/
public ProOrderWorkorder selectProOrderWorkorderByWorkorderId(String workorderId);

@ -590,7 +590,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
// 通过班次id查询班次名称
String shiftDesc = proOrderMapper.selectShiftNameById(proOrderWorkorder.getShiftId());
// 通过设备code查询出机型名称
String prodLineName = proOrderMapper.selectProdLineName(proOrderWorkorderMapper.selectProOrderWorkorderByWorkorderId(proOrderWorkorder.getWorkorderCode()).getProdLineCode());
String prodLineName = proOrderMapper.selectProdLineName(proOrderWorkorderMapper.selectProOrderWorkorderByWorkorderId(proOrderWorkorder.getWorkorderId()).getProdLineCode());
// 通过工单id查询批次号
List<String> batchCodeList = proOrderMapper.selectBatchCodesById(proOrderWorkorder.getWorkorderId());
List<StringBuilder> batchCodes = new ArrayList<>();

@ -81,7 +81,7 @@
<select id="selectProOrderWorkorderByWorkorderId" parameterType="String" resultMap="ProOrderWorkorderResult">
<include refid="selectProOrderWorkorderVo"/>
where workorder_code = #{workorderId}
where workorder_code = #{workorderId} or workorder_id = #{workorderId}
</select>
<select id="selectFirWorkOrder" parameterType="String" resultMap="ProOrderWorkorderResult">
<include refid="selectProOrderWorkorderVo"/>

Loading…
Cancel
Save