Parcourir la source

工序计划输出卷数调整

DLC il y a 1 an
Parent
commit
9496984bf2

+ 1 - 1
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/dao/ApsProductionOrderDao.java

@@ -33,7 +33,7 @@ public interface ApsProductionOrderDao extends BaseMapper<ApsProductionOrderDo>
 
     @Select("select o.ID,o.ORDERNO,o.CREATEUSERID,o.CREATEUSERNAME,u.EMAIL as MODIFYUSERNAME from aps_production_order o\n" +
             "left join sys_user u on o.CREATEUSERID=u.ID and u.DELETED='0'\n" +
-            "where o.DELETED='0' and IFNULL(o.ORDERNO,'')!='' and (o.AUDITSTATUS='待提交' or o.AUDITSTATUS='待计划评审' or o.AUDITSTATUS='待技术评审')\n" +
+            "where o.DELETED='0' and IFNULL(o.ORDERNO,'')!='' and o.AUDITSTATUS!='已发布计划' and o.AUDITSTATUS!='已完工关闭'\n" +
             "\tand ((IFNULL(o.CHANGEDATE,'')='' and TIMESTAMPDIFF(HOUR,o.ORDERDATE,NOW())>48) or (IFNULL(o.CHANGEDATE,'')!='' and TIMESTAMPDIFF(HOUR,o.CHANGEDATE,NOW())>48))")
     List<ApsProductionOrderDo> getOrderOuttimeAudit();
 

+ 9 - 12
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsProcessOperationServiceImpl.java

@@ -316,10 +316,9 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
 //                            apsProcessOperationOutMaterDo.setCrosscutnum(1);
                             apsProcessOperationOutMaterDo.setOutval(1);
                             apsProcessOperationOutMaterDo.setPlanrollnum(apsProcessOperationDo.getPlanprocessrall());
-                            //输入物料的输入单卷重*该输出物料的宽度/输入物料的宽度/该输出物料的横切分卷数
-//                            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());
+                            //输入单卷重*输出宽度/输入宽度
+                            String singlerollweight = df.format(outMaterDo.getSinglerollweight().multiply(wval == null ? BigDecimal.valueOf(1) : wval).divide(outMaterDo.getProwidth() == null ? BigDecimal.valueOf(1) : outMaterDo.getProwidth(), 3, BigDecimal.ROUND_HALF_UP));
+                            apsProcessOperationOutMaterDo.setSinglerollweight(new BigDecimal(singlerollweight));
                             apsProcessOperationOutMaterDo.setNumunit(blanckdata.getStr("NUMBERUNIT"));
                             apsProcessOperationOutMaterDo.setPlanstockrollnum(0);
                             //没有后道工序作业,计划成品卷数=计划输出卷数-计划备料卷数
@@ -476,10 +475,9 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
 //                        apsProcessOperationOutMaterDo.setCrosscutnum(1);
                         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));
-                        apsProcessOperationOutMaterDo.setSinglerollweight(blanckdata.getBigDecimal("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"), 3, BigDecimal.ROUND_HALF_UP));
+                        apsProcessOperationOutMaterDo.setSinglerollweight(new BigDecimal(singlerollweight));
                         apsProcessOperationOutMaterDo.setNumunit(blanckdata.getStr("NUMBERUNIT"));
                         apsProcessOperationOutMaterDo.setPlanstockrollnum(0);
                         apsProcessOperationOutMaterDo.setPlanprodrollnum(0);
@@ -848,10 +846,9 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
                         BigDecimal lval = changeSize(apsProcessOperationOutMaterDo.getProlength(), apsProcessOperationOutMaterDo1.getLengthrule(), apsProcessOperationOutMaterDo1.getLengthchange());
                         apsProcessOperationOutMaterDo1.setProlength(lval);
                         apsProcessOperationOutMaterDo1.setPlanrollnum(apsProcessOperationDo.getPlanprocessrall() * 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));
-                        apsProcessOperationOutMaterDo1.setSinglerollweight(apsProcessOperationOutMaterDo.getSinglerollweight());
+                        //输入单卷重*输出宽度/输入宽度
+                        String singlerollweight = df.format(apsProcessOperationOutMaterDo.getSinglerollweight().multiply(wval == null ? BigDecimal.valueOf(1) : wval).divide(apsProcessOperationOutMaterDo.getProwidth() == null ? BigDecimal.valueOf(1) : apsProcessOperationOutMaterDo.getProwidth(), 3, BigDecimal.ROUND_HALF_UP));
+                        apsProcessOperationOutMaterDo1.setSinglerollweight(new BigDecimal(singlerollweight));
                         //输出物料
                         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()) + "卷");