|
|
|
@ -1237,12 +1237,15 @@ public class YSR8_ECN1RevisionMasterForm extends AbstractRendering {
|
|
|
|
|
System.out.println("1_afterMap ["+key+"] : ["+afterMap.get(key)+"]");
|
|
|
|
|
if (afterMap.containsKey(key)) {
|
|
|
|
|
System.out.println("1");
|
|
|
|
|
Object compResult = TCUtil.compareBOMLineQuantity(beforeMap.get(key), afterMap.get(key));
|
|
|
|
|
if (compResult instanceof double[]) {
|
|
|
|
|
System.out.println("2");
|
|
|
|
|
double[] ds = (double[]) compResult;
|
|
|
|
|
resultMap.put(afterMap.get(key), ds[1] - ds[0]);
|
|
|
|
|
}
|
|
|
|
|
// Object compResult = TCUtil.compareBOMLineQuantity(beforeMap.get(key), afterMap.get(key));//原生方法:根据“安装位置限定”计算更改前后零部件的数量
|
|
|
|
|
// if (compResult instanceof double[]) {
|
|
|
|
|
// System.out.println("2");
|
|
|
|
|
// double[] ds = (double[]) compResult;
|
|
|
|
|
// resultMap.put(afterMap.get(key), ds[1] - ds[0]);
|
|
|
|
|
// }
|
|
|
|
|
//新增的逻辑
|
|
|
|
|
double[] ds = getBOMLineQuantity(beforeMap.get(key),afterMap.get(key));
|
|
|
|
|
resultMap.put(afterMap.get(key), ds[1] - ds[0]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for (Map.Entry<String, TCComponentBOMLine> afterEntry : afterMap.entrySet()) {
|
|
|
|
@ -1373,6 +1376,27 @@ public class YSR8_ECN1RevisionMasterForm extends AbstractRendering {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取两个bomline的Quantity数量,并返回一个数组
|
|
|
|
|
* @param tcComponentBOMLine
|
|
|
|
|
* @param tcComponentBOMLine2
|
|
|
|
|
* @return
|
|
|
|
|
* @throws TCException
|
|
|
|
|
*/
|
|
|
|
|
private double[] getBOMLineQuantity(TCComponentBOMLine tcComponentBOMLine, TCComponentBOMLine tcComponentBOMLine2) throws TCException {
|
|
|
|
|
System.out.println("getBOMLineQuantity开始执行···");
|
|
|
|
|
if (tcComponentBOMLine == null || tcComponentBOMLine2 == 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");
|
|
|
|
|
System.out.println(targetName+"对应的bomline前后数量对比=【"+bl_quantity1+":"+bl_quantity2+"】");
|
|
|
|
|
double[] re = {bl_quantity1,bl_quantity2};
|
|
|
|
|
return re;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void countYsr8_SubTotalExpense() {
|
|
|
|
|
double ysr8_SubTotalExpense = 0.0;
|
|
|
|
|
FormUtil.JTableInfo ci = (FormUtil.JTableInfo) fu.allComponentInfos.get("ecn1.141.11.11");
|
|
|
|
|