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
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
190 additions
and
110 deletions
+190
-110
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
+62
-63
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
+18
-18
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
+6
-18
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 {
...
@@ -189,7 +189,7 @@ public class HPSqlConstant {
public
class
HPKC010A
{
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"
;
public
static
final
String
BACKUP
=
"HPKC010A.backup"
;
}
}
...
@@ -207,6 +207,20 @@ public class HPSqlConstant {
...
@@ -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 定义
* HPPZ010 SQL 定义
*
*
* @author:songx
* @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 @@
...
@@ -18,10 +18,10 @@
WH_NAME as "whName",
<!-- 仓库名称 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PRDT_CODE as "prdtCode",
<!-- 产品
编码 -->
INVENT_CODE as "inventCode",
<!-- 部件
编码 -->
PRDT_NAME as "prdtName",
<!-- 产品
名称 -->
INVENT_NAME as "inventName",
<!-- 部件
名称 -->
PART_CODE as "par
tCode",
<!-- 零件编码 -->
SUB_INVENT_CODE as "subInven
tCode",
<!-- 零件编码 -->
PART_NAME as "par
tName",
<!-- 零件名称 -->
SUB_INVENT_NAME as "subInven
tName",
<!-- 零件名称 -->
INIT_AMOUNT as "initAmount",
<!-- 期初数量 -->
INIT_AMOUNT as "initAmount",
<!-- 期初数量 -->
INIT_WEIGHT as "initWeight",
<!-- 期初重量 -->
INIT_WEIGHT as "initWeight",
<!-- 期初重量 -->
ENTER_AMOUNT as "enterAmount",
<!-- 入库数量 -->
ENTER_AMOUNT as "enterAmount",
<!-- 入库数量 -->
...
@@ -80,17 +80,17 @@
...
@@ -80,17 +80,17 @@
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME = #projName#
PROJ_NAME = #projName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prd
tCode"
>
<isNotEmpty
prepend=
" AND "
property=
"inven
tCode"
>
PRDT_CODE = #prd
tCode#
INVENT_CODE = #inven
tCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prd
tName"
>
<isNotEmpty
prepend=
" AND "
property=
"inven
tName"
>
PRDT_NAME = #prd
tName#
INVENT_NAME = #inven
tName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"par
tCode"
>
<isNotEmpty
prepend=
" AND "
property=
"subInven
tCode"
>
PART_CODE = #par
tCode#
SUB_INVENT_CODE = #subInven
tCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"par
tName"
>
<isNotEmpty
prepend=
" AND "
property=
"subInven
tName"
>
PART_NAME = #par
tName#
SUB_INVENT_NAME = #subInven
tName#
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
...
@@ -105,7 +105,7 @@
...
@@ -105,7 +105,7 @@
</dynamic>
</dynamic>
</sql>
</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
SELECT
<include
refid=
"column"
/>
<include
refid=
"column"
/>
FROM ${hpjxSchema}.T_HPKC009A
FROM ${hpjxSchema}.T_HPKC009A
...
@@ -151,10 +151,10 @@
...
@@ -151,10 +151,10 @@
WH_NAME,
<!-- 仓库名称 -->
WH_NAME,
<!-- 仓库名称 -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
PROJ_NAME,
<!-- 项目名称 -->
PRDT_CODE,
<!-- 产品
编码 -->
INVENT_CODE,
<!-- 部件
编码 -->
PRDT_NAME,
<!-- 产品
名称 -->
INVENT_NAME,
<!-- 部件
名称 -->
PAR
T_CODE,
<!-- 零件编码 -->
SUB_INVEN
T_CODE,
<!-- 零件编码 -->
PAR
T_NAME,
<!-- 零件名称 -->
SUB_INVEN
T_NAME,
<!-- 零件名称 -->
INIT_AMOUNT,
<!-- 期初数量 -->
INIT_AMOUNT,
<!-- 期初数量 -->
INIT_WEIGHT,
<!-- 期初重量 -->
INIT_WEIGHT,
<!-- 期初重量 -->
ENTER_AMOUNT,
<!-- 入库数量 -->
ENTER_AMOUNT,
<!-- 入库数量 -->
...
@@ -168,7 +168,7 @@
...
@@ -168,7 +168,7 @@
) VALUES (
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#dateType#, #dateProc#, #whCode#, #whName#, #projCode#, #projName#,
#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#,
#enterAmount#, #enterWeight#, #outerAmount#, #outerWeight#, #pdDiffAmount#,
#pdDiffWeight#, #endAmount#, #endWeight#
#pdDiffWeight#, #endAmount#, #endWeight#
)
)
...
...
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC011A.xml
View file @
3891d88f
...
@@ -191,16 +191,16 @@
...
@@ -191,16 +191,16 @@
<!-- 备份数据 -->
<!-- 备份数据 -->
<insert
id=
"backup"
>
<insert
id=
"backup"
>
INSERT INTO ${hpjxSchema}.T_HPKC011A (
INSERT INTO ${hpjxSchema}.T_HPKC011A (
COMPANY_CODE, DEP_CODE, DATE_PROC, WH_CODE, WH_NAME,
INVENT_TYP
E,
COMPANY_CODE, DEP_CODE, DATE_PROC, WH_CODE, WH_NAME,
PROD_NO, PROJ_COD
E,
INVENT_CODE, INVENT_NAME, INVENT_RECORD_ID, AMOUNT, WEIGHT
,
PROJ_NAME, INVENT_CODE, INVENT_NAME, SUB_INVENT_CODE, SUB_INVENT_NAME, LENGTH
,
CREATED_BY, CREATED_NAME, CREATED_TIME, UPDATED_BY, UPD
ATED_NAME,
WIDTH, THICK, AMOUNT, UNIT_WEIGHT, WEIGHT, REMARK, CREATED_BY, CRE
ATED_NAME,
UPDATED_TIME, VERSION
CREATED_TIME, UPDATED_BY, UPDATED_NAME,
UPDATED_TIME, VERSION
)
)
SELECT
SELECT
COMPANY_CODE, DEP_CODE, #dateProc#, WH_CODE, WH_NAME,
INVENT_TYP
E,
COMPANY_CODE, DEP_CODE, #dateProc#, WH_CODE, WH_NAME,
PROD_NO, PROJ_COD
E,
INVENT_CODE, INVENT_NAME, INVENT_RECORD_ID, AMOUNT, WEIGHT
,
PROJ_NAME, INVENT_CODE, INVENT_NAME, SUB_INVENT_CODE, SUB_INVENT_NAME, LENGTH
,
CREATED_BY, CREATED_NAME, CREATED_TIME, UPDATED_BY, UPD
ATED_NAME,
WIDTH, THICK, AMOUNT, UNIT_WEIGHT, WEIGHT, REMARK, CREATED_BY, CRE
ATED_NAME,
UPDATED_TIME, VERSION
CREATED_TIME, UPDATED_BY, UPDATED_NAME,
UPDATED_TIME, VERSION
FROM ${hpjxSchema}.T_HPKC011
FROM ${hpjxSchema}.T_HPKC011
</insert>
</insert>
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC001.xml
View file @
3891d88f
<?xml version="1.0" encoding="UTF-8"?>
<?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">
<!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"
>
<sqlMap
namespace=
"HPSC001"
>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
@@ -66,6 +48,9 @@
...
@@ -66,6 +48,9 @@
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
COMPANY_CODE = #companyCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCodes"
>
PROJ_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"projCodes"
>
#projCodes[]#
</iterate>
</isNotEmpty>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
<isEmpty
property=
"orderBy"
>
<isEmpty
property=
"orderBy"
>
CREATED_TIME desc
CREATED_TIME desc
...
@@ -101,6 +86,9 @@
...
@@ -101,6 +86,9 @@
<isNotEmpty
prepend=
" AND "
property=
"materialStatus"
>
<isNotEmpty
prepend=
" AND "
property=
"materialStatus"
>
MATERIAL_STATUS = #materialStatus#
MATERIAL_STATUS = #materialStatus#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCodes"
>
PROJ_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"projCodes"
>
#projCodes[]#
</iterate>
</isNotEmpty>
</select>
</select>
<!--
<!--
...
...
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;
...
@@ -3,7 +3,16 @@ package com.baosight.hpjx.hp.sc.tools;
import
com.baosight.hpjx.core.dao.DaoBase
;
import
com.baosight.hpjx.core.dao.DaoBase
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.constant.HPSqlConstant
;
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.AssertUtils
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.hpjx.util.StringUtils
;
import
com.baosight.hpjx.util.StringUtils
;
...
@@ -137,6 +146,35 @@ public class HPSCTools {
...
@@ -137,6 +146,35 @@ public class HPSCTools {
AssertUtils
.
isNull
(
results
,
String
.
format
(
"项目编码[%s]信息不存在"
,
projCode
));
AssertUtils
.
isNull
(
results
,
String
.
format
(
"项目编码[%s]信息不存在"
,
projCode
));
return
results
.
get
(
0
);
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) {
...
@@ -78,7 +78,7 @@ function tearAssign(prodOrderNo) {
/**
/**
* 生产订单详情
* 生产订单详情
*
*
* @param prod
uction
OrderNo
* @param prodOrderNo
*/
*/
function
tearDetails
(
prodOrderNo
)
{
function
tearDetails
(
prodOrderNo
)
{
JSColorbox
.
open
({
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