Commit 81576a99 authored by chengwenlong's avatar chengwenlong

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

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