内配订单自动推PLM调整
This commit is contained in:
		
							parent
							
								
									30f33c6c98
								
							
						
					
					
						commit
						44552c4e40
					
				| 
						 | 
					@ -81,14 +81,14 @@ public class AfterApproveSyncPLMRule implements IRule<PMOAggVO> {
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // 推送到思普PLM系统
 | 
					            // 推送到思普PLM系统
 | 
				
			||||||
            pushToRZMOM(filteredOrders);
 | 
					            pushToSpPlm(filteredOrders);
 | 
				
			||||||
        } catch (Exception e) {
 | 
					        } catch (Exception e) {
 | 
				
			||||||
            logDl.error("同步生产订单到SPPLM系统失败: " + e.getMessage());
 | 
					            logDl.error("同步生产订单到SPPLM系统失败: " + e.getMessage());
 | 
				
			||||||
            ExceptionUtils.wrappException(e);
 | 
					            ExceptionUtils.wrappException(e);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void pushToRZMOM(List<PMOAggVO> array) throws BusinessException, IOException {
 | 
					    private void pushToSpPlm(List<PMOAggVO> array) throws BusinessException, IOException {
 | 
				
			||||||
        List<Map<String, Object>> resultList = new ArrayList<>();
 | 
					        List<Map<String, Object>> resultList = new ArrayList<>();
 | 
				
			||||||
        if (array == null || array.size() == 0) {
 | 
					        if (array == null || array.size() == 0) {
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
| 
						 | 
					@ -119,14 +119,17 @@ public class AfterApproveSyncPLMRule implements IRule<PMOAggVO> {
 | 
				
			||||||
                    Object no = hybo.findColValue("bd_material", "code", "pk_material = '" + itemVO.getCmaterialvid() + "' ");
 | 
					                    Object no = hybo.findColValue("bd_material", "code", "pk_material = '" + itemVO.getCmaterialvid() + "' ");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    Object name = hybo.findColValue("bd_material", "name", "pk_material = '" + itemVO.getCmaterialvid() + "' ");
 | 
					                    Object name = hybo.findColValue("bd_material", "name", "pk_material = '" + itemVO.getCmaterialvid() + "' ");
 | 
				
			||||||
                    Object projectName = hybo.findColValue("bd_project", "project_name", " pk_project = '" + itemVO.getCprojectid() + "' ");
 | 
					 | 
				
			||||||
                    Object GSDM = hybo.findColValue("org_factory", "code", " pk_factory = '" + parentVO.getPk_org() + "' ");
 | 
					                    Object GSDM = hybo.findColValue("org_factory", "code", " pk_factory = '" + parentVO.getPk_org() + "' ");
 | 
				
			||||||
 | 
					                    Map<String, Object> projectMap = MyHelper.getMapValByCondition("bd_project", "project_code,project_name",
 | 
				
			||||||
 | 
					                            "pk_project = '" + itemVO.getCprojectid() + "' ");
 | 
				
			||||||
                    request.put("no", no);
 | 
					                    request.put("no", no);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    request.put("name", name);
 | 
					                    request.put("name", name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    request.put("asuser34", projectName);
 | 
					                    if (!projectMap.isEmpty()) {
 | 
				
			||||||
 | 
					                        request.put("aa003", projectMap.get("project_code"));
 | 
				
			||||||
 | 
					                        request.put("asuser34", projectMap.get("project_name"));
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    request.put("asuser28", itemVO.getVfirstcode());
 | 
					                    request.put("asuser28", itemVO.getVfirstcode());
 | 
				
			||||||
                    request.put("ab012", itemVO.getNastnum());
 | 
					                    request.put("ab012", itemVO.getNastnum());
 | 
				
			||||||
| 
						 | 
					@ -185,9 +188,11 @@ public class AfterApproveSyncPLMRule implements IRule<PMOAggVO> {
 | 
				
			||||||
            if (MyHelper.checkIfDldzOrg(orgCode, configParams)) {
 | 
					            if (MyHelper.checkIfDldzOrg(orgCode, configParams)) {
 | 
				
			||||||
                continue;
 | 
					                continue;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            String ctrantypeid = pmoAggVO.getParentVO().getCtrantypeid();
 | 
				
			||||||
 | 
					            String groupId = InvocationInfoProxy.getInstance().getGroupId();
 | 
				
			||||||
            Object pk_billtypecode = hybo.findColValue("bd_billtype", "pk_billtypecode", "  istransaction = 'Y'  and nvl ( islock, 'N' ) = 'N' and parentbilltype = '55A2' and pk_group = '"
 | 
					            Object pk_billtypecode = hybo.findColValue("bd_billtype", "pk_billtypecode", "  istransaction = 'Y'  and nvl ( islock, 'N' ) = 'N' and parentbilltype = '55A2' and pk_group = '"
 | 
				
			||||||
                    + InvocationInfoProxy.getInstance().getGroupId() + "' and  pk_billtypeid = '" + pmoAggVO.getParentVO().getCtrantypeid() + "' ");
 | 
					                    + groupId + "' and  pk_billtypeid = '" + ctrantypeid + "' ");
 | 
				
			||||||
            if (pk_billtypecode.equals("55A2-Cxx-08")) {
 | 
					            if ("55A2-Cxx-08".equals(pk_billtypecode)) {
 | 
				
			||||||
                filteredOrders.add(pmoAggVO);
 | 
					                filteredOrders.add(pmoAggVO);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue