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
6c6b8f18
Commit
6c6b8f18
authored
Mar 14, 2024
by
liulei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品模板优化
parent
f0d80ef0
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
465 additions
and
79 deletions
+465
-79
OssClientUtils.java
src/main/java/com/baosight/hpjx/core/oss/OssClientUtils.java
+1
-0
ServiceHPKC002B.java
...java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002B.java
+5
-1
ServiceHPKC004B.java
...java/com/baosight/hpjx/hp/kc/service/ServiceHPKC004B.java
+6
-2
HPKC002.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC002.xml
+1
-1
ServiceHPPZ015.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ015.java
+33
-10
ServiceHPPZ015A.java
...java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ015A.java
+38
-4
HPPZ015.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ015.xml
+24
-0
HPPZ015A.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ015A.xml
+67
-4
HPPZTools.java
src/main/java/com/baosight/hpjx/hp/pz/tools/HPPZTools.java
+42
-24
ServiceHPSC002.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
+24
-0
HPSC001.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC001.xml
+17
-3
HPSC002.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002.xml
+83
-0
HPSCTools.java
src/main/java/com/baosight/hpjx/hp/sc/tools/HPSCTools.java
+48
-0
HPKC002B.jsp
src/main/webapp/HP/KC/HPKC002B.jsp
+2
-2
HPKC004B.jsp
src/main/webapp/HP/KC/HPKC004B.jsp
+4
-4
HPPZ015.jsp
src/main/webapp/HP/PZ/HPPZ015.jsp
+4
-4
HPPZ015A.js
src/main/webapp/HP/PZ/HPPZ015A.js
+12
-1
HPSC002.js
src/main/webapp/HP/SC/HPSC002.js
+53
-18
HPSC002C.js
src/main/webapp/HP/SC/HPSC002C.js
+1
-1
No files found.
src/main/java/com/baosight/hpjx/core/oss/OssClientUtils.java
View file @
6c6b8f18
...
...
@@ -11,6 +11,7 @@ import com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext;
import
lombok.extern.slf4j.Slf4j
;
/**
* OSS凭证
*
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002B.java
View file @
6c6b8f18
...
...
@@ -5,6 +5,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
import
com.baosight.hpjx.common.InventTypeEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC002
;
import
com.baosight.hpjx.hp.kc.domain.HPKC010
;
...
...
@@ -48,12 +49,15 @@ public class ServiceHPKC002B extends ServiceEPBase {
try
{
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventTypes"
,
DEFAULT_INVENT_CODE
);
Map
queryMap2
=
new
HashMap
();
queryMap2
.
put
(
"companyCode"
,
UserSessionUtils
.
getCompanyCode
());
queryMap2
.
put
(
"status"
,
1
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_NAME_BLOCK_ID
),
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_SPEC_BLOCK_ID
),
queryMap
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
),
queryMap
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
),
queryMap
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
),
null
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
),
queryMap2
,
false
);
String
hpsc006Id
=
inInfo
.
getString
(
"inqu_status-0-hpsc006Id"
);
if
(
StringUtils
.
isNotBlank
(
hpsc006Id
))
{
inInfo
.
set
(
"inqu_result-0-hpsc006Id"
,
hpsc006Id
);
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC004B.java
View file @
6c6b8f18
...
...
@@ -5,6 +5,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
import
com.baosight.hpjx.common.InventTypeEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC002
;
import
com.baosight.hpjx.hp.kc.domain.HPKC004
;
...
...
@@ -25,7 +26,7 @@ import java.util.List;
import
java.util.Map
;
/**
*
生产领料
挑选库存
*
耗材
挑选库存
*
* @author:songx
* @date:2022/7/11,11:08
...
...
@@ -48,12 +49,15 @@ public class ServiceHPKC004B extends ServiceEPBase {
try
{
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventTypes"
,
DEFAULT_INVENT_CODE
);
Map
queryMap2
=
new
HashMap
();
queryMap2
.
put
(
"companyCode"
,
UserSessionUtils
.
getCompanyCode
());
queryMap2
.
put
(
"status"
,
1
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_NAME_BLOCK_ID
),
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_SPEC_BLOCK_ID
),
queryMap
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
),
queryMap
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
),
queryMap
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
),
null
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
),
queryMap2
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPKC010
().
eiMetadata
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
...
...
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC002.xml
View file @
6c6b8f18
...
...
@@ -126,7 +126,7 @@
$order$
</isNotEmpty>
<isEmpty
property=
"order"
>
ID
a
sc
ID
de
sc
</isEmpty>
</dynamic>
</sql>
...
...
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ015.java
View file @
6c6b8f18
...
...
@@ -58,36 +58,54 @@ public class ServiceHPPZ015 extends ServiceBase {
}
/**
* 查询操作.
*/
@OperationLogAnnotation
(
operModul
=
"产品模板"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
count
(
EiInfo
inInfo
)
{
HashMap
map
=
new
HashMap
();
map
.
put
(
"id"
,
inInfo
.
getString
(
"id"
));
List
<
HPPZ015
>
query
=
this
.
dao
.
query
(
"HPPZ015.query"
,
map
);
if
(
query
.
size
()
>
0
)
{
inInfo
.
setStatus
(
1
);
inInfo
.
set
(
"tempName"
,
query
.
get
(
0
).
getTemplateName
());
}
else
{
inInfo
.
setStatus
(
0
);
}
return
inInfo
;
}
/**
* 新增操作.
*/
@OperationLogAnnotation
(
operModul
=
"产品模板"
,
operType
=
"新增"
,
operDesc
=
"新增"
)
@Override
public
EiInfo
insert
(
EiInfo
inInfo
)
{
HashMap
map
=
new
HashMap
();
map
.
put
(
"
projCode"
,
inInfo
.
getString
(
"projCode
"
));
map
.
put
(
"
id"
,
inInfo
.
getString
(
"id
"
));
List
<
HPPZ015
>
query
=
this
.
dao
.
query
(
"HPPZ015.query"
,
map
);
HPSC001
hpsc001
=
HPSCTools
.
HpSc001
.
getId
(
inInfo
.
getString
(
"id"
));
if
(
query
.
size
()
>
0
)
{
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setMsg
(
"该产品模板已存在,生成失败!"
);
logError
(
"生成产品模板失败"
,
"该产品模板已存在"
);
return
inInfo
;
dao
.
delete
(
"HPPZ015.delete"
,
map
);
dao
.
delete
(
"HPPZ015A.delete"
,
hpsc001
.
toMap
());
}
HPSC001
hpsc001
=
HPSCTools
.
HpSc001
.
get
(
inInfo
.
getString
(
"projCode"
));
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
try
{
HPPZ015
HPPZ015
=
new
HPPZ015
();
HPPZ015
.
setId
(
hpsc001
.
getId
(
));
HPPZ015
.
setProjCode
(
inInfo
.
getString
(
"projCode"
));
HPPZ015
.
setId
(
Long
.
parseLong
(
inInfo
.
getString
(
"id"
)
));
HPPZ015
.
setProjCode
(
hpsc001
.
getProjCode
(
));
HPPZ015
.
setTemplateName
(
inInfo
.
getString
(
"templateName"
));
HPPZ015
.
setCreatedBy
(
UserSession
.
getUserId
());
HPPZ015
.
setCompanyCode
(
UserSession
.
getUserId
());
HPPZ015
.
setCreatedName
(
UserSession
.
get
Login
Name
());
HPPZ015
.
setCreatedName
(
UserSession
.
get
UserId
()+
"-"
+
UserSession
.
getLoginC
Name
());
HPPZ015
.
setCreatedTime
(
sdf
.
format
(
new
Date
()));
HPPZ015
.
setUpdatedBy
(
null
);
HPPZ015
.
setUpdatedTime
(
null
);
this
.
dao
.
insert
(
"HPPZ015.insert"
,
HPPZ015
.
toMap
());
//模板物料清单
map
.
put
(
"companyCode"
,
UserSessionUtils
.
getCompanyCode
());
map
.
put
(
"templateName"
,
inInfo
.
getString
(
"templateName"
));
map
.
put
(
"projCode"
,
hpsc001
.
getProjCode
());
this
.
dao
.
insert
(
"HPPZ015A.insertMb"
,
map
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"生成产品模板成功!"
);
...
...
@@ -119,7 +137,12 @@ public class ServiceHPPZ015 extends ServiceBase {
return
inInfo
;
}
//生成清单
HPPZTools
.
HpPz015A
.
chekParentId
(
hppz015AList
);
HPSC001
hpsc001New
=
HPSCTools
.
HpSc001
.
get
(
inInfo
.
getString
(
"projCodeNew"
));
HashMap
hashMap
=
new
HashMap
();
hashMap
.
put
(
"leaf"
,
0
);
hashMap
.
put
(
"projCode"
,
hpsc001New
.
getProjCode
());
this
.
dao
.
update
(
"HPSC002.updateTreeNodeLeaf2"
,
hashMap
);
HPPZTools
.
HpPz015A
.
chekParentId
(
hppz015AList
,
hpsc001New
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"生成物料清单成功!"
);
}
catch
(
PlatException
e
)
{
...
...
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ015A.java
View file @
6c6b8f18
...
...
@@ -8,6 +8,7 @@ import com.baosight.hpjx.core.dao.DaoUtils;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.ds.domain.HPDS002
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ015
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ015A
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.sc.domain.*
;
...
...
@@ -19,12 +20,14 @@ 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.NumberUtils
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -127,6 +130,12 @@ public class ServiceHPPZ015A extends ServiceBase {
if
(!
HPPZ015A
.
getParentId
().
equals
(
"root"
))
{
this
.
checkTreeNodeLeaf
(
HPPZ015A
.
getParentId
());
}
HPPZ015
byPrdt
=
HPPZTools
.
HpPz015
.
getByPrdt
(
HPPZ015A
.
getProjCode
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
byPrdt
.
setUpdatedBy
(
UserSession
.
getUserId
());
byPrdt
.
setUpdatedName
(
UserSession
.
getUserId
()+
"-"
+
UserSession
.
getLoginCName
());
byPrdt
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
update
(
"HPPZ015.update"
,
byPrdt
.
toMap
());
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"新增成功!"
);
}
catch
(
PlatException
e
)
{
...
...
@@ -148,6 +157,12 @@ public class ServiceHPPZ015A extends ServiceBase {
EiInfo
inInfo
=
new
EiInfo
();
try
{
this
.
updateHPPZ015A
(
HPPZ015A
);
HPPZ015
byPrdt
=
HPPZTools
.
HpPz015
.
getByPrdt
(
HPPZ015A
.
getProjCode
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
byPrdt
.
setUpdatedBy
(
UserSession
.
getUserId
());
byPrdt
.
setUpdatedName
(
UserSession
.
getUserId
()+
"-"
+
UserSession
.
getLoginCName
());
byPrdt
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
update
(
"HPPZ015.update"
,
byPrdt
.
toMap
());
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"修改成功!"
);
}
catch
(
PlatException
e
)
{
...
...
@@ -194,6 +209,12 @@ public class ServiceHPPZ015A extends ServiceBase {
//处理项目管理中物料状态
HPSCTools
.
updateProjStatus
(
hppz002
.
getProjCode
());
}
HPPZ015
byPrdt
=
HPPZTools
.
HpPz015
.
getByPrdt
(
hppz002
.
getProjCode
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
byPrdt
.
setUpdatedBy
(
UserSession
.
getUserId
());
byPrdt
.
setUpdatedName
(
UserSession
.
getUserId
()+
"-"
+
UserSession
.
getLoginCName
());
byPrdt
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
update
(
"HPPZ015.update"
,
byPrdt
.
toMap
());
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"新增成功!"
);
...
...
@@ -221,6 +242,12 @@ public class ServiceHPPZ015A extends ServiceBase {
hppz002
.
fromMap
(
map
);
this
.
updateHPPZ015A
(
hppz002
);
}
HPPZ015
byPrdt
=
HPPZTools
.
HpPz015
.
getByPrdt
(
hppz002
.
getProjCode
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
byPrdt
.
setUpdatedBy
(
UserSession
.
getUserId
());
byPrdt
.
setUpdatedName
(
UserSession
.
getUserId
()+
"-"
+
UserSession
.
getLoginCName
());
byPrdt
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
update
(
"HPPZ015.update"
,
byPrdt
.
toMap
());
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"修改成功!"
);
}
catch
(
PlatException
e
)
{
...
...
@@ -259,6 +286,7 @@ public class ServiceHPPZ015A extends ServiceBase {
AssertUtils
.
isNotEmpty
(
dbSc002s
,
String
.
format
(
"部件[%s]已存在子节点不能删除"
,
fSc002
.
getPrdtName
()));
}
// 删除数据
String
projCode
=
null
;
for
(
Map
resultRow
:
resultRows
)
{
HPPZ015A
fSc002
=
new
HPPZ015A
();
fSc002
.
fromMap
(
resultRow
);
...
...
@@ -270,8 +298,14 @@ public class ServiceHPPZ015A extends ServiceBase {
this
.
checkTreeNodeLeaf
(
fSc002
.
getParentId
());
// 修改节点状态是叶子节点或非叶子节点
this
.
checkTreeNodeLeaf
(
fSc002
.
getId
().
toString
());
}
projCode
=
fSc002
.
getProjCode
();
}
HPPZ015
byPrdt
=
HPPZTools
.
HpPz015
.
getByPrdt
(
projCode
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
byPrdt
.
setUpdatedBy
(
UserSession
.
getUserId
());
byPrdt
.
setUpdatedName
(
UserSession
.
getUserId
()+
"-"
+
UserSession
.
getLoginCName
());
byPrdt
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
update
(
"HPPZ015.update"
,
byPrdt
.
toMap
());
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
...
...
@@ -333,9 +367,9 @@ public class ServiceHPPZ015A extends ServiceBase {
if
(
projId
!=
null
)
{
Map
map
=
new
HashMap
();
map
.
put
(
"id"
,
projId
);
List
list
=
dao
.
query
(
"HP
SC001
.queryDomainById"
,
map
);
List
list
=
dao
.
query
(
"HP
PZ015
.queryDomainById"
,
map
);
if
(
list
.
size
()
>
0
)
{
String
projCode
=
((
HP
SC001
)
list
.
get
(
0
)).
getProjCode
();
String
projCode
=
((
HP
PZ015
)
list
.
get
(
0
)).
getProjCode
();
queryMap
.
put
(
"projCode"
,
projCode
);
}
}
...
...
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ015.xml
View file @
6c6b8f18
...
...
@@ -190,4 +190,28 @@
ID = #id#
</update>
<select
id=
"queryDomainById"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.pz.domain.HPPZ015"
>
SELECT
ID as "id",
<!-- ID -->
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEP_CODE as "depCode",
<!-- 部门编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
TEMPLATE_CODE as "templateCode",
<!-- 产品代码 -->
TEMPLATE_NAME as "templateName",
<!-- 产品名称 -->
REMARK as "remark",
<!-- 备注 -->
DELETE_FLAG as "deleteFlag",
<!-- 是否删除0:否1.是 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 修改人 -->
UPDATED_TIME as "updatedTime",
<!-- 修改人名称 -->
UPDATED_NAME as "updatedName"
<!-- 修改时间 -->
FROM ${hpjxSchema}.T_HPPZ015 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
</select>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ015A.xml
View file @
6c6b8f18
...
...
@@ -217,14 +217,76 @@
</insert>
<insert
id=
"insertMb"
parameterClass=
"java.util.HashMap"
>
INSERT INTO hpjx.t_hppz015a (
SELECT * FROM hpjx.t_hpsc002 WHERE PROJ_CODE=#projCode# AND COMPANY_CODE=#companyCode#
INSERT INTO hpjx.t_hppz015a(
ID,
COMPANY_CODE,
<!-- 企业编码 预留 -->
DEP_CODE,
<!-- 部门编码 预留 -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
PARENT_ID,
<!-- 父节点-部件编码 -->
PARENT_PRDT_NAME,
<!-- 父节点-部件名称 -->
TYPE,
<!-- 类别 -->
LEAF,
<!-- 是否有叶子节点 -->
SORT,
<!-- 排序字段 -->
ICON,
<!-- 图片地址 -->
PRDT_TYPE,
PRDT_CODE,
<!-- 部件编码 -->
PRDT_NAME,
<!-- 部件名称 -->
INVENT_RECORD_ID,
<!-- 存货档案ID -->
NUM,
<!-- 数量 -->
UNIT_WT,
<!-- 单重 -->
TOTAL_WT,
<!-- 总重 -->
STATUS,
<!-- 状态 0-未提交,1-已提交 -->
DEL_STATUS,
<!-- 状态 1未删除,0已删除 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_TIME,
<!-- 创建时间 -->
UPDATED_BY,
<!-- 更新人 -->
UPDATED_TIME,
<!-- 更新时间 -->
REMARK,
<!-- 备注 -->
LV,
SPEC,
LENGTH,
<!-- 长 -->
WIDTH,
<!-- 宽 -->
THICK
<!-- 厚 -->
)(
SELECT
ID,
COMPANY_CODE,
<!-- 企业编码 预留 -->
DEP_CODE,
<!-- 部门编码 预留 -->
PROJ_CODE,
<!-- 项目编码 -->
#templateName# as PROJ_NAME,
<!-- 项目名称 -->
PARENT_ID,
<!-- 父节点-部件编码 -->
CASE WHEN LEAF='0' THEN #templateName# ELSE PARENT_PRDT_NAME END as PARENT_PRDT_NAME,
<!-- 父节点-部件名称 -->
TYPE,
<!-- 类别 -->
LEAF,
<!-- 是否有叶子节点 -->
SORT,
<!-- 排序字段 -->
ICON,
<!-- 图片地址 -->
PRDT_TYPE,
PRDT_CODE,
<!-- 部件编码 -->
CASE WHEN PRDT_CODE=PROJ_CODE THEN #templateName# ELSE PRDT_NAME END as PRDT_NAME,
<!-- 部件名称 -->
INVENT_RECORD_ID,
<!-- 存货档案ID -->
NUM,
<!-- 数量 -->
UNIT_WT,
<!-- 单重 -->
TOTAL_WT,
<!-- 总重 -->
STATUS,
<!-- 状态 0-未提交,1-已提交 -->
DEL_STATUS,
<!-- 状态 1未删除,0已删除 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_TIME,
<!-- 创建时间 -->
UPDATED_BY,
<!-- 更新人 -->
UPDATED_TIME,
<!-- 更新时间 -->
REMARK,
<!-- 备注 -->
LV,
SPEC,
LENGTH,
<!-- 长 -->
WIDTH,
<!-- 宽 -->
THICK
<!-- 厚 -->
FROM hpjx.t_hpsc002 WHERE PROJ_CODE=#projCode# AND COMPANY_CODE=#companyCode#
)
</insert>
<!-- 删除 -->
<delete
id=
"delete"
>
DELETE FROM hpjx.t_hppz015a WHERE
ID = #id
#
DELETE FROM hpjx.t_hppz015a WHERE
PROJ_CODE = #projCode
#
</delete>
<update
id=
"update"
>
...
...
@@ -390,6 +452,7 @@
<select
id=
"queryById"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.pz.domain.HPPZ015A"
>
SELECT
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEP_CODE as "depCode",
<!-- 部门编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
...
...
@@ -409,7 +472,7 @@
WIDTH as "width",
<!-- 宽 -->
THICK as "thick"
<!-- 厚 -->
FROM hpjx.t_hppz015a
WHERE 1=1 AND PROJ_CODE=#projCode#
WHERE 1=1 AND PROJ_CODE=#projCode#
AND PARENT_ID NOT IN('root')
</select>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/pz/tools/HPPZTools.java
View file @
6c6b8f18
...
...
@@ -7,6 +7,7 @@ import com.baosight.hpjx.core.dao.DaoUtils;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.constant.HPSqlConstant
;
import
com.baosight.hpjx.hp.pz.domain.*
;
import
com.baosight.hpjx.hp.sc.domain.HPSC001
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002
;
import
com.baosight.hpjx.hp.sc.tools.HPSCTools
;
import
com.baosight.hpjx.hp.pz.domain.*
;
...
...
@@ -575,6 +576,24 @@ public class HPPZTools {
}
}
public
static
class
HpPz015
{
/**
* 查询
*
* @param prdtCode
* @return
*/
public
static
HPPZ015
getByPrdt
(
String
prdtCode
)
{
AssertUtils
.
isEmpty
(
prdtCode
,
"部件编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"prdtCode"
,
prdtCode
);
List
<
HPPZ015
>
results
=
DaoBase
.
getInstance
().
query
(
"HPPZ015.query"
,
queryMap
);
AssertUtils
.
isNull
(
results
,
String
.
format
(
"部件编码[%s]信息不存在"
,
prdtCode
));
return
results
.
get
(
0
);
}
}
/**
* HPSC002公共DAO定义
*
...
...
@@ -639,48 +658,47 @@ public class HPPZTools {
* @param hppz015AList
* @return
*/
public
static
void
chekParentId
(
List
<
HPPZ015A
>
hppz015AList
)
{
public
static
void
chekParentId
(
List
<
HPPZ015A
>
hppz015AList
,
HPSC001
hpsc001
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
Long
root
=
null
;
Long
prdtId
=
null
;
Long
prdtId_new
=
null
;
//处理root
for
(
int
i
=
0
;
i
<
hppz015AList
.
size
();
i
++)
{
if
(
hppz015AList
.
get
(
i
).
getLv
().
equals
(
"1"
)){
HPSC002
hpsc002
=
new
HPSC002
();
hpsc002
.
fromMap
(
hppz015AList
.
get
(
i
).
toMap
());
hpsc002
.
setCreatedName
(
UserSession
.
getUserId
());
hpsc002
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
hpsc002
.
setStatus
(
CommonConstant
.
YesNo
.
NO_0
);
hpsc002
.
setDelStatus
(
CommonConstant
.
YesNo
.
NO_0
);
DaoBase
.
getInstance
().
insert
(
"HPSC002.insert"
,
hpsc002
);
HPSC002
byProjCode
=
HPSCTools
.
HpSc002
.
getByProjCode
(
hpsc002
.
getProjCode
());
root
=
byProjCode
.
getId
();
break
;
}
}
HPSC002
hpsc002ById
=
HPSCTools
.
HpSc002
.
getByTree3
(
hpsc001
.
getProjCode
(),
null
);
root
=
hpsc002ById
.
getId
();
//处理部件
for
(
int
i
=
0
;
i
<
hppz015AList
.
size
();
i
++)
{
if
(
hppz015AList
.
get
(
i
).
getLv
()
.
equals
(
"2"
)
){
if
(
hppz015AList
.
get
(
i
).
getLv
()
==
2
){
prdtId
=
hppz015AList
.
get
(
i
).
getId
();
//旧
HPSC002
hpsc002
=
new
HPSC002
();
hpsc002
.
setParentId
(
root
.
toString
());
hpsc002
.
fromMap
(
hppz015AList
.
get
(
i
).
toMap
());
hpsc002
.
setId
(
null
);
hpsc002
.
setParentId
(
root
.
toString
());
hpsc002
.
setCreatedName
(
UserSession
.
getUserId
());
hpsc002
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
hpsc002
.
setCreatedTime
(
sdf
.
format
(
new
Date
()));
hpsc002
.
setProjCode
(
hpsc001
.
getProjCode
());
hpsc002
.
setProjName
(
hpsc001
.
getProjName
());
hpsc002
.
setParentPrdtName
(
hpsc001
.
getProjName
());
hpsc002
.
setStatus
(
CommonConstant
.
YesNo
.
NO_0
);
hpsc002
.
setDelStatus
(
CommonConstant
.
YesNo
.
NO_0
);
DaoBase
.
getInstance
().
insert
(
"HPSC002.insert"
,
hpsc002
);
HPSC002
byProjCode
=
HPSCTools
.
HpSc002
.
getByProjCode
(
hpsc002
.
getProjCode
());
HPSC002
byProjCode
;
if
(
prdtId_new
!=
null
)
byProjCode
=
HPSCTools
.
HpSc002
.
getByTree2
(
hpsc002
.
getProjCode
(),
prdtId_new
.
toString
());
else
byProjCode
=
HPSCTools
.
HpSc002
.
getByTree2
(
hpsc002
.
getProjCode
(),
null
);
prdtId_new
=
byProjCode
.
getId
();
for
(
int
j
=
0
;
j
<
hppz015AList
.
size
();
j
++)
{
if
(
hppz015AList
.
get
(
i
).
getLv
().
equals
(
"3"
)
)
{
if
(
hppz015AList
.
get
(
j
).
getParentId
().
equals
(
prdtId
)
){
if
(
hppz015AList
.
get
(
j
).
getLv
()==
3
)
{
if
(
Long
.
parseLong
(
hppz015AList
.
get
(
j
).
getParentId
())==
prdtId
){
HPSC002
hpsc002_lv
=
new
HPSC002
();
hpsc002_lv
.
fromMap
(
hppz015AList
.
get
(
j
).
toMap
());
hpsc002_lv
.
setId
(
null
);
hpsc002_lv
.
setParentId
(
prdtId_new
.
toString
());
hpsc002_lv
.
fromMap
(
hppz015AList
.
get
(
i
).
toMap
());
hpsc002_lv
.
setCreatedName
(
UserSession
.
getUserId
());
hpsc002_lv
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
hpsc002_lv
.
setProjCode
(
hpsc001
.
getProjCode
());
hpsc002_lv
.
setProjName
(
hpsc001
.
getProjName
());
hpsc002_lv
.
setCreatedTime
(
sdf
.
format
(
new
Date
()));
hpsc002_lv
.
setStatus
(
CommonConstant
.
YesNo
.
NO_0
);
hpsc002_lv
.
setDelStatus
(
CommonConstant
.
YesNo
.
NO_0
);
DaoBase
.
getInstance
().
insert
(
"HPSC002.insert"
,
hpsc002_lv
);
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
View file @
6c6b8f18
...
...
@@ -3,11 +3,13 @@ package com.baosight.hpjx.hp.sc.service;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoBase
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.ds.domain.HPDS002
;
import
com.baosight.hpjx.hp.kc.tools.HPKCTools
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ015
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.sc.domain.*
;
import
com.baosight.hpjx.hp.sc.tools.HPSCTools
;
...
...
@@ -75,6 +77,28 @@ public class ServiceHPSC002 extends ServiceBase {
}
/**
* 查询操作物料清单选择校验.
*/
@OperationLogAnnotation
(
operModul
=
"物料清单"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
count
(
EiInfo
inInfo
)
{
try
{
HashMap
map
=
new
HashMap
();
HPSC001
hpsc001
=
HPSCTools
.
HpSc001
.
getId
(
inInfo
.
getString
(
"id"
));
map
.
put
(
"projCode"
,
hpsc001
.
getProjCode
());
List
<
HPSC002
>
results
=
this
.
dao
.
query
(
"HPSC002.queryTree"
,
map
);
if
(
results
.
size
()>
1
){
inInfo
.
setStatus
(
0
);
}
else
{
inInfo
.
setStatus
(
1
);
inInfo
.
set
(
"projCode"
,
hpsc001
.
getProjCode
());
}
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* 保存操作.
*
* @param inInfo
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC001.xml
View file @
6c6b8f18
...
...
@@ -197,13 +197,27 @@
<select
id=
"queryProjCode"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC001"
>
SELECT
PROJ_CODE as "projCode"
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
PROJ_TYPE as "projType",
<!-- 项目类型 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PRINC1 as "princ1",
<!-- 本公司项目负责人 -->
PRINC2 as "princ2",
<!-- 客户项目负责人 -->
STATUS as "status",
<!-- 状态 0-未提交,1-已提交 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
REMARK as "remark",
<!-- 备注 -->
MATERIAL_STATUS as "materialStatus"
FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
projName
"
>
PROJ_NAME = #projName
#
<isNotEmpty
prepend=
" AND "
property=
"
id
"
>
ID = #id
#
</isNotEmpty>
</select>
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002.xml
View file @
6c6b8f18
...
...
@@ -137,6 +137,12 @@
<isNotEmpty
prepend=
" AND "
property=
"lv"
>
A.LV = #lv#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
A.PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
</sql>
<sql
id=
"order"
>
...
...
@@ -218,6 +224,12 @@
DELETE FROM hpjx.t_hpsc002 WHERE ID = #id#
</delete>
<!-- 删除 -->
<delete
id=
"deleteByPro"
>
DELETE FROM hpjx.t_hpsc002 WHERE PROJ_CODE = #projCode#
</delete>
<update
id=
"update"
>
UPDATE hpjx.t_hpsc002
SET
...
...
@@ -290,6 +302,73 @@
ORDER BY CREATED_TIME DESC
</select>
<select
id=
"queryTree2"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC002"
>
SELECT
ID as "id",
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode",
<!-- 项目编码 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PRDT_name as "prdtName",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
ID as "label",
<!-- 名部件编码-->
PRDT_NAME as "text",
<!-- 部件名称 -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 存货档案ID -->
PARENT_ID as "pId",
<!-- 父节点编码 -->
TYPE as "type",
<!-- 类别 -->
LEAF as "leaf",
<!-- 是否有叶子节点 -->
SORT as "sort",
<!-- 排序字段 -->
ICON as "icon",
<!-- 图片地址 -->
LV as "lv",
SPEC as "spec"
FROM
hpjx.t_hpsc002
WHERE
1=1 AND PARENT_ID NOT IN ('root') AND LV != 3
<isNotEmpty
prepend=
" AND "
property=
"pEname"
>
PARENT_ID = #pEname#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID != #id#
</isNotEmpty>
ORDER BY CREATED_TIME DESC
</select>
<select
id=
"queryTree3"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC002"
>
SELECT
ID as "id",
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode",
<!-- 项目编码 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PRDT_name as "prdtName",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
ID as "label",
<!-- 名部件编码-->
PRDT_NAME as "text",
<!-- 部件名称 -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 存货档案ID -->
PARENT_ID as "pId",
<!-- 父节点编码 -->
TYPE as "type",
<!-- 类别 -->
LEAF as "leaf",
<!-- 是否有叶子节点 -->
SORT as "sort",
<!-- 排序字段 -->
ICON as "icon",
<!-- 图片地址 -->
LV as "lv",
SPEC as "spec"
FROM
hpjx.t_hpsc002
WHERE
1=1
<isNotEmpty
prepend=
" AND "
property=
"pEname"
>
PARENT_ID = #pEname#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE = #projCode#
</isNotEmpty>
ORDER BY CREATED_TIME DESC
</select>
<!-- 根据父级ID查询 -->
<select
id=
"queryTreeNodeByParentPrtdCode"
resultClass=
"java.util.HashMap"
>
SELECT
...
...
@@ -322,6 +401,10 @@
UPDATE hpjx.t_hpsc002 SET LEAF = #leaf# WHERE ID = #id#
</update>
<update
id=
"updateTreeNodeLeaf2"
>
UPDATE hpjx.t_hpsc002 SET LEAF = #leaf# WHERE PROJ_CODE = #projCode#
</update>
<update
id=
"check"
>
UPDATE hpjx.t_hpsc002 SET status = #status# WHERE ID = #id#
</update>
...
...
src/main/java/com/baosight/hpjx/hp/sc/tools/HPSCTools.java
View file @
6c6b8f18
...
...
@@ -264,6 +264,54 @@ public class HPSCTools {
}
/**
* 查询
*
* @param projCode
* @return
*/
public
static
HPSC002
getByTree
(
String
projCode
)
{
AssertUtils
.
isEmpty
(
projCode
,
"项目编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"projCode"
,
projCode
);
List
<
HPSC002
>
results
=
DaoBase
.
getInstance
().
query
(
"HPSC002.queryTree"
,
queryMap
);
AssertUtils
.
isNull
(
results
,
String
.
format
(
"项目编码[%s]信息不存在"
,
projCode
));
return
results
.
get
(
0
);
}
/**
* 查询
*
* @param projCode
* @return
*/
public
static
HPSC002
getByTree2
(
String
projCode
,
String
id
)
{
AssertUtils
.
isEmpty
(
projCode
,
"项目编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"projCode"
,
projCode
);
queryMap
.
put
(
"id"
,
id
);
List
<
HPSC002
>
results
=
DaoBase
.
getInstance
().
query
(
"HPSC002.queryTree2"
,
queryMap
);
AssertUtils
.
isNull
(
results
,
String
.
format
(
"项目编码[%s]信息不存在"
,
projCode
));
return
results
.
get
(
0
);
}
/**
* 查询
*
* @param projCode
* @return
*/
public
static
HPSC002
getByTree3
(
String
projCode
,
String
id
)
{
AssertUtils
.
isEmpty
(
projCode
,
"项目编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"projCode"
,
projCode
);
queryMap
.
put
(
"id"
,
id
);
List
<
HPSC002
>
results
=
DaoBase
.
getInstance
().
query
(
"HPSC002.queryTree3"
,
queryMap
);
AssertUtils
.
isNull
(
results
,
String
.
format
(
"项目编码[%s]信息不存在"
,
projCode
));
return
results
.
get
(
0
);
}
/**
* 查询节点
*
* @param id
...
...
src/main/webapp/HP/KC/HPKC002B.jsp
View file @
6c6b8f18
...
...
@@ -42,7 +42,7 @@
blockName=
"invent_name_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"inventRecordId"
cname=
"规格(MM)"
enable=
"false"
width=
"1
0
0"
align=
"center"
<EF:EFComboColumn
ename=
"inventRecordId"
cname=
"规格(MM)"
enable=
"false"
width=
"1
5
0"
align=
"center"
blockName=
"invent_spec_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
...
...
@@ -53,7 +53,7 @@
<EF:EFColumn
ename=
"unitWeight"
cname=
"单量(KG)"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"weight"
cname=
"库存重量(KG)"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
enable=
"false"
width=
"150"
type=
"hidden"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
src/main/webapp/HP/KC/HPKC004B.jsp
View file @
6c6b8f18
...
...
@@ -26,7 +26,7 @@
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
autoFit=
"true"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"库存ID"
enable=
"false"
width=
"60"
align=
"center"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
enable=
"false"
width=
"
10
0"
align=
"center"
>
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
enable=
"false"
width=
"
6
0"
align=
"center"
>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
condition=
"ITEM_CODE IN ('2')"
/>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"whCode"
cname=
"仓库名称"
enable=
"false"
width=
"120"
align=
"center"
...
...
@@ -41,18 +41,18 @@
blockName=
"invent_spec_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"projCode"
cname=
"项目名称"
width=
"3
0
0"
align=
"center"
defaultValue=
""
required=
"true"
<EF:EFComboColumn
ename=
"projCode"
cname=
"项目名称"
width=
"3
5
0"
align=
"center"
defaultValue=
""
required=
"true"
filter=
"contains"
>
<EF:EFOptions
blockId=
"proj_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"applyAmount"
cname=
"申请数量"
width=
"120"
align=
"right"
format=
"{0:N0}"
required=
"true"
/>
<EF:EFColumn
ename=
"applyRemark"
cname=
"申请说明"
width=
"
15
0"
editType=
"textarea"
copy=
"true"
/>
<EF:EFColumn
ename=
"applyRemark"
cname=
"申请说明"
width=
"
20
0"
editType=
"textarea"
copy=
"true"
/>
<EF:EFColumn
ename=
"amount"
cname=
"库存数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"unitWeight"
cname=
"单量(KG)"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"weight"
cname=
"库存重量(KG)"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
enable=
"false"
width=
"150"
hidden=
"true"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
src/main/webapp/HP/PZ/HPPZ015.jsp
View file @
6c6b8f18
...
...
@@ -22,10 +22,10 @@
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"templateName"
cname=
"模板名称"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"created
By"
enable=
"false"
cname=
"创建人"
/>
<EF:EFColumn
ename=
"createdTime"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
enable=
"false"
cname=
"创建时间"
/>
<EF:EFColumn
ename=
"updated
By
"
enable=
"false"
cname=
"修改人"
/>
<EF:EFColumn
ename=
"updatedTime"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
enable=
"false"
cname=
"修改时间"
/>
<EF:EFColumn
ename=
"created
Name"
enable=
"false"
align=
"center"
cname=
"创建人"
/>
<EF:EFColumn
ename=
"createdTime"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
enable=
"false"
align=
"center"
cname=
"创建时间"
/>
<EF:EFColumn
ename=
"updated
Name
"
enable=
"false"
cname=
"修改人"
/>
<EF:EFColumn
ename=
"updatedTime"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
enable=
"false"
align=
"center"
cname=
"修改时间"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...
...
src/main/webapp/HP/PZ/HPPZ015A.js
View file @
6c6b8f18
...
...
@@ -14,7 +14,7 @@ if (url.indexOf("?") != -1) { //判断是否有参数
$
(
function
()
{
IPLATUI
.
EFTree
=
{
"materialTree"
:
{
ROOT
:
"root:
项目
列表"
,
ROOT
:
"root:
产品
列表"
,
/**
* 树加载完成后的回调函数
* @param options: 树的配置项
...
...
@@ -135,7 +135,17 @@ $(function () {
* e.preventDefault 阻止事件发生
*/
beforeAdd
:
function
(
e
)
{
var
lv
=
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
lv
;
var
logic
=
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
nodeId
?
false
:
true
;
if
(
lv
===
'3'
)
{
IPLAT
.
alert
({
message
:
'<b>不能在零件下进行新增</b>'
,
okFn
:
function
(
e
)
{
},
title
:
'提示'
});
e
.
preventDefault
();
}
else
{
if
(
logic
)
{
// 通过业务逻辑判断, 控制是否进行新增
IPLAT
.
alert
({
message
:
'<b>请选择项目列表</b>'
,
...
...
@@ -145,6 +155,7 @@ $(function () {
});
e
.
preventDefault
();
}
}
},
/**
* EFGrid新增行时触发的事件,此时数据行tr元素还未渲染
...
...
src/main/webapp/HP/SC/HPSC002.js
View file @
6c6b8f18
...
...
@@ -436,15 +436,33 @@ $(function () {
*/
$
(
"#GENERATE"
).
on
(
"click"
,
function
()
{
var
projCode
=
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
projCode
;
if
(
projCode
===
undefined
)
{
IPLAT
.
alert
({
message
:
'<b>请选择项目列表</b>'
,
var
projCode
=
strs
[
1
];
var
info
=
new
EiInfo
()
info
.
set
(
"id"
,
projCode
);
EiCommunicator
.
send
(
"HPPZ015"
,
"count"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
1
)
{
//处理存在产品模板
var
generateName
=
ei
[
"extAttr"
][
"tempName"
];
IPLAT
.
confirm
({
message
:
'<b>模板名称:<red>*<red></b> <input id="generateName" type="text" name="generateName" '
+
'class="k-textbox" with="30px" required="true" value=" '
+
generateName
+
'"/>'
,
okFn
:
function
(
e
)
{
var
generateName
=
$
(
"#generateName"
).
val
();
if
(
generateName
===
""
)
{
message
(
"模板名称不能为空!"
);
}
else
{
generateMode
(
projCode
,
generateName
);
}
},
title
:
'提示'
cancelFn
:
function
(
e
)
{
IPLAT
.
NotificationUtil
(
'取消该操作'
);
},
title
:
'该产品模板已经存在,是否覆盖'
,
minWidth
:
300
});
}
else
{
}
else
{
IPLAT
.
confirm
({
message
:
'<b>模板名称:<red>*<red></b> <input id="generateName" name="generateName" '
+
'class="k-textbox" with="30px" required="true" />'
,
...
...
@@ -462,7 +480,12 @@ $(function () {
title
:
'生成物料清单模板确认'
,
minWidth
:
300
});
}
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
});
// 模板选择
...
...
@@ -472,15 +495,13 @@ $(function () {
* 物料生成
*/
function
assign
()
{
var
projCode
=
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
projCode
;
if
(
projCode
===
undefined
)
{
IPLAT
.
alert
({
message
:
'<b>请选择项目列表</b>'
,
okFn
:
function
(
e
)
{
},
title
:
'提示'
});
}
else
{
var
projCode
=
strs
[
1
];
var
info
=
new
EiInfo
()
info
.
set
(
"id"
,
projCode
);
EiCommunicator
.
send
(
"HPSC002"
,
"count"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
1
)
{
var
projCodeNew
=
ei
[
"extAttr"
][
"projCode"
];
JSColorbox
.
open
({
href
:
"HPSC002C?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>选择产品模板</div>"
,
...
...
@@ -490,7 +511,8 @@ $(function () {
var
info
=
new
EiInfo
()
info
.
set
(
"id"
,
row
.
id
);
info
.
set
(
"projCode"
,
row
.
projCode
);
/* EiCommunicator.send("HPPZ015", "assign", info, {
info
.
set
(
"projCodeNew"
,
projCodeNew
);
EiCommunicator
.
send
(
"HPPZ015"
,
"assign"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
-
1
)
{
NotificationUtil
(
ei
,
"error"
);
...
...
@@ -498,6 +520,9 @@ $(function () {
NotificationUtil
({
msg
:
ei
.
msg
});
//刷新树
var
tree
=
$
(
"#materialTree"
).
data
(
"kendoTreeView"
);
tree
.
reload
(
"root"
);
//更新树
// 刷新列表
resultGrid
.
dataSource
.
page
(
1
);
// 关闭弹窗
...
...
@@ -505,15 +530,25 @@ $(function () {
}
},
onFail
:
function
(
ei
)
{
}
}, {async: false});
*/
},
{
async
:
false
});
}
});
}
else
{
IPLAT
.
alert
({
message
:
'<b>该项目下已有物料清单!</b>'
,
okFn
:
function
(
e
)
{
},
title
:
'提示'
});
}
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
}
function
generateMode
(
projCode
,
generateName
)
{
const
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"
projCode
"
,
projCode
);
inEiInfo
.
set
(
"
id
"
,
projCode
);
inEiInfo
.
set
(
"templateName"
,
generateName
);
EiCommunicator
.
send
(
'HPPZ015'
,
'insert'
,
inEiInfo
,
{
onSuccess
(
response
)
{
...
...
src/main/webapp/HP/SC/HPSC002C.js
View file @
6c6b8f18
...
...
@@ -26,7 +26,7 @@ $(function () {
parent
.
JSColorbox
.
setValueCallback
(
row
);
return
;
};
JSUtils
.
confirm
(
"确定选择
改
模板吗? "
,
{
JSUtils
.
confirm
(
"确定选择
该
模板吗? "
,
{
ok
:
function
()
{
parent
.
JSColorbox
.
setValueCallback
(
row
);
}
...
...
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