diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/cn/com/ebewin/ysr/form/YSR8_ECN1RevisionMasterForm.java b/src/cn/com/ebewin/ysr/form/YSR8_ECN1RevisionMasterForm.java index 0c6a905..db2b299 100644 --- a/src/cn/com/ebewin/ysr/form/YSR8_ECN1RevisionMasterForm.java +++ b/src/cn/com/ebewin/ysr/form/YSR8_ECN1RevisionMasterForm.java @@ -1245,6 +1245,11 @@ public class YSR8_ECN1RevisionMasterForm extends AbstractRendering { // } //新增的逻辑 double[] ds = getBOMLineQuantity(beforeMap.get(key),afterMap.get(key)); + System.out.println("对象:["+beforeMap.get(key)+"]变更前的数量=["+ds[0]+"],变更后的数量=["+ds[1]+"]"); + double changeNum = ds[1] - ds[0]; + if (changeNum == 0) { + continue; + } resultMap.put(afterMap.get(key), ds[1] - ds[0]); } } @@ -1378,22 +1383,24 @@ public class YSR8_ECN1RevisionMasterForm extends AbstractRendering { /** * 获取两个bomline的Quantity数量,并返回一个数组 - * @param tcComponentBOMLine - * @param tcComponentBOMLine2 + * @param beforeBOMLine 前 + * @param afterBOMLine2 后 * @return * @throws TCException */ - private double[] getBOMLineQuantity(TCComponentBOMLine tcComponentBOMLine, TCComponentBOMLine tcComponentBOMLine2) throws TCException { + private double[] getBOMLineQuantity(TCComponentBOMLine beforeBOMLine, TCComponentBOMLine afterBOMLine2) throws TCException { System.out.println("getBOMLineQuantity开始执行···"); - if (tcComponentBOMLine == null || tcComponentBOMLine2 == null) { + if (beforeBOMLine == null || afterBOMLine2 == null) { System.out.println("getBOMLineQuantity入参异常:为null"); return null; } - String targetName = tcComponentBOMLine.getItem().getStringProperty("object_string"); - double bl_quantity1 = tcComponentBOMLine.getDoubleProperty("bl_quantity"); - double bl_quantity2 = tcComponentBOMLine2.getDoubleProperty("bl_quantity"); + String targetName = beforeBOMLine.getItem().getStringProperty("object_string"); + String bl_quantity1 = beforeBOMLine.getStringProperty("bl_quantity"); + String bl_quantity2 = afterBOMLine2afterBOMLine2.getStringProperty("bl_quantity"); + double bl1 = Double.parseDouble(bl_quantity1); + double bl2 = Double.parseDouble(bl_quantity2); System.out.println(targetName+"对应的bomline前后数量对比=【"+bl_quantity1+":"+bl_quantity2+"】"); - double[] re = {bl_quantity1,bl_quantity2}; + double[] re = {bl1, bl2}; return re; }