根据 生产订单-备料计划-计划订单-请购单-采购订单-到货单-采购入库 依次更新下游单据
This commit is contained in:
parent
80cea4f91e
commit
d2ff8dfb85
|
|
@ -30,17 +30,30 @@ public class AfterPickmRecalUpdateBuyingreqRule implements IRule<PMOAggVO> {
|
||||||
// ²éѯ±¸Áϼƻ®
|
// ²éѯ±¸Áϼƻ®
|
||||||
String pickmsql = "select cpickm_bid,nplanoutnum from mm_pickm_b where cpickmid in ( select cpickmid from mm_pickm where csourcebillrowid='" + pmoid + "' and dr=0) and dr = 0";
|
String pickmsql = "select cpickm_bid,nplanoutnum from mm_pickm_b where cpickmid in ( select cpickmid from mm_pickm where csourcebillrowid='" + pmoid + "' and dr=0) and dr = 0";
|
||||||
List<Map<String,Object>> hmateral = (List<Map<String,Object>>) dao.executeQuery(pickmsql, new MapListProcessor());
|
List<Map<String,Object>> hmateral = (List<Map<String,Object>>) dao.executeQuery(pickmsql, new MapListProcessor());
|
||||||
|
// 몽앴 <EFBFBD>끓땐데-구죕셕뺍-셕뺍땐데-헝뭔데-꽃뭔땐데-돕새데-꽃뭔흙욋 弩늴뫘劤苟踏데앴
|
||||||
for (Map<String,Object> map : hmateral) {
|
for (Map<String,Object> map : hmateral) {
|
||||||
String buyingreqsql = "select pk_praybill_b,nnum from po_praybill_b where csourcebid ='" + map.get("cpickm_bid") + "' and dr = 0";
|
// 꿴璂셕뺍땐데
|
||||||
|
String plosql = "select cpoid from mm_plo where vsrcbid ='" + map.get("cpickm_bid") + "' and dr = 0";
|
||||||
|
List<Map<String,Object>> ploList = (List<Map<String,Object>>) dao.executeQuery(plosql, new MapListProcessor());
|
||||||
|
for (Map<String,Object> plo : ploList) {
|
||||||
|
// 꿴璂헝뭔데
|
||||||
|
String buyingreqsql = "select pk_praybill_b,nnum from po_praybill_b where csourcebid ='" + plo.get("cpoid") + "' and dr = 0";
|
||||||
List<Map<String,Object>> buyingreq = (List<Map<String,Object>>) dao.executeQuery(buyingreqsql, new MapListProcessor());
|
List<Map<String,Object>> buyingreq = (List<Map<String,Object>>) dao.executeQuery(buyingreqsql, new MapListProcessor());
|
||||||
for (Map<String,Object> map2 : buyingreq) {
|
for (Map<String,Object> map2 : buyingreq) {
|
||||||
if (new UFDouble((BigDecimal) map2.get("nnum")).compareTo(new UFDouble((BigDecimal)map.get("nplanoutnum"))) >0) {
|
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 vbdef15='" +map.get("nplanoutnum") + "' where pk_praybill_b='"
|
||||||
+map2.get("pk_praybill_b") + "'";
|
+map2.get("pk_praybill_b") + "'";
|
||||||
dao.executeUpdate(sql);
|
dao.executeUpdate(sql);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (DAOException e) {
|
} catch (DAOException e) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue