Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
klck
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
位宇华
klck
Commits
81576a99
Commit
81576a99
authored
Jun 26, 2024
by
chengwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改唐山电力凭证对照数据查询接口,添加矿ID
parent
aa48614f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
62 deletions
+91
-62
ruoyi-wages/src/main/java/com/ruoyi/system/model/wages/dao/WagesSalaryProof.java
...va/com/ruoyi/system/model/wages/dao/WagesSalaryProof.java
+11
-0
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/WagesServiceImpl.java
.../java/com/ruoyi/system/service/impl/WagesServiceImpl.java
+69
-60
ruoyi-wages/src/main/resources/mapper/system/WagesSalaryProofMapper.xml
...c/main/resources/mapper/system/WagesSalaryProofMapper.xml
+11
-2
No files found.
ruoyi-wages/src/main/java/com/ruoyi/system/model/wages/dao/WagesSalaryProof.java
View file @
81576a99
...
...
@@ -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
+
'\''
+
'}'
;
}
}
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/WagesServiceImpl.java
View file @
81576a99
...
...
@@ -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
);
...
...
ruoyi-wages/src/main/resources/mapper/system/WagesSalaryProofMapper.xml
View file @
81576a99
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment