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
78bd1446
Commit
78bd1446
authored
Nov 17, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.采购执行情况报表
parent
d22f5a97
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
385 additions
and
4 deletions
+385
-4
ServiceHGBI011.java
.../java/com/baosight/hggp/hg/bi/service/ServiceHGBI011.java
+66
-0
HGBI011.xml
src/main/java/com/baosight/hggp/hg/bi/sql/HGBI011.xml
+121
-0
HGPZ003.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ003.xml
+0
-0
HGPZTools.java
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
+30
-0
HGPZUtils.java
src/main/java/com/baosight/hggp/hg/pz/utils/HGPZUtils.java
+34
-0
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+11
-0
HgScUtils.java
src/main/java/com/baosight/hggp/hg/sc/util/HgScUtils.java
+37
-4
HGBI011.js
src/main/webapp/HG/BI/HGBI011.js
+42
-0
HGBI011.jsp
src/main/webapp/HG/BI/HGBI011.jsp
+44
-0
No files found.
src/main/java/com/baosight/hggp/hg/bi/service/ServiceHGBI011.java
0 → 100644
View file @
78bd1446
package
com
.
baosight
.
hggp
.
hg
.
bi
.
service
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.hg.pz.utils.HGPZUtils
;
import
com.baosight.hggp.hg.sc.util.HgScUtils
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.utils.HGXSUtils
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
java.util.Arrays
;
import
java.util.Map
;
/**
* 采购执行情况
*
* @author songx
* @date 2024/11/16,19:22
*/
public
class
ServiceHGBI011
extends
ServiceBase
{
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_CODE_BLOCK_ID
),
null
,
true
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
),
null
,
true
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
queryMap
.
put
(
"receiptDate"
,
DateUtils
.
formatShort
(
queryMap
.
get
(
"receiptDate"
)));
inInfo
=
super
.
query
(
inInfo
,
"HGBI011.query"
);
// 设置公司名称
HGXSUtils
.
XsOrg
.
setInfo
(
inInfo
,
Company
.
FIELD_COMPANY_CODE
,
Company
.
FIELD_COMPANY_NAME
);
// 设置项目名称
HgScUtils
.
HgSc001
.
setInfo
(
inInfo
);
// 供应商名称
HGPZUtils
.
HgPz003
.
setInfo
(
inInfo
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
}
src/main/java/com/baosight/hggp/hg/bi/sql/HGBI011.xml
0 → 100644
View file @
78bd1446
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGBI011"
>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE = #projCode#
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT
T.receiptDate, T.companyCode, T.supCode, T.projCode,
IFNULL(MAX(T.contractAmount), 0) as "contractAmount",
IFNULL(MAX(T.deliveryAmount), 0) as "deliveryAmount",
IFNULL(MAX(T.receiptAmount), 0) as "receiptAmount",
IFNULL(MAX(T.remainingAmount), 0) as "remainingAmount",
IFNULL(MAX(T.payAmount), 0) as "payAmount",
IFNULL(MAX(T.nonPayAmount), 0) as "nonPayAmount"
FROM (
SELECT
CONTRACT_DATE as "receiptDate",
COMPANY_CODE as "companyCode",
SUP_CODE as "supCode",
PROJ_CODE as "projCode",
SUM(TAX_INCLUDE_AMOUNT) as "contractAmount",
0 as "deliveryAmount",
0 as "receiptAmount",
0 as "remainingAmount",
0 as "payAmount",
0 as "nonPayAmount"
FROM HGGP.HGCG002
WHERE DELETE_FLAG = 0
<include
refid=
"condition"
/>
<isNotEmpty
prepend=
" AND "
property=
"receiptDate"
>
CONTRACT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"supName"
>
SUP_NAME LIKE CONCAT("%", #supName#, "%")
</isNotEmpty>
GROUP BY CONTRACT_DATE, COMPANY_CODE, SUP_CODE, PROJ_CODE
UNION ALL
SELECT
RECEIVE_DATE as "receiptDate",
COMPANY_CODE as "companyCode",
SUP_CODE as "supCode",
PROJ_CODE as "projCode",
0 as "contractAmount",
SUM(TAX_INCLUDE_AMOUNT) as "deliveryAmount",
0 as "receiptAmount",
0 as "remainingAmount",
0 as "payAmount",
0 as "nonPayAmount"
FROM HGGP.HGCG003
WHERE DELETE_FLAG = 0
<include
refid=
"condition"
/>
<isNotEmpty
prepend=
" AND "
property=
"receiptDate"
>
RECEIVE_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"supName"
>
SUP_NAME LIKE CONCAT("%", #supName#, "%")
</isNotEmpty>
GROUP BY RECEIVE_DATE, COMPANY_CODE, SUP_CODE, PROJ_CODE
UNION ALL
SELECT
RECEIVE_DATE as "receiptDate",
COMPANY_CODE as "companyCode",
PARTY_A as "supCode",
PROJ_CODE as "projCode",
0 as "contractAmount",
0 as "deliveryAmount",
SUM(TOTAL_CONTRACT_PRICE_INCLUDING) as "receiptAmount",
SUM(REMAINING_AMOUNT) as "remainingAmount",
0 as "payAmount",
0 as "nonPayAmount"
FROM HGGP.HGCW012
WHERE 1=1
<include
refid=
"condition"
/>
<isNotEmpty
prepend=
" AND "
property=
"receiptDate"
>
RECEIVE_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"supName"
>
PARTY_A LIKE CONCAT("%", #supName#, "%")
</isNotEmpty>
GROUP BY RECEIVE_DATE, COMPANY_CODE, PARTY_A, PROJ_CODE
UNION ALL
SELECT
SIGNING_DATE as "receiptDate",
COMPANY_CODE as "companyCode",
PARTY_A as "supCode",
PROJ_CODE as "projCode",
0 as "contractAmount",
0 as "deliveryAmount",
0 as "receiptAmount",
0 as "remainingAmount",
SUM(CASE CANCEL_STATUS WHEN 2 THEN TOTAL_CONTRACT_PRICE_INCLUDING ELSE 0 END) as "payAmount",
SUM(CASE CANCEL_STATUS WHEN 1 THEN TOTAL_CONTRACT_PRICE_INCLUDING ELSE 0 END) as "nonPayAmount"
FROM HGGP.HGCW016
WHERE 1=1
<include
refid=
"condition"
/>
<isNotEmpty
prepend=
" AND "
property=
"receiptDate"
>
SIGNING_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"supName"
>
PARTY_A LIKE CONCAT("%", #supName#, "%")
</isNotEmpty>
GROUP BY SIGNING_DATE, COMPANY_CODE, PARTY_A, PROJ_CODE
) T
GROUP BY T.receiptDate, T.companyCode, T.supCode, T.projCode
ORDER BY T.receiptDate DESC
</select>
</sqlMap>
\ No newline at end of file
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ003.xml
View file @
78bd1446
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
View file @
78bd1446
...
...
@@ -102,6 +102,36 @@ public class HGPZTools {
queryMap
.
put
(
"supType"
,
supType
);
return
DaoBase
.
getInstance
().
query
(
HGPZ003
.
QUERY
,
queryMap
);
}
/**
* 查询存货信息
*
* @param supCodes
* @return
*/
public
static
List
<
HGPZ003
>
list
(
List
<
String
>
supCodes
)
{
if
(
CollectionUtils
.
isEmpty
(
supCodes
))
{
return
null
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"supCodes"
,
supCodes
);
return
DaoBase
.
getInstance
().
query
(
HGPZ003
.
QUERY
,
queryMap
);
}
/**
* 查询存货信息
*
* @param supCodes
* @return
*/
public
static
Map
<
String
,
HGPZ003
>
map
(
List
<
String
>
supCodes
)
{
List
<
HGPZ003
>
results
=
list
(
supCodes
);
if
(
CollectionUtils
.
isEmpty
(
results
))
{
return
null
;
}
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGPZ003:
:
getSupCode
,
item
->
item
));
}
}
/**
...
...
src/main/java/com/baosight/hggp/hg/pz/utils/HGPZUtils.java
View file @
78bd1446
package
com
.
baosight
.
hggp
.
hg
.
pz
.
utils
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.hg.pz.domain.HGPZ003
;
import
com.baosight.hggp.hg.pz.domain.HGPZ020
;
import
com.baosight.hggp.hg.pz.domain.HGPZ020A
;
import
com.baosight.hggp.hg.pz.domain.HGPZ021
;
...
...
@@ -8,6 +9,7 @@ import com.baosight.hggp.hg.pz.enums.DynamicTableEnum;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.hggp.util.ObjectUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
...
...
@@ -30,6 +32,38 @@ import java.util.stream.Collectors;
public
class
HGPZUtils
{
/**
* HGPZ003 定义
*
* @author songx
* @date 2024/11/6,15:48
*/
public
static
class
HgPz003
{
/**
* 设置信息
*
* @param inInfo
*/
public
static
void
setInfo
(
EiInfo
inInfo
)
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
String
>
supCodes
=
ObjectUtils
.
listKey
(
resultRows
,
HGPZ003
.
FIELD_SUP_CODE
);
if
(
CollectionUtils
.
isEmpty
(
supCodes
))
{
return
;
}
Map
<
String
,
HGPZ003
>
resultMap
=
HGPZTools
.
HgPz003
.
map
(
supCodes
);
if
(
MapUtils
.
isEmpty
(
resultMap
))
{
return
;
}
for
(
Map
resultRow
:
resultRows
)
{
String
projCode
=
MapUtils
.
getString
(
resultRow
,
HGPZ003
.
FIELD_SUP_CODE
);
HGPZ003
dbPz003
=
resultMap
.
get
(
projCode
);
resultRow
.
put
(
HGPZ003
.
FIELD_SUP_NAME
,
dbPz003
==
null
?
""
:
dbPz003
.
getSupName
());
}
}
}
/**
* HGPZ020 定义
*
* @author songx
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
78bd1446
...
...
@@ -278,6 +278,17 @@ public class HGSCTools {
queryMap
.
put
(
"projCodes"
,
projCodes
);
return
DaoBase
.
getInstance
().
query
(
HGSC001
.
QUERY
,
queryMap
);
}
/**
* 查询
*
* @param projCodes
* @return
*/
public
static
Map
<
String
,
HGSC001
>
map
(
List
<
String
>
projCodes
)
{
List
<
HGSC001
>
results
=
queryByCode
(
projCodes
);
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGSC001:
:
getProjCode
,
item
->
item
));
}
}
public
static
class
Hgsc003
{
...
...
src/main/java/com/baosight/hggp/hg/sc/util/HgScUtils.java
View file @
78bd1446
...
...
@@ -4,19 +4,20 @@ import com.baosight.hggp.core.constant.CommonConstant;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.kc.domain.HGKC010
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.sc.constant.HgScSqlConstant
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.sc.domain.HGSC004A
;
import
com.baosight.hggp.hg.sc.domain.HGSC007
;
import
com.baosight.hggp.hg.sc.domain.HGSC007B
;
import
com.baosight.hggp.hg.sc.domain.HGSC010A
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.xs.domain.HGXS007
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.BeanUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.hggp.util.ObjectUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.xservices.xs.util.LoginUserDetails
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -30,7 +31,39 @@ import java.util.stream.Collectors;
* @date:2024/8/22,16:15
*/
public
class
HgScUtils
{
/**
* HGSC001 定义
*
* @author songx
* @date 2024/11/17,15:55
*/
public
static
class
HgSc001
{
/**
* 设置信息
*
* @param inInfo
*/
public
static
void
setInfo
(
EiInfo
inInfo
)
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
String
>
projCodes
=
ObjectUtils
.
listKey
(
resultRows
,
HGSC001
.
FIELD_proj_code
);
if
(
CollectionUtils
.
isEmpty
(
projCodes
))
{
return
;
}
Map
<
String
,
HGSC001
>
resultMap
=
HGSCTools
.
Hgsc001
.
map
(
projCodes
);
if
(
MapUtils
.
isEmpty
(
resultMap
))
{
return
;
}
for
(
Map
resultRow
:
resultRows
)
{
String
projCode
=
MapUtils
.
getString
(
resultRow
,
HGSC001
.
FIELD_proj_code
);
HGSC001
dbSc001
=
resultMap
.
get
(
projCode
);
resultRow
.
put
(
HGSC001
.
FIELD_proj_name
,
dbSc001
==
null
?
""
:
dbSc001
.
getProjName
());
}
}
}
/**
* @author:jhs
* @date:2024/10/27,16:17
...
...
src/main/webapp/HG/BI/HGBI011.js
0 → 100644
View file @
78bd1446
$
(
function
()
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
20
,
50
,
100
,
200
],
},
columns
:
[{
field
:
"supName"
,
template
:
function
(
item
)
{
let
supName
=
item
[
"supName"
];
if
(
CommonUtils
.
isBlank
(
supName
))
{
return
item
[
"supCode"
];
}
return
supName
;
}
}]
}
}
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
// 键盘按键
downKeyUp
();
});
/**
* 页面加载完成
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
/**
* 查询
*/
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
\ No newline at end of file
src/main/webapp/HG/BI/HGBI011.jsp
0 → 100644
View file @
78bd1446
<!DOCTYPE html>
<
%@
page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"采购执行情况"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFDatePicker
ename=
"receiptDate"
cname=
"日期"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
format=
"yyyy-MM-dd"
readonly=
"true"
/>
<EF:EFSelect
ename=
"companyCode"
cname=
"公司名称"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
optionLabel=
"全部"
filter=
"contains"
>
<EF:EFOptions
blockId=
"company_code_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFSelect
ename=
"projCode"
cname=
"项目名称"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
optionLabel=
"全部"
filter=
"contains"
>
<EF:EFOptions
blockId=
"proj_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFInput
ename=
"supName"
cname=
"供应商名称"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"明细信息"
fitHeight=
"true"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
>
<EF:EFColumn
ename=
"receiptDate"
cname=
"日期"
enable=
"false"
width=
"100"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
<EF:EFColumn
ename=
"companyCode"
cname=
"公司编码"
enable=
"false"
width=
"200"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"200"
align=
"left"
/>
<EF:EFColumn
ename=
"supCode"
cname=
"供应商编码"
enable=
"false"
width=
"160"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"supName"
cname=
"供应商名称"
enable=
"false"
width=
"160"
align=
"left"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
enable=
"false"
width=
"120"
align=
"left"
/>
<EF:EFColumn
ename=
"contractAmount"
cname=
"采购合同金额"
enable=
"false"
width=
"120"
align=
"right"
/>
<EF:EFColumn
ename=
"deliveryAmount"
cname=
"采购收货金额"
enable=
"false"
width=
"120"
align=
"right"
/>
<EF:EFColumn
ename=
"receiptAmount"
cname=
"采购收票金额"
enable=
"false"
width=
"120"
align=
"right"
/>
<EF:EFColumn
ename=
"payAmount"
cname=
"付款金额"
enable=
"false"
width=
"120"
align=
"right"
/>
<EF:EFColumn
ename=
"nonPayAmount"
cname=
"未付款金额"
enable=
"false"
width=
"120"
align=
"right"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
\ No newline at end of file
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