Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-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
hg-smart
Commits
21d71108
Commit
21d71108
authored
Oct 09, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-10-09 物料清单生成模板
parent
25e4cd81
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
159 additions
and
84 deletions
+159
-84
DdynamicEnum.java
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
+25
-3
HGPZ015.java
src/main/java/com/baosight/hggp/hg/pz/domain/HGPZ015.java
+16
-20
HGPZ015A.java
src/main/java/com/baosight/hggp/hg/pz/domain/HGPZ015A.java
+12
-16
ServiceHGPZ015.java
.../java/com/baosight/hggp/hg/pz/service/ServiceHGPZ015.java
+16
-13
HGPZ015.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ015.xml
+10
-10
HGPZ015A.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ015A.xml
+57
-18
ServiceHGSC004.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC004.java
+20
-1
HGSC004A.js
src/main/webapp/HG/SC/HGSC004A.js
+3
-3
No files found.
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
View file @
21d71108
...
...
@@ -2,8 +2,6 @@ package com.baosight.hggp.common;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.sb.domain.HGSB001
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -31,6 +29,31 @@ public enum DdynamicEnum {
PROJ_TYPE_BLOCK_ID
(
"proj_type_block_id"
,
"natCode"
,
"natName"
,
"HGPZ008.queryComboBox"
),
/**
* 模块:供应商档案
* 用途:供应商档案下拉框
* 编写:wwl
*/
SUPPLIER_RECORD_BLOCK_ID
(
"supplier_record_block_id"
,
"custCode"
,
"custName"
,
"HGPZ002.queryComboBox"
),
/**
* 模块:存货名称
* 用途:存货名称下拉框
* 编写:wwl
*/
INVENT_NAME_BLOCK_ID
(
"invent_name_block_id"
,
"inventType"
,
"inventTypeName"
,
"HGPZ004.queryComboBox"
),
/**
* 模块:物料清单
* 用途:物料清单部件类型 耗材 零件 部件
* 编写:ly
*/
CODESET_CODE_BLOCK_ID
(
"codeset_code_block_id"
,
"itemCode"
,
"itemCname"
,
"HGSC002.querySmallCode"
),
/**
* 模块:客户类型
* 用途:客户类型下拉框
* 编写:
...
...
@@ -294,7 +317,6 @@ public enum DdynamicEnum {
*/
GROUP_CODE_BOX_BLOCK_ID
(
"groupCodeBox_block_id"
,
"orgEname"
,
"orgCname"
,
"factoryCode"
,
"factoryName"
,
"companyCode"
,
"companyName"
,
"HGSB001.queryGroupCodeBox"
,
new
HashMap
<
String
,
Object
>(){{
put
(
HGSB001
.
FIELD_ACCOUNT_CODE
,
UserSessionUtils
.
getAccountCode
());
//put(HGSB001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
put
(
"orgTypes"
,
new
String
[]{
OrgTypeEnum
.
COMPANY
.
getCode
(),
OrgTypeEnum
.
FACTORY
.
getCode
()});
}}
...
...
src/main/java/com/baosight/hggp/hg/pz/domain/HGPZ015.java
View file @
21d71108
...
...
@@ -23,7 +23,7 @@ public class HGPZ015 extends DaoEPBase {
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
/* ID*/
public
static
final
String
FIELD_
COMPANY_CODE
=
"company
Code"
;
/* 企业编码 预留*/
public
static
final
String
FIELD_
ACCOUNT_CODE
=
"account
Code"
;
/* 企业编码 预留*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码 预留*/
public
static
final
String
FIELD_PROJ_CODE
=
"projCode"
;
/* 项目编码*/
public
static
final
String
FIELD_TEMPLATE_CODE
=
"templateCode"
;
/* 产品代码*/
...
...
@@ -38,7 +38,7 @@ public class HGPZ015 extends DaoEPBase {
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 修改时间*/
public
static
final
String
COL_ID
=
"ID"
;
/* ID*/
public
static
final
String
COL_
COMPANY_CODE
=
"COMPANY
_CODE"
;
/* 企业编码 预留*/
public
static
final
String
COL_
ACCOUNT_CODE
=
"ACCOUNT
_CODE"
;
/* 企业编码 预留*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码 预留*/
public
static
final
String
COL_PROJ_CODE
=
"PROJ_CODE"
;
/* 项目编码*/
public
static
final
String
COL_TEMPLATE_CODE
=
"TEMPLATE_CODE"
;
/* 产品代码*/
...
...
@@ -59,13 +59,13 @@ public class HGPZ015 extends DaoEPBase {
public
static
final
String
DELETE
=
"HGPZ015.delete"
;
private
Long
id
=
new
Long
(
0
);
/* ID*/
private
String
company
Code
=
" "
;
/* 企业编码 预留*/
private
String
account
Code
=
" "
;
/* 企业编码 预留*/
private
String
depCode
=
" "
;
/* 部门编码 预留*/
private
String
projCode
=
" "
;
/* 项目编码*/
private
String
templateCode
=
" "
;
/* 产品代码*/
private
String
templateName
=
" "
;
/* 产品名称*/
private
String
remark
=
" "
;
/* 备注*/
private
Boolean
deleteFlag
;
/* 是否删除0:否1.是*/
private
Integer
deleteFlag
=
0
;
/* 是否删除0:否1.是*/
private
String
createdBy
=
" "
;
/* 创建人*/
private
String
createdName
=
" "
;
/* 创建人名称*/
private
String
createdTime
=
" "
;
/* 创建时间*/
...
...
@@ -84,8 +84,8 @@ public class HGPZ015 extends DaoEPBase {
eiColumn
.
setDescName
(
"ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_
COMPANY
_CODE
);
eiColumn
.
setDescName
(
"
企业编码 预留
"
);
eiColumn
=
new
EiColumn
(
FIELD_
ACCOUNT
_CODE
);
eiColumn
.
setDescName
(
"
账套
"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DEP_CODE
);
...
...
@@ -166,18 +166,14 @@ public class HGPZ015 extends DaoEPBase {
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public
String
get
Company
Code
()
{
return
this
.
company
Code
;
public
String
get
Account
Code
()
{
return
account
Code
;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public
void
setCompanyCode
(
String
companyCode
)
{
this
.
companyCode
=
companyCode
;
public
void
setAccountCode
(
String
accountCode
)
{
this
.
accountCode
=
accountCode
;
}
/**
* get the depCode - 部门编码 预留.
* @return the depCode
...
...
@@ -262,7 +258,7 @@ public class HGPZ015 extends DaoEPBase {
* get the deleteFlag - 是否删除0:否1.是.
* @return the deleteFlag
*/
public
Boolean
getDeleteFlag
()
{
public
Integer
getDeleteFlag
()
{
return
this
.
deleteFlag
;
}
...
...
@@ -271,7 +267,7 @@ public class HGPZ015 extends DaoEPBase {
*
* @param deleteFlag - 是否删除0:否1.是
*/
public
void
setDeleteFlag
(
Boolean
deleteFlag
)
{
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
/**
...
...
@@ -379,13 +375,13 @@ public class HGPZ015 extends DaoEPBase {
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
set
CompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_CODE
)),
company
Code
));
set
AccountCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACCOUNT_CODE
)),
account
Code
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setProjCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_CODE
)),
projCode
));
setTemplateCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_TEMPLATE_CODE
)),
templateCode
));
setTemplateName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_TEMPLATE_NAME
)),
templateName
));
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARK
)),
remark
));
setDeleteFlag
(
NumberUtils
.
to
Boolean
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setDeleteFlag
(
NumberUtils
.
to
Integer
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_NAME
)),
createdName
));
setCreatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_TIME
)),
createdTime
));
...
...
@@ -402,7 +398,7 @@ public class HGPZ015 extends DaoEPBase {
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_
ACCOUNT_CODE
,
StringUtils
.
toString
(
accountCode
,
eiMetadata
.
getMeta
(
FIELD_ACCOUNT
_CODE
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_PROJ_CODE
,
StringUtils
.
toString
(
projCode
,
eiMetadata
.
getMeta
(
FIELD_PROJ_CODE
)));
map
.
put
(
FIELD_TEMPLATE_CODE
,
StringUtils
.
toString
(
templateCode
,
eiMetadata
.
getMeta
(
FIELD_TEMPLATE_CODE
)));
...
...
src/main/java/com/baosight/hggp/hg/pz/domain/HGPZ015A.java
View file @
21d71108
...
...
@@ -24,7 +24,7 @@ public class HGPZ015A extends DaoEPBase {
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_
COMPANY_CODE
=
"company
Code"
;
/* 企业编码 预留*/
public
static
final
String
FIELD_
ACCOUNT_CODE
=
"account
Code"
;
/* 企业编码 预留*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码 预留*/
public
static
final
String
FIELD_PROJ_CODE
=
"projCode"
;
/* 项目编码*/
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
...
...
@@ -64,7 +64,7 @@ public class HGPZ015A extends DaoEPBase {
public
static
final
String
FIELD_LV
=
"lv"
;
/* 树的层级*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_
COMPANY_CODE
=
"COMPANY
_CODE"
;
/* 企业编码 预留*/
public
static
final
String
COL_
ACCOUNT_CODE
=
"ACCOUNT
_CODE"
;
/* 企业编码 预留*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码 预留*/
public
static
final
String
COL_PROJ_CODE
=
"PROJ_CODE"
;
/* 项目编码*/
public
static
final
String
COL_PROJ_NAME
=
"PROJ_NAME"
;
/* 项目名称*/
...
...
@@ -110,7 +110,7 @@ public class HGPZ015A extends DaoEPBase {
public
static
final
String
DELETE
=
"HPSC002.delete"
;
private
Long
id
;
private
String
company
Code
=
" "
;
/* 企业编码 预留*/
private
String
account
Code
=
" "
;
/* 企业编码 预留*/
private
String
depCode
=
" "
;
/* 部门编码 预留*/
private
String
projCode
=
" "
;
/* 项目编码*/
private
String
projName
=
" "
;
/* 项目名称*/
...
...
@@ -160,8 +160,8 @@ public class HGPZ015A extends DaoEPBase {
eiColumn
.
setDescName
(
" "
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_
COMPANY
_CODE
);
eiColumn
.
setDescName
(
"
企业编码 预留
"
);
eiColumn
=
new
EiColumn
(
FIELD_
ACCOUNT
_CODE
);
eiColumn
.
setDescName
(
"
账套
"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DEP_CODE
);
...
...
@@ -354,18 +354,14 @@ public class HGPZ015A extends DaoEPBase {
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public
String
get
Company
Code
()
{
return
this
.
company
Code
;
public
String
get
Account
Code
()
{
return
account
Code
;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public
void
setCompanyCode
(
String
companyCode
)
{
this
.
companyCode
=
companyCode
;
public
void
setAccountCode
(
String
accountCode
)
{
this
.
accountCode
=
accountCode
;
}
/**
* get the depCode - 部门编码 预留.
* @return the depCode
...
...
@@ -954,7 +950,7 @@ public class HGPZ015A extends DaoEPBase {
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
set
CompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_CODE
)),
company
Code
));
set
AccountCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACCOUNT_CODE
)),
account
Code
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setProjCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_CODE
)),
projCode
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
...
...
@@ -1001,7 +997,7 @@ public class HGPZ015A extends DaoEPBase {
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_
ACCOUNT_CODE
,
StringUtils
.
toString
(
accountCode
,
eiMetadata
.
getMeta
(
FIELD_ACCOUNT
_CODE
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_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
)));
...
...
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ015.java
View file @
21d71108
package
com
.
baosight
.
hggp
.
hg
.
pz
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.pz.domain.HGPZ015
;
import
com.baosight.hggp.hg.pz.domain.HGPZ015A
;
...
...
@@ -31,6 +33,7 @@ public class ServiceHGPZ015 extends ServiceBase {
* 画面初始化.
*/
@OperationLogAnnotation
(
operModul
=
"产品模板"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
HGPZ015
hppz015
=
new
HGPZ015
();
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
hppz015
);
...
...
@@ -58,7 +61,7 @@ public class ServiceHGPZ015 extends ServiceBase {
public
EiInfo
count
(
EiInfo
inInfo
)
{
HashMap
map
=
new
HashMap
();
map
.
put
(
"id"
,
inInfo
.
getString
(
"id"
));
List
<
HGPZ015
>
query
=
this
.
dao
.
query
(
"HPPZ015.query"
,
map
);
List
<
HGPZ015
>
query
=
DaoBase
.
getInstance
()
.
query
(
"HPPZ015.query"
,
map
);
if
(
query
.
size
()
>
0
)
{
inInfo
.
setStatus
(
1
);
inInfo
.
set
(
"tempName"
,
query
.
get
(
0
).
getTemplateName
());
...
...
@@ -77,7 +80,7 @@ public class ServiceHGPZ015 extends ServiceBase {
public
EiInfo
insert
(
EiInfo
inInfo
)
{
HashMap
map
=
new
HashMap
();
map
.
put
(
"id"
,
inInfo
.
getString
(
"id"
));
List
<
HGPZ015
>
query
=
this
.
dao
.
query
(
"HGPZ015.query"
,
map
);
List
<
HGPZ015
>
query
=
DaoBase
.
getInstance
()
.
query
(
"HGPZ015.query"
,
map
);
HGSC001
hpsc001
=
HGSCTools
.
Hgsc001
.
getByCode
(
inInfo
.
getString
(
"id"
));
if
(
query
.
size
()
>
0
)
{
dao
.
delete
(
"HGPZ015.delete"
,
map
);
...
...
@@ -89,18 +92,16 @@ public class ServiceHGPZ015 extends ServiceBase {
// hgpz015.setId(Long.parseLong(inInfo.getString("id")));
hgpz015
.
setProjCode
(
hpsc001
.
getProjCode
());
hgpz015
.
setTemplateName
(
inInfo
.
getString
(
"templateName"
));
hgpz015
.
setCreatedBy
(
UserSession
.
getUserId
());
hgpz015
.
setCompanyCode
(
UserSessionUtils
.
getAccountCode
());
hgpz015
.
setCreatedName
(
UserSession
.
getUserId
()+
"-"
+
UserSession
.
getLoginCName
());
hgpz015
.
setCreatedTime
(
sdf
.
format
(
new
Date
()));
hgpz015
.
setUpdatedBy
(
null
);
hgpz015
.
setUpdatedTime
(
null
);
this
.
dao
.
insert
(
"HGPZ015.insert"
,
hgpz015
.
toMap
());
DaoUtils
.
insert
(
"HGPZ015.insert"
,
hgpz015
.
toMap
());
//模板物料清单
map
.
put
(
"companyCode"
,
UserSessionUtils
.
getAccountCode
());
map
.
put
(
"templateName"
,
inInfo
.
getString
(
"templateName"
));
map
.
put
(
"projCode"
,
hpsc001
.
getProjCode
());
this
.
dao
.
insert
(
"HGPZ015A.insertMb"
,
map
);
List
<
HGPZ015A
>
hppz015AList
=
DaoBase
.
getInstance
().
query
(
"HGPZ015A.queryMb"
,
map
);
if
(
hppz015AList
.
size
()
>
0
){
hppz015AList
.
forEach
(
hgpz015A
->
DaoUtils
.
insert
(
"HGPZ015A.insert"
,
hgpz015A
.
toMap
()));
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"生成产品模板成功!"
);
}
catch
(
PlatException
e
)
{
...
...
@@ -123,7 +124,7 @@ public class ServiceHGPZ015 extends ServiceBase {
map
.
put
(
"projCode"
,
inInfo
.
getString
(
"projCode"
));
try
{
//模板清单
List
<
HGPZ015A
>
hppz015AList
=
this
.
dao
.
query
(
"HGPZ015A.queryById"
,
map
);
List
<
HGPZ015A
>
hppz015AList
=
DaoBase
.
getInstance
()
.
query
(
"HGPZ015A.queryById"
,
map
);
if
(
hppz015AList
.
size
()==
0
)
{
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setMsg
(
"生成物料清单失败!该模板物料清单不存在!"
);
...
...
@@ -134,7 +135,7 @@ public class ServiceHGPZ015 extends ServiceBase {
HashMap
hashMap
=
new
HashMap
();
hashMap
.
put
(
"leaf"
,
0
);
hashMap
.
put
(
"projCode"
,
hpsc001New
.
getProjCode
());
this
.
dao
.
update
(
"HGSC004A.updateTreeNodeLeaf2"
,
hashMap
);
DaoUtils
.
update
(
"HGSC004A.updateTreeNodeLeaf2"
,
hashMap
);
HGPZTools
.
HgPz015A
.
chekParentId
(
hppz015AList
,
hpsc001New
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"生成物料清单成功!"
);
...
...
@@ -154,6 +155,7 @@ public class ServiceHGPZ015 extends ServiceBase {
* 修改操作.
*/
@OperationLogAnnotation
(
operModul
=
"产品模板"
,
operType
=
"修改"
,
operDesc
=
"修改"
)
@Override
public
EiInfo
update
(
EiInfo
inInfo
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
try
{
...
...
@@ -164,7 +166,7 @@ public class ServiceHGPZ015 extends ServiceBase {
hgpz015
.
fromMap
(
map
);
hgpz015
.
setUpdatedBy
(
UserSession
.
getUserId
());
hgpz015
.
setUpdatedTime
(
sdf
.
format
(
new
Date
()));
this
.
dao
.
update
(
"HGPZ015.update"
,
hgpz015
.
toMap
());
DaoUtils
.
update
(
"HGPZ015.update"
,
hgpz015
.
toMap
());
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"修改成功!"
);
...
...
@@ -182,6 +184,7 @@ public class ServiceHGPZ015 extends ServiceBase {
* 删除操作.
*/
@OperationLogAnnotation
(
operModul
=
"产品模板"
,
operType
=
"删除"
,
operDesc
=
"删除"
)
@Override
public
EiInfo
delete
(
EiInfo
eiInfo
)
{
HGPZ015
HPPZ015
=
new
HGPZ015
();
EiBlock
eiBlock
=
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
);
...
...
@@ -190,7 +193,7 @@ public class ServiceHGPZ015 extends ServiceBase {
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HPPZ015
.
fromMap
(
map
);
this
.
dao
.
dele
te
(
"HPPZ015.delete"
,
HPPZ015
.
toMap
());
DaoUtils
.
upda
te
(
"HPPZ015.delete"
,
HPPZ015
.
toMap
());
}
}
catch
(
PlatException
e
)
{
eiInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
...
...
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ015.xml
View file @
21d71108
...
...
@@ -22,8 +22,8 @@
<sqlMap
namespace=
"HGPZ015"
>
<sql
id=
"authCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"
company
Code"
>
COMPANY_CODE = #company
Code#
<isNotEmpty
prepend=
" AND "
property=
"
account
Code"
>
ACCOUNT_CODE = #account
Code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
...
...
@@ -38,8 +38,8 @@
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
company
Code"
>
COMPANY_CODE = #company
Code#
<isNotEmpty
prepend=
" AND "
property=
"
account
Code"
>
ACCOUNT_CODE = #account
Code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
...
...
@@ -83,7 +83,7 @@
resultClass=
"com.baosight.hggp.hg.pz.domain.HGPZ015"
>
SELECT
ID as "id",
<!-- ID -->
COMPANY_CODE as "company
Code",
<!-- 企业编码 预留 -->
ACCOUNT_CODE as "account
Code",
<!-- 企业编码 预留 -->
DEP_CODE as "depCode",
<!-- 部门编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
TEMPLATE_CODE as "templateCode",
<!-- 产品代码 -->
...
...
@@ -103,7 +103,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID
a
sc
ID
de
sc
</isEmpty>
</dynamic>
...
...
@@ -161,7 +161,7 @@
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGPZ015 (ID,
<!-- ID -->
COMPANY
_CODE,
<!-- 企业编码 预留 -->
ACCOUNT
_CODE,
<!-- 企业编码 预留 -->
DEP_CODE,
<!-- 部门编码 预留 -->
PROJ_CODE,
<!-- 项目编码 -->
TEMPLATE_CODE,
<!-- 产品代码 -->
...
...
@@ -175,7 +175,7 @@
UPDATED_TIME,
<!-- 修改人名称 -->
UPDATED_NAME
<!-- 修改时间 -->
)
VALUES (#id#, #
company
Code#, #depCode#, #projCode#, #templateCode#, #templateName#, #remark#, #deleteFlag#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedTime#, #updatedName#)
VALUES (#id#, #
account
Code#, #depCode#, #projCode#, #templateCode#, #templateName#, #remark#, #deleteFlag#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedTime#, #updatedName#)
</insert>
<delete
id=
"delete"
>
...
...
@@ -186,7 +186,7 @@
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGPZ015
SET
COMPANY_CODE = #company
Code#,
<!-- 企业编码 预留 -->
ACCOUNT_CODE = #account
Code#,
<!-- 企业编码 预留 -->
DEP_CODE = #depCode#,
<!-- 部门编码 预留 -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
TEMPLATE_CODE = #templateCode#,
<!-- 产品代码 -->
...
...
@@ -208,7 +208,7 @@
resultClass=
"com.baosight.hggp.hg.pz.domain.HGPZ015"
>
SELECT
ID as "id",
<!-- ID -->
COMPANY_CODE as "company
Code",
<!-- 企业编码 预留 -->
ACCOUNT_CODE as "account
Code",
<!-- 企业编码 预留 -->
DEP_CODE as "depCode",
<!-- 部门编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
TEMPLATE_CODE as "templateCode",
<!-- 产品代码 -->
...
...
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ015A.xml
View file @
21d71108
...
...
@@ -4,7 +4,7 @@
<sql
id=
"column"
>
ID as "id",
COMPANY_CODE as "company
Code",
<!-- 企业编码 预留 -->
ACCOUNT_CODE as "account
Code",
<!-- 企业编码 预留 -->
DEP_CODE as "depCode",
<!-- 部门编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
...
...
@@ -42,7 +42,7 @@
<sql
id=
"column1"
>
A.ID as "id",
A.
COMPANY_CODE as "company
Code",
<!-- 企业编码 预留 -->
A.
ACCOUNT_CODE as "account
Code",
<!-- 企业编码 预留 -->
A.DEP_CODE as "depCode",
<!-- 部门编码 预留 -->
A.PROJ_CODE as "projCode",
<!-- 项目编码 -->
A.PROJ_NAME as "projName",
<!-- 项目名称 -->
...
...
@@ -80,8 +80,8 @@
</sql>
<sql
id=
"authCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"company
Code"
>
COMPANY_CODE = #company
Code#
<isNotEmpty
prepend=
" AND "
property=
"account
Code"
>
ACCOUNT_CODE = #account
Code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
...
...
@@ -123,8 +123,8 @@
</sql>
<sql
id=
"authCondition1"
>
<isNotEmpty
prepend=
" AND "
property=
"
company
Code"
>
A.
COMPANY_CODE = #company
Code#
<isNotEmpty
prepend=
" AND "
property=
"
account
Code"
>
A.
ACCOUNT_CODE = #account
Code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
A.DEP_CODE = #depCode#
...
...
@@ -191,6 +191,34 @@
<include
refid=
"order"
/>
</select>
<select
id=
"queryMb"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.pz.domain.HGPZ015A"
>
SELECT
PROJ_CODE,
PARENT_PROD_CODE,
CASE WHEN LEAF = #templateName# THEN '' ELSE PARENT_PROD_NAME END as PARENT_PRDT_NAME,
LEAF,
SORT,
PRODUCT_TYPE,
PRODUCT_CODE,
PRODUCT_NAME,
MATERIAL_ID,
quantity,
single_weight,
total_weight,
APPROVAL_STATUS,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME,
LV,
SPEC,
LENGTH,
WIDTH,
THICK
FROM ${hggpSchema}.hgsc004a
where ACCOUNT_CODE=#accountCode# AND PROJ_CODE=#projCode#
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.hgpz015a WHERE 1=1
AND PARENT_ID NOT IN ('root')
...
...
@@ -200,7 +228,7 @@
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.hgpz015a (ID,
COMPANY
_CODE,
<!-- 企业编码 预留 -->
ACCOUNT
_CODE,
<!-- 企业编码 预留 -->
DEP_CODE,
<!-- 部门编码 预留 -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
...
...
@@ -235,7 +263,7 @@
WIDTH,
<!-- 宽 -->
THICK
<!-- 厚 -->
)
VALUES (#id#, #
company
Code#, #depCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#,
VALUES (#id#, #
account
Code#, #depCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#,
#type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #inventRecordId#, #num#,
#unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#,
#delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#, #lv#, #spec#,
...
...
@@ -245,7 +273,7 @@
<insert
id=
"insertMb"
parameterClass=
"java.util.HashMap"
>
INSERT INTO ${hggpSchema}.hgpz015a(
ID,
COMPANY
_CODE,
ACCOUNT
_CODE,
DEP_CODE,
PROJ_CODE,
PROJ_NAME,
...
...
@@ -272,7 +300,7 @@
THICK
)(
SELECT a.ID,
a.
COMPANY
_CODE,
a.
ACCOUNT
_CODE,
a.DEP_CODE,
a.PROJ_CODE,
a.PARENT_PROD_CODE,
...
...
@@ -296,8 +324,8 @@
a.LENGTH,
a.WIDTH,
a.THICK
FROM
hggp
.hgsc004a a
where PROJ_CODE=#projCode# AND
COMPANY_CODE=#company
Code#
FROM
${hggpSchema}
.hgsc004a a
where PROJ_CODE=#projCode# AND
ACCOUNT_CODE=#account
Code#
)
</insert>
...
...
@@ -309,7 +337,7 @@
<update
id=
"update"
>
UPDATE ${hggpSchema}.hppz015a
SET
COMPANY_CODE = #company
Code#,
<!-- 企业编码 预留 -->
ACCOUNT_CODE = #account
Code#,
<!-- 企业编码 预留 -->
DEP_CODE = #depCode#,
<!-- 部门编码 预留 -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
...
...
@@ -367,8 +395,10 @@
SPEC as "spec"
FROM
${hggpSchema}.hppz015a
WHERE
1=1
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"pEname"
>
PARENT_ID = #pEname#
</isNotEmpty>
...
...
@@ -384,6 +414,9 @@
<include
refid=
"column"
/>
FROM ${hggpSchema}.hgpz015a
WHERE 1 = 1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
PARENT_ID = #id#
</isNotEmpty>
...
...
@@ -393,11 +426,14 @@
</select>
<!-- 根据父级ID查询 -->
<select
id=
"queryEntityByParentPrtdCode"
resultClass=
"com.baosight.h
pjx.hp.pz.domain.HP
PZ015A"
>
<select
id=
"queryEntityByParentPrtdCode"
resultClass=
"com.baosight.h
ggp.hg.pz.domain.HG
PZ015A"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.hgpz015a
WHERE 1 = 1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
...
...
@@ -467,10 +503,10 @@
</isNotEmpty>
</select>
<select
id=
"queryById"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.h
pjx.hp.pz.domain.HP
PZ015A"
>
<select
id=
"queryById"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.h
ggp.hg.pz.domain.HG
PZ015A"
>
SELECT
ID as "id",
COMPANY_CODE as "company
Code",
<!-- 企业编码 预留 -->
ACCOUNT_CODE as "account
Code",
<!-- 企业编码 预留 -->
DEP_CODE as "depCode",
<!-- 部门编码 预留 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
...
...
@@ -490,6 +526,9 @@
THICK as "thick"
<!-- 厚 -->
FROM ${hggpSchema}.hgpz015a
WHERE 1=1 AND PROJ_CODE=#projCode# AND PARENT_ID NOT IN('root')
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC004.java
View file @
21d71108
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.sc.domain.HGSC003
;
import
com.baosight.hggp.hg.sc.domain.HGSC004
;
import
com.baosight.hggp.hg.sc.domain.HGSC004A
;
...
...
@@ -189,6 +192,22 @@ public class ServiceHGSC004 extends ServiceBase {
DaoUtils
.
insert
(
HGSC004A
.
INSERT
,
projectHgsc004A
);
}
@OperationLogAnnotation
(
operModul
=
"物料清单"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
count
(
EiInfo
inInfo
)
{
try
{
HashMap
map
=
new
HashMap
();
map
.
put
(
HGSC004
.
FIELD_proj_code
,
inInfo
.
getString
(
"id"
));
List
<
HGSC004
>
results
=
DaoBase
.
getInstance
().
query
(
"HGSC004.query"
,
map
);
if
(
results
.
size
()
>
1
)
{
inInfo
.
setStatus
(
0
);
}
else
{
inInfo
.
setStatus
(
1
);
inInfo
.
set
(
HGSC004
.
FIELD_proj_code
,
inInfo
.
getString
(
"id"
));
}
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
}
src/main/webapp/HG/SC/HGSC004A.js
View file @
21d71108
...
...
@@ -22,7 +22,7 @@ $(function () {
$
(
"#GENERATE"
).
on
(
"click"
,
function
()
{
var
projCode
=
$
(
"#inqu_status-0-projCode"
).
val
();
var
info
=
new
EiInfo
()
info
.
set
(
"id"
,
$
(
"#inqu_status-0-projCode"
).
val
()
);
info
.
set
(
"id"
,
projCode
);
EiCommunicator
.
send
(
"HGPZ015"
,
"count"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
1
)
{
...
...
@@ -77,10 +77,10 @@ $(function () {
* 物料生成
*/
function
assign
()
{
var
projCode
=
$
(
"#inqu_status-0-proj
Id
"
).
val
();
var
projCode
=
$
(
"#inqu_status-0-proj
Code
"
).
val
();
var
info
=
new
EiInfo
()
info
.
set
(
"id"
,
projCode
);
EiCommunicator
.
send
(
"HGSC00
2
"
,
"count"
,
info
,
{
EiCommunicator
.
send
(
"HGSC00
4
"
,
"count"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
1
)
{
var
projCodeNew
=
ei
[
"extAttr"
][
"projCode"
];
...
...
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