内配订单推PLM调整
This commit is contained in:
		
							parent
							
								
									0fce6eb532
								
							
						
					
					
						commit
						affd351c18
					
				| 
						 | 
					@ -3,6 +3,7 @@ package nc.bs.mmpac.pmo.pac0002.bp.rule;
 | 
				
			||||||
import com.alibaba.fastjson.JSONObject;
 | 
					import com.alibaba.fastjson.JSONObject;
 | 
				
			||||||
import com.fasterxml.jackson.databind.ObjectMapper;
 | 
					import com.fasterxml.jackson.databind.ObjectMapper;
 | 
				
			||||||
import com.google.gson.Gson;
 | 
					import com.google.gson.Gson;
 | 
				
			||||||
 | 
					import nc.bs.dao.BaseDAO;
 | 
				
			||||||
import nc.bs.dao.DAOException;
 | 
					import nc.bs.dao.DAOException;
 | 
				
			||||||
import nc.bs.framework.common.InvocationInfoProxy;
 | 
					import nc.bs.framework.common.InvocationInfoProxy;
 | 
				
			||||||
import nc.bs.logging.Log;
 | 
					import nc.bs.logging.Log;
 | 
				
			||||||
| 
						 | 
					@ -56,6 +57,14 @@ public class AfterApproveSyncPLMRule implements IRule<PMOAggVO> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private Map<String, String> configParams;
 | 
					    private Map<String, String> configParams;
 | 
				
			||||||
 | 
					    public BaseDAO dao;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public BaseDAO getDao() {
 | 
				
			||||||
 | 
					        if (dao == null) {
 | 
				
			||||||
 | 
					            dao = new BaseDAO();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return dao;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void process(PMOAggVO[] pmoAggVOS) {
 | 
					    public void process(PMOAggVO[] pmoAggVOS) {
 | 
				
			||||||
| 
						 | 
					@ -117,16 +126,16 @@ public class AfterApproveSyncPLMRule implements IRule<PMOAggVO> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    request.put("name", name);
 | 
					                    request.put("name", name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    request.put("ASUSER34", projectName);
 | 
					                    request.put("asuser34", projectName);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    request.put("ASUSER28", itemVO.getVfirstcode());
 | 
					                    request.put("asuser28", itemVO.getVfirstcode());
 | 
				
			||||||
                    request.put("AB012", itemVO.getNastnum());
 | 
					                    request.put("ab012", itemVO.getNastnum());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    request.put("GSDM", GSDM);
 | 
					                    request.put("gsdm", GSDM);
 | 
				
			||||||
                    request.put("MATERIALSISSUEDATE", itemVO.getVdef17());
 | 
					                    request.put("materialsissuedate", itemVO.getVdef17());
 | 
				
			||||||
                    request.put("MAINASSISTMATERIALSDATE", itemVO.getVdef18());
 | 
					                    request.put("mainassistmaterialsdate", itemVO.getVdef18());
 | 
				
			||||||
                    request.put("ASSISTMATERIALSDATE", itemVO.getVdef19());
 | 
					                    request.put("assistmaterialsdate", itemVO.getVdef19());
 | 
				
			||||||
                    request.put("DRAWINGPICKINGDATE", itemVO.getVdef20()); // 替换为实际字段名,如 getVdef20()
 | 
					                    request.put("drawingpickingdate", itemVO.getVdef20()); // 替换为实际字段名,如 getVdef20()
 | 
				
			||||||
                    // 将组装好的 Map 添加到结果列表
 | 
					                    // 将组装好的 Map 添加到结果列表
 | 
				
			||||||
                    resultList.add(request);
 | 
					                    resultList.add(request);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					@ -153,6 +162,11 @@ public class AfterApproveSyncPLMRule implements IRule<PMOAggVO> {
 | 
				
			||||||
            Map result = gson.fromJson(responseString, Map.class);
 | 
					            Map result = gson.fromJson(responseString, Map.class);
 | 
				
			||||||
            if (!"true".equals(result.get("success").toString())) {
 | 
					            if (!"true".equals(result.get("success").toString())) {
 | 
				
			||||||
                throw new BusinessException(result.get("msg").toString());
 | 
					                throw new BusinessException(result.get("msg").toString());
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                // 调整PLM传输状态
 | 
				
			||||||
 | 
					                String updateSql = "update mm_pmo set def13 = 'Y' where cpmohid = '[cpmohid]'";
 | 
				
			||||||
 | 
					                updateSql = updateSql.replace("[cpmohid]", parentVO.getPrimaryKey());
 | 
				
			||||||
 | 
					                getDao().executeUpdate(updateSql);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue