From 2b1f68640ac8168817fa181d4c19909eeef2e486 Mon Sep 17 00:00:00 2001 From: lihao Date: Thu, 25 Sep 2025 08:58:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E6=96=99=E6=A0=A1=E9=AA=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mmpac/pickm/query/PickmDeliverAction.java | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/mmpac/src/client/nccloud/web/mmpac/pickm/query/PickmDeliverAction.java b/mmpac/src/client/nccloud/web/mmpac/pickm/query/PickmDeliverAction.java index 8a87cc79..9bc6991b 100644 --- a/mmpac/src/client/nccloud/web/mmpac/pickm/query/PickmDeliverAction.java +++ b/mmpac/src/client/nccloud/web/mmpac/pickm/query/PickmDeliverAction.java @@ -12,6 +12,7 @@ import java.util.Map; import nc.bs.dao.BaseDAO; import nc.bs.framework.common.InvocationInfoProxy; +import nc.bs.trade.business.HYPubBO; import nc.itf.mmpac.pickm.IPickmBusinessService; import nc.jdbc.framework.processor.ColumnProcessor; import nc.jdbc.framework.processor.MapProcessor; @@ -93,15 +94,55 @@ public class PickmDeliverAction implements ICommonAction { List pks = new ArrayList(); String errormessage=""; + HYPubBO hybo = new HYPubBO(); for(AggPickmVO agg : aggVOs) { + Object GSDM = hybo.findColValue("org_factory", "code", " pk_factory = '" +agg.getParentVO().getPk_org() + "' "); + + if(!GSDM.equals("C013")){ + continue; + } for(PickmItemVO item : (PickmItemVO[])agg.getChildrenVO()) { // 流程生产订单明细表 String id=agg.getParentVO().getVfirstmorowid(); +// 根据是否发货件 + String firstSql = " select cmaterialvid from mm_pickm where cpickmid='" + item.getCpickmid() + "' and dr=0"; + BaseDAO dao = new BaseDAO(); + String hmateral = (String) dao.executeQuery(firstSql, new ColumnProcessor()); + + firstSql="SELECT bd_bom_b.vdef27 FROM bd_bom_b " + + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + + "WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " + + "where ( bd_bom.pk_org = '"+item.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " + + "AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " + + "and bd_bom.dr = 0 and bd_bom.hbcustomized = 'N' and bd_bom.fbomtype != 3 ) " + + "AND bd_bom_b.dr = 0 and bd_bom_b.cmaterialvid='" + item.getCbmaterialvid() + "'"; + String bomcode = (String) dao.executeQuery(firstSql, new ColumnProcessor()); + + if(null==bomcode){ + String secondsql=" SELECT bd_bom_b.vdef27 FROM bd_bom_b " + + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + + "WHERE bd_bom_b.cbomid in (select bd_bom.cbomid from bd_bom bd_bom " + + "WHERE bd_bom.pk_org = '"+item.getPk_org()+"' and bd_bom.hcmaterialid in " + + "(SELECT bd_bom_b.cmaterialvid FROM bd_bom_b " + + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + + "WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " + + "where ( bd_bom.pk_org = '"+item.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " + + "AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " + + "and bd_bom.dr = 0 and bd_bom.hbcustomized = 'N' and bd_bom.fbomtype != 3 ) " + + "AND bisvirtual='Y') AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' " + + "and bd_bom.dr = 0 and bd_bom.hbcustomized = 'N' and bd_bom.fbomtype != 3 ) " + + "AND bd_bom_b.dr = 0 and bd_bom_b.cmaterialvid='"+item.getCbmaterialvid()+"'"; + bomcode = (String) dao.executeQuery(secondsql, new ColumnProcessor()); + } + + if(null == bomcode || "N".equals(bomcode) ){ + continue; + } if(null != id &&!id.isEmpty()){ String sql = "SELECT m.tplanendtime from mm_mo m "+ "WHERE\n" + "\tm.cmoid = '"+id+"' "; - BaseDAO dao = new BaseDAO(); + String data =(String) dao.executeQuery(sql, new ColumnProcessor()); data=data.substring(0,10); UFDate now=new UFDate();