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
c0da6de5
Commit
c0da6de5
authored
Oct 24, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-10-24 生产管理报表
parent
3c985027
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
231 additions
and
0 deletions
+231
-0
ServiceHGSC012.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC012.java
+4
-0
ServiceHGSC013.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC013.java
+52
-0
HGSC013.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC013.xml
+159
-0
HGSC013.js
src/main/webapp/HG/SC/HGSC013.js
+0
-0
HGSC013.jsp
src/main/webapp/HG/SC/HGSC013.jsp
+16
-0
No files found.
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC012.java
View file @
c0da6de5
...
...
@@ -5,6 +5,7 @@ import com.baosight.hggp.core.dao.DaoBase;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.xs.domain.Company
;
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.EiConstant
;
...
...
@@ -38,6 +39,9 @@ public class ServiceHGSC012 extends ServiceEPBase {
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
queryMap
.
containsKey
(
"contractDate"
)){
queryMap
.
put
(
"contractDate"
,
DateUtils
.
formatShort
(
queryMap
.
get
(
"contractDate"
)));
}
List
<
Map
>
list
=
DaoBase
.
getInstance
().
query
(
"HGSC012.query"
,
queryMap
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
list
);
}
catch
(
Exception
e
){
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC013.java
0 → 100644
View file @
c0da6de5
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.xs.domain.Company
;
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.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author LiuYang
* @version 1.0 2024/10/24
* @description 生产管理
*/
public
class
ServiceHGSC013
extends
ServiceEPBase
{
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_RECORD_BLOCK_ID
,
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
));
EiInfoUtils
.
addBlock
(
inInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
queryMap
.
containsKey
(
"contractDate"
)){
queryMap
.
put
(
"contractDate"
,
DateUtils
.
formatShort
(
queryMap
.
get
(
"contractDate"
)));
}
List
<
Map
>
list
=
DaoBase
.
getInstance
().
query
(
"HGSC013.query"
,
queryMap
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
list
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
}
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC013.xml
0 → 100644
View file @
c0da6de5
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGSC013"
>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
select
h.company_code as "companyCode",
<!-- 公司编码(预留) -->
h.company_name as "companyName",
<!-- 公司名称(预留) -->
h.proj_code as "projCode",
<!-- 项目编码(预留) -->
h.proj_name as "projName",
<!-- 项目名称(预留) -->
ha.product_code as "productCode",
<!-- 产品编号 -->
ha.product_name as "productName",
<!-- 产品名称 -->
ha.spec as "spec",
<!-- 规格 -->
ha.length as "length",
<!-- 长 -->
ha.width as "width",
<!-- 宽 -->
ha.thick as "thick",
<!-- 厚 -->
ha.quantity as "quantity",
<!-- 数量 -->
ha.single_weight as "singleWeight",
<!-- 单重 -->
ha.total_weight as "totalWeight",
<!-- 总重 -->
ha.DEPOSIT_DATE as "depositDate",
<!-- 入库日期 -->
ha.INV_QTY as "invQty",
<!-- 数量 -->
ha.INV_UNIT_WEIGHT as "invUnitWeight",
<!-- 单重 -->
ha.INV_WEIGHT as "invWeight",
<!-- 重量 -->
hb.product_code as "clproductCode" ,
<!-- 产品编号 -->
hb.product_name as "clproductName",
<!-- 产品名称 -->
hb.spec as "clspec",
<!-- 规格 -->
hb.length as "cllength",
<!-- 长 -->
hb.width as "clwidth",
<!-- 宽 -->
hb.thick as "clthick",
<!-- 厚 -->
hb.quantity as "clquantity",
<!-- 数量 -->
hb.total_weight as "cltotalWeight",
<!-- 总重 -->
hb.RECEIPT_DATE as "receiptDate",
<!-- 领料日期 -->
hb.INV_QTY as "llinvQty",
<!-- 数量 -->
hb.INV_WEIGHT as "llinvWeight"
<!-- 重量 -->
from hggp.hgsc004 h
join (
select
h.id , -- 主键 -->
h.company_code , -- 公司编码(预留) -->
h.company_name , -- 公司名称(预留) -->
h.proj_code , -- 项目编码(预留) -->
h.proj_name , -- 项目名称(预留) -->
h.parent_prod_code , -- 父节点-产品编码 -->
h.parent_prod_name , -- 父节点-产品名称 -->
h.material_id , -- 物料清单id -->
h.product_id , -- 产品id -->
h.product_type , -- 产品类别 -->
h.product_code , -- 产品编号 -->
h.product_name , -- 产品名称 -->
h.invent_type , -- 档案类型 -->
h.spec , -- 规格 -->
h.length , -- 长 -->
h.width , -- 宽 -->
h.thick , -- 厚 -->
h.quantity , -- 数量 -->
h.single_weight , -- 单重 -->
h.total_weight , -- 总重 -->
h.approval_status , -- 审批状态 0:待审;1:审核中;2:已审 -->
h.leaf , -- 是否有叶子节点 -->
h.sort , -- 排序字段 -->
h.lv , -- 层级 -->
k.DEPOSIT_DATE , -- 入库日期 -->
k.INV_QTY , -- 数量 -->
k.INV_UNIT_WEIGHT , -- 单重 -->
k.INV_WEIGHT -- 重量 -->
from hggp.hgsc004a h
left join hggp.hgkc003 k on h.company_code = k.COMPANY_CODE and h.proj_code = k.PROJ_CODE
and h.product_code = k.PRDT_CODE
and k.DELETE_FLAG = 0
where h.product_status = 1 and h.lv = 3
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
h.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
h.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
h.COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
h.proj_code = #projCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
h.proj_name = #projName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"productCode"
>
h.product_code = #productCode#
</isNotEmpty>
) ha on h.id = ha.material_id
join (
select
h.id , -- 主键 -->
h.company_code , -- 公司编码(预留) -->
h.company_name , -- 公司名称(预留) -->
h.proj_code , -- 项目编码(预留) -->
h.proj_name , -- 项目名称(预留) -->
h.parent_prod_code , -- 父节点-产品编码 -->
h.parent_prod_name , -- 父节点-产品名称 -->
h.material_id , -- 物料清单id -->
h.product_id , -- 产品id -->
h.product_type , -- 产品类别 -->
h.product_code , -- 产品编号 -->
h.product_name , -- 产品名称 -->
h.invent_type , -- 档案类型 -->
h.spec , -- 规格 -->
h.length , -- 长 -->
h.width , -- 宽 -->
h.thick , -- 厚 -->
h.quantity , -- 数量 -->
h.single_weight , -- 单重 -->
h.total_weight , -- 总重 -->
h.approval_status , -- 审批状态 0:待审;1:审核中;2:已审 -->
h.leaf , -- 是否有叶子节点 -->
h.sort , -- 排序字段 -->
h.lv , -- 层级 -->
k.RECEIPT_DATE , -- 入库日期 -->
k.INV_QTY , -- 数量 -->
k.INV_WEIGHT -- 重量 -->
from hggp.hgsc004a h
left join (
select
k.COMPANY_CODE ,
k.PROJ_CODE ,
k1.RECEIPT_DATE , -- 入库日期 -->
k.INVENT_CODE ,
sum(k.INV_QTY) as INV_QTY, -- 数量 -->
sum(k.INV_WEIGHT) as INV_WEIGHT -- 重量 -->
from hggp.hgkc008a k
join hggp.hgkc008 k1 on k.RECEIVE_ID = k1.id
where k.DELETE_FLAG = 0
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
k.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
k.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
k.COMPANY_NAME = #companyName#
</isNotEmpty>
group by k.COMPANY_CODE, k.PROJ_CODE, k1.RECEIPT_DATE, k.INVENT_CODE
) k on h.company_code = k.COMPANY_CODE
and h.proj_code = k.PROJ_CODE
and h.product_code = k.INVENT_CODE
where h.lv = 4 and h.product_status = 1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
h.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
h.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
h.COMPANY_NAME = #companyName#
</isNotEmpty>
) hb on h.id = hb.material_id and ha.product_code = hb.parent_prod_code
order by h.id desc
</select>
</sqlMap>
\ No newline at end of file
src/main/webapp/HG/SC/HGSC013.js
0 → 100644
View file @
c0da6de5
src/main/webapp/HG/SC/HGSC013.jsp
0 → 100644
View file @
c0da6de5
<
%
--
Created
by
IntelliJ
IDEA
.
User:
1
Date:
2024
/
10
/
24
Time:
14:51
To
change
this
template
use
File
|
Settings
|
File
Templates
.
--
%
>
<
%@
page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%
>
<html>
<head>
<title>
Title
</title>
</head>
<body>
</body>
</html>
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