精密物料推启源增加仓库字段
This commit is contained in:
		
							parent
							
								
									e19258381e
								
							
						
					
					
						commit
						78d588077c
					
				|  | @ -25,6 +25,7 @@ import nc.vo.bd.material.MaterialVO; | |||
| import nc.vo.bd.material.plan.MaterialPlanVO; | ||||
| import nc.vo.bd.material.prod.MaterialProdVO; | ||||
| import nc.vo.bd.material.stock.MaterialStockVO; | ||||
| import nc.vo.bd.stordoc.StordocVO; | ||||
| import nc.vo.org.OrgVO; | ||||
| import nc.vo.pub.BusinessException; | ||||
| 
 | ||||
|  | @ -128,7 +129,7 @@ public class MaterialToJmQmsListener implements IBusinessListener { | |||
|             // 1=未启用;2=已启用;3=已停用; | ||||
|             Integer enablestate = vo.getEnablestate(); | ||||
|             String statusCode = (3 == enablestate) ? "1" : "0"; | ||||
|             Map<String, Object> stockMap = MyHelper.getMapValByCondition(MaterialStockVO.getDefaultTableName(), "def3,def4,martype", | ||||
|             Map<String, Object> stockMap = MyHelper.getMapValByCondition(MaterialStockVO.getDefaultTableName(), "def3,def4,martype,pk_stordoc", | ||||
|                     MaterialStockVO.PK_MATERIAL + " = '" + pkMaterial + "' and pk_org = '" + pkOrg1 + "'"); | ||||
|             // 制造件传启源 | ||||
|             if (!"MR".equals(stockMap.get("martype"))) { | ||||
|  | @ -150,6 +151,10 @@ public class MaterialToJmQmsListener implements IBusinessListener { | |||
|                 continue;// 物料标志是产品且缺少产品分类则跳过同步启源 | ||||
|             } | ||||
|             cpfl = defName1; | ||||
|             // Ö÷²Ö¿â | ||||
|             String pk_stordoc = stockMap.get("pk_stordoc") + ""; | ||||
|             String warehouseCode = MyHelper.getStrValByCondition(StordocVO.getDefaultTableName(), StordocVO.CODE, | ||||
|                     StordocVO.PK_STORDOC + " = '" + pk_stordoc + "'"); | ||||
|             // 组装数据 | ||||
|             JSONObject singleObj = new JSONObject(); | ||||
|             // 批次编号,用于唯一标识当前传输的物料数据批次,便于追溯和批量处理 | ||||
|  | @ -169,6 +174,7 @@ public class MaterialToJmQmsListener implements IBusinessListener { | |||
|             contentObj.put("cgjldw", unitMap.get("deputy_unitname")); // 采购计量单位 | ||||
|             contentObj.put("zhxs", unitMap.getOrDefault("convertRate", "1.00")); // 转换系数 | ||||
|             contentObj.put("flag_fq", statusCode); // 1/0 传递1代表物料废弃 | ||||
|             contentObj.put("zcfck", warehouseCode); // Ö÷´æ·Å²Ö¿â | ||||
|             contentObj.put("bz", vo.getMemo()); // 备注信息 | ||||
|             setDefVal(vo, contentObj); | ||||
|             JSONArray contentArr = new JSONArray(); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue