发料校验增加校验
This commit is contained in:
parent
b40d1ef9fa
commit
2b1f68640a
|
|
@ -12,6 +12,7 @@ import java.util.Map;
|
||||||
|
|
||||||
import nc.bs.dao.BaseDAO;
|
import nc.bs.dao.BaseDAO;
|
||||||
import nc.bs.framework.common.InvocationInfoProxy;
|
import nc.bs.framework.common.InvocationInfoProxy;
|
||||||
|
import nc.bs.trade.business.HYPubBO;
|
||||||
import nc.itf.mmpac.pickm.IPickmBusinessService;
|
import nc.itf.mmpac.pickm.IPickmBusinessService;
|
||||||
import nc.jdbc.framework.processor.ColumnProcessor;
|
import nc.jdbc.framework.processor.ColumnProcessor;
|
||||||
import nc.jdbc.framework.processor.MapProcessor;
|
import nc.jdbc.framework.processor.MapProcessor;
|
||||||
|
|
@ -93,15 +94,55 @@ public class PickmDeliverAction implements ICommonAction {
|
||||||
|
|
||||||
List<String> pks = new ArrayList();
|
List<String> pks = new ArrayList();
|
||||||
String errormessage="";
|
String errormessage="";
|
||||||
|
HYPubBO hybo = new HYPubBO();
|
||||||
for(AggPickmVO agg : aggVOs) {
|
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()) {
|
for(PickmItemVO item : (PickmItemVO[])agg.getChildrenVO()) {
|
||||||
// Á÷³ÌÉú²ú¶©µ¥Ã÷ϸ±í
|
// Á÷³ÌÉú²ú¶©µ¥Ã÷ϸ±í
|
||||||
String id=agg.getParentVO().getVfirstmorowid();
|
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()){
|
if(null != id &&!id.isEmpty()){
|
||||||
String sql = "SELECT m.tplanendtime from mm_mo m "+
|
String sql = "SELECT m.tplanendtime from mm_mo m "+
|
||||||
"WHERE\n" +
|
"WHERE\n" +
|
||||||
"\tm.cmoid = '"+id+"' ";
|
"\tm.cmoid = '"+id+"' ";
|
||||||
BaseDAO dao = new BaseDAO();
|
|
||||||
String data =(String) dao.executeQuery(sql, new ColumnProcessor());
|
String data =(String) dao.executeQuery(sql, new ColumnProcessor());
|
||||||
data=data.substring(0,10);
|
data=data.substring(0,10);
|
||||||
UFDate now=new UFDate();
|
UFDate now=new UFDate();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue