diff --git a/measurement/src/main/java/com/ruoyi/bill/service/impl/PoundBillServiceImpl.java b/measurement/src/main/java/com/ruoyi/bill/service/impl/PoundBillServiceImpl.java index ef98442..85d0945 100644 --- a/measurement/src/main/java/com/ruoyi/bill/service/impl/PoundBillServiceImpl.java +++ b/measurement/src/main/java/com/ruoyi/bill/service/impl/PoundBillServiceImpl.java @@ -49,6 +49,8 @@ public class PoundBillServiceImpl extends ServiceImpl i @Autowired private PoundmstMapper poundmstMapper; + @Autowired + private ApiPostBack apiPostBack; + /** * 查询主榜单信息 * @@ -53,10 +60,19 @@ public class PoundmstServiceImpl extends ServiceImpl i * @return 结果 */ @Override + @Transactional(rollbackFor = Exception.class) public int insertPoundmst(Poundmst poundmst) { poundmst.initAddFields(poundmst); boolean save = save(poundmst); + //调用主榜单导入方法。 + //调用磅单回调接口。 + try { + if ("SP_InStock".equals(poundmst.getOabilltype())) + apiPostBack.makePoundmstFormData(poundmst.getId()); + } catch (IOException e) { + throw new RuntimeException("磅单:" + poundmst.getUsrcode() + "推送星空时,出现异常:"+e.getMessage()); + } if (save){ return 1; } diff --git a/measurement/src/main/java/com/ruoyi/webApi/ApiPostBack.java b/measurement/src/main/java/com/ruoyi/webApi/ApiPostBack.java index b23aa4b..b46b95e 100644 --- a/measurement/src/main/java/com/ruoyi/webApi/ApiPostBack.java +++ b/measurement/src/main/java/com/ruoyi/webApi/ApiPostBack.java @@ -1,5 +1,6 @@ package com.ruoyi.webApi; +import com.alibaba.fastjson.JSON; import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONObject; import com.fasterxml.jackson.core.JsonProcessingException; @@ -80,8 +81,8 @@ public class ApiPostBack { DynamicFormRequest request = handler.buildRequest(poundBill); String jsonInputString; try { - jsonInputString = objectMapper.writeValueAsString(request); - } catch (JsonProcessingException e) { + jsonInputString = JSON.toJSONString(request); + } catch (Exception e) { throw new RuntimeException("JSON序列化失败:" + e.getMessage()); } diff --git a/measurement/src/main/java/com/ruoyi/webApi/saveRequestBody/requestbody/model/STKTDModel.java b/measurement/src/main/java/com/ruoyi/webApi/saveRequestBody/requestbody/model/STKTDModel.java index 34f63ac..9a1be76 100644 --- a/measurement/src/main/java/com/ruoyi/webApi/saveRequestBody/requestbody/model/STKTDModel.java +++ b/measurement/src/main/java/com/ruoyi/webApi/saveRequestBody/requestbody/model/STKTDModel.java @@ -60,62 +60,122 @@ public class STKTDModel extends RequestModel { }; } + public Ref getFBillTypeID() { + return FBillTypeID; + } + public void setFBillTypeID(Ref FBillTypeID) { this.FBillTypeID = FBillTypeID; } + public String getFBizType() { + return FBizType; + } + public void setFBizType(String FBizType) { this.FBizType = FBizType; } + public String getFTransferDirect() { + return FTransferDirect; + } + public void setFTransferDirect(String FTransferDirect) { this.FTransferDirect = FTransferDirect; } + public String getFTransferBizType() { + return FTransferBizType; + } + public void setFTransferBizType(String FTransferBizType) { this.FTransferBizType = FTransferBizType; } + public Ref getFSaleOrgId() { + return FSaleOrgId; + } + public void setFSaleOrgId(Ref FSaleOrgId) { this.FSaleOrgId = FSaleOrgId; } + public Ref getFSettleOrgId() { + return FSettleOrgId; + } + public void setFSettleOrgId(Ref FSettleOrgId) { this.FSettleOrgId = FSettleOrgId; } + public Ref getFStockOutOrgId() { + return FStockOutOrgId; + } + public void setFStockOutOrgId(Ref FStockOutOrgId) { this.FStockOutOrgId = FStockOutOrgId; } + public String getFOwnerTypeOutIdHead() { + return FOwnerTypeOutIdHead; + } + public void setFOwnerTypeOutIdHead(String FOwnerTypeOutIdHead) { this.FOwnerTypeOutIdHead = FOwnerTypeOutIdHead; } + public Ref getFOwnerOutIdHead() { + return FOwnerOutIdHead; + } + public void setFOwnerOutIdHead(Ref FOwnerOutIdHead) { this.FOwnerOutIdHead = FOwnerOutIdHead; } + public Ref getFStockOrgId() { + return FStockOrgId; + } + public void setFStockOrgId(Ref FStockOrgId) { this.FStockOrgId = FStockOrgId; } + public String getFOwnerTypeIdHead() { + return FOwnerTypeIdHead; + } + public void setFOwnerTypeIdHead(String FOwnerTypeIdHead) { this.FOwnerTypeIdHead = FOwnerTypeIdHead; } + public Ref getFSETTLECURRID() { + return FSETTLECURRID; + } + public void setFSETTLECURRID(Ref FSETTLECURRID) { this.FSETTLECURRID = FSETTLECURRID; } + public Ref getFExchangeTypeId() { + return FExchangeTypeId; + } + public void setFExchangeTypeId(Ref FExchangeTypeId) { this.FExchangeTypeId = FExchangeTypeId; } + public Ref getFOwnerIdHead() { + return FOwnerIdHead; + } + public void setFOwnerIdHead(Ref FOwnerIdHead) { this.FOwnerIdHead = FOwnerIdHead; } + public String getFDate() { + return FDate; + } + public void setFDate(String FDate) { this.FDate = FDate; } @@ -128,4 +188,6 @@ public class STKTDModel extends RequestModel { this.FBillEntry = FEntity; super.setFEntity(FEntity); } + + } \ No newline at end of file diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml index 15c161d..9c383ed 100644 --- a/ruoyi-common/pom.xml +++ b/ruoyi-common/pom.xml @@ -126,6 +126,12 @@ 3.5.1 + + com.alibaba + fastjson + 2.0.31 + + \ No newline at end of file diff --git a/ruoyi-ui/src/views/measurement/operation/moltenironpound/index.vue b/ruoyi-ui/src/views/measurement/operation/moltenironpound/index.vue index 452aeb9..4f7c21a 100644 --- a/ruoyi-ui/src/views/measurement/operation/moltenironpound/index.vue +++ b/ruoyi-ui/src/views/measurement/operation/moltenironpound/index.vue @@ -1004,6 +1004,8 @@ export default { //将业务磅点进行赋值 this.mstBillFormData.mstBillForm.poundid = this.truepoundData.buspoundid; this.mstBillFormData.mstBillForm.mstBillTitle = '新增主榜单'; + //赋值oa单据类型。 + this.mstBillFormData.mstBillForm.oabilltype = 'SP_InStock'; //打开弹窗界面 this.mstBillFormData.mstBillOpen = true; diff --git a/ruoyi-ui/src/views/measurement/operation/steelpound/index.vue b/ruoyi-ui/src/views/measurement/operation/steelpound/index.vue index 8c62702..bac086b 100644 --- a/ruoyi-ui/src/views/measurement/operation/steelpound/index.vue +++ b/ruoyi-ui/src/views/measurement/operation/steelpound/index.vue @@ -730,6 +730,8 @@ export default { //将业务磅点进行赋值 this.mstBillFormData.mstBillForm.poundid = this.truepoundData.buspoundid; this.mstBillFormData.mstBillForm.mstBillTitle = '新增主榜单'; + //赋值oa单据类型。 + this.mstBillFormData.mstBillForm.oabilltype = 'SP_InStock'; //打开弹窗界面 this.mstBillFormData.mstBillOpen = true;