diff --git a/com.connor.chint.wuhan/src/com/connor/chint/yunpi/command/ZxjcController.java b/com.connor.chint.wuhan/src/com/connor/chint/yunpi/command/ZxjcController.java index c66cd32..8e33c44 100644 --- a/com.connor.chint.wuhan/src/com/connor/chint/yunpi/command/ZxjcController.java +++ b/com.connor.chint.wuhan/src/com/connor/chint/yunpi/command/ZxjcController.java @@ -628,8 +628,18 @@ public class ZxjcController { fieldList.add(zt2_MaterialNo==null?"":zt2_MaterialNo); fieldList.add(zt2_unit==null?"":zt2_unit); fieldList.add(tz_bl_quantity==null?"":tz_bl_quantity); + //20240523增加 ZT2_Remark\zt2_DrawingNo 逻辑 + String zt2_DrawingNo = tzItemRevision.getStringProperty("zt2_DrawingNo"); + + if((ZT2_Remark == null || ZT2_Remark.isEmpty()) && (zt2_DrawingNo != null && zt2_DrawingNo.length() > 0)) { + System.out.println("zt2_DrawingNo==="+zt2_DrawingNo); + ZT2_Remark = zt2_DrawingNo; + }else if((zt2_DrawingNo != null && zt2_DrawingNo.length() > 0) && (ZT2_Remark != null && ZT2_Remark.length() > 0)) { + System.out.println("ZT2_Remark===="+ZT2_Remark+" zt2_DrawingNo==="+zt2_DrawingNo); + ZT2_Remark = ZT2_Remark+"/"+zt2_DrawingNo; + } fieldList.add(ZT2_Remark==null?"":ZT2_Remark); - + System.out.println("ZT2_Remark==="+ZT2_Remark); if (zt2_MaterialNo != null && !zt2_MaterialNo.equals("")) { wlMap.put(object_name + zt2_MaterialNo, fieldList); count++; @@ -848,14 +858,14 @@ public class ZxjcController { TCComponentItem item = wlRev.getItem(); String zt2_unit = item.getProperty("zt2_unit"); // 获取物料bomline上的属性 - TCComponentBOMWindowType bomWinType = (TCComponentBOMWindowType) session - .getTypeComponent("BOMWindow"); - TCComponentBOMWindow window = bomWinType.create(null); - TCComponentBOMLine bomLine = window.setWindowTopLine(null, wlRev, null, null); - window.save(); +// TCComponentBOMWindowType bomWinType = (TCComponentBOMWindowType) session +// .getTypeComponent("BOMWindow"); +// TCComponentBOMWindow window = bomWinType.create(null); +// TCComponentBOMLine bomLine = window.setWindowTopLine(null, wlRev, null, null); +// window.save(); // String bl_quantity = bomLine.getStringProperty("bl_quantity"); - String ZT2_Remark = bomLine.getStringProperty("ZT2_Remark"); - window.delete(); + String ZT2_Remark = tcComponentBOMLine.getStringProperty("ZT2_Remark"); + ///window.delete(); // 把值存在list里存入map List fieldList = new ArrayList(); fieldList.add(count + "");// 序号 @@ -864,7 +874,19 @@ public class ZxjcController { fieldList.add(zt2_MaterialNo==null?"":zt2_MaterialNo); fieldList.add(zt2_unit==null?"":zt2_unit); fieldList.add(tz_bl_quantity==null?"":tz_bl_quantity); + //20240523增加 ZT2_Remark\zt2_DrawingNo 逻辑 + String zt2_DrawingNo = tzItemRevision.getStringProperty("zt2_DrawingNo"); + + if((ZT2_Remark == null || ZT2_Remark.isEmpty()) && (zt2_DrawingNo != null && zt2_DrawingNo.length() > 0)) { + System.out.println("zt2_DrawingNo==="+zt2_DrawingNo); + ZT2_Remark = zt2_DrawingNo; + }else if((zt2_DrawingNo != null && zt2_DrawingNo.length() > 0) && (ZT2_Remark != null && ZT2_Remark.length() > 0)) { + System.out.println("ZT2_Remark===="+ZT2_Remark+" zt2_DrawingNo==="+zt2_DrawingNo); + ZT2_Remark = ZT2_Remark+"/"+zt2_DrawingNo; + } fieldList.add(ZT2_Remark==null?"":ZT2_Remark); + System.out.println("ZT2_Remark==="+ZT2_Remark); + if (zt2_MaterialNo != null && !zt2_MaterialNo.equals("")) { wlMap.put(object_name + zt2_MaterialNo, fieldList);