Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-cost
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
bailuntec-cost
Commits
947b072e
Commit
947b072e
authored
Jul 20, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
广州歌戈儿生活科技有限公司获取明细时返回歌戈儿其他分店费用明细
parent
c5116acd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
9 deletions
+51
-9
CostDao.java
...e/src/main/java/com/blt/other/other_cost/dao/CostDao.java
+2
-2
CostApiServiceImpl.java
...blt/other/other_cost/service/impl/CostApiServiceImpl.java
+13
-1
Cost.xml
cost-core/src/main/resources/mapper/Cost.xml
+36
-6
No files found.
cost-core/src/main/java/com/blt/other/other_cost/dao/CostDao.java
View file @
947b072e
...
@@ -87,7 +87,7 @@ public interface CostDao {
...
@@ -87,7 +87,7 @@ public interface CostDao {
* @param endDate
* @param endDate
* @param feeSuperType
* @param feeSuperType
* @param feeSubType
* @param feeSubType
* @param companyValue
* @param companyValue
List
* @param companyName
* @param companyName
* @param departmentName
* @param departmentName
* @param createUserId
* @param createUserId
...
@@ -95,7 +95,7 @@ public interface CostDao {
...
@@ -95,7 +95,7 @@ public interface CostDao {
* @return
* @return
*/
*/
List
<
ManageCostDto
>
selectManageCost
(
@Param
(
"startDate"
)
Date
startDate
,
@Param
(
"endDate"
)
Date
endDate
,
@Param
(
"feeSuperType"
)
String
feeSuperType
,
List
<
ManageCostDto
>
selectManageCost
(
@Param
(
"startDate"
)
Date
startDate
,
@Param
(
"endDate"
)
Date
endDate
,
@Param
(
"feeSuperType"
)
String
feeSuperType
,
@Param
(
"feeSubType"
)
String
feeSubType
,
@Param
(
"companyValue
"
)
Integer
companyValue
,
@Param
(
"feeSubType"
)
String
feeSubType
,
@Param
(
"companyValue
List"
)
List
<
Integer
>
companyValueList
,
@Param
(
"companyName"
)
String
companyName
,
@Param
(
"departmentName"
)
String
departmentName
,
@Param
(
"companyName"
)
String
companyName
,
@Param
(
"departmentName"
)
String
departmentName
,
@Param
(
"createUserId"
)
Integer
createUserId
,
@Param
(
"payUserId"
)
Integer
payUserId
);
@Param
(
"createUserId"
)
Integer
createUserId
,
@Param
(
"payUserId"
)
Integer
payUserId
);
...
...
cost-core/src/main/java/com/blt/other/other_cost/service/impl/CostApiServiceImpl.java
View file @
947b072e
...
@@ -26,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -26,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -160,7 +161,18 @@ public class CostApiServiceImpl implements CostApiService {
...
@@ -160,7 +161,18 @@ public class CostApiServiceImpl implements CostApiService {
if
(!
StringUtils
.
isEmpty
(
endDateStr
)){
if
(!
StringUtils
.
isEmpty
(
endDateStr
)){
endDate
=
DateTimeUtil
.
stringToDate
(
endDateStr
,
DateTimeUtil
.
DATE_FORMAT
);
endDate
=
DateTimeUtil
.
stringToDate
(
endDateStr
,
DateTimeUtil
.
DATE_FORMAT
);
}
}
List
<
ManageCostDto
>
manageCostDtoList
=
costDao
.
selectManageCost
(
startDate
,
DateTimeUtil
.
addDays
(
endDate
,
1
),
feeSuperType
,
feeSubType
,
companyValue
,
companyName
,
departmentName
,
createUserId
,
payUserId
);
ArrayList
<
Integer
>
companyValueList
=
new
ArrayList
<>(
6
);
if
(
companyValue
!=
null
)
{
companyValueList
.
add
(
companyValue
);
if
(
companyValue
.
equals
(
53
))
{
companyValueList
.
add
(
50
);
companyValueList
.
add
(
59
);
companyValueList
.
add
(
60
);
companyValueList
.
add
(
61
);
companyValueList
.
add
(
66
);
}
}
List
<
ManageCostDto
>
manageCostDtoList
=
costDao
.
selectManageCost
(
startDate
,
DateTimeUtil
.
addDays
(
endDate
,
1
),
feeSuperType
,
feeSubType
,
companyValueList
,
companyName
,
departmentName
,
createUserId
,
payUserId
);
if
((
companyValue
==
null
||
companyValue
==
2
)
&&
((
feeSuperType
==
null
&&
departmentName
==
null
)
||
if
((
companyValue
==
null
||
companyValue
==
2
)
&&
((
feeSuperType
==
null
&&
departmentName
==
null
)
||
((
"耗材"
.
equals
(
feeSuperType
)
||
"耗材"
.
equals
(
feeSubType
))
&&
"采购部"
.
equals
(
departmentName
))
||
((
"耗材"
.
equals
(
feeSuperType
)
||
"耗材"
.
equals
(
feeSubType
))
&&
"采购部"
.
equals
(
departmentName
))
||
((
"耗材"
.
equals
(
feeSuperType
)
||
"耗材"
.
equals
(
feeSubType
))
&&
departmentName
==
null
))){
((
"耗材"
.
equals
(
feeSuperType
)
||
"耗材"
.
equals
(
feeSubType
))
&&
departmentName
==
null
))){
...
...
cost-core/src/main/resources/mapper/Cost.xml
View file @
947b072e
...
@@ -347,7 +347,12 @@
...
@@ -347,7 +347,12 @@
<if
test=
"feeSuperType != null and feeSuperType != ''"
>
AND t.manage_cost_type = #{feeSuperType}
</if>
<if
test=
"feeSuperType != null and feeSuperType != ''"
>
AND t.manage_cost_type = #{feeSuperType}
</if>
<if
test=
"feeSubType != null and feeSubType != ''"
>
AND d.kind_name = #{feeSubType}
</if>
<if
test=
"feeSubType != null and feeSubType != ''"
>
AND d.kind_name = #{feeSubType}
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
AND u.departmentname1 = #{departmentName}
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
AND u.departmentname1 = #{departmentName}
</if>
<if
test=
"companyValue != null and companyValue != 0"
>
AND c.company_value = #{companyValue}
</if>
<if
test=
"companyValueList != null and companyValueList.size() > 0"
>
AND c.company_value in
<foreach
collection=
"companyValueList"
item=
"companyValue"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<if
test=
"companyValue != null and companyValue != 0"
>
#{companyValue}
</if>
</foreach>
</if>
<if
test=
"companyName != null and companyName != ''"
>
AND c.company_name = #{companyName}
</if>
<if
test=
"companyName != null and companyName != ''"
>
AND c.company_name = #{companyName}
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
AND c.create_userid = #{createUserId}
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
AND c.create_userid = #{createUserId}
</if>
<if
test=
"payUserId != null and payUserId != ''"
>
AND c.pay_user_id = #{payUserId}
</if>
<if
test=
"payUserId != null and payUserId != ''"
>
AND c.pay_user_id = #{payUserId}
</if>
...
@@ -363,7 +368,12 @@
...
@@ -363,7 +368,12 @@
<if
test=
"feeSuperType != null and feeSuperType != ''"
>
AND t.manage_cost_type = #{feeSuperType}
</if>
<if
test=
"feeSuperType != null and feeSuperType != ''"
>
AND t.manage_cost_type = #{feeSuperType}
</if>
<if
test=
"feeSubType != null and feeSubType != ''"
>
AND d.kind_name = #{feeSubType}
</if>
<if
test=
"feeSubType != null and feeSubType != ''"
>
AND d.kind_name = #{feeSubType}
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
AND u.departmentname1 = #{departmentName}
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
AND u.departmentname1 = #{departmentName}
</if>
<if
test=
"companyValue != null and companyValue != 0"
>
AND c.company_value = #{companyValue}
</if>
<if
test=
"companyValueList != null and companyValueList.size() > 0"
>
AND c.company_value in
<foreach
collection=
"companyValueList"
item=
"companyValue"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<if
test=
"companyValue != null and companyValue != 0"
>
#{companyValue}
</if>
</foreach>
</if>
<if
test=
"companyName != null and companyName != ''"
>
AND c.company_name = #{companyName}
</if>
<if
test=
"companyName != null and companyName != ''"
>
AND c.company_name = #{companyName}
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
AND c.create_userid = #{createUserId}
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
AND c.create_userid = #{createUserId}
</if>
<if
test=
"payUserId != null and payUserId != ''"
>
AND c.pay_user_id = #{payUserId}
</if>
<if
test=
"payUserId != null and payUserId != ''"
>
AND c.pay_user_id = #{payUserId}
</if>
...
@@ -382,7 +392,12 @@
...
@@ -382,7 +392,12 @@
<if
test=
"feeSuperType != null and feeSuperType != ''"
>
AND t.manage_cost_type = #{feeSuperType}
</if>
<if
test=
"feeSuperType != null and feeSuperType != ''"
>
AND t.manage_cost_type = #{feeSuperType}
</if>
<if
test=
"feeSubType != null and feeSubType != ''"
>
AND c1.kind_name = #{feeSubType}
</if>
<if
test=
"feeSubType != null and feeSubType != ''"
>
AND c1.kind_name = #{feeSubType}
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
AND u.departmentname1 = #{departmentName}
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
AND u.departmentname1 = #{departmentName}
</if>
<if
test=
"companyValue != null and companyValue != 0"
>
AND c1.company_value = #{companyValue}
</if>
<if
test=
"companyValueList != null and companyValueList.size() > 0"
>
AND c1.company_value in
<foreach
collection=
"companyValueList"
item=
"companyValue"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<if
test=
"companyValue != null and companyValue != 0"
>
#{companyValue}
</if>
</foreach>
</if>
<if
test=
"companyName != null and companyName != ''"
>
AND c1.company_name = #{companyName}
</if>
<if
test=
"companyName != null and companyName != ''"
>
AND c1.company_name = #{companyName}
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
AND c1.create_userid = #{createUserId}
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
AND c1.create_userid = #{createUserId}
</if>
<if
test=
"payUserId != null and payUserId != ''"
>
AND c1.pay_user_id = #{payUserId}
</if>
<if
test=
"payUserId != null and payUserId != ''"
>
AND c1.pay_user_id = #{payUserId}
</if>
...
@@ -401,7 +416,12 @@
...
@@ -401,7 +416,12 @@
<if
test=
"feeSuperType != null and feeSuperType != ''"
>
AND t.manage_cost_type = #{feeSuperType}
</if>
<if
test=
"feeSuperType != null and feeSuperType != ''"
>
AND t.manage_cost_type = #{feeSuperType}
</if>
<if
test=
"feeSubType != null and feeSubType != ''"
>
AND c1.kind_name = #{feeSubType}
</if>
<if
test=
"feeSubType != null and feeSubType != ''"
>
AND c1.kind_name = #{feeSubType}
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
AND u.departmentname1 = #{departmentName}
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
AND u.departmentname1 = #{departmentName}
</if>
<if
test=
"companyValue != null and companyValue != 0"
>
AND c1.company_value = #{companyValue}
</if>
<if
test=
"companyValueList != null and companyValueList.size() > 0"
>
AND c1.company_value in
<foreach
collection=
"companyValueList"
item=
"companyValue"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<if
test=
"companyValue != null and companyValue != 0"
>
#{companyValue}
</if>
</foreach>
</if>
<if
test=
"companyName != null and companyName != ''"
>
AND c1.company_name = #{companyName}
</if>
<if
test=
"companyName != null and companyName != ''"
>
AND c1.company_name = #{companyName}
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
AND c1.create_userid = #{createUserId}
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
AND c1.create_userid = #{createUserId}
</if>
<if
test=
"payUserId != null and payUserId != ''"
>
AND c1.pay_user_id = #{payUserId}
</if>
<if
test=
"payUserId != null and payUserId != ''"
>
AND c1.pay_user_id = #{payUserId}
</if>
...
@@ -417,7 +437,12 @@
...
@@ -417,7 +437,12 @@
<if
test=
"feeSuperType != null and feeSuperType != ''"
>
AND t.manage_cost_type = #{feeSuperType}
</if>
<if
test=
"feeSuperType != null and feeSuperType != ''"
>
AND t.manage_cost_type = #{feeSuperType}
</if>
<if
test=
"feeSubType != null and feeSubType != ''"
>
AND c.kind_name = #{feeSubType}
</if>
<if
test=
"feeSubType != null and feeSubType != ''"
>
AND c.kind_name = #{feeSubType}
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
AND u.departmentname1 = #{departmentName}
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
AND u.departmentname1 = #{departmentName}
</if>
<if
test=
"companyValue != null and companyValue != 0"
>
AND c.company_value = #{companyValue}
</if>
<if
test=
"companyValueList != null and companyValueList.size() > 0"
>
AND c.company_value in
<foreach
collection=
"companyValueList"
item=
"companyValue"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<if
test=
"companyValue != null and companyValue != 0"
>
#{companyValue}
</if>
</foreach>
</if>
<if
test=
"companyName != null and companyName != ''"
>
AND c.company_name = #{companyName}
</if>
<if
test=
"companyName != null and companyName != ''"
>
AND c.company_name = #{companyName}
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
AND c.create_userid = #{createUserId}
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
AND c.create_userid = #{createUserId}
</if>
<if
test=
"payUserId != null and payUserId != ''"
>
AND c.pay_user_id = #{payUserId}
</if>
<if
test=
"payUserId != null and payUserId != ''"
>
AND c.pay_user_id = #{payUserId}
</if>
...
@@ -432,7 +457,12 @@
...
@@ -432,7 +457,12 @@
<if
test=
"feeSuperType != null and feeSuperType != ''"
>
AND b.sku_type_name = #{feeSuperType}
</if>
<if
test=
"feeSuperType != null and feeSuperType != ''"
>
AND b.sku_type_name = #{feeSuperType}
</if>
<if
test=
"feeSubType != null and feeSubType != ''"
>
AND b.sku_type_name = #{feeSubType}
</if>
<if
test=
"feeSubType != null and feeSubType != ''"
>
AND b.sku_type_name = #{feeSubType}
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
AND b.departmentname = #{departmentName}
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
AND b.departmentname = #{departmentName}
</if>
<if
test=
"companyValue != null and companyValue != 0"
>
AND b.company_value = #{companyValue}
</if>
<if
test=
"companyValueList != null and companyValueList.size() > 0"
>
AND b.company_value in
<foreach
collection=
"companyValueList"
item=
"companyValue"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<if
test=
"companyValue != null and companyValue != 0"
>
#{companyValue}
</if>
</foreach>
</if>
<if
test=
"companyName != null and companyName != ''"
>
AND b.company = #{companyName}
</if>
<if
test=
"companyName != null and companyName != ''"
>
AND b.company = #{companyName}
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
AND b.createuserid = #{createUserId}
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
AND b.createuserid = #{createUserId}
</if>
<if
test=
"startDate != null"
>
AND b.pay_time
<![CDATA[>=]]>
#{startDate}
</if>
<if
test=
"startDate != null"
>
AND b.pay_time
<![CDATA[>=]]>
#{startDate}
</if>
...
...
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