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
Hide 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 {
...
@@ -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
+
'\''
+
'}'
;
'}'
;
}
}
}
}
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/WagesServiceImpl.java
View file @
81576a99
...
@@ -124,51 +124,55 @@ public class WagesServiceImpl implements WagesService {
...
@@ -124,51 +124,55 @@ 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"
);
for
(
int
i
=
0
;
i
<
borrow
.
size
();
i
++)
{
if
(
borrow
!=
null
)
{
JSONObject
jsonObject1
=
borrow
.
getJSONObject
(
i
);
for
(
int
i
=
0
;
i
<
borrow
.
size
();
i
++)
{
String
abStract
=
jsonObject1
.
getString
(
"classary"
);
JSONObject
jsonObject1
=
borrow
.
getJSONObject
(
i
);
String
sourceOfExpenses
=
jsonObject1
.
getString
(
"name"
);
String
abStract
=
jsonObject1
.
getString
(
"classary"
);
String
isDebit
=
jsonObject1
.
getString
(
"is_debit"
);
String
sourceOfExpenses
=
jsonObject1
.
getString
(
"name"
);
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
wagesSalaryProof1
=
wagesSalaryProofMapper
.
selectWagesVoucherList
(
wagesSalaryProof
);
wagesSalaryProof
.
setMineId
(
mine_id
);
WagesSalaryProof
wagesSalaryProof1
=
wagesSalaryProofMapper
.
selectWagesVoucherList
(
wagesSalaryProof
);
// wagesSalaryProof.setAccountCode(wagesSalaryProof1.getAccountCode());
// wagesSalaryProof.setAccountCode(wagesSalaryProof1.getAccountCode());
// wagesSalaryProof.setAuxiliaryItemA(wagesSalaryProof1.getAuxiliaryItemA());
// wagesSalaryProof.setAuxiliaryItemA(wagesSalaryProof1.getAuxiliaryItemA());
// wagesSalaryProof.setAuxiliaryItemB(wagesSalaryProof1.getAuxiliaryItemB());
// wagesSalaryProof.setAuxiliaryItemB(wagesSalaryProof1.getAuxiliaryItemB());
//borrowlists.add(wagesSalaryProof);
//borrowlists.add(wagesSalaryProof);
if
(
wagesSalaryProof1
!=
null
)
{
if
(
wagesSalaryProof1
!=
null
)
{
System
.
err
.
println
(
"wagesSalaryProof1===="
+
wagesSalaryProof1
.
toString
()
+
i
);
System
.
err
.
println
(
"wagesSalaryProof1===="
+
wagesSalaryProof1
.
toString
()
+
i
);
jsonObject1
.
put
(
"account_code"
,
wagesSalaryProof1
.
getAccountCode
());
jsonObject1
.
put
(
"account_code"
,
wagesSalaryProof1
.
getAccountCode
());
jsonObject1
.
put
(
"auxiliary_item_a"
,
wagesSalaryProof1
.
getAuxiliaryItemA
());
jsonObject1
.
put
(
"auxiliary_item_a"
,
wagesSalaryProof1
.
getAuxiliaryItemA
());
jsonObject1
.
put
(
"auxiliary_item_b"
,
wagesSalaryProof1
.
getAuxiliaryItemB
());
jsonObject1
.
put
(
"auxiliary_item_b"
,
wagesSalaryProof1
.
getAuxiliaryItemB
());
}
else
{
}
else
{
//如果项目带前带(,去获取相似项目的值
//如果项目带前带(,去获取相似项目的值
if
(
sourceOfExpenses
.
startsWith
(
"("
)
||
sourceOfExpenses
.
startsWith
(
"("
))
{
if
(
sourceOfExpenses
.
startsWith
(
"("
)
||
sourceOfExpenses
.
startsWith
(
"("
))
{
WagesSalaryProof
wagesSalaryProofLike
=
new
WagesSalaryProof
();
WagesSalaryProof
wagesSalaryProofLike
=
new
WagesSalaryProof
();
wagesSalaryProofLike
.
setAbStract
(
abStract
);
wagesSalaryProofLike
.
setAbStract
(
abStract
);
wagesSalaryProofLike
.
setSourceOfExpenses
(
"(%"
);
wagesSalaryProofLike
.
setSourceOfExpenses
(
"(%"
);
wagesSalaryProofLike
.
setIsDebit
(
isDebit
);
wagesSalaryProofLike
.
setIsDebit
(
isDebit
);
List
<
WagesSalaryProof
>
wagesSalaryProofsList
=
wagesSalaryProofMapper
.
selectWagesVoucherLikeList
(
wagesSalaryProofLike
);
wagesSalaryProofLike
.
setMineId
(
mine_id
);
if
(
wagesSalaryProofsList
.
size
()
>
0
)
{
List
<
WagesSalaryProof
>
wagesSalaryProofsList
=
wagesSalaryProofMapper
.
selectWagesVoucherLikeList
(
wagesSalaryProofLike
);
WagesSalaryProof
WagesSalaryProof3
=
wagesSalaryProofsList
.
get
(
0
);
if
(
wagesSalaryProofsList
.
size
()
>
0
)
{
jsonObject1
.
put
(
"account_code"
,
WagesSalaryProof3
.
getAccountCode
());
WagesSalaryProof
WagesSalaryProof3
=
wagesSalaryProofsList
.
get
(
0
);
jsonObject1
.
put
(
"auxiliary_item_a"
,
WagesSalaryProof3
.
getAuxiliaryItemA
());
jsonObject1
.
put
(
"account_code"
,
WagesSalaryProof3
.
getAccountCode
());
int
index
=
sourceOfExpenses
.
indexOf
(
")"
);
jsonObject1
.
put
(
"auxiliary_item_a"
,
WagesSalaryProof3
.
getAuxiliaryItemA
());
if
(
index
==
-
1
)
{
int
index
=
sourceOfExpenses
.
indexOf
(
")"
);
index
=
sourceOfExpenses
.
indexOf
(
")"
);
if
(
index
==
-
1
)
{
}
index
=
sourceOfExpenses
.
indexOf
(
")"
);
if
(
index
>=
0
)
{
String
lbname
=
sourceOfExpenses
.
substring
(
index
+
1
);
String
lbname2
=
"项目"
;
//用友项目接口查询
String
xmCode
=
getCodeByName
(
lbname
,
"010101"
);
if
(
xmCode
!=
null
)
{
jsonObject1
.
put
(
"auxiliary_item_b"
,
lbname2
+
":"
+
xmCode
+
"/"
+
lbname
);
}
}
if
(
index
>=
0
)
{
String
lbname
=
sourceOfExpenses
.
substring
(
index
+
1
);
String
lbname2
=
"项目"
;
//用友项目接口查询
String
xmCode
=
getCodeByName
(
lbname
,
mine_id
);
if
(
xmCode
!=
null
)
{
jsonObject1
.
put
(
"auxiliary_item_b"
,
lbname2
+
":"
+
xmCode
+
"/"
+
lbname
);
}
// //用友接口取数
// //用友接口取数
// CustomDocRequestModel docRequest = new CustomDocRequestModel();
// CustomDocRequestModel docRequest = new CustomDocRequestModel();
...
@@ -185,40 +189,45 @@ public class WagesServiceImpl implements WagesService {
...
@@ -185,40 +189,45 @@ public class WagesServiceImpl implements WagesService {
// }
// }
//
//
// }
// }
}
}
}
}
}
}
}
}
borrowlists
.
add
(
jsonObject1
);
borrowlists
.
add
(
jsonObject1
);
}
}
}
for
(
int
i
=
0
;
i
<
loan
.
size
();
i
++)
{
JSONObject
jsonObject2
=
loan
.
getJSONObject
(
i
);
if
(
loan
!=
null
)
{
String
abStract
=
jsonObject2
.
getString
(
"classary"
);
for
(
int
i
=
0
;
i
<
loan
.
size
();
i
++)
{
String
sourceOfExpenses
=
jsonObject2
.
getString
(
"name"
);
JSONObject
jsonObject2
=
loan
.
getJSONObject
(
i
);
String
isDebit
=
jsonObject2
.
getString
(
"is_debit"
);
String
abStract
=
jsonObject2
.
getString
(
"classary"
);
WagesSalaryProof
wagesSalaryProof
=
new
WagesSalaryProof
();
String
sourceOfExpenses
=
jsonObject2
.
getString
(
"name"
);
wagesSalaryProof
.
setAbStract
(
abStract
);
String
isDebit
=
jsonObject2
.
getString
(
"is_debit"
);
wagesSalaryProof
.
setSourceOfExpenses
(
sourceOfExpenses
);
String
mine_id
=
jsonObject2
.
getString
(
"mining"
);
wagesSalaryProof
.
setIsDebit
(
isDebit
);
WagesSalaryProof
wagesSalaryProof
=
new
WagesSalaryProof
();
WagesSalaryProof
wagesSalaryProof2
=
wagesSalaryProofMapper
.
selectWagesVoucherList
(
wagesSalaryProof
);
wagesSalaryProof
.
setAbStract
(
abStract
);
wagesSalaryProof
.
setSourceOfExpenses
(
sourceOfExpenses
);
wagesSalaryProof
.
setIsDebit
(
isDebit
);
wagesSalaryProof
.
setMineId
(
mine_id
);
WagesSalaryProof
wagesSalaryProof2
=
wagesSalaryProofMapper
.
selectWagesVoucherList
(
wagesSalaryProof
);
// wagesSalaryProof.setAccountCode(wagesSalaryProof1.getAccountCode());
// wagesSalaryProof.setAccountCode(wagesSalaryProof1.getAccountCode());
// wagesSalaryProof.setAuxiliaryItemA(wagesSalaryProof1.getAuxiliaryItemA());
// wagesSalaryProof.setAuxiliaryItemA(wagesSalaryProof1.getAuxiliaryItemA());
// wagesSalaryProof.setAuxiliaryItemB(wagesSalaryProof1.getAuxiliaryItemB());
// wagesSalaryProof.setAuxiliaryItemB(wagesSalaryProof1.getAuxiliaryItemB());
// loanlists.add(wagesSalaryProof);
// loanlists.add(wagesSalaryProof);
if
(
wagesSalaryProof2
!=
null
)
{
if
(
wagesSalaryProof2
!=
null
)
{
System
.
err
.
println
(
"wagesSalaryProof2===="
+
wagesSalaryProof2
.
toString
()
+
i
);
System
.
err
.
println
(
"wagesSalaryProof2===="
+
wagesSalaryProof2
.
toString
()
+
i
);
jsonObject2
.
put
(
"account_code"
,
wagesSalaryProof2
.
getAccountCode
());
jsonObject2
.
put
(
"account_code"
,
wagesSalaryProof2
.
getAccountCode
());
jsonObject2
.
put
(
"auxiliary_item_a"
,
wagesSalaryProof2
.
getAuxiliaryItemA
());
jsonObject2
.
put
(
"auxiliary_item_a"
,
wagesSalaryProof2
.
getAuxiliaryItemA
());
jsonObject2
.
put
(
"auxiliary_item_b"
,
wagesSalaryProof2
.
getAuxiliaryItemB
());
jsonObject2
.
put
(
"auxiliary_item_b"
,
wagesSalaryProof2
.
getAuxiliaryItemB
());
}
}
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
);
...
...
ruoyi-wages/src/main/resources/mapper/system/WagesSalaryProofMapper.xml
View file @
81576a99
...
@@ -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
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