|
@@ -950,11 +950,11 @@ public class ApsReportRecordsServiceImpl extends ServiceImpl<ApsReportRecordsDao
|
|
needUpdate.setId(outputDo.getId());
|
|
needUpdate.setId(outputDo.getId());
|
|
String outputdesc = "";
|
|
String outputdesc = "";
|
|
outputdesc += outputDo.getOutputmaterial().split(" ")[0];
|
|
outputdesc += outputDo.getOutputmaterial().split(" ")[0];
|
|
- outputdesc += " 厚" + outputDo.getThickness() + "*宽" + outputDo.getWidth();
|
|
|
|
|
|
+ outputdesc += " 厚" + CXCommonUtils.removeExtraZerosAndDecimal(outputDo.getThickness()) + "*宽" + CXCommonUtils.removeExtraZerosAndDecimal(outputDo.getWidth());
|
|
if (ObjectUtil.isNotEmpty(outputDo.getLength())) {
|
|
if (ObjectUtil.isNotEmpty(outputDo.getLength())) {
|
|
- outputdesc += "*长" + outputDo.getLength();
|
|
|
|
|
|
+ outputdesc += "*长" + CXCommonUtils.removeExtraZerosAndDecimal(outputDo.getLength());
|
|
}
|
|
}
|
|
- outputdesc += " mm " + outputDo.getWeight() + "吨";
|
|
|
|
|
|
+ outputdesc += " mm " + CXCommonUtils.removeExtraZerosAndDecimal(outputDo.getWeight()) + "吨";
|
|
needUpdate.setOutputdesc(outputdesc);
|
|
needUpdate.setOutputdesc(outputdesc);
|
|
apsReportOutputService.updateById(needUpdate);
|
|
apsReportOutputService.updateById(needUpdate);
|
|
}
|
|
}
|
|
@@ -983,8 +983,15 @@ public class ApsReportRecordsServiceImpl extends ServiceImpl<ApsReportRecordsDao
|
|
OrganizationCodeAndDeviceCodeVo organizationCodeAndDeviceCodeVo,
|
|
OrganizationCodeAndDeviceCodeVo organizationCodeAndDeviceCodeVo,
|
|
ApsProductionOrderDo apsProductionOrderDo,
|
|
ApsProductionOrderDo apsProductionOrderDo,
|
|
ApsBlankOrderDo apsBlankOrderDo) {
|
|
ApsBlankOrderDo apsBlankOrderDo) {
|
|
|
|
+ //获取所有报工输出物料对应的工序输出物料
|
|
|
|
+ List<String> apsProcessMaterialIds = apsReportOutputDos.stream().map(ApsReportOutputDo::getOutputid).distinct().collect(Collectors.toList());
|
|
|
|
+ Collection<ApsProcessOperationOutMaterDo> apsProcessOperationOutMaterDos = apsProcessOperationOutMaterService.listByIds(apsProcessMaterialIds);
|
|
|
|
+
|
|
List<ApsWorkInProgressInventoryDo> needAddWorkInProgressInventoryList = new LinkedList<>();
|
|
List<ApsWorkInProgressInventoryDo> needAddWorkInProgressInventoryList = new LinkedList<>();
|
|
for (ApsReportOutputDo apsReportOutputDo : apsReportOutputDos) {
|
|
for (ApsReportOutputDo apsReportOutputDo : apsReportOutputDos) {
|
|
|
|
+ //获取报工输出物料对应的工序输出物料
|
|
|
|
+ ApsProcessOperationOutMaterDo apsProcessOperationOutMaterDo = apsProcessOperationOutMaterDos.stream().filter(item -> item.getId().equals(apsReportOutputDo.getOutputid())).findFirst().orElse(null);
|
|
|
|
+
|
|
ApsWorkInProgressInventoryDo workInProgressInventoryDo = new ApsWorkInProgressInventoryDo();
|
|
ApsWorkInProgressInventoryDo workInProgressInventoryDo = new ApsWorkInProgressInventoryDo();
|
|
workInProgressInventoryDo.setId(SecurityUtil.getUUID());
|
|
workInProgressInventoryDo.setId(SecurityUtil.getUUID());
|
|
//获取当前用户相关信息
|
|
//获取当前用户相关信息
|
|
@@ -1032,6 +1039,25 @@ public class ApsReportRecordsServiceImpl extends ServiceImpl<ApsReportRecordsDao
|
|
//报工记录对应工序作业的订单号
|
|
//报工记录对应工序作业的订单号
|
|
workInProgressInventoryDo.setOrdernumber(apsProductionOrderDo.getOrderno());
|
|
workInProgressInventoryDo.setOrdernumber(apsProductionOrderDo.getOrderno());
|
|
workInProgressInventoryDo.setWorkinprocessstatus("待检验");
|
|
workInProgressInventoryDo.setWorkinprocessstatus("待检验");
|
|
|
|
+ //客户订单号
|
|
|
|
+ workInProgressInventoryDo.setCustomorderno(apsProductionOrderDo.getCustomorderno());
|
|
|
|
+ //订单类型
|
|
|
|
+ workInProgressInventoryDo.setOrdertype(apsProductionOrderDo.getOrdertype());
|
|
|
|
+ //作业输出物料
|
|
|
|
+ String outPut = "";
|
|
|
|
+ try {
|
|
|
|
+ outPut = apsProcessOperationOutMaterDo.getMetal()
|
|
|
|
+ + apsProcessOperationOutMaterDo.getMetalstate()
|
|
|
|
+ + apsProcessOperationOutMaterDo.getProducttype()
|
|
|
|
+ + " 厚" + CXCommonUtils.removeExtraZerosAndDecimal(apsProcessOperationOutMaterDo.getThickness())
|
|
|
|
+ + "*宽" + CXCommonUtils.removeExtraZerosAndDecimal(apsProcessOperationOutMaterDo.getProwidth());
|
|
|
|
+ if (ObjectUtil.isNotEmpty(apsProcessOperationOutMaterDo.getProlength())
|
|
|
|
+ && !CXCommonUtils.removeExtraZerosAndDecimal(apsProcessOperationOutMaterDo.getProlength()).equals("0")) {
|
|
|
|
+ outPut = outPut + "*长" + CXCommonUtils.removeExtraZerosAndDecimal(apsProcessOperationOutMaterDo.getProlength());
|
|
|
|
+ }
|
|
|
|
+ } catch (Exception ignored) {
|
|
|
|
+ }
|
|
|
|
+ workInProgressInventoryDo.setJoboutputmaterial(outPut);
|
|
|
|
|
|
needAddWorkInProgressInventoryList.add(workInProgressInventoryDo);
|
|
needAddWorkInProgressInventoryList.add(workInProgressInventoryDo);
|
|
}
|
|
}
|