Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-cost-system
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
bltdc
dc-cost-system
Commits
ac3bacc4
Commit
ac3bacc4
authored
Nov 04, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
17cf5624
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
56 deletions
+54
-56
Cost.xml
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
+54
-56
No files found.
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
View file @
ac3bacc4
...
@@ -307,6 +307,60 @@
...
@@ -307,6 +307,60 @@
ORDER BY id DESC
ORDER BY id DESC
</select>
</select>
<!--查询所有的物流费用单和采购单-->
<select
id=
"getLogisticsCostList"
resultType=
"com.bailuntec.cost.api.dto.ManageCostDto"
>
SELECT c.cost_no no,c.bank_company receiveUnit,d.cost_reason reason,c.pay_time payTime,c.cost_form
manageCostType,u.departmentname1 departmentName,
c.company_value companyValue,c.company_name companyName,t.manage_cost_type feeSuperType,d.kind_name
feeSubType,d.amount amount,c.dic currency,
d.amount * c.to_rmb_rate amountRmb, d.id as costId1, c.id as costId
FROM user u, cost c, cost_detail d, type_relation t
WHERE c.create_userid = u.userid AND c.cost_no = d.cost_no AND t.fee_type = c.type_name AND c.cost_form = 1 AND
c.cost_status = 4
AND d.kind_name = '物流费'
<if
test=
"startDate != null"
>
AND c.pay_time
<![CDATA[>=]]>
#{startDate}
</if>
<if
test=
"endDate != null"
>
AND c.pay_time
<![CDATA[<]]>
#{endDate}
</if>
UNION
SELECT c1.cost_no no,c1.bank_company receiveUnit,c1.cost_reason reason,c1.pay_time payTime,c1.cost_form
manageCostType,u.departmentname1 departmentName,
c1.company_value companyValue,c1.company_name companyName,t.manage_cost_type feeSuperType,c1.kind_name
feeSubType,-c1.amount amount,c1.dic currency,
-c1.amount * c1.to_rmb_rate amountRmb, 0 as costId1, c1.id as costId
FROM user u, type_relation t ,cost c1
WHERE c1.create_userid = u.userid AND t.fee_type = c1.type_name AND c1.cost_form = 2 AND c1.cost_status = 4
AND c1.kind_name = '物流费'
<if
test=
"startDate != null"
>
AND c1.pay_time
<![CDATA[>=]]>
#{startDate}
</if>
<if
test=
"endDate != null"
>
AND c1.pay_time
<![CDATA[<]]>
#{endDate}
</if>
UNION
SELECT c.cost_no no,c.bank_company receiveUnit,c.cost_reason reason,c.pay_time payTime,c.cost_form
manageCostType,u.departmentname1 departmentName,
c.company_value companyValue,c.company_name companyName,t.manage_cost_type feeSuperType,c.kind_name
feeSubType,c.amount amount,c.dic currency,
c.amount * c.to_rmb_rate amountRmb, 0 as costId1, c.id as costId
FROM user u, cost c, type_relation t
WHERE c.create_userid = u.userid AND t.fee_type = c.type_name AND c.cost_form = 3 AND c.is_lend = 2 AND
c.cost_status = 4
AND c.kind_name = '物流费'
<if
test=
"startDate != null"
>
AND c.pay_time
<![CDATA[>=]]>
#{startDate}
</if>
<if
test=
"endDate != null"
>
AND c.pay_time
<![CDATA[<]]>
#{endDate}
</if>
UNION
SELECT b.buyno no,b.suppliername receiveUnit,b.note reason,b.pay_time payTime,0 as
manageCostType,b.departmentname departmentName,
b.company_value companyValue,b.company companyName,b.sku_type_name feeSuperType,b.sku_type_name feeSubType,
b.amount amount,'CNY',b.amount amountRmb, 0 as costId1, 0 as costId
FROM buy b
WHERE b.sku_type_name = '物流费'
and b.buystatus
<![CDATA[>]]>
3 and b.buystatus
<![CDATA[<]]>
7 and b.buy_type
<![CDATA[<]]>
3
<if
test=
"startDate != null"
>
AND b.pay_time
<![CDATA[>=]]>
#{startDate}
</if>
<if
test=
"endDate != null"
>
AND b.pay_time
<![CDATA[<]]>
#{endDate}
</if>
</select>
<select
id=
"getCostList"
resultType=
"com.bailuntec.cost.api.dto.CostDto"
>
select *
from cost
where last_modify_date
>
= #{startDate}
and last_modify_date
<
= #{endDate}
</select>
<!--管理成本:查询付款单+收款单+借还单+采购单-->
<!--管理成本:查询付款单+收款单+借还单+采购单-->
<select
id=
"selectManageCost"
resultType=
"com.bailuntec.cost.api.dto.ManageCostDto"
>
<select
id=
"selectManageCost"
resultType=
"com.bailuntec.cost.api.dto.ManageCostDto"
>
...
@@ -457,56 +511,6 @@
...
@@ -457,56 +511,6 @@
<if
test=
"endDate != null"
>
AND b.pay_time
<![CDATA[<]]>
#{endDate}
</if>
<if
test=
"endDate != null"
>
AND b.pay_time
<![CDATA[<]]>
#{endDate}
</if>
</select>
</select>
<!--查询所有的物流费用单和采购单-->
<select
id=
"getLogisticsCostList"
resultType=
"com.bailuntec.cost.api.dto.ManageCostDto"
>
SELECT c.cost_no no,c.bank_company receiveUnit,d.cost_reason reason,c.pay_time payTime,c.cost_form
manageCostType,u.departmentname1 departmentName,
c.company_value companyValue,c.company_name companyName,t.manage_cost_type feeSuperType,d.kind_name
feeSubType,d.amount amount,c.dic currency,
d.amount * c.to_rmb_rate amountRmb, d.id as costId1, c.id as costId
FROM user u, cost c, cost_detail d, type_relation t
WHERE c.create_userid = u.userid AND c.cost_no = d.cost_no AND t.fee_type = c.type_name AND c.cost_form = 1 AND
c.cost_status = 4
AND d.kind_name = '物流费'
<if
test=
"startDate != null"
>
AND c.pay_time
<![CDATA[>=]]>
#{startDate}
</if>
<if
test=
"endDate != null"
>
AND c.pay_time
<![CDATA[<]]>
#{endDate}
</if>
UNION
SELECT c1.cost_no no,c1.bank_company receiveUnit,c1.cost_reason reason,c1.pay_time payTime,c1.cost_form
manageCostType,u.departmentname1 departmentName,
c1.company_value companyValue,c1.company_name companyName,t.manage_cost_type feeSuperType,c1.kind_name
feeSubType,-c1.amount amount,c1.dic currency,
-c1.amount * c1.to_rmb_rate amountRmb, 0 as costId1, c1.id as costId
FROM user u, type_relation t ,cost c1
WHERE c1.create_userid = u.userid AND t.fee_type = c1.type_name AND c1.cost_form = 2 AND c1.cost_status = 4
AND c1.kind_name = '物流费'
<if
test=
"startDate != null"
>
AND c1.pay_time
<![CDATA[>=]]>
#{startDate}
</if>
<if
test=
"endDate != null"
>
AND c1.pay_time
<![CDATA[<]]>
#{endDate}
</if>
UNION
SELECT c.cost_no no,c.bank_company receiveUnit,c.cost_reason reason,c.pay_time payTime,c.cost_form
manageCostType,u.departmentname1 departmentName,
c.company_value companyValue,c.company_name companyName,t.manage_cost_type feeSuperType,c.kind_name
feeSubType,c.amount amount,c.dic currency,
c.amount * c.to_rmb_rate amountRmb, 0 as costId1, c.id as costId
FROM user u, cost c, type_relation t
WHERE c.create_userid = u.userid AND t.fee_type = c.type_name AND c.cost_form = 3 AND c.is_lend = 2 AND
c.cost_status = 4
AND c.kind_name = '物流费'
<if
test=
"startDate != null"
>
AND c.pay_time
<![CDATA[>=]]>
#{startDate}
</if>
<if
test=
"endDate != null"
>
AND c.pay_time
<![CDATA[<]]>
#{endDate}
</if>
UNION
SELECT b.buyno no,b.suppliername receiveUnit,b.note reason,b.pay_time payTime,0 as
manageCostType,b.departmentname departmentName,
b.company_value companyValue,b.company companyName,b.sku_type_name feeSuperType,b.sku_type_name feeSubType,
b.amount amount,'CNY',b.amount amountRmb, 0 as costId1, 0 as costId
FROM buy b
WHERE b.sku_type_name = '物流费'
and b.buystatus
<![CDATA[>]]>
3 and b.buystatus
<![CDATA[<]]>
7 and b.buy_type
<![CDATA[<]]>
3
<if
test=
"startDate != null"
>
AND b.pay_time
<![CDATA[>=]]>
#{startDate}
</if>
<if
test=
"endDate != null"
>
AND b.pay_time
<![CDATA[<]]>
#{endDate}
</if>
</select>
<!--
<!--
资产负债表相关费用单
资产负债表相关费用单
1、已完成状态的所有费用类型借支单
1、已完成状态的所有费用类型借支单
...
@@ -633,12 +637,6 @@
...
@@ -633,12 +637,6 @@
</if>
</if>
</select>
</select>
<select
id=
"getCostList"
resultType=
"com.bailuntec.cost.api.dto.CostDto"
>
select *
from cost
where last_modify_date
>
= #{startDate}
and last_modify_date
<
= #{endDate}
</select>
<update
id=
"updateCashierAnnex"
>
<update
id=
"updateCashierAnnex"
>
update cost
update cost
...
...
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