fix:MES变更库区
This commit is contained in:
@@ -167,7 +167,7 @@ public class MesToLmsController {
|
||||
@Log("MES传递给LMS入线边库或者入成品库、撤销入线边库、人工改变入线边还是包装")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> changeSect(@RequestBody JSONObject jo) {
|
||||
return new ResponseEntity<>(mesToLmsService.changeSect(jo), HttpStatus.OK);
|
||||
return new ResponseEntity<>(mesToLmsService.sendTargetHouse(jo), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getWasteFoilWeight")
|
||||
|
||||
@@ -80,8 +80,6 @@ public interface MesToLmsService {
|
||||
|
||||
JSONObject sendSubInfo(JSONObject param);
|
||||
|
||||
JSONObject changeSect(JSONObject param);
|
||||
|
||||
JSONObject getWasteFoilWeight(JSONObject param);
|
||||
|
||||
JSONObject WasteFoilSuccess(JSONObject param);
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.nl.b_lms.bst.ivt.scale.history.service.dao.BstIvtScalehistory;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
|
||||
import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService;
|
||||
import org.nl.b_lms.sch.tasks.ProcessTask;
|
||||
@@ -88,6 +89,9 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
@Resource
|
||||
private IbstIvtPackageinfoivtService packageinfoivtService;
|
||||
|
||||
@Autowired
|
||||
private IpdmBiSubpackagerelationService subpackagerelationService;
|
||||
|
||||
|
||||
/**
|
||||
* 生箔烘箱:
|
||||
@@ -1719,7 +1723,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
log.info("sendTargetHouse输入参数为:-------------------" + param.toString());
|
||||
JSONObject resultParam = new JSONObject();
|
||||
try {
|
||||
String containerName = param.getString("sconds");
|
||||
String containerName = param.getString("ContainerName");
|
||||
String TargetHouse = param.getString("TargetHouse");
|
||||
if (StringUtils.isBlank(containerName)) {
|
||||
throw new BadRequestException("传入的母卷号不能为空!");
|
||||
@@ -1879,17 +1883,44 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
public JSONObject containerNeedDown(JSONObject param) {
|
||||
log.info("containerNeedDown输入参数为:-------------------" + param.toString());
|
||||
|
||||
JSONObject resultParam = new JSONObject();
|
||||
resultParam.put("RTYPE", "S");
|
||||
resultParam.put("Code", "0");
|
||||
resultParam.put("RTMSG", "操作成功!");
|
||||
JSONObject result = new JSONObject();
|
||||
|
||||
return resultParam;
|
||||
String OutsideContainerName = param.getString("OutsideContainerName");
|
||||
String InsideContainerName = param.getString("InsideContainerName");
|
||||
String CarrierStatus = param.getString("CarrierStatus");
|
||||
|
||||
if (StrUtil.isEmpty(OutsideContainerName)) {
|
||||
throw new BadRequestException("外卷卷号不能为空!");
|
||||
}
|
||||
|
||||
if (StrUtil.isEmpty(InsideContainerName)) {
|
||||
throw new BadRequestException("内卷卷号不能为空!");
|
||||
}
|
||||
|
||||
if (StrUtil.isEmpty(CarrierStatus)) {
|
||||
throw new BadRequestException("是否需要下轴不能为空!");
|
||||
}
|
||||
|
||||
try { // 返回成功
|
||||
result.put("RTYPE", "S");
|
||||
result.put("RTMSG", "操作成功!");
|
||||
result.put("RTOAL", 1);
|
||||
result.put("RTDAT", null);
|
||||
} catch (Exception e) {
|
||||
// 返回失败
|
||||
result.put("RTYPE", "E");
|
||||
result.put("RTMSG", "操作失败!" + e.getMessage());
|
||||
result.put("RTOAL", 0);
|
||||
result.put("RTDAT", null);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject sendSubInfo(JSONObject param) {
|
||||
|
||||
log.info("sendSubInfo输入参数为:-------------------" + param.toString());
|
||||
/* {"ContainerName":"A1222211290105A3",
|
||||
"SAPLotNumber":"A000000168",
|
||||
"SaleOrderName":"100000022-100",
|
||||
@@ -1907,6 +1938,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
"ETTensileStrengthLowerLimit":"300",
|
||||
"TensileStrength":"1.0"}*/
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
//子卷号
|
||||
String ContainerName = param.getString("ContainerName");
|
||||
//SAP批次
|
||||
@@ -1948,47 +1980,45 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
//生产实际抗拉值
|
||||
String TensileStrength = param.getString("TensileStrength");
|
||||
|
||||
PdmBiSubpackagerelation dto = new PdmBiSubpackagerelation();
|
||||
dto.setContainer_name(ContainerName);
|
||||
dto.setSap_pcsn(SAPLotNumber);
|
||||
dto.setSale_order_name(SaleOrderName);
|
||||
dto.setContainer_name(CustomerName);
|
||||
dto.setCustomer_description(CustomerDescription);
|
||||
dto.setWidth(Width);
|
||||
dto.setThickness(Thickness);
|
||||
dto.setMass_per_unit_area(MassPerUnitArea);
|
||||
dto.setNet_weight(NetWeight);
|
||||
dto.setLength(Length);
|
||||
dto.setDate_of_production(DateOfProduction);
|
||||
dto.setIs_un_plan_production(isUnPlanProduction);
|
||||
dto.setUn_plan_product_property1(UnPlanProductProperty1);
|
||||
dto.setUn_plan_product_property2(UnPlanProductProperty2);
|
||||
dto.setUn_plan_product_property3(UnPlanProductProperty3);
|
||||
dto.setDemand_limit(SOTensileStrengthLowerLimit);
|
||||
dto.setStandard_limit(ETTensileStrengthLowerLimit);
|
||||
dto.setActual_value(TensileStrength);
|
||||
try {
|
||||
PdmBiSubpackagerelation dto = new PdmBiSubpackagerelation();
|
||||
dto.setContainer_name(ContainerName);
|
||||
dto.setSap_pcsn(SAPLotNumber);
|
||||
dto.setSale_order_name(SaleOrderName);
|
||||
dto.setContainer_name(CustomerName);
|
||||
dto.setCustomer_description(CustomerDescription);
|
||||
dto.setWidth(Width);
|
||||
dto.setThickness(Thickness);
|
||||
dto.setMass_per_unit_area(MassPerUnitArea);
|
||||
dto.setNet_weight(NetWeight);
|
||||
dto.setLength(Length);
|
||||
dto.setDate_of_production(DateOfProduction);
|
||||
dto.setIs_un_plan_production(isUnPlanProduction);
|
||||
dto.setUn_plan_product_property1(UnPlanProductProperty1);
|
||||
dto.setUn_plan_product_property2(UnPlanProductProperty2);
|
||||
dto.setUn_plan_product_property3(UnPlanProductProperty3);
|
||||
dto.setDemand_limit(SOTensileStrengthLowerLimit);
|
||||
dto.setStandard_limit(ETTensileStrengthLowerLimit);
|
||||
dto.setActual_value(TensileStrength);
|
||||
dto.setWidth_standard(WidthPlan);
|
||||
dto.setThickness_request(ThicknessPlan);
|
||||
dto.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextId() + "");
|
||||
subpackagerelationService.save(dto);
|
||||
|
||||
// 返回成功
|
||||
result.put("RTYPE", "S");
|
||||
result.put("RTMSG", "操作成功!");
|
||||
result.put("RTOAL", 1);
|
||||
result.put("RTDAT", null);
|
||||
} catch (Exception e) {
|
||||
// 返回失败
|
||||
result.put("RTYPE", "E");
|
||||
result.put("RTMSG", "操作失败!" + e.getMessage());
|
||||
result.put("RTOAL", 0);
|
||||
result.put("RTDAT", null);
|
||||
}
|
||||
|
||||
log.info("sendSubInfo输入参数为:-------------------" + param.toString());
|
||||
|
||||
JSONObject resultParam = new JSONObject();
|
||||
resultParam.put("RTYPE", "S");
|
||||
resultParam.put("Code", "0");
|
||||
resultParam.put("RTMSG", "操作成功!");
|
||||
|
||||
return resultParam;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject changeSect(JSONObject param) {
|
||||
log.info("changeSect输入参数为:-------------------" + param.toString());
|
||||
|
||||
JSONObject resultParam = new JSONObject();
|
||||
resultParam.put("RTYPE", "S");
|
||||
resultParam.put("Code", "0");
|
||||
resultParam.put("RTMSG", "操作成功!");
|
||||
|
||||
return resultParam;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user