|
@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.rongwei.bscommon.sys.dao.ApsBlankOrderDao;
|
|
|
import com.rongwei.bscommon.sys.dao.ApsProcessOperationDao;
|
|
|
import com.rongwei.bscommon.sys.service.*;
|
|
|
import com.rongwei.bsentity.domain.*;
|
|
@@ -41,6 +42,9 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
|
|
|
@Autowired
|
|
|
private ApsProcessOperationDao apsProcessOperationDao;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ApsBlankOrderDao apsBlankOrderDao;
|
|
|
+
|
|
|
@Autowired
|
|
|
ApsCraftRouteStepService apsCraftRouteStepService;
|
|
|
|
|
@@ -251,15 +255,16 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
|
|
|
apsProcessOperationOutMaterDo.setOutval(1);
|
|
|
apsProcessOperationOutMaterDo.setPlanrollnum(blanckdata.getInt("ROLLNUM"));
|
|
|
//输入物料的输入单卷重*该输出物料的宽度/输入物料的宽度/该输出物料的横切分卷数
|
|
|
- String singlerollweight = df.format(outMaterDo.getSinglerollweight().multiply(wval == null ? BigDecimal.valueOf(1) : wval).divide(outMaterDo.getProwidth() == null ? BigDecimal.valueOf(1) : outMaterDo.getProwidth(), 2, BigDecimal.ROUND_HALF_UP));
|
|
|
- apsProcessOperationOutMaterDo.setSinglerollweight(new BigDecimal(singlerollweight));
|
|
|
+// String singlerollweight = df.format(outMaterDo.getSinglerollweight().multiply(wval == null ? BigDecimal.valueOf(1) : wval).divide(outMaterDo.getProwidth() == null ? BigDecimal.valueOf(1) : outMaterDo.getProwidth(), 2, BigDecimal.ROUND_HALF_UP));
|
|
|
+// apsProcessOperationOutMaterDo.setSinglerollweight(new BigDecimal(singlerollweight));
|
|
|
+ apsProcessOperationOutMaterDo.setSinglerollweight(outMaterDo.getSinglerollweight());
|
|
|
apsProcessOperationOutMaterDo.setNumunit(blanckdata.getStr("NUMBERUNIT"));
|
|
|
apsProcessOperationOutMaterDo.setPlanstockrollnum(0);
|
|
|
apsProcessOperationOutMaterDo.setPlanprodrollnum(0);
|
|
|
apsProcessOperationOutMaterDo.setMainid(processId);
|
|
|
apsProcessOperationOutMaterDo.setBlankid(blanckdata.getStr("ID"));
|
|
|
//输出物料
|
|
|
- String outputMeter = getOutMeterInfo(outProducttype, outMeter, outMetalstate, tval, wval, lval, apsProcessOperationOutMaterDo.getThickoffset(), apsProcessOperationOutMaterDo.getWidthoffset(), apsProcessOperationOutMaterDo.getLengthoffset()) + singlerollweight + UNIT_MAP.getOrDefault(blanckdata.getStr("NUMBERUNIT"), "");
|
|
|
+ String outputMeter = getOutMeterInfo(outProducttype, outMeter, outMetalstate, tval, wval, lval, apsProcessOperationOutMaterDo.getThickoffset(), apsProcessOperationOutMaterDo.getWidthoffset(), apsProcessOperationOutMaterDo.getLengthoffset()) + outMaterDo.getSinglerollweight() + UNIT_MAP.getOrDefault(blanckdata.getStr("NUMBERUNIT"), "");
|
|
|
apsProcessOperationOutMaterDo.setOutputmaterial(outputMeter + "*" + blanckdata.getInt("ROLLNUM") + "卷");
|
|
|
apsProcessOperationDo.setPlanoutput("[1]" + outputMeter + "*" + blanckdata.getInt("ROLLNUM") + "卷");
|
|
|
//输出成品
|
|
@@ -388,15 +393,16 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
|
|
|
apsProcessOperationOutMaterDo.setOutval(1);
|
|
|
apsProcessOperationOutMaterDo.setPlanrollnum(blanckdata.getInt("ROLLNUM"));
|
|
|
//输入物料的输入单卷重*该输出物料的宽度/输入物料的宽度/该输出物料的横切分卷数
|
|
|
- String singlerollweight = df.format(blanckdata.getBigDecimal("SINGLEROLLWEIGHT").multiply(wval == null ? BigDecimal.valueOf(1) : wval).divide(blanckdata.getBigDecimal("PROWIDTH") == null ? BigDecimal.valueOf(1) : blanckdata.getBigDecimal("PROWIDTH"), 2, BigDecimal.ROUND_HALF_UP));
|
|
|
- apsProcessOperationOutMaterDo.setSinglerollweight(new BigDecimal(singlerollweight));
|
|
|
+// String singlerollweight = df.format(blanckdata.getBigDecimal("SINGLEROLLWEIGHT").multiply(wval == null ? BigDecimal.valueOf(1) : wval).divide(blanckdata.getBigDecimal("PROWIDTH") == null ? BigDecimal.valueOf(1) : blanckdata.getBigDecimal("PROWIDTH"), 2, BigDecimal.ROUND_HALF_UP));
|
|
|
+// apsProcessOperationOutMaterDo.setSinglerollweight(new BigDecimal(singlerollweight));
|
|
|
+ apsProcessOperationOutMaterDo.setSinglerollweight(blanckdata.getBigDecimal("SINGLEROLLWEIGHT"));
|
|
|
apsProcessOperationOutMaterDo.setNumunit(blanckdata.getStr("NUMBERUNIT"));
|
|
|
apsProcessOperationOutMaterDo.setPlanstockrollnum(0);
|
|
|
apsProcessOperationOutMaterDo.setPlanprodrollnum(0);
|
|
|
apsProcessOperationOutMaterDo.setMainid(processId);
|
|
|
apsProcessOperationOutMaterDo.setBlankid(blanckdata.getStr("ID"));
|
|
|
//输出物料
|
|
|
- String outputMeter = getOutMeterInfo(outProducttype, outMeter, outMetalstate, tval, wval, lval, apsProcessOperationOutMaterDo.getThickoffset(), apsProcessOperationOutMaterDo.getWidthoffset(), apsProcessOperationOutMaterDo.getLengthoffset()) + singlerollweight + UNIT_MAP.getOrDefault(blanckdata.getStr("NUMBERUNIT"), "");
|
|
|
+ String outputMeter = getOutMeterInfo(outProducttype, outMeter, outMetalstate, tval, wval, lval, apsProcessOperationOutMaterDo.getThickoffset(), apsProcessOperationOutMaterDo.getWidthoffset(), apsProcessOperationOutMaterDo.getLengthoffset()) + blanckdata.getBigDecimal("SINGLEROLLWEIGHT") + UNIT_MAP.getOrDefault(blanckdata.getStr("NUMBERUNIT"), "");
|
|
|
apsProcessOperationOutMaterDo.setOutputmaterial(outputMeter + "*" + blanckdata.getInt("ROLLNUM") + "卷");
|
|
|
apsProcessOperationDo.setPlanoutput("[1]" + outputMeter + "*" + blanckdata.getInt("ROLLNUM") + "卷");
|
|
|
//输出成品
|
|
@@ -473,6 +479,8 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
|
|
|
boolean bool4 = sysMindMappingService.saveOrUpdateBatch(sysMindMappingDos);
|
|
|
|
|
|
if (bool1 && bool2 && bool3 && bool4) {
|
|
|
+ //更新坯料计划的所选工艺路线
|
|
|
+ apsBlankOrderDao.upCraftrouteId(blanckdata.getStr("ID"), craftrouteid);
|
|
|
// r.setCode("200");
|
|
|
// r.putData(apsCraftRouteStepDoList);
|
|
|
return R.ok();
|
|
@@ -626,10 +634,11 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
|
|
|
apsProcessOperationOutMaterDo1.setProlength(lval);
|
|
|
apsProcessOperationOutMaterDo1.setPlanrollnum(planinrall * apsProcessOperationOutMaterDo1.getOutval());
|
|
|
//输入物料的输入单卷重*该输出物料的宽度/输入物料的宽度/该输出物料的横切分卷数
|
|
|
- String singlerollweight = df.format(apsProcessOperationOutMaterDo.getSinglerollweight().multiply(wval == null ? BigDecimal.valueOf(1) : wval).divide(apsProcessOperationOutMaterDo.getProwidth() == null ? BigDecimal.valueOf(1) : apsProcessOperationOutMaterDo.getProwidth(), 2, BigDecimal.ROUND_HALF_UP).divide(new BigDecimal(apsProcessOperationOutMaterDo1.getCrosscutnum().toString()), 2, BigDecimal.ROUND_HALF_UP));
|
|
|
- apsProcessOperationOutMaterDo1.setSinglerollweight(new BigDecimal(singlerollweight));
|
|
|
+// String singlerollweight = df.format(apsProcessOperationOutMaterDo.getSinglerollweight().multiply(wval == null ? BigDecimal.valueOf(1) : wval).divide(apsProcessOperationOutMaterDo.getProwidth() == null ? BigDecimal.valueOf(1) : apsProcessOperationOutMaterDo.getProwidth(), 2, BigDecimal.ROUND_HALF_UP).divide(new BigDecimal(apsProcessOperationOutMaterDo1.getCrosscutnum().toString()), 2, BigDecimal.ROUND_HALF_UP));
|
|
|
+// apsProcessOperationOutMaterDo1.setSinglerollweight(new BigDecimal(singlerollweight));
|
|
|
+ apsProcessOperationOutMaterDo1.setSinglerollweight(apsProcessOperationOutMaterDo.getSinglerollweight());
|
|
|
//输出物料
|
|
|
- String outputMeter = getOutMeterInfo(outProducttype, outMeter, outMetalstate, tval, wval, lval, apsProcessOperationOutMaterDo1.getThickoffset(), apsProcessOperationOutMaterDo1.getWidthoffset(), apsProcessOperationOutMaterDo.getLengthoffset()) + singlerollweight + UNIT_MAP.getOrDefault(apsProcessOperationDo.getNumunit(), "");
|
|
|
+ String outputMeter = getOutMeterInfo(outProducttype, outMeter, outMetalstate, tval, wval, lval, apsProcessOperationOutMaterDo1.getThickoffset(), apsProcessOperationOutMaterDo1.getWidthoffset(), apsProcessOperationOutMaterDo.getLengthoffset()) + apsProcessOperationOutMaterDo.getSinglerollweight() + UNIT_MAP.getOrDefault(apsProcessOperationDo.getNumunit(), "");
|
|
|
apsProcessOperationOutMaterDo1.setOutputmaterial(outputMeter + "*" + (planinrall * apsProcessOperationOutMaterDo1.getOutval()) + "卷");
|
|
|
planoutputList.add(outputMeter + "*" + (planinrall * apsProcessOperationOutMaterDo1.getOutval()) + "卷");
|
|
|
apsProcessOperationOutMaterDo1.setOutmaterrequest(outputMeter);
|