Commit b318ea64 by 宋祥

1.fixBug:入库失败问题修复

parent 3a23e6a7
package com.baosight.hpjx.core.tools;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.iplat4j.common.ed.domain.TEDFA00;
import com.baosight.iplat4j.core.exception.PlatException;
import org.apache.commons.collections.CollectionUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* ED工具类
*
* @author:songx
* @date:2022/8/10,13:55
*/
public class EDTools {
/**
* 页面工具类
*
* @author:songx
* @date:2024/2/6,16:26
*/
public static class EdFa00 {
/**
* 查询页面信息
*
* @param ename
* @return
*/
public static TEDFA00 query(String ename) {
AssertUtils.isNull(ename, "页面英文名称不能为空!");
Map<String, String> paramMap = new HashMap();
paramMap.put("form_ename", ename);
List<TEDFA00> results = DaoBase.getInstance().query("tedfa00.query", paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
}
/**
* 小代码工具类
*
* @author:songx
* @date:2024/2/6,16:25
*/
public static class EdCm01 {
/**
* 查询小代码明细
*
* @param codeSetCode
* @return
*/
public static List<Map<String, Object>> list(String codeSetCode) {
AssertUtils.isNull(codeSetCode, "代码分类编码不能为空!");
Map<String, String> paramMap = new HashMap();
paramMap.put("codesetCode", codeSetCode);
List<Map<String, Object>> results = DaoBase.getInstance().query("EDCM01.queryDetail", paramMap);
if (CollectionUtils.isEmpty(results)) {
throw new PlatException("分类编码[" + codeSetCode + "]未配置代码明细!");
}
return results;
}
}
}
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.common.ProdOrderStatusEnum; import com.baosight.hpjx.common.ProdOrderStatusEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
...@@ -40,6 +41,8 @@ import java.util.Map; ...@@ -40,6 +41,8 @@ import java.util.Map;
*/ */
public class ServiceHPKC003A extends ServiceEPBase { public class ServiceHPKC003A extends ServiceEPBase {
private final Integer[] DEFAULT_INVENT_TYPE = {InventTypeEnum.SEMI_FINISHED_PRODUCT.getCode()};
/** /**
* 初始化 * 初始化
* *
...@@ -49,7 +52,9 @@ public class ServiceHPKC003A extends ServiceEPBase { ...@@ -49,7 +52,9 @@ public class ServiceHPKC003A extends ServiceEPBase {
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null, false); Map queryMap = new HashMap();
queryMap.put("inventTypes", DEFAULT_INVENT_TYPE);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), queryMap, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
...@@ -8,6 +8,7 @@ import com.baosight.hpjx.hp.kc.domain.HPKC011; ...@@ -8,6 +8,7 @@ import com.baosight.hpjx.hp.kc.domain.HPKC011;
import com.baosight.hpjx.hp.pz.domain.HPPZ006; import com.baosight.hpjx.hp.pz.domain.HPPZ006;
import com.baosight.hpjx.hp.pz.domain.HPPZ007; import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.sc.domain.HPSC005; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -180,13 +181,7 @@ public class ServiceHPKC011 extends ServiceBase { ...@@ -180,13 +181,7 @@ public class ServiceHPKC011 extends ServiceBase {
throw new PlatException("仓库编码异常,找不到对应的仓库档案!"); throw new PlatException("仓库编码异常,找不到对应的仓库档案!");
} }
try { try {
inInfo.setRows(EiConstant.queryBlock,new ArrayList(){{add(new HashMap<String,Object>(){{put("prodNo",hpkc011.getProdNo());}});}}); HPSC005 hpsc005 = HPSCTools.HpSc005.get(hpkc011.getProdNo());
inInfo.set(EiConstant.serviceName, "HPSC005");
inInfo.set(EiConstant.methodName, "query");
EiInfo outInfo = XLocalManager.call(inInfo);
HPSC005 hpsc005 = new HPSC005();
List<Map> inventList = outInfo.getBlock(EiConstant.resultBlock).getRows();
hpsc005.fromMap(inventList.get(0));
hpkc011.setProjCode(hpsc005.getProjCode()); hpkc011.setProjCode(hpsc005.getProjCode());
hpkc011.setProjName(hpsc005.getProjName()); hpkc011.setProjName(hpsc005.getProjName());
hpkc011.setInventCode(hpsc005.getPrdtCode()); hpkc011.setInventCode(hpsc005.getPrdtCode());
......
...@@ -30,10 +30,8 @@ ...@@ -30,10 +30,8 @@
<EF:EFColumn ename="subInventName" cname="零部件名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="subInventName" cname="零部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N3}" required="true"/> <EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="applyRemark" cname="说明" width="150" editType="textarea" copy="true"/> <EF:EFColumn ename="applyRemark" cname="说明" width="150" editType="textarea" copy="true"/>
<EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N3}" <EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N3}"/>
sumType="all"/> <EF:EFColumn ename="weight" cname="库存重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="库存重量" enable="false" width="120" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/> <EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="whCode" cname="仓库编码" enable="false" width="140" align="center"/> <EF:EFColumn ename="whCode" cname="仓库编码" enable="false" width="140" align="center"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/> <EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment