Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
717c315157
|
|
@ -16,6 +16,7 @@ import nc.pubitf.ic.m4d.api.IMaterialOutMaintainAPI;
|
|||
import nc.util.mmf.busi.service.PFPubService;
|
||||
import nc.util.mmf.framework.base.MMValueCheck;
|
||||
import nc.vo.bd.material.MaterialVO;
|
||||
import nc.vo.bd.stordoc.StordocVO;
|
||||
import nc.vo.fi.pub.SqlUtils;
|
||||
import nc.vo.ic.m4d.entity.MaterialOutBodyVO;
|
||||
import nc.vo.ic.m4d.entity.MaterialOutHeadVO;
|
||||
|
|
@ -70,11 +71,13 @@ public class MaterialOutGyImsPlugin implements IBackgroundWorkPlugin {
|
|||
try {
|
||||
IPickmQueryService queryService = NCLocator.getInstance().lookup(IPickmQueryService.class);
|
||||
// IMS 同步状态:BIP:C-创建;U-修改D-删除 IMS:2-MES单据接收完成
|
||||
String selSql = "select * from BIPOutMainTab where status != '2'";
|
||||
String selSql = "select * from BIPOutMainTab where status = 'C'";
|
||||
List<Map<String, Object>> mainList = (List<Map<String, Object>>) getImsDao().executeQuery(selSql, new MapListProcessor());
|
||||
Set<String> imsIdSet = new HashSet<>();
|
||||
for (Map<String, Object> mainMap : mainList) {
|
||||
String cgeneralhid = mainMap.get("cgeneralhid") + "";
|
||||
// 同步状态:IMS:C-创建;U-修改; 4-BIP审核出库MES接收确认 BIP:2-BIP审核出库
|
||||
String status = mainMap.get("status") + "";
|
||||
try {
|
||||
String pkSql = "select * from BIPOutDetailTab where cgeneralhid = '" + cgeneralhid + "'";
|
||||
List<Map<String, Object>> detailList = (List<Map<String, Object>>) getImsDao().executeQuery(pkSql, new MapListProcessor());
|
||||
|
|
@ -104,6 +107,16 @@ public class MaterialOutGyImsPlugin implements IBackgroundWorkPlugin {
|
|||
hvo.setCreator("BIP");
|
||||
hvo.setBillmaker("BIP");
|
||||
hvo.setVtrantypecode("4D-01");
|
||||
if (MMValueCheck.isEmpty(mainMap.get("cwarehouseid"))) {
|
||||
continue;
|
||||
}
|
||||
// 仓库编码
|
||||
String cwarehouseid = mainMap.get("cwarehouseid") + "";
|
||||
String whereStorSql = StordocVO.CODE + " = '" + cwarehouseid + "'" + " and pk_org = '" + hvo.getPk_org() + "'";
|
||||
String warehousePk = MyHelper.getStrValByCondition(StordocVO.getDefaultTableName(), StordocVO.PK_STORDOC,
|
||||
whereStorSql);
|
||||
// NCCForUAPLogger.debug("cwarehouseid = " + cwarehouseid);
|
||||
hvo.setCwarehouseid(warehousePk);
|
||||
if (mainMap.get("dmakedate") != null && mainMap.get("dmakedate") instanceof Timestamp dmakedate1) {
|
||||
String dmakedateStr = DATE_FORMATTER.format(dmakedate1);
|
||||
UFDate dmakedate = new UFDate(dmakedateStr);
|
||||
|
|
@ -140,6 +153,7 @@ public class MaterialOutGyImsPlugin implements IBackgroundWorkPlugin {
|
|||
if (MMValueCheck.isEmpty(resultvos)) {
|
||||
continue;
|
||||
}
|
||||
// NCCForUAPLogger.debug("code = " + resultvos[0].getHead().getVbillcode());
|
||||
imsIdSet.add(cgeneralhid);
|
||||
} catch (BusinessException e) {
|
||||
Logger.error("MaterialOutGyImsPlugin Error: ", e);
|
||||
|
|
|
|||
Loading…
Reference in New Issue