Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-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
hp-smart
Commits
3891d88f
Commit
3891d88f
authored
Feb 23, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.生产库存收发存统计
parent
2bf7b156
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
153 additions
and
73 deletions
+153
-73
HPSqlConstant.java
...ain/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
+15
-1
HPKC009A.java
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC009A.java
+0
-0
ServiceHPKC009A.java
...java/com/baosight/hpjx/hp/kc/service/ServiceHPKC009A.java
+0
-0
ServiceHPKC011A.java
...java/com/baosight/hpjx/hp/kc/service/ServiceHPKC011A.java
+41
-0
HPKC009A.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC009A.xml
+22
-22
HPKC011A.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC011A.xml
+8
-8
HPSC001.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC001.xml
+27
-40
HPSCTools.java
src/main/java/com/baosight/hpjx/hp/sc/tools/HPSCTools.java
+39
-1
HPSC005.js
src/main/webapp/HP/SC/HPSC005.js
+1
-1
No files found.
src/main/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
View file @
3891d88f
...
...
@@ -189,7 +189,7 @@ public class HPSqlConstant {
public
class
HPKC010A
{
// 按日期删除
public
static
final
String
DELETE_BY_TIME
=
"HPKC0
09
.deleteByTime"
;
public
static
final
String
DELETE_BY_TIME
=
"HPKC0
10A
.deleteByTime"
;
// 备份数量
public
static
final
String
BACKUP
=
"HPKC010A.backup"
;
}
...
...
@@ -207,6 +207,20 @@ public class HPSqlConstant {
}
/**
* HPKC011A SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
HPKC011A
{
// 按日期删除
public
static
final
String
DELETE_BY_TIME
=
"HPKC011A.deleteByTime"
;
// 备份数量
public
static
final
String
BACKUP
=
"HPKC011A.backup"
;
}
/**
* HPPZ010 SQL 定义
*
* @author:songx
...
...
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC009A.java
View file @
3891d88f
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC009A.java
View file @
3891d88f
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC011A.java
0 → 100644
View file @
3891d88f
package
com
.
baosight
.
hpjx
.
hp
.
kc
.
service
;
import
com.baosight.hpjx.hp.constant.HPSqlConstant
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
java.time.LocalDate
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author:songx
* @date:2024/1/25,18:49
*/
public
class
ServiceHPKC011A
extends
ServiceBase
{
/**
* 备份数据
*
* @param inInfo
* @return
*/
public
EiInfo
backup
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"dateProc"
,
LocalDate
.
now
().
minusDays
(
1
).
format
(
DateUtils
.
SHORT_DATE
));
// 清除数据
dao
.
delete
(
HPSqlConstant
.
HPKC011A
.
DELETE_BY_TIME
,
queryMap
);
// 备份数据
dao
.
insert
(
HPSqlConstant
.
HPKC011A
.
BACKUP
,
queryMap
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"备份数据成功"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"新增失败"
);
}
return
inInfo
;
}
}
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC009A.xml
View file @
3891d88f
...
...
@@ -18,10 +18,10 @@
WH_NAME as "whName",
<!-- 仓库名称 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PRDT_CODE as "prdtCode",
<!-- 产品
编码 -->
PRDT_NAME as "prdtName",
<!-- 产品
名称 -->
PART_CODE as "par
tCode",
<!-- 零件编码 -->
PART_NAME as "par
tName",
<!-- 零件名称 -->
INVENT_CODE as "inventCode",
<!-- 部件
编码 -->
INVENT_NAME as "inventName",
<!-- 部件
名称 -->
SUB_INVENT_CODE as "subInven
tCode",
<!-- 零件编码 -->
SUB_INVENT_NAME as "subInven
tName",
<!-- 零件名称 -->
INIT_AMOUNT as "initAmount",
<!-- 期初数量 -->
INIT_WEIGHT as "initWeight",
<!-- 期初重量 -->
ENTER_AMOUNT as "enterAmount",
<!-- 入库数量 -->
...
...
@@ -80,18 +80,18 @@
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prd
tCode"
>
PRDT_CODE = #prd
tCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prd
tName"
>
PRDT_NAME = #prd
tName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"par
tCode"
>
PART_CODE = #par
tCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"par
tName"
>
PART_NAME = #par
tName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inven
tCode"
>
INVENT_CODE = #inven
tCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inven
tName"
>
INVENT_NAME = #inven
tName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"subInven
tCode"
>
SUB_INVENT_CODE = #subInven
tCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"subInven
tName"
>
SUB_INVENT_NAME = #subInven
tName#
</isNotEmpty>
</sql>
<sql
id=
"order"
>
...
...
@@ -105,7 +105,7 @@
</dynamic>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.
gxzl.common.mc.domain.THpkc009a
"
>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.
hpjx.hp.kc.domain.HPKC009A
"
>
SELECT
<include
refid=
"column"
/>
FROM ${hpjxSchema}.T_HPKC009A
...
...
@@ -151,10 +151,10 @@
WH_NAME,
<!-- 仓库名称 -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
PRDT_CODE,
<!-- 产品
编码 -->
PRDT_NAME,
<!-- 产品
名称 -->
PAR
T_CODE,
<!-- 零件编码 -->
PAR
T_NAME,
<!-- 零件名称 -->
INVENT_CODE,
<!-- 部件
编码 -->
INVENT_NAME,
<!-- 部件
名称 -->
SUB_INVEN
T_CODE,
<!-- 零件编码 -->
SUB_INVEN
T_NAME,
<!-- 零件名称 -->
INIT_AMOUNT,
<!-- 期初数量 -->
INIT_WEIGHT,
<!-- 期初重量 -->
ENTER_AMOUNT,
<!-- 入库数量 -->
...
...
@@ -168,7 +168,7 @@
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#dateType#, #dateProc#, #whCode#, #whName#, #projCode#, #projName#,
#
prdtCode#, #prdtName#, #partCode#, #par
tName#, #initAmount#, #initWeight#,
#
inventCode#, #inventName#, #subInventCode#, #subInven
tName#, #initAmount#, #initWeight#,
#enterAmount#, #enterWeight#, #outerAmount#, #outerWeight#, #pdDiffAmount#,
#pdDiffWeight#, #endAmount#, #endWeight#
)
...
...
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC011A.xml
View file @
3891d88f
...
...
@@ -191,16 +191,16 @@
<!-- 备份数据 -->
<insert
id=
"backup"
>
INSERT INTO ${hpjxSchema}.T_HPKC011A (
COMPANY_CODE, DEP_CODE, DATE_PROC, WH_CODE, WH_NAME,
INVENT_TYP
E,
INVENT_CODE, INVENT_NAME, INVENT_RECORD_ID, AMOUNT, WEIGHT
,
CREATED_BY, CREATED_NAME, CREATED_TIME, UPDATED_BY, UPD
ATED_NAME,
UPDATED_TIME, VERSION
COMPANY_CODE, DEP_CODE, DATE_PROC, WH_CODE, WH_NAME,
PROD_NO, PROJ_COD
E,
PROJ_NAME, INVENT_CODE, INVENT_NAME, SUB_INVENT_CODE, SUB_INVENT_NAME, LENGTH
,
WIDTH, THICK, AMOUNT, UNIT_WEIGHT, WEIGHT, REMARK, CREATED_BY, CRE
ATED_NAME,
CREATED_TIME, UPDATED_BY, UPDATED_NAME,
UPDATED_TIME, VERSION
)
SELECT
COMPANY_CODE, DEP_CODE, #dateProc#, WH_CODE, WH_NAME,
INVENT_TYP
E,
INVENT_CODE, INVENT_NAME, INVENT_RECORD_ID, AMOUNT, WEIGHT
,
CREATED_BY, CREATED_NAME, CREATED_TIME, UPDATED_BY, UPD
ATED_NAME,
UPDATED_TIME, VERSION
COMPANY_CODE, DEP_CODE, #dateProc#, WH_CODE, WH_NAME,
PROD_NO, PROJ_COD
E,
PROJ_NAME, INVENT_CODE, INVENT_NAME, SUB_INVENT_CODE, SUB_INVENT_NAME, LENGTH
,
WIDTH, THICK, AMOUNT, UNIT_WEIGHT, WEIGHT, REMARK, CREATED_BY, CRE
ATED_NAME,
CREATED_TIME, UPDATED_BY, UPDATED_NAME,
UPDATED_TIME, VERSION
FROM ${hpjxSchema}.T_HPKC011
</insert>
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC001.xml
View file @
3891d88f
<?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">
<!-- table information
Generate time : 2024-01-10 9:33:44
Version : 1.0
tableName :hpjx.t_hpsc001
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
PROJ_TYPE TINYINT,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PRINC1 VARCHAR,
PRINC2 VARCHAR,
STATUS TINYINT,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME,
DEP_CODE VARCHAR
-->
<sqlMap
namespace=
"HPSC001"
>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC001"
>
SELECT
ID as "id",
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
PROJ_TYPE as "projType",
<!-- 项目类型 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
...
...
@@ -66,13 +48,16 @@
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCodes"
>
PROJ_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"projCodes"
>
#projCodes[]#
</iterate>
</isNotEmpty>
<dynamic
prepend=
"ORDER BY"
>
<isEmpty
property=
"orderBy"
>
CREATED_TIME desc
</isEmpty>
</dynamic>
</select>
<select
id=
"count"
resultClass=
"int"
>
...
...
@@ -101,9 +86,12 @@
<isNotEmpty
prepend=
" AND "
property=
"materialStatus"
>
MATERIAL_STATUS = #materialStatus#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCodes"
>
PROJ_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"projCodes"
>
#projCodes[]#
</iterate>
</isNotEmpty>
</select>
<!--
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
...
...
@@ -161,30 +149,30 @@
UPDATED_TIME,
<!-- 更新时间 -->
DEP_CODE,
<!-- 部门编码 -->
REMARK
)
)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #princ1#, #princ2#, #status#, 0, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#)
</insert>
<delete
id=
"delete"
>
DELETE FROM hpjx.t_hpsc001 WHERE
DELETE FROM hpjx.t_hpsc001 WHERE
ID = #id#
</delete>
<update
id=
"update"
>
UPDATE hpjx.t_hpsc001
SET
COMPANY_CODE = #companyCode#,
<!-- 企业编码 预留 -->
PROJ_TYPE = #projType#,
<!-- 项目类型 -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PRINC1 = #princ1#,
<!-- 本公司项目负责人 -->
PRINC2 = #princ2#,
<!-- 客户项目负责人 -->
UPDATE hpjx.t_hpsc001
SET
COMPANY_CODE = #companyCode#,
<!-- 企业编码 预留 -->
PROJ_TYPE = #projType#,
<!-- 项目类型 -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PRINC1 = #princ1#,
<!-- 本公司项目负责人 -->
PRINC2 = #princ2#,
<!-- 客户项目负责人 -->
STATUS = #status#,
<!-- 状态 0-未提交,1-已提交 -->
MATERIAL_STATUS = #materialStatus#,
CREATED_BY = #createdBy#,
<!-- 创建人 -->
CREATED_TIME = #createdTime#,
<!-- 创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
CREATED_BY = #createdBy#,
<!-- 创建人 -->
CREATED_TIME = #createdTime#,
<!-- 创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
DEP_CODE = #depCode#,
<!-- 部门编码 -->
REMARK = #remark#
<!-- 备注 -->
WHERE
...
...
@@ -237,4 +225,4 @@
ID = #id#
</isNotEmpty>
</select>
</sqlMap>
\ No newline at end of file
</sqlMap>
src/main/java/com/baosight/hpjx/hp/sc/tools/HPSCTools.java
View file @
3891d88f
...
...
@@ -3,7 +3,16 @@ package com.baosight.hpjx.hp.sc.tools;
import
com.baosight.hpjx.core.dao.DaoBase
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.constant.HPSqlConstant
;
import
com.baosight.hpjx.hp.sc.domain.*
;
import
com.baosight.hpjx.hp.sc.domain.HPSC001
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002
;
import
com.baosight.hpjx.hp.sc.domain.HPSC003
;
import
com.baosight.hpjx.hp.sc.domain.HPSC004
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005A
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005B
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005C
;
import
com.baosight.hpjx.hp.sc.domain.HPSC006
;
import
com.baosight.hpjx.hp.sc.domain.HPSC007
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.hpjx.util.StringUtils
;
...
...
@@ -137,6 +146,35 @@ public class HPSCTools {
AssertUtils
.
isNull
(
results
,
String
.
format
(
"项目编码[%s]信息不存在"
,
projCode
));
return
results
.
get
(
0
);
}
/**
* 查询
*
* @param projCodes
* @return
*/
public
static
List
<
HPSC001
>
list
(
List
<
String
>
projCodes
)
{
if
(
CollectionUtils
.
isEmpty
(
projCodes
))
{
return
null
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"projCodes"
,
projCodes
);
return
DaoBase
.
getInstance
().
query
(
"HPSC001.query"
,
queryMap
);
}
/**
* 查询
*
* @param projCodes
* @return
*/
public
static
Map
<
String
,
HPSC001
>
map
(
List
<
String
>
projCodes
)
{
List
<
HPSC001
>
results
=
list
(
projCodes
);
if
(
CollectionUtils
.
isEmpty
(
results
))
{
return
null
;
}
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HPSC001:
:
getProjCode
,
item
->
item
));
}
}
/**
...
...
src/main/webapp/HP/SC/HPSC005.js
View file @
3891d88f
...
...
@@ -78,7 +78,7 @@ function tearAssign(prodOrderNo) {
/**
* 生产订单详情
*
* @param prod
uction
OrderNo
* @param prodOrderNo
*/
function
tearDetails
(
prodOrderNo
)
{
JSColorbox
.
open
({
...
...
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