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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
835 additions
and
80 deletions
+835
-80
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
+30
-4
HPSC005.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC005.java
+0
-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
+117
-4
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
+53
-35
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
+90
-12
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
;
...
...
@@ -22,7 +23,7 @@ public class HPSC004 extends DaoEPBase {
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_COMPANY_CODE
=
"companyCode"
;
/* 企业编码 预留*/
public
static
final
String
FIELD_DEPT_CODE
=
"deptCode"
;
/* 部门编码 预留*/
public
static
final
String
FIELD_PROJ_CODE
=
"projCode"
;
/* 项目编码*/
...
...
@@ -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"
;
/* 创建人*/
...
...
@@ -56,7 +58,7 @@ public class HPSC004 extends DaoEPBase {
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 更新时间*/
public
static
final
String
FIELD_REMARK
=
"remark"
;
/* 备注*/
public
static
final
String
COL_ID
=
"ID"
;
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_CODE
=
"PROJ_CODE"
;
/* 项目编码*/
...
...
@@ -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"
;
/* 创建人*/
...
...
@@ -96,7 +99,7 @@ public class HPSC004 extends DaoEPBase {
public
static
final
String
UPDATE
=
"t_hpsc004.update"
;
public
static
final
String
DELETE
=
"t_hpsc004.delete"
;
private
Long
id
=
new
Long
(
0
);
private
Long
id
=
new
Long
(
0
);
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
private
String
deptCode
=
" "
;
/* 部门编码 预留*/
private
String
projCode
=
" "
;
/* 项目编码*/
...
...
@@ -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
);
...
...
@@ -299,7 +307,7 @@ public class HPSC004 extends DaoEPBase {
/**
* set the id .
*
* @param id
* @param id
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
...
...
@@ -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
This diff is collapsed.
Click to expand it.
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,12 +87,38 @@ 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
);
HPSC003
.
setUpdatedBy
(
UserSession
.
getUserId
());
HPSC003
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
update
(
"HPSC003.update"
,
HPSC003
.
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
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
);
HPSC00
3
.
fromMap
(
map
);
HPSC00
3
.
setUpdatedBy
(
UserSession
.
getUserId
());
HPSC00
3
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
update
(
"HPSC00
3.update"
,
HPSC003
.
toMap
());
HPSC00
4
.
fromMap
(
map
);
HPSC00
4
.
setUpdatedBy
(
UserSession
.
getUserId
());
HPSC00
4
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
update
(
"HPSC00
4.updateHPSC0004"
,
HPSC004
.
toMap
());
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
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
...
...
@@ -344,42 +344,53 @@
<update
id=
"update"
>
UPDATE hpjx.T_HPSC004
SET
COMPANY_CODE = #companyCode#,
<!-- 企业编码 预留 -->
DEPT_CODE = #deptCode#,
<!-- 部门编码 预留 -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PARENT_PRDT_CODE = #parentPrdtCode#,
<!-- 父节点-产品编码 -->
PARENT_PRDT_NAME = #parentPrdtName#,
<!-- 父节点-产品名称 -->
TYPE = #type#,
<!-- 类别 -->
LEAF = #leaf#,
<!-- 是否有叶子节点 -->
SORT = #sort#,
<!-- 排序字段 -->
ICON = #icon#,
<!-- 图片地址 -->
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#,
<!-- 实际完工重量 -->
STATUS = #status#,
<!-- 状态 0-未审核,1-已审核 -->
DEL_STATUS = #delStatus#,
<!-- 状态 1未删除,0已删除 -->
CREATED_BY = #createdBy#,
<!-- 创建人 -->
CREATED_TIME = #createdTime#,
<!-- 创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
REMARK = #remark#
<!-- 备注 -->
WHERE
ID = #id#
</update>
COMPANY_CODE = #companyCode#,
<!-- 企业编码 预留 -->
DEPT_CODE = #deptCode#,
<!-- 部门编码 预留 -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PARENT_PRDT_CODE = #parentPrdtCode#,
<!-- 父节点-产品编码 -->
PARENT_PRDT_NAME = #parentPrdtName#,
<!-- 父节点-产品名称 -->
TYPE = #type#,
<!-- 类别 -->
LEAF = #leaf#,
<!-- 是否有叶子节点 -->
SORT = #sort#,
<!-- 排序字段 -->
ICON = #icon#,
<!-- 图片地址 -->
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#
<!-- 备注 -->
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>
<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,17 +111,60 @@ $(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
,
{
onSuccess
(
response
)
{
NotificationUtil
(
response
.
msg
);
resultGrid
.
dataSource
.
page
(
1
);
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
);
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
}
else
{
NotificationUtil
(
"审核失败!未找到明细信息"
,
"error"
);
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
else
{
// 反审
}
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
...
...
@@ -98,4 +174,6 @@ function check(id, auditStatus) {
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