Commit 81576a99 authored by chengwenlong's avatar chengwenlong

修改唐山电力凭证对照数据查询接口,添加矿ID

parent aa48614f
...@@ -26,6 +26,8 @@ public class WagesSalaryProof extends BaseEntity { ...@@ -26,6 +26,8 @@ public class WagesSalaryProof extends BaseEntity {
private String auxiliaryItemB; private String auxiliaryItemB;
private String mineId;//矿ID
public int getId() { public int getId() {
return id; return id;
} }
...@@ -90,6 +92,14 @@ public class WagesSalaryProof extends BaseEntity { ...@@ -90,6 +92,14 @@ public class WagesSalaryProof extends BaseEntity {
this.auxiliaryItemB = auxiliaryItemB; this.auxiliaryItemB = auxiliaryItemB;
} }
public String getMineId() {
return mineId;
}
public void setMineId(String mineId) {
this.mineId = mineId;
}
@Override @Override
public String toString() { public String toString() {
return "WagesSalaryProof{" + return "WagesSalaryProof{" +
...@@ -101,6 +111,7 @@ public class WagesSalaryProof extends BaseEntity { ...@@ -101,6 +111,7 @@ public class WagesSalaryProof extends BaseEntity {
", accountCode='" + accountCode + '\'' + ", accountCode='" + accountCode + '\'' +
", auxiliaryItemA='" + auxiliaryItemA + '\'' + ", auxiliaryItemA='" + auxiliaryItemA + '\'' +
", auxiliaryItemB='" + auxiliaryItemB + '\'' + ", auxiliaryItemB='" + auxiliaryItemB + '\'' +
", mineId='" + mineId + '\'' +
'}'; '}';
} }
} }
...@@ -124,16 +124,19 @@ public class WagesServiceImpl implements WagesService { ...@@ -124,16 +124,19 @@ public class WagesServiceImpl implements WagesService {
JSONObject jsonObject = JSON.parseObject(ss); JSONObject jsonObject = JSON.parseObject(ss);
JSONArray borrow = jsonObject.getJSONArray("borrow"); JSONArray borrow = jsonObject.getJSONArray("borrow");
JSONArray loan = jsonObject.getJSONArray("loan"); JSONArray loan = jsonObject.getJSONArray("loan");
if(borrow!=null) {
for (int i = 0; i < borrow.size(); i++) { for (int i = 0; i < borrow.size(); i++) {
JSONObject jsonObject1 = borrow.getJSONObject(i); JSONObject jsonObject1 = borrow.getJSONObject(i);
String abStract = jsonObject1.getString("classary"); String abStract = jsonObject1.getString("classary");
String sourceOfExpenses = jsonObject1.getString("name"); String sourceOfExpenses = jsonObject1.getString("name");
String isDebit = jsonObject1.getString("is_debit"); String isDebit = jsonObject1.getString("is_debit");
String mine_id = jsonObject1.getString("mining");
WagesSalaryProof wagesSalaryProof = new WagesSalaryProof(); WagesSalaryProof wagesSalaryProof = new WagesSalaryProof();
wagesSalaryProof.setAbStract(abStract); wagesSalaryProof.setAbStract(abStract);
wagesSalaryProof.setSourceOfExpenses(sourceOfExpenses); wagesSalaryProof.setSourceOfExpenses(sourceOfExpenses);
wagesSalaryProof.setIsDebit(isDebit); wagesSalaryProof.setIsDebit(isDebit);
wagesSalaryProof.setMineId(mine_id);
WagesSalaryProof wagesSalaryProof1 = wagesSalaryProofMapper.selectWagesVoucherList(wagesSalaryProof); WagesSalaryProof wagesSalaryProof1 = wagesSalaryProofMapper.selectWagesVoucherList(wagesSalaryProof);
// wagesSalaryProof.setAccountCode(wagesSalaryProof1.getAccountCode()); // wagesSalaryProof.setAccountCode(wagesSalaryProof1.getAccountCode());
...@@ -152,6 +155,7 @@ public class WagesServiceImpl implements WagesService { ...@@ -152,6 +155,7 @@ public class WagesServiceImpl implements WagesService {
wagesSalaryProofLike.setAbStract(abStract); wagesSalaryProofLike.setAbStract(abStract);
wagesSalaryProofLike.setSourceOfExpenses("(%"); wagesSalaryProofLike.setSourceOfExpenses("(%");
wagesSalaryProofLike.setIsDebit(isDebit); wagesSalaryProofLike.setIsDebit(isDebit);
wagesSalaryProofLike.setMineId(mine_id);
List<WagesSalaryProof> wagesSalaryProofsList = wagesSalaryProofMapper.selectWagesVoucherLikeList(wagesSalaryProofLike); List<WagesSalaryProof> wagesSalaryProofsList = wagesSalaryProofMapper.selectWagesVoucherLikeList(wagesSalaryProofLike);
if (wagesSalaryProofsList.size() > 0) { if (wagesSalaryProofsList.size() > 0) {
WagesSalaryProof WagesSalaryProof3 = wagesSalaryProofsList.get(0); WagesSalaryProof WagesSalaryProof3 = wagesSalaryProofsList.get(0);
...@@ -165,7 +169,7 @@ public class WagesServiceImpl implements WagesService { ...@@ -165,7 +169,7 @@ public class WagesServiceImpl implements WagesService {
String lbname = sourceOfExpenses.substring(index + 1); String lbname = sourceOfExpenses.substring(index + 1);
String lbname2 = "项目"; String lbname2 = "项目";
//用友项目接口查询 //用友项目接口查询
String xmCode = getCodeByName(lbname, "010101"); String xmCode = getCodeByName(lbname, mine_id);
if (xmCode != null) { if (xmCode != null) {
jsonObject1.put("auxiliary_item_b", lbname2 + ":" + xmCode + "/" + lbname); jsonObject1.put("auxiliary_item_b", lbname2 + ":" + xmCode + "/" + lbname);
} }
...@@ -194,15 +198,20 @@ public class WagesServiceImpl implements WagesService { ...@@ -194,15 +198,20 @@ public class WagesServiceImpl implements WagesService {
borrowlists.add(jsonObject1); borrowlists.add(jsonObject1);
} }
}
if(loan!=null) {
for (int i = 0; i < loan.size(); i++) { for (int i = 0; i < loan.size(); i++) {
JSONObject jsonObject2 = loan.getJSONObject(i); JSONObject jsonObject2 = loan.getJSONObject(i);
String abStract = jsonObject2.getString("classary"); String abStract = jsonObject2.getString("classary");
String sourceOfExpenses = jsonObject2.getString("name"); String sourceOfExpenses = jsonObject2.getString("name");
String isDebit = jsonObject2.getString("is_debit"); String isDebit = jsonObject2.getString("is_debit");
String mine_id = jsonObject2.getString("mining");
WagesSalaryProof wagesSalaryProof = new WagesSalaryProof(); WagesSalaryProof wagesSalaryProof = new WagesSalaryProof();
wagesSalaryProof.setAbStract(abStract); wagesSalaryProof.setAbStract(abStract);
wagesSalaryProof.setSourceOfExpenses(sourceOfExpenses); wagesSalaryProof.setSourceOfExpenses(sourceOfExpenses);
wagesSalaryProof.setIsDebit(isDebit); wagesSalaryProof.setIsDebit(isDebit);
wagesSalaryProof.setMineId(mine_id);
WagesSalaryProof wagesSalaryProof2 = wagesSalaryProofMapper.selectWagesVoucherList(wagesSalaryProof); WagesSalaryProof wagesSalaryProof2 = wagesSalaryProofMapper.selectWagesVoucherList(wagesSalaryProof);
// wagesSalaryProof.setAccountCode(wagesSalaryProof1.getAccountCode()); // wagesSalaryProof.setAccountCode(wagesSalaryProof1.getAccountCode());
...@@ -218,7 +227,7 @@ public class WagesServiceImpl implements WagesService { ...@@ -218,7 +227,7 @@ public class WagesServiceImpl implements WagesService {
loanlists.add(jsonObject2); loanlists.add(jsonObject2);
} }
}
// com.alibaba.fastjson2.JSONArray borrowjson = com.alibaba.fastjson2.JSONArray.of(borrowlists); // com.alibaba.fastjson2.JSONArray borrowjson = com.alibaba.fastjson2.JSONArray.of(borrowlists);
// com.alibaba.fastjson2.JSONArray loanjson = com.alibaba.fastjson2.JSONArray.of(loanlists); // com.alibaba.fastjson2.JSONArray loanjson = com.alibaba.fastjson2.JSONArray.of(loanlists);
object.put("borrow", borrowlists); object.put("borrow", borrowlists);
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<result property="accountCode" column="account_code" /> <result property="accountCode" column="account_code" />
<result property="auxiliaryItemA" column="auxiliary_item_a" /> <result property="auxiliaryItemA" column="auxiliary_item_a" />
<result property="auxiliaryItemB" column="auxiliary_item_b" /> <result property="auxiliaryItemB" column="auxiliary_item_b" />
<result property="mineId" column="mine_id" />
</resultMap> </resultMap>
...@@ -25,7 +26,8 @@ ...@@ -25,7 +26,8 @@
TRIM(account_name)account_name, TRIM(account_name)account_name,
TRIM(account_code)account_code, TRIM(account_code)account_code,
TRIM(auxiliary_item_a)auxiliary_item_a, TRIM(auxiliary_item_a)auxiliary_item_a,
TRIM(auxiliary_item_b) auxiliary_item_b TRIM(auxiliary_item_b) auxiliary_item_b,
TRIM(mine_id)mine_id
from wages_voucher from wages_voucher
where 1=1 where 1=1
<if test="abStract != null and abStract != ''"> <if test="abStract != null and abStract != ''">
...@@ -37,6 +39,9 @@ ...@@ -37,6 +39,9 @@
<if test="isDebit != null and isDebit != ''"> <if test="isDebit != null and isDebit != ''">
AND is_debit = #{isDebit} AND is_debit = #{isDebit}
</if> </if>
<if test="mineId != null and mineId != ''">
AND mine_id = #{mineId}
</if>
</select> </select>
<select id="selectWagesVoucherLikeList" parameterType="com.ruoyi.system.model.wages.dao.WagesSalaryProof" resultMap="WagesSalaryProofResult"> <select id="selectWagesVoucherLikeList" parameterType="com.ruoyi.system.model.wages.dao.WagesSalaryProof" resultMap="WagesSalaryProofResult">
...@@ -48,7 +53,8 @@ ...@@ -48,7 +53,8 @@
TRIM(account_name)account_name, TRIM(account_name)account_name,
TRIM(account_code)account_code, TRIM(account_code)account_code,
TRIM(auxiliary_item_a)auxiliary_item_a, TRIM(auxiliary_item_a)auxiliary_item_a,
TRIM(auxiliary_item_b) auxiliary_item_b TRIM(auxiliary_item_b) auxiliary_item_b,
TRIM(mine_id)mine_id
from wages_voucher from wages_voucher
where 1=1 where 1=1
<if test="abStract != null and abStract != ''"> <if test="abStract != null and abStract != ''">
...@@ -60,6 +66,9 @@ ...@@ -60,6 +66,9 @@
<if test="isDebit != null and isDebit != ''"> <if test="isDebit != null and isDebit != ''">
AND is_debit = #{isDebit} AND is_debit = #{isDebit}
</if> </if>
<if test="mineId != null and mineId != ''">
AND mine_id = #{mineId}
</if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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