1.调整星空OA接口。

This commit is contained in:
xiaosuonian 2025-07-03 15:20:50 +08:00
parent 14a9e4fe69
commit ae25acbaa3
7 changed files with 98 additions and 4 deletions

View File

@ -49,6 +49,8 @@ public class PoundBillServiceImpl extends ServiceImpl<PoundBillMapper, PoundBill
@Autowired
private ApiPostBack apiPostBack;
private static final String OA_ORG_NUMBER = "HGGT";
/**
* 查询磅单信息
*
@ -266,9 +268,9 @@ public class PoundBillServiceImpl extends ServiceImpl<PoundBillMapper, PoundBill
poundBill.setSrcblltype("STK_TransferDirect");
poundBill.setFid("0");
poundBill.setFentity_fentryid("0");
poundBill.setOaOrgNumber("HGGT");
poundBill.setOaOrgNumber("YXSY");
poundBill.setInStockNumber("CK001");
poundBill.setOutStockNumber("CK001");
poundBill.setOutStockNumber("CK002");
//设置当前时间为过毛重时间
poundBill.setWghdt(new Date());
//设置当前登录人为毛重司磅员
@ -315,7 +317,10 @@ public class PoundBillServiceImpl extends ServiceImpl<PoundBillMapper, PoundBill
//Do nothing
}
poundBill.setWghdtoprname(currentUser);
//设置OA组织编码
poundBill.setOaOrgNumber("");
boolean save = save(poundBill);
//
if(save){
return 1;
}

View File

@ -1,7 +1,10 @@
package com.ruoyi.bill.service.impl;
import java.io.IOException;
import java.util.List;
import com.ruoyi.webApi.ApiPostBack;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -9,6 +12,7 @@ import com.ruoyi.bill.mapper.PoundmstMapper;
import com.ruoyi.bill.domain.Poundmst;
import com.ruoyi.bill.service.IPoundmstService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
/**
* 主榜单信息Service业务层处理
@ -22,6 +26,9 @@ public class PoundmstServiceImpl extends ServiceImpl<PoundmstMapper, Poundmst> i
@Autowired
private PoundmstMapper poundmstMapper;
@Autowired
private ApiPostBack apiPostBack;
/**
* 查询主榜单信息
*
@ -53,10 +60,19 @@ public class PoundmstServiceImpl extends ServiceImpl<PoundmstMapper, Poundmst> 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;
}

View File

@ -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());
}

View File

@ -60,62 +60,122 @@ public class STKTDModel extends RequestModel {
};
}
public Ref<FNumberRef> getFBillTypeID() {
return FBillTypeID;
}
public void setFBillTypeID(Ref<FNumberRef> 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<FNumberRef> getFSaleOrgId() {
return FSaleOrgId;
}
public void setFSaleOrgId(Ref<FNumberRef> FSaleOrgId) {
this.FSaleOrgId = FSaleOrgId;
}
public Ref<FNumberRef> getFSettleOrgId() {
return FSettleOrgId;
}
public void setFSettleOrgId(Ref<FNumberRef> FSettleOrgId) {
this.FSettleOrgId = FSettleOrgId;
}
public Ref<FNumberRef> getFStockOutOrgId() {
return FStockOutOrgId;
}
public void setFStockOutOrgId(Ref<FNumberRef> FStockOutOrgId) {
this.FStockOutOrgId = FStockOutOrgId;
}
public String getFOwnerTypeOutIdHead() {
return FOwnerTypeOutIdHead;
}
public void setFOwnerTypeOutIdHead(String FOwnerTypeOutIdHead) {
this.FOwnerTypeOutIdHead = FOwnerTypeOutIdHead;
}
public Ref<FNumberRef> getFOwnerOutIdHead() {
return FOwnerOutIdHead;
}
public void setFOwnerOutIdHead(Ref<FNumberRef> FOwnerOutIdHead) {
this.FOwnerOutIdHead = FOwnerOutIdHead;
}
public Ref<FNumberRef> getFStockOrgId() {
return FStockOrgId;
}
public void setFStockOrgId(Ref<FNumberRef> FStockOrgId) {
this.FStockOrgId = FStockOrgId;
}
public String getFOwnerTypeIdHead() {
return FOwnerTypeIdHead;
}
public void setFOwnerTypeIdHead(String FOwnerTypeIdHead) {
this.FOwnerTypeIdHead = FOwnerTypeIdHead;
}
public Ref<FNumberRef> getFSETTLECURRID() {
return FSETTLECURRID;
}
public void setFSETTLECURRID(Ref<FNumberRef> FSETTLECURRID) {
this.FSETTLECURRID = FSETTLECURRID;
}
public Ref<FNumberRef> getFExchangeTypeId() {
return FExchangeTypeId;
}
public void setFExchangeTypeId(Ref<FNumberRef> FExchangeTypeId) {
this.FExchangeTypeId = FExchangeTypeId;
}
public Ref<FNumberRef> getFOwnerIdHead() {
return FOwnerIdHead;
}
public void setFOwnerIdHead(Ref<FNumberRef> 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);
}
}

View File

@ -126,6 +126,12 @@
<version>3.5.1</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>2.0.31</version> <!-- 使用最新稳定版本 -->
</dependency>
</dependencies>
</project>

View File

@ -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;

View File

@ -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;