【泛微接口】处理采购合同变更,盘点表部门的问题;处理采购申请的仓库问题
This commit is contained in:
parent
1992ce895f
commit
5729ff50ba
|
|
@ -72,7 +72,6 @@ public class FWImpl {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购供应商推送泛微
|
* 采购供应商推送泛微
|
||||||
*
|
|
||||||
* @param bill
|
* @param bill
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -621,7 +620,6 @@ public class FWImpl {
|
||||||
String tqq9_dzhdbh = dataEntity.getString("tqq9_dzhdbh");//电子回单编号
|
String tqq9_dzhdbh = dataEntity.getString("tqq9_dzhdbh");//电子回单编号
|
||||||
String tqq9_digital_receipt = dataEntity.getString("tqq9_digital_receipt");//电子回单编号
|
String tqq9_digital_receipt = dataEntity.getString("tqq9_digital_receipt");//电子回单编号
|
||||||
String filename = "";
|
String filename = "";
|
||||||
String content = null;
|
|
||||||
if(StringUtils.isNotBlank(tqq9_digital_receipt)){
|
if(StringUtils.isNotBlank(tqq9_digital_receipt)){
|
||||||
HttpRequest request = HttpRequest.get(tqq9_digital_receipt);
|
HttpRequest request = HttpRequest.get(tqq9_digital_receipt);
|
||||||
HttpResponse response = request.execute();
|
HttpResponse response = request.execute();
|
||||||
|
|
@ -629,7 +627,7 @@ public class FWImpl {
|
||||||
if (contentDisposition != null && contentDisposition.contains("filename=")) {
|
if (contentDisposition != null && contentDisposition.contains("filename=")) {
|
||||||
filename = contentDisposition.split("filename=")[1].replace("\"", "");
|
filename = contentDisposition.split("filename=")[1].replace("\"", "");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// List<Map<String, Object>> attachments = AttachmentServiceHelper.getAttachments("cas_paybill", dataEntity.getPkValue(), "attachmentpanel");
|
// List<Map<String, Object>> attachments = AttachmentServiceHelper.getAttachments("cas_paybill", dataEntity.getPkValue(), "attachmentpanel");
|
||||||
// for (Map<String, Object> attachment : attachments) {
|
// for (Map<String, Object> attachment : attachments) {
|
||||||
|
|
@ -637,7 +635,7 @@ public class FWImpl {
|
||||||
// System.out.println();
|
// System.out.println();
|
||||||
// }
|
// }
|
||||||
byte[] bytes = HttpUtil.downloadBytes(tqq9_digital_receipt);
|
byte[] bytes = HttpUtil.downloadBytes(tqq9_digital_receipt);
|
||||||
content = cn.hutool.core.codec.Base64.encode(bytes);
|
String content = cn.hutool.core.codec.Base64.encode(bytes);
|
||||||
if(StringUtils.isBlank(filename)){
|
if(StringUtils.isBlank(filename)){
|
||||||
filename = "银行电子回单"+new Date().getTime();
|
filename = "银行电子回单"+new Date().getTime();
|
||||||
String hz = ".jpg";
|
String hz = ".jpg";
|
||||||
|
|
@ -650,7 +648,7 @@ public class FWImpl {
|
||||||
}
|
}
|
||||||
filename = filename + hz;
|
filename = filename + hz;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
JSONObject mainTable = new JSONObject();
|
JSONObject mainTable = new JSONObject();
|
||||||
mainTable.put("lcid", tqq9_fwrequestid);
|
mainTable.put("lcid", tqq9_fwrequestid);
|
||||||
mainTable.put("fkzt", fkzt);
|
mainTable.put("fkzt", fkzt);
|
||||||
|
|
@ -931,7 +929,7 @@ public class FWImpl {
|
||||||
recordsArr1.add(recordObj);
|
recordsArr1.add(recordObj);
|
||||||
|
|
||||||
DynamicObject warehouse = billentry.getDynamicObject("warehouse");
|
DynamicObject warehouse = billentry.getDynamicObject("warehouse");
|
||||||
shck = warehouse.getString("number") + "<>" + org.getString("number");//shck
|
shck = warehouse.getString("number")+"_"+org.getString("number");//shck
|
||||||
}
|
}
|
||||||
detail1.put("tableDBName", "formtable_main_97_dt1");
|
detail1.put("tableDBName", "formtable_main_97_dt1");
|
||||||
detail1.put("workflowRequestTableRecords", recordsArr1);
|
detail1.put("workflowRequestTableRecords", recordsArr1);
|
||||||
|
|
@ -1271,13 +1269,13 @@ public class FWImpl {
|
||||||
e4.put("fieldValue", jldw);
|
e4.put("fieldValue", jldw);
|
||||||
JSONObject e5 = new JSONObject();
|
JSONObject e5 = new JSONObject();
|
||||||
e5.put("fieldName", "sl");
|
e5.put("fieldName", "sl");
|
||||||
e5.put("fieldValue", sl);
|
e5.put("fieldValue", sl!=null&&sl.compareTo(BigDecimal.ZERO)!=0?sl:0);
|
||||||
JSONObject e6 = new JSONObject();
|
JSONObject e6 = new JSONObject();
|
||||||
e6.put("fieldName", "bhsdj");
|
e6.put("fieldName", "bhsdj");
|
||||||
e6.put("fieldValue", bhsdj);
|
e6.put("fieldValue", bhsdj!=null&&bhsdj.compareTo(BigDecimal.ZERO)!=0?bhsdj:0);
|
||||||
JSONObject e7 = new JSONObject();
|
JSONObject e7 = new JSONObject();
|
||||||
e7.put("fieldName", "je");
|
e7.put("fieldName", "je");
|
||||||
e7.put("fieldValue", je);
|
e7.put("fieldValue", je!=null&&je.compareTo(BigDecimal.ZERO)!=0?je:0);
|
||||||
JSONObject e15 = new JSONObject();
|
JSONObject e15 = new JSONObject();
|
||||||
e15.put("fieldName", "sfzp");
|
e15.put("fieldName", "sfzp");
|
||||||
e15.put("fieldValue", sfzp);
|
e15.put("fieldValue", sfzp);
|
||||||
|
|
@ -1295,7 +1293,7 @@ public class FWImpl {
|
||||||
//入库仓库
|
//入库仓库
|
||||||
DynamicObject warehouse = billentry.getDynamicObject("warehouse");
|
DynamicObject warehouse = billentry.getDynamicObject("warehouse");
|
||||||
if(warehouse != null){
|
if(warehouse != null){
|
||||||
rkck = warehouse.getString("number") + "<>" + orgNumber;
|
rkck = warehouse.getString("number")+"_"+orgNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
detail1.put("tableDBName", "formtable_main_110_dt2");
|
detail1.put("tableDBName", "formtable_main_110_dt2");
|
||||||
|
|
@ -1348,7 +1346,7 @@ public class FWImpl {
|
||||||
m16.put("fieldValue", sqyybz);
|
m16.put("fieldValue", sqyybz);
|
||||||
JSONObject m17 = new JSONObject();
|
JSONObject m17 = new JSONObject();
|
||||||
m17.put("fieldName", "hzje");
|
m17.put("fieldName", "hzje");
|
||||||
m17.put("fieldValue", hzje);
|
m17.put("fieldValue", hzje!=null&&hzje.compareTo(BigDecimal.ZERO)!=0?hzje:0);
|
||||||
JSONObject m18 = new JSONObject();
|
JSONObject m18 = new JSONObject();
|
||||||
m18.put("fieldName", "shdh");
|
m18.put("fieldName", "shdh");
|
||||||
m18.put("fieldValue", shdh);
|
m18.put("fieldValue", shdh);
|
||||||
|
|
@ -1597,10 +1595,10 @@ public class FWImpl {
|
||||||
e5.put("fieldValue", sl);
|
e5.put("fieldValue", sl);
|
||||||
JSONObject e6 = new JSONObject();
|
JSONObject e6 = new JSONObject();
|
||||||
e6.put("fieldName", "bhsdj");
|
e6.put("fieldName", "bhsdj");
|
||||||
e6.put("fieldValue", bhsdj);
|
e6.put("fieldValue", bhsdj!=null&&bhsdj.compareTo(BigDecimal.ZERO)!=0?bhsdj:0);
|
||||||
JSONObject e7 = new JSONObject();
|
JSONObject e7 = new JSONObject();
|
||||||
e7.put("fieldName", "je");
|
e7.put("fieldName", "je");
|
||||||
e7.put("fieldValue", je);
|
e7.put("fieldValue", je!=null&&je.compareTo(BigDecimal.ZERO)!=0?je:0);
|
||||||
JSONObject e8 = new JSONObject();
|
JSONObject e8 = new JSONObject();
|
||||||
e8.put("fieldName", "scrq");
|
e8.put("fieldName", "scrq");
|
||||||
e8.put("fieldValue", scrq);
|
e8.put("fieldValue", scrq);
|
||||||
|
|
@ -1688,7 +1686,7 @@ public class FWImpl {
|
||||||
m16.put("fieldValue", sqyybz);
|
m16.put("fieldValue", sqyybz);
|
||||||
JSONObject m17 = new JSONObject();
|
JSONObject m17 = new JSONObject();
|
||||||
m17.put("fieldName", "hzje");
|
m17.put("fieldName", "hzje");
|
||||||
m17.put("fieldValue", hzje);
|
m17.put("fieldValue", hzje!=null&&hzje.compareTo(BigDecimal.ZERO)!=0?hzje:0);
|
||||||
JSONObject m18 = new JSONObject();
|
JSONObject m18 = new JSONObject();
|
||||||
m18.put("fieldName", "shdh");
|
m18.put("fieldName", "shdh");
|
||||||
m18.put("fieldValue", shdh);
|
m18.put("fieldValue", shdh);
|
||||||
|
|
@ -2781,7 +2779,6 @@ public class FWImpl {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购合同推送泛微
|
* 采购合同推送泛微
|
||||||
*
|
|
||||||
* @param bill
|
* @param bill
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -3067,6 +3064,7 @@ public class FWImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
JSONObject e0 = new JSONObject();
|
JSONObject e0 = new JSONObject();
|
||||||
e0.put("fieldName", "flgzdjh");
|
e0.put("fieldName", "flgzdjh");
|
||||||
e0.put("fieldValue", flgzdjh);
|
e0.put("fieldValue", flgzdjh);
|
||||||
|
|
@ -3261,7 +3259,6 @@ public class FWImpl {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购合同变更单
|
* 采购合同变更单
|
||||||
*
|
|
||||||
* @param bill
|
* @param bill
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -3281,7 +3278,15 @@ public class FWImpl {
|
||||||
DynamicObject creator = bill.getDynamicObject("creator");
|
DynamicObject creator = bill.getDynamicObject("creator");
|
||||||
String cjr = null;
|
String cjr = null;
|
||||||
String cjbm = null;
|
String cjbm = null;
|
||||||
DynamicObject tqq9_dept = bill.getDynamicObject("tqq9_dept");
|
creator = BusinessDataServiceHelper.loadSingle(creator.getPkValue(), "bos_user");
|
||||||
|
DynamicObjectCollection entryentity = creator.getDynamicObjectCollection("entryentity");
|
||||||
|
DynamicObject tqq9_dept = null;
|
||||||
|
for (DynamicObject dynamicObject : entryentity) {
|
||||||
|
boolean ispartjob = dynamicObject.getBoolean("ispartjob");
|
||||||
|
if (!ispartjob) {
|
||||||
|
tqq9_dept = dynamicObject.getDynamicObject("dpt");
|
||||||
|
}
|
||||||
|
}
|
||||||
if(tqq9_dept != null){
|
if(tqq9_dept != null){
|
||||||
String deptNumber = tqq9_dept.getString("number");
|
String deptNumber = tqq9_dept.getString("number");
|
||||||
cjbm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber);
|
cjbm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber);
|
||||||
|
|
@ -4106,7 +4111,14 @@ public class FWImpl {
|
||||||
String sqr = null;//申请人
|
String sqr = null;//申请人
|
||||||
String bm = null;//部门
|
String bm = null;//部门
|
||||||
String deptNumber = null;
|
String deptNumber = null;
|
||||||
DynamicObject tqq9_dept = bill.getDynamicObject("tqq9_dept");//创建部门
|
DynamicObjectCollection entryentity = creator.getDynamicObjectCollection("entryentity");
|
||||||
|
DynamicObject tqq9_dept = null;//创建部门
|
||||||
|
for (DynamicObject dynamicObject : entryentity) {
|
||||||
|
boolean ispartjob = dynamicObject.getBoolean("ispartjob");
|
||||||
|
if (!ispartjob) {
|
||||||
|
tqq9_dept = dynamicObject.getDynamicObject("dpt");
|
||||||
|
}
|
||||||
|
}
|
||||||
if (tqq9_dept != null) {
|
if (tqq9_dept != null) {
|
||||||
deptNumber = tqq9_dept.getString("number");
|
deptNumber = tqq9_dept.getString("number");
|
||||||
bm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber);
|
bm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber);
|
||||||
|
|
@ -4266,7 +4278,7 @@ public class FWImpl {
|
||||||
String ck = null;
|
String ck = null;
|
||||||
DynamicObject warehouse = entry.getDynamicObject("warehouse");//仓库
|
DynamicObject warehouse = entry.getDynamicObject("warehouse");//仓库
|
||||||
if (null != warehouse) {
|
if (null != warehouse) {
|
||||||
ck = warehouse.getString("number") + "<>" + orgNumber;
|
ck = warehouse.getString("number")+"_"+orgNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject e1 = new JSONObject();
|
JSONObject e1 = new JSONObject();
|
||||||
|
|
@ -4647,7 +4659,6 @@ public class FWImpl {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增供应商推送泛微
|
* 新增供应商推送泛微
|
||||||
*
|
|
||||||
* @param bill
|
* @param bill
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -4770,7 +4781,7 @@ public class FWImpl {
|
||||||
sfyfrwtsqs = 0;
|
sfyfrwtsqs = 0;
|
||||||
}
|
}
|
||||||
String bz = bill.getString("tqq9_bzgys");
|
String bz = bill.getString("tqq9_bzgys");
|
||||||
String tyshxydm = bill.getString("tqq9_textfield33");
|
String tyshxydm = bill.getString("societycreditcode");
|
||||||
String yyzzbh = bill.getString("tqq9_textfield13");
|
String yyzzbh = bill.getString("tqq9_textfield13");
|
||||||
String fddbr = bill.getString("tqq9_textfield210");
|
String fddbr = bill.getString("tqq9_textfield210");
|
||||||
String clrq = null;
|
String clrq = null;
|
||||||
|
|
@ -5142,7 +5153,7 @@ public class FWImpl {
|
||||||
m43.put("fieldValue", sxrq);
|
m43.put("fieldValue", sxrq);
|
||||||
JSONObject m44 = new JSONObject();
|
JSONObject m44 = new JSONObject();
|
||||||
m44.put("fieldName", "zczb");
|
m44.put("fieldName", "zczb");
|
||||||
m44.put("fieldValue", zczb);
|
m44.put("fieldValue", StringUtils.isNotBlank(zczb)?zczb:0);
|
||||||
JSONObject m45 = new JSONObject();
|
JSONObject m45 = new JSONObject();
|
||||||
m45.put("fieldName", "zs");
|
m45.put("fieldName", "zs");
|
||||||
m45.put("fieldValue", zs);
|
m45.put("fieldValue", zs);
|
||||||
|
|
@ -5384,7 +5395,6 @@ public class FWImpl {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料提交推送泛微
|
* 物料提交推送泛微
|
||||||
*
|
|
||||||
* @param bill
|
* @param bill
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -5878,19 +5888,23 @@ public class FWImpl {
|
||||||
if (tqq9_sup_sh != null) {
|
if (tqq9_sup_sh != null) {
|
||||||
cjgys_sh = tqq9_sup_sh.getString("number");
|
cjgys_sh = tqq9_sup_sh.getString("number");
|
||||||
}
|
}
|
||||||
String gysqyzz_sh = null;
|
String gysqyzz_sh = "";
|
||||||
String tqq9_suparea_sh = bill.getString("tqq9_suparea_sh");
|
String tqq9_suparea_sh = bill.getString("tqq9_suparea_sh");
|
||||||
if ("B".equals(tqq9_suparea_sh)) {
|
if (tqq9_suparea_sh.contains("B")) {
|
||||||
gysqyzz_sh = "0";
|
gysqyzz_sh = gysqyzz_sh + ",0";
|
||||||
} else if ("A".equals(tqq9_suparea_sh)) {
|
}else if (tqq9_suparea_sh.contains("A")) {
|
||||||
gysqyzz_sh = "1";
|
gysqyzz_sh = gysqyzz_sh + ",1";
|
||||||
} else if ("C".equals(tqq9_suparea_sh)) {
|
}else if (tqq9_suparea_sh.contains("C")) {
|
||||||
gysqyzz_sh = "2";
|
gysqyzz_sh = gysqyzz_sh + ",2";
|
||||||
}
|
}
|
||||||
|
if(StringUtils.isNotBlank(gysqyzz_sh)){
|
||||||
|
gysqyzz_sh = gysqyzz_sh.substring(1);
|
||||||
|
}
|
||||||
|
|
||||||
String shck_sh = null;
|
String shck_sh = null;
|
||||||
DynamicObject tqq9_rewares_sh = bill.getDynamicObject("tqq9_rewares_sh");
|
DynamicObject tqq9_rewares_sh = bill.getDynamicObject("tqq9_rewares_sh");
|
||||||
if (tqq9_rewares_sh != null) {
|
if (tqq9_rewares_sh != null) {
|
||||||
shck_sh = tqq9_rewares_sh.getString("number") + "<>" + orgnumber;
|
shck_sh = tqq9_rewares_sh.getString("number")+"_SHLC";
|
||||||
}
|
}
|
||||||
String fktj_sh = null;
|
String fktj_sh = null;
|
||||||
DynamicObject tqq9_paycondition_sh = bill.getDynamicObject("tqq9_paycondition_sh");
|
DynamicObject tqq9_paycondition_sh = bill.getDynamicObject("tqq9_paycondition_sh");
|
||||||
|
|
@ -5972,19 +5986,22 @@ public class FWImpl {
|
||||||
if (tqq9_sup_bj != null) {
|
if (tqq9_sup_bj != null) {
|
||||||
cjgys_bj = tqq9_sup_bj.getString("number");
|
cjgys_bj = tqq9_sup_bj.getString("number");
|
||||||
}
|
}
|
||||||
String gysqyzz_bj = null;
|
String gysqyzz_bj = "";
|
||||||
String tqq9_suparea_bj = bill.getString("tqq9_suparea_bj");
|
String tqq9_suparea_bj = bill.getString("tqq9_suparea_bj");
|
||||||
if ("B".equals(tqq9_suparea_bj)) {
|
if (tqq9_suparea_bj.contains("B")) {
|
||||||
gysqyzz_bj = "0";
|
gysqyzz_bj = gysqyzz_bj + ",0";
|
||||||
} else if ("A".equals(tqq9_suparea_bj)) {
|
}else if (tqq9_suparea_bj.contains("A")) {
|
||||||
gysqyzz_bj = "1";
|
gysqyzz_bj = gysqyzz_bj + ",1";
|
||||||
} else if ("C".equals(tqq9_suparea_bj)) {
|
}else if (tqq9_suparea_bj.contains("C")) {
|
||||||
gysqyzz_bj = "2";
|
gysqyzz_bj = gysqyzz_bj + ",2";
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(gysqyzz_bj)){
|
||||||
|
gysqyzz_bj = gysqyzz_bj.substring(1);
|
||||||
}
|
}
|
||||||
String shck_bj = null;
|
String shck_bj = null;
|
||||||
DynamicObject tqq9_rewares_bj = bill.getDynamicObject("tqq9_rewares_bj");
|
DynamicObject tqq9_rewares_bj = bill.getDynamicObject("tqq9_rewares_bj");
|
||||||
if (tqq9_rewares_bj != null) {
|
if (tqq9_rewares_bj != null) {
|
||||||
shck_bj = tqq9_rewares_bj.getString("number") + "_" + orgnumber;
|
shck_bj = tqq9_rewares_bj.getString("number")+"_BJLC";
|
||||||
}
|
}
|
||||||
String fktj_bj = null;
|
String fktj_bj = null;
|
||||||
DynamicObject tqq9_paycondition_bj = bill.getDynamicObject("tqq9_paycondition_bj");
|
DynamicObject tqq9_paycondition_bj = bill.getDynamicObject("tqq9_paycondition_bj");
|
||||||
|
|
@ -6066,19 +6083,22 @@ public class FWImpl {
|
||||||
if (tqq9_sup_gz != null) {
|
if (tqq9_sup_gz != null) {
|
||||||
cjgys_gz = tqq9_sup_gz.getString("number");
|
cjgys_gz = tqq9_sup_gz.getString("number");
|
||||||
}
|
}
|
||||||
String gysqyzz_gz = null;
|
String gysqyzz_gz = "";
|
||||||
String tqq9_suparea_gz = bill.getString("tqq9_suparea_gz");
|
String tqq9_suparea_gz = bill.getString("tqq9_suparea_gz");
|
||||||
if ("B".equals(tqq9_suparea_gz)) {
|
if (tqq9_suparea_gz.contains("B")) {
|
||||||
gysqyzz_gz = "0";
|
gysqyzz_gz = gysqyzz_gz + ",0";
|
||||||
} else if ("A".equals(tqq9_suparea_gz)) {
|
}else if (tqq9_suparea_gz.contains("A")) {
|
||||||
gysqyzz_gz = "1";
|
gysqyzz_gz = gysqyzz_gz + ",1";
|
||||||
} else if ("C".equals(tqq9_suparea_gz)) {
|
}else if (tqq9_suparea_gz.contains("C")) {
|
||||||
gysqyzz_gz = "2";
|
gysqyzz_gz = gysqyzz_gz + ",2";
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(gysqyzz_gz)){
|
||||||
|
gysqyzz_gz = gysqyzz_gz.substring(1);
|
||||||
}
|
}
|
||||||
String shck_gz = null;
|
String shck_gz = null;
|
||||||
DynamicObject tqq9_rewares_gz = bill.getDynamicObject("tqq9_rewares_gz");
|
DynamicObject tqq9_rewares_gz = bill.getDynamicObject("tqq9_rewares_gz");
|
||||||
if (tqq9_rewares_gz != null) {
|
if (tqq9_rewares_gz != null) {
|
||||||
shck_gz = tqq9_rewares_gz.getString("number") + "<>" + orgnumber;
|
shck_gz = tqq9_rewares_gz.getString("number")+"_GZLC";
|
||||||
}
|
}
|
||||||
String fktj_gz = null;
|
String fktj_gz = null;
|
||||||
DynamicObject tqq9_paycondition_gz = bill.getDynamicObject("tqq9_paycondition_gz");
|
DynamicObject tqq9_paycondition_gz = bill.getDynamicObject("tqq9_paycondition_gz");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue