Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
4e66aeb9
Commit
4e66aeb9
authored
Jun 30, 2021
by
季圣华
Browse files
优化收款单
parent
dc2ba723
Changes
23
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/resources/mapper_xml/AccountItemMapperEx.xml
View file @
4e66aeb9
...
...
@@ -102,6 +102,7 @@
)
and ifnull(delete_flag,'0') !='1'
</select>
<update
id=
"batchDeleteAccountItemByHeadIds"
>
update jsh_account_item
set delete_flag='1'
...
...
@@ -112,4 +113,15 @@
</foreach>
)
</update>
<select
id=
"getEachAmountByBillId"
resultType=
"java.math.BigDecimal"
>
select
ifnull(sum(each_amount),0)
from jsh_account_item
where 1=1
<if
test=
"billId != null"
>
and bill_id=#{billId}
</if>
and ifnull(delete_flag,'0') !='1'
</select>
</mapper>
\ No newline at end of file
jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapper.xml
View file @
4e66aeb9
...
...
@@ -18,6 +18,7 @@
<result
column=
"pay_type"
jdbcType=
"VARCHAR"
property=
"payType"
/>
<result
column=
"bill_type"
jdbcType=
"VARCHAR"
property=
"billType"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"file_name"
jdbcType=
"VARCHAR"
property=
"fileName"
/>
<result
column=
"sales_man"
jdbcType=
"VARCHAR"
property=
"salesMan"
/>
<result
column=
"account_id_list"
jdbcType=
"VARCHAR"
property=
"accountIdList"
/>
<result
column=
"account_money_list"
jdbcType=
"VARCHAR"
property=
"accountMoneyList"
/>
...
...
@@ -93,8 +94,8 @@
</sql>
<sql
id=
"Base_Column_List"
>
id, type, sub_type, default_number, number, create_time, oper_time, organ_id, hands_person_id,
creator, account_id, change_amount, total_price, pay_type, bill_type, remark,
sales_man
,
account_id_list, account_money_list, discount, discount_money, discount_last_money,
creator, account_id, change_amount, total_price, pay_type, bill_type, remark,
file_name
,
sales_man,
account_id_list, account_money_list, discount, discount_money, discount_last_money,
other_money, other_money_list, other_money_item, account_day, status, link_number,
tenant_id, delete_flag
</sql>
...
...
@@ -134,23 +135,23 @@
oper_time, organ_id, hands_person_id,
creator, account_id, change_amount,
total_price, pay_type, bill_type,
remark,
sales_man, account_id_list
,
account_money_list, discount,
discount_money,
discount_last_money, other_money,
other_money_list,
other_money_item, account_day,
status,
link_number, tenant_id,
delete_flag
)
remark,
file_name, sales_man
,
account_id_list,
account_money_list, discount,
discount_money,
discount_last_money, other_money,
other_money_list,
other_money_item, account_day,
status,
link_number, tenant_id,
delete_flag
)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR},
#{defaultNumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{operTime,jdbcType=TIMESTAMP}, #{organId,jdbcType=BIGINT}, #{handsPersonId,jdbcType=BIGINT},
#{creator,jdbcType=BIGINT}, #{accountId,jdbcType=BIGINT}, #{changeAmount,jdbcType=DECIMAL},
#{totalPrice,jdbcType=DECIMAL}, #{payType,jdbcType=VARCHAR}, #{billType,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{
salesMan
,jdbcType=VARCHAR}, #{
accountIdList
,jdbcType=VARCHAR},
#{accountMoneyList,jdbcType=VARCHAR}, #{discount,jdbcType=DECIMAL},
#{discountMoney,jdbcType=DECIMAL},
#{discountLastMoney,jdbcType=DECIMAL}, #{otherMoney,jdbcType=DECIMAL},
#{otherMoneyList,jdbcType=VARCHAR},
#{otherMoneyItem,jdbcType=VARCHAR}, #{accountDay,jdbcType=INTEGER},
#{status,jdbcType=VARCHAR},
#{linkNumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR}
)
#{remark,jdbcType=VARCHAR}, #{
fileName
,jdbcType=VARCHAR}, #{
salesMan
,jdbcType=VARCHAR},
#{accountIdList,jdbcType=VARCHAR},
#{accountMoneyList,jdbcType=VARCHAR}, #{discount,jdbcType=DECIMAL},
#{discountMoney,jdbcType=DECIMAL},
#{discountLastMoney,jdbcType=DECIMAL}, #{otherMoney,jdbcType=DECIMAL},
#{otherMoneyList,jdbcType=VARCHAR},
#{otherMoneyItem,jdbcType=VARCHAR}, #{accountDay,jdbcType=INTEGER},
#{status,jdbcType=VARCHAR},
#{linkNumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.DepotHead"
>
insert into jsh_depot_head
...
...
@@ -203,6 +204,9 @@
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"fileName != null"
>
file_name,
</if>
<if
test=
"salesMan != null"
>
sales_man,
</if>
...
...
@@ -295,6 +299,9 @@
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"fileName != null"
>
#{fileName,jdbcType=VARCHAR},
</if>
<if
test=
"salesMan != null"
>
#{salesMan,jdbcType=VARCHAR},
</if>
...
...
@@ -396,6 +403,9 @@
<if
test=
"record.remark != null"
>
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if
test=
"record.fileName != null"
>
file_name = #{record.fileName,jdbcType=VARCHAR},
</if>
<if
test=
"record.salesMan != null"
>
sales_man = #{record.salesMan,jdbcType=VARCHAR},
</if>
...
...
@@ -461,6 +471,7 @@
pay_type = #{record.payType,jdbcType=VARCHAR},
bill_type = #{record.billType,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
file_name = #{record.fileName,jdbcType=VARCHAR},
sales_man = #{record.salesMan,jdbcType=VARCHAR},
account_id_list = #{record.accountIdList,jdbcType=VARCHAR},
account_money_list = #{record.accountMoneyList,jdbcType=VARCHAR},
...
...
@@ -527,6 +538,9 @@
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"fileName != null"
>
file_name = #{fileName,jdbcType=VARCHAR},
</if>
<if
test=
"salesMan != null"
>
sales_man = #{salesMan,jdbcType=VARCHAR},
</if>
...
...
@@ -589,6 +603,7 @@
pay_type = #{payType,jdbcType=VARCHAR},
bill_type = #{billType,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
file_name = #{fileName,jdbcType=VARCHAR},
sales_man = #{salesMan,jdbcType=VARCHAR},
account_id_list = #{accountIdList,jdbcType=VARCHAR},
account_money_list = #{accountMoneyList,jdbcType=VARCHAR},
...
...
jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapperEx.xml
View file @
4e66aeb9
...
...
@@ -448,4 +448,57 @@
</if>
and ifnull(delete_flag,'0') !='1'
</select>
<select
id=
"debtList"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
resultMap=
"ResultMapEx"
>
select distinct dh.*, s.supplier OrganName, u.username userName
from jsh_depot_head dh
left join jsh_supplier s on dh.organ_id=s.id and ifnull(s.delete_Flag,'0') !='1'
left join jsh_user u on dh.creator=u.id and ifnull(u.Status,'0') ='0'
left join jsh_depot_item di on dh.id = di.header_id and ifnull(di.delete_flag,'0') !='1'
left join jsh_material m on di.material_id = m.id and ifnull(m.delete_flag,'0') !='1'
where 1=1
<if
test=
"organId != null"
>
and dh.organ_id = #{organId}
</if>
<if
test=
"type != null"
>
and dh.type=#{type}
</if>
<if
test=
"subType != null"
>
and dh.sub_type=#{subType}
</if>
<if
test=
"status != null"
>
and dh.status =#{status}
</if>
<if
test=
"number != null"
>
<bind
name=
"bindNumber"
value=
"'%'+number+'%'"
/>
and dh.number like #{bindNumber}
</if>
<if
test=
"beginTime != null"
>
and dh.oper_time >= #{beginTime}
</if>
<if
test=
"endTime != null"
>
and dh.oper_time
<
= #{endTime}
</if>
<if
test=
"materialParam != null and materialParam !=''"
>
<bind
name=
"bindKey"
value=
"'%'+materialParam+'%'"
/>
and (m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
</if>
<if
test=
"depotArray != null and depotArray !=''"
>
and di.depot_id in (
<foreach
collection=
"depotArray"
item=
"depotId"
separator=
","
>
#{depotId}
</foreach>
)
</if>
<if
test=
"creatorArray != null"
>
and dh.creator in (
<foreach
collection=
"creatorArray"
item=
"creator"
separator=
","
>
#{creator}
</foreach>
)
</if>
and abs(dh.change_amount)
<
dh.discount_last_money
and ifnull(dh.delete_flag,'0') !='1'
order by dh.id desc
</select>
</mapper>
\ No newline at end of file
Prev
1
2
Next
Write
Preview
Supports
Markdown
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