Commit 01511da9 authored by 鲁鑫's avatar 鲁鑫

付款相关修改

parent 3668dea2
...@@ -72,7 +72,7 @@ var tableArray = [ ...@@ -72,7 +72,7 @@ var tableArray = [
} }
}, },
{ {
display: "BP银行账号", name: "bankn", width: 120, minwidth: 120, type: "string", align: "left", display: "BP银行账号", name: "bankn", width: 200, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: true, type: "select",
data: { data: {
...@@ -285,22 +285,20 @@ var tableArray = [ ...@@ -285,22 +285,20 @@ var tableArray = [
} }
}, },
}*/ }*/
editor: { render:function (item){
return item.zlsch = "T"
type: 'text'
} }
}, },
{ {
display: "付款方式名称", name: "zlschText1", width: 120, minwidth: 120, type: "string", align: "left", display: "付款方式名称", name: "zlschText1", width: 120, minwidth: 120, type: "string", align: "left",
editor: { render:function (item){
return item.zlschText1 = "电汇"
type: 'text'
} }
}, },
{ {
display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left", display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -327,7 +325,7 @@ var tableArray = [ ...@@ -327,7 +325,7 @@ var tableArray = [
{display: "记账过账日期", name: "budat", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "记账过账日期", name: "budat", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "记账凭证日期", name: "bldat", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "记账凭证日期", name: "bldat", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "返回状态", name: "msgty", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "返回状态", name: "msgty", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "返回消息", name: "msgtx", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "返回消息", name: "msgtx", width: 300, minwidth: 120, type: "string", align: "left"},
] ]
}, },
{ {
......
...@@ -48,9 +48,6 @@ var tableArray = [ ...@@ -48,9 +48,6 @@ var tableArray = [
} }
}, },
} }
/*editor: {
type: 'text'
}*/
}, },
{ {
display: "BP标识描述", name: "zepBptypename", width: 120, minwidth: 120, type: "string", align: "left", display: "BP标识描述", name: "zepBptypename", width: 120, minwidth: 120, type: "string", align: "left",
...@@ -497,10 +494,6 @@ var tableArray = [ ...@@ -497,10 +494,6 @@ var tableArray = [
} }
}, },
} }
// editor: {
// type: 'text'
// }
}, },
] ]
} }
...@@ -516,7 +509,7 @@ var tableArray = [ ...@@ -516,7 +509,7 @@ var tableArray = [
{display: "记账过账日期", name: "budat", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "记账过账日期", name: "budat", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "记账凭证日期", name: "bldat", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "记账凭证日期", name: "bldat", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "返回状态", name: "msgty", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "返回状态", name: "msgty", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "返回消息", name: "msgtx", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "返回消息", name: "msgtx", width: 300, minwidth: 120, type: "string", align: "left"},
] ]
} }
, { , {
......
...@@ -276,22 +276,20 @@ var tableArray = [ ...@@ -276,22 +276,20 @@ var tableArray = [
} }
}, },
}*/ }*/
editor: { render:function (item){
return item.zlsch = "T"
type: 'text'
} }
}, },
{ {
display: "付款方式名称", name: "zlschText1", width: 120, minwidth: 120, type: "string", align: "left", display: "付款方式名称", name: "zlschText1", width: 120, minwidth: 120, type: "string", align: "left",
editor: { render:function (item){
return item.zlschText1 = "电汇"
type: 'text'
} }
}, },
{ {
display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left", display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left",
/*editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -302,10 +300,6 @@ var tableArray = [ ...@@ -302,10 +300,6 @@ var tableArray = [
ZEP_BANK: "zepBank", ZEP_BANK: "zepBank",
} }
}, },
}*/
editor: {
type: 'text'
} }
}, },
] ]
...@@ -364,7 +358,7 @@ var tableArray = [ ...@@ -364,7 +358,7 @@ var tableArray = [
{display: "记账过账日期", name: "budat", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "记账过账日期", name: "budat", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "记账凭证日期", name: "bldat", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "记账凭证日期", name: "bldat", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "返回状态", name: "msgty", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "返回状态", name: "msgty", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "返回消息", name: "msgtx", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "返回消息", name: "msgtx", width: 300, minwidth: 120, type: "string", align: "left"},
] ]
} }
, { , {
......
...@@ -199,7 +199,7 @@ var tableArray = [ ...@@ -199,7 +199,7 @@ var tableArray = [
{ {
display: "原因代码", name: "rstgrName", width: 120, minwidth: 120, type: "string", align: "left", display: "原因代码", name: "rstgrName", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -258,22 +258,30 @@ var tableArray = [ ...@@ -258,22 +258,30 @@ var tableArray = [
}, },
{ {
display: "付款方式代码", name: "zlsch", width: 120, minwidth: 120, type: "string", align: "left", display: "付款方式代码", name: "zlsch", width: 120, minwidth: 120, type: "string", align: "left",
editor: { render:function (item){
return item.zlsch = "T"
type: 'text'
} }
}, },
{ {
display: "付款方式名称", name: "zlschText1", width: 120, minwidth: 120, type: "string", align: "left", display: "付款方式名称", name: "zlschText1", width: 120, minwidth: 120, type: "string", align: "left",
editor: { render:function (item){
return item.zlschText1 = "电汇"
type: 'text'
} }
}, },
{ {
display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left", display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
type: 'text' required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {fieldName: "ZEP_BANK"}
},
back: {
ZEP_BANK: "zepBank",
}
},
} }
} }
] ]
...@@ -336,7 +344,7 @@ var tableArray = [ ...@@ -336,7 +344,7 @@ var tableArray = [
{display: "记账过账日期", name: "budat", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "记账过账日期", name: "budat", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "记账凭证日期", name: "bldat", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "记账凭证日期", name: "bldat", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "返回状态", name: "msgty", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "返回状态", name: "msgty", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "返回消息", name: "msgtx", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "返回消息", name: "msgtx", width: 300, minwidth: 120, type: "string", align: "left"},
] ]
} }
, { , {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="zepFtypename" required="false" readonly="true" label="EP付款申请类别名称" labelCol="2" maxLength="64" fieldCol="2"/> <x:inputC name="zepFtypename" required="false" readonly="true" label="EP付款申请类别名称" labelCol="2" maxLength="64" fieldCol="2"/>
<x:inputC name="bukrs" required="false" label="公司代码" labelCol="2" fieldCol="2" wrapper="select"/> <x:inputC name="bukrs" required="true" label="公司代码" labelCol="2" fieldCol="2" wrapper="select"/>
<x:inputC name="butxt" required="false" readonly="true" label="公司代码名称" labelCol="2" fieldCol="2"/> <x:inputC name="butxt" required="false" readonly="true" label="公司代码名称" labelCol="2" fieldCol="2"/>
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
......
...@@ -76,7 +76,7 @@ DataUtil.getUpdateRowId = function (gridManager) { ...@@ -76,7 +76,7 @@ DataUtil.getUpdateRowId = function (gridManager) {
function addPayApply(){ function addPayApply(){
UICtrl.addTabItem({ UICtrl.addTabItem({
tabid: 'payApply', tabid: 'payApplyId',
text: "付款申请单", text: "付款申请单",
url: web_app.name + '/sapCostReimbursement/forwardCostReimbursement.job?type=pay' url: web_app.name + '/sapCostReimbursement/forwardCostReimbursement.job?type=pay'
}); });
......
...@@ -9,8 +9,18 @@ var tableArray = [ ...@@ -9,8 +9,18 @@ var tableArray = [
{ {
display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left", display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {fieldName: "ZEP_PLAN"}
},
back: {
ZEP_PLAN: "zepPlan",
ZEP_PLANNAME: "zepPlanname"
}
},
} }
}, },
{ {
...@@ -20,30 +30,34 @@ var tableArray = [ ...@@ -20,30 +30,34 @@ var tableArray = [
minwidth: 120, minwidth: 120,
type: "string", type: "string",
align: "left", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "BP标识", name: "zepBptype", width: 120, minwidth: 120, type: "string", align: "left", display: "BP标识", name: "zepBptype", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "BP标识描述", name: "zepBptypename", width: 120, minwidth: 120, type: "string", align: "left", display: "BP标识描述", name: "zepBptypename", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "BP(合作伙伴)", name: "partner", width: 120, minwidth: 120, type: "string", align: "left", display: "BP(合作伙伴)", name: "partner", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "getCusAndSuppliers",
getParam: function (item) {
return {
ZEP_BPTYPE: item.zepBptype,
BUKRS:$("#bukrs").val()
}
},
back: {
PARTNER: "partner",
NAME_ORG1: "koinh",
BANKL: "bankl",
BANKN: "bankn",
SWIFT: "swift",
}
},
} }
}, },
{ {
...@@ -54,14 +68,28 @@ var tableArray = [ ...@@ -54,14 +68,28 @@ var tableArray = [
} }
}, },
{ {
display: "BP联行号", name: "bankl", width: 120, minwidth: 120, type: "string", align: "left", display: "BP银行账号", name: "bankn", width: 200, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "getCusAndBanks",
getParam: function (item) {
return {
ZEP_BPTYPE: item.zepBptype,
PARTNER:item.partner
}
},
back: {
BANKN: "bankn",
BANKL: "bankl",
SWIFT: "swift",
}
},
} }
}, },
{ {
display: "BP银行账号", name: "bankn", width: 120, minwidth: 120, type: "string", align: "left", display: "BP联行号", name: "bankl", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
type: 'text' type: 'text'
...@@ -118,7 +146,7 @@ var tableArray = [ ...@@ -118,7 +146,7 @@ var tableArray = [
{ {
display: "原因代码", name: "rstgrName", width: 120, minwidth: 120, type: "string", align: "left", display: "原因代码", name: "rstgrName", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -162,29 +190,45 @@ var tableArray = [ ...@@ -162,29 +190,45 @@ var tableArray = [
{ {
display: "是否付款", name: "zepPay", width: 120, minwidth: 120, type: "string", align: "left", display: "是否付款", name: "zepPay", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: false, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {fieldName: "ZEP_PAY"}
},
back: {
ZEP_PAY: "zepPay",
}
},
} }
}, },
{ {
display: "付款方式代码", name: "zlsch", width: 120, minwidth: 120, type: "string", align: "left", display: "付款方式代码", name: "zlsch", width: 120, minwidth: 120, type: "string", align: "left",
editor: { render:function (item){
return item.zlsch = "T"
type: 'text'
} }
}, },
{ {
display: "付款方式名称", name: "zlschText1", width: 120, minwidth: 120, type: "string", align: "left", display: "付款方式名称", name: "zlschText1", width: 120, minwidth: 120, type: "string", align: "left",
editor: { render:function (item){
return item.zlschText1 = "电汇"
type: 'text'
} }
}, },
{ {
display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left", display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: false, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {fieldName: "ZEP_BANK"}
},
back: {
ZEP_BANK: "zepBank",
}
},
} }
}, },
] ]
...@@ -198,8 +242,20 @@ var tableArray = [ ...@@ -198,8 +242,20 @@ var tableArray = [
{ {
display: "付款银行账号", name: "bankn1", width: 120, minwidth: 120, type: "string", align: "left", display: "付款银行账号", name: "bankn1", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: false, type: "select",
type: 'text' data: {
type: 'system',
name: "getCompanyAndBankInfos",
getParam: function (item) {
return {
BUKRS: $("#bukrs").val()
}
},
back: {
BANKN1: "bankn1",
TEXT1: "zt012kText1",
}
},
} }
}, },
{ {
...@@ -235,7 +291,7 @@ var tableArray = [ ...@@ -235,7 +291,7 @@ var tableArray = [
{display: "记账过账日期", name: "budat", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "记账过账日期", name: "budat", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "记账凭证日期", name: "bldat", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "记账凭证日期", name: "bldat", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "返回状态", name: "msgty", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "返回状态", name: "msgty", width: 120, minwidth: 120, type: "string", align: "left"},
{display: "返回消息", name: "msgtx", width: 120, minwidth: 120, type: "string", align: "left"}, {display: "返回消息", name: "msgtx", width: 300, minwidth: 120, type: "string", align: "left"},
] ]
} }
, { , {
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="zepFtypename" required="false" readonly="true" label="EP付款申请类别名称" labelCol="2" maxLength="64" fieldCol="2"/> <x:inputC name="zepFtypename" required="false" readonly="true" label="EP付款申请类别名称" labelCol="2" maxLength="64" fieldCol="2"/>
<x:inputC name="bukrs" required="false" label="公司代码" labelCol="2" fieldCol="2" wrapper="select"/> <x:inputC name="bukrs" required="true" label="公司代码" labelCol="2" fieldCol="2" wrapper="select"/>
<x:inputC name="butxt" required="false" readonly="true" label="公司代码名称" labelCol="2" fieldCol="2"/> <x:inputC name="butxt" required="false" readonly="true" label="公司代码名称" labelCol="2" fieldCol="2"/>
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
......
...@@ -76,7 +76,7 @@ DataUtil.getUpdateRowId = function (gridManager) { ...@@ -76,7 +76,7 @@ DataUtil.getUpdateRowId = function (gridManager) {
function addRefundApply(){ function addRefundApply(){
UICtrl.addTabItem({ UICtrl.addTabItem({
tabid: 'refundApply', tabid: 'refundApplyId',
text: "客户退款申请单", text: "客户退款申请单",
url: web_app.name + '/sapCostReimbursement/forwardCostReimbursement.job?type=refund' url: web_app.name + '/sapCostReimbursement/forwardCostReimbursement.job?type=refund'
}); });
......
package com.huigou.topsun.sap.costReimbursement.application.impl; package com.huigou.topsun.sap.costReimbursement.application.impl;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.huigou.data.query.model.QueryDescriptor; import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.topsun.sap.common.DefaultHttpClient; import com.huigou.topsun.sap.common.DefaultHttpClient;
import com.huigou.topsun.sap.common.domain.SapResult;
import com.huigou.topsun.sap.common.serializer.MessageCodec; import com.huigou.topsun.sap.common.serializer.MessageCodec;
import com.huigou.topsun.sap.costReimbursement.application.SapCostReimbursementApplication; import com.huigou.topsun.sap.costReimbursement.application.SapCostReimbursementApplication;
import com.huigou.topsun.sap.costReimbursement.domain.SapCostReimbursement; import com.huigou.topsun.sap.costReimbursement.domain.SapCostReimbursement;
...@@ -83,6 +85,27 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S ...@@ -83,6 +85,27 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
return sapCostReimbursement.getId(); return sapCostReimbursement.getId();
} }
/**
* 设置任务名称
*/
@Override
protected void setTaskDescription(DelegateTask delegateTask) {
String bizId = delegateTask.getExecution().getProcessBusinessKey();
delegateTask.setDescription(this.getApprovalSubjectName(bizId));
}
/**
* 获取任务标题
*
* @param bizId
* @return
*/
private String getApprovalSubjectName(String bizId) {
SapCostReimbursement sapCostReimbursement = this.loadSapCostReimbursementById(bizId);
String fillinDateStr = DateUtil.getDateFormat(sapCostReimbursement.getFillinDate());
String typeName = sapCostReimbursement.getZepFtypename();
return String.format("%s-%s(%s)",sapCostReimbursement.getPersonMemberName(),typeName , fillinDateStr);
}
@Override @Override
protected Map<String, Object> getProcessBizParams(String bizId) { protected Map<String, Object> getProcessBizParams(String bizId) {
...@@ -208,31 +231,22 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S ...@@ -208,31 +231,22 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
String url = "cud_fi012/cud_fi012"; String url = "cud_fi012/cud_fi012";
try { try {
String result = defaultHttpClient.execute(paramList, url); String result = defaultHttpClient.execute(paramList, url);
List<Map<String, Object>> resultList = objectMapper.readValue(result, new TypeReference<List<Map<String, Object>>>() { List<SapResult> resultList = JSONObject.parseArray(result, SapResult.class);
});
for (SapResult sapResult : resultList) {
StringBuffer errorMsg = new StringBuffer(); if ("S".equals(sapResult.getTYPE())) {
for (Map<String, Object> resultMap : resultList) { for (SapCostReimbursementDetail reimbursementDetail : all) {
if (!"S".equals(resultMap.get("TYPE"))) { if (sapResult.getMESSAGE_V2().equals(reimbursementDetail.getZepItemno())){
errorMsg.append(resultMap.get("MESSAGE")); reimbursementDetail.setBelnr(sapResult.getMESSAGE_V3());
} reimbursementDetail.setGjahr(sapResult.getMESSAGE_V4());
} reimbursementDetail.setMsgty(sapResult.getTYPE());
if (errorMsg.length()==0) { reimbursementDetail.setMsgtx(sapResult.getMESSAGE());
Map<String, Object> resultMap = resultList.get(0); costReimbursementDetailRepository.save(reimbursementDetail);
sapCostReimbursement.setMsgId((String) resultMap.get("ID")); }
sapCostReimbursement.setNumber((String) resultMap.get("NUMBER")); }
sapCostReimbursement.setMsgType((String) resultMap.get("TYPE")); }else {
sapCostReimbursement.setLogNo((String) resultMap.get("LOG_NO")); throw new RuntimeException("数据传输失败,请稍后手动重试!" + sapResult.getMESSAGE());
sapCostReimbursement.setLogMsgNo((String) resultMap.get("LOG_MSG_NO")); }
sapCostReimbursement.setMessage((String) resultMap.get("MESSAGE"));
sapCostReimbursement.setMessageV1((String) resultMap.get("MESSAGE_V1"));
sapCostReimbursement.setMessageV2((String) resultMap.get("MESSAGE_V1"));
sapCostReimbursement.setMessageV3((String) resultMap.get("MESSAGE_V1"));
sapCostReimbursement.setMessageV4((String) resultMap.get("MESSAGE_V1"));
this.costReimbursementRepository.save(sapCostReimbursement);
} else {
LOG.error("数据传输失败!error: {}", errorMsg);
throw new RuntimeException("数据传输失败,请检查后重试!error:" + errorMsg);
} }
} catch (IOException e) { } catch (IOException e) {
LOG.error("sap服务器无响应请稍后手动重试!error: {}", e.getMessage()); LOG.error("sap服务器无响应请稍后手动重试!error: {}", e.getMessage());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment