互感器总补丁
This commit is contained in:
parent
c28339a91c
commit
3731882c3d
|
@ -51,9 +51,9 @@ public class SignBP implements ISignBP<SaleOutVO>, ISignRuleProvider<SaleOutVO>
|
|||
processor.addAfterRule(new SaleOutProceedsRuleCG());
|
||||
processor.addAfterRule(new MobAfterSignMessageRule());
|
||||
// 销售出库 多一个步骤 先提交销售交货单 与同步销售出库单的orderNo一致
|
||||
processor.addAfterRule(new SalesDeliveryOrderRuleMES());
|
||||
// processor.addAfterRule(new SalesDeliveryOrderRuleMES());
|
||||
// 销售出库 签字后 同步到MES金思维系统
|
||||
processor.addAfterRule(new AfterSigningSynchronizeRuleMES());
|
||||
// processor.addAfterRule(new AfterSigningSynchronizeRuleMES());
|
||||
// 盘点(审批后传MES)
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ import java.util.List;
|
|||
* @Description TODO
|
||||
* @Version 1.0.0
|
||||
* @Date 2025/5/16 9:01
|
||||
* @Created by ame
|
||||
* @Created by sdlizheng
|
||||
*/
|
||||
public class AfterSigningSynchronizeRuleRZ implements IRule<SaleOutVO> {
|
||||
private static Log log = Log.getInstance("rzmomlog");
|
||||
|
|
|
@ -35,7 +35,7 @@ public class APISubcontInMaintainImpl implements IAPISubcontInMaintain {
|
|||
checker.check(vos);
|
||||
// 2、编码翻译成pk
|
||||
aggVOList = TransferCodeToPKTool.transferAggVO(aggVOList);
|
||||
// キュメ<EFBFBD><EFBFBD>サ
|
||||
// 3、翻译货位
|
||||
ICAPILocationVOUtils.translate(vos);
|
||||
|
||||
new SubcontInSaveFillValue().setDefaultValue(vos);
|
||||
|
|
|
@ -25,10 +25,7 @@ public class CheckSubcontInSaveValidator extends VONullValidate {
|
|||
public String[] getHeadNotNullFields() {
|
||||
// TODO Auto-generated method stub
|
||||
//组织,仓库,出入库类型编码
|
||||
String[] headnames =
|
||||
{
|
||||
ICPubMetaNameConst.PK_ORG, ICPubMetaNameConst.CWAREHOUSEID, ICPubMetaNameConst.VTRANTYPECODE
|
||||
};
|
||||
String[] headnames ={ICPubMetaNameConst.PK_ORG, ICPubMetaNameConst.CWAREHOUSEID, ICPubMetaNameConst.VTRANTYPECODE};
|
||||
return headnames;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ public class SubcontInSaveFillValue {
|
|||
// 数量,金额,汇率,税率处理
|
||||
rule = new ICBodyNshouldassistnumCal<SubcontInVO>();
|
||||
processer.addFillvalueRule(rule);
|
||||
|
||||
//执行
|
||||
processer.fillvalue(vos);
|
||||
|
||||
}
|
||||
|
|
|
@ -14,5 +14,11 @@ import java.util.Map;
|
|||
*/
|
||||
public interface IAPISubcontInMaintain {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param subcontInVOList
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
SubcontInVO[] save(List<Map<String, Object>> subcontInVOList) throws Exception;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,23 @@ import nc.vo.pub.BusinessException;
|
|||
*/
|
||||
public interface IAPIOnhandQuery {
|
||||
|
||||
/**
|
||||
* 根据维度查询现存量信息
|
||||
* 此方法接收一个参数映射,用于指定查询条件,如仓库、物料等
|
||||
*
|
||||
* @param paramMap 参数映射,包含查询条件
|
||||
* @return OnhandVO[] 查询到的现存量信息数组
|
||||
* @throws BusinessException 当查询操作失败时抛出的业务异常
|
||||
*/
|
||||
OnhandVO[] queryOnhandVOByDims(Map<String, Object> paramMap) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 根据多个维度查询现存量信息
|
||||
* 此方法接收一个参数映射列表,每个映射包含一组查询条件,用于批量查询
|
||||
*
|
||||
* @param paramMap 参数映射列表,每个映射包含一组查询条件
|
||||
* @return OnhandVO[] 查询到的现存量信息数组
|
||||
* @throws Exception 当查询操作失败时抛出的异常
|
||||
*/
|
||||
OnhandVO[] queryOnhandVOByDims(List<Map<String, Object>> paramMap) throws Exception;
|
||||
}
|
||||
|
|
|
@ -2,13 +2,10 @@ package nccloud.openapi.ic.m47;
|
|||
|
||||
import nc.bs.framework.common.NCLocator;
|
||||
import nc.vo.ic.m47.entity.SubcontInVO;
|
||||
import nc.vo.scmpub.res.billtype.ICBillType;
|
||||
import nc.ws.opm.pub.utils.result.APIErrCodeEnum;
|
||||
import nccloud.api.ic.m47.IAPISubcontInMaintain;
|
||||
import nccloud.api.rest.utils.ResultMessageUtil;
|
||||
import nccloud.openapi.ic.util.ICAPILocationVOUtils;
|
||||
import nccloud.openapi.scmpub.pub.NCCPubRestResource;
|
||||
import nccloud.openapi.scmpub.pub.TransferMapToVOTool;
|
||||
import org.json.JSONString;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
|
@ -32,32 +29,57 @@ public class SubcontInResource extends NCCPubRestResource {
|
|||
private static String HEADTABLE = "ic_subcontin_h";
|
||||
private static String BODYTABLE = "ic_subcontin_b";
|
||||
|
||||
/**
|
||||
* 保存操作信息
|
||||
*
|
||||
* 该方法通过POST请求接收JSON格式的参数,处理后返回JSON格式的结果
|
||||
* 主要用于保存单个操作的信息,将接收到的参数封装成列表的形式,
|
||||
* 调用另一个save方法进行实际的保存操作
|
||||
*
|
||||
* @param param 包含操作信息的键值对参数
|
||||
* @return 返回保存操作的结果,格式为JSON字符串
|
||||
*/
|
||||
@POST
|
||||
@Path("operation/save")
|
||||
@Consumes({"application/json"})
|
||||
@Produces({"application/json"})
|
||||
public JSONString save(Map<String, Object> param) {
|
||||
// 将接收到的参数封装成列表,以便调用实际的保存方法
|
||||
List<Map<String, Object>> paramList = new ArrayList();
|
||||
paramList.add(param);
|
||||
|
||||
// 调用实际的保存方法,并返回保存结果
|
||||
JSONString result = this.save(paramList);
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 保存数据接口
|
||||
* 该方法接收一个包含表头和表体信息的JSON数组,尝试将其保存到数据库中
|
||||
* 如果传入的数据格式不正确(不包含表头或表体信息),则返回错误信息
|
||||
* 如果保存过程中发生异常,则返回异常信息
|
||||
*
|
||||
* @param paramList 一个包含多个数据项的列表,每个数据项是一个Map对象,必须包含表头和表体信息
|
||||
* @return 返回一个JSON字符串,包含保存结果或错误信息
|
||||
*/
|
||||
@POST
|
||||
@Path("save")
|
||||
@Consumes({"application/json"})
|
||||
@Produces({"application/json"})
|
||||
public JSONString save(List<Map<String, Object>> paramList){
|
||||
try {
|
||||
// 遍历传入的参数列表,检查每个Map对象是否包含表头和表体信息
|
||||
for (Map<String, Object> map : paramList) {
|
||||
if (!map.containsKey(HEADTABLE) || !map.containsKey(BODYTABLE)) {
|
||||
// 如果任一数据项不包含表头或表体信息,返回错误信息
|
||||
return ResultMessageUtil.exceptionToJSON("传入数据异常,参数要包含表头信息和表体信息", APIErrCodeEnum.BUSINESSEXCCODE.getCode());
|
||||
}
|
||||
}
|
||||
// 调用服务接口保存数据,并返回保存结果
|
||||
SubcontInVO[] save = NCLocator.getInstance().lookup(IAPISubcontInMaintain.class).save(paramList);
|
||||
return ResultMessageUtil.toJSON(save, "保存成功");
|
||||
} catch (Exception e) {
|
||||
// 如果保存过程中发生异常,返回异常信息
|
||||
return ResultMessageUtil.exceptionToJSON(e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import nc.vo.mmpac.pickm.enumeration.FbillstatusEnum;
|
|||
public class PickmApproveBP {
|
||||
|
||||
private void addAfterRule(CompareAroundProcesser<AggPickmVO> processer) {
|
||||
//备料计划审批推送锐制
|
||||
IRule<AggPickmVO> pickmstatusFilterRule = new AfterApproveRuleSyncRZWMS();
|
||||
processer.addAfterRule(pickmstatusFilterRule);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import nc.bs.uapbd.util.ThirdPartyPostRequestUtil;
|
|||
import nc.impl.pubapp.pattern.rule.IRule;
|
||||
import nc.jdbc.framework.processor.ColumnProcessor;
|
||||
import nc.pubitf.para.SysInitQuery;
|
||||
import nc.vo.bd.defdoc.DefdocVO;
|
||||
import nc.vo.bd.material.MaterialVO;
|
||||
import nc.vo.bd.rt.rt0004.entity.RcVO;
|
||||
import nc.vo.bd.stordoc.StordocVO;
|
||||
|
@ -19,6 +20,7 @@ import nc.vo.mmpac.pickm.entity.PickmItemVO;
|
|||
import nc.vo.org.OrgVO;
|
||||
import nc.vo.pub.BusinessException;
|
||||
import nc.vo.pub.lang.UFBoolean;
|
||||
import nc.vo.pub.lang.UFDouble;
|
||||
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
||||
import nc.vo.pubapp.pattern.pub.SqlBuilder;
|
||||
import nc.vo.scmpub.util.ArrayUtil;
|
||||
|
@ -154,31 +156,29 @@ public class AfterApproveRuleSyncRZWMS implements IRule<AggPickmVO> {
|
|||
singleObj.put("djxh", body.getVrowno());
|
||||
|
||||
//djrq datetime 单据日期 必填
|
||||
singleObj.put("djrq", head.getDmakedate());
|
||||
singleObj.put("djrq", head.getDmakedate().toString());
|
||||
|
||||
//wlbm_wbid varchar(100) 第三方系统物料名称id 必填 物料编码的后台ID
|
||||
singleObj.put("wlbm_wbid", wlbm_wbid);
|
||||
|
||||
//scjh_wbid varchar(100) 第三方系统生产计划ID 必填 生产计划号外部ID,一般ERP系统的生产订单号。
|
||||
singleObj.put("scjh_wbid", head.getCsourcebillid());
|
||||
|
||||
//jhxh numeric(5) 计划序号 -生产订单行号
|
||||
singleObj.put("jhxh", head.getVsourcebillrowno());
|
||||
|
||||
//djsl numeric(18,3) 单据数量 必填
|
||||
singleObj.put("djsl", body.getNpscnum().getDouble());
|
||||
UFDouble djsl = body.getNplanoutastnum() == null ? UFDouble.ZERO_DBL : body.getNplanoutastnum();
|
||||
singleObj.put("djsl", djsl.getDouble());
|
||||
|
||||
//sddd varchar(510)送达地点 必填 传仓库名称,要求上位ERP仓库名称不重复。
|
||||
singleObj.put("sddd", transferCodeByPk(StordocVO.getDefaultTableName(), StordocVO.NAME, StordocVO.PK_STORDOC, body.getCoutstockid()));
|
||||
// singleObj.put("sddd", transferCodeByPk(StordocVO.getDefaultTableName(), StordocVO.NAME, StordocVO.PK_STORDOC, body.getCoutstockid()));
|
||||
|
||||
//ckbh_wbid varchar(100) 第三方系统仓库id 必填 储区根据仓库默认,同仓库多储区时,两者必填;
|
||||
singleObj.put("ckbh_wbid",transferCodeByPk(StordocVO.getDefaultTableName(), StordocVO.CODE, StordocVO.PK_STORDOC, body.getCoutstockid()));
|
||||
// singleObj.put("ckbh_wbid",body.getCoutstockid());
|
||||
|
||||
//qfbj int 签发标记 必填 默认1;上位系统审核传至MOM 1
|
||||
singleObj.put("qfbj", 1);
|
||||
|
||||
//cght_wbid varchar(100) 第三方系统合同id 必填 委外订单
|
||||
singleObj.put("cght_wbid", head.getVfirstbillcode());
|
||||
//cght_wbid varchar(100) 第三方系统合同id 必填 委外订单主键ID
|
||||
singleObj.put("cght_wbid",head.getCfirstbillid());
|
||||
|
||||
//cght_wbid varchar(100) 第三方系统合同id 必填
|
||||
// singleObj.put("cght_wbid", transferCodeByPk("bd_defdoc", DefdocVO.CODE, DefdocVO.PK_DEFDOC, body.getVbdef5()));
|
||||
details.add(singleObj);
|
||||
|
||||
}
|
||||
|
|
|
@ -51,10 +51,10 @@ public class PMOApproveBP {
|
|||
processer.addAfterRule(new PMOCreatePSCPlanRule());
|
||||
ICompareRule<PMOAggVO> auditSupplyRule = new PMOApproveAuditSupplyRule();
|
||||
processer.addAfterRule(auditSupplyRule);
|
||||
// 审批后推送到RZ系统
|
||||
// 审批后推送到锐制系统
|
||||
processer.addAfterRule(new AfterApprovingSynchronizeRuleRZ(true));
|
||||
// 审批后推送流程生产订单到MES
|
||||
processer.addAfterRule(new AfterApproveRuleSyncMes());
|
||||
// processer.addAfterRule(new AfterApproveRuleSyncMes());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ public class AfterApprovingSynchronizeRuleRZ implements IRule<PMOAggVO> {
|
|||
return;
|
||||
}
|
||||
|
||||
// 推送到RZ系统
|
||||
// 推送到锐制系统
|
||||
pushToRZMOM(filteredOrders.toArray(new PMOAggVO[0]));
|
||||
} catch (Exception e) {
|
||||
log.error("同步生产订单到RZ系统失败: " + e.getMessage());
|
||||
|
|
|
@ -52,7 +52,7 @@ public class AfterApprovingSynchronizeRuleRZ implements IRule<OrderVO> {
|
|||
if (newOrderVOS.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
// 推送到睿智系统
|
||||
//推送到锐制系统
|
||||
pushToRZMOM(newOrderVOS.toArray(new OrderVO[0]));
|
||||
} catch (Exception e) {
|
||||
log.error("同步采购订单到锐制系统失败: " + e.getMessage());
|
||||
|
|
|
@ -111,7 +111,7 @@ public class OrderApproveAction {
|
|||
processer.addAfterRule(new OrderRewritePMStartDateRule(true));
|
||||
processer.addAfterRule(new OrderApprovePMSupplyRule());
|
||||
|
||||
// 采购订单审批后同步到锐制MES系统
|
||||
// 采购订单审批后同步到锐制系统
|
||||
processer.addAfterRule(new AfterApprovingSynchronizeRuleRZ());
|
||||
}
|
||||
|
||||
|
|
|
@ -3,4 +3,5 @@
|
|||
<rest>
|
||||
<resource classname="nccloud.api.uapbd.QuerySync" exinfo=""/>
|
||||
</rest>
|
||||
|
||||
</module>
|
|
@ -39,7 +39,7 @@ public class QuerySync extends AbstractNCCRestResource {
|
|||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
calendar.add(Calendar.HOUR_OF_DAY, -3); // 减去 3 小时
|
||||
//提前三小时,防止ts与现实时间差别
|
||||
//提前三小时防止ts与现实时间差别
|
||||
UFDate adjustedUfDate = new UFDate(calendar.getTimeInMillis());
|
||||
if (!ts.contains(",")) { // 单个时间戳
|
||||
tsCondition = "ts >= '" + adjustedUfDate + "' AND ts <= '" + new UFDate(new Date()) + "'";
|
||||
|
|
Loading…
Reference in New Issue