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
1283b228
Commit
1283b228
authored
May 14, 2019
by
qiankunpingtai
Browse files
账户信息sql$修改为#
parent
40a6091c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/resources/mapper_xml/AccountMapperEx.xml
View file @
1283b228
...
@@ -19,14 +19,17 @@
...
@@ -19,14 +19,17 @@
select *
select *
FROM jsh_account
FROM jsh_account
where 1=1
where 1=1
<if
test=
"name != null"
>
<if
test=
"name != null and name != ''"
>
and name like '%${name}%'
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and name like #{name}
</if>
</if>
<if
test=
"serialNo != null"
>
<if
test=
"serialNo != null and serialNo != ''"
>
and SerialNo like '%${serialNo}%'
<bind
name=
"serialNo"
value=
"'%' + _parameter.serialNo + '%'"
/>
and SerialNo like #{serialNo}
</if>
</if>
<if
test=
"remark != null"
>
<if
test=
"remark != null and remark != ''"
>
and remark like '%${remark}%'
<bind
name=
"remark"
value=
"'%' + _parameter.remark + '%'"
/>
and remark like #{remark}
</if>
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_Flag,'0') !='1'
<if
test=
"offset != null and rows != null"
>
<if
test=
"offset != null and rows != null"
>
...
@@ -39,14 +42,17 @@
...
@@ -39,14 +42,17 @@
COUNT(id)
COUNT(id)
FROM jsh_account
FROM jsh_account
WHERE 1=1
WHERE 1=1
<if
test=
"name != null"
>
<if
test=
"name != null and name != ''"
>
and name like '%${name}%'
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and name like #{name}
</if>
</if>
<if
test=
"serialNo != null"
>
<if
test=
"serialNo != null and serialNo != ''"
>
and SerialNo like '%${serialNo}%'
<bind
name=
"serialNo"
value=
"'%' + _parameter.serialNo + '%'"
/>
and SerialNo like #{serialNo}
</if>
</if>
<if
test=
"remark != null"
>
<if
test=
"remark != null and remark != ''"
>
and remark like '%${remark}%'
<bind
name=
"remark"
value=
"'%' + _parameter.remark + '%'"
/>
and remark like #{remark}
</if>
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_Flag,'0') !='1'
</select>
</select>
...
@@ -57,7 +63,7 @@
...
@@ -57,7 +63,7 @@
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1'
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1'
where 1=1
where 1=1
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
and dh.AccountId=
$
{accountId}
and dh.AccountId=
#
{accountId}
</if>
</if>
and ifnull(dh.delete_Flag,'0') !='1'
and ifnull(dh.delete_Flag,'0') !='1'
...
@@ -67,7 +73,7 @@
...
@@ -67,7 +73,7 @@
from jsh_accounthead ah inner join jsh_supplier s on ah.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1'
from jsh_accounthead ah inner join jsh_supplier s on ah.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1'
where 1=1
where 1=1
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
and ah.AccountId=
$
{accountId}
and ah.AccountId=
#
{accountId}
</if>
</if>
and ifnull(ah.delete_Flag,'0') !='1'
and ifnull(ah.delete_Flag,'0') !='1'
<!--明细中涉及的账户(收款,付款,收预付款) -->
<!--明细中涉及的账户(收款,付款,收预付款) -->
...
@@ -77,7 +83,7 @@
...
@@ -77,7 +83,7 @@
inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
where ah.Type in ('收款','付款','收预付款')
where ah.Type in ('收款','付款','收预付款')
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
and ai.AccountId=
$
{accountId}
and ai.AccountId=
#
{accountId}
</if>
</if>
and ifnull(ah.delete_Flag,'0') !='1'
and ifnull(ah.delete_Flag,'0') !='1'
<!--主表中转出的账户 -->
<!--主表中转出的账户 -->
...
@@ -86,7 +92,7 @@
...
@@ -86,7 +92,7 @@
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
where ah.Type='转账'
where ah.Type='转账'
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
and ah.AccountId=
$
{accountId}
and ah.AccountId=
#
{accountId}
</if>
</if>
and ifnull(ah.delete_Flag,'0') !='1'
and ifnull(ah.delete_Flag,'0') !='1'
<!--明细中被转入的账户 -->
<!--明细中被转入的账户 -->
...
@@ -95,7 +101,7 @@
...
@@ -95,7 +101,7 @@
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
where ah.Type='转账'
where ah.Type='转账'
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
and ai.AccountId=
$
{accountId}
and ai.AccountId=
#
{accountId}
</if>
</if>
and ifnull(ah.delete_Flag,'0') !='1'
and ifnull(ah.delete_Flag,'0') !='1'
<!--多账户的情况 -->
<!--多账户的情况 -->
...
@@ -104,8 +110,13 @@
...
@@ -104,8 +110,13 @@
dh.AccountIdList as AList,dh.AccountMoneyList as AMList
dh.AccountIdList as AList,dh.AccountMoneyList as AMList
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1'
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1'
where 1=1
where 1=1
<if
test=
"accountId != null and remark != ''"
>
<bind
name=
"remark"
value=
"'%' + _parameter.remark + '%'"
/>
and remark like #{remark}
</if>
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
and dh.AccountIdList like '%${accountId}%'
<bind
name=
"accountId"
value=
"'%' + _parameter.accountId + '%'"
/>
and dh.AccountIdList like #{accountId}
</if>
</if>
and ifnull(dh.delete_Flag,'0') !='1'
and ifnull(dh.delete_Flag,'0') !='1'
ORDER BY oTime desc
ORDER BY oTime desc
...
@@ -122,7 +133,7 @@
...
@@ -122,7 +133,7 @@
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1'
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1'
where 1=1
where 1=1
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
and dh.AccountId=
$
{accountId}
and dh.AccountId=
#
{accountId}
</if>
</if>
and ifnull(dh.delete_Flag,'0') !='1'
and ifnull(dh.delete_Flag,'0') !='1'
<!--主表收入和支出涉及的账户 -->
<!--主表收入和支出涉及的账户 -->
...
@@ -131,7 +142,7 @@
...
@@ -131,7 +142,7 @@
from jsh_accounthead ah inner join jsh_supplier s on ah.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1'
from jsh_accounthead ah inner join jsh_supplier s on ah.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1'
where 1=1
where 1=1
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
and ah.AccountId=
$
{accountId}
and ah.AccountId=
#
{accountId}
</if>
</if>
and ifnull(ah.delete_Flag,'0') !='1'
and ifnull(ah.delete_Flag,'0') !='1'
<!--明细中涉及的账户(收款,付款,收预付款) -->
<!--明细中涉及的账户(收款,付款,收预付款) -->
...
@@ -141,7 +152,7 @@
...
@@ -141,7 +152,7 @@
inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
where ah.Type in ('收款','付款','收预付款')
where ah.Type in ('收款','付款','收预付款')
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
and ai.AccountId=
$
{accountId}
and ai.AccountId=
#
{accountId}
</if>
</if>
and ifnull(ah.delete_Flag,'0') !='1'
and ifnull(ah.delete_Flag,'0') !='1'
<!--主表中转出的账户 -->
<!--主表中转出的账户 -->
...
@@ -150,7 +161,7 @@
...
@@ -150,7 +161,7 @@
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
where ah.Type='转账'
where ah.Type='转账'
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
and ah.AccountId=
$
{accountId}
and ah.AccountId=
#
{accountId}
</if>
</if>
and ifnull(ah.delete_Flag,'0') !='1'
and ifnull(ah.delete_Flag,'0') !='1'
<!--明细中被转入的账户 -->
<!--明细中被转入的账户 -->
...
@@ -159,7 +170,7 @@
...
@@ -159,7 +170,7 @@
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
where ah.Type='转账'
where ah.Type='转账'
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
and ai.AccountId=
$
{accountId}
and ai.AccountId=
#
{accountId}
</if>
</if>
and ifnull(ah.delete_Flag,'0') !='1'
and ifnull(ah.delete_Flag,'0') !='1'
<!--多账户的情况 -->
<!--多账户的情况 -->
...
@@ -168,7 +179,8 @@
...
@@ -168,7 +179,8 @@
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1'
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1'
where 1=1
where 1=1
<if
test=
"accountId != null"
>
<if
test=
"accountId != null"
>
and dh.AccountIdList like '%${accountId}%'
<bind
name=
"accountId"
value=
"'%' + _parameter.accountId + '%'"
/>
and dh.AccountIdList like #{accountId}
</if>
</if>
and ifnull(dh.delete_Flag,'0') !='1'
and ifnull(dh.delete_Flag,'0') !='1'
) cc
) cc
...
...
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