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

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

parent 6e39b724
......@@ -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