|
|
|
@ -89,6 +89,8 @@ public class ProOrderServiceImpl implements IProOrderService {
|
|
|
|
|
// code
|
|
|
|
|
int endCode = getEndCode(product.getId());
|
|
|
|
|
firWorkOrder.setWorkorderCode(product.getOrderCode()+"-"+endCode);
|
|
|
|
|
// 更新到数据库
|
|
|
|
|
proOrderWorkorderMapper.insertProOrderWorkorder(firWorkOrder);
|
|
|
|
|
|
|
|
|
|
// 创建通用批次表对象
|
|
|
|
|
ProOrderWorkorderBatch workBatch = setCommonBatchAttribute();
|
|
|
|
@ -152,7 +154,7 @@ public class ProOrderServiceImpl implements IProOrderService {
|
|
|
|
|
if (checkEnd == 0) {
|
|
|
|
|
firWorkOrder.setIsEnd(1);
|
|
|
|
|
// 更新到数据库
|
|
|
|
|
proOrderWorkorderMapper.insertProOrderWorkorder(firWorkOrder);
|
|
|
|
|
proOrderWorkorderMapper.updateProOrderWorkorder(firWorkOrder);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return success();
|
|
|
|
@ -277,11 +279,7 @@ public class ProOrderServiceImpl implements IProOrderService {
|
|
|
|
|
@Override
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
public List<ProOrder> selectProOrderList(ProOrder proOrder) {
|
|
|
|
|
List<ProOrder> proOrderList = proOrderMapper.selectProOrderList(proOrder);
|
|
|
|
|
for (int i = 0; i < proOrderList.size(); i++) {
|
|
|
|
|
proOrderList.get(i).setStatus(changeStatus(proOrderList.get(i).getStatus()));
|
|
|
|
|
}
|
|
|
|
|
return proOrderList;
|
|
|
|
|
return proOrderMapper.selectProOrderList(proOrder);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -462,22 +460,6 @@ public class ProOrderServiceImpl implements IProOrderService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 转换拆分订单状态
|
|
|
|
|
*
|
|
|
|
|
* @param status
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
private String changeStatus(String status) {
|
|
|
|
|
if (status.equals("o0")){
|
|
|
|
|
return "未拆分";
|
|
|
|
|
}
|
|
|
|
|
if (status.equals("o1")){
|
|
|
|
|
return "已拆分";
|
|
|
|
|
}
|
|
|
|
|
return status;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取工单尾号code
|
|
|
|
|
* @param id
|
|
|
|
|