备料计划领料和下达优化

This commit is contained in:
lihao 2025-09-28 10:17:17 +08:00
parent 93ef0d982a
commit 1ebc5d225c
4 changed files with 86 additions and 53 deletions

View File

@ -75,7 +75,7 @@ public class PickmCheckIsToAction implements ICommonAction {
String bomcode = null; String bomcode = null;
if ("1".equals(type)) { // 请购单查询逻辑 if ("1".equals(type)) { // 请购单查询逻辑
sql="SELECT bd_defdoc.code FROM bd_bom_b " + sql="SELECT bd_defdoc.code FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " + "WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " +
"where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " + "where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " +
"AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " + "AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " +
@ -84,7 +84,7 @@ public class PickmCheckIsToAction implements ICommonAction {
bomcode = (String) dao.executeQuery(sql, new ColumnProcessor()); bomcode = (String) dao.executeQuery(sql, new ColumnProcessor());
} else if ("2".equals(type)) { // 生产订单查询逻辑 } else if ("2".equals(type)) { // 生产订单查询逻辑
sql="SELECT bd_defdoc.code FROM bd_bom_b " + sql="SELECT bd_defdoc.code FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " + "WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " +
"where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " + "where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " +
"AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " + "AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " +
@ -97,11 +97,11 @@ public class PickmCheckIsToAction implements ICommonAction {
if (null == bomcode) { if (null == bomcode) {
if ("1".equals(type)) { // 请购单二次查询 if ("1".equals(type)) { // 请购单二次查询
String secondsql=" SELECT bd_defdoc.code FROM bd_bom_b " + String secondsql=" SELECT bd_defdoc.code FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select bd_bom.cbomid from bd_bom bd_bom " + "WHERE bd_bom_b.cbomid in (select bd_bom.cbomid from bd_bom bd_bom " +
"WHERE bd_bom.pk_org = '"+child.getPk_org()+"' and bd_bom.hcmaterialid in " + "WHERE bd_bom.pk_org = '"+child.getPk_org()+"' and bd_bom.hcmaterialid in " +
"(SELECT bd_bom_b.cmaterialvid FROM bd_bom_b " + "(SELECT bd_bom_b.cmaterialvid FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " + "WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " +
"where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " + "where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " +
"AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " + "AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " +
@ -112,11 +112,11 @@ public class PickmCheckIsToAction implements ICommonAction {
bomcode = (String) dao.executeQuery(secondsql, new ColumnProcessor()); bomcode = (String) dao.executeQuery(secondsql, new ColumnProcessor());
} else if ("2".equals(type)) { // 生产订单二次查询 } else if ("2".equals(type)) { // 生产订单二次查询
String secondsql=" SELECT bd_defdoc.code FROM bd_bom_b " + String secondsql=" SELECT bd_defdoc.code FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select bd_bom.cbomid from bd_bom bd_bom " + "WHERE bd_bom_b.cbomid in (select bd_bom.cbomid from bd_bom bd_bom " +
"WHERE bd_bom.pk_org = '"+child.getPk_org()+"' and bd_bom.hcmaterialid in " + "WHERE bd_bom.pk_org = '"+child.getPk_org()+"' and bd_bom.hcmaterialid in " +
"(SELECT bd_bom_b.cmaterialvid FROM bd_bom_b " + "(SELECT bd_bom_b.cmaterialvid FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " + "WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " +
"where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " + "where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " +
"AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " + "AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " +
@ -127,28 +127,51 @@ public class PickmCheckIsToAction implements ICommonAction {
bomcode = (String) dao.executeQuery(secondsql, new ColumnProcessor()); bomcode = (String) dao.executeQuery(secondsql, new ColumnProcessor());
} }
} }
if(bomcode != null && !bomcode.equals("")) {
// 判断是否为不符合条件的数据根据类型可能有不同判断标准 if(bomcode.equals(type)){
if (null != bomcode && "2".equals(bomcode)) { isValid = false; // 不符合条件
isValid = false; // 采购件不符合 }
} else if (!(null != bomcode && "1".equals(bomcode))) { }else{
// 检查物料类型可根据订单类型添加不同判断 // 检查物料中的物料类型可根据订单类型添加不同判断
sql = "select martype from bd_materialstock where pk_material = '" + child.getCbmaterialvid() + "' and pk_org = '" + child.getPk_org() + "' and dr = 0"; sql = "select martype from bd_materialstock where pk_material = '" + child.getCbmaterialvid() + "' and pk_org = '" + child.getPk_org() + "' and dr = 0";
String matType = (String) dao.executeQuery(sql, new ColumnProcessor()); String matType = (String) dao.executeQuery(sql, new ColumnProcessor());
// 请购单和生产订单可能有不同的物料类型过滤标准 // 请购单和生产订单可能有不同的物料类型过滤标准
if ("1".equals(type)) { if ("2".equals(type)) {
// 请购单非制造件或PR类型不符合 // 请购单非制造件或PR类型不符合
if (null == matType || "PR".equals(matType) || "".equals(matType)) { if (null == matType || "PR".equals(matType) || "".equals(matType)) {
isValid = false; isValid = false;
} }
} else if ("2".equals(type)) { } else if ("1".equals(type)) {
// 生产订单可能有更严格的过滤条件 // 生产订单可能有更严格的过滤条件
if (null == matType || "PR".equals(matType) || "".equals(matType) || "MO".equals(matType)) { if (null == matType || "MR".equals(matType) || "".equals(matType)) {
isValid = false; isValid = false;
} }
} }
} }
// // 判断是否为不符合条件的数据根据类型可能有不同判断标准
// if (null != bomcode && "2".equals(bomcode)) {
// isValid = false; // 采购件不符合
// } else if (!(null != bomcode && "1".equals(bomcode))) {
// // 检查物料类型可根据订单类型添加不同判断
// sql = "select martype from bd_materialstock where pk_material = '" + child.getCbmaterialvid() + "' and pk_org = '" + child.getPk_org() + "' and dr = 0";
// String matType = (String) dao.executeQuery(sql, new ColumnProcessor());
//
// // 请购单和生产订单可能有不同的物料类型过滤标准
// if ("2".equals(type)) {
// // 请购单非制造件或PR类型不符合
// if (null == matType || "PR".equals(matType) || "".equals(matType)) {
// isValid = false;
// }
// } else if ("1".equals(type)) {
// // 生产订单可能有更严格的过滤条件
// if (null == matType || "MR".equals(matType) || "".equals(matType)) {
// isValid = false;
// }
// }
// }
} else { } else {
// 有物料类型时的判断 // 有物料类型时的判断
String sql = "SELECT bd_defdoc.code FROM bd_defdoc where bd_defdoc.pk_defdoc = '" + materalType + "'"; String sql = "SELECT bd_defdoc.code FROM bd_defdoc where bd_defdoc.pk_defdoc = '" + materalType + "'";

View File

@ -203,7 +203,7 @@ public class PickmToBuyingreqAction implements ICommonAction {
BaseDAO dao = new BaseDAO(); BaseDAO dao = new BaseDAO();
dao.executeUpdate(sql); dao.executeUpdate(sql);
} }
// update mm_pickm_b set vbdef30='N' where mm_pickm_b.cpickm_bid='1001A11000000Z7F1F7V'
// 增加isFromBid参数标识是否来自cpickmbids查询 // 增加isFromBid参数标识是否来自cpickmbids查询
public AggPickmVO[] processAggVOs(AggPickmVO[] aggVOs, boolean isFromBid) throws DAOException { public AggPickmVO[] processAggVOs(AggPickmVO[] aggVOs, boolean isFromBid) throws DAOException {
List<AggPickmVO> resultList = new ArrayList<>(); List<AggPickmVO> resultList = new ArrayList<>();
@ -247,7 +247,7 @@ public class PickmToBuyingreqAction implements ICommonAction {
String hmateral = (String) dao.executeQuery(sql, new ColumnProcessor()); String hmateral = (String) dao.executeQuery(sql, new ColumnProcessor());
sql="SELECT bd_defdoc.code FROM bd_bom_b " + sql="SELECT bd_defdoc.code FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " + "WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " +
"where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " + "where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " +
"AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " + "AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " +
@ -257,11 +257,11 @@ public class PickmToBuyingreqAction implements ICommonAction {
if(null==bomcode){ if(null==bomcode){
String secondsql=" SELECT bd_defdoc.code FROM bd_bom_b " + String secondsql=" SELECT bd_defdoc.code FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select bd_bom.cbomid from bd_bom bd_bom " + "WHERE bd_bom_b.cbomid in (select bd_bom.cbomid from bd_bom bd_bom " +
"WHERE bd_bom.pk_org = '"+child.getPk_org()+"' and bd_bom.hcmaterialid in " + "WHERE bd_bom.pk_org = '"+child.getPk_org()+"' and bd_bom.hcmaterialid in " +
"(SELECT bd_bom_b.cmaterialvid FROM bd_bom_b " + "(SELECT bd_bom_b.cmaterialvid FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " + "WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " +
"where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " + "where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " +
"AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " + "AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " +

View File

@ -19,6 +19,7 @@ import nc.vo.mmpac.pmo.pac0002.entity.PMOAggVO;
import nc.vo.mmpac.pmo.pac0002.entity.PMOHeadVO; import nc.vo.mmpac.pmo.pac0002.entity.PMOHeadVO;
import nc.vo.mmpac.pmo.pac0002.entity.PMOItemVO; import nc.vo.mmpac.pmo.pac0002.entity.PMOItemVO;
import nc.vo.pu.m20.entity.PraybillHeaderVO; import nc.vo.pu.m20.entity.PraybillHeaderVO;
import nc.vo.pu.m20.entity.PraybillItemVO;
import nc.vo.pu.m20.entity.PraybillVO; import nc.vo.pu.m20.entity.PraybillVO;
import nc.vo.pub.AggregatedValueObject; import nc.vo.pub.AggregatedValueObject;
import nc.vo.pub.BusinessException; import nc.vo.pub.BusinessException;
@ -210,31 +211,37 @@ public class PickmToPmo implements ICommonAction {
} }
} }
List<PMOAggVO> resultList = new ArrayList<>(); List<PMOAggVO> resultList = new ArrayList<>();
Map<Object, List<PMOAggVO>> groupMap = new HashMap<>(); // // 使用特定标识表示采购员为空的情况
// final String EMPTY_BUYER_KEY = "EMPTY_BUYER";
for (PMOAggVO vo : inVOS) { // Map<String, List<PMOItemVO>> groupMap = new HashMap<>();
Object pk_org = vo.getParentVO().getPk_org(); //
groupMap.computeIfAbsent(pk_org, k -> new ArrayList<>()).add(vo); // // 根据采购员分单
} // for (PMOAggVO vo : inVOS) {
for (Map.Entry<Object, List<PMOAggVO>> entry : groupMap.entrySet()) { // PMOItemVO[] praybillItemVOS = vo.getChildrenVO();
List<PMOAggVO> group = entry.getValue(); // for (PMOItemVO praybillItemVO : praybillItemVOS) {
// String pk_material = praybillItemVO.get();
List<PMOItemVO> mergedChildren = new ArrayList<PMOItemVO>(); //
for (PMOAggVO vo : group) { // String groupKey = MMValueCheck.isEmpty(pk_material) ? EMPTY_BUYER_KEY : pk_material;
for (PMOItemVO child : vo.getChildrenVO()) { //
mergedChildren.add(child); // groupMap.computeIfAbsent(groupKey, k -> new ArrayList<>()).add(praybillItemVO);
} // }
} // }
if(mergedChildren.isEmpty()){ // // 为每个分组创建新的请购单
continue; // for (Map.Entry<String, List<PMOItemVO>> entry : groupMap.entrySet()) {
} // List<PMOItemVO> items = entry.getValue();
PMOAggVO newVO = new PMOAggVO(); //
newVO.setParent(group.get(0).getParentVO()); // if(items.isEmpty()){
newVO.setChildren(PickmItemVO.class, mergedChildren.toArray(new PMOItemVO[0])); // continue;
// }
resultList.add(newVO); // PMOHeadVO praybillHeaderVO =inVOS[0].getParentVO();
} // // 创建新的请购单使用第一个VO的表头信息
return resultList.toArray(new PMOAggVO[0]); // PMOAggVO newVO = new PMOAggVO();
// newVO.setParent((PMOHeadVO) praybillHeaderVO.clone()); // 复用第一个VO的表头
// newVO.setChildrenVO(items.toArray(new PMOItemVO[0]));
// resultList.add(newVO);
// }
// return resultList.toArray(new PMOAggVO[0]);
return inVOS;
} }
private UFDateTime getnextmonth(UFDateTime date) { private UFDateTime getnextmonth(UFDateTime date) {
@ -288,7 +295,7 @@ public class PickmToPmo implements ICommonAction {
String hmateral = (String) dao.executeQuery(sql, new ColumnProcessor()); String hmateral = (String) dao.executeQuery(sql, new ColumnProcessor());
sql="SELECT bd_defdoc.code FROM bd_bom_b " + sql="SELECT bd_defdoc.code FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " + "WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " +
"where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " + "where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " +
"AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " + "AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " +
@ -298,11 +305,11 @@ public class PickmToPmo implements ICommonAction {
if(null==bomcode){ if(null==bomcode){
String secondsql=" SELECT bd_defdoc.code FROM bd_bom_b " + String secondsql=" SELECT bd_defdoc.code FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select bd_bom.cbomid from bd_bom bd_bom " + "WHERE bd_bom_b.cbomid in (select bd_bom.cbomid from bd_bom bd_bom " +
"WHERE bd_bom.pk_org = '"+child.getPk_org()+"' and bd_bom.hcmaterialid in " + "WHERE bd_bom.pk_org = '"+child.getPk_org()+"' and bd_bom.hcmaterialid in " +
"(SELECT bd_bom_b.cmaterialvid FROM bd_bom_b " + "(SELECT bd_bom_b.cmaterialvid FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " + "WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " +
"where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " + "where ( bd_bom.pk_org = '"+child.getPk_org()+"' AND bd_bom.hcmaterialid = '"+hmateral+"' " +
"AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " + "AND bd_bom.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " +

View File

@ -99,6 +99,9 @@ public class PickmDeliverAction implements ICommonAction {
Object GSDM = hybo.findColValue("org_factory", "code", " pk_factory = '" +agg.getParentVO().getPk_org() + "' "); Object GSDM = hybo.findColValue("org_factory", "code", " pk_factory = '" +agg.getParentVO().getPk_org() + "' ");
if(!GSDM.equals("C013")){ if(!GSDM.equals("C013")){
for(PickmItemVO item : (PickmItemVO[])agg.getChildrenVO()) {
pks.add(item.getCpickm_bid());
}
continue; continue;
} }
for(PickmItemVO item : (PickmItemVO[])agg.getChildrenVO()) { for(PickmItemVO item : (PickmItemVO[])agg.getChildrenVO()) {
@ -110,7 +113,7 @@ public class PickmDeliverAction implements ICommonAction {
String hmateral = (String) dao.executeQuery(firstSql, new ColumnProcessor()); String hmateral = (String) dao.executeQuery(firstSql, new ColumnProcessor());
firstSql="SELECT bd_bom_b.vdef27 FROM bd_bom_b " + firstSql="SELECT bd_bom_b.vdef27 FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " + "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+"' " + "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.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " +
@ -120,11 +123,11 @@ public class PickmDeliverAction implements ICommonAction {
if(null==bomcode){ if(null==bomcode){
String secondsql=" SELECT bd_bom_b.vdef27 FROM bd_bom_b " + String secondsql=" SELECT bd_bom_b.vdef27 FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select bd_bom.cbomid from bd_bom bd_bom " + "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 " + "WHERE bd_bom.pk_org = '"+item.getPk_org()+"' and bd_bom.hcmaterialid in " +
"(SELECT bd_bom_b.cmaterialvid FROM bd_bom_b " + "(SELECT bd_bom_b.cmaterialvid FROM bd_bom_b " +
"LEFT JOIN bd_defdoc ON bd_bom_b.vdef1 = bd_defdoc.pk_defdoc " + "LEFT JOIN bd_defdoc ON bd_bom_b.vdef14 = bd_defdoc.pk_defdoc " +
"WHERE bd_bom_b.cbomid in (select distinct bd_bom.cbomid from bd_bom bd_bom " + "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+"' " + "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.hfbomcategory = 1 AND bd_bom.hbcustomized = 'N' ) " +
@ -168,9 +171,9 @@ public class PickmDeliverAction implements ICommonAction {
deliverAppcode = "400802808"; deliverAppcode = "400802808";
deliverPagecode = "5008010501"; deliverPagecode = "5008010501";
} }
// if(pks.isEmpty()){ if(pks.isEmpty()){
// pks.add(""); throw new BusinessException("ÎŞ·ûºÏÁìÁÏÌõ¼şÊı¾İ");
// } }
Map<String, Object> returnMap = new HashMap(); Map<String, Object> returnMap = new HashMap();
returnMap.put("pks", pks.toArray(new String[0])); returnMap.put("pks", pks.toArray(new String[0]));
returnMap.put("success", true); returnMap.put("success", true);