diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java index 60fba57f..4b015980 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java @@ -817,9 +817,9 @@ public class QcCheckTaskIncomeServiceImpl implements unqualified.setSfgyswt(qcCheckTaskIncome.getSfgyswt()); unqualified.setUser(qcCheckTaskIncome.getUpdateBy()); //申请人- - unqualified.setSqr(qcCheckTaskIncome.getSqr()); + unqualified.setSqr("MSL%23"+qcCheckTaskIncome.getSqr()); //申请部门 - unqualified.setSqbm(qcCheckTaskIncome.getSqbm()); + unqualified.setSqbm("MSD%23"+qcCheckTaskIncome.getSqbm()); //实际生产数量 unqualified.setQuality(qcCheckTaskIncome.getQuality().toString()); //发现地点 @@ -828,9 +828,9 @@ public class QcCheckTaskIncomeServiceImpl implements unqualified.setSfxyzg(qcCheckTaskIncome.getSfxyzg()); if(qcCheckTaskIncome.getSfgyswt().equals("0")){//是 //qc主管 - unqualified.setPgzg(qcCheckTaskIncome.getPgzg()); + unqualified.setPgzg("MSL%23"+qcCheckTaskIncome.getPgzg()); //质量主管 - unqualified.setPgzr(qcCheckTaskIncome.getPgzr()); + unqualified.setPgzr("MSL%23"+qcCheckTaskIncome.getPgzr()); } //是否供应商问题 unqualified.setSfgyswt(qcCheckTaskIncome.getSfgyswt()); @@ -865,15 +865,15 @@ public class QcCheckTaskIncomeServiceImpl implements //检验编号 unqualified.setCheckNo(qcCheckTaskIncome.getCheckNo()); //仓储报检人-李爱娟 - unqualified.setCzbjr(qcCheckTaskIncome.getCzbjr()); + unqualified.setCzbjr("MSL%23"+qcCheckTaskIncome.getCzbjr()); //物料类别 unqualified.setMaterialType(qcCheckTaskIncome.getMaterialType()); //物料来源 unqualified.setMaterialFrom(qcCheckTaskIncome.getMaterialFrom()); //QC主管-朱继新 - unqualified.setQczg(qcCheckTaskIncome.getQczg()); + unqualified.setQczg("MSL%23"+qcCheckTaskIncome.getQczg()); //申请人- - unqualified.setSqr(qcCheckTaskIncome.getSqr()); + unqualified.setSqr("MSL%23"+qcCheckTaskIncome.getSqr()); unqualified.setUser(qcCheckTaskIncome.getUpdateBy()); //转出方 unqualified.setZcf(qcCheckTaskIncome.getZcf()); diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java index 6321d131..b65c1b96 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java @@ -177,7 +177,6 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService * \"supplier\":\"广东高顺印刷包装有限公司\",\"CHARG\":\"null\",\"comeQty\":\"1117\", * \"DW\":\"ST\",\"JYBH\":\"202404180042\",\"BJY\":\"202404180042\",\"WLLY\":\"2\", * \"memo\":\"不合格\",\"PZGLBZG\":\"不合格\"}","user":"999999","requestLevel":0,"workflowId":113454} - */ private AjaxResult createLLOA(QcCheckUnqualified task){ @@ -306,6 +305,29 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService "SFGYSWT":"1" *是否供应商问题 1非供应商问题 0是供应商问题 }" } + + http://oa.lanju.cn/lanju/oa/submitOa.jsp? + user=9999999&requestLevel=0& + requestName=品质异常流程测试& + workflowId=113455& + mainObject={"CPMC":"榄菊加大盘野菊花蚊香塑料筒装(18装)(36单圈)", + "CPBM":"000000010101046600", + "SQBM":"0", + "SQR":"MSL%23999999", + "SQSJ":"2024-07-18", + "SCCJ":"MSD%2310000769", + "SCPH":"LJ20240705ABACEQ", + "SCSL":100, + "FXDD":"测试发现地点", + "FXRQ":"2024-07-18 16:26:45", + "BH":"202407040001", + "YCFW":"1", + "PZYCMS":"zxl测试不合格发起oa", + "Notes":"", + "SFXYZG":"0", + "PGZG":"MSL%23001539", + "PGZR":"MSL%23001539", + "SFGYSWT":"0"} * @param task * @return */ diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java index 48bc40b8..b4314e0d 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java @@ -632,9 +632,20 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { public static double calculateCpk(double[] data, double USL, double LSL) { double mean = calculateMean(data); double stdDev = calculateStandardDeviation(data); - double cpkUpper = (USL - mean) / (3 * stdDev); - double cpkLower = (mean - LSL) / (3 * stdDev); - return Math.min(cpkUpper, cpkLower); + if(new BigDecimal(USL).compareTo(BigDecimal.ZERO)>0 && new BigDecimal(LSL).compareTo(BigDecimal.ZERO)>0){ + double cpkUpper = (USL - mean) / (3 * stdDev); + double cpkLower = (mean - LSL) / (3 * stdDev); + return Math.min(cpkUpper, cpkLower); + }else if(new BigDecimal(USL).compareTo(BigDecimal.ZERO)==0 && new BigDecimal(LSL).compareTo(BigDecimal.ZERO)>0){ + //无上限 + double cpkLower = (mean - LSL) / (3 * stdDev); + return cpkLower; + }else if(new BigDecimal(USL).compareTo(BigDecimal.ZERO)>0 && new BigDecimal(LSL).compareTo(BigDecimal.ZERO)==0){ + //无下限 + double cpkUpper = (USL - mean) / (3 * stdDev); + return cpkUpper; + } + return 0; } // 计算均值 public static double calculateMean(double[] data) { @@ -736,5 +747,8 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { return days; } - + public static void main(String args[]){ + double a = 0.01; + System.out.println(new BigDecimal(a).compareTo(BigDecimal.ZERO)); + } } diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml index a02a26d8..3e5cbec5 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml @@ -574,7 +574,7 @@ where del_flag='0' and sample_code like concat(#{sampleCode},'%')