Commit 7499eb0b authored by 鲁鑫's avatar 鲁鑫

固定资产接口调试;费用报销SAP数据字典

parent 6e39b724
......@@ -9,8 +9,18 @@ var tableArray = [
{
display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZEP_PLAN"}
},
back: {
ZEP_PLAN: "zepPlan",
ZEP_PLANNAME: "zepPlanname"
}
},
}
},
{
......@@ -20,16 +30,23 @@ var tableArray = [
minwidth: 120,
type: "string",
align: "left",
editor: {
type: 'text'
}
},
{
display: "BP标识", name: "zepBptype", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZEP_BPTYPE"}
},
back: {
ZEP_BPTYPE: "zepBptype",
ZEP_BPTYPENAME: "zepBptypename"
}
},
}
},
{
......@@ -42,43 +59,50 @@ var tableArray = [
{
display: "BP(合作伙伴)", name: "partner", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "PARTNER"}
},
back: {
PARTNER: "partner",
KOINH: "koinh",
BANKL: "bankl",
BANKN: "bankn",
SWIFT: "swift",
}
},
}
},
{
display: "BP账号名称", name: "koinh", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
},
{
display: "BP联行号", name: "bankl", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
},
{
display: "BP银行账号", name: "bankn", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
},
{
display: "SWIFT/BIC", name: "swift", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
},
{
display: "费用类型代码", name: "zepExtype", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZEP_EXTYPE"}
},
back: {
ZEP_EXTYPE: "zepExtype",
ZEP_EXTYPENAME: "zepExtypename"
}
},
}
},
{
......@@ -88,10 +112,6 @@ var tableArray = [
minwidth: 120,
type: "string",
align: "left",
editor: {
type: 'text'
}
},
{
display: "费用会计科目", name: "hkont", width: 120, minwidth: 120, type: "string", align: "left",
......@@ -117,43 +137,73 @@ var tableArray = [
{
display: "成本中心", name: "kostl", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "KOSTL"}
},
back: {
KOSTL: "kostl",
KTEXT1: "ktext1"
}
},
}
},
{
display: "成本中心名称", name: "ktext1", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
},
{
display: "内部订单", name: "aufnr", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "AUFNR"}
},
back: {
AUFNR: "aufnr",
KTEXT: "ktext"
}
},
{
display: "内部订单描述", name: "ktext", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
},
{
display: "内部订单描述", name: "ktext", width: 200, minwidth: 120, type: "string", align: "left"
},
{
display: "币别", name: "waers", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "WAERS"}
},
back: {
WAERS: "waers",
}
},
}
},
{
display: "汇率", name: "kursf", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "KURSF"}
},
back: {
KURSF: "kursf",
}
},
}
},
{
......@@ -180,8 +230,17 @@ var tableArray = [
{
display: "税码", name: "mwskz", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "MWSKZ"}
},
back: {
MWSKZ: "mwskz",
}
},
}
},
{
......@@ -216,8 +275,17 @@ var tableArray = [
{
display: "原因代码", name: "rstgr", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "RSTGR"}
},
back: {
RSTGR: "rstgr",
}
},
}
},
{
......@@ -290,29 +358,53 @@ var tableArray = [
{
display: "是否付款", name: "zepPay", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZEP_PAY"}
},
back: {
ZEP_PAY: "zepPay",
}
},
}
},
{
display: "付款方式代码", name: "zlsch", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZLSCH"}
},
back: {
ZLSCH: "zlsch",
ZLSCH_TEXT1: "zlschText1",
}
},
}
},
{
display: "付款方式名称", name: "zlschText1", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
},
{
display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZEP_BANK"}
},
back: {
ZEP_BANK: "zepBank",
}
},
}
},
]
......@@ -340,23 +432,29 @@ var tableArray = [
columns: [
{display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
{
display: "付款银行账号", name: "bankn1", width: 120, minwidth: 120, type: "string", align: "left",
display: "付款银行账号", name: "bankn1", width: 200, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "BANKN1"}
},
back: {
BANKN1: "bankn1",
ZT012K_TEXT1: "zt012kText1",
}
},
}
},
{
display: "付款银行账号名称",
name: "zt012kText1",
width: 120,
width: 200,
minwidth: 120,
type: "string",
align: "left",
editor: {
type: 'text'
}
},
{
display: "付款附言", name: "zepTxt1", width: 120, minwidth: 120, type: "string", align: "left",
......@@ -415,7 +513,6 @@ function loadGrid(obj) {
fixedCellHeight: true,
selectRowButtonOnly: true,
onBeforeCheckRow: function (checked, data) {
debugger
//同时选定或取消所有表格中的对应行
tableArray.forEach((item) => {
let rows = item.gridManager.rows;
......@@ -457,6 +554,7 @@ function loadGrid(obj) {
$(document).ready(function () {
initialize();
bindQueryEvent();
});
......@@ -481,6 +579,18 @@ function initialize() {
})
}
function bindQueryEvent() {
$('#bukrs').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
return {paramValue: "BUKRS"}
},
onChange: function (value, data) {
$('#kostl').val(data.BUKRS);
$('#butxt').val(data.BUTXT);
}
});
}
/**
* 流程引擎回调设置打样的id
......@@ -502,7 +612,6 @@ function getExtendedData(processAction) {
tableArray.forEach((item) => {
console.log(item)
});
debugger
//回退、打回、转交时,不需要验证必填项是否已经填写;
if (processAction == ProcessAction.BACK
......@@ -542,7 +651,6 @@ function getTableDataAll(obj) {
//调用数组
function useArrayTable(func, ...data) {
debugger
const results = tableArray.map((item) => {
return func(item, ...data);
});
......
......@@ -33,8 +33,8 @@
/>
<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"/>
<x:inputC name="butxt" required="false" label="公司代码名称" labelCol="2" fieldCol="2"/>
<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="zepDepart" required="false" readonly="true" label="EP部门代码" labelCol="2" fieldCol="2"/>
<x:inputC name="zepDepartname" required="false" readonly="true" label="EP部门名称" labelCol="2" fieldCol="2"/>
<x:inputC name="zepAppli" required="false" readonly="true" label="EP流程申请人代码" labelCol="2" fieldCol="2"/>
......
......@@ -22,8 +22,8 @@ function loadCostCenterListGrid() {
});
gridManager = UICtrl.grid("#sapFixedAssetsListGrid", {
columns: [
{display: "BPM单号", name: "zbpmn", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "创建标识", name: "zflg", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "BPM单号", name: "zfibpmnr", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "创建标识", name: "zfiflg", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "主资产号", name: "anln1", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "资产分类", name: "anlkl", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "公司代码", name: "bukrs", width: 100, minWidth: 60, type: "string", align: "left"},
......@@ -37,6 +37,8 @@ function loadCostCenterListGrid() {
{display: "单据编号", name: "billCode", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "流程状态", name: "statusId", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "人员名称", name: "personMemberName", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "消息类型", name: "type", width: 100, minWidth: 60, type: "string", align: "left"},
{display: "消息文本", name: "message", width: 200, minWidth: 60, type: "string", align: "left"},
],
dataAction: "server",
......
package com.huigou.topsun.sap.fixedAssets.application.impl;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.huigou.cache.SystemCache;
import com.huigou.context.Operator;
......@@ -67,14 +67,14 @@ public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixe
if (StringUtil.isNotBlank(sapFixedAssets.getId())) {
// 修改
// 将标识修改为2
sapFixedAssets.setZflg(2);
sapFixedAssets.setZfiflg(2);
sapFixedAssets = sapFixedAssetsRepository.saveAndFlush(sapFixedAssets);
} else {
// 新增
// 封装填报时间
BeanUtils.copyProperties(operator, sapFixedAssets);
// sapFixedAssets.setStatusId(BizBillStatus.APPLYING.getId());
sapFixedAssets.setZflg(1);
sapFixedAssets.setZfiflg(1);
sapFixedAssets = sapFixedAssetsRepository.saveAndFlush(sapFixedAssets);
}
return SapFixedAssetsVo.getSapFixedAssetsVo(sapFixedAssets);
......@@ -94,11 +94,16 @@ public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixe
SapFixedAssets message;
try {
String execute = httpClient.execute(sapFixedAssetsReturnVoList, url);
message = new ObjectMapper().readValue(execute, SapFixedAssets.class);
List<SapFixedAssets> sapFixedAssets = JSONObject.parseArray(execute, SapFixedAssets.class);
SapFixedAssets assets = sapFixedAssets.get(0);
if (!"S".equals(assets.getType())) {
throw new RuntimeException("数据传输失败,"+assets.getMessage());
}
fixedAssets.setType(assets.getType());
fixedAssets.setMessage(assets.getMessage());
} catch (IOException e) {
throw new RuntimeException(e);
}
BeanUtils.copyProperties(message,fixedAssets);
sapFixedAssetsRepository.save(fixedAssets);
}
......@@ -146,11 +151,11 @@ public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixe
Operator operator = this.getOperator();
if (sapFixedAssets.isNew()) {
sapFixedAssets.setStatusId(BizBillStatus.APPLYING.getId());
sapFixedAssets.setZflg(1);
sapFixedAssets.setZfiflg(1);
BeanUtils.copyProperties(operator, sapFixedAssets);
sapFixedAssets.setZbpmn(sapFixedAssets.getBillCode());
sapFixedAssets.setZfibpmnr(sapFixedAssets.getBillCode());
} else {
sapFixedAssets.setZflg(2);
sapFixedAssets.setZfiflg(2);
sapFixedAssets = (SapFixedAssets) commonDomainService.loadAndFillinProperties(sapFixedAssets);
}
sapFixedAssets = sapFixedAssetsRepository.save(sapFixedAssets);
......
......@@ -19,15 +19,15 @@ public class SapFixedAssets extends FlowBillAbstractEntity {
/**
* BPM单号
*/
@Column(name = "zbpmn")
private String zbpmn;
@Column(name = "zfibpmnr")
private String zfibpmnr;
/**
* 创建标识
* 用于标识数据是新增或修改,1为新增,2为修改。(必填)
*/
@Column(name = "zflg")
private Integer zflg;
@Column(name = "zfiflg")
private Integer zfiflg;
/**
* 主资产号
......@@ -92,13 +92,13 @@ public class SapFixedAssets extends FlowBillAbstractEntity {
/**
* 消息类型
*/
@Column(name = "MSGTY")
private String MSGTY;
@Column(name = "TYPE")
private String type;
/**
* 消息文本
*/
@Column(name = "MSGTX")
private String MSGTX;
@Column(name = "MESSAGE")
private String message;
@Override
protected String getCodeRuleId() {
......@@ -108,9 +108,9 @@ public class SapFixedAssets extends FlowBillAbstractEntity {
public SapFixedAssets() {
}
public SapFixedAssets(String zbpmn, Integer zflg, String anln1, String anlkl, String bukrs, String txt50, String invnr, BigDecimal menge, String meins, String kostl, String kostlv) {
this.zbpmn = zbpmn;
this.zflg = zflg;
public SapFixedAssets(String zfibpmnr, Integer zfiflg, String anln1, String anlkl, String bukrs, String txt50, String invnr, BigDecimal menge, String meins, String kostl, String kostlv) {
this.zfibpmnr = zfibpmnr;
this.zfiflg = zfiflg;
this.anln1 = anln1;
this.anlkl = anlkl;
this.bukrs = bukrs;
......@@ -122,25 +122,20 @@ public class SapFixedAssets extends FlowBillAbstractEntity {
this.kostlv = kostlv;
}
public SapFixedAssets(String MSGTY, String MSGTX) {
this.MSGTY = MSGTY;
this.MSGTX = MSGTX;
public String getZfibpmnr() {
return zfibpmnr;
}
public String getZbpmn() {
return zbpmn;
public void setZfibpmnr(String zfibpmnr) {
this.zfibpmnr = zfibpmnr;
}
public void setZbpmn(String zbpmn) {
this.zbpmn = zbpmn;
public Integer getZfiflg() {
return zfiflg;
}
public Integer getZflg() {
return zflg;
}
public void setZflg(Integer zflg) {
this.zflg = zflg;
public void setZfiflg(Integer zfiflg) {
this.zfiflg = zfiflg;
}
public String getAnln1() {
......@@ -215,19 +210,19 @@ public class SapFixedAssets extends FlowBillAbstractEntity {
this.kostlv = kostlv;
}
public String getMSGTY() {
return MSGTY;
public String getType() {
return type;
}
public void setMSGTY(String MSGTY) {
this.MSGTY = MSGTY;
public void setType(String type) {
this.type = type;
}
public String getMSGTX() {
return MSGTX;
public String getMessage() {
return message;
}
public void setMSGTX(String MSGTX) {
this.MSGTX = MSGTX;
public void setMessage(String message) {
this.message = message;
}
}
\ No newline at end of file
......@@ -18,15 +18,15 @@ public class SapFixedAssetsReturnVo implements Serializable {
/**
* BPM单号
*/
@JsonProperty("ZBPMN")
private String zbpmn;
@JsonProperty("ZFIBPMNR")
private String zfibpmnr;
/**
* 创建标识
* 用于标识数据是新增或修改,1为新增,2为修改。(必填)
*/
@JsonProperty("ZFLG")
private Integer zflg;
@JsonProperty("ZFIFLG")
private Integer zfiflg;
/**
* 主资产号
......@@ -84,20 +84,20 @@ public class SapFixedAssetsReturnVo implements Serializable {
@JsonProperty(value = "KOSTLV",required = true)
private String kostlv;
public String getZbpmn() {
return zbpmn;
public String getZfibpmnr() {
return zfibpmnr;
}
public void setZbpmn(String zbpmn) {
this.zbpmn = zbpmn;
public void setZfibpmnr(String zfibpmnr) {
this.zfibpmnr = zfibpmnr;
}
public Integer getZflg() {
return zflg;
return zfiflg;
}
public void setZflg(Integer zflg) {
this.zflg = zflg;
public void setZfiflg(Integer zfiflg) {
this.zfiflg = zfiflg;
}
public String getAnln1() {
......
......@@ -10,13 +10,10 @@
scc.ltext,
scc.verak,
scc.kosar,
scc.prctr,
scc.t
scc.prctr
FROM
( SELECT *,NOW() AS t FROM sap_cost_center ) AS scc
WHERE
scc.t &gt;= scc.datab
AND scc.t &lt;= scc.datbi
sap_cost_center scc
WHERE scc.is_enable = 1 and scc.is_delete = 0
</sql>
<field name="成本中心编码" title="成本中心编码" code="kostl" width="200"/>
<field name="名称" title="名称" code="ktext" width="200"/>
......
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