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

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

parent 6e39b724
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
/> />
<x:inputC name="zepFtypename" required="false" readonly="true" label="EP付款申请类别名称" labelCol="2" maxLength="64" <x:inputC name="zepFtypename" required="false" readonly="true" label="EP付款申请类别名称" labelCol="2" maxLength="64"
fieldCol="2"/> fieldCol="2"/>
<x:inputC name="bukrs" 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" label="公司代码名称" labelCol="2" fieldCol="2"/> <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="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="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"/> <x:inputC name="zepAppli" required="false" readonly="true" label="EP流程申请人代码" labelCol="2" fieldCol="2"/>
......
...@@ -22,8 +22,8 @@ function loadCostCenterListGrid() { ...@@ -22,8 +22,8 @@ function loadCostCenterListGrid() {
}); });
gridManager = UICtrl.grid("#sapFixedAssetsListGrid", { gridManager = UICtrl.grid("#sapFixedAssetsListGrid", {
columns: [ columns: [
{display: "BPM单号", name: "zbpmn", width: 140, minWidth: 60, type: "string", align: "left"}, {display: "BPM单号", name: "zfibpmnr", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "创建标识", name: "zflg", 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: "anln1", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "资产分类", name: "anlkl", 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"}, {display: "公司代码", name: "bukrs", width: 100, minWidth: 60, type: "string", align: "left"},
...@@ -37,6 +37,8 @@ function loadCostCenterListGrid() { ...@@ -37,6 +37,8 @@ function loadCostCenterListGrid() {
{display: "单据编号", name: "billCode", width: 140, minWidth: 60, type: "string", align: "left"}, {display: "单据编号", name: "billCode", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "流程状态", name: "statusId", 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: "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", dataAction: "server",
......
package com.huigou.topsun.sap.fixedAssets.application.impl; 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.fasterxml.jackson.databind.ObjectMapper;
import com.huigou.cache.SystemCache; import com.huigou.cache.SystemCache;
import com.huigou.context.Operator; import com.huigou.context.Operator;
...@@ -67,14 +67,14 @@ public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixe ...@@ -67,14 +67,14 @@ public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixe
if (StringUtil.isNotBlank(sapFixedAssets.getId())) { if (StringUtil.isNotBlank(sapFixedAssets.getId())) {
// 修改 // 修改
// 将标识修改为2 // 将标识修改为2
sapFixedAssets.setZflg(2); sapFixedAssets.setZfiflg(2);
sapFixedAssets = sapFixedAssetsRepository.saveAndFlush(sapFixedAssets); sapFixedAssets = sapFixedAssetsRepository.saveAndFlush(sapFixedAssets);
} else { } else {
// 新增 // 新增
// 封装填报时间 // 封装填报时间
BeanUtils.copyProperties(operator, sapFixedAssets); BeanUtils.copyProperties(operator, sapFixedAssets);
// sapFixedAssets.setStatusId(BizBillStatus.APPLYING.getId()); // sapFixedAssets.setStatusId(BizBillStatus.APPLYING.getId());
sapFixedAssets.setZflg(1); sapFixedAssets.setZfiflg(1);
sapFixedAssets = sapFixedAssetsRepository.saveAndFlush(sapFixedAssets); sapFixedAssets = sapFixedAssetsRepository.saveAndFlush(sapFixedAssets);
} }
return SapFixedAssetsVo.getSapFixedAssetsVo(sapFixedAssets); return SapFixedAssetsVo.getSapFixedAssetsVo(sapFixedAssets);
...@@ -94,11 +94,16 @@ public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixe ...@@ -94,11 +94,16 @@ public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixe
SapFixedAssets message; SapFixedAssets message;
try { try {
String execute = httpClient.execute(sapFixedAssetsReturnVoList, url); 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) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
BeanUtils.copyProperties(message,fixedAssets);
sapFixedAssetsRepository.save(fixedAssets); sapFixedAssetsRepository.save(fixedAssets);
} }
...@@ -146,11 +151,11 @@ public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixe ...@@ -146,11 +151,11 @@ public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixe
Operator operator = this.getOperator(); Operator operator = this.getOperator();
if (sapFixedAssets.isNew()) { if (sapFixedAssets.isNew()) {
sapFixedAssets.setStatusId(BizBillStatus.APPLYING.getId()); sapFixedAssets.setStatusId(BizBillStatus.APPLYING.getId());
sapFixedAssets.setZflg(1); sapFixedAssets.setZfiflg(1);
BeanUtils.copyProperties(operator, sapFixedAssets); BeanUtils.copyProperties(operator, sapFixedAssets);
sapFixedAssets.setZbpmn(sapFixedAssets.getBillCode()); sapFixedAssets.setZfibpmnr(sapFixedAssets.getBillCode());
} else { } else {
sapFixedAssets.setZflg(2); sapFixedAssets.setZfiflg(2);
sapFixedAssets = (SapFixedAssets) commonDomainService.loadAndFillinProperties(sapFixedAssets); sapFixedAssets = (SapFixedAssets) commonDomainService.loadAndFillinProperties(sapFixedAssets);
} }
sapFixedAssets = sapFixedAssetsRepository.save(sapFixedAssets); sapFixedAssets = sapFixedAssetsRepository.save(sapFixedAssets);
......
...@@ -19,15 +19,15 @@ public class SapFixedAssets extends FlowBillAbstractEntity { ...@@ -19,15 +19,15 @@ public class SapFixedAssets extends FlowBillAbstractEntity {
/** /**
* BPM单号 * BPM单号
*/ */
@Column(name = "zbpmn") @Column(name = "zfibpmnr")
private String zbpmn; private String zfibpmnr;
/** /**
* 创建标识 * 创建标识
* 用于标识数据是新增或修改,1为新增,2为修改。(必填) * 用于标识数据是新增或修改,1为新增,2为修改。(必填)
*/ */
@Column(name = "zflg") @Column(name = "zfiflg")
private Integer zflg; private Integer zfiflg;
/** /**
* 主资产号 * 主资产号
...@@ -92,13 +92,13 @@ public class SapFixedAssets extends FlowBillAbstractEntity { ...@@ -92,13 +92,13 @@ public class SapFixedAssets extends FlowBillAbstractEntity {
/** /**
* 消息类型 * 消息类型
*/ */
@Column(name = "MSGTY") @Column(name = "TYPE")
private String MSGTY; private String type;
/** /**
* 消息文本 * 消息文本
*/ */
@Column(name = "MSGTX") @Column(name = "MESSAGE")
private String MSGTX; private String message;
@Override @Override
protected String getCodeRuleId() { protected String getCodeRuleId() {
...@@ -108,9 +108,9 @@ public class SapFixedAssets extends FlowBillAbstractEntity { ...@@ -108,9 +108,9 @@ public class SapFixedAssets extends FlowBillAbstractEntity {
public SapFixedAssets() { 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) { 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.zbpmn = zbpmn; this.zfibpmnr = zfibpmnr;
this.zflg = zflg; this.zfiflg = zfiflg;
this.anln1 = anln1; this.anln1 = anln1;
this.anlkl = anlkl; this.anlkl = anlkl;
this.bukrs = bukrs; this.bukrs = bukrs;
...@@ -122,25 +122,20 @@ public class SapFixedAssets extends FlowBillAbstractEntity { ...@@ -122,25 +122,20 @@ public class SapFixedAssets extends FlowBillAbstractEntity {
this.kostlv = kostlv; this.kostlv = kostlv;
} }
public SapFixedAssets(String MSGTY, String MSGTX) { public String getZfibpmnr() {
this.MSGTY = MSGTY; return zfibpmnr;
this.MSGTX = MSGTX;
} }
public String getZbpmn() { public void setZfibpmnr(String zfibpmnr) {
return zbpmn; this.zfibpmnr = zfibpmnr;
} }
public void setZbpmn(String zbpmn) { public Integer getZfiflg() {
this.zbpmn = zbpmn; return zfiflg;
} }
public Integer getZflg() { public void setZfiflg(Integer zfiflg) {
return zflg; this.zfiflg = zfiflg;
}
public void setZflg(Integer zflg) {
this.zflg = zflg;
} }
public String getAnln1() { public String getAnln1() {
...@@ -215,19 +210,19 @@ public class SapFixedAssets extends FlowBillAbstractEntity { ...@@ -215,19 +210,19 @@ public class SapFixedAssets extends FlowBillAbstractEntity {
this.kostlv = kostlv; this.kostlv = kostlv;
} }
public String getMSGTY() { public String getType() {
return MSGTY; return type;
} }
public void setMSGTY(String MSGTY) { public void setType(String type) {
this.MSGTY = MSGTY; this.type = type;
} }
public String getMSGTX() { public String getMessage() {
return MSGTX; return message;
} }
public void setMSGTX(String MSGTX) { public void setMessage(String message) {
this.MSGTX = MSGTX; this.message = message;
} }
} }
\ No newline at end of file
...@@ -18,15 +18,15 @@ public class SapFixedAssetsReturnVo implements Serializable { ...@@ -18,15 +18,15 @@ public class SapFixedAssetsReturnVo implements Serializable {
/** /**
* BPM单号 * BPM单号
*/ */
@JsonProperty("ZBPMN") @JsonProperty("ZFIBPMNR")
private String zbpmn; private String zfibpmnr;
/** /**
* 创建标识 * 创建标识
* 用于标识数据是新增或修改,1为新增,2为修改。(必填) * 用于标识数据是新增或修改,1为新增,2为修改。(必填)
*/ */
@JsonProperty("ZFLG") @JsonProperty("ZFIFLG")
private Integer zflg; private Integer zfiflg;
/** /**
* 主资产号 * 主资产号
...@@ -84,20 +84,20 @@ public class SapFixedAssetsReturnVo implements Serializable { ...@@ -84,20 +84,20 @@ public class SapFixedAssetsReturnVo implements Serializable {
@JsonProperty(value = "KOSTLV",required = true) @JsonProperty(value = "KOSTLV",required = true)
private String kostlv; private String kostlv;
public String getZbpmn() { public String getZfibpmnr() {
return zbpmn; return zfibpmnr;
} }
public void setZbpmn(String zbpmn) { public void setZfibpmnr(String zfibpmnr) {
this.zbpmn = zbpmn; this.zfibpmnr = zfibpmnr;
} }
public Integer getZflg() { public Integer getZflg() {
return zflg; return zfiflg;
} }
public void setZflg(Integer zflg) { public void setZfiflg(Integer zfiflg) {
this.zflg = zflg; this.zfiflg = zfiflg;
} }
public String getAnln1() { public String getAnln1() {
......
...@@ -10,13 +10,10 @@ ...@@ -10,13 +10,10 @@
scc.ltext, scc.ltext,
scc.verak, scc.verak,
scc.kosar, scc.kosar,
scc.prctr, scc.prctr
scc.t
FROM FROM
( SELECT *,NOW() AS t FROM sap_cost_center ) AS scc sap_cost_center scc
WHERE WHERE scc.is_enable = 1 and scc.is_delete = 0
scc.t &gt;= scc.datab
AND scc.t &lt;= scc.datbi
</sql> </sql>
<field name="成本中心编码" title="成本中心编码" code="kostl" width="200"/> <field name="成本中心编码" title="成本中心编码" code="kostl" width="200"/>
<field name="名称" title="名称" code="ktext" 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