生产订单备料重算后根据 生产订单-备料计划-计划订单-请购单-采购订单-到货单-采购入库 依次更新下游单据
This commit is contained in:
		
							parent
							
								
									0fabec7da4
								
							
						
					
					
						commit
						077343c95a
					
				|  | @ -42,9 +42,28 @@ public class AfterPickmRecalUpdateBuyingreqRule implements IRule<PMOAggVO> { | |||
|                         for (Map<String,Object> map2 : buyingreq) { | ||||
|                             if (new UFDouble((BigDecimal) map2.get("nnum")).compareTo(new UFDouble((BigDecimal)map.get("nplanoutnum"))) >0) { | ||||
|                                 // ¸üÐÂÇ빺µ¥ | ||||
|                                 String sql = "update po_praybill_b set vbdef15='" +map.get("nplanoutnum") + "' where pk_praybill_b='" | ||||
|                                 String sql = "update po_praybill_b set vbdef33='" +map.get("nplanoutnum") + "' where pk_praybill_b='" | ||||
|                                         +map2.get("pk_praybill_b") + "'"; | ||||
|                                 dao.executeUpdate(sql); | ||||
|                                 // 查询采购订单 | ||||
|                                 String ordersql = "select pk_order_b from po_order_b where csourcebid ='" + plo.get("cpoid") + "'  and dr = 0"; | ||||
|                                 List<Map<String,Object>> orders = (List<Map<String,Object>>) dao.executeQuery(ordersql, new MapListProcessor()); | ||||
|                                 for (Map<String,Object> order : orders) { | ||||
|                                         // 更新采购订单 | ||||
|                                         String updateOrderSql = "update po_order_b set vbdef33='" +map.get("nplanoutnum") + "' where pk_order_b='" | ||||
|                                                 +order.get("pk_order_b") + "'"; | ||||
|                                         dao.executeUpdate(updateOrderSql); | ||||
|                                         // 查询到货单 | ||||
|                                         String arriveordersql = "select pk_arriveorder_b from po_arriveorder_b where csourcebid ='" + order.get("pk_order_b") + "'  and dr = 0"; | ||||
|                                         List<Map<String,Object>> arriveorders = (List<Map<String,Object>>) dao.executeQuery(arriveordersql, new MapListProcessor()); | ||||
|                                         for (Map<String,Object> arriveorder : arriveorders) { | ||||
|                                             // 更新到货单 | ||||
|                                             String updatearriveorderSql = "update po_arriveorder_b set vbdef33='" +map.get("nplanoutnum") + "' where pk_arriveorder_b='" | ||||
|                                                     +arriveorder.get("pk_arriveorder_b") + "'"; | ||||
|                                             dao.executeUpdate(updatearriveorderSql); | ||||
|                                         //     已经采购入库的数据不处理 | ||||
|                                         } | ||||
|                                 } | ||||
| 
 | ||||
| 
 | ||||
|                             } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue