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
69bea29a
Commit
69bea29a
authored
Feb 22, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.fixBug:物料清单已派工时不能删除
2.新增物料计划提交不生效问题修复
parent
8af6de4c
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1799 additions
and
1790 deletions
+1799
-1790
CommonConstant.java
.../java/com/baosight/hpjx/core/constant/CommonConstant.java
+12
-0
HPConstant.java
src/main/java/com/baosight/hpjx/hp/constant/HPConstant.java
+15
-1
HPSqlConstant.java
...ain/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
+21
-1
HPSC004.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC004.java
+340
-226
HPSC005.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC005.java
+130
-129
ServiceHPSC002.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
+212
-236
ServiceHPSC003.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC003.java
+109
-143
ServiceHPSC005A.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC005A.java
+10
-9
HPSC002.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002.xml
+141
-344
HPSC003.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC003.xml
+19
-7
HPSC004.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC004.xml
+323
-319
HPSC005.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC005.xml
+235
-230
HPSC005B.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC005B.xml
+3
-3
HPSCTools.java
src/main/java/com/baosight/hpjx/hp/sc/tools/HPSCTools.java
+125
-15
DateUtils.java
src/main/java/com/baosight/hpjx/util/DateUtils.java
+4
-1
HPSC002.js
src/main/webapp/HP/SC/HPSC002.js
+1
-2
HPSC002.jsp
src/main/webapp/HP/SC/HPSC002.jsp
+3
-4
HPSC003.js
src/main/webapp/HP/SC/HPSC003.js
+78
-87
HPSC003.jsp
src/main/webapp/HP/SC/HPSC003.jsp
+11
-27
HPSC005.js
src/main/webapp/HP/SC/HPSC005.js
+2
-2
HPSC005.jsp
src/main/webapp/HP/SC/HPSC005.jsp
+4
-3
HPSC005A.jsp
src/main/webapp/HP/SC/HPSC005A.jsp
+1
-1
No files found.
src/main/java/com/baosight/hpjx/core/constant/CommonConstant.java
View file @
69bea29a
...
...
@@ -38,4 +38,16 @@ public class CommonConstant {
public
static
final
String
DAY
=
"DAY"
;
}
/**
* 常用字段常量
*
* @author:songx
* @date:2024/2/22,15:33
*/
public
static
class
Field
{
// DETAIL
public
static
final
String
DETAIL
=
"detail"
;
}
}
src/main/java/com/baosight/hpjx/hp/constant/HPConstant.java
View file @
69bea29a
...
...
@@ -72,5 +72,19 @@ public class HPConstant {
// 其他
public
static
final
String
QT
=
"QT"
;
}
/**
* 计划状态常量
*
* @author:songx
* @date:2024/2/22,13:57
*/
public
static
class
planStatus
{
// 计划中
public
static
final
Integer
S_0
=
0
;
// 生产中
public
static
final
Integer
S_1
=
1
;
}
}
src/main/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
View file @
69bea29a
...
...
@@ -217,6 +217,20 @@ public class HPSqlConstant {
}
/**
* HPSC003 SQL名称定义
*
* @author:songx
* @date:2024/2/5,10:16
*/
public
class
HPSC003
{
// 修改状态
public
static
final
String
UPDATE_STATUS
=
"HPSC003.updateStatus"
;
// 修改时间
public
static
final
String
UPDATE_DATE
=
"HPSC003.updateDate"
;
}
/**
* HPSC004 SQL名称定义
*
* @author:songx
...
...
@@ -226,8 +240,14 @@ public class HPSqlConstant {
// 锁
public
static
final
String
LOCK
=
"HPSC004.lock"
;
// 更新时间完工情况
// 根据材料号删除
public
static
final
String
DELETE_BY_MAT
=
"HPSC004.deleteByMat"
;
// 更新计划完工情况
public
static
final
String
UPDATE_PLAN_DATE
=
"HPSC004.updatePlanDate"
;
// 更新实际完工情况
public
static
final
String
UPDATE_COMPLETE
=
"HPSC004.updateComplete"
;
// 更新订单号
public
static
final
String
UPDATE_PROD_ORDER_NO
=
"HPSC004.updateProdOrderNo"
;
}
/**
...
...
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC004.java
View file @
69bea29a
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
domain
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
java.math.BigDecimal
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.baosight.iplat4j.core.util.StringUtils
;
/**
* Project: <br>
...
...
@@ -17,7 +17,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-0
1-17 10:33:53
create
* @history 2024-0
2-22 10:25:57
create
*/
public
class
HPSC004
extends
DaoEPBase
{
...
...
@@ -28,15 +28,22 @@ public class HPSC004 extends DaoEPBase {
public
static
final
String
FIELD_DEPT_CODE
=
"deptCode"
;
/* 部门编码 预留*/
public
static
final
String
FIELD_PROJ_CODE
=
"projCode"
;
/* 项目编码*/
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_PARENT_ID
=
"parentId"
;
/* 父节点-部件编码*/
public
static
final
String
FIELD_PARENT_PRDT_NAME
=
"parentPrdtName"
;
/* 父节点-部件名称*/
public
static
final
String
FIELD_MAT_ID
=
"matId"
;
/* 材料ID*/
public
static
final
String
FIELD_PARENT_ID
=
"parentId"
;
/* 父节点-产品编码*/
public
static
final
String
FIELD_PARENT_PRDT_NAME
=
"parentPrdtName"
;
/* 父节点-产品名称*/
public
static
final
String
FIELD_PROD_ORDER_NO
=
"prodOrderNo"
;
/* 生产订单号*/
public
static
final
String
FIELD_PRODUTION_ORDER_NO
=
"produtionOrderNo"
;
/* 生产订单号*/
public
static
final
String
FIELD_TYPE
=
"type"
;
/* 类别*/
public
static
final
String
FIELD_LEAF
=
"leaf"
;
/* 是否有叶子节点*/
public
static
final
String
FIELD_SORT
=
"sort"
;
/* 排序字段*/
public
static
final
String
FIELD_ICON
=
"icon"
;
/* 图片地址*/
public
static
final
String
FIELD_PRDT_TYPE
=
"prdtType"
;
/* 部件类型*/
public
static
final
String
FIELD_PRDT_CODE
=
"prdtCode"
;
/* 部件编码*/
public
static
final
String
FIELD_PRDT_NAME
=
"prdtName"
;
/* 部件名称*/
public
static
final
String
FIELD_PRDT_TYPE
=
"prdtType"
;
/* 产品类型*/
public
static
final
String
FIELD_PRDT_CODE
=
"prdtCode"
;
/* 产品编码*/
public
static
final
String
FIELD_PRDT_NAME
=
"prdtName"
;
/* 产品名称*/
public
static
final
String
FIELD_LENGTH
=
"length"
;
/* 长*/
public
static
final
String
FIELD_WIDTH
=
"width"
;
/* 宽*/
public
static
final
String
FIELD_THICK
=
"thick"
;
/* 厚*/
public
static
final
String
FIELD_SPEC
=
"spec"
;
/* 规格*/
public
static
final
String
FIELD_NUM
=
"num"
;
/* 数量*/
public
static
final
String
FIELD_UNIT_WT
=
"unitWt"
;
/* 单重*/
public
static
final
String
FIELD_TOTAL_WT
=
"totalWt"
;
/* 总重*/
...
...
@@ -50,31 +57,38 @@ public class HPSC004 extends DaoEPBase {
public
static
final
String
FIELD_ACTUAL_COMPLETION_DATE
=
"actualCompletionDate"
;
/* 实际完工日期*/
public
static
final
String
FIELD_ACTUAL_COMPLETION_NUM
=
"actualCompletionNum"
;
/* 实际完工数量*/
public
static
final
String
FIELD_ACTUAL_COMPLETION_UNIT_WT
=
"actualCompletionUnitWt"
;
/* 实际完工重量*/
public
static
final
String
FIELD_
PRODUCTION_ORDER_NO
=
"productionOrderNo"
;
/* 生产订单号
*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 状态 0-未
提交,1-已提交
*/
public
static
final
String
FIELD_
DEL_STATUS
=
"delStatus"
;
/* 状态 1未删除,0已删除
*/
public
static
final
String
FIELD_
INVENT_RECORD_ID
=
"inventRecordId"
;
/* 项目档案ID
*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 状态 0-未
审核,1-已审核
*/
public
static
final
String
FIELD_
REMARK
=
"remark"
;
/* 备注
*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 创建人*/
public
static
final
String
FIELD_CREATED_NAME
=
"createdName"
;
/* 创建人名称*/
public
static
final
String
FIELD_CREATED_TIME
=
"createdTime"
;
/* 创建时间*/
public
static
final
String
FIELD_UPDATED_BY
=
"updatedBy"
;
/* 更新人*/
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 修改人名称*/
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 更新时间*/
public
static
final
String
FIELD_REMARK
=
"remark"
;
/* 备注*/
public
static
final
String
FIELD_INVENT_RECORD_ID
=
"inventRecordId"
;
public
static
final
String
FIELD_DEL_STATUS
=
"delStatus"
;
/* 状态:0未删除,1已删除*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码 预留*/
public
static
final
String
COL_DEPT_CODE
=
"DEPT_CODE"
;
/* 部门编码 预留*/
public
static
final
String
COL_PROJ_TYPE
=
"PROJ_TYPE"
;
/* 项目编码*/
public
static
final
String
COL_PROJ_CODE
=
"PROJ_CODE"
;
/* 项目编码*/
public
static
final
String
COL_PROJ_NAME
=
"PROJ_NAME"
;
/* 项目名称*/
public
static
final
String
COL_PARENT_ID
=
"PARENT_ID"
;
/* 父节点-部件编码*/
public
static
final
String
COL_PARENT_PRDT_NAME
=
"PARENT_PRDT_NAME"
;
/* 父节点-部件名称*/
public
static
final
String
COL_MAT_ID
=
"MAT_ID"
;
/* 材料ID*/
public
static
final
String
COL_PARENT_ID
=
"PARENT_ID"
;
/* 父节点-产品编码*/
public
static
final
String
COL_PARENT_PRDT_NAME
=
"PARENT_PRDT_NAME"
;
/* 父节点-产品名称*/
public
static
final
String
COL_PROD_ORDER_NO
=
"PROD_ORDER_NO"
;
/* 生产订单号*/
public
static
final
String
COL_PRODUTION_ORDER_NO
=
"PRODUTION_ORDER_NO"
;
/* 生产订单号*/
public
static
final
String
COL_TYPE
=
"TYPE"
;
/* 类别*/
public
static
final
String
COL_LEAF
=
"LEAF"
;
/* 是否有叶子节点*/
public
static
final
String
COL_SORT
=
"SORT"
;
/* 排序字段*/
public
static
final
String
COL_ICON
=
"ICON"
;
/* 图片地址*/
public
static
final
String
COL_PRDT_TYPE
=
"PRDT_TYPE"
;
/* 部件类型*/
public
static
final
String
COL_PRDT_CODE
=
"PRDT_CODE"
;
/* 部件编码*/
public
static
final
String
COL_PRDT_NAME
=
"PRDT_NAME"
;
/* 部件名称*/
public
static
final
String
COL_PRDT_TYPE
=
"PRDT_TYPE"
;
/* 产品类型*/
public
static
final
String
COL_PRDT_CODE
=
"PRDT_CODE"
;
/* 产品编码*/
public
static
final
String
COL_PRDT_NAME
=
"PRDT_NAME"
;
/* 产品名称*/
public
static
final
String
COL_LENGTH
=
"LENGTH"
;
/* 长*/
public
static
final
String
COL_WIDTH
=
"WIDTH"
;
/* 宽*/
public
static
final
String
COL_THICK
=
"THICK"
;
/* 厚*/
public
static
final
String
COL_SPEC
=
"SPEC"
;
/* 规格*/
public
static
final
String
COL_NUM
=
"NUM"
;
/* 数量*/
public
static
final
String
COL_UNIT_WT
=
"UNIT_WT"
;
/* 单重*/
public
static
final
String
COL_TOTAL_WT
=
"TOTAL_WT"
;
/* 总重*/
...
...
@@ -88,15 +102,16 @@ public class HPSC004 extends DaoEPBase {
public
static
final
String
COL_ACTUAL_COMPLETION_DATE
=
"ACTUAL_COMPLETION_DATE"
;
/* 实际完工日期*/
public
static
final
String
COL_ACTUAL_COMPLETION_NUM
=
"ACTUAL_COMPLETION_NUM"
;
/* 实际完工数量*/
public
static
final
String
COL_ACTUAL_COMPLETION_UNIT_WT
=
"ACTUAL_COMPLETION_UNIT_WT"
;
/* 实际完工重量*/
public
static
final
String
COL_
PRODUCTION_ORDER_NO
=
"PRODUCTION_ORDER_NO"
;
/* 生产订单号
*/
public
static
final
String
COL_STATUS
=
"STATUS"
;
/* 状态 0-未
提交,1-已提交
*/
public
static
final
String
COL_
DEL_STATUS
=
"DEL_STATUS"
;
/* 状态 1未删除,0已删除
*/
public
static
final
String
COL_
INVENT_RECORD_ID
=
"INVENT_RECORD_ID"
;
/* 项目档案ID
*/
public
static
final
String
COL_STATUS
=
"STATUS"
;
/* 状态 0-未
审核,1-已审核
*/
public
static
final
String
COL_
REMARK
=
"REMARK"
;
/* 备注
*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 创建人*/
public
static
final
String
COL_CREATED_NAME
=
"CREATED_NAME"
;
/* 创建人名称*/
public
static
final
String
COL_CREATED_TIME
=
"CREATED_TIME"
;
/* 创建时间*/
public
static
final
String
COL_UPDATED_BY
=
"UPDATED_BY"
;
/* 更新人*/
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 修改人名称*/
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 更新时间*/
public
static
final
String
COL_REMARK
=
"REMARK"
;
/* 备注*/
public
static
final
String
COL_INVENT_RECORD_ID
=
"INVENT_RECORD_ID"
;
public
static
final
String
COL_DEL_STATUS
=
"DEL_STATUS"
;
/* 状态:0未删除,1已删除*/
public
static
final
String
QUERY
=
"HPSC004.query"
;
public
static
final
String
COUNT
=
"HPSC004.count"
;
...
...
@@ -104,20 +119,27 @@ public class HPSC004 extends DaoEPBase {
public
static
final
String
UPDATE
=
"HPSC004.update"
;
public
static
final
String
DELETE
=
"HPSC004.delete"
;
private
Long
id
=
new
Long
(
0
)
;
private
Long
id
;
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
private
String
deptCode
=
" "
;
/* 部门编码 预留*/
private
String
projCode
=
" "
;
/* 项目编码*/
private
String
projName
=
" "
;
/* 项目名称*/
private
String
parentId
=
" "
;
/* 父节点-部件编码*/
private
String
parentPrdtName
=
" "
;
/* 父节点-部件名称*/
private
Long
matId
;
/* 材料ID*/
private
String
parentId
=
" "
;
/* 父节点-产品编码*/
private
String
parentPrdtName
=
" "
;
/* 父节点-产品名称*/
private
String
prodOrderNo
=
" "
;
/* 生产订单号*/
private
String
produtionOrderNo
=
" "
;
/* 生产订单号*/
private
String
type
=
" "
;
/* 类别*/
private
String
leaf
=
"1"
;
/* 是否有叶子节点*/
private
String
sort
=
" "
;
/* 排序字段*/
private
String
icon
=
" "
;
/* 图片地址*/
private
Integer
prdtType
=
0
;
/*部件类型*/
private
String
prdtCode
=
" "
;
/* 部件编码*/
private
String
prdtName
=
" "
;
/* 部件名称*/
private
Integer
prdtType
;
/* 产品类型*/
private
String
prdtCode
=
" "
;
/* 产品编码*/
private
String
prdtName
=
" "
;
/* 产品名称*/
private
BigDecimal
length
=
new
BigDecimal
(
"0"
);
/* 长*/
private
BigDecimal
width
=
new
BigDecimal
(
"0"
);
/* 宽*/
private
BigDecimal
thick
=
new
BigDecimal
(
"0"
);
/* 厚*/
private
String
spec
=
" "
;
/* 规格*/
private
BigDecimal
num
=
new
BigDecimal
(
0.000
);
/* 数量*/
private
BigDecimal
unitWt
=
new
BigDecimal
(
0.000
);
/* 单重*/
private
BigDecimal
totalWt
=
new
BigDecimal
(
0.000
);
/* 总重*/
...
...
@@ -129,23 +151,18 @@ public class HPSC004 extends DaoEPBase {
private
String
planCommentDate
=
" "
;
/* 计划开始时间*/
private
String
planCompletionDate
=
" "
;
/* 计划结束时间*/
private
String
actualCompletionDate
=
" "
;
/* 实际完工日期*/
private
BigDecimal
actualCompletionNum
=
new
BigDecimal
(
0.000
);
/* 实际完工数量*/
private
BigDecimal
actualCompletionUnitWt
=
new
BigDecimal
(
0.000
);
/* 实际完工重量*/
private
String
productionOrderNo
=
" "
;
/* 生产订单号
*/
private
Integer
status
=
new
Integer
(
0
);
/* 状态 0-未提交,1-已提交
*/
private
Integer
delStatus
=
new
Integer
(
0
);
/* 状态 1未删除,0已删除
*/
private
BigDecimal
actualCompletionNum
=
new
BigDecimal
(
"0"
);
/* 实际完工数量*/
private
BigDecimal
actualCompletionUnitWt
=
new
BigDecimal
(
"0"
);
/* 实际完工重量*/
private
Long
inventRecordId
;
/* 项目档案ID
*/
private
Integer
status
;
/* 状态 0-未审核,1-已审核
*/
private
String
remark
=
" "
;
/* 备注
*/
private
String
createdBy
=
" "
;
/* 创建人*/
private
String
createdTime
;
/* 创建时间*/
private
String
createdName
=
" "
;
/* 创建人名称*/
private
String
createdTime
=
" "
;
/* 创建时间*/
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedTime
;
/* 更新时间*/
private
String
remark
=
" "
;
/* 备注*/
private
Long
inventRecordId
=
new
Long
(
0
);
private
String
spec
=
" "
;
/* 规格*/
private
BigDecimal
length
=
new
BigDecimal
(
0.00
);
/* 长*/
private
BigDecimal
width
=
new
BigDecimal
(
0.00
);
/* 宽*/
private
BigDecimal
thick
=
new
BigDecimal
(
0.00
);
/* 厚*/
private
String
updatedName
=
" "
;
/* 修改人名称*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
Integer
delStatus
;
/* 状态:0未删除,1已删除*/
/**
* initialize the metadata.
...
...
@@ -174,12 +191,24 @@ public class HPSC004 extends DaoEPBase {
eiColumn
.
setDescName
(
"项目名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_MAT_ID
);
eiColumn
.
setDescName
(
"材料ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PARENT_ID
);
eiColumn
.
setDescName
(
"父节点-
部件
编码"
);
eiColumn
.
setDescName
(
"父节点-
产品
编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PARENT_PRDT_NAME
);
eiColumn
.
setDescName
(
"父节点-部件名称"
);
eiColumn
.
setDescName
(
"父节点-产品名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PROD_ORDER_NO
);
eiColumn
.
setDescName
(
"生产订单号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRODUTION_ORDER_NO
);
eiColumn
.
setDescName
(
"生产订单号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_TYPE
);
...
...
@@ -199,18 +228,46 @@ public class HPSC004 extends DaoEPBase {
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRDT_TYPE
);
eiColumn
.
setDescName
(
"
部件
类型"
);
eiColumn
.
setDescName
(
"
产品
类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRDT_CODE
);
eiColumn
.
setDescName
(
"
部件
编码"
);
eiColumn
.
setDescName
(
"
产品
编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRDT_NAME
);
eiColumn
.
setDescName
(
"部件名称"
);
eiColumn
.
setDescName
(
"产品名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_LENGTH
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"长"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_WIDTH
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"宽"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_THICK
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"厚"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SPEC
);
eiColumn
.
setDescName
(
"规格"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_NUM
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setDescName
(
"数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -261,6 +318,9 @@ public class HPSC004 extends DaoEPBase {
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ACTUAL_COMPLETION_NUM
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setDescName
(
"实际完工数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -271,22 +331,26 @@ public class HPSC004 extends DaoEPBase {
eiColumn
.
setDescName
(
"实际完工重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_
PRODUCTION_ORDER_NO
);
eiColumn
.
setDescName
(
"
生产订单号
"
);
eiColumn
=
new
EiColumn
(
FIELD_
INVENT_RECORD_ID
);
eiColumn
.
setDescName
(
"
项目档案ID
"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"状态 0-未
提交,1-已提交
"
);
eiColumn
.
setDescName
(
"状态 0-未
审核,1-已审核
"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_
DEL_STATUS
);
eiColumn
.
setDescName
(
"
状态 1未删除,0已删除
"
);
eiColumn
=
new
EiColumn
(
FIELD_
REMARK
);
eiColumn
.
setDescName
(
"
备注
"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_BY
);
eiColumn
.
setDescName
(
"创建人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_NAME
);
eiColumn
.
setDescName
(
"创建人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_TIME
);
eiColumn
.
setDescName
(
"创建时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -295,42 +359,18 @@ public class HPSC004 extends DaoEPBase {
eiColumn
.
setDescName
(
"更新人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_TIME
);
eiColumn
.
setDescName
(
"更新时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_REMARK
);
eiColumn
.
setDescName
(
"备注"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_RECORD_ID
);
eiColumn
.
setDescName
(
"项目档案ID"
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_NAME
);
eiColumn
.
setDescName
(
"修改人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"spec"
);
eiColumn
.
setDescName
(
"
规格
"
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_TIME
);
eiColumn
.
setDescName
(
"
更新时间
"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"length"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"长"
);
eiColumn
=
new
EiColumn
(
FIELD_DEL_STATUS
);
eiColumn
.
setDescName
(
"状态:0未删除,1已删除"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"width"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"宽"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"thick"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"厚"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
...
...
@@ -422,7 +462,23 @@ public class HPSC004 extends DaoEPBase {
this
.
projName
=
projName
;
}
/**
* get the parentId - 父节点-部件编码.
* get the matId - 材料ID.
* @return the matId
*/
public
Long
getMatId
()
{
return
this
.
matId
;
}
/**
* set the matId - 材料ID.
*
* @param matId - 材料ID
*/
public
void
setMatId
(
Long
matId
)
{
this
.
matId
=
matId
;
}
/**
* get the parentId - 父节点-产品编码.
* @return the parentId
*/
public
String
getParentId
()
{
...
...
@@ -430,15 +486,15 @@ public class HPSC004 extends DaoEPBase {
}
/**
* set the parentId - 父节点-
部件
编码.
* set the parentId - 父节点-
产品
编码.
*
* @param parentId - 父节点-
部件
编码
* @param parentId - 父节点-
产品
编码
*/
public
void
setParentId
(
String
parentId
)
{
this
.
parentId
=
parentId
;
}
/**
* get the parentPrdtName - 父节点-
部件
名称.
* get the parentPrdtName - 父节点-
产品
名称.
* @return the parentPrdtName
*/
public
String
getParentPrdtName
()
{
...
...
@@ -446,14 +502,46 @@ public class HPSC004 extends DaoEPBase {
}
/**
* set the parentPrdtName - 父节点-
部件
名称.
* set the parentPrdtName - 父节点-
产品
名称.
*
* @param parentPrdtName - 父节点-
部件
名称
* @param parentPrdtName - 父节点-
产品
名称
*/
public
void
setParentPrdtName
(
String
parentPrdtName
)
{
this
.
parentPrdtName
=
parentPrdtName
;
}
/**
* get the prodOrderNo - 生产订单号.
* @return the prodOrderNo
*/
public
String
getProdOrderNo
()
{
return
this
.
prodOrderNo
;
}
/**
* set the prodOrderNo - 生产订单号.
*
* @param prodOrderNo - 生产订单号
*/
public
void
setProdOrderNo
(
String
prodOrderNo
)
{
this
.
prodOrderNo
=
prodOrderNo
;
}
/**
* get the produtionOrderNo - 生产订单号.
* @return the produtionOrderNo
*/
public
String
getProdutionOrderNo
()
{
return
this
.
produtionOrderNo
;
}
/**
* set the produtionOrderNo - 生产订单号.
*
* @param produtionOrderNo - 生产订单号
*/
public
void
setProdutionOrderNo
(
String
produtionOrderNo
)
{
this
.
produtionOrderNo
=
produtionOrderNo
;
}
/**
* get the type - 类别.
* @return the type
*/
...
...
@@ -518,23 +606,23 @@ public class HPSC004 extends DaoEPBase {
this
.
icon
=
icon
;
}
/**
* get the prdt
Code - 部件编码
.
* @return the prdt
Cod
e
* get the prdt
Type - 产品类型
.
* @return the prdt
Typ
e
*/
public
Integer
getPrdtType
()
{
return
this
.
prdtType
;
}
/**
* set the prdt
Code - 部件编码
.
* set the prdt
Type - 产品类型
.
*
* @param prdt
Code - 部件编码
* @param prdt
Type - 产品类型
*/
public
void
setPrdtType
(
Integer
prdtType
)
{
this
.
prdtType
=
prdtType
;
}
/**
* get the prdtCode -
部件
编码.
* get the prdtCode -
产品
编码.
* @return the prdtCode
*/
public
String
getPrdtCode
()
{
...
...
@@ -542,15 +630,15 @@ public class HPSC004 extends DaoEPBase {
}
/**
* set the prdtCode -
部件
编码.
* set the prdtCode -
产品
编码.
*
* @param prdtCode -
部件
编码
* @param prdtCode -
产品
编码
*/
public
void
setPrdtCode
(
String
prdtCode
)
{
this
.
prdtCode
=
prdtCode
;
}
/**
* get the prdtName -
部件
名称.
* get the prdtName -
产品
名称.
* @return the prdtName
*/
public
String
getPrdtName
()
{
...
...
@@ -558,14 +646,78 @@ public class HPSC004 extends DaoEPBase {
}
/**
* set the prdtName -
部件
名称.
* set the prdtName -
产品
名称.
*
* @param prdtName -
部件
名称
* @param prdtName -
产品
名称
*/
public
void
setPrdtName
(
String
prdtName
)
{
this
.
prdtName
=
prdtName
;
}
/**
* get the length - 长.
* @return the length
*/
public
BigDecimal
getLength
()
{
return
this
.
length
;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public
void
setLength
(
BigDecimal
length
)
{
this
.
length
=
length
;
}
/**
* get the width - 宽.
* @return the width
*/
public
BigDecimal
getWidth
()
{
return
this
.
width
;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public
void
setWidth
(
BigDecimal
width
)
{
this
.
width
=
width
;
}
/**
* get the thick - 厚.
* @return the thick
*/
public
BigDecimal
getThick
()
{
return
this
.
thick
;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public
void
setThick
(
BigDecimal
thick
)
{
this
.
thick
=
thick
;
}
/**
* get the spec - 规格.
* @return the spec
*/
public
String
getSpec
()
{
return
this
.
spec
;
}
/**
* set the spec - 规格.
*
* @param spec - 规格
*/
public
void
setSpec
(
String
spec
)
{
this
.
spec
=
spec
;
}
/**
* get the num - 数量.
* @return the num
*/
...
...
@@ -774,23 +926,23 @@ public class HPSC004 extends DaoEPBase {
this
.
actualCompletionUnitWt
=
actualCompletionUnitWt
;
}
/**
* get the
productionOrderNo - 生产订单号
.
* @return the
productionOrderNo
* get the
inventRecordId - 项目档案ID
.
* @return the
inventRecordId
*/
public
String
getProductionOrderNo
()
{
return
this
.
productionOrderNo
;
public
Long
getInventRecordId
()
{
return
this
.
inventRecordId
;
}
/**
* set the
productionOrderNo - 生产订单号
.
* set the
inventRecordId - 项目档案ID
.
*
* @param
productionOrderNo - 生产订单号
* @param
inventRecordId - 项目档案ID
*/
public
void
set
ProductionOrderNo
(
String
productionOrderNo
)
{
this
.
productionOrderNo
=
productionOrderNo
;
public
void
set
InventRecordId
(
Long
inventRecordId
)
{
this
.
inventRecordId
=
inventRecordId
;
}
/**
* get the status - 状态 0-未
提交,1-已提交
.
* get the status - 状态 0-未
审核,1-已审核
.
* @return the status
*/
public
Integer
getStatus
()
{
...
...
@@ -798,28 +950,28 @@ public class HPSC004 extends DaoEPBase {
}
/**
* set the status - 状态 0-未
提交,1-已提交
.
* set the status - 状态 0-未
审核,1-已审核
.
*
* @param status - 状态 0-未
提交,1-已提交
* @param status - 状态 0-未
审核,1-已审核
*/
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
/**
* get the
delStatus - 状态 1未删除,0已删除
.
* @return the
delStatus
* get the
remark - 备注
.
* @return the
remark
*/
public
Integer
getDelStatus
()
{
return
this
.
delStatus
;
public
String
getRemark
()
{
return
this
.
remark
;
}
/**
* set the
delStatus - 状态 1未删除,0已删除
.
* set the
remark - 备注
.
*
* @param
delStatus - 状态 1未删除,0已删除
* @param
remark - 备注
*/
public
void
set
DelStatus
(
Integer
delStatus
)
{
this
.
delStatus
=
delStatus
;
public
void
set
Remark
(
String
remark
)
{
this
.
remark
=
remark
;
}
/**
* get the createdBy - 创建人.
...
...
@@ -838,6 +990,22 @@ public class HPSC004 extends DaoEPBase {
this
.
createdBy
=
createdBy
;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public
String
getCreatedName
()
{
return
this
.
createdName
;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public
void
setCreatedName
(
String
createdName
)
{
this
.
createdName
=
createdName
;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
...
...
@@ -870,114 +1038,52 @@ public class HPSC004 extends DaoEPBase {
this
.
updatedBy
=
updatedBy
;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public
String
getUpdatedTime
()
{
return
this
.
updatedTime
;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public
void
setUpdatedTime
(
String
updatedTime
)
{
this
.
updatedTime
=
updatedTime
;
}
/**
* get the remark - 备注.
* @return the remark
* get the updatedName - 修改人名称.
* @return the updatedName
*/
public
String
get
Remark
()
{
return
this
.
remark
;
public
String
get
UpdatedName
()
{
return
this
.
updatedName
;
}
/**
* set the
remark - 备注
.
* set the
updatedName - 修改人名称
.
*
* @param
remark - 备注
* @param
updatedName - 修改人名称
*/
public
void
set
Remark
(
String
remark
)
{
this
.
remark
=
remark
;
public
void
set
UpdatedName
(
String
updatedName
)
{
this
.
updatedName
=
updatedName
;
}
/**
* get the inventRecordId - 项目档案ID.
* @return the inventRecordId
*/
public
Long
getInventRecordId
()
{
return
this
.
inventRecordId
;
}
/**
* set the inventRecordId - 项目档案ID.
*
* @param inventRecordId - 项目档案ID
*/
public
void
setInventRecordId
(
Long
inventRecordId
)
{
this
.
inventRecordId
=
inventRecordId
;
}
/**
* get the sort - 规格
* @return the sort
*/
public
String
getSpec
()
{
return
this
.
spec
;
}
/**
* set the sort - 规格
*/
public
void
setSpec
(
String
spec
)
{
this
.
spec
=
spec
;
}
/**
* get the length - 长.
* @return the length
*/
public
BigDecimal
getLength
()
{
return
this
.
length
;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public
void
setLength
(
BigDecimal
length
)
{
this
.
length
=
length
;
}
/**
* get the width - 宽.
* @return the width
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public
BigDecimal
getWidth
()
{
return
this
.
width
;
public
String
getUpdatedTime
()
{
return
this
.
updatedTime
;
}
/**
* set the
width - 宽
.
* set the
updatedTime - 更新时间
.
*
* @param
width - 宽
* @param
updatedTime - 更新时间
*/
public
void
set
Width
(
BigDecimal
width
)
{
this
.
width
=
width
;
public
void
set
UpdatedTime
(
String
updatedTime
)
{
this
.
updatedTime
=
updatedTime
;
}
/**
* get the
thick - 厚
.
* @return the
thick
* get the
delStatus - 状态:0未删除,1已删除
.
* @return the
delStatus
*/
public
BigDecimal
getThick
()
{
return
this
.
thick
;
public
Integer
getDelStatus
()
{
return
this
.
delStatus
;
}
/**
* set the
thick - 厚
.
* set the
delStatus - 状态:0未删除,1已删除
.
*
* @param
thick - 厚
* @param
delStatus - 状态:0未删除,1已删除
*/
public
void
set
Thick
(
BigDecimal
thick
)
{
this
.
thick
=
thick
;
public
void
set
DelStatus
(
Integer
delStatus
)
{
this
.
delStatus
=
delStatus
;
}
/**
* get the value from Map.
...
...
@@ -992,8 +1098,11 @@ public class HPSC004 extends DaoEPBase {
setDeptCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEPT_CODE
)),
deptCode
));
setProjCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_CODE
)),
projCode
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setMatId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_MAT_ID
)),
matId
));
setParentId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PARENT_ID
)),
parentId
));
setParentPrdtName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PARENT_PRDT_NAME
)),
parentPrdtName
));
setProdOrderNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROD_ORDER_NO
)),
prodOrderNo
));
setProdutionOrderNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRODUTION_ORDER_NO
)),
produtionOrderNo
));
setType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_TYPE
)),
type
));
setLeaf
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_LEAF
)),
leaf
));
setSort
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SORT
)),
sort
));
...
...
@@ -1001,6 +1110,10 @@ public class HPSC004 extends DaoEPBase {
setPrdtType
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRDT_TYPE
)),
prdtType
));
setPrdtCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRDT_CODE
)),
prdtCode
));
setPrdtName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRDT_NAME
)),
prdtName
));
setLength
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_LENGTH
)),
length
));
setWidth
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WIDTH
)),
width
));
setThick
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_THICK
)),
thick
));
setSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SPEC
)),
spec
));
setNum
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_NUM
)),
num
));
setUnitWt
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UNIT_WT
)),
unitWt
));
setTotalWt
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_TOTAL_WT
)),
totalWt
));
...
...
@@ -1014,19 +1127,16 @@ public class HPSC004 extends DaoEPBase {
setActualCompletionDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACTUAL_COMPLETION_DATE
)),
actualCompletionDate
));
setActualCompletionNum
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACTUAL_COMPLETION_NUM
)),
actualCompletionNum
));
setActualCompletionUnitWt
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACTUAL_COMPLETION_UNIT_WT
)),
actualCompletionUnitWt
));
set
ProductionOrderNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRODUCTION_ORDER_NO
)),
productionOrderNo
));
set
InventRecordId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_RECORD_ID
)),
inventRecordId
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
set
DelStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEL_STATUS
)),
delStatus
));
set
Remark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARK
)),
remark
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedTime
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_TIME
)));
setCreatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_NAME
)),
createdName
));
setCreatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_TIME
)),
createdTime
));
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_BY
)),
updatedBy
));
setUpdatedTime
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)));
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARK
)),
remark
));
setInventRecordId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_RECORD_ID
)),
inventRecordId
));
setSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"spec"
)),
spec
));
setLength
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
"length"
)),
length
));
setWidth
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
"width"
)),
width
));
setThick
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
"thick"
)),
thick
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setDelStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEL_STATUS
)),
delStatus
));
}
/**
...
...
@@ -1041,8 +1151,11 @@ public class HPSC004 extends DaoEPBase {
map
.
put
(
FIELD_DEPT_CODE
,
StringUtils
.
toString
(
deptCode
,
eiMetadata
.
getMeta
(
FIELD_DEPT_CODE
)));
map
.
put
(
FIELD_PROJ_CODE
,
StringUtils
.
toString
(
projCode
,
eiMetadata
.
getMeta
(
FIELD_PROJ_CODE
)));
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
FIELD_MAT_ID
,
StringUtils
.
toString
(
matId
,
eiMetadata
.
getMeta
(
FIELD_MAT_ID
)));
map
.
put
(
FIELD_PARENT_ID
,
StringUtils
.
toString
(
parentId
,
eiMetadata
.
getMeta
(
FIELD_PARENT_ID
)));
map
.
put
(
FIELD_PARENT_PRDT_NAME
,
StringUtils
.
toString
(
parentPrdtName
,
eiMetadata
.
getMeta
(
FIELD_PARENT_PRDT_NAME
)));
map
.
put
(
FIELD_PROD_ORDER_NO
,
StringUtils
.
toString
(
prodOrderNo
,
eiMetadata
.
getMeta
(
FIELD_PROD_ORDER_NO
)));
map
.
put
(
FIELD_PRODUTION_ORDER_NO
,
StringUtils
.
toString
(
produtionOrderNo
,
eiMetadata
.
getMeta
(
FIELD_PRODUTION_ORDER_NO
)));
map
.
put
(
FIELD_TYPE
,
StringUtils
.
toString
(
type
,
eiMetadata
.
getMeta
(
FIELD_TYPE
)));
map
.
put
(
FIELD_LEAF
,
StringUtils
.
toString
(
leaf
,
eiMetadata
.
getMeta
(
FIELD_LEAF
)));
map
.
put
(
FIELD_SORT
,
StringUtils
.
toString
(
sort
,
eiMetadata
.
getMeta
(
FIELD_SORT
)));
...
...
@@ -1050,6 +1163,10 @@ public class HPSC004 extends DaoEPBase {
map
.
put
(
FIELD_PRDT_TYPE
,
StringUtils
.
toString
(
prdtType
,
eiMetadata
.
getMeta
(
FIELD_PRDT_TYPE
)));
map
.
put
(
FIELD_PRDT_CODE
,
StringUtils
.
toString
(
prdtCode
,
eiMetadata
.
getMeta
(
FIELD_PRDT_CODE
)));
map
.
put
(
FIELD_PRDT_NAME
,
StringUtils
.
toString
(
prdtName
,
eiMetadata
.
getMeta
(
FIELD_PRDT_NAME
)));
map
.
put
(
FIELD_LENGTH
,
StringUtils
.
toString
(
length
,
eiMetadata
.
getMeta
(
FIELD_LENGTH
)));
map
.
put
(
FIELD_WIDTH
,
StringUtils
.
toString
(
width
,
eiMetadata
.
getMeta
(
FIELD_WIDTH
)));
map
.
put
(
FIELD_THICK
,
StringUtils
.
toString
(
thick
,
eiMetadata
.
getMeta
(
FIELD_THICK
)));
map
.
put
(
FIELD_SPEC
,
StringUtils
.
toString
(
spec
,
eiMetadata
.
getMeta
(
FIELD_SPEC
)));
map
.
put
(
FIELD_NUM
,
StringUtils
.
toString
(
num
,
eiMetadata
.
getMeta
(
FIELD_NUM
)));
map
.
put
(
FIELD_UNIT_WT
,
StringUtils
.
toString
(
unitWt
,
eiMetadata
.
getMeta
(
FIELD_UNIT_WT
)));
map
.
put
(
FIELD_TOTAL_WT
,
StringUtils
.
toString
(
totalWt
,
eiMetadata
.
getMeta
(
FIELD_TOTAL_WT
)));
...
...
@@ -1063,19 +1180,16 @@ public class HPSC004 extends DaoEPBase {
map
.
put
(
FIELD_ACTUAL_COMPLETION_DATE
,
StringUtils
.
toString
(
actualCompletionDate
,
eiMetadata
.
getMeta
(
FIELD_ACTUAL_COMPLETION_DATE
)));
map
.
put
(
FIELD_ACTUAL_COMPLETION_NUM
,
StringUtils
.
toString
(
actualCompletionNum
,
eiMetadata
.
getMeta
(
FIELD_ACTUAL_COMPLETION_NUM
)));
map
.
put
(
FIELD_ACTUAL_COMPLETION_UNIT_WT
,
StringUtils
.
toString
(
actualCompletionUnitWt
,
eiMetadata
.
getMeta
(
FIELD_ACTUAL_COMPLETION_UNIT_WT
)));
map
.
put
(
FIELD_
PRODUCTION_ORDER_NO
,
StringUtils
.
toString
(
productionOrderNo
,
eiMetadata
.
getMeta
(
FIELD_PRODUCTION_ORDER_NO
)));
map
.
put
(
FIELD_
INVENT_RECORD_ID
,
StringUtils
.
toString
(
inventRecordId
,
eiMetadata
.
getMeta
(
FIELD_INVENT_RECORD_ID
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
map
.
put
(
FIELD_
DEL_STATUS
,
StringUtils
.
toString
(
delStatus
,
eiMetadata
.
getMeta
(
FIELD_DEL_STATUS
)));
map
.
put
(
FIELD_
REMARK
,
StringUtils
.
toString
(
remark
,
eiMetadata
.
getMeta
(
FIELD_REMARK
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
map
.
put
(
FIELD_CREATED_NAME
,
StringUtils
.
toString
(
createdName
,
eiMetadata
.
getMeta
(
FIELD_CREATED_NAME
)));
map
.
put
(
FIELD_CREATED_TIME
,
StringUtils
.
toString
(
createdTime
,
eiMetadata
.
getMeta
(
FIELD_CREATED_TIME
)));
map
.
put
(
FIELD_UPDATED_BY
,
StringUtils
.
toString
(
updatedBy
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_BY
)));
map
.
put
(
FIELD_UPDATED_NAME
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_NAME
)));
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_REMARK
,
StringUtils
.
toString
(
remark
,
eiMetadata
.
getMeta
(
FIELD_REMARK
)));
map
.
put
(
FIELD_INVENT_RECORD_ID
,
StringUtils
.
toString
(
inventRecordId
,
eiMetadata
.
getMeta
(
FIELD_INVENT_RECORD_ID
)));
map
.
put
(
"spec"
,
StringUtils
.
toString
(
spec
,
eiMetadata
.
getMeta
(
"spec"
)));
map
.
put
(
"length"
,
StringUtils
.
toString
(
length
,
eiMetadata
.
getMeta
(
"length"
)));
map
.
put
(
"width"
,
StringUtils
.
toString
(
width
,
eiMetadata
.
getMeta
(
"width"
)));
map
.
put
(
"thick"
,
StringUtils
.
toString
(
thick
,
eiMetadata
.
getMeta
(
"thick"
)));
map
.
put
(
FIELD_DEL_STATUS
,
StringUtils
.
toString
(
delStatus
,
eiMetadata
.
getMeta
(
FIELD_DEL_STATUS
)));
return
map
;
}
...
...
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC005.java
View file @
69bea29a
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
domain
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
java.math.BigDecimal
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.baosight.iplat4j.core.util.StringUtils
;
/**
* Project: <br>
...
...
@@ -16,16 +17,16 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-02-
05 14:06:35
create
* @history 2024-02-
22 10:52:56
create
*/
public
class
HPSC005
extends
DaoEPBase
{
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_COMPANY_CODE
=
"companyCode"
;
/* 企业编码 预留*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_PROD
UCTION_ORDER_NO
=
"production
OrderNo"
;
/* 生产订单号*/
public
static
final
String
FIELD_PROD
_ORDER_NO
=
"prod
OrderNo"
;
/* 生产订单号*/
public
static
final
String
FIELD_PROJ_CODE
=
"projCode"
;
/* 项目编码*/
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_PRDT_TYPE
=
"prdtType"
;
/* 产品类型*/
...
...
@@ -68,11 +69,11 @@ public class HPSC005 extends DaoEPBase {
public
static
final
String
FIELD_FILE_PATH4
=
"filePath4"
;
/* 文件地址4*/
public
static
final
String
FIELD_FILE_PATH5
=
"filePath5"
;
/* 文件地址5*/
public
static
final
String
FIELD_INVENT_RECORD_ID
=
"inventRecordId"
;
/* 存货档案ID*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码 预留*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
public
static
final
String
COL_PROD
UCTION_ORDER_NO
=
"PRODUCTION
_ORDER_NO"
;
/* 生产订单号*/
public
static
final
String
COL_PROD
_ORDER_NO
=
"PROD
_ORDER_NO"
;
/* 生产订单号*/
public
static
final
String
COL_PROJ_CODE
=
"PROJ_CODE"
;
/* 项目编码*/
public
static
final
String
COL_PROJ_NAME
=
"PROJ_NAME"
;
/* 项目名称*/
public
static
final
String
COL_PRDT_TYPE
=
"PRDT_TYPE"
;
/* 产品类型*/
...
...
@@ -115,17 +116,17 @@ public class HPSC005 extends DaoEPBase {
public
static
final
String
COL_FILE_PATH4
=
"FILE_PATH4"
;
/* 文件地址4*/
public
static
final
String
COL_FILE_PATH5
=
"FILE_PATH5"
;
/* 文件地址5*/
public
static
final
String
COL_INVENT_RECORD_ID
=
"INVENT_RECORD_ID"
;
/* 存货档案ID*/
public
static
final
String
QUERY
=
"HPSC005.query"
;
public
static
final
String
COUNT
=
"HPSC005.count"
;
public
static
final
String
INSERT
=
"HPSC005.insert"
;
public
static
final
String
UPDATE
=
"HPSC005.update"
;
public
static
final
String
DELETE
=
"HPSC005.delete"
;
private
Long
id
;
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
String
prod
uction
OrderNo
=
" "
;
/* 生产订单号*/
private
String
prodOrderNo
=
" "
;
/* 生产订单号*/
private
String
projCode
=
" "
;
/* 项目编码*/
private
String
projName
=
" "
;
/* 项目名称*/
private
Integer
prdtType
;
/* 产品类型*/
...
...
@@ -153,7 +154,7 @@ public class HPSC005 extends DaoEPBase {
private
String
factoryName
=
" "
;
/* 厂区名称*/
private
String
orgNo
=
" "
;
/* 生产组编码*/
private
String
orgName
=
" "
;
/* 生产组名称*/
private
Boolean
documentType
;
/* 单据类型 0-非子母单;1-子母单*/
private
Integer
documentType
;
/* 单据类型 0-非子母单;1-子母单*/
private
String
remark
=
" "
;
/* 备注*/
private
String
remark1
=
" "
;
/* 备注*/
private
String
createdBy
=
" "
;
/* 创建人*/
...
...
@@ -167,242 +168,242 @@ public class HPSC005 extends DaoEPBase {
private
String
filePath3
=
" "
;
/* 文件地址3*/
private
String
filePath4
=
" "
;
/* 文件地址4*/
private
String
filePath5
=
" "
;
/* 文件地址5*/
private
Long
inventRecordId
;
/* 存货档案ID*/
private
Long
inventRecordId
;
/* 存货档案ID*/
/**
* initialize the metadata.
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
FIELD_ID
);
eiColumn
.
setPrimaryKey
(
true
);
eiColumn
.
setDescName
(
" "
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_CODE
);
eiColumn
.
setDescName
(
"企业编码 预留"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DEP_CODE
);
eiColumn
.
setDescName
(
"部门编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PROD
UCTION
_ORDER_NO
);
eiColumn
=
new
EiColumn
(
FIELD_PROD_ORDER_NO
);
eiColumn
.
setDescName
(
"生产订单号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_CODE
);
eiColumn
.
setDescName
(
"项目编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_NAME
);
eiColumn
.
setDescName
(
"项目名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRDT_TYPE
);
eiColumn
.
setDescName
(
"产品类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRDT_CODE
);
eiColumn
.
setDescName
(
"产品编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRDT_NAME
);
eiColumn
.
setDescName
(
"产品名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRDT_LENGTH
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"产品-长"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRDT_WIDTH
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"产品-宽"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRDT_THICK
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"产品-厚"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRDT_SPEC
);
eiColumn
.
setDescName
(
"产品规格"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PART_TYPE
);
eiColumn
.
setDescName
(
"零件类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PART_CODE
);
eiColumn
.
setDescName
(
"零件编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PART_NAME
);
eiColumn
.
setDescName
(
"零件名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PART_LENGTH
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"零件-长"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PART_WIDTH
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"零件-宽"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PART_THICK
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"零件-厚"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PART_SPEC
);
eiColumn
.
setDescName
(
"零件规格"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PLAN_COMPLETION_DATE
);
eiColumn
.
setDescName
(
"计划完成日期"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_NUM
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setDescName
(
"计划数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UNIT_WT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setDescName
(
"计划单重"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_TOTAL_WT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setDescName
(
"计划重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ASSIGNED_NUM
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setDescName
(
"已派工数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UNASSIGNED_NUM
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setDescName
(
"待派工数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"状态:0.计划中,1.不分派工,2.全部派工"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FACTORY_CODE
);
eiColumn
.
setDescName
(
"厂区编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FACTORY_NAME
);
eiColumn
.
setDescName
(
"厂区名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ORG_NO
);
eiColumn
.
setDescName
(
"生产组编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ORG_NAME
);
eiColumn
.
setDescName
(
"生产组名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOCUMENT_TYPE
);
eiColumn
.
setDescName
(
"单据类型 0-非子母单;1-子母单"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_REMARK
);
eiColumn
.
setDescName
(
"备注"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_REMARK1
);
eiColumn
.
setDescName
(
"备注"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_BY
);
eiColumn
.
setDescName
(
"创建人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_NAME
);
eiColumn
.
setDescName
(
"创建人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_TIME
);
eiColumn
.
setDescName
(
"创建时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_BY
);
eiColumn
.
setDescName
(
"更新人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_NAME
);
eiColumn
.
setDescName
(
"更新人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_TIME
);
eiColumn
.
setDescName
(
"更新时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FILE_PATH1
);
eiColumn
.
setDescName
(
"文件地址1"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FILE_PATH2
);
eiColumn
.
setDescName
(
"文件地址2"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FILE_PATH3
);
eiColumn
.
setDescName
(
"文件地址3"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FILE_PATH4
);
eiColumn
.
setDescName
(
"文件地址4"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FILE_PATH5
);
eiColumn
.
setDescName
(
"文件地址5"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_RECORD_ID
);
eiColumn
.
setDescName
(
"存货档案ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor.
*/
public
HPSC005
()
{
initMetaData
();
}
/**
* get the id .
* @return the id
...
...
@@ -410,7 +411,7 @@ public class HPSC005 extends DaoEPBase {
public
Long
getId
()
{
return
this
.
id
;
}
/**
* set the id .
*
...
...
@@ -426,7 +427,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getCompanyCode
()
{
return
this
.
companyCode
;
}
/**
* set the companyCode - 企业编码 预留.
*
...
...
@@ -442,7 +443,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getDepCode
()
{
return
this
.
depCode
;
}
/**
* set the depCode - 部门编码.
*
...
...
@@ -452,20 +453,20 @@ public class HPSC005 extends DaoEPBase {
this
.
depCode
=
depCode
;
}
/**
* get the prod
uction
OrderNo - 生产订单号.
* @return the prod
uction
OrderNo
* get the prodOrderNo - 生产订单号.
* @return the prodOrderNo
*/
public
String
getProd
uction
OrderNo
()
{
return
this
.
prod
uction
OrderNo
;
public
String
getProdOrderNo
()
{
return
this
.
prodOrderNo
;
}
/**
* set the prod
uction
OrderNo - 生产订单号.
* set the prodOrderNo - 生产订单号.
*
* @param prod
uction
OrderNo - 生产订单号
* @param prodOrderNo - 生产订单号
*/
public
void
setProd
uctionOrderNo
(
String
production
OrderNo
)
{
this
.
prod
uctionOrderNo
=
production
OrderNo
;
public
void
setProd
OrderNo
(
String
prod
OrderNo
)
{
this
.
prod
OrderNo
=
prod
OrderNo
;
}
/**
* get the projCode - 项目编码.
...
...
@@ -474,7 +475,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getProjCode
()
{
return
this
.
projCode
;
}
/**
* set the projCode - 项目编码.
*
...
...
@@ -490,7 +491,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getProjName
()
{
return
this
.
projName
;
}
/**
* set the projName - 项目名称.
*
...
...
@@ -506,7 +507,7 @@ public class HPSC005 extends DaoEPBase {
public
Integer
getPrdtType
()
{
return
this
.
prdtType
;
}
/**
* set the prdtType - 产品类型.
*
...
...
@@ -522,7 +523,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getPrdtCode
()
{
return
this
.
prdtCode
;
}
/**
* set the prdtCode - 产品编码.
*
...
...
@@ -538,7 +539,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getPrdtName
()
{
return
this
.
prdtName
;
}
/**
* set the prdtName - 产品名称.
*
...
...
@@ -554,7 +555,7 @@ public class HPSC005 extends DaoEPBase {
public
BigDecimal
getPrdtLength
()
{
return
this
.
prdtLength
;
}
/**
* set the prdtLength - 产品-长.
*
...
...
@@ -570,7 +571,7 @@ public class HPSC005 extends DaoEPBase {
public
BigDecimal
getPrdtWidth
()
{
return
this
.
prdtWidth
;
}
/**
* set the prdtWidth - 产品-宽.
*
...
...
@@ -586,7 +587,7 @@ public class HPSC005 extends DaoEPBase {
public
BigDecimal
getPrdtThick
()
{
return
this
.
prdtThick
;
}
/**
* set the prdtThick - 产品-厚.
*
...
...
@@ -602,7 +603,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getPrdtSpec
()
{
return
this
.
prdtSpec
;
}
/**
* set the prdtSpec - 产品规格.
*
...
...
@@ -618,7 +619,7 @@ public class HPSC005 extends DaoEPBase {
public
Integer
getPartType
()
{
return
this
.
partType
;
}
/**
* set the partType - 零件类型.
*
...
...
@@ -634,7 +635,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getPartCode
()
{
return
this
.
partCode
;
}
/**
* set the partCode - 零件编码.
*
...
...
@@ -650,7 +651,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getPartName
()
{
return
this
.
partName
;
}
/**
* set the partName - 零件名称.
*
...
...
@@ -666,7 +667,7 @@ public class HPSC005 extends DaoEPBase {
public
BigDecimal
getPartLength
()
{
return
this
.
partLength
;
}
/**
* set the partLength - 零件-长.
*
...
...
@@ -682,7 +683,7 @@ public class HPSC005 extends DaoEPBase {
public
BigDecimal
getPartWidth
()
{
return
this
.
partWidth
;
}
/**
* set the partWidth - 零件-宽.
*
...
...
@@ -698,7 +699,7 @@ public class HPSC005 extends DaoEPBase {
public
BigDecimal
getPartThick
()
{
return
this
.
partThick
;
}
/**
* set the partThick - 零件-厚.
*
...
...
@@ -714,7 +715,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getPartSpec
()
{
return
this
.
partSpec
;
}
/**
* set the partSpec - 零件规格.
*
...
...
@@ -730,7 +731,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getPlanCompletionDate
()
{
return
this
.
planCompletionDate
;
}
/**
* set the planCompletionDate - 计划完成日期.
*
...
...
@@ -746,7 +747,7 @@ public class HPSC005 extends DaoEPBase {
public
BigDecimal
getNum
()
{
return
this
.
num
;
}
/**
* set the num - 计划数量.
*
...
...
@@ -762,7 +763,7 @@ public class HPSC005 extends DaoEPBase {
public
BigDecimal
getUnitWt
()
{
return
this
.
unitWt
;
}
/**
* set the unitWt - 计划单重.
*
...
...
@@ -778,7 +779,7 @@ public class HPSC005 extends DaoEPBase {
public
BigDecimal
getTotalWt
()
{
return
this
.
totalWt
;
}
/**
* set the totalWt - 计划重量.
*
...
...
@@ -794,7 +795,7 @@ public class HPSC005 extends DaoEPBase {
public
BigDecimal
getAssignedNum
()
{
return
this
.
assignedNum
;
}
/**
* set the assignedNum - 已派工数量.
*
...
...
@@ -810,7 +811,7 @@ public class HPSC005 extends DaoEPBase {
public
BigDecimal
getUnassignedNum
()
{
return
this
.
unassignedNum
;
}
/**
* set the unassignedNum - 待派工数量.
*
...
...
@@ -826,7 +827,7 @@ public class HPSC005 extends DaoEPBase {
public
Integer
getStatus
()
{
return
this
.
status
;
}
/**
* set the status - 状态:0.计划中,1.不分派工,2.全部派工.
*
...
...
@@ -842,7 +843,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getFactoryCode
()
{
return
this
.
factoryCode
;
}
/**
* set the factoryCode - 厂区编码.
*
...
...
@@ -858,7 +859,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getFactoryName
()
{
return
this
.
factoryName
;
}
/**
* set the factoryName - 厂区名称.
*
...
...
@@ -874,7 +875,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getOrgNo
()
{
return
this
.
orgNo
;
}
/**
* set the orgNo - 生产组编码.
*
...
...
@@ -890,7 +891,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getOrgName
()
{
return
this
.
orgName
;
}
/**
* set the orgName - 生产组名称.
*
...
...
@@ -903,16 +904,16 @@ public class HPSC005 extends DaoEPBase {
* get the documentType - 单据类型 0-非子母单;1-子母单.
* @return the documentType
*/
public
Boolean
getDocumentType
()
{
public
Integer
getDocumentType
()
{
return
this
.
documentType
;
}
/**
* set the documentType - 单据类型 0-非子母单;1-子母单.
*
* @param documentType - 单据类型 0-非子母单;1-子母单
*/
public
void
setDocumentType
(
Boolean
documentType
)
{
public
void
setDocumentType
(
Integer
documentType
)
{
this
.
documentType
=
documentType
;
}
/**
...
...
@@ -922,7 +923,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getRemark
()
{
return
this
.
remark
;
}
/**
* set the remark - 备注.
*
...
...
@@ -938,7 +939,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getRemark1
()
{
return
this
.
remark1
;
}
/**
* set the remark1 - 备注.
*
...
...
@@ -954,7 +955,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getCreatedBy
()
{
return
this
.
createdBy
;
}
/**
* set the createdBy - 创建人.
*
...
...
@@ -970,7 +971,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getCreatedName
()
{
return
this
.
createdName
;
}
/**
* set the createdName - 创建人名称.
*
...
...
@@ -986,7 +987,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getCreatedTime
()
{
return
this
.
createdTime
;
}
/**
* set the createdTime - 创建时间.
*
...
...
@@ -1002,7 +1003,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getUpdatedBy
()
{
return
this
.
updatedBy
;
}
/**
* set the updatedBy - 更新人.
*
...
...
@@ -1018,7 +1019,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getUpdatedName
()
{
return
this
.
updatedName
;
}
/**
* set the updatedName - 更新人名称.
*
...
...
@@ -1034,7 +1035,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getUpdatedTime
()
{
return
this
.
updatedTime
;
}
/**
* set the updatedTime - 更新时间.
*
...
...
@@ -1050,7 +1051,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getFilePath1
()
{
return
this
.
filePath1
;
}
/**
* set the filePath1 - 文件地址1.
*
...
...
@@ -1066,7 +1067,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getFilePath2
()
{
return
this
.
filePath2
;
}
/**
* set the filePath2 - 文件地址2.
*
...
...
@@ -1082,7 +1083,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getFilePath3
()
{
return
this
.
filePath3
;
}
/**
* set the filePath3 - 文件地址3.
*
...
...
@@ -1098,7 +1099,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getFilePath4
()
{
return
this
.
filePath4
;
}
/**
* set the filePath4 - 文件地址4.
*
...
...
@@ -1114,7 +1115,7 @@ public class HPSC005 extends DaoEPBase {
public
String
getFilePath5
()
{
return
this
.
filePath5
;
}
/**
* set the filePath5 - 文件地址5.
*
...
...
@@ -1130,7 +1131,7 @@ public class HPSC005 extends DaoEPBase {
public
Long
getInventRecordId
()
{
return
this
.
inventRecordId
;
}
/**
* set the inventRecordId - 存货档案ID.
*
...
...
@@ -1146,11 +1147,11 @@ public class HPSC005 extends DaoEPBase {
*/
@Override
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
setCompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_CODE
)),
companyCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setProd
uctionOrderNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRODUCTION_ORDER_NO
)),
production
OrderNo
));
setProd
OrderNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROD_ORDER_NO
)),
prod
OrderNo
));
setProjCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_CODE
)),
projCode
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setPrdtType
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRDT_TYPE
)),
prdtType
));
...
...
@@ -1178,7 +1179,7 @@ public class HPSC005 extends DaoEPBase {
setFactoryName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_NAME
)),
factoryName
));
setOrgNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ORG_NO
)),
orgNo
));
setOrgName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ORG_NAME
)),
orgName
));
setDocumentType
(
NumberUtils
.
to
Boolean
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOCUMENT_TYPE
)),
documentType
));
setDocumentType
(
NumberUtils
.
to
Integer
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOCUMENT_TYPE
)),
documentType
));
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARK
)),
remark
));
setRemark1
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARK1
)),
remark1
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
...
...
@@ -1194,18 +1195,18 @@ public class HPSC005 extends DaoEPBase {
setFilePath5
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_PATH5
)),
filePath5
));
setInventRecordId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_RECORD_ID
)),
inventRecordId
));
}
/**
* set the value to Map.
*/
@Override
public
Map
toMap
()
{
Map
map
=
new
HashMap
();
map
.
put
(
FIELD_ID
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_ID
)));
map
.
put
(
FIELD_COMPANY_CODE
,
StringUtils
.
toString
(
companyCode
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_CODE
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_PROD
UCTION_ORDER_NO
,
StringUtils
.
toString
(
productionOrderNo
,
eiMetadata
.
getMeta
(
FIELD_PRODUCTION
_ORDER_NO
)));
map
.
put
(
FIELD_PROD
_ORDER_NO
,
StringUtils
.
toString
(
prodOrderNo
,
eiMetadata
.
getMeta
(
FIELD_PROD
_ORDER_NO
)));
map
.
put
(
FIELD_PROJ_CODE
,
StringUtils
.
toString
(
projCode
,
eiMetadata
.
getMeta
(
FIELD_PROJ_CODE
)));
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
FIELD_PRDT_TYPE
,
StringUtils
.
toString
(
prdtType
,
eiMetadata
.
getMeta
(
FIELD_PRDT_TYPE
)));
...
...
@@ -1248,7 +1249,7 @@ public class HPSC005 extends DaoEPBase {
map
.
put
(
FIELD_FILE_PATH4
,
StringUtils
.
toString
(
filePath4
,
eiMetadata
.
getMeta
(
FIELD_FILE_PATH4
)));
map
.
put
(
FIELD_FILE_PATH5
,
StringUtils
.
toString
(
filePath5
,
eiMetadata
.
getMeta
(
FIELD_FILE_PATH5
)));
map
.
put
(
FIELD_INVENT_RECORD_ID
,
StringUtils
.
toString
(
inventRecordId
,
eiMetadata
.
getMeta
(
FIELD_INVENT_RECORD_ID
)));
return
map
;
}
}
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
View file @
69bea29a
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
service
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.sc.domain.HPSC003
;
import
com.baosight.hpjx.hp.sc.domain.HPSC004
;
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.tools.HPSCTools
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.BeanUtils
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -27,58 +27,61 @@ import org.apache.commons.lang.StringUtils;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
cn.hutool.core.bean.BeanUtil
;
/**
*
*/
public
class
ServiceHPSC002
extends
ServiceBase
{
/**
* 画面初始化.
*/
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"itemCode"
,
"ITEM_CODE in ('2','3','4')"
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_NAME_BLOCK_ID
,
DdynamicEnum
.
CODESET_CODE_BLOCK_ID
),
map
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPSC002
().
eiMetadata
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询操作.
*/
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
/* 调用EI查询方法.*/
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"HPSC002.query"
,
new
HPSC002
());
//调用本地服务
// EiInfo eiInfo_update = new EiInfo();
// eiInfo_update.set(EiConstant.serviceName, "HPSC002");
// eiInfo_update.set(EiConstant.methodName, "delete");
// EiBlock eiBlock_update = new EiBlock(EiConstant.resultBlock);
// EiInfo outInfo_update = XLocalManager.call(eiInfo_update);
return
outInfo
;
}
/**
* 新增操作.
*/
@Override
public
EiInfo
insert
(
EiInfo
inInfo
)
{
try
{
HPSC002
hppz002
=
new
HPSC002
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"itemCode"
,
"ITEM_CODE in ('2','3','4')"
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_NAME_BLOCK_ID
,
DdynamicEnum
.
CODESET_CODE_BLOCK_ID
),
map
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPSC002
().
eiMetadata
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询操作.
*/
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
"HPSC002.query"
,
new
HPSC002
());
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* 新增操作.
*/
@Override
public
EiInfo
insert
(
EiInfo
inInfo
)
{
try
{
HPSC002
hppz002
=
new
HPSC002
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hppz002
.
fromMap
(
map
);
hppz002
.
setLeaf
(
"1"
);
...
...
@@ -104,7 +107,7 @@ public class ServiceHPSC002 extends ServiceBase {
DaoUtils
.
insert
(
"HPSC002.insert"
,
hppz002
.
toMap
());
if
(!
hppz002
.
getParentId
().
equals
(
"root"
))
{
this
.
checkTreeNodeLeaf
(
new
Long
(
hppz002
.
getParentId
()
));
this
.
checkTreeNodeLeaf
(
hppz002
.
getParentId
(
));
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
...
...
@@ -143,52 +146,67 @@ public class ServiceHPSC002 extends ServiceBase {
DaoUtils
.
update
(
"HPSC002.update"
,
hppz002
.
toMap
());
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"修改成功!"
);
inInfo
.
setMsg
(
"修改成功!"
);
}
catch
(
PlatException
e
)
{
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setMsg
(
"操作失败!原因参见详细错误描述!"
);
inInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
}
return
query
(
inInfo
);
}
/**
* 删除操作.
*/
public
EiInfo
delete
(
EiInfo
eiInfo
)
{
HPSC002
hppz002
=
new
HPSC002
();
EiBlock
eiBlock
=
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
);
try
{
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hppz002
.
fromMap
(
map
);
this
.
dao
.
delete
(
"HPSC002.delete"
,
hppz002
.
toMap
());
this
.
checkTreeNodeLeaf
(
new
Long
(
hppz002
.
getParentId
()));
//TODO 删除时 修改树结构
this
.
checkTreeNodeLeaf
(
new
Long
(
hppz002
.
getId
()));
}
}
catch
(
PlatException
e
)
{
eiInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
eiInfo
.
setMsg
(
"删除失败,原因参见详细错误描述!"
);
eiInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"删除失败!"
,
e
.
getMessage
());
return
eiInfo
;
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setMsg
(
"操作失败!原因参见详细错误描述!"
);
inInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
}
eiInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
eiInfo
.
setMsg
(
"删除成功!"
);
return
eiInfo
;
return
query
(
inInfo
);
}
/**
* 指定树节点
* @param inInfo
* @return
*/
public
EiInfo
queryTreeRoot
(
EiInfo
inInfo
)
{
Long
projId
=
NumberUtils
.
toLong
(
inInfo
.
get
(
"projId"
));
Map
queryMap
=
new
HashMap
();
/**
* 删除操作
*
* @param inInfo
* @return
*/
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 删除之前数据校验
for
(
Map
resultRow
:
resultRows
)
{
HPSC002
fSc002
=
new
HPSC002
();
fSc002
.
fromMap
(
resultRow
);
// 存在子节点不能删除
List
<
HPSC002
>
dbSc002s
=
HPSCTools
.
HpSc002
.
queryByParent
(
fSc002
.
getId
().
toString
());
AssertUtils
.
isNotEmpty
(
dbSc002s
,
String
.
format
(
"部件[%s]已存在子节点不能删除"
,
fSc002
.
getPrdtName
()));
// 计划生产中不能删除
HPSC004
dbSc004
=
HPSCTools
.
HpSc004
.
queryByMat
(
fSc002
.
getId
());
AssertUtils
.
isTrue
(
dbSc004
!=
null
&&
StringUtils
.
isNotBlank
(
dbSc004
.
getProdOrderNo
()),
String
.
format
(
"部件[%s]已派工不能删除"
,
fSc002
.
getPrdtName
()));
}
// 删除数据
for
(
Map
resultRow
:
resultRows
)
{
HPSC002
fSc002
=
new
HPSC002
();
fSc002
.
fromMap
(
resultRow
);
DaoUtils
.
update
(
"HPSC002.delete"
,
fSc002
);
// 修改父级节点状态是叶子节点或非叶子节点
this
.
checkTreeNodeLeaf
(
fSc002
.
getParentId
());
// 修改节点状态是叶子节点或非叶子节点
this
.
checkTreeNodeLeaf
(
fSc002
.
getId
().
toString
());
// 同步删除生产计划
HPSCTools
.
HpSc004
.
deleteByMat
(
fSc002
.
getId
());
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"删除失败"
);
}
return
inInfo
;
}
/**
* 指定树节点
*
* @param inInfo
* @return
*/
public
EiInfo
queryTreeRoot
(
EiInfo
inInfo
)
{
Long
projId
=
NumberUtils
.
toLong
(
inInfo
.
get
(
"projId"
));
Map
queryMap
=
new
HashMap
();
String
root
=
""
;
if
(
projId
!=
null
)
{
Map
map
=
new
HashMap
();
...
...
@@ -219,44 +237,42 @@ public class ServiceHPSC002 extends ServiceBase {
queryMap
.
put
(
"projCode"
,
projCode
);
}
}
//2 查询节点
List
rows
=
dao
.
query
(
"HPSC002.queryTree"
,
queryMap
);
//3 增加节点block块
EiInfo
outInfo
=
new
EiInfo
();
EiBlock
outBlock
=
outInfo
.
addBlock
(
BeanUtil
.
isEmpty
(
pEname
)
?
""
:
pEname
);
outBlock
.
addRows
(
rows
);
return
outInfo
;
//2 查询节点
List
rows
=
dao
.
query
(
"HPSC002.queryTree"
,
queryMap
);
//3 增加节点block块
EiInfo
outInfo
=
new
EiInfo
();
EiBlock
outBlock
=
outInfo
.
addBlock
(
BeanUtil
.
isEmpty
(
pEname
)
?
""
:
pEname
);
outBlock
.
addRows
(
rows
);
return
outInfo
;
}
/**
* 修改父级节点的LEAF状态为1
*
* @param id
*/
public
void
checkTreeNodeLeaf
(
Long
id
)
{
EiInfo
eiInfo
=
new
EiInfo
();
//1 获取参数
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"id"
,
id
);
List
rows
=
this
.
dao
.
query
(
"HPSC002.queryTreeNodeByParentPrtdCode"
,
queryMap
);
if
(
rows
.
size
()
>
0
){
queryMap
.
put
(
"leaf"
,
"0"
);
}
else
{
queryMap
.
put
(
"leaf"
,
"1"
);
}
DaoUtils
.
update
(
"HPSC002.updateTreeNodeLeaf"
,
queryMap
);
}
/**
* 提交 撤回.
*/
public
EiInfo
check
(
EiInfo
eiInfo
)
{
HPSC002
hppz002
=
new
HPSC002
();
EiBlock
eiBlock
=
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
);
try
{
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
/**
* 修改节点状态,是叶子或非叶子节点
*
* @param id
*/
public
void
checkTreeNodeLeaf
(
String
id
)
{
//1 获取参数
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"id"
,
id
);
List
rows
=
this
.
dao
.
query
(
"HPSC002.queryTreeNodeByParentPrtdCode"
,
queryMap
);
if
(
rows
.
size
()
>
0
)
{
queryMap
.
put
(
"leaf"
,
"0"
);
}
else
{
queryMap
.
put
(
"leaf"
,
"1"
);
}
DaoUtils
.
update
(
"HPSC002.updateTreeNodeLeaf"
,
queryMap
);
}
/**
* 提交 撤回.
*/
public
EiInfo
check
(
EiInfo
eiInfo
)
{
HPSC002
hppz002
=
new
HPSC002
();
EiBlock
eiBlock
=
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
);
try
{
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hppz002
.
fromMap
(
map
);
//限制一下,如果二级已经提交通过,这个时候不允许进行撤回
if
(
map
.
get
(
"status"
).
equals
(
"0"
))
{
...
...
@@ -282,7 +298,6 @@ public class ServiceHPSC002 extends ServiceBase {
if
(
num
==
0
)
{
map2
.
put
(
"status"
,
1
);
map2
.
put
(
"id"
,
THPSC002
.
getParentId
());
// 自动生成生产计划
this
.
autoPlanInfo
(
THPSC002
.
getParentId
());
}
else
{
...
...
@@ -327,110 +342,71 @@ public class ServiceHPSC002 extends ServiceBase {
eiInfo
.
setMsg
(
"提交成功!"
);
return
eiInfo
;
}
/**
* 绑定附件
*/
public
EiInfo
bindDocIdById
(
EiInfo
eiInfo
)
{
HPSC002
hppz002
=
new
HPSC002
();
EiBlock
eiBlock
=
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
);
try
{
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hppz002
.
fromMap
(
map
);
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"id"
,
hppz002
.
getId
());
sqlMap
.
put
(
"filePath1"
,
hppz002
.
getFilePath1
());
sqlMap
.
put
(
"bizType"
,
"WL"
);
DaoUtils
.
update
(
"HPSC002.bindDocIdById"
,
hppz002
.
toMap
());
}
}
catch
(
PlatException
e
)
{
eiInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
eiInfo
.
setMsg
(
"删除失败,原因参见详细错误描述!"
);
eiInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"删除失败!"
,
e
.
getMessage
());
return
eiInfo
;
}
eiInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
eiInfo
.
setMsg
(
"删除成功!"
);
return
eiInfo
;
}
/**
* 生产生产计划
* @param id 生产ID
*/
public
void
autoPlanInfo
(
String
id
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
HPSC002
dbSc002
=
(
HPSC002
)
dao
.
get
(
"HPSC002.queryEntityByParentPrtdCode"
,
"id"
,
id
);
String
SCJHD
=
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPSC003_PROD_NO
);
// 生成生产计划t_hpsc003,如果已存在就不新增
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"matId"
,
dbSc002
.
getId
());
List
<
HPSC003
>
dbSc003s
=
dao
.
query
(
HPSC003
.
QUERY
,
queryMap
);
if
(
CollectionUtils
.
isEmpty
(
dbSc003s
))
{
HPSC003
HPSC003
=
new
HPSC003
();
HPSC003
.
setCompanyCode
(
""
);
HPSC003
.
setProjType
(
null
);
HPSC003
.
setProjCode
(
dbSc002
.
getProjCode
());
HPSC003
.
setProjName
(
dbSc002
.
getProjName
());
HPSC003
.
setPlanInfoNo
(
SCJHD
);
HPSC003
.
setInventRecordId
(
dbSc002
.
getInventRecordId
());
HPSC003
.
setPrdtType
(
dbSc002
.
getPrdtType
());
HPSC003
.
setPrdtCode
(
dbSc002
.
getPrdtCode
());
HPSC003
.
setPrdtName
(
dbSc002
.
getPrdtName
());
HPSC003
.
setSpec
(
dbSc002
.
getSpec
());
HPSC003
.
setLength
(
dbSc002
.
getLength
());
HPSC003
.
setWidth
(
dbSc002
.
getWidth
());
HPSC003
.
setThick
(
dbSc002
.
getThick
());
HPSC003
.
setRemark
(
dbSc002
.
getRemark
());
HPSC003
.
setPlanCompletionDate
(
""
);
HPSC003
.
setStatus
(
0
);
HPSC003
.
setMatId
(
dbSc002
.
getId
());
DaoUtils
.
insert
(
"HPSC003.insert"
,
HPSC003
.
toMap
());
}
/**
* 绑定附件
*
* @param inInfo
* @return
*/
public
EiInfo
bindDocIdById
(
EiInfo
inInfo
)
{
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
Map
resultRow
:
resultRows
)
{
HPSC002
fSc002
=
new
HPSC002
();
fSc002
.
fromMap
(
resultRow
);
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"id"
,
fSc002
.
getId
());
sqlMap
.
put
(
"filePath1"
,
fSc002
.
getFilePath1
());
sqlMap
.
put
(
"bizType"
,
"WL"
);
DaoUtils
.
update
(
"HPSC002.bindDocIdById"
,
fSc002
.
toMap
());
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"操作失败"
);
}
return
inInfo
;
}
/**
* 生成生产计划
*
* @param id 生产ID
*/
public
void
autoPlanInfo
(
String
id
)
{
String
planNo
;
HPSC002
dbSc002
=
HPSCTools
.
HpSc002
.
get
(
Long
.
parseLong
(
id
));
// 生成生产计划t_hpsc003,如果已存在就不新增
HPSC003
dbSc003
=
HPSCTools
.
HpSc003
.
queryByMat
(
dbSc002
.
getId
());
if
(
dbSc003
==
null
)
{
planNo
=
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPSC003_PROD_NO
);
HPSC003
newSc003
=
BeanUtils
.
copy
(
dbSc002
,
HPSC003
.
class
);
newSc003
.
setPlanInfoNo
(
planNo
);
newSc003
.
setMatId
(
dbSc002
.
getId
());
newSc003
.
setStatus
(
HPConstant
.
planStatus
.
S_0
);
DaoUtils
.
insert
(
HPSC003
.
INSERT
,
newSc003
);
}
else
{
planNo
=
dbSc003
.
getPlanInfoNo
();
// 更新主计划状态为"计划中"
HPSCTools
.
HpSc003
.
updateStatus
(
dbSc003
.
getId
(),
HPConstant
.
planStatus
.
S_0
);
}
// 生产计划详情
queryMap
=
new
HashMap
();
queryMap
.
put
(
"parentId"
,
id
);
List
<
HPSC002
>
rows
=
this
.
dao
.
query
(
"HPSC002.queryEntityByParentPrtdCode"
,
queryMap
);
for
(
int
i
=
0
;
i
<
rows
.
size
();
i
++)
{
HPSC002
dbSc002Child
=
rows
.
get
(
i
);
// 明细已存在就不在新增
queryMap
=
new
HashMap
();
queryMap
.
put
(
"filePath1"
,
dbSc002Child
.
getId
());
List
<
HPSC004
>
dbSc004s
=
dao
.
query
(
HPSC004
.
QUERY
,
queryMap
);
if
(
CollectionUtils
.
isNotEmpty
(
dbSc004s
))
{
continue
;
}
HPSC004
HPSC004
=
new
HPSC004
();
HPSC004
.
setCompanyCode
(
""
);
HPSC004
.
setDeptCode
(
""
);
HPSC004
.
setProjCode
(
dbSc002Child
.
getProjCode
());
HPSC004
.
setProjName
(
dbSc002Child
.
getProjName
());
HPSC004
.
setParentId
(
SCJHD
);
HPSC004
.
setParentPrdtName
(
dbSc002Child
.
getParentPrdtName
());
HPSC004
.
setInventRecordId
(
dbSc002Child
.
getInventRecordId
());
HPSC004
.
setPrdtType
(
dbSc002Child
.
getPrdtType
());
HPSC004
.
setPrdtCode
(
dbSc002Child
.
getPrdtCode
());
HPSC004
.
setPrdtName
(
dbSc002Child
.
getPrdtName
());
HPSC004
.
setSpec
(
dbSc002Child
.
getSpec
());
HPSC004
.
setLength
(
dbSc002Child
.
getLength
());
HPSC004
.
setWidth
(
dbSc002Child
.
getWidth
());
HPSC004
.
setThick
(
dbSc002Child
.
getThick
());
HPSC004
.
setRemark
(
dbSc002Child
.
getRemark
());
HPSC004
.
setNum
(
dbSc002Child
.
getNum
());
HPSC004
.
setUnitWt
(
dbSc002Child
.
getUnitWt
());
HPSC004
.
setTotalWt
(
dbSc002Child
.
getTotalWt
());
HPSC004
.
setFilePath1
(
dbSc002Child
.
getId
().
toString
());
HPSC004
.
setPlanCommentDate
(
""
);
HPSC004
.
setPlanCompletionDate
(
""
);
HPSC004
.
setActualCompletionNum
(
NumberUtils
.
toBigDecimal
(
0.00
));
HPSC004
.
setActualCompletionUnitWt
(
NumberUtils
.
toBigDecimal
(
0.00
));
HPSC004
.
setActualCompletionDate
(
""
);
HPSC004
.
setDelStatus
(
0
);
DaoUtils
.
insert
(
"HPSC004.insert"
,
HPSC004
.
toMap
());
}
List
<
HPSC002
>
dbSc002Children
=
HPSCTools
.
HpSc002
.
queryByParent
(
id
);
for
(
HPSC002
dbSc002Child
:
dbSc002Children
)
{
// 明细已存在就不在新增
HPSC004
dbSc004
=
HPSCTools
.
HpSc004
.
queryByMat
(
dbSc002Child
.
getId
());
if
(
dbSc004
!=
null
)
{
continue
;
}
HPSC004
newSc004
=
BeanUtils
.
copy
(
dbSc002Child
,
HPSC004
.
class
);
newSc004
.
setParentId
(
planNo
);
newSc004
.
setMatId
(
dbSc002Child
.
getId
());
newSc004
.
setFilePath1
(
dbSc002Child
.
getId
().
toString
());
newSc004
.
setDelStatus
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HPSC004
.
INSERT
,
newSc004
);
}
}
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC003.java
View file @
69bea29a
...
...
@@ -2,13 +2,20 @@ package com.baosight.hpjx.hp.sc.service;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.common.HPConstants
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.constant.HPSqlConstant
;
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.tools.HPSCTools
;
import
com.baosight.hpjx.util.BeanUtils
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.StringUtils
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
...
...
@@ -52,8 +59,6 @@ public class ServiceHPSC003 extends ServiceBase {
*/
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
HPSC003
HPSC003
=
new
HPSC003
();
/* 调用EI查询方法.*/
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"HPSC003.query"
,
new
HPSC003
());
EiBlock
blcok
=
outInfo
.
addBlock
(
HPConstants
.
BLOCK_DETAIL
);
blcok
.
setBlockMeta
(
new
HPSC004
().
eiMetadata
);
...
...
@@ -118,79 +123,39 @@ public class ServiceHPSC003 extends ServiceBase {
}
return
query
(
inInfo
);
}
public
EiInfo
updateHPSC0004
(
EiInfo
inInfo
)
{
try
{
HPSC004
HPSC004
=
new
HPSC004
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
"detail"
);
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HPSC004
.
fromMap
(
map
);
DaoUtils
.
update
(
"HPSC004.updateHPSC0004"
,
HPSC004
.
toMap
());
List
list
=
this
.
dao
.
query
(
"HPSC004.query"
,
new
HashMap
<
String
,
Object
>(){{
put
(
"companyCode"
,
HPSC004
.
getCompanyCode
());
put
(
"projCode"
,
HPSC004
.
getProjCode
());
put
(
"parentId"
,
HPSC004
.
getParentId
());
put
(
"planCommentDate"
,
" "
);
put
(
"planCompletionDate"
,
" "
);
}});
if
(
list
.
size
()
==
0
)
{
List
<
HPSC004
>
list1
=
this
.
dao
.
query
(
"HPSC004.queryDate"
,
new
HashMap
<
String
,
Object
>(){{
put
(
"companyCode"
,
HPSC004
.
getCompanyCode
());
put
(
"projCode"
,
HPSC004
.
getProjCode
());
put
(
"parentId"
,
HPSC004
.
getParentId
());
}});
HPSC003
HPSC003
=
new
HPSC003
();
HPSC003
.
setCompanyCode
(
HPSC004
.
getCompanyCode
());
HPSC003
.
setProjCode
(
HPSC004
.
getProjCode
());
HPSC003
.
setPlanInfoNo
(
HPSC004
.
getParentId
());
HPSC003
.
setPlanCompletionDate
(
list1
.
get
(
0
).
getPlanCompletionDate
());
DaoUtils
.
update
(
"HPSC003.updateDate"
,
HPSC003
.
toMap
());
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"修改成功!"
);
inInfo
.
set
(
"parentId"
,
HPSC004
.
getParentId
());
inInfo
.
set
(
EiConstant
.
serviceName
,
"HPSC004"
);
inInfo
.
set
(
EiConstant
.
methodName
,
"queryDetail"
);
EiInfo
detailInfo
=
XLocalManager
.
call
(
inInfo
);
inInfo
.
getBlock
(
"detail"
).
setRows
(
detailInfo
.
getBlock
(
"detail"
).
getRows
());
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
setRows
(
query
(
inInfo
).
getBlock
(
EiConstant
.
resultBlock
).
getRows
());
}
catch
(
PlatException
e
)
{
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setMsg
(
"操作失败!原因参见详细错误描述!"
);
inInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
}
return
inInfo
;
}
/**
* 删除操作.
*/
public
EiInfo
delete
(
EiInfo
eiInfo
)
{
HPSC003
HPSC003
=
new
HPSC003
();
EiBlock
eiBlock
=
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
);
/**
* 修改计划明细
*
* @param inInfo
* @return
*/
public
EiInfo
updatePlanDetail
(
EiInfo
inInfo
)
{
try
{
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HPSC003
.
fromMap
(
map
);
this
.
dao
.
delete
(
"HPSC003.delete"
,
HPSC003
.
toMap
());
}
}
catch
(
PlatException
e
)
{
eiInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
eiInfo
.
setMsg
(
"删除失败,原因参见详细错误描述!"
);
eiInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"删除失败!"
,
e
.
getMessage
());
return
eiInfo
;
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
CommonConstant
.
Field
.
DETAIL
).
getRows
();
String
parentId
=
null
;
for
(
Map
resultRow
:
resultRows
)
{
HPSC004
fSc004
=
new
HPSC004
();
fSc004
.
fromMap
(
resultRow
);
parentId
=
fSc004
.
getParentId
();
// 更新计划明细完工时间
fSc004
.
setPlanCommentDate
(
DateUtils
.
formatShort
(
fSc004
.
getPlanCommentDate
()));
fSc004
.
setPlanCompletionDate
(
DateUtils
.
formatShort
(
fSc004
.
getPlanCompletionDate
()));
DaoUtils
.
update
(
HPSqlConstant
.
HPSC004
.
UPDATE_PLAN_DATE
,
fSc004
);
}
// 更新主计划完工时间
List
<
HPSC004
>
dbSc004s
=
HPSCTools
.
HpSc004
.
queryByParent
(
parentId
);
String
maxPlanCompletionDate
=
dbSc004s
.
stream
().
map
(
HPSC004:
:
getPlanCompletionDate
).
max
(
String:
:
compareTo
)
.
orElse
(
""
);
HPSCTools
.
HpSc003
.
updateDate
(
parentId
,
maxPlanCompletionDate
);
// 刷新明细数据
inInfo
.
getBlock
(
CommonConstant
.
Field
.
DETAIL
).
setRows
(
dbSc004s
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据新增成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"新增失败"
);
}
eiInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
eiInfo
.
setMsg
(
"删除成功!"
);
return
eiInfo
;
return
inInfo
;
}
/**下·
...
...
@@ -199,79 +164,80 @@ public class ServiceHPSC003 extends ServiceBase {
* @return
*/
public
EiInfo
getInfo
(
EiInfo
eiInfo
)
{
Map
map
=
new
HashMap
();
String
id
=
eiInfo
.
get
(
"id"
).
toString
();
map
.
put
(
"id"
,
id
);
HPSC003
HPSC003
=
(
HPSC003
)
this
.
dao
.
get
(
"HPSC003.query"
,
"id"
,
id
);
eiInfo
.
set
(
"model"
,
HPSC003
);
return
eiInfo
;
}
/**
* 提交生产计划
* @param eiInfo
* @return
*/
public
EiInfo
checkHPSC0003
(
EiInfo
eiInfo
)
{
try
{
Map
map
=
new
HashMap
();
String
id
=
eiInfo
.
get
(
"id"
).
toString
();
map
.
put
(
"id"
,
id
);
HPSC003
HPSC003
=
(
HPSC003
)
this
.
dao
.
get
(
"HPSC003.query"
,
"id"
,
id
);
HPSC003
.
setStatus
(
1
);
DaoUtils
.
update
(
"HPSC003.update"
,
HPSC003
.
toMap
());
//生成生产订单
HashMap
params
=
new
HashMap
();
params
.
put
(
"parentId"
,
HPSC003
.
getPlanInfoNo
());
List
list
=
dao
.
query
(
"HPSC004.queryDetail"
,
params
,
0
,-
999999
);
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
HPSC004
HPSC004
=
(
HPSC004
)
list
.
get
(
i
);
HPSC005
HPSC005
=
new
HPSC005
();
String
SCDD
=
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPSC005_PROD_NO
);
HPSC005
.
setProjCode
(
HPSC003
.
getProjCode
());
HPSC005
.
setProjName
(
HPSC003
.
getProjName
());
HPSC005
.
setProductionOrderNo
(
SCDD
);
HPSC005
.
setInventRecordId
(
HPSC004
.
getInventRecordId
());
HPSC005
.
setPrdtType
(
HPSC003
.
getPrdtType
());
HPSC005
.
setPrdtCode
(
HPSC003
.
getPrdtCode
());
HPSC005
.
setPrdtName
(
HPSC003
.
getPrdtName
());
HPSC005
.
setPrdtLength
(
HPSC003
.
getLength
());
HPSC005
.
setPrdtWidth
(
HPSC003
.
getWidth
());
HPSC005
.
setPrdtThick
(
HPSC003
.
getThick
());
HPSC005
.
setPrdtSpec
(
HPSC003
.
getSpec
());
HPSC005
.
setRemark
(
HPSC003
.
getRemark
());
HPSC005
.
setPartType
(
HPSC004
.
getPrdtType
());
HPSC005
.
setPartCode
(
HPSC004
.
getPrdtCode
());
HPSC005
.
setPartName
(
HPSC004
.
getPrdtName
());
HPSC005
.
setPartLength
(
HPSC004
.
getLength
());
HPSC005
.
setPartWidth
(
HPSC004
.
getWidth
());
HPSC005
.
setPartThick
(
HPSC004
.
getThick
());
HPSC005
.
setPartSpec
(
HPSC004
.
getSpec
());
HPSC005
.
setRemark1
(
HPSC004
.
getRemark
());
HPSC005
.
setPlanCompletionDate
(
HPSC004
.
getPlanCompletionDate
());
HPSC005
.
setNum
(
HPSC004
.
getNum
());
HPSC005
.
setUnitWt
(
HPSC004
.
getUnitWt
());
HPSC005
.
setTotalWt
(
HPSC004
.
getTotalWt
());
HPSC005
.
setStatus
(
0
);
HPSC005
.
setFilePath1
(
HPSC004
.
getFilePath1
());
DaoUtils
.
insert
(
"HPSC005.insert"
,
HPSC005
.
toMap
());
HPSC004
.
setProductionOrderNo
(
SCDD
);
DaoUtils
.
update
(
"HPSC004.update"
,
HPSC004
.
toMap
());
}
}
catch
(
PlatException
e
)
{
eiInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
eiInfo
.
setMsg
(
"提交失败,原因参见详细错误描述!"
);
eiInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"提交失败!"
,
e
.
getMessage
());
return
eiInfo
;
}
eiInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
eiInfo
.
setMsg
(
"提交成功!"
);
return
eiInfo
;
Map
map
=
new
HashMap
();
String
id
=
eiInfo
.
get
(
"id"
).
toString
();
map
.
put
(
"id"
,
id
);
HPSC003
HPSC003
=
(
HPSC003
)
this
.
dao
.
get
(
"HPSC003.query"
,
"id"
,
id
);
eiInfo
.
set
(
"model"
,
HPSC003
);
return
eiInfo
;
}
/**
* 提交生产计划
*
* @param inInfo
* @return
*/
public
EiInfo
submitPlan
(
EiInfo
inInfo
)
{
try
{
Long
id
=
Long
.
parseLong
(
inInfo
.
getString
(
"id"
));
HPSC003
dbSc003
=
HPSCTools
.
HpSc003
.
get
(
id
);
// 查询计划子项
List
<
HPSC004
>
dbSc004s
=
HPSCTools
.
HpSc004
.
queryByParent
(
dbSc003
.
getPlanInfoNo
());
for
(
HPSC004
dbSc004
:
dbSc004s
)
{
// 已经生成订单的计划不在重复生成
if
(
StringUtils
.
isNotBlank
(
dbSc004
.
getProdOrderNo
()))
{
continue
;
}
// 生成任务订单
HPSC005
newSc005
=
this
.
addSc005
(
dbSc003
,
dbSc004
);
// 回填订单号
dbSc004
.
setProdOrderNo
(
newSc005
.
getProdOrderNo
());
DaoUtils
.
update
(
HPSqlConstant
.
HPSC004
.
UPDATE_PROD_ORDER_NO
,
dbSc004
.
toMap
());
}
// 修改计划状态
HPSCTools
.
HpSc003
.
updateStatus
(
id
,
HPConstant
.
planStatus
.
S_1
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"提交成功"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"提交失败"
);
}
return
inInfo
;
}
/**
* 生成任务订单
*
* @param dbSc003
* @param dbSc004
*/
private
HPSC005
addSc005
(
HPSC003
dbSc003
,
HPSC004
dbSc004
)
{
HPSC005
newSc005
=
BeanUtils
.
copy
(
dbSc003
,
HPSC005
.
class
);
newSc005
.
setProdOrderNo
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPSC005_PROD_NO
));
newSc005
.
setPrdtLength
(
dbSc003
.
getLength
());
newSc005
.
setPrdtWidth
(
dbSc003
.
getWidth
());
newSc005
.
setPrdtThick
(
dbSc003
.
getThick
());
newSc005
.
setPrdtSpec
(
dbSc003
.
getSpec
());
newSc005
.
setInventRecordId
(
dbSc004
.
getInventRecordId
());
newSc005
.
setPartType
(
dbSc004
.
getPrdtType
());
newSc005
.
setPartCode
(
dbSc004
.
getPrdtCode
());
newSc005
.
setPartName
(
dbSc004
.
getPrdtName
());
newSc005
.
setPartLength
(
dbSc004
.
getLength
());
newSc005
.
setPartWidth
(
dbSc004
.
getWidth
());
newSc005
.
setPartThick
(
dbSc004
.
getThick
());
newSc005
.
setPartSpec
(
dbSc004
.
getSpec
());
newSc005
.
setRemark1
(
dbSc004
.
getRemark
());
newSc005
.
setPlanCompletionDate
(
dbSc004
.
getPlanCompletionDate
());
newSc005
.
setNum
(
dbSc004
.
getNum
());
newSc005
.
setUnitWt
(
dbSc004
.
getUnitWt
());
newSc005
.
setTotalWt
(
dbSc004
.
getTotalWt
());
newSc005
.
setFilePath1
(
dbSc004
.
getFilePath1
());
newSc005
.
setStatus
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HPSC005
.
INSERT
,
newSc005
);
return
newSc005
;
}
/**
* 部件下拉框
*
* @param inInfo
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC005A.java
View file @
69bea29a
...
...
@@ -81,7 +81,7 @@ public class ServiceHPSC005A extends ServiceBase {
public
EiInfo
save
(
EiInfo
inInfo
)
{
try
{
Map
detailMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
"detail"
);
String
prodOrderNo
=
MapUtils
.
getString
(
detailMap
,
"prod
uction
OrderNo"
);
String
prodOrderNo
=
MapUtils
.
getString
(
detailMap
,
"prodOrderNo"
);
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 生产任务号
List
<
String
>
prodTaskNos
=
ObjectUtils
.
listKey
(
resultRows
,
"prodTaskNo"
);
...
...
@@ -121,7 +121,7 @@ public class ServiceHPSC005A extends ServiceBase {
* @param fSc005a
*/
private
void
add
(
HPSC005
dbSc005
,
HPSC005A
fSc005a
)
{
String
prodOrderNo
=
dbSc005
.
getProd
uction
OrderNo
();
String
prodOrderNo
=
dbSc005
.
getProdOrderNo
();
// 数据校验
AssertUtils
.
isEmpty
(
fSc005a
.
getFactoryCode
(),
"请选择厂区"
);
AssertUtils
.
isEmpty
(
fSc005a
.
getOrgNo
(),
"请选择生产组"
);
...
...
@@ -145,7 +145,7 @@ public class ServiceHPSC005A extends ServiceBase {
* @param mapSc005a
*/
private
void
modify
(
HPSC005
dbSc005
,
HPSC005A
fSc005a
,
Map
<
String
,
HPSC005A
>
mapSc005a
)
{
String
prodOrderNo
=
dbSc005
.
getProd
uction
OrderNo
();
String
prodOrderNo
=
dbSc005
.
getProdOrderNo
();
// 数据校验
HPSC005A
dbSc005a
=
mapSc005a
.
get
(
fSc005a
.
getProdTaskNo
());
AssertUtils
.
isGt
(
dbSc005a
.
getCompleteNum
(),
fSc005a
.
getNum
(),
...
...
@@ -168,7 +168,7 @@ public class ServiceHPSC005A extends ServiceBase {
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
Map
detailMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
"detail"
);
String
prodOrderNo
=
MapUtils
.
getString
(
detailMap
,
"prod
uction
OrderNo"
);
String
prodOrderNo
=
MapUtils
.
getString
(
detailMap
,
"prodOrderNo"
);
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
Map
resultRow
:
resultRows
)
{
HPSC005A
fSc005a
=
new
HPSC005A
();
...
...
@@ -220,14 +220,15 @@ public class ServiceHPSC005A extends ServiceBase {
// 校验主订单是否已分派
HPSC005
dbSc005
=
HPSCTools
.
HpSc005
.
getById
(
Long
.
parseLong
(
orderId
));
AssertUtils
.
isTrue
(!
ProdOrderStatusEnum
.
NOT_ASSIGN
.
getCode
().
equals
(
dbSc005
.
getStatus
()),
String
.
format
(
"生产订单[%s]已分派,不能在进行批量分派,请检查!"
,
dbSc005
.
getProd
uction
OrderNo
()));
HPSC005A
newSc005a
=
new
HPSC005A
();
String
.
format
(
"生产订单[%s]已分派,不能在进行批量分派,请检查!"
,
dbSc005
.
getProdOrderNo
()));
// 更新订单主表数量
HPSCTools
.
checkAssignedNum
(
dbSc005
.
getProd
uction
OrderNo
(),
dbSc005
.
getNum
());
HPSCTools
.
checkAssignedNum
(
dbSc005
.
getProdOrderNo
(),
dbSc005
.
getNum
());
// 写入子表数据
HPSC005A
newSc005a
=
new
HPSC005A
();
newSc005a
.
setProdTaskNo
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
PROD_TASK_NO
,
new
String
[]{
dbSc005
.
getProd
uction
OrderNo
()}));
newSc005a
.
setProdOrderNo
(
dbSc005
.
getProd
uction
OrderNo
());
new
String
[]{
dbSc005
.
getProdOrderNo
()}));
newSc005a
.
setProdOrderNo
(
dbSc005
.
getProdOrderNo
());
newSc005a
.
setNum
(
dbSc005
.
getNum
());
newSc005a
.
setTotalWt
(
newSc005a
.
getNum
().
multiply
(
dbSc005
.
getUnitWt
()));
newSc005a
.
setOrgNo
(
dbPz011
.
getGroupCode
());
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002.xml
View file @
69bea29a
<?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-11 11:34:26
Version : 1.0
tableName :hpjx.t_hpsc002
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEPT_CODE VARCHAR NOT NULL,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PARENT_ID VARCHAR,
PARENT_PRDT_NAME VARCHAR,
TYPE VARCHAR NOT NULL,
LEAF VARCHAR NOT NULL,
SORT VARCHAR NOT NULL,
ICON VARCHAR NOT NULL,
PRDT_CODE VARCHAR,
PRDT_NAME VARCHAR,
NUM INTEGER NOT NULL,
UNIT_WT DECIMAL NOT NULL,
TOTAL_WT DECIMAL NOT NULL,
FILE_PATH1 VARCHAR,
FILE_PATH2 VARCHAR,
FILE_PATH3 VARCHAR,
FILE_PATH4 VARCHAR,
FILE_PATH5 VARCHAR,
STATUS TINYINT,
DEL_STATUS TINYINT,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME,
REMARK VARCHAR
-->
<sqlMap
namespace=
"HPSC002"
>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC002"
>
SELECT
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEPT_CODE as "deptCode",
<!-- 部门编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PARENT_ID as "parentId",
<!-- 父节点-部件编码 -->
PARENT_PRDT_NAME as "parentPrdtName",
<!-- 父节点-部件名称 -->
TYPE as "type",
<!-- 类别 -->
LEAF as "leaf",
<!-- 是否有叶子节点 -->
SORT as "sort",
<!-- 排序字段 -->
ICON as "icon",
<!-- 图片地址 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode",
<!-- 部件编码 -->
PRDT_NAME as "prdtName",
<!-- 部件名称 -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 存货档案ID -->
NUM as "num",
<!-- 数量 -->
UNIT_WT as "unitWt",
<!-- 单重 -->
TOTAL_WT as "totalWt",
<!-- 总重 -->
FILE_PATH1 as "filePath1",
<!-- 文件地址1 -->
FILE_PATH2 as "filePath2",
<!-- 文件地址2 -->
FILE_PATH3 as "filePath3",
<!-- 文件地址3 -->
FILE_PATH4 as "filePath4",
<!-- 文件地址4 -->
FILE_PATH5 as "filePath5",
<!-- 文件地址5 -->
STATUS as "status",
<!-- 状态 0-未提交,1-已提交 -->
DEL_STATUS as "delStatus",
<!-- 状态 1未删除,0已删除 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
REMARK as "remark",
<!-- 备注 -->
LV as "lv",
SPEC as "spec",
LENGTH as "length",
<!-- 长 -->
WIDTH as "width",
<!-- 宽 -->
THICK as "thick"
<!-- 厚 -->
<sql
id=
"column"
>
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEPT_CODE as "deptCode",
<!-- 部门编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PARENT_ID as "parentId",
<!-- 父节点-部件编码 -->
PARENT_PRDT_NAME as "parentPrdtName",
<!-- 父节点-部件名称 -->
TYPE as "type",
<!-- 类别 -->
LEAF as "leaf",
<!-- 是否有叶子节点 -->
SORT as "sort",
<!-- 排序字段 -->
ICON as "icon",
<!-- 图片地址 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode",
<!-- 部件编码 -->
PRDT_NAME as "prdtName",
<!-- 部件名称 -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 存货档案ID -->
NUM as "num",
<!-- 数量 -->
UNIT_WT as "unitWt",
<!-- 单重 -->
TOTAL_WT as "totalWt",
<!-- 总重 -->
FILE_PATH1 as "filePath1",
<!-- 文件地址1 -->
FILE_PATH2 as "filePath2",
<!-- 文件地址2 -->
FILE_PATH3 as "filePath3",
<!-- 文件地址3 -->
FILE_PATH4 as "filePath4",
<!-- 文件地址4 -->
FILE_PATH5 as "filePath5",
<!-- 文件地址5 -->
STATUS as "status",
<!-- 状态 0-未提交,1-已提交 -->
DEL_STATUS as "delStatus",
<!-- 状态 1未删除,0已删除 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
REMARK as "remark",
<!-- 备注 -->
LV as "lv",
SPEC as "spec",
LENGTH as "length",
<!-- 长 -->
WIDTH as "width",
<!-- 宽 -->
THICK as "thick"
<!-- 厚 -->
</sql>
FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtType"
>
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtCode"
>
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtName"
>
PRDT_NAME LIKE ('%$#prdtName#$%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventRecordId"
>
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"lv"
>
LV = #lv#
</isNotEmpty>
ORDER BY ID DESC
<!-- <dynamic prepend="ORDER BY">-->
<!-- <isEmpty property="orderBy">-->
<!-- CREATED_TIME DESC-->
<!-- </isEmpty>-->
<!-- </dynamic>-->
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtType"
>
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtCode"
>
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtName"
>
PRDT_NAME LIKE CONCAT('%', #prdtName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventRecordId"
>
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"lv"
>
LV = #lv#
</isNotEmpty>
</sql>
<sql
id=
"order"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"order"
>
$order$
</isNotEmpty>
<isEmpty
property=
"order"
>
ID DESC
</isEmpty>
</dynamic>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC002"
>
SELECT
<include
refid=
"column"
/>
FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0
<include
refid=
"condition"
/>
<include
refid=
"order"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtType"
>
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtCode"
>
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtName"
>
PRDT_NAME LIKE ('%$#prdtName#$%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventRecordId"
>
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"lv"
>
LV = #lv#
</isNotEmpty>
<include
refid=
"condition"
/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deptCode">
DEPT_CODE = #deptCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtName">
PARENT_PRDT_NAME = #parentPrdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="type">
TYPE = #type#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="leaf">
LEAF = #leaf#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sort">
SORT = #sort#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="icon">
ICON = #icon#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="num">
NUM = #num#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitWt">
UNIT_WT = #unitWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWt">
TOTAL_WT = #totalWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath1">
FILE_PATH1 = #filePath1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath2">
FILE_PATH2 = #filePath2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath3">
FILE_PATH3 = #filePath3#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath4">
FILE_PATH4 = #filePath4#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath5">
FILE_PATH5 = #filePath5#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="delStatus">
DEL_STATUS = #delStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
-->
<insert
id=
"insert"
>
INSERT INTO hpjx.t_hpsc002 (ID,
...
...
@@ -269,56 +134,56 @@
LENGTH,
<!-- 长 -->
WIDTH,
<!-- 宽 -->
THICK
<!-- 厚 -->
)
)
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#,
#type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #inventRecordId#, #num#,
#unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#,
#delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#, #lv#, #spec#,
#length#, #width#, #thick#)
</insert>
<!-- 删除 -->
<delete
id=
"delete"
>
DELETE FROM hpjx.t_hpsc002 WHERE
ID = #id#
DELETE FROM hpjx.t_hpsc002 WHERE ID = #id#
</delete>
<update
id=
"update"
>
UPDATE hpjx.t_hpsc002
SET
COMPANY_CODE = #companyCode#,
<!-- 企业编码 预留 -->
DEPT_CODE = #deptCode#,
<!-- 部门编码 预留 -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
UPDATE hpjx.t_hpsc002
SET
COMPANY_CODE = #companyCode#,
<!-- 企业编码 预留 -->
DEPT_CODE = #deptCode#,
<!-- 部门编码 预留 -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PARENT_ID = #parentId#,
<!-- 父节点-部件编码 -->
PARENT_PRDT_NAME = #parentPrdtName#,
<!-- 父节点-部件名称 -->
TYPE = #type#,
<!-- 类别 -->
LEAF = #leaf#,
<!-- 是否有叶子节点 -->
SORT = #sort#,
<!-- 排序字段 -->
ICON = #icon#,
<!-- 图片地址 -->
TYPE = #type#,
<!-- 类别 -->
LEAF = #leaf#,
<!-- 是否有叶子节点 -->
SORT = #sort#,
<!-- 排序字段 -->
ICON = #icon#,
<!-- 图片地址 -->
PRDT_CODE = #prdtCode#,
<!-- 部件编码 -->
PRDT_TYPE = #prdtType#,
PRDT_NAME = #prdtName#,
<!-- 部件名称 -->
INVENT_RECORD_ID = #inventRecordId#,
<!-- 存货档案ID -->
NUM = #num#,
<!-- 数量 -->
UNIT_WT = #unitWt#,
<!-- 单重 -->
TOTAL_WT = #totalWt#,
<!-- 总重 -->
FILE_PATH1 = #filePath1#,
<!-- 文件地址1 -->
FILE_PATH2 = #filePath2#,
<!-- 文件地址2 -->
FILE_PATH3 = #filePath3#,
<!-- 文件地址3 -->
FILE_PATH4 = #filePath4#,
<!-- 文件地址4 -->
FILE_PATH5 = #filePath5#,
<!-- 文件地址5 -->
UNIT_WT = #unitWt#,
<!-- 单重 -->
TOTAL_WT = #totalWt#,
<!-- 总重 -->
FILE_PATH1 = #filePath1#,
<!-- 文件地址1 -->
FILE_PATH2 = #filePath2#,
<!-- 文件地址2 -->
FILE_PATH3 = #filePath3#,
<!-- 文件地址3 -->
FILE_PATH4 = #filePath4#,
<!-- 文件地址4 -->
FILE_PATH5 = #filePath5#,
<!-- 文件地址5 -->
STATUS = #status#,
<!-- 状态 0-未提交,1-已提交 -->
DEL_STATUS = #delStatus#,
<!-- 状态 1未删除,0已删除 -->
CREATED_BY = #createdBy#,
<!-- 创建人 -->
CREATED_TIME = #createdTime#,
<!-- 创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
DEL_STATUS = #delStatus#,
<!-- 状态 1未删除,0已删除 -->
CREATED_BY = #createdBy#,
<!-- 创建人 -->
CREATED_TIME = #createdTime#,
<!-- 创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
REMARK = #remark#,
<!-- 备注 -->
SPEC = #spec#,
<!-- 规格 -->
LENGTH = #length#,
<!-- 长 -->
WIDTH = #width#,
<!-- 宽 -->
THICK = #thick#
<!-- 厚 -->
WHERE
WHERE
ID = #id#
</update>
...
...
@@ -354,100 +219,33 @@
ORDER BY CREATED_TIME DESC
</select>
<select
id=
"queryTreeNodeByParentPrtdCode"
resultClass=
"java.util.HashMap"
>
SELECT
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEPT_CODE as "deptCode",
<!-- 部门编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PARENT_ID as "parentId",
<!-- 父节点-部件编码 -->
PARENT_PRDT_NAME as "parentPrdtName",
<!-- 父节点-部件名称 -->
TYPE as "type",
<!-- 类别 -->
LEAF as "leaf",
<!-- 是否有叶子节点 -->
SORT as "sort",
<!-- 排序字段 -->
ICON as "icon",
<!-- 图片地址 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode",
<!-- 部件编码 -->
PRDT_NAME as "prdtName",
<!-- 部件名称 -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 存货档案ID -->
NUM as "num",
<!-- 数量 -->
UNIT_WT as "unitWt",
<!-- 单重 -->
TOTAL_WT as "totalWt",
<!-- 总重 -->
FILE_PATH1 as "filePath1",
<!-- 文件地址1 -->
FILE_PATH2 as "filePath2",
<!-- 文件地址2 -->
FILE_PATH3 as "filePath3",
<!-- 文件地址3 -->
FILE_PATH4 as "filePath4",
<!-- 文件地址4 -->
FILE_PATH5 as "filePath5",
<!-- 文件地址5 -->
STATUS as "status",
<!-- 状态 0-未提交,1-已提交 -->
DEL_STATUS as "delStatus",
<!-- 状态 1未删除,0已删除 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
REMARK as "remark",
<!-- 备注 -->
LV as "lv",
SPEC as "spec",
LENGTH as "length",
<!-- 长 -->
WIDTH as "width",
<!-- 宽 -->
THICK as "thick"
<!-- 厚 -->
FROM hpjx.t_hpsc002
WHERE 1 = 1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
PARENT_ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE = #projCode#
</isNotEmpty>
</select>
<!-- 根据父级ID查询 -->
<select
id=
"queryTreeNodeByParentPrtdCode"
resultClass=
"java.util.HashMap"
>
SELECT
<include
refid=
"column"
/>
FROM hpjx.t_hpsc002
WHERE 1 = 1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
PARENT_ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE = #projCode#
</isNotEmpty>
</select>
<select
id=
"queryEntityByParentPrtdCode"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC002"
>
SELECT
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEPT_CODE as "deptCode",
<!-- 部门编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PARENT_ID as "parentId",
<!-- 父节点-部件编码 -->
PARENT_PRDT_NAME as "parentPrdtName",
<!-- 父节点-部件名称 -->
TYPE as "type",
<!-- 类别 -->
LEAF as "leaf",
<!-- 是否有叶子节点 -->
SORT as "sort",
<!-- 排序字段 -->
ICON as "icon",
<!-- 图片地址 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode",
<!-- 部件编码 -->
PRDT_NAME as "prdtName",
<!-- 部件名称 -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 存货档案ID -->
NUM as "num",
<!-- 数量 -->
UNIT_WT as "unitWt",
<!-- 单重 -->
TOTAL_WT as "totalWt",
<!-- 总重 -->
FILE_PATH1 as "filePath1",
<!-- 文件地址1 -->
FILE_PATH2 as "filePath2",
<!-- 文件地址2 -->
FILE_PATH3 as "filePath3",
<!-- 文件地址3 -->
FILE_PATH4 as "filePath4",
<!-- 文件地址4 -->
FILE_PATH5 as "filePath5",
<!-- 文件地址5 -->
STATUS as "status",
<!-- 状态 0-未提交,1-已提交 -->
DEL_STATUS as "delStatus",
<!-- 状态 1未删除,0已删除 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
REMARK as "remark",
<!-- 备注 -->
LV as "lv",
SPEC as "spec",
LENGTH as "length",
<!-- 长 -->
WIDTH as "width",
<!-- 宽 -->
THICK as "thick"
<!-- 厚 -->
FROM hpjx.t_hpsc002 WHERE 1 = 1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
PARENT_ID = #parentId#
</isNotEmpty>
</select>
<!-- 根据父级ID查询 -->
<select
id=
"queryEntityByParentPrtdCode"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC002"
>
SELECT
<include
refid=
"column"
/>
FROM HPJX.T_HPSC002
WHERE 1 = 1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
PARENT_ID = #parentId#
</isNotEmpty>
</select>
<update
id=
"updateTreeNodeLeaf"
>
UPDATE hpjx.t_hpsc002 SET LEAF = #leaf# WHERE ID = #id#
...
...
@@ -510,4 +308,4 @@
</isNotEmpty>
</select>
</sqlMap>
\ No newline at end of file
</sqlMap>
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC003.xml
View file @
69bea29a
<?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">
<!DOCTYPE sqlMap
PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com
/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HPSC003"
>
<sql
id=
"condition"
>
...
...
@@ -59,6 +59,13 @@
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
<sql
id=
"updateRevise"
>
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_NAME = #updatedName#,
<!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#
<!-- 修改时间 -->
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC003"
>
SELECT
...
...
@@ -195,12 +202,17 @@
UPDATE hpjx.T_HPSC003
SET
PLAN_COMPLETION_DATE = #planCompletionDate#,
<!-- 计划完成日期 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_TIME = #updatedTime#
<!-- 更新时间 -->
WHERE
COMPANY_CODE = #companyCode#
AND PROJ_CODE = #projCode#
AND PLAN_INFO_NO = #planInfoNo#
<include
refid=
"updateRevise"
/>
WHERE PLAN_INFO_NO = #planInfoNo#
</update>
<!-- 修改状态 -->
<update
id=
"updateStatus"
>
UPDATE hpjx.T_HPSC003
SET
STATUS = #status#,
<include
refid=
"updateRevise"
/>
WHERE ID = #id#
</update>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC004.xml
View file @
69bea29a
...
...
@@ -2,112 +2,182 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HPSC004"
>
<sql
id=
"column"
>
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEPT_CODE as "deptCode",
<!-- 部门编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
MAT_ID as "matId",
<!-- 材料ID -->
PARENT_ID as "parentId",
<!-- 父节点-产品编码 -->
PARENT_PRDT_NAME as "parentPrdtName",
<!-- 父节点-产品名称 -->
PROD_ORDER_NO as "prodOrderNo",
<!-- 生产订单号 -->
TYPE as "type",
<!-- 类别 -->
LEAF as "leaf",
<!-- 是否有叶子节点 -->
SORT as "sort",
<!-- 排序字段 -->
ICON as "icon",
<!-- 图片地址 -->
PRDT_TYPE as "prdtType",
<!-- 产品类型 -->
PRDT_CODE as "prdtCode",
<!-- 产品编码 -->
PRDT_NAME as "prdtName",
<!-- 产品名称 -->
LENGTH as "length",
<!-- 长 -->
WIDTH as "width",
<!-- 宽 -->
THICK as "thick",
<!-- 厚 -->
SPEC as "spec",
<!-- 规格 -->
NUM as "num",
<!-- 数量 -->
UNIT_WT as "unitWt",
<!-- 单重 -->
TOTAL_WT as "totalWt",
<!-- 总重 -->
FILE_PATH1 as "filePath1",
<!-- 文件地址1 -->
FILE_PATH2 as "filePath2",
<!-- 文件地址2 -->
FILE_PATH3 as "filePath3",
<!-- 文件地址3 -->
FILE_PATH4 as "filePath4",
<!-- 文件地址4 -->
FILE_PATH5 as "filePath5",
<!-- 文件地址5 -->
PLAN_COMMENT_DATE as "planCommentDate",
<!-- 计划开始时间 -->
PLAN_COMPLETION_DATE as "planCompletionDate",
<!-- 计划结束时间 -->
ACTUAL_COMPLETION_DATE as "actualCompletionDate",
<!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM as "actualCompletionNum",
<!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT as "actualCompletionUnitWt",
<!-- 实际完工重量 -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 项目档案ID -->
STATUS as "status",
<!-- 状态 0-未审核,1-已审核 -->
REMARK as "remark",
<!-- 备注 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_NAME as "updatedName",
<!-- 修改人名称 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
DEL_STATUS as "delStatus"
<!-- 状态:0未删除,1已删除 -->
</sql>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deptCode"
>
DEPT_CODE = #deptCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentPrdtName"
>
PARENT_PRDT_NAME = #parentPrdtName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"type"
>
TYPE = #type#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"leaf"
>
LEAF = #leaf#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"sort"
>
SORT = #sort#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"icon"
>
ICON = #icon#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtType"
>
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtCode"
>
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtName"
>
PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"num"
>
NUM = #num#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"unitWt"
>
UNIT_WT = #unitWt#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"totalWt"
>
TOTAL_WT = #totalWt#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath1"
>
FILE_PATH1 = #filePath1#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath2"
>
FILE_PATH2 = #filePath2#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath3"
>
FILE_PATH3 = #filePath3#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath4"
>
FILE_PATH4 = #filePath4#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath5"
>
FILE_PATH5 = #filePath5#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planCommentDate"
>
PLAN_COMMENT_DATE = #planCommentDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planCompletionDate"
>
PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"actualCompletionDate"
>
ACTUAL_COMPLETION_DATE = #actualCompletionDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"actualCompletionNum"
>
ACTUAL_COMPLETION_NUM = #actualCompletionNum#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"actualCompletionUnitWt"
>
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"productionOrderNo"
>
PRODUCTION_ORDER_NO = #productionOrderNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"delStatus"
>
DEL_STATUS = #delStatus#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdBy"
>
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTime"
>
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedBy"
>
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"remark"
>
REMARK = #remark#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deptCode"
>
DEPT_CODE = #deptCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"matId"
>
MAT_ID = #matId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentPrdtName"
>
PARENT_PRDT_NAME = #parentPrdtName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prodOrderNo"
>
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"type"
>
TYPE = #type#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"leaf"
>
LEAF = #leaf#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"sort"
>
SORT = #sort#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"icon"
>
ICON = #icon#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtType"
>
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtCode"
>
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtName"
>
PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"length"
>
LENGTH = #length#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"width"
>
WIDTH = #width#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"thick"
>
THICK = #thick#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"spec"
>
SPEC = #spec#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"num"
>
NUM = #num#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"unitWt"
>
UNIT_WT = #unitWt#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"totalWt"
>
TOTAL_WT = #totalWt#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath1"
>
FILE_PATH1 = #filePath1#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath2"
>
FILE_PATH2 = #filePath2#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath3"
>
FILE_PATH3 = #filePath3#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath4"
>
FILE_PATH4 = #filePath4#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath5"
>
FILE_PATH5 = #filePath5#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planCommentDate"
>
PLAN_COMMENT_DATE = #planCommentDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planCompletionDate"
>
PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"actualCompletionDate"
>
ACTUAL_COMPLETION_DATE = #actualCompletionDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"actualCompletionNum"
>
ACTUAL_COMPLETION_NUM = #actualCompletionNum#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"actualCompletionUnitWt"
>
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventRecordId"
>
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"remark"
>
REMARK = #remark#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdBy"
>
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdName"
>
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTime"
>
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedBy"
>
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedName"
>
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"delStatus"
>
DEL_STATUS = #delStatus#
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
...
...
@@ -117,174 +187,139 @@
UPDATED_TIME = #updatedTime#
<!-- 修改时间 -->
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC004"
>
SELECT
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEPT_CODE as "deptCode",
<!-- 部门编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PARENT_ID as "parentId",
<!-- 父节点-产品编码 -->
PARENT_PRDT_NAME as "parentPrdtName",
<!-- 父节点-产品名称 -->
TYPE as "type",
<!-- 类别 -->
LEAF as "leaf",
<!-- 是否有叶子节点 -->
SORT as "sort",
<!-- 排序字段 -->
ICON as "icon",
<!-- 图片地址 -->
INVENT_RECORD_ID as "inventRecordId",
SPEC as "spec",
LENGTH as "length",
<!-- 长 -->
WIDTH as "width",
<!-- 宽 -->
THICK as "thick",
<!-- 厚 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode",
<!-- 产品编码 -->
PRDT_NAME as "prdtName",
<!-- 产品名称 -->
NUM as "num",
<!-- 数量 -->
UNIT_WT as "unitWt",
<!-- 单重 -->
TOTAL_WT as "totalWt",
<!-- 总重 -->
FILE_PATH1 as "filePath1",
<!-- 文件地址1 -->
FILE_PATH2 as "filePath2",
<!-- 文件地址2 -->
FILE_PATH3 as "filePath3",
<!-- 文件地址3 -->
FILE_PATH4 as "filePath4",
<!-- 文件地址4 -->
FILE_PATH5 as "filePath5",
<!-- 文件地址5 -->
PLAN_COMMENT_DATE as "planCommentDate",
<!-- 计划开始时间 -->
PLAN_COMPLETION_DATE as "planCompletionDate",
<!-- 计划结束时间 -->
ACTUAL_COMPLETION_DATE as "actualCompletionDate",
<!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM as "actualCompletionNum",
<!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT as "actualCompletionUnitWt",
<!-- 实际完工重量 -->
STATUS as "status",
<!-- 状态 0-未审核,1-已审核 -->
DEL_STATUS as "delStatus",
<!-- 状态 1未删除,0已删除 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
REMARK as "remark"
<!-- 备注 -->
FROM hpjx.T_HPSC004 WHERE 1=1
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID asc
</isEmpty>
</dynamic>
<sql
id=
"order"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"order"
>
$order$
</isNotEmpty>
<isEmpty
property=
"order"
>
ID asc
</isEmpty>
</dynamic>
</sql>
</select>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC004"
>
SELECT
<include
refid=
"column"
/>
FROM hpjx.T_HPSC004
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"order"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.T_HPSC004 WHERE 1=1
<include
refid=
"condition"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.T_HPSC004 WHERE 1=1
<include
refid=
"condition"
/>
</select>
<insert
id=
"insert"
>
INSERT INTO hpjx.T_HPSC004 (ID,
COMPANY_CODE,
<!-- 企业编码 预留 -->
DEPT_CODE,
<!-- 部门编码 预留 -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
PARENT_ID,
<!-- 父节点-产品编码 -->
PARENT_PRDT_NAME,
<!-- 父节点-产品名称 -->
TYPE,
<!-- 类别 -->
LEAF,
<!-- 是否有叶子节点 -->
SORT,
<!-- 排序字段 -->
ICON,
<!-- 图片地址 -->
INVENT_RECORD_ID,
SPEC,
LENGTH,
<!-- 长 -->
WIDTH,
<!-- 宽 -->
THICK,
<!-- 厚 -->
PRDT_TYPE,
PRDT_CODE,
<!-- 产品编码 -->
PRDT_NAME,
<!-- 产品名称 -->
NUM,
<!-- 数量 -->
UNIT_WT,
<!-- 单重 -->
TOTAL_WT,
<!-- 总重 -->
FILE_PATH1,
<!-- 文件地址1 -->
FILE_PATH2,
<!-- 文件地址2 -->
FILE_PATH3,
<!-- 文件地址3 -->
FILE_PATH4,
<!-- 文件地址4 -->
FILE_PATH5,
<!-- 文件地址5 -->
PLAN_COMMENT_DATE,
<!-- 计划开始时间 -->
PLAN_COMPLETION_DATE,
<!-- 计划结束时间 -->
ACTUAL_COMPLETION_DATE,
<!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM,
<!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT,
<!-- 实际完工重量 -->
STATUS,
<!-- 状态 0-未审核,1-已审核 -->
DEL_STATUS,
<!-- 状态 1未删除,0已删除 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_TIME,
<!-- 创建时间 -->
UPDATED_BY,
<!-- 更新人 -->
UPDATED_TIME,
<!-- 更新时间 -->
REMARK
<!-- 备注 -->
)
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#,
#type#, #leaf#, #sort#, #icon#,#inventRecordId#,#spec#, #length#, #width#, #thick#,#prdtType#, #prdtCode#, #prdtName#,
#num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#,
#planCommentDate#, #planCompletionDate#, #actualCompletionDate#, #actualCompletionNum#,
#actualCompletionUnitWt#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#,
#updatedTime#, #remark#)
</insert>
INSERT INTO hpjx.T_HPSC004 (
COMPANY_CODE,
<!-- 企业编码 预留 -->
DEPT_CODE,
<!-- 部门编码 预留 -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
MAT_ID,
<!-- 材料ID -->
PARENT_ID,
<!-- 父节点-产品编码 -->
PARENT_PRDT_NAME,
<!-- 父节点-产品名称 -->
PROD_ORDER_NO,
<!-- 生产订单号 -->
TYPE,
<!-- 类别 -->
LEAF,
<!-- 是否有叶子节点 -->
SORT,
<!-- 排序字段 -->
ICON,
<!-- 图片地址 -->
PRDT_TYPE,
<!-- 产品类型 -->
PRDT_CODE,
<!-- 产品编码 -->
PRDT_NAME,
<!-- 产品名称 -->
LENGTH,
<!-- 长 -->
WIDTH,
<!-- 宽 -->
THICK,
<!-- 厚 -->
SPEC,
<!-- 规格 -->
NUM,
<!-- 数量 -->
UNIT_WT,
<!-- 单重 -->
TOTAL_WT,
<!-- 总重 -->
FILE_PATH1,
<!-- 文件地址1 -->
FILE_PATH2,
<!-- 文件地址2 -->
FILE_PATH3,
<!-- 文件地址3 -->
FILE_PATH4,
<!-- 文件地址4 -->
FILE_PATH5,
<!-- 文件地址5 -->
PLAN_COMMENT_DATE,
<!-- 计划开始时间 -->
PLAN_COMPLETION_DATE,
<!-- 计划结束时间 -->
ACTUAL_COMPLETION_DATE,
<!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM,
<!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT,
<!-- 实际完工重量 -->
INVENT_RECORD_ID,
<!-- 项目档案ID -->
STATUS,
<!-- 状态 0-未审核,1-已审核 -->
REMARK,
<!-- 备注 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME,
<!-- 创建时间 -->
DEL_STATUS
<!-- 状态:0未删除,1已删除 -->
) VALUES (
#companyCode#, #deptCode#, #projCode#, #projName#, #matId#, #parentId#, #parentPrdtName#,
#prodOrderNo#, #type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#,
#prdtName#, #length#, #width#, #thick#, #spec#, #num#, #unitWt#, #totalWt#, #filePath1#,
#filePath2#, #filePath3#, #filePath4#, #filePath5#, #planCommentDate#, #planCompletionDate#,
#actualCompletionDate#, #actualCompletionNum#, #actualCompletionUnitWt#, #inventRecordId#,
#status#, #remark#, #createdBy#, #createdName#, #createdTime#, #delStatus#
)
</insert>
<delete
id=
"delete"
>
DELETE FROM hpjx.T_HPSC004 WHERE
ID = #id#
DELETE FROM hpjx.T_HPSC004 WHERE ID = #id#
</delete>
<!-- 根据材料号删除 -->
<delete
id=
"deleteByMat"
>
DELETE FROM hpjx.T_HPSC004 WHERE MAT_ID = #matId#
</delete>
<update
id=
"update"
>
UPDATE hpjx.T_HPSC004
SET
COMPANY_CODE = #companyCode#,
<!-- 企业编码 预留 -->
DEPT_CODE = #deptCode#,
<!-- 部门编码 预留 -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PARENT_ID = #parentId#,
<!-- 父节点-产品编码 -->
PARENT_PRDT_NAME = #parentPrdtName#,
<!-- 父节点-产品名称 -->
TYPE = #type#,
<!-- 类别 -->
LEAF = #leaf#,
<!-- 是否有叶子节点 -->
SORT = #sort#,
<!-- 排序字段 -->
ICON = #icon#,
<!-- 图片地址 -->
PRDT_TYPE = #prdtType#,
PRDT_CODE = #prdtCode#,
<!-- 产品编码 -->
PRDT_NAME = #prdtName#,
<!-- 产品名称 -->
NUM = #num#,
<!-- 数量 -->
UNIT_WT = #unitWt#,
<!-- 单重 -->
TOTAL_WT = #totalWt#,
<!-- 总重 -->
FILE_PATH1 = #filePath1#,
<!-- 文件地址1 -->
FILE_PATH2 = #filePath2#,
<!-- 文件地址2 -->
FILE_PATH3 = #filePath3#,
<!-- 文件地址3 -->
FILE_PATH4 = #filePath4#,
<!-- 文件地址4 -->
FILE_PATH5 = #filePath5#,
<!-- 文件地址5 -->
PLAN_COMMENT_DATE = #planCommentDate#,
<!-- 计划开始时间 -->
PLAN_COMPLETION_DATE = #planCompletionDate#,
<!-- 计划结束时间 -->
ACTUAL_COMPLETION_DATE = #actualCompletionDate#,
<!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM = #actualCompletionNum#,
<!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#,
<!-- 实际完工重量 -->
PRODUCTION_ORDER_NO = #productionOrderNo#,
<!-- 生产订单号 -->
STATUS = #status#,
<!-- 状态 0-未审核,1-已审核 -->
DEL_STATUS = #delStatus#,
<!-- 状态 1未删除,0已删除 -->
CREATED_BY = #createdBy#,
<!-- 创建人 -->
CREATED_TIME = #createdTime#,
<!-- 创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
REMARK = #remark#,
<!-- 备注 -->
SPEC = #spec#,
<!-- 规格 -->
LENGTH = #length#,
<!-- 长 -->
WIDTH = #width#,
<!-- 宽 -->
THICK = #thick#
<!-- 厚 -->
WHERE
ID = #id#
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PARENT_ID = #parentId#,
<!-- 父节点-产品编码 -->
PARENT_PRDT_NAME = #parentPrdtName#,
<!-- 父节点-产品名称 -->
TYPE = #type#,
<!-- 类别 -->
LEAF = #leaf#,
<!-- 是否有叶子节点 -->
SORT = #sort#,
<!-- 排序字段 -->
ICON = #icon#,
<!-- 图片地址 -->
PRDT_TYPE = #prdtType#,
PRDT_CODE = #prdtCode#,
<!-- 产品编码 -->
PRDT_NAME = #prdtName#,
<!-- 产品名称 -->
NUM = #num#,
<!-- 数量 -->
UNIT_WT = #unitWt#,
<!-- 单重 -->
TOTAL_WT = #totalWt#,
<!-- 总重 -->
FILE_PATH1 = #filePath1#,
<!-- 文件地址1 -->
FILE_PATH2 = #filePath2#,
<!-- 文件地址2 -->
FILE_PATH3 = #filePath3#,
<!-- 文件地址3 -->
FILE_PATH4 = #filePath4#,
<!-- 文件地址4 -->
FILE_PATH5 = #filePath5#,
<!-- 文件地址5 -->
PLAN_COMMENT_DATE = #planCommentDate#,
<!-- 计划开始时间 -->
PLAN_COMPLETION_DATE = #planCompletionDate#,
<!-- 计划结束时间 -->
ACTUAL_COMPLETION_DATE = #actualCompletionDate#,
<!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM = #actualCompletionNum#,
<!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#,
<!-- 实际完工重量 -->
PROD_ORDER_NO = #prodOrderNo#,
<!-- 生产订单号 -->
STATUS = #status#,
<!-- 状态 0-未审核,1-已审核 -->
DEL_STATUS = #delStatus#,
<!-- 状态 1未删除,0已删除 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
REMARK = #remark#,
<!-- 备注 -->
SPEC = #spec#,
<!-- 规格 -->
LENGTH = #length#,
<!-- 长 -->
WIDTH = #width#,
<!-- 宽 -->
THICK = #thick#
<!-- 厚 -->
WHERE ID = #id#
</update>
<update
id=
"updateHPSC0004"
>
UPDATE hpjx.T_HPSC004
SET
PLAN_COMMENT_DATE = #planCommentDate#,
<!-- 计划开始时间 -->
PLAN_COMPLETION_DATE = #planCompletionDate#,
<!-- 计划结束时间 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_TIME = #updatedTime#
<!-- 更新时间 -->
WHERE
ID = #id#
<!-- 更新计划时间 -->
<update
id=
"updatePlanDate"
>
UPDATE hpjx.T_HPSC004
SET
PLAN_COMMENT_DATE = #planCommentDate#,
<!-- 计划开始时间 -->
PLAN_COMPLETION_DATE = #planCompletionDate#,
<!-- 计划结束时间 -->
<include
refid=
"updateRevise"
/>
WHERE ID = #id#
</update>
<!-- 更新完成数量、重量、时间 -->
...
...
@@ -298,52 +333,23 @@
WHERE ID = #id#
</update>
<select
id=
"queryDetail"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC004"
>
SELECT
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEPT_CODE as "deptCode",
<!-- 部门编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PARENT_ID as "parentId",
<!-- 父节点-产品编码 -->
PARENT_PRDT_NAME as "parentPrdtName",
<!-- 父节点-产品名称 -->
TYPE as "type",
<!-- 类别 -->
LEAF as "leaf",
<!-- 是否有叶子节点 -->
SORT as "sort",
<!-- 排序字段 -->
ICON as "icon",
<!-- 图片地址 -->
INVENT_RECORD_ID as "inventRecordId",
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode",
<!-- 产品编码 -->
PRDT_NAME as "prdtName",
<!-- 产品名称 -->
SPEC as "spec",
LENGTH as "length",
<!-- 长 -->
WIDTH as "width",
<!-- 宽 -->
THICK as "thick",
<!-- 厚 -->
NUM as "num",
<!-- 数量 -->
UNIT_WT as "unitWt",
<!-- 单重 -->
TOTAL_WT as "totalWt",
<!-- 总重 -->
FILE_PATH1 as "filePath1",
<!-- 文件地址1 -->
FILE_PATH2 as "filePath2",
<!-- 文件地址2 -->
FILE_PATH3 as "filePath3",
<!-- 文件地址3 -->
FILE_PATH4 as "filePath4",
<!-- 文件地址4 -->
FILE_PATH5 as "filePath5",
<!-- 文件地址5 -->
PLAN_COMMENT_DATE as "planCommentDate",
<!-- 计划开始时间 -->
PLAN_COMPLETION_DATE as "planCompletionDate",
<!-- 计划结束时间 -->
ACTUAL_COMPLETION_DATE as "actualCompletionDate",
<!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM as "actualCompletionNum",
<!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT as "actualCompletionUnitWt",
<!-- 实际完工重量 -->
STATUS as "status",
<!-- 状态 0-未审核,1-已审核 -->
DEL_STATUS as "delStatus",
<!-- 状态 1未删除,0已删除 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
REMARK as "remark",
<!-- 备注 -->
PRODUCTION_ORDER_NO as productionOrderNo
FROM hpjx.T_HPSC004 WHERE 1=1
<include
refid=
"condition"
/>
</select>
<!-- 更新订单号 -->
<update
id=
"updateProdOrderNo"
>
UPDATE hpjx.T_HPSC004
SET
PROD_ORDER_NO = #prodOrderNo#,
<include
refid=
"updateRevise"
/>
WHERE ID = #id#
</update>
<select
id=
"queryDetail"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC004"
>
SELECT
<include
refid=
"column"
/>
FROM hpjx.T_HPSC004
WHERE 1=1
<include
refid=
"condition"
/>
</select>
<select
id=
"inspectDetail"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.T_HPSC004 WHERE 1=1
...
...
@@ -351,17 +357,15 @@
OR PLAN_COMPLETION_DATE = '' OR PLAN_COMPLETION_DATE IS NULL )
</select>
<update
id=
"updateRK"
>
UPDATE hpjx.T_HPSC004
SET
ACTUAL_COMPLETION_DATE = #actualCompletionDate#,
<!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM = #actualCompletionNum#,
<!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#,
<!-- 实际完工重量 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_TIME = #updatedTime#
<!-- 更新时间 -->
WHERE
ID = #id#
</update>
<update
id=
"updateRK"
>
UPDATE hpjx.T_HPSC004
SET
ACTUAL_COMPLETION_DATE = #actualCompletionDate#,
<!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM = #actualCompletionNum#,
<!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#,
<!-- 实际完工重量 -->
<include
refid=
"updateRevise"
/>
WHERE ID = #id#
</update>
<!-- 行锁 -->
<update
id=
"lock"
>
...
...
@@ -369,10 +373,10 @@
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"prodOrderNo"
>
PROD
UCTION
_ORDER_NO = #prodOrderNo#
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prodOrderNos"
>
PROD
UCTION
_ORDER_NO IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"prodOrderNos"
>
#prodOrderNos[]#
</iterate>
PROD_ORDER_NO IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"prodOrderNos"
>
#prodOrderNos[]#
</iterate>
</isNotEmpty>
</update>
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC005.xml
View file @
69bea29a
<?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=
"HPSC005"
>
<sql
id=
"column"
>
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PRODUCTION_ORDER_NO as "productionOrderNo",
<!-- 生产订单号 -->
INVENT_RECORD_ID as "inventRecordId",
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode",
<!-- 部件编码 -->
PRDT_NAME as "prdtName",
<!-- 部件名称 -->
PLAN_COMPLETION_DATE as "planCompletionDate",
<!-- 计划完成日期 -->
NUM as "num",
<!-- 计划数量 -->
UNIT_WT as "unitWt",
<!-- 单重 -->
TOTAL_WT as "totalWt",
<!-- 计划重量 -->
STATUS as "status",
<!-- 状态 0-未派工,1-已派工 -->
ORG_NO as "orgNo",
<!-- 生产组编码 -->
ORG_NAME as "orgName",
<!-- 生产组名称 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
REMARK as "remark",
<!-- 备注 -->
FILE_PATH1 as "filePath1",
<!-- 文件地址1 -->
FILE_PATH2 as "filePath2",
<!-- 文件地址2 -->
FILE_PATH3 as "filePath3",
<!-- 文件地址3 -->
FILE_PATH4 as "filePath4",
<!-- 文件地址4 -->
FILE_PATH5 as "filePath5",
<!-- 文件地址5 -->
PRDT_SPEC as "prdtSpec",
PART_TYPE as "partType",
PART_CODE as "partCode",
PART_NAME as "partName",
PART_SPEC as "partSpec",
REMARK1 as "remark1",
PRDT_LENGTH as "prdtLength",
<!-- 长 -->
PRDT_WIDTH as "prdtWidth",
<!-- 宽 -->
PRDT_THICK as "prdtThick",
<!-- 厚 -->
PART_LENGTH as "partLength",
<!-- 长 -->
PART_WIDTH as "partWidth",
<!-- 宽 -->
PART_THICK as "partThick",
<!-- 厚 -->
FACTORY_CODE as "factoryCode",
<!-- 厂区编码 -->
FACTORY_NAME as "factoryName",
<!-- 厂区名称 -->
ASSIGNED_NUM as "assignedNum",
<!-- 已派工数量 -->
UNASSIGNED_NUM as "unassignedNum",
<!-- 待派工数量 -->
DOCUMENT_TYPE as "documentType"
<!-- 单据类型 0-非子母单;1-子母单 -->
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
PROD_ORDER_NO as "prodOrderNo",
<!-- 生产订单号 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PRDT_TYPE as "prdtType",
<!-- 产品类型 -->
PRDT_CODE as "prdtCode",
<!-- 产品编码 -->
PRDT_NAME as "prdtName",
<!-- 产品名称 -->
PRDT_LENGTH as "prdtLength",
<!-- 产品-长 -->
PRDT_WIDTH as "prdtWidth",
<!-- 产品-宽 -->
PRDT_THICK as "prdtThick",
<!-- 产品-厚 -->
PRDT_SPEC as "prdtSpec",
<!-- 产品规格 -->
PART_TYPE as "partType",
<!-- 零件类型 -->
PART_CODE as "partCode",
<!-- 零件编码 -->
PART_NAME as "partName",
<!-- 零件名称 -->
PART_LENGTH as "partLength",
<!-- 零件-长 -->
PART_WIDTH as "partWidth",
<!-- 零件-宽 -->
PART_THICK as "partThick",
<!-- 零件-厚 -->
PART_SPEC as "partSpec",
<!-- 零件规格 -->
PLAN_COMPLETION_DATE as "planCompletionDate",
<!-- 计划完成日期 -->
NUM as "num",
<!-- 计划数量 -->
UNIT_WT as "unitWt",
<!-- 计划单重 -->
TOTAL_WT as "totalWt",
<!-- 计划重量 -->
ASSIGNED_NUM as "assignedNum",
<!-- 已派工数量 -->
UNASSIGNED_NUM as "unassignedNum",
<!-- 待派工数量 -->
STATUS as "status",
<!-- 状态:0.计划中,1.不分派工,2.全部派工 -->
FACTORY_CODE as "factoryCode",
<!-- 厂区编码 -->
FACTORY_NAME as "factoryName",
<!-- 厂区名称 -->
ORG_NO as "orgNo",
<!-- 生产组编码 -->
ORG_NAME as "orgName",
<!-- 生产组名称 -->
DOCUMENT_TYPE as "documentType",
<!-- 单据类型 0-非子母单;1-子母单 -->
REMARK as "remark",
<!-- 备注 -->
REMARK1 as "remark1",
<!-- 备注 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
FILE_PATH1 as "filePath1",
<!-- 文件地址1 -->
FILE_PATH2 as "filePath2",
<!-- 文件地址2 -->
FILE_PATH3 as "filePath3",
<!-- 文件地址3 -->
FILE_PATH4 as "filePath4",
<!-- 文件地址4 -->
FILE_PATH5 as "filePath5",
<!-- 文件地址5 -->
INVENT_RECORD_ID as "inventRecordId"
<!-- 存货档案ID -->
</sql>
<sql
id=
"condition"
>
...
...
@@ -54,79 +57,64 @@
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE like CONCAT('%', #projCode#, '%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE like CONCAT('%', #projCode#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME like CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"production
OrderNo"
>
PROD
UCTION_ORDER_NO LIKE CONCAT('%', #production
OrderNo#, '%')
<isNotEmpty
prepend=
" AND "
property=
"prod
OrderNo"
>
PROD
_ORDER_NO LIKE CONCAT('%', #prod
OrderNo#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtType"
>
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtCode"
>
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"partName"
>
<isNotEmpty
prepend=
" AND "
property=
"prdtType"
>
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtCode"
>
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"partName"
>
PART_NAME LIKE CONCAT('%', #partName#, '%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtName"
>
PRDT_NAME LIKE CONCAT('%', #prdtName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planCompletionDate"
>
PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"num"
>
NUM = #num#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planCompletionDate"
>
PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"num"
>
NUM = #num#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"totalWt"
>
TOTAL_WT = #totalWt#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"orgNo"
>
ORG_NO like CONCAT('%', #orgNo#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"orgName"
>
ORG_NAME like CONCAT('%', #orgName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdBy"
>
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTime"
>
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedBy"
>
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"remark"
>
REMARK = #remark#
</isNotEmpty>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"orgNo"
>
ORG_NO like CONCAT('%', #orgNo#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"orgName"
>
ORG_NAME like CONCAT('%', #orgName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdBy"
>
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTime"
>
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedBy"
>
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath1"
>
FILE_PATH1 = #filePath1#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath2"
>
FILE_PATH2 = #filePath2#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath3"
>
FILE_PATH3 = #filePath3#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath4"
>
FILE_PATH4 = #filePath4#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath5"
>
FILE_PATH5 = #filePath5#
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
...
...
@@ -136,151 +124,168 @@
UPDATED_TIME = #updatedTime#
<!-- 修改时间 -->
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC005"
>
SELECT
<include
refid=
"column"
/>
FROM ${hpjxSchema}.T_HPSC005 WHERE 1=1
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID asc
</isEmpty>
</dynamic>
<sql
id=
"order"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"order"
>
$order$
</isNotEmpty>
<isEmpty
property=
"order"
>
ID asc
</isEmpty>
</dynamic>
</sql>
</select>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC005"
>
SELECT
<include
refid=
"column"
/>
FROM ${hpjxSchema}.T_HPSC005
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"order"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC005 WHERE 1=1
<include
refid=
"condition"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC005 WHERE 1=1
<include
refid=
"condition"
/>
</select>
<insert
id=
"insert"
>
INSERT INTO ${hpjxSchema}.T_HPSC005 (ID,
COMPANY_CODE,
<!-- 企业编码 预留 -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
PRODUCTION_ORDER_NO,
<!-- 生产订单号 -->
INVENT_RECORD_ID,
PRDT_TYPE,
PRDT_CODE,
<!-- 部件编码 -->
PRDT_NAME,
<!-- 部件名称 -->
PLAN_COMPLETION_DATE,
<!-- 计划完成日期 -->
NUM,
<!-- 计划数量 -->
UNIT_WT,
TOTAL_WT,
<!-- 计划重量 -->
STATUS,
<!-- 状态 0-未派工,1-已派工 -->
ORG_NO,
<!-- 生产组编码 -->
ORG_NAME,
<!-- 生产组名称 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_TIME,
<!-- 创建时间 -->
UPDATED_BY,
<!-- 更新人 -->
UPDATED_TIME,
<!-- 更新时间 -->
DEP_CODE,
<!-- 部门编码 -->
REMARK,
<!-- 备注 -->
FILE_PATH1,
<!-- 文件地址1 -->
FILE_PATH2,
<!-- 文件地址2 -->
FILE_PATH3,
<!-- 文件地址3 -->
FILE_PATH4,
<!-- 文件地址4 -->
FILE_PATH5,
<!-- 文件地址5 -->
PRDT_SPEC,
PART_TYPE,
PART_CODE,
PART_NAME,
PART_SPEC,
REMARK1,
PRDT_LENGTH,
<!-- 长 -->
PRDT_WIDTH,
<!-- 宽 -->
PRDT_THICK,
<!-- 厚 -->
PART_LENGTH,
<!-- 长 -->
PART_WIDTH,
<!-- 宽 -->
PART_THICK,
<!-- 厚 -->
FACTORY_CODE,
<!-- 厂区编码 -->
FACTORY_NAME,
<!-- 厂区名称 -->
ASSIGNED_NUM,UNASSIGNED_NUM,DOCUMENT_TYPE)
VALUES (#id#, #companyCode#, #projCode#, #projName#, #productionOrderNo#,#inventRecordId#, #prdtType#, #prdtCode#,
#prdtName#, #planCompletionDate#, #num#,#unitWt#, #totalWt#, #status#, #orgNo#, #orgName#, #createdBy#, #createdTime#,
#updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#,
#prdtSpec#,#partType#,#partCode#,#partName#,#partSpec#,#remark1#,
#prdtLength#,#prdtWidth#,#prdtThick#,#partLength#,#partWidth#,#partThick#, #factoryCode#, #factoryName#,
0, #num#,0)
</insert>
INSERT INTO ${hpjxSchema}.T_HPSC005 (
COMPANY_CODE,
<!-- 企业编码 预留 -->
DEP_CODE,
<!-- 部门编码 -->
PROD_ORDER_NO,
<!-- 生产订单号 -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
PRDT_TYPE,
<!-- 产品类型 -->
PRDT_CODE,
<!-- 产品编码 -->
PRDT_NAME,
<!-- 产品名称 -->
PRDT_LENGTH,
<!-- 产品-长 -->
PRDT_WIDTH,
<!-- 产品-宽 -->
PRDT_THICK,
<!-- 产品-厚 -->
PRDT_SPEC,
<!-- 产品规格 -->
PART_TYPE,
<!-- 零件类型 -->
PART_CODE,
<!-- 零件编码 -->
PART_NAME,
<!-- 零件名称 -->
PART_LENGTH,
<!-- 零件-长 -->
PART_WIDTH,
<!-- 零件-宽 -->
PART_THICK,
<!-- 零件-厚 -->
PART_SPEC,
<!-- 零件规格 -->
PLAN_COMPLETION_DATE,
<!-- 计划完成日期 -->
NUM,
<!-- 计划数量 -->
UNIT_WT,
<!-- 计划单重 -->
TOTAL_WT,
<!-- 计划重量 -->
ASSIGNED_NUM,
<!-- 已派工数量 -->
UNASSIGNED_NUM,
<!-- 待派工数量 -->
STATUS,
<!-- 状态:0.计划中,1.不分派工,2.全部派工 -->
FACTORY_CODE,
<!-- 厂区编码 -->
FACTORY_NAME,
<!-- 厂区名称 -->
ORG_NO,
<!-- 生产组编码 -->
ORG_NAME,
<!-- 生产组名称 -->
DOCUMENT_TYPE,
<!-- 单据类型 0-非子母单;1-子母单 -->
REMARK,
<!-- 备注 -->
REMARK1,
<!-- 备注 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME,
<!-- 创建时间 -->
FILE_PATH1,
<!-- 文件地址1 -->
FILE_PATH2,
<!-- 文件地址2 -->
FILE_PATH3,
<!-- 文件地址3 -->
FILE_PATH4,
<!-- 文件地址4 -->
FILE_PATH5,
<!-- 文件地址5 -->
INVENT_RECORD_ID
<!-- 存货档案ID -->
) VALUES (
#companyCode#, #depCode#, #prodOrderNo#, #projCode#,
#projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#,
#prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#,
#partWidth#, #partThick#, #partSpec#, #planCompletionDate#, #num#, #unitWt#,
#totalWt#, #assignedNum#, #unassignedNum#, #status#, #factoryCode#, #factoryName#,
#orgNo#, #orgName#, #documentType#, #remark#, #remark1#, #createdBy#, #createdName#,
#createdTime#, #filePath1#, #filePath2#,
#filePath3#, #filePath4#, #filePath5#, #inventRecordId#)
</insert>
<delete
id=
"delete"
>
DELETE FROM ${hpjxSchema}.T_HPSC005 WHERE
ID = #id#
DELETE FROM ${hpjxSchema}.T_HPSC005 WHERE ID = #id#
</delete>
<update
id=
"update"
>
UPDATE ${hpjxSchema}.T_HPSC005
SET
COMPANY_CODE = #companyCode#,
<!-- 企业编码 预留 -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PRODUCTION_ORDER_NO = #productionOrderNo#,
<!-- 生产订单号 -->
PRDT_TYPE = #prdtType#,
PRDT_CODE = #prdtCode#,
<!-- 部件编码 -->
PRDT_NAME = #prdtName#,
<!-- 部件名称 -->
PLAN_COMPLETION_DATE = #planCompletionDate#,
<!-- 计划完成日期 -->
NUM = #num#,
<!-- 计划数量 -->
UNIT_WT = #unitWt#,
<!-- 单重 -->
TOTAL_WT = #totalWt#,
<!-- 计划重量 -->
STATUS = #status#,
<!-- 状态 0-未派工,1-已派工 -->
ORG_NO = #orgNo#,
<!-- 生产组编码 -->
ORG_NAME = #orgName#,
<!-- 生产组名称 -->
CREATED_BY = #createdBy#,
<!-- 创建人 -->
CREATED_TIME = #createdTime#,
<!-- 创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
DEP_CODE = #depCode#,
<!-- 部门编码 -->
REMARK = #remark#,
<!-- 备注 -->
FILE_PATH1 = #filePath1#,
<!-- 文件地址1 -->
FILE_PATH2 = #filePath2#,
<!-- 文件地址2 -->
FILE_PATH3 = #filePath3#,
<!-- 文件地址3 -->
FILE_PATH4 = #filePath4#,
<!-- 文件地址4 -->
FILE_PATH5 = #filePath5#,
<!-- 文件地址5 -->
FACTORY_CODE = #factoryCode#,
<!-- 厂区编码 -->
FACTORY_NAME = #factoryName#
<!-- 厂区名称 -->
WHERE
ID = #id#
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PRDT_TYPE = #prdtType#,
<!-- 产品类型 -->
PRDT_CODE = #prdtCode#,
<!-- 产品编码 -->
PRDT_NAME = #prdtName#,
<!-- 产品名称 -->
PRDT_LENGTH = #prdtLength#,
<!-- 产品-长 -->
PRDT_WIDTH = #prdtWidth#,
<!-- 产品-宽 -->
PRDT_THICK = #prdtThick#,
<!-- 产品-厚 -->
PRDT_SPEC = #prdtSpec#,
<!-- 产品规格 -->
PART_TYPE = #partType#,
<!-- 零件类型 -->
PART_CODE = #partCode#,
<!-- 零件编码 -->
PART_NAME = #partName#,
<!-- 零件名称 -->
PART_LENGTH = #partLength#,
<!-- 零件-长 -->
PART_WIDTH = #partWidth#,
<!-- 零件-宽 -->
PART_THICK = #partThick#,
<!-- 零件-厚 -->
PART_SPEC = #partSpec#,
<!-- 零件规格 -->
PLAN_COMPLETION_DATE = #planCompletionDate#,
<!-- 计划完成日期 -->
NUM = #num#,
<!-- 计划数量 -->
UNIT_WT = #unitWt#,
<!-- 计划单重 -->
TOTAL_WT = #totalWt#,
<!-- 计划重量 -->
ASSIGNED_NUM = #assignedNum#,
<!-- 已派工数量 -->
UNASSIGNED_NUM = #unassignedNum#,
<!-- 待派工数量 -->
STATUS = #status#,
<!-- 状态:0.计划中,1.不分派工,2.全部派工 -->
FACTORY_CODE = #factoryCode#,
<!-- 厂区编码 -->
FACTORY_NAME = #factoryName#,
<!-- 厂区名称 -->
ORG_NO = #orgNo#,
<!-- 生产组编码 -->
ORG_NAME = #orgName#,
<!-- 生产组名称 -->
DOCUMENT_TYPE = #documentType#,
<!-- 单据类型 0-非子母单;1-子母单 -->
REMARK = #remark#,
<!-- 备注 -->
REMARK1 = #remark1#,
<!-- 备注 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
FILE_PATH1 = #filePath1#,
<!-- 文件地址1 -->
FILE_PATH2 = #filePath2#,
<!-- 文件地址2 -->
FILE_PATH3 = #filePath3#,
<!-- 文件地址3 -->
FILE_PATH4 = #filePath4#,
<!-- 文件地址4 -->
FILE_PATH5 = #filePath5#,
<!-- 文件地址5 -->
INVENT_RECORD_ID = #inventRecordId#
<!-- 存货档案ID -->
WHERE ID = #id#
</update>
<update
id=
"updateAssign"
>
UPDATE ${hpjxSchema}.T_HPSC005
SET
STATUS = #status#,
<!-- 状态 0-未派工,1-已派工 -->
ORG_NO = #orgNo#,
<!-- 生产组编码 -->
FACTORY_CODE = #factoryCode#,
<!-- 厂区编码 -->
FACTORY_NAME = #factoryName#,
<!-- 厂区名称 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_TIME = #updatedTime#
<!-- 更新时间 -->
WHERE
ID = #id#
UPDATE ${hpjxSchema}.T_HPSC005
SET
STATUS = #status#,
<!-- 状态 0-未派工,1-已派工 -->
ORG_NO = #orgNo#,
<!-- 生产组编码 -->
FACTORY_CODE = #factoryCode#,
<!-- 厂区编码 -->
FACTORY_NAME = #factoryName#,
<!-- 厂区名称 -->
<include
refid=
"updateRevise"
/>
WHERE ID = #id#
</update>
<update
id=
"updateAssignNum"
>
UPDATE ${hpjxSchema}.T_HPSC005
SET
STATUS = #status#,
<!-- 状态 0-未派工,1-部分派工,2-全部派工 -->
ASSIGNED_NUM = #assignedNum#,
<!-- 已派工数量 -->
UNASSIGNED_NUM = #unassignedNum#,
<!-- 待派工数量 -->
DOCUMENT_TYPE = 1,
<include
refid=
"updateRevise"
/>
WHERE ID = #id#
UPDATE ${hpjxSchema}.T_HPSC005
SET
STATUS = #status#,
<!-- 状态 0-未派工,1-部分派工,2-全部派工 -->
ASSIGNED_NUM = #assignedNum#,
<!-- 已派工数量 -->
UNASSIGNED_NUM = #unassignedNum#,
<!-- 待派工数量 -->
DOCUMENT_TYPE = 1,
<include
refid=
"updateRevise"
/>
WHERE ID = #id#
</update>
<select
id=
"getEntity"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC005"
>
SELECT
<include
refid=
"column"
/>
FROM ${hpjxSchema}.T_HPSC005 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"productionOrderNo"
>
PRODUCTION_ORDER_NO like CONCAT('%', #productionOrderNo#, '%')
</isNotEmpty>
<select
id=
"getEntity"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC005"
>
SELECT
<include
refid=
"column"
/>
FROM ${hpjxSchema}.T_HPSC005
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"prodOrderNo"
>
PROD_ORDER_NO like CONCAT('%', #prodOrderNo#, '%')
</isNotEmpty>
</select>
<!-- 行锁 -->
...
...
@@ -289,10 +294,10 @@
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"prodOrderNo"
>
PROD
UCTION
_ORDER_NO = #prodOrderNo#
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prodOrderNos"
>
PROD
UCTION
_ORDER_NO IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"prodOrderNos"
>
#prodOrderNos[]#
</iterate>
PROD_ORDER_NO IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"prodOrderNos"
>
#prodOrderNos[]#
</iterate>
</isNotEmpty>
</update>
...
...
@@ -321,7 +326,7 @@
(CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.ORG_NO ELSE A.ORG_NO END) AS "orgNo",
(CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.ORG_NAME ELSE A.ORG_NAME END) AS "orgName"
FROM HPJX.T_HPSC005 A
LEFT JOIN HPJX.T_HPSC005A B ON A.PROD
UCTION
_ORDER_NO = B.PROD_ORDER_NO
LEFT JOIN HPJX.T_HPSC005A B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC005B.xml
View file @
69bea29a
...
...
@@ -6,7 +6,7 @@
A.ID as "id",
A.PROJ_CODE as "projCode",
<!-- 项目编码 -->
A.PROJ_NAME as "projName",
<!-- 项目名称 -->
A.PROD
UCTION_ORDER_NO as "production
OrderNo",
<!-- 生产订单号 -->
A.PROD
_ORDER_NO as "prod
OrderNo",
<!-- 生产订单号 -->
A.PRDT_CODE as "prdtCode",
<!-- 部件编码 -->
A.PRDT_NAME as "prdtName",
<!-- 部件名称 -->
A.PRDT_SPEC as "prdtSpec",
...
...
@@ -43,8 +43,8 @@
<isNotEmpty
prepend=
" AND "
property=
"id"
>
A.ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prod
uction
OrderNo"
>
A.PROD
UCTION_ORDER_NO LIKE CONCAT('%', #production
OrderNo#, '%')
<isNotEmpty
prepend=
" AND "
property=
"prodOrderNo"
>
A.PROD
_ORDER_NO LIKE CONCAT('%', #prod
OrderNo#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
A.PROJ_CODE = #projCode#
...
...
src/main/java/com/baosight/hpjx/hp/sc/tools/HPSCTools.java
View file @
69bea29a
...
...
@@ -3,22 +3,21 @@ 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.kc.domain.HPKC001
;
import
com.baosight.hpjx.hp.kc.domain.HPKC003
;
import
com.baosight.hpjx.hp.kc.domain.HPKC005
;
import
com.baosight.hpjx.hp.kc.domain.HPKC010
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ004
;
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.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.ObjectUtils
;
import
com.baosight.hpjx.util.StringUtils
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -131,7 +130,7 @@ public class HPSCTools {
* @param prdtCode
* @return
*/
public
static
HPSC002
get
(
String
prdtCode
)
{
public
static
HPSC002
get
ByPrdt
(
String
prdtCode
)
{
AssertUtils
.
isEmpty
(
prdtCode
,
"部件编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"prdtCode"
,
prdtCode
);
...
...
@@ -139,6 +138,35 @@ public class HPSCTools {
AssertUtils
.
isNull
(
results
,
String
.
format
(
"部件编码[%s]信息不存在"
,
prdtCode
));
return
results
.
get
(
0
);
}
/**
* 查询节点
*
* @param id
* @return
*/
public
static
HPSC002
get
(
Long
id
)
{
AssertUtils
.
isNull
(
id
,
"节点ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"id"
,
id
);
List
<
HPSC002
>
results
=
DaoBase
.
getInstance
().
query
(
"HPSC002.queryEntityByParentPrtdCode"
,
queryMap
);
AssertUtils
.
isNull
(
results
,
String
.
format
(
"节点ID[%s]信息不存在"
,
id
));
return
results
.
get
(
0
);
}
/**
* 查询叶子节点
*
* @param parentId
* @return
*/
public
static
List
<
HPSC002
>
queryByParent
(
String
parentId
)
{
AssertUtils
.
isEmpty
(
parentId
,
"节点ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"parentId"
,
parentId
);
return
DaoBase
.
getInstance
().
query
(
"HPSC002.queryEntityByParentPrtdCode"
,
queryMap
);
}
}
/**
...
...
@@ -163,6 +191,48 @@ public class HPSCTools {
AssertUtils
.
isNull
(
results
,
String
.
format
(
"物料ID[%s]信息不存在"
,
id
));
return
results
.
get
(
0
);
}
/**
* 查询
*
* @param matId 物料ID
* @return
*/
public
static
HPSC003
queryByMat
(
Long
matId
)
{
AssertUtils
.
isNull
(
matId
,
"物料ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"matId"
,
matId
);
List
<
HPSC003
>
results
=
DaoBase
.
getInstance
().
query
(
HPSC003
.
QUERY
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
/**
* 修改状态
*
* @param id
* @param status
*/
public
static
void
updateStatus
(
Long
id
,
Integer
status
)
{
AssertUtils
.
isNull
(
id
,
"节点ID不能为空"
);
Map
map
=
new
HashMap
();
map
.
put
(
"id"
,
id
);
map
.
put
(
"status"
,
status
);
DaoUtils
.
update
(
HPSqlConstant
.
HPSC003
.
UPDATE_STATUS
,
map
);
}
/**
* 修改计划完成时间
*
* @param planInfoNo
* @param planCompletionDate
*/
public
static
void
updateDate
(
String
planInfoNo
,
String
planCompletionDate
)
{
AssertUtils
.
isNull
(
planInfoNo
,
"计划号不能为空"
);
Map
map
=
new
HashMap
();
map
.
put
(
"planInfoNo"
,
planInfoNo
);
map
.
put
(
"planCompletionDate"
,
planCompletionDate
);
DaoUtils
.
update
(
HPSqlConstant
.
HPSC003
.
UPDATE_DATE
,
map
);
}
}
/**
...
...
@@ -204,6 +274,21 @@ public class HPSCTools {
}
/**
* 根据材料号删除
*
* @param matId
* @return
*/
public
static
void
deleteByMat
(
Long
matId
)
{
if
(
matId
==
null
)
{
return
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"matId"
,
matId
);
DaoBase
.
getInstance
().
update
(
HPSqlConstant
.
HPSC004
.
DELETE_BY_MAT
,
queryMap
);
}
/**
* 查询
*
* @param prodOrderNo
...
...
@@ -212,11 +297,38 @@ public class HPSCTools {
public
static
HPSC004
get
(
String
prodOrderNo
)
{
AssertUtils
.
isEmpty
(
prodOrderNo
,
"生产订单号不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"prod
uction
OrderNo"
,
prodOrderNo
);
queryMap
.
put
(
"prodOrderNo"
,
prodOrderNo
);
List
<
HPSC004
>
results
=
DaoBase
.
getInstance
().
query
(
HPSC004
.
QUERY
,
queryMap
);
AssertUtils
.
isNull
(
results
,
String
.
format
(
"生产订单号[%s]信息不存在"
,
prodOrderNo
));
return
results
.
get
(
0
);
}
/**
* 查询
*
* @param matId 物料ID
* @return
*/
public
static
HPSC004
queryByMat
(
Long
matId
)
{
AssertUtils
.
isNull
(
matId
,
"物料ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"matId"
,
matId
);
List
<
HPSC004
>
results
=
DaoBase
.
getInstance
().
query
(
HPSC004
.
QUERY
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
/**
* 根据父级ID查询
*
* @param parentId
* @return
*/
public
static
List
<
HPSC004
>
queryByParent
(
String
parentId
)
{
AssertUtils
.
isNull
(
parentId
,
"计划ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"parentId"
,
parentId
);
return
DaoBase
.
getInstance
().
query
(
HPSC004
.
QUERY
,
queryMap
);
}
}
/**
...
...
@@ -327,7 +439,7 @@ public class HPSCTools {
public
static
HPSC005
get
(
String
prodOrderNo
)
{
AssertUtils
.
isEmpty
(
prodOrderNo
,
"生产订单号不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"prod
uction
OrderNo"
,
prodOrderNo
);
queryMap
.
put
(
"prodOrderNo"
,
prodOrderNo
);
List
<
HPSC005
>
results
=
DaoBase
.
getInstance
().
query
(
HPSC005
.
QUERY
,
queryMap
);
AssertUtils
.
isNull
(
results
,
String
.
format
(
"生产订单[%s]信息不存在"
,
prodOrderNo
));
return
results
.
get
(
0
);
...
...
@@ -474,8 +586,6 @@ public class HPSCTools {
/**
* 更新已完成数量
*
* @param prodTaskNo
* @param completeNum
*/
public
static
void
updateCompleteNum
(
Long
id
,
BigDecimal
actualCompletionNum
,
BigDecimal
actualCompletionTotalWt
,
Integer
status
,
String
actualCompletionDate
)
{
...
...
src/main/java/com/baosight/hpjx/util/DateUtils.java
View file @
69bea29a
...
...
@@ -214,7 +214,10 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
if
(
StringUtils
.
isBlank
(
dateTime
))
{
return
dateTime
;
}
return
dateTime
.
replaceAll
(
"-"
,
""
).
replaceAll
(
":"
,
""
).
replaceAll
(
" "
,
""
);
return
dateTime
.
replaceAll
(
"-"
,
""
)
.
replaceAll
(
"/"
,
""
)
.
replaceAll
(
":"
,
""
)
.
replaceAll
(
" "
,
""
);
}
}
src/main/webapp/HP/SC/HPSC002.js
View file @
69bea29a
...
...
@@ -192,7 +192,7 @@ $(function () {
*/
onDelete
:
function
(
e
)
{
// 不向后台保存
console
.
log
(
e
)
console
.
log
(
"DELETE -> "
,
e
)
var
tree
=
$
(
"#materialTree"
).
data
(
"kendoTreeView"
);
var
inInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HPSC002"
,
"queryTreeNode"
,
inInfo
,
{
//传入参数
...
...
@@ -213,7 +213,6 @@ $(function () {
field
:
"operator"
,
title
:
"操作"
,
template
:
function
(
item
)
{
console
.
log
(
item
)
let
auditStatus
=
item
.
status
;
let
lv
=
item
.
lv
let
template
=
''
;
...
...
src/main/webapp/HP/SC/HPSC002.jsp
View file @
69bea29a
...
...
@@ -44,8 +44,8 @@
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"single"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"level"
cname=
"层级"
hidden=
"true"
/>
<EF:EFColumn
enable=
"false"
ename=
"projCode"
cname=
"项目编码"
/>
<EF:EFColumn
enable=
"false"
ename=
"projName"
cname=
"项目名称"
/>
<EF:EFColumn
enable=
"false"
ename=
"projCode"
cname=
"项目编码"
hidden=
"true"
/>
<EF:EFColumn
enable=
"false"
ename=
"projName"
cname=
"项目名称"
hidden=
"true"
/>
<
%
--
<
EF:EFComboColumn
cname=
"部件类型"
ename=
"prdtType"
width=
"90"
align=
"center"
required=
"true"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
...
...
@@ -107,4 +107,4 @@
let
ctx
=
"${ctx}"
;
</script>
<script
src=
"${ctx}/HP/SC/HPSC002.js"
></script>
\ No newline at end of file
<script
src=
"${ctx}/HP/SC/HPSC002.js"
></script>
src/main/webapp/HP/SC/HPSC003.js
View file @
69bea29a
$
(
function
()
{
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
query
();
});
$
(
"#QUERY"
).
on
(
"click"
,
query
);
IPLATUI
.
EFGrid
=
{
"result"
:
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
50
,
70
,
100
],
},
columns
:
[
{
field
:
"operator"
,
template
:
function
(
item
)
{
console
.
log
(
item
)
let
auditStatus
=
item
.
status
;
let
template
=
''
;
if
(
item
.
matId
!=
null
){
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
matId
+
')" >附件清单</a>'
;
}
if
(
auditStatus
==
0
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+
'onclick="check('
+
item
.
id
+
',1)" >提交</a>'
;
}
/*else {
template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',0)" >撤回</a>';
}*/
return
template
;
}
},
{
field
:
"planCompletionDate"
,
template
:
function
(
item
){
let
auditStatus
=
item
.
status
;
let
template
=
''
;
if
(
auditStatus
==
1
){
template
+=
'this.blur();'
;
}
return
template
;
}
}
],
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'update'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'insert'
){
query
();
}
},
onRowClick
:
function
(
e
)
{
var
block
=
detailGrid
.
getEiBlock
();
if
(
block
!=
null
)
{
block
.
setRows
([]);
detailGrid
.
setEiBlock
(
block
);
}
var
info
=
new
EiInfo
()
var
parentId
=
e
.
model
[
'planInfoNo'
];
info
.
set
(
"parentId"
,
parentId
);
EiCommunicator
.
send
(
"HPSC004"
,
"queryDetail"
,
info
,{
onSuccess
:
function
(
ei
){
//返回结果集
detailGrid
.
setEiInfo
(
ei
);
},
onFail
:
function
(
ei
){}
},{
async
:
false
});
},
},
"result"
:
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
50
,
70
,
100
],
},
columns
:
[{
field
:
"operator"
,
template
:
function
(
item
)
{
console
.
log
(
item
)
let
auditStatus
=
item
.
status
;
let
template
=
''
;
if
(
item
.
matId
!=
null
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
matId
+
')" >附件清单</a>'
;
}
if
(
auditStatus
==
0
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+
'onclick="check('
+
item
.
id
+
',1)" >提交</a>'
;
}
/*else {
template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',0)" >撤回</a>';
}*/
return
template
;
}
},
{
field
:
"planCompletionDate"
,
template
:
function
(
item
)
{
let
auditStatus
=
item
.
status
;
let
template
=
''
;
if
(
auditStatus
==
1
)
{
template
+=
'this.blur();'
;
}
return
template
;
}
}],
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'update'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'insert'
)
{
query
();
}
},
onRowClick
:
function
(
e
)
{
var
block
=
detailGrid
.
getEiBlock
();
if
(
block
!=
null
)
{
block
.
setRows
([]);
detailGrid
.
setEiBlock
(
block
);
}
var
info
=
new
EiInfo
()
var
parentId
=
e
.
model
[
'planInfoNo'
];
info
.
set
(
"parentId"
,
parentId
);
EiCommunicator
.
send
(
"HPSC004"
,
"queryDetail"
,
info
,
{
onSuccess
:
function
(
ei
)
{
//返回结果集
detailGrid
.
setEiInfo
(
ei
);
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
},
},
"detail"
:{
toolbarConfig
:
{
// hidden: false, // true时,不显示功能按钮,但保留setting导出按钮
...
...
@@ -103,7 +98,7 @@ $(function () {
var
btnNode
=
$
(
this
);
//禁用按钮
btnNode
.
attr
(
"disabled"
,
true
);
IPLAT
.
submitNode
(
$
(
"#HPSC003"
),
"HPSC003"
,
"update
HPSC0004
"
,
{
IPLAT
.
submitNode
(
$
(
"#HPSC003"
),
"HPSC003"
,
"update
PlanDetail
"
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
-
1
)
{
NotificationUtil
(
ei
,
"error"
);
...
...
@@ -126,7 +121,6 @@ $(function () {
btnNode
.
attr
(
"disabled"
,
false
);
}
});
},
afterEdit
:
function
(
e
)
{
if
(
e
.
field
===
"planCompletionDate"
)
{
...
...
@@ -141,24 +135,20 @@ $(function () {
}
}
},
columns
:
[
{
field
:
"operator"
,
title
:
"操作"
,
template
:
function
(
item
)
{
let
filePath1
=
item
.
filePath1
;
let
template
=
''
;
if
(
filePath1
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
filePath1
+
')" >附件清单</a>'
;
}
return
template
}
}
],
columns
:
[{
field
:
"operator"
,
title
:
"操作"
,
template
:
function
(
item
)
{
let
filePath1
=
item
.
filePath1
;
let
template
=
''
;
if
(
filePath1
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
filePath1
+
')" >附件清单</a>'
;
}
return
template
}
}]
}
}
//部件类型下拉联动
...
...
@@ -223,7 +213,7 @@ function check(id, auditStatus) {
}
else
{
// 提交通过,生成
EiCommunicator
.
send
(
'HPSC003'
,
'
checkHPSC0003
'
,
inEiInfo
,
{
EiCommunicator
.
send
(
'HPSC003'
,
'
submitPlan
'
,
inEiInfo
,
{
onSuccess
(
response
)
{
NotificationUtil
(
response
.
msg
);
resultGrid
.
dataSource
.
page
(
1
);
...
...
@@ -272,8 +262,9 @@ function check(id, auditStatus) {
}
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
resultGrid
.
dataSource
.
page
(
1
);
}
function
check_time
(
model
,
rows
){
...
...
src/main/webapp/HP/SC/HPSC003.jsp
View file @
69bea29a
...
...
@@ -4,21 +4,12 @@
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<head>
<
%
--
<
link
rel=
"stylesheet"
href=
"${ctx}/css/simulatedOperation.css"
/>
--%>
</head>
<EF:EFPage
title=
"生产计划"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
align-item=
"center"
><
%
--
type=
"query"
efRegionShowClear=
"true"
efRegionSave=
"true"
--
%
>
<div
class=
"row"
>
<
%
--
blockId=
"inqu_status"
--
%
>
<EF:EFPage
title=
"生产计划"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
align-item=
"center"
>
<div
class=
"row"
>
<EF:EFInput
blockId=
"inqu_status"
ename=
"projCode"
colWidth=
"3"
cname=
"项目编号:"
/>
<EF:EFInput
blockId=
"inqu_status"
ename=
"projName"
colWidth=
"3"
cname=
"项目名称:"
/>
<
%
--
<
EF:EFSelect
ename=
"inqu_status-0-prdtType"
cname=
"部件类型"
colWidth=
"3"
filter=
"contains"
template=
"#=textField#"
valueTemplate=
"#=textField#"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
condition=
"ITEM_CODE IN ('3','4')"
/>
</EF:EFSelect>
--%>
<EF:EFSelect
ename=
"inqu_status-0-prdtCode"
cname=
"部件名称"
filter=
"contains"
required=
"false"
colWidth=
"3"
template=
"#=textField#"
valueTemplate=
"#=valueField#"
defaultValue=
"请选择"
>
<EF:EFOption
label=
"请选择"
value=
""
/>
...
...
@@ -32,7 +23,6 @@
<EF:EFOption
label=
"已提交"
value=
"1"
/>
</EF:EFSelect>
</div>
<
%
--
<
EF:EFButton
ename=
"QUERY"
cname=
"查询"
row=
"1"
class=
"btn-align-right"
></EF:EFButton>
--%>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"基本信息"
>
...
...
@@ -48,8 +38,8 @@
<EF:EFColumn
enable=
"false"
ename=
"prdtName"
cname=
"部件名称"
readonly=
"true"
/>
<EF:EFColumn
enable=
"false"
ename=
"spec"
cname=
"规格"
readonly=
"true"
/>
<EF:EFColumn
enable=
"false"
ename=
"remark"
cname=
"备注"
readonly=
"true"
/>
<EF:EFColumn
ename=
"planCompletionDate"
cname=
"计划完成日期"
editType=
"date"
dateFormat=
"yyyy/MM/dd"
width=
"150
"
required=
'true'
/>
<EF:EFColumn
ename=
"planCompletionDate"
cname=
"计划完成日期"
width=
"150"
editType=
"date
"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
required=
'true'
/>
<EF:EFColumn
enable=
"false"
ename=
"schedule"
cname=
"生产完工进度"
format=
"{0:N2}"
readonly=
"true"
/>
<EF:EFComboColumn
enable=
"false"
ename=
"status"
cname=
"状态"
>
<EF:EFOption
label=
"未提交"
value=
"0"
/>
...
...
@@ -73,24 +63,18 @@
<EF:EFColumn
enable=
"false"
ename=
"prdtName"
readonly=
"true"
cname=
"零部件名称"
/>
<EF:EFColumn
enable=
"false"
ename=
"spec"
cname=
"规格"
readonly=
"true"
/>
<EF:EFColumn
enable=
"false"
ename=
"remark"
cname=
"备注"
readonly=
"true"
/>
<
%
--
<
EF:EFComboColumn
enable=
"false"
ename=
"delStatus"
cname=
"状态"
>
--%>
<
%
--
<
EF:EFOption
label=
"已删除"
value=
"0"
/>
--%>
<
%
--
<
EF:EFOption
label=
"启用"
value=
"1"
/>
--%>
<
%
--
</
EF:EFComboColumn
>
--%>
<EF:EFColumn
enable=
"false"
ename=
"num"
readonly=
"true"
cname=
"数量"
/>
<EF:EFColumn
enable=
"false"
ename=
"unitWt"
readonly=
"true"
cname=
"单重"
/>
<EF:EFColumn
ename=
"totalWt"
cname=
"总重"
enable=
"false"
/>
<EF:EFColumn
ename=
"planCommentDate"
required=
'true'
cname=
"计划开始时间"
editType=
"date"
dateFormat=
"yyyy/MM/dd"
width=
"150"
/>
<EF:EFColumn
ename=
"planCompletionDate"
required=
'true'
cname=
"计划结束时间"
editType=
"date"
dateFormat=
"yyyy/MM/dd"
width=
"150"
/>
<EF:EFColumn
ename=
"actualCompletionDate"
cname=
"完成时间"
editType=
"date"
dateFormat=
"yyyy/MM/dd"
width=
"150"
enable=
"false"
/>
<EF:EFColumn
ename=
"planCommentDate"
required=
'true'
cname=
"计划开始时间"
width=
"150"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
<EF:EFColumn
ename=
"planCompletionDate"
required=
'true'
cname=
"计划结束时间"
width=
"150"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
<EF:EFColumn
ename=
"actualCompletionDate"
cname=
"完成时间"
editType=
"date"
dateFormat=
"yyyy/MM/dd"
width=
"150"
enable=
"false"
/>
<EF:EFColumn
enable=
"false"
ename=
"actualCompletionNum"
cname=
"完成数量"
readonly=
"true"
/>
<EF:EFColumn
enable=
"false"
ename=
"actualCompletionUnitWt"
cname=
"完成总重"
readonly=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
width=
"100"
enable=
"false"
readonly=
"false"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var
ctx
=
"${ctx}"
;
</script>
<script
src=
"${ctx}/HP/SC/HPSC003.js"
></script>
src/main/webapp/HP/SC/HPSC005.js
View file @
69bea29a
...
...
@@ -19,7 +19,7 @@ $(function () {
field
:
"operator"
,
template
:
function
(
item
)
{
let
status
=
item
.
status
;
let
prodOrderNo
=
item
.
prod
uction
OrderNo
;
let
prodOrderNo
=
item
.
prodOrderNo
;
let
filePath1
=
item
.
filePath1
;
let
template
=
''
;
// 非全部派工时展示拆单派工按钮
...
...
@@ -49,7 +49,7 @@ function query() {
/**
* 拆单派工
*
* @param prod
uction
OrderNo
* @param prodOrderNo
*/
function
tearAssign
(
prodOrderNo
)
{
JSColorbox
.
open
({
...
...
src/main/webapp/HP/SC/HPSC005.jsp
View file @
69bea29a
...
...
@@ -8,7 +8,7 @@
<EF:EFPage
title=
"生产订单"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFInput
cname=
"生产订单号"
blockId=
"inqu_status"
ename=
"prod
uction
OrderNo"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
cname=
"生产订单号"
blockId=
"inqu_status"
ename=
"prodOrderNo"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
cname=
"项目号"
blockId=
"inqu_status"
ename=
"projCode"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
cname=
"项目名称"
blockId=
"inqu_status"
ename=
"projName"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
cname=
"部件名称"
blockId=
"inqu_status"
ename=
"prdtName"
row=
"0"
colWidth=
"3"
/>
...
...
@@ -39,14 +39,15 @@
<EF:EFColumn
ename=
"prdtSpec"
cname=
"部件规格"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"partName"
cname=
"零件名称"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"partSpec"
cname=
"零件规格"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"planCompletionDate"
cname=
"计划完成日期"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"planCompletionDate"
cname=
"计划完成日期"
enable=
"false"
width=
"120"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
<EF:EFColumn
ename=
"assignedNum"
cname=
"已派工数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"num"
cname=
"计划数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"totalWt"
cname=
"计划重量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"remark"
cname=
"部件备注"
enable=
"false"
/>
<EF:EFColumn
ename=
"remark1"
cname=
"零件备注"
enable=
"false"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目号"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"prod
uction
OrderNo"
cname=
"生产订单号"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"prodOrderNo"
cname=
"生产订单号"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"prdtCode"
cname=
"部件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"partCode"
cname=
"零件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
</EF:EFGrid>
...
...
src/main/webapp/HP/SC/HPSC005A.jsp
View file @
69bea29a
...
...
@@ -11,7 +11,7 @@
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-projCode"
cname=
"项目号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-projName"
cname=
"项目名称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-prod
uction
OrderNo"
cname=
"生产订单号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-prodOrderNo"
cname=
"生产订单号"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-prdtName"
cname=
"部件名称"
colWidth=
"4"
readonly=
"true"
/>
...
...
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