|
|
@ -448,8 +448,14 @@ public class ProOrderServiceImpl implements IProOrderService {
|
|
|
|
public String syncImportFunc(List<ProOrder> newOrders){
|
|
|
|
public String syncImportFunc(List<ProOrder> newOrders){
|
|
|
|
String failOrder = "";
|
|
|
|
String failOrder = "";
|
|
|
|
for (ProOrder proOrder:newOrders) {
|
|
|
|
for (ProOrder proOrder:newOrders) {
|
|
|
|
proOrder.setProdType("white");//只有白坯有导入
|
|
|
|
//prodType->@Excel(name = "产品类型", readConverterExp = "white=白坯,prod=成品")
|
|
|
|
failOrder += syncFunc(proOrder)+",";
|
|
|
|
proOrder.setCreateBy(SecurityUtils.getUsername());
|
|
|
|
|
|
|
|
proOrder.setSyncUser("import");
|
|
|
|
|
|
|
|
proOrder.setPlanFactoryCode(proOrder.getFactoryCode());
|
|
|
|
|
|
|
|
String msg = syncFunc(proOrder);
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(msg)){
|
|
|
|
|
|
|
|
failOrder += msg+",";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return failOrder;
|
|
|
|
return failOrder;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -987,7 +993,7 @@ public class ProOrderServiceImpl implements IProOrderService {
|
|
|
|
// 循环遍历校验数据是否为空
|
|
|
|
// 循环遍历校验数据是否为空
|
|
|
|
for (ProOrder proOrder : orderList) {
|
|
|
|
for (ProOrder proOrder : orderList) {
|
|
|
|
// 计划工厂
|
|
|
|
// 计划工厂
|
|
|
|
if (proOrder.getPlanFactoryCode().isEmpty() || proOrder.getPlanFactoryCode() == null) {
|
|
|
|
if (proOrder.getFactoryCode().isEmpty() || proOrder.getFactoryCode() == null) {
|
|
|
|
return error(500, "计划工厂信息不能为空!信息导入失败!");
|
|
|
|
return error(500, "计划工厂信息不能为空!信息导入失败!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 订单号
|
|
|
|
// 订单号
|
|
|
@ -1026,6 +1032,7 @@ public class ProOrderServiceImpl implements IProOrderService {
|
|
|
|
if (proOrder.getPlanComplete() == null || StringUtils.isNull(proOrder.getPlanComplete())) {
|
|
|
|
if (proOrder.getPlanComplete() == null || StringUtils.isNull(proOrder.getPlanComplete())) {
|
|
|
|
return error(500, "计划完成日期不能为空!信息导入失败!");
|
|
|
|
return error(500, "计划完成日期不能为空!信息导入失败!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return success();
|
|
|
|
return success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|