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
14a1f6b1
Commit
14a1f6b1
authored
Jan 23, 2024
by
yukang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目管理、物料管理、生产计划、生产订单
parent
23a9f843
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1460 additions
and
34 deletions
+1460
-34
HPSC003.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC003.java
+3
-0
HPSC004.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC004.java
+26
-0
HPSC005.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC005.java
+671
-0
ServiceHPSC002.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
+5
-3
ServiceHPSC003.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC003.java
+113
-0
ServiceHPSC004.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC004.java
+34
-21
ServiceHPSC005.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC005.java
+128
-0
HPSC004.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC004.xml
+18
-0
HPSC005.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC005.xml
+278
-0
HPKC004.js
src/main/webapp/HP/KC/HPKC004.js
+4
-0
HPKC005.js
src/main/webapp/HP/KC/HPKC005.js
+4
-0
HPSC003.js
src/main/webapp/HP/SC/HPSC003.js
+87
-9
HPSC003.jsp
src/main/webapp/HP/SC/HPSC003.jsp
+1
-1
HPSC005.js
src/main/webapp/HP/SC/HPSC005.js
+32
-0
HPSC005.jsp
src/main/webapp/HP/SC/HPSC005.jsp
+56
-0
No files found.
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC003.java
View file @
14a1f6b1
...
...
@@ -443,6 +443,8 @@ public class HPSC003 extends DaoEPBase {
setUpdatedTime
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARK
)),
remark
));
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SCHEDULE
)),
schedule
));
}
/**
...
...
@@ -468,6 +470,7 @@ public class HPSC003 extends DaoEPBase {
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_REMARK
,
StringUtils
.
toString
(
remark
,
eiMetadata
.
getMeta
(
FIELD_REMARK
)));
map
.
put
(
FIELD_SCHEDULE
,
StringUtils
.
toString
(
schedule
,
eiMetadata
.
getMeta
(
FIELD_SCHEDULE
)));
return
map
;
}
...
...
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC004.java
View file @
14a1f6b1
...
...
@@ -4,6 +4,7 @@ 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
java.util.HashMap
;
import
java.util.Map
;
import
com.baosight.iplat4j.core.util.StringUtils
;
...
...
@@ -48,6 +49,7 @@ 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_CREATED_BY
=
"createdBy"
;
/* 创建人*/
...
...
@@ -82,6 +84,7 @@ 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_CREATED_BY
=
"CREATED_BY"
;
/* 创建人*/
...
...
@@ -122,6 +125,7 @@ public class HPSC004 extends DaoEPBase {
private
String
actualCompletionDate
=
" "
;
/* 实际完工日期*/
private
Integer
actualCompletionNum
=
new
Integer
(
0
);
/* 实际完工数量*/
private
BigDecimal
actualCompletionUnitWt
=
new
BigDecimal
(
"0"
);
/* 实际完工重量*/
private
String
productionOrderNo
=
" "
;
/* 生产订单号*/
private
Integer
status
=
new
Integer
(
0
);
/* 状态 0-未审核,1-已审核*/
private
Integer
delStatus
=
new
Integer
(
0
);
/* 状态 1未删除,0已删除*/
private
String
createdBy
=
" "
;
/* 创建人*/
...
...
@@ -250,6 +254,10 @@ public class HPSC004 extends DaoEPBase {
eiColumn
.
setDescName
(
"实际完工重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRODUCTION_ORDER_NO
);
eiColumn
.
setDescName
(
"生产订单号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"状态 0-未审核,1-已审核"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -705,6 +713,22 @@ public class HPSC004 extends DaoEPBase {
this
.
actualCompletionUnitWt
=
actualCompletionUnitWt
;
}
/**
* get the productionOrderNo - 生产订单号.
* @return the productionOrderNo
*/
public
String
getProductionOrderNo
()
{
return
this
.
productionOrderNo
;
}
/**
* set the productionOrderNo - 生产订单号.
*
* @param productionOrderNo - 生产订单号
*/
public
void
setProductionOrderNo
(
String
productionOrderNo
)
{
this
.
productionOrderNo
=
productionOrderNo
;
}
/**
* get the status - 状态 0-未审核,1-已审核.
* @return the status
*/
...
...
@@ -850,6 +874,7 @@ public class HPSC004 extends DaoEPBase {
setActualCompletionDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACTUAL_COMPLETION_DATE
)),
actualCompletionDate
));
setActualCompletionNum
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACTUAL_COMPLETION_NUM
)),
actualCompletionNum
));
setActualCompletionUnitWt
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACTUAL_COMPLETION_UNIT_WT
)),
actualCompletionUnitWt
));
setProductionOrderNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRODUCTION_ORDER_NO
)),
productionOrderNo
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setDelStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEL_STATUS
)),
delStatus
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
...
...
@@ -892,6 +917,7 @@ 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_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
map
.
put
(
FIELD_DEL_STATUS
,
StringUtils
.
toString
(
delStatus
,
eiMetadata
.
getMeta
(
FIELD_DEL_STATUS
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
...
...
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC005.java
0 → 100644
View file @
14a1f6b1
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
java.util.HashMap
;
import
java.util.Map
;
import
com.baosight.iplat4j.core.util.StringUtils
;
/**
* Project: <br>
* Title:THpsc005.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-22 15:35:04 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_PROJ_CODE
=
"projCode"
;
/* 项目编码*/
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_PRODUCTION_ORDER_NO
=
"productionOrderNo"
;
/* 生产订单号*/
public
static
final
String
FIELD_PRDT_CODE
=
"prdtCode"
;
/* 产品编码*/
public
static
final
String
FIELD_PRDT_NAME
=
"prdtName"
;
/* 产品名称*/
public
static
final
String
FIELD_PLAN_COMPLETION_DATE
=
"planCompletionDate"
;
/* 计划完成日期*/
public
static
final
String
FIELD_NUM
=
"num"
;
/* 计划数量*/
public
static
final
String
FIELD_TOTAL_WT
=
"totalWt"
;
/* 计划重量*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 状态 0-未派工,1-已派工*/
public
static
final
String
FIELD_ORG_NO
=
"orgNo"
;
/* 生产组编码*/
public
static
final
String
FIELD_ORG_NAME
=
"orgName"
;
/* 生产组名称*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 创建人*/
public
static
final
String
FIELD_CREATED_TIME
=
"createdTime"
;
/* 创建时间*/
public
static
final
String
FIELD_UPDATED_BY
=
"updatedBy"
;
/* 更新人*/
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 更新时间*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_REMARK
=
"remark"
;
/* 备注*/
public
static
final
String
FIELD_FILE_PATH1
=
"filePath1"
;
/* 文件地址1*/
public
static
final
String
FIELD_FILE_PATH2
=
"filePath2"
;
/* 文件地址2*/
public
static
final
String
FIELD_FILE_PATH3
=
"filePath3"
;
/* 文件地址3*/
public
static
final
String
FIELD_FILE_PATH4
=
"filePath4"
;
/* 文件地址4*/
public
static
final
String
FIELD_FILE_PATH5
=
"filePath5"
;
/* 文件地址5*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码 预留*/
public
static
final
String
COL_PROJ_CODE
=
"PROJ_CODE"
;
/* 项目编码*/
public
static
final
String
COL_PROJ_NAME
=
"PROJ_NAME"
;
/* 项目名称*/
public
static
final
String
COL_PRODUCTION_ORDER_NO
=
"PRODUCTION_ORDER_NO"
;
/* 生产订单号*/
public
static
final
String
COL_PRDT_CODE
=
"PRDT_CODE"
;
/* 产品编码*/
public
static
final
String
COL_PRDT_NAME
=
"PRDT_NAME"
;
/* 产品名称*/
public
static
final
String
COL_PLAN_COMPLETION_DATE
=
"PLAN_COMPLETION_DATE"
;
/* 计划完成日期*/
public
static
final
String
COL_NUM
=
"NUM"
;
/* 计划数量*/
public
static
final
String
COL_TOTAL_WT
=
"TOTAL_WT"
;
/* 计划重量*/
public
static
final
String
COL_STATUS
=
"STATUS"
;
/* 状态 0-未派工,1-已派工*/
public
static
final
String
COL_ORG_NO
=
"ORG_NO"
;
/* 生产组编码*/
public
static
final
String
COL_ORG_NAME
=
"ORG_NAME"
;
/* 生产组名称*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 创建人*/
public
static
final
String
COL_CREATED_TIME
=
"CREATED_TIME"
;
/* 创建时间*/
public
static
final
String
COL_UPDATED_BY
=
"UPDATED_BY"
;
/* 更新人*/
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 更新时间*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
public
static
final
String
COL_REMARK
=
"REMARK"
;
/* 备注*/
public
static
final
String
COL_FILE_PATH1
=
"FILE_PATH1"
;
/* 文件地址1*/
public
static
final
String
COL_FILE_PATH2
=
"FILE_PATH2"
;
/* 文件地址2*/
public
static
final
String
COL_FILE_PATH3
=
"FILE_PATH3"
;
/* 文件地址3*/
public
static
final
String
COL_FILE_PATH4
=
"FILE_PATH4"
;
/* 文件地址4*/
public
static
final
String
COL_FILE_PATH5
=
"FILE_PATH5"
;
/* 文件地址5*/
public
static
final
String
QUERY
=
"t_hpsc005.query"
;
public
static
final
String
COUNT
=
"t_hpsc005.count"
;
public
static
final
String
INSERT
=
"t_hpsc005.insert"
;
public
static
final
String
UPDATE
=
"t_hpsc005.update"
;
public
static
final
String
DELETE
=
"t_hpsc005.delete"
;
private
Long
id
=
new
Long
(
0
);
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
private
String
projCode
=
" "
;
/* 项目编码*/
private
String
projName
=
" "
;
/* 项目名称*/
private
String
productionOrderNo
=
" "
;
/* 生产订单号*/
private
String
prdtCode
=
" "
;
/* 产品编码*/
private
String
prdtName
=
" "
;
/* 产品名称*/
private
String
planCompletionDate
=
" "
;
/* 计划完成日期*/
private
Integer
num
=
new
Integer
(
0
);
/* 计划数量*/
private
BigDecimal
totalWt
=
new
BigDecimal
(
0.000
);
/* 计划重量*/
private
Integer
status
=
new
Integer
(
0
);
/* 状态 0-未派工,1-已派工*/
private
String
orgNo
=
" "
;
/* 生产组编码*/
private
String
orgName
=
" "
;
/* 生产组名称*/
private
String
createdBy
=
" "
;
/* 创建人*/
private
String
createdTime
;
/* 创建时间*/
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedTime
;
/* 更新时间*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
String
remark
=
" "
;
/* 备注*/
private
String
filePath1
=
" "
;
/* 文件地址1*/
private
String
filePath2
=
" "
;
/* 文件地址2*/
private
String
filePath3
=
" "
;
/* 文件地址3*/
private
String
filePath4
=
" "
;
/* 文件地址4*/
private
String
filePath5
=
" "
;
/* 文件地址5*/
/**
* 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_PROJ_CODE
);
eiColumn
.
setDescName
(
"项目编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_NAME
);
eiColumn
.
setDescName
(
"项目名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRODUCTION_ORDER_NO
);
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_PLAN_COMPLETION_DATE
);
eiColumn
.
setDescName
(
"计划完成日期"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_NUM
);
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_STATUS
);
eiColumn
.
setDescName
(
"状态 0-未派工,1-已派工"
);
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_CREATED_BY
);
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_TIME
);
eiColumn
.
setDescName
(
"更新时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DEP_CODE
);
eiColumn
.
setDescName
(
"部门编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_REMARK
);
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
);
}
/**
* the constructor.
*/
public
HPSC005
()
{
initMetaData
();
}
/**
* get the id .
* @return the id
*/
public
Long
getId
()
{
return
this
.
id
;
}
/**
* set the id .
*
* @param id
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public
String
getCompanyCode
()
{
return
this
.
companyCode
;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public
void
setCompanyCode
(
String
companyCode
)
{
this
.
companyCode
=
companyCode
;
}
/**
* get the projCode - 项目编码.
* @return the projCode
*/
public
String
getProjCode
()
{
return
this
.
projCode
;
}
/**
* set the projCode - 项目编码.
*
* @param projCode - 项目编码
*/
public
void
setProjCode
(
String
projCode
)
{
this
.
projCode
=
projCode
;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public
String
getProjName
()
{
return
this
.
projName
;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public
void
setProjName
(
String
projName
)
{
this
.
projName
=
projName
;
}
/**
* get the productionOrderNo - 生产订单号.
* @return the productionOrderNo
*/
public
String
getProductionOrderNo
()
{
return
this
.
productionOrderNo
;
}
/**
* set the productionOrderNo - 生产订单号.
*
* @param productionOrderNo - 生产订单号
*/
public
void
setProductionOrderNo
(
String
productionOrderNo
)
{
this
.
productionOrderNo
=
productionOrderNo
;
}
/**
* get the prdtCode - 产品编码.
* @return the prdtCode
*/
public
String
getPrdtCode
()
{
return
this
.
prdtCode
;
}
/**
* set the prdtCode - 产品编码.
*
* @param prdtCode - 产品编码
*/
public
void
setPrdtCode
(
String
prdtCode
)
{
this
.
prdtCode
=
prdtCode
;
}
/**
* get the prdtName - 产品名称.
* @return the prdtName
*/
public
String
getPrdtName
()
{
return
this
.
prdtName
;
}
/**
* set the prdtName - 产品名称.
*
* @param prdtName - 产品名称
*/
public
void
setPrdtName
(
String
prdtName
)
{
this
.
prdtName
=
prdtName
;
}
/**
* get the planCompletionDate - 计划完成日期.
* @return the planCompletionDate
*/
public
String
getPlanCompletionDate
()
{
return
this
.
planCompletionDate
;
}
/**
* set the planCompletionDate - 计划完成日期.
*
* @param planCompletionDate - 计划完成日期
*/
public
void
setPlanCompletionDate
(
String
planCompletionDate
)
{
this
.
planCompletionDate
=
planCompletionDate
;
}
/**
* get the num - 计划数量.
* @return the num
*/
public
Integer
getNum
()
{
return
this
.
num
;
}
/**
* set the num - 计划数量.
*
* @param num - 计划数量
*/
public
void
setNum
(
Integer
num
)
{
this
.
num
=
num
;
}
/**
* get the totalWt - 计划重量.
* @return the totalWt
*/
public
BigDecimal
getTotalWt
()
{
return
this
.
totalWt
;
}
/**
* set the totalWt - 计划重量.
*
* @param totalWt - 计划重量
*/
public
void
setTotalWt
(
BigDecimal
totalWt
)
{
this
.
totalWt
=
totalWt
;
}
/**
* get the status - 状态 0-未派工,1-已派工.
* @return the status
*/
public
Integer
getStatus
()
{
return
this
.
status
;
}
/**
* set the status - 状态 0-未派工,1-已派工.
*
* @param status - 状态 0-未派工,1-已派工
*/
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
/**
* get the orgNo - 生产组编码.
* @return the orgNo
*/
public
String
getOrgNo
()
{
return
this
.
orgNo
;
}
/**
* set the orgNo - 生产组编码.
*
* @param orgNo - 生产组编码
*/
public
void
setOrgNo
(
String
orgNo
)
{
this
.
orgNo
=
orgNo
;
}
/**
* get the orgName - 生产组名称.
* @return the orgName
*/
public
String
getOrgName
()
{
return
this
.
orgName
;
}
/**
* set the orgName - 生产组名称.
*
* @param orgName - 生产组名称
*/
public
void
setOrgName
(
String
orgName
)
{
this
.
orgName
=
orgName
;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public
String
getCreatedBy
()
{
return
this
.
createdBy
;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public
void
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public
String
getCreatedTime
()
{
return
this
.
createdTime
;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public
void
setCreatedTime
(
String
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public
String
getUpdatedBy
()
{
return
this
.
updatedBy
;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public
void
setUpdatedBy
(
String
updatedBy
)
{
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 depCode - 部门编码.
* @return the depCode
*/
public
String
getDepCode
()
{
return
this
.
depCode
;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public
void
setDepCode
(
String
depCode
)
{
this
.
depCode
=
depCode
;
}
/**
* get the remark - 备注.
* @return the remark
*/
public
String
getRemark
()
{
return
this
.
remark
;
}
/**
* set the remark - 备注.
*
* @param remark - 备注
*/
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
/**
* get the filePath1 - 文件地址1.
* @return the filePath1
*/
public
String
getFilePath1
()
{
return
this
.
filePath1
;
}
/**
* set the filePath1 - 文件地址1.
*
* @param filePath1 - 文件地址1
*/
public
void
setFilePath1
(
String
filePath1
)
{
this
.
filePath1
=
filePath1
;
}
/**
* get the filePath2 - 文件地址2.
* @return the filePath2
*/
public
String
getFilePath2
()
{
return
this
.
filePath2
;
}
/**
* set the filePath2 - 文件地址2.
*
* @param filePath2 - 文件地址2
*/
public
void
setFilePath2
(
String
filePath2
)
{
this
.
filePath2
=
filePath2
;
}
/**
* get the filePath3 - 文件地址3.
* @return the filePath3
*/
public
String
getFilePath3
()
{
return
this
.
filePath3
;
}
/**
* set the filePath3 - 文件地址3.
*
* @param filePath3 - 文件地址3
*/
public
void
setFilePath3
(
String
filePath3
)
{
this
.
filePath3
=
filePath3
;
}
/**
* get the filePath4 - 文件地址4.
* @return the filePath4
*/
public
String
getFilePath4
()
{
return
this
.
filePath4
;
}
/**
* set the filePath4 - 文件地址4.
*
* @param filePath4 - 文件地址4
*/
public
void
setFilePath4
(
String
filePath4
)
{
this
.
filePath4
=
filePath4
;
}
/**
* get the filePath5 - 文件地址5.
* @return the filePath5
*/
public
String
getFilePath5
()
{
return
this
.
filePath5
;
}
/**
* set the filePath5 - 文件地址5.
*
* @param filePath5 - 文件地址5
*/
public
void
setFilePath5
(
String
filePath5
)
{
this
.
filePath5
=
filePath5
;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@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
));
setProjCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_CODE
)),
projCode
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setProductionOrderNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRODUCTION_ORDER_NO
)),
productionOrderNo
));
setPrdtCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRDT_CODE
)),
prdtCode
));
setPrdtName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRDT_NAME
)),
prdtName
));
setPlanCompletionDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_COMPLETION_DATE
)),
planCompletionDate
));
setNum
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_NUM
)),
num
));
setTotalWt
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_TOTAL_WT
)),
totalWt
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setOrgNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ORG_NO
)),
orgNo
));
setOrgName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ORG_NAME
)),
orgName
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedTime
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_TIME
)));
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_BY
)),
updatedBy
));
setUpdatedTime
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARK
)),
remark
));
setFilePath1
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_PATH1
)),
filePath1
));
setFilePath2
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_PATH2
)),
filePath2
));
setFilePath3
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_PATH3
)),
filePath3
));
setFilePath4
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_PATH4
)),
filePath4
));
setFilePath5
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_PATH5
)),
filePath5
));
}
/**
* 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_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_PRODUCTION_ORDER_NO
,
StringUtils
.
toString
(
productionOrderNo
,
eiMetadata
.
getMeta
(
FIELD_PRODUCTION_ORDER_NO
)));
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_PLAN_COMPLETION_DATE
,
StringUtils
.
toString
(
planCompletionDate
,
eiMetadata
.
getMeta
(
FIELD_PLAN_COMPLETION_DATE
)));
map
.
put
(
FIELD_NUM
,
StringUtils
.
toString
(
num
,
eiMetadata
.
getMeta
(
FIELD_NUM
)));
map
.
put
(
FIELD_TOTAL_WT
,
StringUtils
.
toString
(
totalWt
,
eiMetadata
.
getMeta
(
FIELD_TOTAL_WT
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
map
.
put
(
FIELD_ORG_NO
,
StringUtils
.
toString
(
orgNo
,
eiMetadata
.
getMeta
(
FIELD_ORG_NO
)));
map
.
put
(
FIELD_ORG_NAME
,
StringUtils
.
toString
(
orgName
,
eiMetadata
.
getMeta
(
FIELD_ORG_NAME
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
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_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_REMARK
,
StringUtils
.
toString
(
remark
,
eiMetadata
.
getMeta
(
FIELD_REMARK
)));
map
.
put
(
FIELD_FILE_PATH1
,
StringUtils
.
toString
(
filePath1
,
eiMetadata
.
getMeta
(
FIELD_FILE_PATH1
)));
map
.
put
(
FIELD_FILE_PATH2
,
StringUtils
.
toString
(
filePath2
,
eiMetadata
.
getMeta
(
FIELD_FILE_PATH2
)));
map
.
put
(
FIELD_FILE_PATH3
,
StringUtils
.
toString
(
filePath3
,
eiMetadata
.
getMeta
(
FIELD_FILE_PATH3
)));
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
)));
return
map
;
}
}
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
View file @
14a1f6b1
...
...
@@ -289,14 +289,14 @@ public class ServiceHPSC002 extends ServiceBase {
public
void
autoPlanInfo
(
String
id
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
THPSC002
THPSC002
=
(
THPSC002
)
dao
.
get
(
"HPSC002.query"
,
"id"
,
id
);
String
SCJHD
=
"SCJH"
+
DateUtil
.
getDateTime
(
"yyyMMddHHmmss"
,
new
Date
());
//生成生产计划t_hpsc003
HPSC003
HPSC003
=
new
HPSC003
();
HPSC003
.
setCompanyCode
(
""
);
HPSC003
.
setProjType
(
null
);
HPSC003
.
setProjCode
(
THPSC002
.
getProjCode
());
HPSC003
.
setProjName
(
THPSC002
.
getProjName
());
HPSC003
.
setPlanInfoNo
(
"SCJH"
+
DateUtil
.
getDateTime
(
"yyyMMddHHmmss"
,
new
Date
())
);
HPSC003
.
setPlanInfoNo
(
SCJHD
);
HPSC003
.
setPrdtCode
(
THPSC002
.
getPrdtCode
());
HPSC003
.
setPrdtName
(
THPSC002
.
getPrdtName
());
HPSC003
.
setPlanCompletionDate
(
""
);
...
...
@@ -307,6 +307,8 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC003
.
setUpdatedTime
(
null
);
this
.
dao
.
insert
(
"HPSC003.insert"
,
HPSC003
.
toMap
());
//根据生产计划单号找到ID
HPSC003
ent
=
(
HPSC003
)
this
.
dao
.
get
(
"HPSC003.query"
,
"planInfoNo"
,
SCJHD
);
//生产计划详情
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"id"
,
id
);
...
...
@@ -319,7 +321,7 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC004
.
setDeptCode
(
""
);
HPSC004
.
setProjCode
(
StringUtils
.
toString
(
domain
.
get
(
"projCode"
)));
HPSC004
.
setProjName
(
StringUtils
.
toString
(
domain
.
get
(
"projName"
)));
HPSC004
.
setParentPrdtCode
(
StringUtils
.
toString
(
domain
.
get
(
"parentPrdtCode"
)));
HPSC004
.
setParentPrdtCode
(
StringUtils
.
toString
(
ent
.
getId
(
)));
HPSC004
.
setParentPrdtName
(
StringUtils
.
toString
(
domain
.
get
(
"parentPrdtName"
)));
HPSC004
.
setPrdtCode
(
StringUtils
.
toString
(
domain
.
get
(
"prdtCode"
)));
HPSC004
.
setPrdtName
(
StringUtils
.
toString
(
domain
.
get
(
"prdtName"
)));
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC003.java
View file @
14a1f6b1
...
...
@@ -2,11 +2,14 @@ package com.baosight.hpjx.hp.sc.service;
import
com.baosight.hpjx.common.HPConstants
;
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.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.util.DateUtil
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
java.text.SimpleDateFormat
;
...
...
@@ -84,6 +87,7 @@ public class ServiceHPSC003 extends ServiceBase {
try
{
HPSC003
HPSC003
=
new
HPSC003
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
if
(
eiBlock
!=
null
)
{
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HPSC003
.
fromMap
(
map
);
...
...
@@ -93,6 +97,31 @@ public class ServiceHPSC003 extends ServiceBase {
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
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
updateHPSC0004
(
EiInfo
inInfo
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
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
);
HPSC004
.
setUpdatedBy
(
UserSession
.
getUserId
());
HPSC004
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
update
(
"HPSC004.updateHPSC0004"
,
HPSC004
.
toMap
());
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"修改成功!"
);
}
catch
(
PlatException
e
)
{
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setMsg
(
"操作失败!原因参见详细错误描述!"
);
...
...
@@ -129,5 +158,89 @@ public class ServiceHPSC003 extends ServiceBase {
return
eiInfo
;
}
/**
* 根据ID获取详情
* @param eiInfo
* @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
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
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
);
HPSC003
.
setUpdatedBy
(
UserSession
.
getUserId
());
HPSC003
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
update
(
"HPSC003.update"
,
HPSC003
.
toMap
());
//生成生产订单
HashMap
params
=
new
HashMap
();
params
.
put
(
"parentPrdtCode"
,
HPSC003
.
getId
());
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
=
"SCDD"
+
DateUtil
.
getDateTime
(
"yyyMMddHHmmss"
,
new
Date
())
+
generateFixedLengthRandomNumber
(
4
);
HPSC005
.
setProjCode
(
HPSC003
.
getProjCode
());
HPSC005
.
setProjName
(
HPSC003
.
getProjName
());
HPSC005
.
setProductionOrderNo
(
SCDD
);
HPSC005
.
setPrdtCode
(
HPSC004
.
getPrdtCode
());
HPSC005
.
setPrdtName
(
HPSC004
.
getPrdtName
());
HPSC005
.
setPlanCompletionDate
(
HPSC004
.
getPlanCompletionDate
());
HPSC005
.
setNum
(
HPSC004
.
getNum
());
HPSC005
.
setTotalWt
(
HPSC004
.
getUnitWt
());
HPSC005
.
setStatus
(
0
);
HPSC005
.
setCreatedBy
(
UserSession
.
getUserId
());
HPSC005
.
setCreatedTime
(
sdf
.
format
(
new
Date
()));
HPSC005
.
setFilePath1
(
HPSC004
.
getFilePath1
());
HPSC005
.
setFilePath2
(
HPSC004
.
getFilePath2
());
HPSC005
.
setFilePath3
(
HPSC004
.
getFilePath3
());
HPSC005
.
setFilePath4
(
HPSC004
.
getFilePath4
());
HPSC005
.
setFilePath5
(
HPSC004
.
getFilePath5
());
this
.
dao
.
insert
(
"HPSC005.insert"
,
HPSC005
.
toMap
());
HPSC004
.
setProductionOrderNo
(
SCDD
);
HPSC004
.
setUpdatedBy
(
UserSession
.
getUserId
());
HPSC004
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
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
;
}
private
static
String
generateFixedLengthRandomNumber
(
int
length
)
{
StringBuilder
sb
=
new
StringBuilder
();
Random
rand
=
new
Random
();
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
int
digit
=
rand
.
nextInt
(
10
);
// 生成0-9之间的随机数字
sb
.
append
(
digit
);
}
return
sb
.
toString
();
}
}
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC004.java
View file @
14a1f6b1
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
service
;
import
com.baosight.hpjx.hp.sc.domain.HPSC004
;
import
com.baosight.hpjx.hp.sc.domain.THPSC001
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
...
...
@@ -22,9 +21,9 @@ public class ServiceHPSC004 extends ServiceBase {
* 画面初始化.
*/
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
THPSC001
hpsc001
=
new
THPSC001
();
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
hpsc001
);
outInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
hpsc001
.
eiMetadata
);
HPSC004
HPSC004
=
new
HPSC004
();
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
HPSC004
);
outInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
HPSC004
.
eiMetadata
);
return
inInfo
;
}
...
...
@@ -35,7 +34,7 @@ public class ServiceHPSC004 extends ServiceBase {
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
/* 调用EI查询方法.*/
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"HPSC00
1.query"
,
new
THPSC001
());
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"HPSC00
4.query"
,
new
HPSC004
());
return
outInfo
;
}
...
...
@@ -47,16 +46,16 @@ public class ServiceHPSC004 extends ServiceBase {
public
EiInfo
insert
(
EiInfo
inInfo
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
try
{
THPSC001
hpsc001
=
new
THPSC001
();
HPSC004
HPSC004
=
new
HPSC004
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hpsc001
.
fromMap
(
map
);
hpsc001
.
setCreatedBy
(
UserSession
.
getUserId
());
hpsc001
.
setCreatedTime
(
sdf
.
format
(
new
Date
()));
hpsc001
.
setUpdatedBy
(
null
);
hpsc001
.
setUpdatedTime
(
null
);
this
.
dao
.
insert
(
"HPSC00
1.insert"
,
hpsc001
.
toMap
());
HPSC004
.
fromMap
(
map
);
HPSC004
.
setCreatedBy
(
UserSession
.
getUserId
());
HPSC004
.
setCreatedTime
(
sdf
.
format
(
new
Date
()));
HPSC004
.
setUpdatedBy
(
null
);
HPSC004
.
setUpdatedTime
(
null
);
this
.
dao
.
insert
(
"HPSC00
4.insert"
,
HPSC004
.
toMap
());
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"新增成功!"
);
...
...
@@ -78,14 +77,14 @@ public class ServiceHPSC004 extends ServiceBase {
public
EiInfo
update
(
EiInfo
inInfo
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
try
{
THPSC001
hpsc001
=
new
THPSC001
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
HPSC004
HPSC004
=
new
HPSC004
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
"detail"
);
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hpsc001
.
fromMap
(
map
);
hpsc001
.
setUpdatedBy
(
UserSession
.
getUserId
());
hpsc001
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
update
(
"HPSC00
1.update"
,
hpsc001
.
toMap
());
HPSC004
.
fromMap
(
map
);
HPSC004
.
setUpdatedBy
(
UserSession
.
getUserId
());
HPSC004
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
update
(
"HPSC00
4.update"
,
HPSC004
.
toMap
());
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"修改成功!"
);
...
...
@@ -103,13 +102,13 @@ public class ServiceHPSC004 extends ServiceBase {
* 删除操作.
*/
public
EiInfo
delete
(
EiInfo
eiInfo
)
{
THPSC001
hpsc001
=
new
THPSC001
();
HPSC004
HPSC004
=
new
HPSC004
();
EiBlock
eiBlock
=
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
);
try
{
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hpsc001
.
fromMap
(
map
);
this
.
dao
.
delete
(
"HPPZ001.delete"
,
hpsc001
.
toMap
());
HPSC004
.
fromMap
(
map
);
this
.
dao
.
delete
(
"HPPZ001.delete"
,
HPSC004
.
toMap
());
}
}
catch
(
PlatException
e
)
{
...
...
@@ -138,4 +137,18 @@ public class ServiceHPSC004 extends ServiceBase {
outInfo
.
getBlock
(
"detail"
).
set
(
"limit"
,
list
.
size
());
return
outInfo
;
}
/**
* 计划审核验证
* @param eiInfo
* @return
*/
public
EiInfo
inspectDetail
(
EiInfo
eiInfo
)
{
Map
map
=
new
HashMap
();
String
id
=
eiInfo
.
get
(
"id"
).
toString
();
map
.
put
(
"id"
,
id
);
List
list
=
this
.
dao
.
query
(
"HPSC004.inspectDetail"
,
map
);
eiInfo
.
set
(
"list"
,
list
);
return
eiInfo
;
}
}
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC005.java
0 → 100644
View file @
14a1f6b1
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
service
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.soa.XLocalManager
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
/**
*
*/
public
class
ServiceHPSC005
extends
ServiceBase
{
/**
* 画面初始化.
*/
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
HPSC005
HPSC005
=
new
HPSC005
();
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
HPSC005
);
outInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
HPSC005
.
eiMetadata
);
return
inInfo
;
}
/**
* 查询操作.
*/
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
/* 调用EI查询方法.*/
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"HPSC005.query"
,
new
HPSC005
());
return
outInfo
;
}
/**
* 新增操作.
*/
@Override
public
EiInfo
insert
(
EiInfo
inInfo
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
try
{
HPSC005
HPSC005
=
new
HPSC005
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HPSC005
.
fromMap
(
map
);
HPSC005
.
setCreatedBy
(
UserSession
.
getUserId
());
HPSC005
.
setCreatedTime
(
sdf
.
format
(
new
Date
()));
HPSC005
.
setUpdatedBy
(
null
);
HPSC005
.
setUpdatedTime
(
null
);
this
.
dao
.
insert
(
"HPSC005.insert"
,
HPSC005
.
toMap
());
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"新增成功!"
);
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setMsg
(
"新增失败!原因参见详细错误描述!"
);
inInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"新增失败"
,
e
.
getMessage
());
return
inInfo
;
}
return
query
(
inInfo
);
}
/**
* 修改操作.
*/
public
EiInfo
update
(
EiInfo
inInfo
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
try
{
HPSC005
HPSC005
=
new
HPSC005
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HPSC005
.
fromMap
(
map
);
HPSC005
.
setUpdatedBy
(
UserSession
.
getUserId
());
HPSC005
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
update
(
"HPSC005.update"
,
HPSC005
.
toMap
());
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
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
)
{
HPSC005
HPSC005
=
new
HPSC005
();
EiBlock
eiBlock
=
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
);
try
{
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HPSC005
.
fromMap
(
map
);
this
.
dao
.
delete
(
"HPPZ001.delete"
,
HPSC005
.
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
;
}
}
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC004.xml
View file @
14a1f6b1
...
...
@@ -369,6 +369,7 @@
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#,
<!-- 创建人 -->
...
...
@@ -380,6 +381,16 @@
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>
<select
id=
"queryDetail"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC004"
>
...
...
@@ -429,4 +440,11 @@
</dynamic>
</select>
<select
id=
"inspectDetail"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.T_HPSC004 WHERE 1=1
AND PARENT_PRDT_CODE = #id# AND (PLAN_COMMENT_DATE = '' OR PLAN_COMMENT_DATE IS NULL
OR PLAN_COMPLETION_DATE = '' OR PLAN_COMPLETION_DATE IS NULL )
</select>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC005.xml
0 → 100644
View file @
14a1f6b1
<?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">
<!-- table information
Generate time : 2024-01-22 15:35:04
Version : 1.0
schema : hpjx
tableName : T_HPSC005
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PRODUCTION_ORDER_NO VARCHAR,
PRDT_CODE VARCHAR,
PRDT_NAME VARCHAR,
PLAN_COMPLETION_DATE VARCHAR,
NUM INTEGER,
TOTAL_WT DECIMAL,
STATUS TINYINT,
ORG_NO VARCHAR,
ORG_NAME VARCHAR,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME,
DEP_CODE VARCHAR,
REMARK VARCHAR,
FILE_PATH1 VARCHAR,
FILE_PATH2 VARCHAR,
FILE_PATH3 VARCHAR,
FILE_PATH4 VARCHAR,
FILE_PATH5 VARCHAR
-->
<sqlMap
namespace=
"HPSC005"
>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"productionOrderNo"
>
PRODUCTION_ORDER_NO = #productionOrderNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtCode"
>
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtName"
>
PRDT_NAME = #prdtName#
</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 = #orgNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"orgName"
>
ORG_NAME = #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>
<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>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC005"
>
SELECT
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PRODUCTION_ORDER_NO as "productionOrderNo",
<!-- 生产订单号 -->
PRDT_CODE as "prdtCode",
<!-- 产品编码 -->
PRDT_NAME as "prdtName",
<!-- 产品名称 -->
PLAN_COMPLETION_DATE as "planCompletionDate",
<!-- 计划完成日期 -->
NUM as "num",
<!-- 计划数量 -->
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 -->
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>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC005 WHERE 1=1
<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="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo">
PRODUCTION_ORDER_NO = #productionOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
</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 = #orgNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgName">
ORG_NAME = #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>
-->
<insert
id=
"insert"
>
INSERT INTO ${hpjxSchema}.T_HPSC005 (ID,
COMPANY_CODE,
<!-- 企业编码 预留 -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
PRODUCTION_ORDER_NO,
<!-- 生产订单号 -->
PRDT_CODE,
<!-- 产品编码 -->
PRDT_NAME,
<!-- 产品名称 -->
PLAN_COMPLETION_DATE,
<!-- 计划完成日期 -->
NUM,
<!-- 计划数量 -->
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 -->
)
VALUES (#id#, #companyCode#, #projCode#, #projName#, #productionOrderNo#, #prdtCode#, #prdtName#, #planCompletionDate#, #num#, #totalWt#, #status#, #orgNo#, #orgName#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#)
</insert>
<delete
id=
"delete"
>
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_CODE = #prdtCode#,
<!-- 产品编码 -->
PRDT_NAME = #prdtName#,
<!-- 产品名称 -->
PLAN_COMPLETION_DATE = #planCompletionDate#,
<!-- 计划完成日期 -->
NUM = #num#,
<!-- 计划数量 -->
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 -->
WHERE
ID = #id#
</update>
</sqlMap>
src/main/webapp/HP/KC/HPKC004.js
View file @
14a1f6b1
...
...
@@ -22,6 +22,10 @@ $(function () {
IPLATUI
.
EFGrid
=
{
"result"
:
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
50
,
70
,
100
],
},
columns
:
[
{
field
:
"matCode"
,
...
...
src/main/webapp/HP/KC/HPKC005.js
View file @
14a1f6b1
...
...
@@ -12,6 +12,10 @@ $(function() {
$
(
"#BTN_SAVE"
).
on
(
"click"
,
save
);
IPLATUI
.
EFGrid
=
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
50
,
70
,
100
],
},
"result"
:
{
columns
:
[{
field
:
"inventCode"
,
...
...
src/main/webapp/HP/SC/HPSC003.js
View file @
14a1f6b1
...
...
@@ -50,12 +50,45 @@ $(function () {
// hidden: false, // true时,不显示功能按钮,但保留setting导出按钮
// add: false, // 不显示新增按钮
cancel
:
true
,
// 不显示取消按钮
save
:
true
,
// 不显示保存按钮
//
save: true, // 不显示保存按钮
// delete: true, // 显示删除按钮
},
onSave
:
function
(
e
)
{
// 不向后台保存
alert
(
'1111'
)
var
rowCount
=
detailGrid
.
getCheckedRows
();
// 检验是否选中数据
if
(
rowCount
==
null
||
rowCount
==
""
)
{
NotificationUtil
({
msg
:
'请选择一条或多条数据'
},
"warning"
);
return
false
;
}
var
btnNode
=
$
(
this
);
//禁用按钮
btnNode
.
attr
(
"disabled"
,
true
);
IPLAT
.
submitNode
(
$
(
"#HPSC003"
),
"HPSC003"
,
"updateHPSC0004"
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
-
1
)
{
NotificationUtil
(
ei
,
"error"
);
}
else
{
NotificationUtil
({
msg
:
'修改成功'
});
// 绑定grid
detailGrid
.
setEiInfo
(
ei
);
}
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
},
onFail
:
function
(
ei
)
{
// onFail 表示失败回调函数
// 发生异常
console
.
log
(
ei
);
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
}
});
},
columns
:
[
{
...
...
@@ -78,14 +111,30 @@ $(function () {
}
});
$
(
"#SAVE_1"
).
on
(
"click"
,
function
(
e
)
{
alert
(
'1111'
)
})
function
check
(
id
,
auditStatus
)
{
const
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-id"
,
id
);
inEiInfo
.
set
(
"result-0-status"
,
auditStatus
);
EiCommunicator
.
send
(
'HPSC001'
,
'check'
,
inEiInfo
,
{
inEiInfo
.
set
(
"id"
,
id
);
//先判断本身是否填写
EiCommunicator
.
send
(
'HPSC003'
,
'getInfo'
,
inEiInfo
,
{
onSuccess
(
ei
)
{
var
model
=
ei
.
get
(
"model"
);
if
(
!
model
.
planCompletionDate
)
{
NotificationUtil
(
"审核失败!原因:基本息中计划完成日期未填写"
,
"error"
);
return
;
}
else
{
//审核
//审核前先判断明细信息中的计划开始和计划结束时间是否都已经填写,只有填写了之后才能进行审核
if
(
auditStatus
==
1
)
{
EiCommunicator
.
send
(
'HPSC004'
,
'inspectDetail'
,
inEiInfo
,
{
onSuccess
(
ei
)
{
var
list
=
ei
.
get
(
"list"
);
if
(
list
)
{
var
count
=
list
[
0
];
if
(
count
>
0
)
{
NotificationUtil
(
"审核失败!原因:明细信息中有未填写的计划开始时间或计划结束时间"
,
"error"
);
}
else
{
//审核通过,生成
EiCommunicator
.
send
(
'HPSC003'
,
'checkHPSC0003'
,
inEiInfo
,
{
onSuccess
(
response
)
{
NotificationUtil
(
response
.
msg
);
resultGrid
.
dataSource
.
page
(
1
);
...
...
@@ -98,4 +147,33 @@ function check(id, auditStatus) {
async
:
false
}
);
}
}
else
{
NotificationUtil
(
"审核失败!未找到明细信息"
,
"error"
);
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
else
{
// 反审
}
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
src/main/webapp/HP/SC/HPSC003.jsp
View file @
14a1f6b1
...
...
@@ -34,7 +34,7 @@
<EF:EFColumn
ename=
"prdtName"
cname=
"产品名称"
readonly=
"true"
/>
<EF:EFColumn
ename=
"planCompletionDate"
cname=
"计划完成日期"
editType=
"date"
dateFormat=
"yyyy/MM/dd"
width=
"150"
readonly=
"false"
required=
'true'
/>
<EF:EFColumn
ename=
"schedule"
cname=
"生产完工进度"
readonly=
"true"
/>
<EF:EFColumn
ename=
"schedule"
cname=
"生产完工进度"
format=
"{0:N2}"
readonly=
"true"
/>
<EF:EFComboColumn
required=
"true"
ename=
"status"
cname=
"状态"
>
<EF:EFOption
label=
"未审核"
value=
"0"
/>
<EF:EFOption
label=
"已审核"
value=
"1"
/>
...
...
src/main/webapp/HP/SC/HPSC005.js
0 → 100644
View file @
14a1f6b1
$
(
function
()
{
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
});
IPLATUI
.
EFGrid
.
result
=
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
50
,
70
,
100
],
},
columns
:
[
{
field
:
"operator"
,
template
:
function
(
item
)
{
let
filePath1
=
item
.
filePath1
;
let
template
=
''
;
if
(
filePath1
===
' '
)
{
template
=
''
;
}
else
{
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'href="'
+
ctx
+
'/EU/DM/EUDM06.jsp?docId='
+
filePath1
+
'" >下载</a>'
;
}
return
template
}
}
],
}
});
src/main/webapp/HP/SC/HPSC005.jsp
0 → 100644
View file @
14a1f6b1
<!DOCTYPE html>
<
%@
page
contentType=
"text/html; charset=UTF-8"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<script>
var
ctx
=
"${ctx}"
;
</script>
<head>
<
%
--
<
link
rel=
"stylesheet"
href=
"${ctx}/css/simulatedOperation.css"
/>
--%>
</head>
<EF:EFPage
title=
"生产订单"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
><
%
--
type=
"query"
efRegionShowClear=
"true"
efRegionSave=
"true"
--
%
>
<div
class=
"row"
>
<
%
--
blockId=
"inqu_status"
row=
"0"
--
%
>
<EF:EFInput
blockId=
"inqu_status"
ename=
"projName"
cname=
"项目名称:"
row=
"0"
/>
<EF:EFInput
blockId=
"inqu_status"
ename=
"projType"
cname=
"生产订单号:"
row=
"0"
/>
<EF:EFInput
blockId=
"inqu_status"
ename=
"projType"
cname=
"生产组:"
row=
"0"
/>
<EF:EFSelect
cname=
"状态:"
optionLabel=
"全部"
blockId=
"inqu_status"
ename=
"status"
row=
"0"
>
<EF:EFOption
label=
"未派工"
value=
"0"
/>
<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=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目号"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
/>
<EF:EFColumn
ename=
"productionOrderNo"
cname=
"生产订单号"
/>
<EF:EFColumn
ename=
"prdtCode"
cname=
"部件编码"
/>
<EF:EFColumn
ename=
"prdtName"
cname=
"部件名称"
/>
<EF:EFColumn
ename=
"planCompletionDate"
cname=
"计划完成日期"
/>
<EF:EFColumn
ename=
"num"
cname=
"计划数量"
/>
<EF:EFColumn
ename=
"totalWt"
cname=
"计划重量"
/>
<EF:EFComboColumn
required=
"true"
align=
"center"
ename=
"status"
cname=
"状态"
>
<EF:EFOption
label=
"未派工"
value=
"0"
/>
<EF:EFOption
label=
"已派工"
value=
"1"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"orgName"
cname=
"生产组"
/>
<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/HPSC005.js"
></script>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment