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
0f8e54d6
Commit
0f8e54d6
authored
Sep 13, 2020
by
季圣华
Browse files
优化出入库单据和财务的资源权限的控制
parent
4fe0fc39
Changes
25
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/erp/service/person/PersonService.java
View file @
0f8e54d6
...
@@ -264,7 +264,7 @@ public class PersonService {
...
@@ -264,7 +264,7 @@ public class PersonService {
* */
* */
List
<
DepotHead
>
depotHeadList
=
null
;
List
<
DepotHead
>
depotHeadList
=
null
;
try
{
try
{
depotHeadList
=
depotHeadMapperEx
.
getDepotHeadListBy
HandsPersonIds
(
idArray
);
depotHeadList
=
depotHeadMapperEx
.
getDepotHeadListBy
Creator
(
idArray
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
JshException
.
readFail
(
logger
,
e
);
}
}
...
...
src/main/resources/mapper_xml/AccountHeadMapper.xml
View file @
0f8e54d6
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"organ_id"
jdbcType=
"BIGINT"
property=
"organId"
/>
<result
column=
"organ_id"
jdbcType=
"BIGINT"
property=
"organId"
/>
<result
column=
"hands_person_id"
jdbcType=
"BIGINT"
property=
"handsPersonId"
/>
<result
column=
"hands_person_id"
jdbcType=
"BIGINT"
property=
"handsPersonId"
/>
<result
column=
"creator"
jdbcType=
"BIGINT"
property=
"creator"
/>
<result
column=
"change_amount"
jdbcType=
"DECIMAL"
property=
"changeAmount"
/>
<result
column=
"change_amount"
jdbcType=
"DECIMAL"
property=
"changeAmount"
/>
<result
column=
"total_price"
jdbcType=
"DECIMAL"
property=
"totalPrice"
/>
<result
column=
"total_price"
jdbcType=
"DECIMAL"
property=
"totalPrice"
/>
<result
column=
"account_id"
jdbcType=
"BIGINT"
property=
"accountId"
/>
<result
column=
"account_id"
jdbcType=
"BIGINT"
property=
"accountId"
/>
...
@@ -74,8 +75,8 @@
...
@@ -74,8 +75,8 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, type, organ_id, hands_person_id, change_amount, total_price, account_id,
bill_no,
id, type, organ_id, hands_person_id,
creator,
change_amount, total_price, account_id,
bill_time, remark, tenant_id, delete_flag
bill_no,
bill_time, remark, tenant_id, delete_flag
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.AccountHeadExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.AccountHeadExample"
resultMap=
"BaseResultMap"
>
select
select
...
@@ -109,15 +110,15 @@
...
@@ -109,15 +110,15 @@
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.AccountHead"
>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.AccountHead"
>
insert into jsh_account_head (id, type, organ_id,
insert into jsh_account_head (id, type, organ_id,
hands_person_id, change_amount,
total_price,
hands_person_id,
creator,
change_amount,
account_id, bill_no,
bill_time,
total_price,
account_id, bill_no,
remark, tenant_id,
delete_flag
bill_time,
remark, tenant_id,
)
delete_flag
)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{organId,jdbcType=BIGINT},
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{organId,jdbcType=BIGINT},
#{handsPersonId,jdbcType=BIGINT}, #{c
hangeAmount,jdbcType=DECIMAL}, #{totalPrice
,jdbcType=DECIMAL},
#{handsPersonId,jdbcType=BIGINT}, #{c
reator,jdbcType=BIGINT}, #{changeAmount
,jdbcType=DECIMAL},
#{accountId,jdbcType=BIGINT}, #{billNo,jdbcType=VARCHAR},
#{billTime,jdbcType=TIMESTAMP},
#{totalPrice,jdbcType=DECIMAL},
#{accountId,jdbcType=BIGINT}, #{billNo,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR}
#{billTime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT},
)
#{deleteFlag,jdbcType=VARCHAR}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.AccountHead"
>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.AccountHead"
>
insert into jsh_account_head
insert into jsh_account_head
...
@@ -134,6 +135,9 @@
...
@@ -134,6 +135,9 @@
<if
test=
"handsPersonId != null"
>
<if
test=
"handsPersonId != null"
>
hands_person_id,
hands_person_id,
</if>
</if>
<if
test=
"creator != null"
>
creator,
</if>
<if
test=
"changeAmount != null"
>
<if
test=
"changeAmount != null"
>
change_amount,
change_amount,
</if>
</if>
...
@@ -172,6 +176,9 @@
...
@@ -172,6 +176,9 @@
<if
test=
"handsPersonId != null"
>
<if
test=
"handsPersonId != null"
>
#{handsPersonId,jdbcType=BIGINT},
#{handsPersonId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"creator != null"
>
#{creator,jdbcType=BIGINT},
</if>
<if
test=
"changeAmount != null"
>
<if
test=
"changeAmount != null"
>
#{changeAmount,jdbcType=DECIMAL},
#{changeAmount,jdbcType=DECIMAL},
</if>
</if>
...
@@ -219,6 +226,9 @@
...
@@ -219,6 +226,9 @@
<if
test=
"record.handsPersonId != null"
>
<if
test=
"record.handsPersonId != null"
>
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"record.creator != null"
>
creator = #{record.creator,jdbcType=BIGINT},
</if>
<if
test=
"record.changeAmount != null"
>
<if
test=
"record.changeAmount != null"
>
change_amount = #{record.changeAmount,jdbcType=DECIMAL},
change_amount = #{record.changeAmount,jdbcType=DECIMAL},
</if>
</if>
...
@@ -254,6 +264,7 @@
...
@@ -254,6 +264,7 @@
type = #{record.type,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
organ_id = #{record.organId,jdbcType=BIGINT},
organ_id = #{record.organId,jdbcType=BIGINT},
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
creator = #{record.creator,jdbcType=BIGINT},
change_amount = #{record.changeAmount,jdbcType=DECIMAL},
change_amount = #{record.changeAmount,jdbcType=DECIMAL},
total_price = #{record.totalPrice,jdbcType=DECIMAL},
total_price = #{record.totalPrice,jdbcType=DECIMAL},
account_id = #{record.accountId,jdbcType=BIGINT},
account_id = #{record.accountId,jdbcType=BIGINT},
...
@@ -278,6 +289,9 @@
...
@@ -278,6 +289,9 @@
<if
test=
"handsPersonId != null"
>
<if
test=
"handsPersonId != null"
>
hands_person_id = #{handsPersonId,jdbcType=BIGINT},
hands_person_id = #{handsPersonId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"creator != null"
>
creator = #{creator,jdbcType=BIGINT},
</if>
<if
test=
"changeAmount != null"
>
<if
test=
"changeAmount != null"
>
change_amount = #{changeAmount,jdbcType=DECIMAL},
change_amount = #{changeAmount,jdbcType=DECIMAL},
</if>
</if>
...
@@ -310,6 +324,7 @@
...
@@ -310,6 +324,7 @@
set type = #{type,jdbcType=VARCHAR},
set type = #{type,jdbcType=VARCHAR},
organ_id = #{organId,jdbcType=BIGINT},
organ_id = #{organId,jdbcType=BIGINT},
hands_person_id = #{handsPersonId,jdbcType=BIGINT},
hands_person_id = #{handsPersonId,jdbcType=BIGINT},
creator = #{creator,jdbcType=BIGINT},
change_amount = #{changeAmount,jdbcType=DECIMAL},
change_amount = #{changeAmount,jdbcType=DECIMAL},
total_price = #{totalPrice,jdbcType=DECIMAL},
total_price = #{totalPrice,jdbcType=DECIMAL},
account_id = #{accountId,jdbcType=BIGINT},
account_id = #{accountId,jdbcType=BIGINT},
...
...
src/main/resources/mapper_xml/AccountHeadMapperEx.xml
View file @
0f8e54d6
...
@@ -5,13 +5,15 @@
...
@@ -5,13 +5,15 @@
<resultMap
extends=
"com.jsh.erp.datasource.mappers.AccountHeadMapper.BaseResultMap"
id=
"ResultMapEx"
type=
"com.jsh.erp.datasource.entities.AccountHeadVo4ListEx"
>
<resultMap
extends=
"com.jsh.erp.datasource.mappers.AccountHeadMapper.BaseResultMap"
id=
"ResultMapEx"
type=
"com.jsh.erp.datasource.entities.AccountHeadVo4ListEx"
>
<result
column=
"OrganName"
jdbcType=
"VARCHAR"
property=
"organName"
/>
<result
column=
"OrganName"
jdbcType=
"VARCHAR"
property=
"organName"
/>
<result
column=
"HandsPersonName"
jdbcType=
"VARCHAR"
property=
"handsPersonName"
/>
<result
column=
"HandsPersonName"
jdbcType=
"VARCHAR"
property=
"handsPersonName"
/>
<result
column=
"userName"
jdbcType=
"VARCHAR"
property=
"userName"
/>
<result
column=
"AccountName"
jdbcType=
"VARCHAR"
property=
"accountName"
/>
<result
column=
"AccountName"
jdbcType=
"VARCHAR"
property=
"accountName"
/>
</resultMap>
</resultMap>
<select
id=
"selectByConditionAccountHead"
parameterType=
"com.jsh.erp.datasource.entities.AccountHeadExample"
resultMap=
"ResultMapEx"
>
<select
id=
"selectByConditionAccountHead"
parameterType=
"com.jsh.erp.datasource.entities.AccountHeadExample"
resultMap=
"ResultMapEx"
>
select ah.*, s.supplier OrganName, p.Name HandsPersonName, a.Name AccountName
select ah.*, s.supplier OrganName, p.Name HandsPersonName,
u.username userName,
a.Name AccountName
from jsh_account_head ah
from jsh_account_head ah
left join jsh_supplier s on ah.organ_id=s.id and ifnull(s.delete_Flag,'0') !='1'
left join jsh_supplier s on ah.organ_id=s.id and ifnull(s.delete_Flag,'0') !='1'
left join jsh_user u on ah.creator=u.id and ifnull(u.Status,'0') ='0'
left join jsh_person p on ah.hands_person_id=p.id and ifnull(p.delete_Flag,'0') !='1'
left join jsh_person p on ah.hands_person_id=p.id and ifnull(p.delete_Flag,'0') !='1'
left join jsh_account a on ah.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'
left join jsh_account a on ah.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'
where 1=1
where 1=1
...
@@ -27,6 +29,13 @@
...
@@ -27,6 +29,13 @@
<if
test=
"endTime != null"
>
<if
test=
"endTime != null"
>
and ah.bill_time
<
= '${endTime}'
and ah.bill_time
<
= '${endTime}'
</if>
</if>
<if
test=
"creatorArray != null"
>
and ah.creator in (
<foreach
collection=
"creatorArray"
item=
"creator"
separator=
","
>
#{creator}
</foreach>
)
</if>
and ifnull(ah.delete_flag,'0') !='1'
and ifnull(ah.delete_flag,'0') !='1'
order by ah.id desc
order by ah.id desc
<if
test=
"offset != null and rows != null"
>
<if
test=
"offset != null and rows != null"
>
...
@@ -52,6 +61,13 @@
...
@@ -52,6 +61,13 @@
<if
test=
"endTime != null"
>
<if
test=
"endTime != null"
>
and bill_time
<
= '${endTime}'
and bill_time
<
= '${endTime}'
</if>
</if>
<if
test=
"creatorArray != null"
>
and creator in (
<foreach
collection=
"creatorArray"
item=
"creator"
separator=
","
>
#{creator}
</foreach>
)
</if>
and ifnull(delete_flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
</select>
</select>
...
...
src/main/resources/mapper_xml/DepotHeadMapper.xml
View file @
0f8e54d6
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
<result
column=
"sub_type"
jdbcType=
"VARCHAR"
property=
"subType"
/>
<result
column=
"sub_type"
jdbcType=
"VARCHAR"
property=
"subType"
/>
<result
column=
"default_number"
jdbcType=
"VARCHAR"
property=
"defaultNumber"
/>
<result
column=
"default_number"
jdbcType=
"VARCHAR"
property=
"defaultNumber"
/>
<result
column=
"number"
jdbcType=
"VARCHAR"
property=
"number"
/>
<result
column=
"number"
jdbcType=
"VARCHAR"
property=
"number"
/>
<result
column=
"oper_person_name"
jdbcType=
"VARCHAR"
property=
"operPersonName"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"oper_time"
jdbcType=
"TIMESTAMP"
property=
"operTime"
/>
<result
column=
"oper_time"
jdbcType=
"TIMESTAMP"
property=
"operTime"
/>
<result
column=
"organ_id"
jdbcType=
"BIGINT"
property=
"organId"
/>
<result
column=
"organ_id"
jdbcType=
"BIGINT"
property=
"organId"
/>
<result
column=
"hands_person_id"
jdbcType=
"BIGINT"
property=
"handsPersonId"
/>
<result
column=
"hands_person_id"
jdbcType=
"BIGINT"
property=
"handsPersonId"
/>
<result
column=
"creator"
jdbcType=
"BIGINT"
property=
"creator"
/>
<result
column=
"account_id"
jdbcType=
"BIGINT"
property=
"accountId"
/>
<result
column=
"account_id"
jdbcType=
"BIGINT"
property=
"accountId"
/>
<result
column=
"change_amount"
jdbcType=
"DECIMAL"
property=
"changeAmount"
/>
<result
column=
"change_amount"
jdbcType=
"DECIMAL"
property=
"changeAmount"
/>
<result
column=
"total_price"
jdbcType=
"DECIMAL"
property=
"totalPrice"
/>
<result
column=
"total_price"
jdbcType=
"DECIMAL"
property=
"totalPrice"
/>
...
@@ -91,11 +91,10 @@
...
@@ -91,11 +91,10 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, type, sub_type, default_number, number, oper_person_name, create_time, oper_time,
id, type, sub_type, default_number, number, create_time, oper_time, organ_id, hands_person_id,
organ_id, hands_person_id, account_id, change_amount, total_price, pay_type, remark,
creator, account_id, change_amount, total_price, pay_type, remark, sales_man, account_id_list,
sales_man, account_id_list, account_money_list, discount, discount_money, discount_last_money,
account_money_list, discount, discount_money, discount_last_money, other_money, other_money_list,
other_money, other_money_list, other_money_item, account_day, status, link_number,
other_money_item, account_day, status, link_number, tenant_id, delete_flag
tenant_id, delete_flag
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
resultMap=
"BaseResultMap"
>
select
select
...
@@ -129,9 +128,9 @@
...
@@ -129,9 +128,9 @@
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.DepotHead"
>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.DepotHead"
>
insert into jsh_depot_head (id, type, sub_type,
insert into jsh_depot_head (id, type, sub_type,
default_number, number,
oper_person_na
me,
default_number, number,
create_ti
me,
create_time,
oper_time, organ_id,
oper_time, organ_id,
hands_person_id,
hands_person_id
, account_id, change_amount,
creator
, account_id, change_amount,
total_price, pay_type, remark,
total_price, pay_type, remark,
sales_man, account_id_list, account_money_list,
sales_man, account_id_list, account_money_list,
discount, discount_money, discount_last_money,
discount, discount_money, discount_last_money,
...
@@ -139,9 +138,9 @@
...
@@ -139,9 +138,9 @@
account_day, status, link_number,
account_day, status, link_number,
tenant_id, delete_flag)
tenant_id, delete_flag)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR},
#{defaultNumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, #{
operPersonNa
me,jdbcType=
VARCHAR
},
#{defaultNumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, #{
createTi
me,jdbcType=
TIMESTAMP
},
#{createTime,jdbcType=TIMESTAMP},
#{operTime,jdbcType=TIMESTAMP}, #{organId,jdbcType=BIGINT},
#{operTime,jdbcType=TIMESTAMP}, #{organId,jdbcType=BIGINT},
#{handsPersonId,jdbcType=BIGINT},
#{
handsPersonId
,jdbcType=BIGINT}, #{accountId,jdbcType=BIGINT}, #{changeAmount,jdbcType=DECIMAL},
#{
creator
,jdbcType=BIGINT}, #{accountId,jdbcType=BIGINT}, #{changeAmount,jdbcType=DECIMAL},
#{totalPrice,jdbcType=DECIMAL}, #{payType,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{totalPrice,jdbcType=DECIMAL}, #{payType,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{salesMan,jdbcType=VARCHAR}, #{accountIdList,jdbcType=VARCHAR}, #{accountMoneyList,jdbcType=VARCHAR},
#{salesMan,jdbcType=VARCHAR}, #{accountIdList,jdbcType=VARCHAR}, #{accountMoneyList,jdbcType=VARCHAR},
#{discount,jdbcType=DECIMAL}, #{discountMoney,jdbcType=DECIMAL}, #{discountLastMoney,jdbcType=DECIMAL},
#{discount,jdbcType=DECIMAL}, #{discountMoney,jdbcType=DECIMAL}, #{discountLastMoney,jdbcType=DECIMAL},
...
@@ -167,9 +166,6 @@
...
@@ -167,9 +166,6 @@
<if
test=
"number != null"
>
<if
test=
"number != null"
>
number,
number,
</if>
</if>
<if
test=
"operPersonName != null"
>
oper_person_name,
</if>
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
create_time,
create_time,
</if>
</if>
...
@@ -182,6 +178,9 @@
...
@@ -182,6 +178,9 @@
<if
test=
"handsPersonId != null"
>
<if
test=
"handsPersonId != null"
>
hands_person_id,
hands_person_id,
</if>
</if>
<if
test=
"creator != null"
>
creator,
</if>
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
account_id,
account_id,
</if>
</if>
...
@@ -256,9 +255,6 @@
...
@@ -256,9 +255,6 @@
<if
test=
"number != null"
>
<if
test=
"number != null"
>
#{number,jdbcType=VARCHAR},
#{number,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"operPersonName != null"
>
#{operPersonName,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
#{createTime,jdbcType=TIMESTAMP},
</if>
</if>
...
@@ -271,6 +267,9 @@
...
@@ -271,6 +267,9 @@
<if
test=
"handsPersonId != null"
>
<if
test=
"handsPersonId != null"
>
#{handsPersonId,jdbcType=BIGINT},
#{handsPersonId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"creator != null"
>
#{creator,jdbcType=BIGINT},
</if>
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
#{accountId,jdbcType=BIGINT},
#{accountId,jdbcType=BIGINT},
</if>
</if>
...
@@ -354,9 +353,6 @@
...
@@ -354,9 +353,6 @@
<if
test=
"record.number != null"
>
<if
test=
"record.number != null"
>
number = #{record.number,jdbcType=VARCHAR},
number = #{record.number,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.operPersonName != null"
>
oper_person_name = #{record.operPersonName,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
</if>
...
@@ -369,6 +365,9 @@
...
@@ -369,6 +365,9 @@
<if
test=
"record.handsPersonId != null"
>
<if
test=
"record.handsPersonId != null"
>
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"record.creator != null"
>
creator = #{record.creator,jdbcType=BIGINT},
</if>
<if
test=
"record.accountId != null"
>
<if
test=
"record.accountId != null"
>
account_id = #{record.accountId,jdbcType=BIGINT},
account_id = #{record.accountId,jdbcType=BIGINT},
</if>
</if>
...
@@ -438,11 +437,11 @@
...
@@ -438,11 +437,11 @@
sub_type = #{record.subType,jdbcType=VARCHAR},
sub_type = #{record.subType,jdbcType=VARCHAR},
default_number = #{record.defaultNumber,jdbcType=VARCHAR},
default_number = #{record.defaultNumber,jdbcType=VARCHAR},
number = #{record.number,jdbcType=VARCHAR},
number = #{record.number,jdbcType=VARCHAR},
oper_person_name = #{record.operPersonName,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
oper_time = #{record.operTime,jdbcType=TIMESTAMP},
oper_time = #{record.operTime,jdbcType=TIMESTAMP},
organ_id = #{record.organId,jdbcType=BIGINT},
organ_id = #{record.organId,jdbcType=BIGINT},
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
creator = #{record.creator,jdbcType=BIGINT},
account_id = #{record.accountId,jdbcType=BIGINT},
account_id = #{record.accountId,jdbcType=BIGINT},
change_amount = #{record.changeAmount,jdbcType=DECIMAL},
change_amount = #{record.changeAmount,jdbcType=DECIMAL},
total_price = #{record.totalPrice,jdbcType=DECIMAL},
total_price = #{record.totalPrice,jdbcType=DECIMAL},
...
@@ -481,9 +480,6 @@
...
@@ -481,9 +480,6 @@
<if
test=
"number != null"
>
<if
test=
"number != null"
>
number = #{number,jdbcType=VARCHAR},
number = #{number,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"operPersonName != null"
>
oper_person_name = #{operPersonName,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</if>
...
@@ -496,6 +492,9 @@
...
@@ -496,6 +492,9 @@
<if
test=
"handsPersonId != null"
>
<if
test=
"handsPersonId != null"
>
hands_person_id = #{handsPersonId,jdbcType=BIGINT},
hands_person_id = #{handsPersonId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"creator != null"
>
creator = #{creator,jdbcType=BIGINT},
</if>
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
account_id = #{accountId,jdbcType=BIGINT},
account_id = #{accountId,jdbcType=BIGINT},
</if>
</if>
...
@@ -562,11 +561,11 @@
...
@@ -562,11 +561,11 @@
sub_type = #{subType,jdbcType=VARCHAR},
sub_type = #{subType,jdbcType=VARCHAR},
default_number = #{defaultNumber,jdbcType=VARCHAR},
default_number = #{defaultNumber,jdbcType=VARCHAR},
number = #{number,jdbcType=VARCHAR},
number = #{number,jdbcType=VARCHAR},
oper_person_name = #{operPersonName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
oper_time = #{operTime,jdbcType=TIMESTAMP},
oper_time = #{operTime,jdbcType=TIMESTAMP},
organ_id = #{organId,jdbcType=BIGINT},
organ_id = #{organId,jdbcType=BIGINT},
hands_person_id = #{handsPersonId,jdbcType=BIGINT},
hands_person_id = #{handsPersonId,jdbcType=BIGINT},
creator = #{creator,jdbcType=BIGINT},
account_id = #{accountId,jdbcType=BIGINT},
account_id = #{accountId,jdbcType=BIGINT},
change_amount = #{changeAmount,jdbcType=DECIMAL},
change_amount = #{changeAmount,jdbcType=DECIMAL},
total_price = #{totalPrice,jdbcType=DECIMAL},
total_price = #{totalPrice,jdbcType=DECIMAL},
...
...
src/main/resources/mapper_xml/DepotHeadMapperEx.xml
View file @
0f8e54d6
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<resultMap
extends=
"com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap"
id=
"ResultMapEx"
type=
"com.jsh.erp.datasource.vo.DepotHeadVo4List"
>
<resultMap
extends=
"com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap"
id=
"ResultMapEx"
type=
"com.jsh.erp.datasource.vo.DepotHeadVo4List"
>
<result
column=
"OrganName"
jdbcType=
"VARCHAR"
property=
"organName"
/>
<result
column=
"OrganName"
jdbcType=
"VARCHAR"
property=
"organName"
/>
<result
column=
"
HandsPerson
Name"
jdbcType=
"VARCHAR"
property=
"
handsPerson
Name"
/>
<result
column=
"
user
Name"
jdbcType=
"VARCHAR"
property=
"
user
Name"
/>
<result
column=
"AccountName"
jdbcType=
"VARCHAR"
property=
"accountName"
/>
<result
column=
"AccountName"
jdbcType=
"VARCHAR"
property=
"accountName"
/>
</resultMap>
</resultMap>
...
@@ -41,10 +41,10 @@
...
@@ -41,10 +41,10 @@
</resultMap>
</resultMap>
<select
id=
"selectByConditionDepotHead"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
resultMap=
"ResultMapEx"
>
<select
id=
"selectByConditionDepotHead"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
resultMap=
"ResultMapEx"
>
select distinct dh.*, s.supplier OrganName,
p.name HandsPerson
Name, a.name AccountName
select distinct dh.*, s.supplier OrganName,
u.username user
Name, a.name AccountName
from jsh_depot_head dh
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_supplier s on dh.organ_id=s.id and ifnull(s.delete_Flag,'0') !='1'
left join jsh_
person p on dh.hands_person_id=p
.id and ifnull(
p.delete_Flag
,'0')
!
='
1
'
left join jsh_
user u on dh.creator=u
.id and ifnull(
u.Status
,'0') ='
0
'
left join jsh_account a on dh.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'
left join jsh_account a on dh.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'
left join jsh_depot_item di on dh.id = di.header_id and ifnull(di.delete_flag,'0') !='1'
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'
left join jsh_material m on di.material_id = m.id and ifnull(m.delete_flag,'0') !='1'
...
@@ -70,10 +70,10 @@
...
@@ -70,10 +70,10 @@
<if
test=
"depotIds != null"
>
<if
test=
"depotIds != null"
>
and di.depot_id in (${depotIds})
and di.depot_id in (${depotIds})
</if>
</if>
<if
test=
"
handsPersonIds
!= null"
>
<if
test=
"
creatorArray
!= null"
>
and dh.
hands_person_id
in (
and dh.
creator
in (
<foreach
collection=
"
handsPersonIds"
item=
"handsPersonId
"
separator=
","
>
<foreach
collection=
"
creatorArray"
item=
"creator
"
separator=
","
>
#{
handsPersonId
}
#{
creator
}
</foreach>
</foreach>
)
)
</if>
</if>
...
@@ -111,20 +111,16 @@
...
@@ -111,20 +111,16 @@
<if
test=
"depotIds != null"
>
<if
test=
"depotIds != null"
>
and di.depot_id in (${depotIds})
and di.depot_id in (${depotIds})
</if>
</if>
<if
test=
"
handsPersonIds
!= null"
>
<if
test=
"
creatorArray
!= null"
>
and
hands_person_id
in (
and
creator
in (
<foreach
collection=
"
handsPersonIds"
item=
"handsPersonId
"
separator=
","
>
<foreach
collection=
"
creatorArray"
item=
"creator
"
separator=
","
>
#{
handsPersonId
}
#{
creator
}
</foreach>
</foreach>
)
)
</if>
</if>
and ifnull(jsh_depot_head.delete_Flag,'0') !='1') tb
and ifnull(jsh_depot_head.delete_Flag,'0') !='1') tb
</select>
</select>
<select
id=
"getMaxId"
resultType=
"java.lang.Long"
>
select max(id) as id from jsh_depot_head
</select>
<select
id=
"findMaterialsListByHeaderId"
resultType=
"java.lang.String"
>
<select
id=
"findMaterialsListByHeaderId"
resultType=
"java.lang.String"
>
select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model)) as mName
select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model)) as mName
from jsh_depot_item
from jsh_depot_item
...
@@ -327,10 +323,9 @@
...
@@ -327,10 +323,9 @@
</select>
</select>
<select
id=
"getDetailByNumber"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
resultMap=
"ResultMapEx"
>
<select
id=
"getDetailByNumber"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
resultMap=
"ResultMapEx"
>
select dh.*, s.supplier OrganName,
p.name HandsPersonName,
a.name AccountName
select dh.*, s.supplier OrganName, a.name AccountName
from jsh_depot_head dh
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_supplier s on dh.organ_id=s.id and ifnull(s.delete_Flag,'0') !='1'
left join jsh_person p on dh.hands_person_id=p.id and ifnull(p.delete_Flag,'0') !='1'
left join jsh_account a on dh.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'
left join jsh_account a on dh.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'
where 1=1
where 1=1
<if
test=
"number != null"
>
<if
test=
"number != null"
>
...
@@ -381,14 +376,14 @@
...
@@ -381,14 +376,14 @@
)
)
and ifnull(delete_flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
</select>
</select>
<select
id=
"getDepotHeadListBy
HandsPersonIds
"
resultMap=
"com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap"
>
<select
id=
"getDepotHeadListBy
Creator
"
resultMap=
"com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap"
>
select
select
<include
refid=
"com.jsh.erp.datasource.mappers.DepotHeadMapper.Base_Column_List"
/>
<include
refid=
"com.jsh.erp.datasource.mappers.DepotHeadMapper.Base_Column_List"
/>
from jsh_depot_head
from jsh_depot_head
where 1=1
where 1=1
and
hands_person_id
in (
and
creator
in (
<foreach
collection=
"
handsPersonIds"
item=
"handsPersonId
"
separator=
","
>
<foreach
collection=
"
creatorArray"
item=
"creator
"
separator=
","
>
#{
handsPersonId
}
#{
creator
}
</foreach>
</foreach>
)
)
and ifnull(delete_flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
...
...
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