【推送泛微】结合采购订单与采购订单变更
This commit is contained in:
parent
e94c9f0305
commit
703ce5727b
|
|
@ -7,7 +7,9 @@ import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|||
import kd.bos.entity.operate.result.OperationResult;
|
||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.QueryServiceHelper;
|
||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import tqq9.lc123.cloud.app.plugin.trd.FWImpl;
|
||||
|
|
@ -26,9 +28,20 @@ public class PurOrderSubmitOp extends AbstractOperationServicePlugIn {
|
|||
OperationResult operationResult = this.getOperationResult();
|
||||
List<Object> successPkIds = operationResult.getSuccessPkIds();
|
||||
for (Object successPkId : successPkIds) {
|
||||
DynamicObject pm_purorderbill = BusinessDataServiceHelper.loadSingle(successPkId, "pm_purorderbill");
|
||||
//组装数据,调用泛微接口
|
||||
String resultStr = FWImpl.pushFwPurorder(pm_purorderbill);
|
||||
//判断推送的是采购订单 还是采购订单变更单
|
||||
String resultStr = null;
|
||||
DynamicObject bill = null;
|
||||
boolean existOrder = QueryServiceHelper.exists("pm_purorderbill", successPkId);
|
||||
if(existOrder){
|
||||
bill = BusinessDataServiceHelper.loadSingle(successPkId, "pm_purorderbill");
|
||||
resultStr = FWImpl.pushFwPurorder(bill);
|
||||
}else{
|
||||
boolean existChange = QueryServiceHelper.exists("pm_xspurorderbill", successPkId);
|
||||
if(existChange){
|
||||
bill = BusinessDataServiceHelper.loadSingle(successPkId, "pm_xspurorderbill");
|
||||
resultStr = FWImpl.pushFwPurChange(bill);
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(resultStr)){
|
||||
JSONObject resultObj = JSONObject.parseObject(resultStr);
|
||||
String code = resultObj.getString("code");
|
||||
|
|
@ -36,8 +49,8 @@ public class PurOrderSubmitOp extends AbstractOperationServicePlugIn {
|
|||
JSONObject data = resultObj.getJSONObject("data");
|
||||
if(data != null){
|
||||
String requestid = data.getString("requestid");
|
||||
pm_purorderbill.set("tqq9_fwrequestid", requestid);
|
||||
SaveServiceHelper.save(new DynamicObject[]{pm_purorderbill});
|
||||
bill.set("tqq9_fwrequestid", requestid);
|
||||
SaveServiceHelper.save(new DynamicObject[]{bill});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,15 +9,10 @@ import kd.bos.servicehelper.AttachmentServiceHelper;
|
|||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import tqq9.lc123.cloud.app.plugin.utils.ConfigUtils;
|
||||
import tqq9.lc123.cloud.app.plugin.utils.FWUtils;
|
||||
import tqq9.lc123.cloud.app.plugin.utils.FWRestfulUtils;
|
||||
import tqq9.lc123.cloud.app.plugin.utils.FWUtils;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.URL;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
|
|
@ -28,8 +23,6 @@ public class FWImpl {
|
|||
|
||||
/**
|
||||
* 推送仓库
|
||||
* @param dataEntity
|
||||
* @return
|
||||
*/
|
||||
public static String syncWH(DynamicObject dataEntity) {
|
||||
String number = dataEntity.getString("number");
|
||||
|
|
@ -64,15 +57,12 @@ public class FWImpl {
|
|||
mainTable.put("bmbm", bmbm);
|
||||
|
||||
FWRestfulUtils fwRestfulUtils = new FWRestfulUtils();
|
||||
String resultStr = fwRestfulUtils.doAction("api/cube/restful/interface/saveOrUpdateModeData/CK", mainTable, tqq9_fwuserid, "推送仓库信息", number);
|
||||
return resultStr;
|
||||
return fwRestfulUtils.doAction("api/cube/restful/interface/saveOrUpdateModeData/CK", mainTable, tqq9_fwuserid, "推送仓库信息", number);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 采购订单推送泛微
|
||||
* @param pm_purorderbill
|
||||
* @return
|
||||
*/
|
||||
public static String pushFwPurorder(DynamicObject pm_purorderbill){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
|
@ -124,8 +114,6 @@ public class FWImpl {
|
|||
fktj = 2;
|
||||
}else if ("002".equals(number)){
|
||||
fktj = 1;
|
||||
}else if ("003".equals(number)){
|
||||
fktj = 0;
|
||||
}else if ("004".equals(number)){
|
||||
fktj = 3;
|
||||
}
|
||||
|
|
@ -315,9 +303,7 @@ public class FWImpl {
|
|||
|
||||
List<JSONObject> elist = Arrays.asList(e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15,e16,e17,e18,e19);
|
||||
JSONArray recordsArr = new JSONArray();
|
||||
for (JSONObject obj : elist) {
|
||||
recordsArr.add(obj);
|
||||
}
|
||||
recordsArr.addAll(elist);
|
||||
|
||||
JSONObject recordObj = new JSONObject();
|
||||
recordObj.put("recordOrder", 0);
|
||||
|
|
@ -361,7 +347,6 @@ public class FWImpl {
|
|||
BigDecimal bcjsje = payEntry.getBigDecimal("joinpayamount");//bcjsje
|
||||
String fkd = payEntry.getString("tqq9_paybillno");//fkd
|
||||
|
||||
|
||||
JSONObject p1 = new JSONObject();
|
||||
p1.put("fieldName", "kxmc");
|
||||
p1.put("fieldValue", kxmc);
|
||||
|
|
@ -395,9 +380,7 @@ public class FWImpl {
|
|||
|
||||
List<JSONObject> plist = Arrays.asList(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10);
|
||||
JSONArray recordsArr = new JSONArray();
|
||||
for (JSONObject obj : plist) {
|
||||
recordsArr.add(obj);
|
||||
}
|
||||
recordsArr.addAll(plist);
|
||||
JSONObject recordObj = new JSONObject();
|
||||
recordObj.put("recordOrder", 0);
|
||||
recordObj.put("workflowRequestTableFields", recordsArr);
|
||||
|
|
@ -504,21 +487,16 @@ public class FWImpl {
|
|||
List<JSONObject> mlist = Arrays.asList(m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15,m16,m17,m18,m19,m20,
|
||||
m21,m22,m23,m24,m25,m26,m27,m28,m29);
|
||||
JSONArray mainArr = new JSONArray();
|
||||
for (JSONObject obj : mlist) {
|
||||
mainArr.add(obj);
|
||||
}
|
||||
mainArr.addAll(mlist);
|
||||
String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_XZCGDD");
|
||||
FWRestfulUtils fwRestfulUtils = new FWRestfulUtils();
|
||||
//如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口
|
||||
String resultStr = fwRestfulUtils.doBillAction(mainArr, detailRootArr, "采购单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid);
|
||||
return resultStr;
|
||||
return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "采购单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 其他入库单推送泛微
|
||||
* @param bill
|
||||
* @return
|
||||
*/
|
||||
public static String pushFwOtherIn(DynamicObject bill) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
|
@ -547,7 +525,6 @@ public class FWImpl {
|
|||
ywlxrk = 0;
|
||||
ywlxxsm = "盘盈入库";
|
||||
}else if("354".equals(biztypeNumber)){
|
||||
ywlxrk = 1;
|
||||
ywlxxsm = "其他入库";
|
||||
}else if("605".equals(biztypeNumber)){
|
||||
ywlxrk = 2;
|
||||
|
|
@ -571,7 +548,6 @@ public class FWImpl {
|
|||
ywlxrk = 8;
|
||||
ywlxxsm = "错货入库";
|
||||
}
|
||||
String drzz = ywgz;
|
||||
String jsr = null;
|
||||
DynamicObject tqq9_jsr = bill.getDynamicObject("tqq9_jsr");
|
||||
if(tqq9_jsr != null){
|
||||
|
|
@ -689,9 +665,7 @@ public class FWImpl {
|
|||
List<JSONObject> elist = Arrays.asList(e1,e12,e2,e3,e4,e5,e6,e7,//e8,e9,e10,e11,e13,e14
|
||||
e15);
|
||||
JSONArray recordsArr = new JSONArray();
|
||||
for (JSONObject obj : elist) {
|
||||
recordsArr.add(obj);
|
||||
}
|
||||
recordsArr.addAll(elist);
|
||||
|
||||
JSONObject recordObj = new JSONObject();
|
||||
recordObj.put("recordOrder", 0);
|
||||
|
|
@ -742,7 +716,7 @@ public class FWImpl {
|
|||
m9.put("fieldValue", ywlxrk);
|
||||
JSONObject m13 = new JSONObject();
|
||||
m13.put("fieldName", "drzz");
|
||||
m13.put("fieldValue", drzz);
|
||||
m13.put("fieldValue", ywgz);
|
||||
JSONObject m14 = new JSONObject();
|
||||
m14.put("fieldName", "jsr");
|
||||
m14.put("fieldValue", jsr);
|
||||
|
|
@ -791,9 +765,7 @@ public class FWImpl {
|
|||
if (ywlxrk == 2){
|
||||
int dblx = 0;
|
||||
String tqq9_dblx = bill.getString("tqq9_dblx");
|
||||
if("A".equals(tqq9_dblx)){
|
||||
dblx = 0;
|
||||
}else{
|
||||
if("B".equals(tqq9_dblx)){
|
||||
dblx = 1;
|
||||
}
|
||||
JSONObject m10 = new JSONObject();
|
||||
|
|
@ -801,9 +773,7 @@ public class FWImpl {
|
|||
m10.put("fieldValue", dblx);
|
||||
int dbfl = 0;
|
||||
String tqq9_dbrk = bill.getString("tqq9_dbrk");
|
||||
if("A".equals(tqq9_dbrk)){
|
||||
dbfl = 0;
|
||||
}else if("B".equals(tqq9_dbrk)){
|
||||
if("B".equals(tqq9_dbrk)){
|
||||
dbfl = 1;
|
||||
}else if("C".equals(tqq9_dbrk)){
|
||||
dbfl = 2;
|
||||
|
|
@ -821,21 +791,16 @@ public class FWImpl {
|
|||
mlist.add(m11);
|
||||
}
|
||||
JSONArray mainArr = new JSONArray();
|
||||
for (JSONObject obj : mlist) {
|
||||
mainArr.add(obj);
|
||||
}
|
||||
mainArr.addAll(mlist);
|
||||
String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_XZCRKD");
|
||||
FWRestfulUtils fwRestfulUtils = new FWRestfulUtils();
|
||||
//如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口
|
||||
String resultStr = fwRestfulUtils.doBillAction(mainArr, detailRootArr, "入库单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid);
|
||||
return resultStr;
|
||||
return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "入库单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 其他出库单推送泛微
|
||||
* @param bill
|
||||
* @return
|
||||
*/
|
||||
public static String pushFwOtherOut(DynamicObject bill) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
|
@ -864,7 +829,6 @@ public class FWImpl {
|
|||
ywlxck = 0;
|
||||
ywlxxsm = "盘亏入库";
|
||||
}else if("355".equals(biztypeNumber)){
|
||||
ywlxck = 1;
|
||||
ywlxxsm = "其他出库";
|
||||
}else if("612".equals(biztypeNumber)){
|
||||
ywlxck = 2;
|
||||
|
|
@ -885,7 +849,6 @@ public class FWImpl {
|
|||
ywlxck = 7;
|
||||
ywlxxsm = "报损出库";
|
||||
}
|
||||
String dczz = ywgz;
|
||||
String drzz = ywgz;
|
||||
DynamicObject tqq9_drck2 = bill.getDynamicObject("tqq9_drck2");
|
||||
if(tqq9_drck2 != null){
|
||||
|
|
@ -1034,9 +997,7 @@ public class FWImpl {
|
|||
|
||||
List<JSONObject> elist = Arrays.asList(e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14);
|
||||
JSONArray recordsArr = new JSONArray();
|
||||
for (JSONObject obj : elist) {
|
||||
recordsArr.add(obj);
|
||||
}
|
||||
recordsArr.addAll(elist);
|
||||
|
||||
JSONObject recordObj = new JSONObject();
|
||||
recordObj.put("recordOrder", 0);
|
||||
|
|
@ -1087,7 +1048,7 @@ public class FWImpl {
|
|||
m9.put("fieldValue", ywlxck);
|
||||
JSONObject m12 = new JSONObject();
|
||||
m12.put("fieldName", "dczz");
|
||||
m12.put("fieldValue", dczz);
|
||||
m12.put("fieldValue", ywgz);
|
||||
JSONObject m13 = new JSONObject();
|
||||
m13.put("fieldName", "drzz");
|
||||
m13.put("fieldValue", drzz);
|
||||
|
|
@ -1136,16 +1097,12 @@ public class FWImpl {
|
|||
if (ywlxck == 2){
|
||||
int dblx = 0;
|
||||
String tqq9_dblx = bill.getString("tqq9_dblxqtckd");
|
||||
if("A".equals(tqq9_dblx)){
|
||||
dblx = 0;
|
||||
}else{
|
||||
if("B".equals(tqq9_dblx)){
|
||||
dblx = 1;
|
||||
}
|
||||
int dbfl = 0;
|
||||
String tqq9_dbck = bill.getString("tqq9_dbck");
|
||||
if("A".equals(tqq9_dbck)){
|
||||
dbfl = 0;
|
||||
}else if("B".equals(tqq9_dbck)){
|
||||
if("B".equals(tqq9_dbck)){
|
||||
dbfl = 1;
|
||||
}else if("C".equals(tqq9_dbck)){
|
||||
dbfl = 2;
|
||||
|
|
@ -1158,9 +1115,7 @@ public class FWImpl {
|
|||
}
|
||||
int shlx = 0;
|
||||
String tqq9_shlx = bill.getString("tqq9_shlx");
|
||||
if("A".equals(tqq9_shlx)){
|
||||
shlx = 0;
|
||||
}else if("B".equals(tqq9_shlx)){
|
||||
if("B".equals(tqq9_shlx)){
|
||||
shlx = 1;
|
||||
}else if("C".equals(tqq9_shlx)){
|
||||
shlx = 3;
|
||||
|
|
@ -1186,9 +1141,7 @@ public class FWImpl {
|
|||
//盘亏出库
|
||||
int pkyy = 0;
|
||||
String tqq9_pkyy = bill.getString("tqq9_pkyy");
|
||||
if("A".equals(tqq9_pkyy)){
|
||||
pkyy = 0;
|
||||
}else if("B".equals(tqq9_pkyy)){
|
||||
if("B".equals(tqq9_pkyy)){
|
||||
pkyy = 1;
|
||||
}else if("C".equals(tqq9_pkyy)){
|
||||
pkyy = 2;
|
||||
|
|
@ -1227,8 +1180,6 @@ public class FWImpl {
|
|||
bsckfl = 6;
|
||||
}else if("H".equals(tqq9_bsck)){
|
||||
bsckfl = 7;
|
||||
}else if("QT".equals(tqq9_bsck)){
|
||||
bsckfl = 8;
|
||||
}
|
||||
JSONObject m29 = new JSONObject();
|
||||
m29.put("fieldName", "bsckfl");
|
||||
|
|
@ -1236,21 +1187,16 @@ public class FWImpl {
|
|||
mlist.add(m29);
|
||||
}
|
||||
JSONArray mainArr = new JSONArray();
|
||||
for (JSONObject obj : mlist) {
|
||||
mainArr.add(obj);
|
||||
}
|
||||
mainArr.addAll(mlist);
|
||||
String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_XZCRKD");
|
||||
FWRestfulUtils fwRestfulUtils = new FWRestfulUtils();
|
||||
//如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口
|
||||
String resultStr = fwRestfulUtils.doBillAction(mainArr, detailRootArr, "出库单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid);
|
||||
return resultStr;
|
||||
return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "出库单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 付款申请推送泛微
|
||||
* @param bill
|
||||
* @return
|
||||
*/
|
||||
public static String pushFwPayApply(DynamicObject bill){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
|
@ -1273,12 +1219,8 @@ public class FWImpl {
|
|||
DynamicObject billtype = bill.getDynamicObject("billtype");
|
||||
String billtypenumber = billtype.getString("number");
|
||||
int djlx = 0;
|
||||
if("ap_payapply_BT_S".equals(billtypenumber)){
|
||||
djlx = 0;
|
||||
}else if("ap_payapply_oth_BT_S".equals(billtypenumber)){
|
||||
if("ap_payapply_oth_BT_S".equals(billtypenumber)){
|
||||
djlx = 1;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
DynamicObject payorg = bill.getDynamicObject("payorg");
|
||||
String payOrgNumber = payorg.getString("number");
|
||||
|
|
@ -1292,9 +1234,7 @@ public class FWImpl {
|
|||
BigDecimal sqje = bill.getBigDecimal("applyamount");
|
||||
int fklx = 0;
|
||||
String tqq9_fklx = bill.getString("tqq9_fklx");
|
||||
if("A".equals(tqq9_fklx)){
|
||||
fklx = 0;
|
||||
}else if("B".equals(tqq9_fklx)){
|
||||
if("B".equals(tqq9_fklx)){
|
||||
fklx = 1;
|
||||
}else if("C".equals(tqq9_fklx)){
|
||||
fklx = 2;
|
||||
|
|
@ -1306,9 +1246,7 @@ public class FWImpl {
|
|||
DynamicObject tqq9_fktj = bill.getDynamicObject("tqq9_fktj");
|
||||
if(tqq9_fktj != null){
|
||||
String number = tqq9_fktj.getString("number");
|
||||
if("003".equals(number)){
|
||||
fktj = 0;
|
||||
}else if("002".equals(number)){
|
||||
if("002".equals(number)){
|
||||
fktj = 1;
|
||||
}else if("001".equals(number)){
|
||||
fktj = 2;
|
||||
|
|
@ -1406,9 +1344,7 @@ public class FWImpl {
|
|||
|
||||
List<JSONObject> elist = Arrays.asList(e1,e2,e3,e4,e5,e6,e7,e8);
|
||||
JSONArray recordsArr = new JSONArray();
|
||||
for (JSONObject obj : elist) {
|
||||
recordsArr.add(obj);
|
||||
}
|
||||
recordsArr.addAll(elist);
|
||||
|
||||
JSONObject recordObj = new JSONObject();
|
||||
recordObj.put("recordOrder", 0);
|
||||
|
|
@ -1525,7 +1461,7 @@ public class FWImpl {
|
|||
String fileName = (String) attachment.get("name");
|
||||
// filePath = filePath.replace("127.0.0.1:8881", "10.200.30.186:8022");
|
||||
byte[] bytes = HttpUtil.downloadBytes(filePath);
|
||||
String str = cn.hutool.core.codec.Base64.encode(bytes);
|
||||
String str = "base64:" + cn.hutool.core.codec.Base64.encode(bytes);
|
||||
JSONObject fj = new JSONObject();
|
||||
fj.put("filePath", str);
|
||||
fj.put("fileName", fileName);
|
||||
|
|
@ -1539,15 +1475,455 @@ public class FWImpl {
|
|||
mlist.add(fjObj);
|
||||
}
|
||||
JSONArray mainArr = new JSONArray();
|
||||
for (JSONObject obj : mlist) {
|
||||
mainArr.add(obj);
|
||||
}
|
||||
mainArr.addAll(mlist);
|
||||
|
||||
String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_FKSQD");
|
||||
FWRestfulUtils fwRestfulUtils = new FWRestfulUtils();
|
||||
//如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口
|
||||
String resultStr = fwRestfulUtils.doBillAction(mainArr, detailRootArr, "付款申请单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid);
|
||||
return resultStr;
|
||||
return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "付款申请单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 采购订单变更单推送泛微
|
||||
*/
|
||||
public static String pushFwPurChange(DynamicObject bill){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String tqq9_fwrequestid = bill.getString("tqq9_fwrequestid");//泛微流程ID
|
||||
String ycgddh = bill.getString("billno");
|
||||
String lcbh = bill.getString("changebillno");
|
||||
DynamicObject creator = bill.getDynamicObject("creator");
|
||||
creator = BusinessDataServiceHelper.loadSingle(creator.getPkValue(), "bos_user", "tqq9_fwuserid,id,number");
|
||||
String cjr = creator.getString("tqq9_fwuserid");
|
||||
String cjbm = null;
|
||||
DynamicObject tqq9_dept = bill.getDynamicObject("tqq9_dept");
|
||||
if(tqq9_dept != null){
|
||||
String number = tqq9_dept.getString("number");
|
||||
cjbm = FWUtils.getFwOrgNumberByKdOrgNumber(number);
|
||||
}
|
||||
Date changebizdate = bill.getDate("changebizdate");
|
||||
String cjrq = sdf.format(changebizdate);
|
||||
DynamicObject org = bill.getDynamicObject("org");
|
||||
String orgnumber = org.getString("number");
|
||||
String ywgz = FWUtils.getFwOrgNumberByKdOrgNumber(orgnumber);
|
||||
DynamicObject billtype = bill.getDynamicObject("billtype");
|
||||
String cglx = bill.getString("tqq9_cglx");
|
||||
int cgyt = 0;
|
||||
String tqq9_cgyt = bill.getString("tqq9_cgyt");
|
||||
if("CGT001".equals(tqq9_cgyt)){
|
||||
cgyt = 1;
|
||||
}
|
||||
Date tqq9_datefield = bill.getDate("tqq9_datefield");
|
||||
String yjfhsj = sdf.format(tqq9_datefield);
|
||||
int fktj = 0;
|
||||
DynamicObject paycondition = bill.getDynamicObject("paycondition");
|
||||
if(paycondition != null){
|
||||
String number = paycondition.getString("number");
|
||||
if("002".equals(number)){
|
||||
fktj = 1;
|
||||
}else if("001".equals(number)){
|
||||
fktj = 2;
|
||||
}else if("004".equals(number)){
|
||||
fktj = 3;
|
||||
}
|
||||
}
|
||||
int jsfs = 0;
|
||||
DynamicObject settletype = bill.getDynamicObject("settletype");
|
||||
if(settletype != null){
|
||||
String number = settletype.getString("number");
|
||||
if("JSFS04".equals(number)){
|
||||
jsfs = 1;
|
||||
}else if("JSFS08".equals(number) || "JSFS16_S".equals(number)){
|
||||
jsfs = 2;
|
||||
}else if("JSFS09".equals(number) || "JSFS12".equals(number)){
|
||||
jsfs = 3;
|
||||
}else if("LC001".equals(number)){
|
||||
jsfs = 4;
|
||||
}
|
||||
}
|
||||
boolean tqq9_sfsyhf = bill.getBoolean("tqq9_sfsyhf");//货返
|
||||
String hfxx = "";
|
||||
if(tqq9_sfsyhf){
|
||||
hfxx = "货返信息:";
|
||||
String tqq9_hshfsygs = bill.getString("tqq9_hshfsygs");
|
||||
if("A".equals(tqq9_hshfsygs)){
|
||||
//本年
|
||||
hfxx = hfxx + "含税货返使用归属为本年,";
|
||||
}else{
|
||||
//上年
|
||||
hfxx = hfxx + "含税货返使用归属为上年,";
|
||||
}
|
||||
BigDecimal tqq9_hshfsyje = bill.getBigDecimal("tqq9_hshfsyje");
|
||||
hfxx = hfxx + "含税货返使用金额"+tqq9_hshfsyje+"元,";
|
||||
BigDecimal tqq9_hshfzje = bill.getBigDecimal("tqq9_hshfzje");
|
||||
hfxx = hfxx + "含税货返总金额"+tqq9_hshfzje+"元,";
|
||||
BigDecimal tqq9_hshfkyje = bill.getBigDecimal("tqq9_hshfkyje");
|
||||
hfxx = hfxx + "含税货返可用金额"+tqq9_hshfkyje+"元,";
|
||||
DynamicObject tqq9_hshfsysl = bill.getDynamicObject("tqq9_hshfsysl");
|
||||
String taxRateStr = "0";
|
||||
if(tqq9_hshfsysl != null){
|
||||
String number = tqq9_hshfsysl.getString("number");
|
||||
taxRateStr = number.substring(1);
|
||||
}
|
||||
hfxx = hfxx + "含税货返使用税率"+taxRateStr+"%。";
|
||||
}
|
||||
boolean tqq9_sfsyxf = bill.getBoolean("tqq9_sfsyxf");//现返
|
||||
String xfxx = "";
|
||||
if(tqq9_sfsyxf){
|
||||
xfxx = "现返信息:";
|
||||
String tqq9_hsxfsygs = bill.getString("tqq9_hsxfsygs");
|
||||
if("A".equals(tqq9_hsxfsygs)){
|
||||
//本年
|
||||
xfxx = xfxx + "含税现返使用归属为本年,";
|
||||
}else{
|
||||
//上年
|
||||
xfxx = xfxx + "含税现返使用归属为本年,";
|
||||
}
|
||||
BigDecimal tqq9_hsxfsyje = bill.getBigDecimal("tqq9_hsxfsyje");
|
||||
xfxx = xfxx + "含税现返使用金额"+tqq9_hsxfsyje+"元,";
|
||||
BigDecimal tqq9_hsxfzje = bill.getBigDecimal("tqq9_hsxfzje");
|
||||
xfxx = xfxx + "含税现返总金额"+tqq9_hsxfzje+"元,";
|
||||
BigDecimal tqq9_hsxfkyje = bill.getBigDecimal("tqq9_hsxfkyje");
|
||||
xfxx = xfxx + "含税现返可用金额"+tqq9_hsxfkyje+"元,";
|
||||
DynamicObject tqq9_hsxfsysl = bill.getDynamicObject("tqq9_hsxfsysl");
|
||||
String taxRateStr = "0";
|
||||
if(tqq9_hsxfsysl != null){
|
||||
String number = tqq9_hsxfsysl.getString("number");
|
||||
taxRateStr = number.substring(1);
|
||||
}
|
||||
xfxx = xfxx + "含税现返使用税率"+taxRateStr+"%。";
|
||||
}
|
||||
BigDecimal zkqjshj = bill.getBigDecimal("tqq9_totalamount");
|
||||
BigDecimal yhzkje = bill.getBigDecimal("tqq9_discountamount");
|
||||
BigDecimal zkhjshj = bill.getBigDecimal("totalallamount");
|
||||
BigDecimal zkhflhjshj = bill.getBigDecimal("tqq9_payamount");
|
||||
BigDecimal yyfje = bill.getBigDecimal("paidpreallamount");
|
||||
BigDecimal yfje = bill.getBigDecimal("paidallamount");
|
||||
BigDecimal zflhzkje = bill.getBigDecimal("tqq9_alldiscountamt");
|
||||
BigDecimal lswdhzl = bill.getBigDecimal("tqq9_lswdhsl");
|
||||
BigDecimal lswdhze = bill.getBigDecimal("tqq9_lswdhje");
|
||||
BigDecimal ddje = bill.getBigDecimal("tqq9_orderamount");
|
||||
String bgyy = bill.getString("changereason");
|
||||
String dhgys = null;
|
||||
DynamicObject supplier = bill.getDynamicObject("supplier");
|
||||
if(supplier != null){
|
||||
dhgys = supplier.getString("number");
|
||||
}
|
||||
String khlxr = bill.getString("tqq9_khlxr");
|
||||
String khlxrdh = bill.getString("tqq9_khlxdh");
|
||||
String khlxdz = bill.getString("tqq9_khlxdz");
|
||||
String shck = null;
|
||||
|
||||
//明细
|
||||
JSONObject detail1 = new JSONObject();
|
||||
JSONArray recordsArr1 = new JSONArray();
|
||||
DynamicObjectCollection billentries = bill.getDynamicObjectCollection("billentry");
|
||||
for (DynamicObject billentry : billentries) {
|
||||
BigDecimal jshj = billentry.getBigDecimal("amountandtax");
|
||||
DynamicObject material = billentry.getDynamicObject("material");
|
||||
DynamicObject masterid = material.getDynamicObject("masterid");
|
||||
masterid = BusinessDataServiceHelper.loadSingle(masterid.getPkValue(), masterid.getDynamicObjectType().getName());
|
||||
DynamicObject tqq9_brand = billentry.getDynamicObject("tqq9_brand");
|
||||
String pp = null;
|
||||
if(tqq9_brand != null){
|
||||
pp = tqq9_brand.getString("name");
|
||||
}
|
||||
String ggxh = masterid.getString("modelnum");
|
||||
DynamicObject unit = billentry.getDynamicObject("unit");
|
||||
String jldw = null;
|
||||
if(unit != null){
|
||||
jldw = unit.getString("name");
|
||||
}
|
||||
String wlmc = masterid.getString("number");
|
||||
String wlbm = masterid.getString("number");
|
||||
BigDecimal sl = billentry.getBigDecimal("qty");
|
||||
BigDecimal hsdj = billentry.getBigDecimal("priceandtax");
|
||||
BigDecimal tax_rate = billentry.getBigDecimal("taxrate");
|
||||
BigDecimal zkqjshj_e = billentry.getBigDecimal("tqq9_amount");
|
||||
BigDecimal zkhjshj_e = billentry.getBigDecimal("amountandtax");
|
||||
BigDecimal yhzkje_e = billentry.getBigDecimal("tqq9_disamount");
|
||||
BigDecimal hfsyje = billentry.getBigDecimal("tqq9_hfamount");
|
||||
BigDecimal xfsyje = billentry.getBigDecimal("tqq9_xfamount");
|
||||
BigDecimal zkhflhjshj_e = billentry.getBigDecimal("tqq9_zkflhjshj");
|
||||
BigDecimal cb = billentry.getBigDecimal("tqq9_costprice");
|
||||
BigDecimal yjxssjy = billentry.getBigDecimal("tqq9_expectsaletime");
|
||||
BigDecimal sc83zsj = billentry.getBigDecimal("tqq9_dis83price");
|
||||
String bz = billentry.getString("entrycomment");
|
||||
boolean ispresent = billentry.getBoolean("ispresent");
|
||||
int sfzp = 0;
|
||||
if(ispresent){
|
||||
sfzp = 1;
|
||||
}
|
||||
|
||||
JSONObject e1 = new JSONObject();
|
||||
e1.put("fieldName", "wlbm");
|
||||
e1.put("fieldValue", wlbm);
|
||||
JSONObject e2 = new JSONObject();
|
||||
e2.put("fieldName", "pp");
|
||||
e2.put("fieldValue", pp);
|
||||
JSONObject e3 = new JSONObject();
|
||||
e3.put("fieldName", "ggxh");
|
||||
e3.put("fieldValue", ggxh);
|
||||
JSONObject e4 = new JSONObject();
|
||||
e4.put("fieldName", "jldw");
|
||||
e4.put("fieldValue", jldw);
|
||||
JSONObject e5 = new JSONObject();
|
||||
e5.put("fieldName", "sl");
|
||||
e5.put("fieldValue", sl!=null&&sl.compareTo(BigDecimal.ZERO)!=0?sl:0);
|
||||
JSONObject e6 = new JSONObject();
|
||||
e6.put("fieldName", "hsdj");
|
||||
e6.put("fieldValue", hsdj!=null&&hsdj.compareTo(BigDecimal.ZERO)!=0?hsdj:0);
|
||||
JSONObject e7 = new JSONObject();
|
||||
e7.put("fieldName", "tax_rate");
|
||||
e7.put("fieldValue", tax_rate!=null&&tax_rate.compareTo(BigDecimal.ZERO)!=0?tax_rate:0);
|
||||
JSONObject e8 = new JSONObject();
|
||||
e8.put("fieldName", "zkqjshj");
|
||||
e8.put("fieldValue", zkqjshj_e!=null&&zkqjshj_e.compareTo(BigDecimal.ZERO)!=0?zkqjshj_e:0);
|
||||
JSONObject e9 = new JSONObject();
|
||||
e9.put("fieldName", "yhzkje");
|
||||
e9.put("fieldValue", yhzkje_e!=null&&yhzkje_e.compareTo(BigDecimal.ZERO)!=0?yhzkje_e:0);
|
||||
JSONObject e10 = new JSONObject();
|
||||
e10.put("fieldName", "zkhjshj");
|
||||
e10.put("fieldValue", zkhjshj_e!=null&&zkhjshj_e.compareTo(BigDecimal.ZERO)!=0?zkhjshj_e:0);
|
||||
JSONObject e11 = new JSONObject();
|
||||
e11.put("fieldName", "hfsyje");
|
||||
e11.put("fieldValue", hfsyje!=null&&hfsyje.compareTo(BigDecimal.ZERO)!=0?hfsyje:0);
|
||||
JSONObject e12 = new JSONObject();
|
||||
e12.put("fieldName", "xfsyje");
|
||||
e12.put("fieldValue", xfsyje!=null&&xfsyje.compareTo(BigDecimal.ZERO)!=0?xfsyje:0);
|
||||
JSONObject e13 = new JSONObject();
|
||||
e13.put("fieldName", "zkhflhjshj");
|
||||
e13.put("fieldValue", zkhflhjshj_e!=null&&zkhflhjshj_e.compareTo(BigDecimal.ZERO)!=0?zkhflhjshj_e:0);
|
||||
JSONObject e14 = new JSONObject();
|
||||
e14.put("fieldName", "cb");
|
||||
e14.put("fieldValue", cb!=null&&cb.compareTo(BigDecimal.ZERO)!=0?cb:0);
|
||||
JSONObject e15 = new JSONObject();
|
||||
e15.put("fieldName", "yjxssjy");
|
||||
e15.put("fieldValue", yjxssjy!=null&&yjxssjy.compareTo(BigDecimal.ZERO)!=0?yjxssjy:0);
|
||||
JSONObject e16 = new JSONObject();
|
||||
e16.put("fieldName", "bz");
|
||||
e16.put("fieldValue", bz);
|
||||
JSONObject e17 = new JSONObject();
|
||||
e17.put("fieldName", "wlmc");
|
||||
e17.put("fieldValue", wlmc);
|
||||
JSONObject e18 = new JSONObject();
|
||||
e18.put("fieldName", "sfzp");
|
||||
e18.put("fieldValue", sfzp);
|
||||
JSONObject e19 = new JSONObject();
|
||||
e19.put("fieldName", "sc83zsj");
|
||||
e19.put("fieldValue", sc83zsj != null && sc83zsj.compareTo(BigDecimal.ZERO) != 0?sc83zsj:0);
|
||||
JSONObject e20 = new JSONObject();
|
||||
e20.put("fieldName", "jshj");
|
||||
e20.put("fieldValue", jshj!=null&&jshj.compareTo(BigDecimal.ZERO)!=0?jshj:0);
|
||||
|
||||
List<JSONObject> elist = Arrays.asList(e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15,e16,e17,e18,e19,e20);
|
||||
JSONArray recordsArr = new JSONArray();
|
||||
recordsArr.addAll(elist);
|
||||
|
||||
JSONObject recordObj = new JSONObject();
|
||||
recordObj.put("recordOrder", 0);
|
||||
recordObj.put("workflowRequestTableFields", recordsArr);
|
||||
|
||||
recordsArr1.add(recordObj);
|
||||
|
||||
DynamicObject warehouse = billentry.getDynamicObject("warehouse");
|
||||
shck = warehouse.getString("number");//shck
|
||||
}
|
||||
detail1.put("tableDBName", "formtable_main_98_dt1");
|
||||
detail1.put("workflowRequestTableRecords", recordsArr1);
|
||||
if(StringUtils.isNotBlank(tqq9_fwrequestid)){
|
||||
detail1.put("deleteAll", "1");
|
||||
}
|
||||
|
||||
|
||||
//预付明细
|
||||
JSONObject detail12 = new JSONObject();
|
||||
JSONArray recordsArr2 = new JSONArray();
|
||||
DynamicObjectCollection purEntries = bill.getDynamicObjectCollection("purbillentry_pay");
|
||||
for (DynamicObject purEntry : purEntries) {
|
||||
String kxmc = null;
|
||||
DynamicObject payname = purEntry.getDynamicObject("payname");
|
||||
if(payname != null){
|
||||
kxmc = payname.getString("name");
|
||||
}
|
||||
String fkrq = null;
|
||||
Date paydate = purEntry.getDate("paydate");
|
||||
if(paydate != null){
|
||||
fkrq = sdf.format(paydate);
|
||||
}
|
||||
BigDecimal fkbl = purEntry.getBigDecimal("payrate");
|
||||
BigDecimal fkje = purEntry.getBigDecimal("payamount");
|
||||
int sfyf = 1;
|
||||
boolean isprepay = purEntry.getBoolean("isprepay");
|
||||
if(isprepay){
|
||||
sfyf = 0;
|
||||
}
|
||||
String yfsd = null;
|
||||
String pretimepoint = purEntry.getString("pretimepoint");
|
||||
if("A".equals(pretimepoint)){
|
||||
yfsd = "采购合同";
|
||||
}else if("B".equals(pretimepoint)){
|
||||
yfsd = "采购订单";
|
||||
}
|
||||
|
||||
BigDecimal glfkje = purEntry.getBigDecimal("joinpayamount");
|
||||
BigDecimal yfje_p = purEntry.getBigDecimal("paidamount");
|
||||
BigDecimal bcjsje = purEntry.getBigDecimal("tqq9_settleamount");
|
||||
String fkd = purEntry.getString("tqq9_paybillno");
|
||||
|
||||
JSONObject p1 = new JSONObject();
|
||||
p1.put("fieldName", "kxmc");
|
||||
p1.put("fieldValue", kxmc);
|
||||
JSONObject p2 = new JSONObject();
|
||||
p2.put("fieldName", "fkbl");
|
||||
p2.put("fieldValue", fkbl);
|
||||
JSONObject p3 = new JSONObject();
|
||||
p3.put("fieldName", "fkje");
|
||||
p3.put("fieldValue", fkje!= null && fkje.compareTo(BigDecimal.ZERO) != 0?fkje:0);
|
||||
JSONObject p4 = new JSONObject();
|
||||
p4.put("fieldName", "sfyf");
|
||||
p4.put("fieldValue", sfyf);
|
||||
JSONObject p5 = new JSONObject();
|
||||
p5.put("fieldName", "yfsd");
|
||||
p5.put("fieldValue", yfsd);
|
||||
JSONObject p6 = new JSONObject();
|
||||
p6.put("fieldName", "glfkje");
|
||||
p6.put("fieldValue", glfkje);
|
||||
JSONObject p7 = new JSONObject();
|
||||
p7.put("fieldName", "yfje");
|
||||
p7.put("fieldValue", yfje_p!= null && yfje_p.compareTo(BigDecimal.ZERO) != 0?yfje_p:0);
|
||||
JSONObject p8 = new JSONObject();
|
||||
p8.put("fieldName", "bcjsje");
|
||||
p8.put("fieldValue", bcjsje!= null && bcjsje.compareTo(BigDecimal.ZERO) != 0?bcjsje:0);
|
||||
JSONObject p9 = new JSONObject();
|
||||
p9.put("fieldName", "fkd");
|
||||
p9.put("fieldValue", "FKD234124");
|
||||
JSONObject p10 = new JSONObject();
|
||||
p10.put("fieldName", "fkrq");
|
||||
p10.put("fieldValue", fkrq);
|
||||
|
||||
List<JSONObject> plist = Arrays.asList(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10);
|
||||
JSONArray recordsArr = new JSONArray();
|
||||
recordsArr.addAll(plist);
|
||||
JSONObject recordObj = new JSONObject();
|
||||
recordObj.put("recordOrder", 0);
|
||||
recordObj.put("workflowRequestTableFields", recordsArr);
|
||||
recordsArr2.add(recordObj);
|
||||
}
|
||||
detail12.put("tableDBName", "formtable_main_98_dt2");
|
||||
detail12.put("workflowRequestTableRecords", recordsArr2);
|
||||
if(StringUtils.isNotBlank(tqq9_fwrequestid)){
|
||||
detail12.put("deleteAll", "1");
|
||||
}
|
||||
JSONArray detailRootArr = new JSONArray();
|
||||
detailRootArr.add(detail1);
|
||||
detailRootArr.add(detail12);
|
||||
|
||||
|
||||
//构建主表数据
|
||||
JSONObject m1 = new JSONObject();
|
||||
m1.put("fieldName", "KDBillType");
|
||||
m1.put("fieldValue", "pm_xspurorderbill");
|
||||
JSONObject m2 = new JSONObject();
|
||||
m2.put("fieldName", "lcbh");
|
||||
m2.put("fieldValue", lcbh);
|
||||
JSONObject m3 = new JSONObject();
|
||||
m3.put("fieldName", "cjr");
|
||||
m3.put("fieldValue", cjr);
|
||||
JSONObject m4 = new JSONObject();
|
||||
m4.put("fieldName", "cjbm");
|
||||
m4.put("fieldValue", cjbm);
|
||||
JSONObject m5 = new JSONObject();
|
||||
m5.put("fieldName", "cjrq");
|
||||
m5.put("fieldValue", cjrq);
|
||||
JSONObject m6 = new JSONObject();
|
||||
m6.put("fieldName", "ywgz");
|
||||
m6.put("fieldValue", ywgz);
|
||||
JSONObject m7 = new JSONObject();
|
||||
m7.put("fieldName", "cglx");
|
||||
m7.put("fieldValue", cglx);
|
||||
JSONObject m8 = new JSONObject();
|
||||
m8.put("fieldName", "cgzz");
|
||||
m8.put("fieldValue", ywgz);
|
||||
JSONObject m9 = new JSONObject();
|
||||
m9.put("fieldName", "cgyt");
|
||||
m9.put("fieldValue", cgyt);
|
||||
JSONObject m10 = new JSONObject();
|
||||
m10.put("fieldName", "yjfhsj");
|
||||
m10.put("fieldValue", yjfhsj);
|
||||
JSONObject m11 = new JSONObject();
|
||||
m11.put("fieldName", "fktj");
|
||||
m11.put("fieldValue", fktj);
|
||||
JSONObject m12 = new JSONObject();
|
||||
m12.put("fieldName", "jsfs");
|
||||
m12.put("fieldValue", jsfs);
|
||||
JSONObject m13 = new JSONObject();
|
||||
m13.put("fieldName", "hfxx");
|
||||
m13.put("fieldValue", hfxx);
|
||||
JSONObject m14 = new JSONObject();
|
||||
m14.put("fieldName", "xfxx");
|
||||
m14.put("fieldValue", xfxx);
|
||||
JSONObject m15 = new JSONObject();
|
||||
m15.put("fieldName", "zkqjshj");
|
||||
m15.put("fieldValue", zkqjshj!=null&&zkqjshj.compareTo(BigDecimal.ZERO)!=0?zkqjshj:0);
|
||||
JSONObject m16 = new JSONObject();
|
||||
m16.put("fieldName", "yhzkje");
|
||||
m16.put("fieldValue", yhzkje!=null&&yhzkje.compareTo(BigDecimal.ZERO)!=0?yhzkje:0);
|
||||
JSONObject m17 = new JSONObject();
|
||||
m17.put("fieldName", "zkhjshj");
|
||||
m17.put("fieldValue", zkhjshj!=null&&zkhjshj.compareTo(BigDecimal.ZERO)!=0?zkhjshj:0);
|
||||
JSONObject m18 = new JSONObject();
|
||||
m18.put("fieldName", "zkhflhjshj");
|
||||
m18.put("fieldValue", zkhflhjshj!=null&&zkhflhjshj.compareTo(BigDecimal.ZERO)!=0?zkhflhjshj:0);
|
||||
JSONObject m19 = new JSONObject();
|
||||
m19.put("fieldName", "yyfje");
|
||||
m19.put("fieldValue", yyfje!=null&&yyfje.compareTo(BigDecimal.ZERO)!=0?yyfje:0);
|
||||
JSONObject m20 = new JSONObject();
|
||||
m20.put("fieldName", "yfje");
|
||||
m20.put("fieldValue", yfje!=null&&yfje.compareTo(BigDecimal.ZERO)!=0?yfje:0);
|
||||
JSONObject m21 = new JSONObject();
|
||||
m21.put("fieldName", "zflhzkje");
|
||||
m21.put("fieldValue", zflhzkje==null||zflhzkje.compareTo(BigDecimal.ZERO)==0?0:zflhzkje);
|
||||
JSONObject m22 = new JSONObject();
|
||||
m22.put("fieldName", "lswdhzl");
|
||||
m22.put("fieldValue", lswdhzl==null||lswdhzl.compareTo(BigDecimal.ZERO)==0?0:lswdhzl);
|
||||
JSONObject m23 = new JSONObject();
|
||||
m23.put("fieldName", "lswdhze");
|
||||
m23.put("fieldValue", lswdhze==null||lswdhze.compareTo(BigDecimal.ZERO)==0?0:lswdhze);
|
||||
JSONObject m24 = new JSONObject();
|
||||
m24.put("fieldName", "ddje");
|
||||
m24.put("fieldValue", ddje==null||ddje.compareTo(BigDecimal.ZERO)==0?0:ddje);
|
||||
JSONObject m25 = new JSONObject();
|
||||
m25.put("fieldName", "ycgddh");
|
||||
m25.put("fieldValue", ycgddh);
|
||||
JSONObject m26 = new JSONObject();
|
||||
m26.put("fieldName", "bgyy");
|
||||
m26.put("fieldValue", bgyy);
|
||||
JSONObject m27 = new JSONObject();
|
||||
m27.put("fieldName", "dhgys");
|
||||
m27.put("fieldValue", dhgys);
|
||||
JSONObject m28 = new JSONObject();
|
||||
m28.put("fieldName", "khlxr");
|
||||
m28.put("fieldValue", khlxr);
|
||||
JSONObject m29 = new JSONObject();
|
||||
m29.put("fieldName", "khlxrdh");
|
||||
m29.put("fieldValue", khlxrdh);
|
||||
JSONObject m30 = new JSONObject();
|
||||
m30.put("fieldName", "khlxdz");
|
||||
m30.put("fieldValue", khlxdz);
|
||||
JSONObject m31 = new JSONObject();
|
||||
m31.put("fieldName", "shck");
|
||||
m31.put("fieldValue", shck);
|
||||
|
||||
List<JSONObject> mlist = new ArrayList<>(Arrays.asList(m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15,m16,
|
||||
m17,m18,m19,m20,m21,m22,m23,m24,m25,m26,m27,m28,m29,m30,m31));
|
||||
JSONArray mainArr = new JSONArray();
|
||||
mainArr.addAll(mlist);
|
||||
String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_BGCGD");
|
||||
FWRestfulUtils fwRestfulUtils = new FWRestfulUtils();
|
||||
//如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口
|
||||
return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "变更采购单流程", fw_wfid_xzcgdd, lcbh, tqq9_fwrequestid);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue