Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
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
platform
hg-smart
Commits
2ca0a8e7
Commit
2ca0a8e7
authored
Jul 03, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-03 1、销售开票修调整
parent
7609eabd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
9 deletions
+49
-9
HGCW012.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW012.xml
+28
-0
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+16
-2
HGPZ007.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ007.xml
+5
-7
No files found.
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW012.xml
View file @
2ca0a8e7
...
...
@@ -346,4 +346,32 @@
</dynamic>
</select>
<!--查询采购已审核开票金额-->
<select
id=
"queryInvoicing"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT
B.ACCOUNT_CODE as "accountCode",
B.COMPANY_CODE as "companyCode",
C.SETTLEMENT_NUMBER as "receiveNo",
<!-- 收货单号 -->
SUM(C.THIS_SETTLEMENT_TAX) as "thisSettlementAmount"
<!-- 金额 -->
from ${hggpSchema}.HGCW012 B
inner join ${hggpSchema}.HGCW013 C on B.ID = C.MAIN_ID
WHERE B.CONTRACT_TYPE = 1 AND B.REVIEW_STATUS = 1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
B.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
B.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
B.COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"settlementNumber"
>
B.SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountPeriod"
>
left(B.SIGNING_DATE,6) = #accountPeriod#
</isNotEmpty>
GROUP BY B.ACCOUNT_CODE, B.COMPANY_CODE, C.SETTLEMENT_NUMBER
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
2ca0a8e7
...
...
@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.cw.tools;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.cw.domain.*
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.pz.domain.HGPZ003
;
...
...
@@ -31,11 +32,11 @@ public class HGCWTools {
return
DaoBase
.
getInstance
().
query
(
"HGCW001.queryCheckList"
,
paramMap
);
}
public
static
Map
getMaxAccountPeriod
(
String
companyCode
)
{
public
static
HGCW001
getMaxAccountPeriod
(
String
companyCode
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"companyCode"
,
companyCode
);
params
.
put
(
"accountPeriodStatus"
,
0
);
List
<
Map
>
list
=
DaoBase
.
getInstance
().
query
(
"HGCW001.getMaxAccountPeriod"
,
params
);
List
<
HGCW001
>
list
=
DaoBase
.
getInstance
().
query
(
"HGCW001.getMaxAccountPeriod"
,
params
);
AssertUtils
.
isEmpty
(
list
,
"未找到公司对应的会计期间"
);
return
list
.
get
(
0
);
}
...
...
@@ -459,6 +460,19 @@ public class HGCWTools {
AssertUtils
.
isEmpty
(
paramMap
,
"数据检查参数不能为空"
);
return
DaoBase
.
getInstance
().
query
(
"HGCW012.queryCheckList"
,
paramMap
);
}
/**
* 根据收货号查询
* @param receiveNo 收货单号
* @return Map
*/
public
static
Map
getReceiveNo
(
String
receiveNo
){
AssertUtils
.
isEmpty
(
receiveNo
,
"发票号不能为空"
);
Map
queryMap
=
new
HashMap
<>();
queryMap
.
put
(
HGCW012
.
FIELD_SETTLEMENT_NUMBER
,
receiveNo
);
List
<
Map
>
list
=
DaoBase
.
getInstance
().
query
(
HGSqlConstant
.
HgCw012
.
INVOICING
,
queryMap
);
return
list
.
size
()
>
0
?
list
.
get
(
0
)
:
null
;
}
}
/**
...
...
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ007.xml
View file @
2ca0a8e7
...
...
@@ -70,16 +70,16 @@
</isNotEmpty>
</sql>
<sql
id=
"authCondition"
>
<!-- 无权限时使用 -->
<
!--<
sql id="authCondition">
<!– 无权限时使用 –>
<isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<!– 仅本人和部门组合 –>
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<!– 仅本人或部门 –>
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople#
...
...
@@ -88,7 +88,7 @@
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
</sql>
-->
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.pz.domain.HGPZ007"
>
...
...
@@ -110,7 +110,6 @@
DELETE_FLAG as "deleteFlag"
<!-- 是否删除0.否1.是 -->
FROM ${hggpSchema}.HGPZ007 WHERE 1=1 AND DELETE_FLAG = 0
<include
refid=
"condition"
/>
<include
refid=
"authCondition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
...
...
@@ -125,7 +124,6 @@
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ007 WHERE 1=1 AND DELETE_FLAG = 0
<include
refid=
"condition"
/>
<include
refid=
"authCondition"
/>
</select>
<!--
...
...
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