feat(ic):优化无备料领料-发料组织版本id赋值调整等优化
This commit is contained in:
parent
b5978fd55f
commit
0b2487117d
|
|
@ -42,6 +42,7 @@ import nc.vo.pub.lang.UFDate;
|
||||||
import nc.vo.pub.lang.UFDouble;
|
import nc.vo.pub.lang.UFDouble;
|
||||||
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
||||||
import nc.vo.pubapp.pattern.pub.SqlBuilder;
|
import nc.vo.pubapp.pattern.pub.SqlBuilder;
|
||||||
|
import nc.vo.vorg.StockOrgVersionVO;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -79,9 +80,12 @@ public class NoItemsDeliverMaterialRule implements IRule<PurchaseInVO> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void noItemsDeliverMaterial(PurchaseInVO[] inVOS) throws BusinessException {
|
private void noItemsDeliverMaterial(PurchaseInVO[] inVOS) throws BusinessException {
|
||||||
String OrgCondition = "code = 'C038' and enablestate = '2' and isbusinessunit='Y'";
|
String orgCondition = "code = 'C038' and enablestate = '2' and isbusinessunit='Y'";
|
||||||
HYPubBO hyPub = new HYPubBO();
|
HYPubBO hyPub = new HYPubBO();
|
||||||
String orgId = hyPub.findColValue(OrgVO.getDefaultTableName(), OrgVO.PK_ORG, OrgCondition) + "";
|
String orgId = hyPub.findColValue(OrgVO.getDefaultTableName(), OrgVO.PK_ORG, orgCondition) + "";
|
||||||
|
// 组织版本id
|
||||||
|
orgCondition = "code = 'C038' and enablestate = '2'";
|
||||||
|
String org_vid = hyPub.findColValue(StockOrgVersionVO.getDefaultTableName(), StockOrgVersionVO.PK_VID, orgCondition) + "";
|
||||||
// 精密铸造,生成采购入库成功后再进行无备料领料
|
// 精密铸造,生成采购入库成功后再进行无备料领料
|
||||||
for (PurchaseInVO inVO : inVOS) {
|
for (PurchaseInVO inVO : inVOS) {
|
||||||
PurchaseInHeadVO head = inVO.getHead();
|
PurchaseInHeadVO head = inVO.getHead();
|
||||||
|
|
@ -94,6 +98,10 @@ public class NoItemsDeliverMaterialRule implements IRule<PurchaseInVO> {
|
||||||
if (configParams.isEmpty()) {
|
if (configParams.isEmpty()) {
|
||||||
ExceptionUtils.wrappBusinessException("自定义档案中的jm-config参数未配置");
|
ExceptionUtils.wrappBusinessException("自定义档案中的jm-config参数未配置");
|
||||||
}
|
}
|
||||||
|
String warehouseId = getWarehouseInfo(pkOrg, configParams);
|
||||||
|
if (MMValueCheck.isEmpty(warehouseId) || "~".equals(warehouseId)) {
|
||||||
|
ExceptionUtils.wrappBusinessException("请检查仓库编码是否配置正确");
|
||||||
|
}
|
||||||
for (PurchaseInBodyVO body : bodys) {
|
for (PurchaseInBodyVO body : bodys) {
|
||||||
String cmaterialvid = body.getCmaterialvid();
|
String cmaterialvid = body.getCmaterialvid();
|
||||||
String condition = "pk_material = '" + cmaterialvid + "'";
|
String condition = "pk_material = '" + cmaterialvid + "'";
|
||||||
|
|
@ -172,10 +180,7 @@ public class NoItemsDeliverMaterialRule implements IRule<PurchaseInVO> {
|
||||||
PickmHeadVO pickmHeadVO = pickmVO.getParentVO();
|
PickmHeadVO pickmHeadVO = pickmVO.getParentVO();
|
||||||
String cpickmid = pickmHeadVO.getCpickmid();
|
String cpickmid = pickmHeadVO.getCpickmid();
|
||||||
List<PickmItemVO> itemVOS = new ArrayList<>();
|
List<PickmItemVO> itemVOS = new ArrayList<>();
|
||||||
String warehouseId = getWarehouseInfo(pkOrg, configParams);
|
|
||||||
if (MMValueCheck.isEmpty(warehouseId) || "~".equals(warehouseId)) {
|
|
||||||
ExceptionUtils.wrappBusinessException("请检查仓库编码是否配置正确");
|
|
||||||
}
|
|
||||||
Map<String, Object> materialMap = getMaterialInfo(cmaterialvid);
|
Map<String, Object> materialMap = getMaterialInfo(cmaterialvid);
|
||||||
String pkMeasdoc = "";
|
String pkMeasdoc = "";
|
||||||
if (materialMap != null) {
|
if (materialMap != null) {
|
||||||
|
|
@ -185,8 +190,8 @@ public class NoItemsDeliverMaterialRule implements IRule<PurchaseInVO> {
|
||||||
itemVO.setCpickmid(cpickmid);
|
itemVO.setCpickmid(cpickmid);
|
||||||
itemVO.setPk_group("00");
|
itemVO.setPk_group("00");
|
||||||
itemVO.setPk_org(pkOrg);
|
itemVO.setPk_org(pkOrg);
|
||||||
itemVO.setPk_org_v(pkOrg);
|
itemVO.setPk_org_v(org_vid);
|
||||||
itemVO.setCdeliverorgvid(pkOrg);// 发料组织
|
itemVO.setCdeliverorgvid(org_vid);// 发料组织
|
||||||
itemVO.setCdeliverorgid(pkOrg);// 发料组织
|
itemVO.setCdeliverorgid(pkOrg);// 发料组织
|
||||||
itemVO.setVrowno("10");// 行号
|
itemVO.setVrowno("10");// 行号
|
||||||
itemVO.setCbmaterialid(cmaterialvid);
|
itemVO.setCbmaterialid(cmaterialvid);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue