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
f37e2510
Commit
f37e2510
authored
May 20, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料清单明细页面操作处理、提交处理
parent
d6dd4825
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
837 additions
and
359 deletions
+837
-359
DdynamicEnum.java
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
+6
-0
DaoUtils.java
src/main/java/com/baosight/hggp/core/dao/DaoUtils.java
+26
-8
HGConstant.java
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
+1
-1
HGPZ005.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ005.xml
+24
-0
HGSC004.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC004.java
+19
-3
HGSC004A.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC004A.java
+94
-0
ServiceHGSC004.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC004.java
+79
-16
ServiceHGSC004A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
+105
-74
HGSC004.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC004.xml
+32
-60
HGSC004A.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC004A.xml
+133
-105
HGSC004.js
src/main/webapp/HG/SC/HGSC004.js
+3
-3
HGSC004A.js
src/main/webapp/HG/SC/HGSC004A.js
+296
-66
HGSC004A.jsp
src/main/webapp/HG/SC/HGSC004A.jsp
+19
-23
No files found.
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
View file @
f37e2510
...
@@ -73,6 +73,12 @@ public enum DdynamicEnum {
...
@@ -73,6 +73,12 @@ public enum DdynamicEnum {
INVENT_RECORD_BLOCK_ID
(
"invent_record_block_id"
,
"inventCode"
,
"inventName"
,
"HGPZ005.queryComboBox"
),
INVENT_RECORD_BLOCK_ID
(
"invent_record_block_id"
,
"inventCode"
,
"inventName"
,
"HGPZ005.queryComboBox"
),
/**
/**
* 模块:存货档案
* 用途:存货档案下拉框,带id名称等信息
* 编写:
*/
PRODUCT_BLOCK_ID
(
"product_block_id"
,
"inventCode"
,
"inventName"
,
"id"
,
"inventType"
,
"HGPZ005.queryProductComboBox"
),
/**
* 模块:存货档案(ALL)
* 模块:存货档案(ALL)
* 用途:存货档案下拉框
* 用途:存货档案下拉框
* 编写:
* 编写:
...
...
src/main/java/com/baosight/hggp/core/dao/DaoUtils.java
View file @
f37e2510
...
@@ -12,6 +12,7 @@ import org.apache.commons.collections.CollectionUtils;
...
@@ -12,6 +12,7 @@ import org.apache.commons.collections.CollectionUtils;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -23,7 +24,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -23,7 +24,7 @@ import lombok.extern.slf4j.Slf4j;
*/
*/
@Slf4j
@Slf4j
public
class
DaoUtils
{
public
class
DaoUtils
{
/**
/**
* count 查询
* count 查询
*
*
...
@@ -36,7 +37,7 @@ public class DaoUtils {
...
@@ -36,7 +37,7 @@ public class DaoUtils {
List
<
Integer
>
countMaps
=
DaoBase
.
getInstance
().
query
(
sqlName
,
paramMap
);
List
<
Integer
>
countMaps
=
DaoBase
.
getInstance
().
query
(
sqlName
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
countMaps
)
?
0
:
countMaps
.
get
(
0
).
intValue
();
return
CollectionUtils
.
isEmpty
(
countMaps
)
?
0
:
countMaps
.
get
(
0
).
intValue
();
}
}
/**
/**
* insert method.
* insert method.
*
*
...
@@ -56,7 +57,7 @@ public class DaoUtils {
...
@@ -56,7 +57,7 @@ public class DaoUtils {
}
}
DaoBase
.
getInstance
().
insert
(
sql
,
obj
);
DaoBase
.
getInstance
().
insert
(
sql
,
obj
);
}
}
/**
/**
* update method.
* update method.
*
*
...
@@ -71,7 +72,24 @@ public class DaoUtils {
...
@@ -71,7 +72,24 @@ public class DaoUtils {
}
}
return
DaoBase
.
getInstance
().
update
(
sql
,
obj
);
return
DaoBase
.
getInstance
().
update
(
sql
,
obj
);
}
}
/**
* update method.
*
* @param sql
* @param parameters
*/
public
static
int
updateBatch
(
String
sql
,
Collection
parameters
)
{
parameters
.
forEach
(
obj
->{
if
(
obj
instanceof
DaoEPBase
)
{
setRevisor
((
DaoEPBase
)
obj
,
true
);
}
else
if
(
obj
instanceof
Map
)
{
setRevisor
((
Map
)
obj
,
true
);
}
});
return
DaoBase
.
getInstance
().
updateBatch
(
sql
,
parameters
);
}
/**
/**
* 创建人工号 创建人姓名 创建人岗号 创建时刻
* 创建人工号 创建人姓名 创建人岗号 创建时刻
*
*
...
@@ -136,7 +154,7 @@ public class DaoUtils {
...
@@ -136,7 +154,7 @@ public class DaoUtils {
log
.
error
(
"写入创建时刻失败:{}"
,
e
.
getMessage
(),
e
);
log
.
error
(
"写入创建时刻失败:{}"
,
e
.
getMessage
(),
e
);
}
}
}
}
/**
/**
* 创建人工号 创建人姓名 创建时刻.
* 创建人工号 创建人姓名 创建时刻.
*
*
...
@@ -197,7 +215,7 @@ public class DaoUtils {
...
@@ -197,7 +215,7 @@ public class DaoUtils {
log
.
warn
(
"写入创建时刻失败"
,
e
);
log
.
warn
(
"写入创建时刻失败"
,
e
);
}
}
}
}
/**
/**
* 修改人工号 修改人姓名 修改人岗号 修改时刻 记录修改代理人工号 记录修改代理人姓名.
* 修改人工号 修改人姓名 修改人岗号 修改时刻 记录修改代理人工号 记录修改代理人姓名.
*
*
...
@@ -232,7 +250,7 @@ public class DaoUtils {
...
@@ -232,7 +250,7 @@ public class DaoUtils {
log
.
warn
(
"写入修改时刻失败"
,
e
);
log
.
warn
(
"写入修改时刻失败"
,
e
);
}
}
}
}
/**
/**
* 修改人工号 修改人姓名 修改人岗号 修改时刻 记录修改代理人工号 记录修改代理人姓名.
* 修改人工号 修改人姓名 修改人岗号 修改时刻 记录修改代理人工号 记录修改代理人姓名.
*
*
...
@@ -264,5 +282,5 @@ public class DaoUtils {
...
@@ -264,5 +282,5 @@ public class DaoUtils {
// 修改时间
// 修改时间
map
.
put
(
"updatedTime"
,
DateUtils
.
shortDateTime
());
map
.
put
(
"updatedTime"
,
DateUtils
.
shortDateTime
());
}
}
}
}
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
View file @
f37e2510
...
@@ -236,7 +236,7 @@ public class HGConstant {
...
@@ -236,7 +236,7 @@ public class HGConstant {
// 未提交
// 未提交
public
static
final
Integer
WTJ
=
0
;
public
static
final
Integer
WTJ
=
0
;
// 已提交
// 已提交
public
static
final
Integer
YTJ
=
2
;
public
static
final
Integer
YTJ
=
1
;
}
}
}
}
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ005.xml
View file @
f37e2510
...
@@ -315,6 +315,30 @@
...
@@ -315,6 +315,30 @@
ORDER BY INVENT_CODE
ORDER BY INVENT_CODE
</select>
</select>
<select
id=
"queryProductComboBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT
a.ID as "id",
a.INVENT_TYPE as "inventType",
a.INVENT_CODE as "inventCode",
a.INVENT_NAME as "inventName",
b.PAR_INVENT_TYPE as "parInventType"
FROM ${hggpSchema}.HGPZ005 a
left join ${hggpSchema}.hgpz004 b on a.INVENT_TYPE = b.INVENT_TYPE and b.STATUS=1 and b.DELETE_FLAG = 0
WHERE a.DELETE_FLAG = 0
AND a.STATUS=1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
a.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventType"
>
a.INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parInventType"
>
b.PAR_INVENT_TYPE = #parInventType#
</isNotEmpty>
ORDER BY INVENT_CODE
</select>
<!-- 缺省下拉框 -->
<!-- 缺省下拉框 -->
<select
id=
"queryComboBoxAll"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryComboBoxAll"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT
SELECT DISTINCT
...
...
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC004.java
View file @
f37e2510
...
@@ -40,6 +40,7 @@ public class HGSC004 extends DaoEPBase {
...
@@ -40,6 +40,7 @@ public class HGSC004 extends DaoEPBase {
public
static
final
String
FIELD_updated_by
=
"updatedBy"
;
/* 更新人*/
public
static
final
String
FIELD_updated_by
=
"updatedBy"
;
/* 更新人*/
public
static
final
String
FIELD_updated_name
=
"updatedName"
;
/* 修改人名称*/
public
static
final
String
FIELD_updated_name
=
"updatedName"
;
/* 修改人名称*/
public
static
final
String
FIELD_updated_time
=
"updatedTime"
;
/* 更新时间*/
public
static
final
String
FIELD_updated_time
=
"updatedTime"
;
/* 更新时间*/
public
static
final
String
FIELD_del_status
=
"delStatus"
;
/* 数据状态 0:保存,1:删除*/
public
static
final
String
COL_id
=
"id"
;
/* 主键*/
public
static
final
String
COL_id
=
"id"
;
/* 主键*/
public
static
final
String
COL_blueprint_id
=
"blueprint_id"
;
/* 蓝图id*/
public
static
final
String
COL_blueprint_id
=
"blueprint_id"
;
/* 蓝图id*/
...
@@ -60,6 +61,7 @@ public class HGSC004 extends DaoEPBase {
...
@@ -60,6 +61,7 @@ public class HGSC004 extends DaoEPBase {
public
static
final
String
COL_updated_by
=
"updated_by"
;
/* 更新人*/
public
static
final
String
COL_updated_by
=
"updated_by"
;
/* 更新人*/
public
static
final
String
COL_updated_name
=
"updated_name"
;
/* 修改人名称*/
public
static
final
String
COL_updated_name
=
"updated_name"
;
/* 修改人名称*/
public
static
final
String
COL_updated_time
=
"updated_time"
;
/* 更新时间*/
public
static
final
String
COL_updated_time
=
"updated_time"
;
/* 更新时间*/
public
static
final
String
COL_del_status
=
"del_status"
;
/* 数据状态 0:保存,1:删除*/
public
static
final
String
QUERY
=
"HGSC004.query"
;
public
static
final
String
QUERY
=
"HGSC004.query"
;
public
static
final
String
COUNT
=
"HGSC004.count"
;
public
static
final
String
COUNT
=
"HGSC004.count"
;
...
@@ -67,8 +69,8 @@ public class HGSC004 extends DaoEPBase {
...
@@ -67,8 +69,8 @@ public class HGSC004 extends DaoEPBase {
public
static
final
String
UPDATE
=
"HGSC004.update"
;
public
static
final
String
UPDATE
=
"HGSC004.update"
;
public
static
final
String
DELETE
=
"HGSC004.delete"
;
public
static
final
String
DELETE
=
"HGSC004.delete"
;
public
static
final
String
BATCH_DELETE
=
"HGSC004.batchDelete"
;
public
static
final
String
BATCH_DELETE
=
"HGSC004.batchDelete"
;
public
static
final
String
BATCH_SUBMIT
=
"HGSC004.batchSubmit
"
;
public
static
final
String
UPDATE_DEL
=
"HGSC004.updateDel
"
;
public
static
final
String
UPDATE_MATERIAL_STATUS
=
"HGSC004.updateMaterialStatus"
;
private
Long
id
=
new
Long
(
0
);
/* 主键*/
private
Long
id
=
new
Long
(
0
);
/* 主键*/
private
Long
blueprintId
=
new
Long
(
0
);
/* 蓝图id*/
private
Long
blueprintId
=
new
Long
(
0
);
/* 蓝图id*/
...
@@ -89,6 +91,7 @@ public class HGSC004 extends DaoEPBase {
...
@@ -89,6 +91,7 @@ public class HGSC004 extends DaoEPBase {
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedName
=
" "
;
/* 修改人名称*/
private
String
updatedName
=
" "
;
/* 修改人名称*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
Integer
delStatus
=
new
Integer
(
0
);
/* 数据状态 0:保存,1:删除*/
/**
/**
* initialize the metadata.
* initialize the metadata.
...
@@ -199,7 +202,9 @@ public class HGSC004 extends DaoEPBase {
...
@@ -199,7 +202,9 @@ public class HGSC004 extends DaoEPBase {
eiColumn
.
setDescName
(
"更新时间"
);
eiColumn
.
setDescName
(
"更新时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_del_status
);
eiColumn
.
setDescName
(
"数据状态 0:保存,1:删除"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
/**
/**
...
@@ -513,6 +518,15 @@ public class HGSC004 extends DaoEPBase {
...
@@ -513,6 +518,15 @@ public class HGSC004 extends DaoEPBase {
public
void
setUpdatedTime
(
String
updatedTime
)
{
public
void
setUpdatedTime
(
String
updatedTime
)
{
this
.
updatedTime
=
updatedTime
;
this
.
updatedTime
=
updatedTime
;
}
}
public
Integer
getDelStatus
()
{
return
delStatus
;
}
public
void
setDelStatus
(
Integer
delStatus
)
{
this
.
delStatus
=
delStatus
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -540,6 +554,7 @@ public class HGSC004 extends DaoEPBase {
...
@@ -540,6 +554,7 @@ public class HGSC004 extends DaoEPBase {
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_updated_by
)),
updatedBy
));
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_updated_by
)),
updatedBy
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_updated_name
)),
updatedName
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_updated_name
)),
updatedName
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_updated_time
)),
updatedTime
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_updated_time
)),
updatedTime
));
setDelStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_del_status
)),
delStatus
));
}
}
/**
/**
...
@@ -568,6 +583,7 @@ public class HGSC004 extends DaoEPBase {
...
@@ -568,6 +583,7 @@ public class HGSC004 extends DaoEPBase {
map
.
put
(
FIELD_updated_by
,
StringUtils
.
toString
(
updatedBy
,
eiMetadata
.
getMeta
(
FIELD_updated_by
)));
map
.
put
(
FIELD_updated_by
,
StringUtils
.
toString
(
updatedBy
,
eiMetadata
.
getMeta
(
FIELD_updated_by
)));
map
.
put
(
FIELD_updated_name
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_updated_name
)));
map
.
put
(
FIELD_updated_name
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_updated_name
)));
map
.
put
(
FIELD_updated_time
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_updated_time
)));
map
.
put
(
FIELD_updated_time
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_updated_time
)));
map
.
put
(
FIELD_del_status
,
StringUtils
.
toString
(
delStatus
,
eiMetadata
.
getMeta
(
FIELD_del_status
)));
return
map
;
return
map
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC004A.java
View file @
f37e2510
...
@@ -31,9 +31,14 @@ public class HGSC004A extends DaoEPBase {
...
@@ -31,9 +31,14 @@ public class HGSC004A extends DaoEPBase {
public
static
final
String
FIELD_proj_name
=
"projName"
;
/* 项目名称(预留)*/
public
static
final
String
FIELD_proj_name
=
"projName"
;
/* 项目名称(预留)*/
public
static
final
String
FIELD_parent_prod_code
=
"parentProdCode"
;
/* 父节点-产品编码*/
public
static
final
String
FIELD_parent_prod_code
=
"parentProdCode"
;
/* 父节点-产品编码*/
public
static
final
String
FIELD_parent_prod_name
=
"parentProdName"
;
/* 父节点-产品名称*/
public
static
final
String
FIELD_parent_prod_name
=
"parentProdName"
;
/* 父节点-产品名称*/
public
static
final
String
FIELD_leaf
=
"leaf"
;
/* 是否有叶子节点*/
public
static
final
String
FIELD_sort
=
"sort"
;
/* 排序字段*/
public
static
final
String
FIELD_lv
=
"lv"
;
/* 层级*/
public
static
final
String
FIELD_material_id
=
"materialId"
;
/* 物料清单id*/
public
static
final
String
FIELD_material_id
=
"materialId"
;
/* 物料清单id*/
public
static
final
String
FIELD_product_id
=
"productId"
;
/* 产品id*/
public
static
final
String
FIELD_product_code
=
"productCode"
;
/* 产品编号*/
public
static
final
String
FIELD_product_code
=
"productCode"
;
/* 产品编号*/
public
static
final
String
FIELD_product_name
=
"productName"
;
/* 产品名称*/
public
static
final
String
FIELD_product_name
=
"productName"
;
/* 产品名称*/
public
static
final
String
FIELD_product_type
=
"productType"
;
/* 产品type*/
public
static
final
String
FIELD_product_status
=
"productStatus"
;
/* 产品状态 0:未提交,1:已提交*/
public
static
final
String
FIELD_product_status
=
"productStatus"
;
/* 产品状态 0:未提交,1:已提交*/
public
static
final
String
FIELD_change_type
=
"changeType"
;
/* 变更类型:默认0,1:增加,2:替换,3:删除*/
public
static
final
String
FIELD_change_type
=
"changeType"
;
/* 变更类型:默认0,1:增加,2:替换,3:删除*/
public
static
final
String
FIELD_quantity
=
"quantity"
;
/* 数量*/
public
static
final
String
FIELD_quantity
=
"quantity"
;
/* 数量*/
...
@@ -57,9 +62,14 @@ public class HGSC004A extends DaoEPBase {
...
@@ -57,9 +62,14 @@ public class HGSC004A extends DaoEPBase {
public
static
final
String
COL_proj_name
=
"proj_name"
;
/* 项目名称(预留)*/
public
static
final
String
COL_proj_name
=
"proj_name"
;
/* 项目名称(预留)*/
public
static
final
String
COL_parent_prod_code
=
"parent_prod_code"
;
/* 父节点-产品编码*/
public
static
final
String
COL_parent_prod_code
=
"parent_prod_code"
;
/* 父节点-产品编码*/
public
static
final
String
COL_parent_prod_name
=
"parent_prod_name"
;
/* 父节点-产品名称*/
public
static
final
String
COL_parent_prod_name
=
"parent_prod_name"
;
/* 父节点-产品名称*/
public
static
final
String
COL_leaf
=
"leaf"
;
/* 是否有叶子节点*/
public
static
final
String
COL_sort
=
"sort"
;
/* 排序字段*/
public
static
final
String
COL_lv
=
"lv"
;
/* 层级*/
public
static
final
String
COL_material_id
=
"material_id"
;
/* 物料清单id*/
public
static
final
String
COL_material_id
=
"material_id"
;
/* 物料清单id*/
public
static
final
String
COL_product_id
=
"product_id"
;
/* 产品id*/
public
static
final
String
COL_product_code
=
"product_code"
;
/* 产品编号*/
public
static
final
String
COL_product_code
=
"product_code"
;
/* 产品编号*/
public
static
final
String
COL_product_name
=
"product_name"
;
/* 产品名称*/
public
static
final
String
COL_product_name
=
"product_name"
;
/* 产品名称*/
public
static
final
String
COL_product_type
=
"product_type"
;
/* 产品类型*/
public
static
final
String
COL_product_status
=
"product_status"
;
/* 产品状态 0:未提交,1:已提交*/
public
static
final
String
COL_product_status
=
"product_status"
;
/* 产品状态 0:未提交,1:已提交*/
public
static
final
String
COL_change_type
=
"change_type"
;
/* 变更类型:默认0,1:增加,2:替换,3:删除*/
public
static
final
String
COL_change_type
=
"change_type"
;
/* 变更类型:默认0,1:增加,2:替换,3:删除*/
public
static
final
String
COL_quantity
=
"quantity"
;
/* 数量*/
public
static
final
String
COL_quantity
=
"quantity"
;
/* 数量*/
...
@@ -79,6 +89,11 @@ public class HGSC004A extends DaoEPBase {
...
@@ -79,6 +89,11 @@ public class HGSC004A extends DaoEPBase {
public
static
final
String
INSERT
=
"HGSC004A.insert"
;
public
static
final
String
INSERT
=
"HGSC004A.insert"
;
public
static
final
String
UPDATE
=
"HGSC004A.update"
;
public
static
final
String
UPDATE
=
"HGSC004A.update"
;
public
static
final
String
DELETE
=
"HGSC004A.delete"
;
public
static
final
String
DELETE
=
"HGSC004A.delete"
;
public
static
final
String
BATCH_DELETE
=
"HGSC004A.batchDelete"
;
public
static
final
String
QUERY_ALL
=
"HGSC004A.queryAll"
;
public
static
final
String
UPDATE_PRODUCT_STATUS
=
"HGSC004A.updateProductStatus"
;
private
Long
id
=
new
Long
(
0
);
/* 主键*/
private
Long
id
=
new
Long
(
0
);
/* 主键*/
private
String
companyCode
=
" "
;
/* 公司编码(预留)*/
private
String
companyCode
=
" "
;
/* 公司编码(预留)*/
...
@@ -89,9 +104,14 @@ public class HGSC004A extends DaoEPBase {
...
@@ -89,9 +104,14 @@ public class HGSC004A extends DaoEPBase {
private
String
projName
=
" "
;
/* 项目名称(预留)*/
private
String
projName
=
" "
;
/* 项目名称(预留)*/
private
String
parentProdCode
=
" "
;
/* 父节点-产品编码*/
private
String
parentProdCode
=
" "
;
/* 父节点-产品编码*/
private
String
parentProdName
=
" "
;
/* 父节点-产品名称*/
private
String
parentProdName
=
" "
;
/* 父节点-产品名称*/
private
Integer
leaf
=
new
Integer
(
1
);
/* 是否有叶子节点*/
private
Integer
sort
=
new
Integer
(
1
);
/* 排序字段*/
private
Integer
lv
=
new
Integer
(
0
);;
/* 树的层级*/
private
Long
materialId
=
new
Long
(
0
);
/* 物料清单id*/
private
Long
materialId
=
new
Long
(
0
);
/* 物料清单id*/
private
Long
productId
=
new
Long
(
0
);
/* 产品id*/
private
String
productCode
=
" "
;
/* 产品编号*/
private
String
productCode
=
" "
;
/* 产品编号*/
private
String
productName
=
" "
;
/* 产品名称*/
private
String
productName
=
" "
;
/* 产品名称*/
private
String
productType
=
" "
;
/* 产品id*/
private
Integer
productStatus
=
new
Integer
(
0
);
/* 产品状态 0:未提交,1:已提交*/
private
Integer
productStatus
=
new
Integer
(
0
);
/* 产品状态 0:未提交,1:已提交*/
private
Integer
changeType
=
new
Integer
(
0
);
/* 变更类型:默认0,1:增加,2:替换,3:删除*/
private
Integer
changeType
=
new
Integer
(
0
);
/* 变更类型:默认0,1:增加,2:替换,3:删除*/
private
Integer
quantity
=
new
Integer
(
0
);
/* 数量*/
private
Integer
quantity
=
new
Integer
(
0
);
/* 数量*/
...
@@ -159,6 +179,18 @@ public class HGSC004A extends DaoEPBase {
...
@@ -159,6 +179,18 @@ public class HGSC004A extends DaoEPBase {
eiColumn
.
setDescName
(
"父节点-产品名称"
);
eiColumn
.
setDescName
(
"父节点-产品名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_leaf
);
eiColumn
.
setDescName
(
"是否有叶子节点"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_sort
);
eiColumn
.
setDescName
(
"排序字段"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_lv
);
eiColumn
.
setDescName
(
"层级"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_material_id
);
eiColumn
=
new
EiColumn
(
FIELD_material_id
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
0
);
eiColumn
.
setScaleLength
(
0
);
...
@@ -166,6 +198,12 @@ public class HGSC004A extends DaoEPBase {
...
@@ -166,6 +198,12 @@ public class HGSC004A extends DaoEPBase {
eiColumn
.
setDescName
(
"物料清单id"
);
eiColumn
.
setDescName
(
"物料清单id"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_product_id
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"产品Id"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_product_code
);
eiColumn
=
new
EiColumn
(
FIELD_product_code
);
eiColumn
.
setFieldLength
(
32
);
eiColumn
.
setFieldLength
(
32
);
eiColumn
.
setDescName
(
"产品编号"
);
eiColumn
.
setDescName
(
"产品编号"
);
...
@@ -176,6 +214,11 @@ public class HGSC004A extends DaoEPBase {
...
@@ -176,6 +214,11 @@ public class HGSC004A extends DaoEPBase {
eiColumn
.
setDescName
(
"产品名称"
);
eiColumn
.
setDescName
(
"产品名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_product_type
);
eiColumn
.
setFieldLength
(
32
);
eiColumn
.
setDescName
(
"产品类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_product_status
);
eiColumn
=
new
EiColumn
(
FIELD_product_status
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
0
);
eiColumn
.
setScaleLength
(
0
);
...
@@ -663,6 +706,47 @@ public class HGSC004A extends DaoEPBase {
...
@@ -663,6 +706,47 @@ public class HGSC004A extends DaoEPBase {
public
void
setUpdatedTime
(
String
updatedTime
)
{
public
void
setUpdatedTime
(
String
updatedTime
)
{
this
.
updatedTime
=
updatedTime
;
this
.
updatedTime
=
updatedTime
;
}
}
public
Integer
getLeaf
()
{
return
leaf
;
}
public
void
setLeaf
(
Integer
leaf
)
{
this
.
leaf
=
leaf
;
}
public
Integer
getSort
()
{
return
sort
;
}
public
void
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
}
public
Integer
getLv
()
{
return
lv
;
}
public
void
setLv
(
Integer
lv
)
{
this
.
lv
=
lv
;
}
public
Long
getProductId
()
{
return
productId
;
}
public
void
setProductId
(
Long
productId
)
{
this
.
productId
=
productId
;
}
public
String
getProductType
()
{
return
productType
;
}
public
void
setProductType
(
String
productType
)
{
this
.
productType
=
productType
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -680,9 +764,14 @@ public class HGSC004A extends DaoEPBase {
...
@@ -680,9 +764,14 @@ public class HGSC004A extends DaoEPBase {
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_proj_name
)),
projName
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_proj_name
)),
projName
));
setParentProdCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_parent_prod_code
)),
parentProdCode
));
setParentProdCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_parent_prod_code
)),
parentProdCode
));
setParentProdName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_parent_prod_name
)),
parentProdName
));
setParentProdName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_parent_prod_name
)),
parentProdName
));
setLeaf
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_leaf
)),
leaf
));
setSort
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_sort
)),
sort
));
setLv
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_lv
)),
lv
));
setMaterialId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_material_id
)),
materialId
));
setMaterialId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_material_id
)),
materialId
));
setProductCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_product_code
)),
productCode
));
setProductCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_product_code
)),
productCode
));
setProductName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_product_name
)),
productName
));
setProductName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_product_name
)),
productName
));
setProductId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_product_id
)),
productId
));
setProductType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_product_type
)),
productType
));
setProductStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_product_status
)),
productStatus
));
setProductStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_product_status
)),
productStatus
));
setChangeType
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_change_type
)),
changeType
));
setChangeType
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_change_type
)),
changeType
));
setQuantity
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_quantity
)),
quantity
));
setQuantity
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_quantity
)),
quantity
));
...
@@ -714,9 +803,14 @@ public class HGSC004A extends DaoEPBase {
...
@@ -714,9 +803,14 @@ public class HGSC004A extends DaoEPBase {
map
.
put
(
FIELD_proj_name
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_proj_name
)));
map
.
put
(
FIELD_proj_name
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_proj_name
)));
map
.
put
(
FIELD_parent_prod_code
,
StringUtils
.
toString
(
parentProdCode
,
eiMetadata
.
getMeta
(
FIELD_parent_prod_code
)));
map
.
put
(
FIELD_parent_prod_code
,
StringUtils
.
toString
(
parentProdCode
,
eiMetadata
.
getMeta
(
FIELD_parent_prod_code
)));
map
.
put
(
FIELD_parent_prod_name
,
StringUtils
.
toString
(
parentProdName
,
eiMetadata
.
getMeta
(
FIELD_parent_prod_name
)));
map
.
put
(
FIELD_parent_prod_name
,
StringUtils
.
toString
(
parentProdName
,
eiMetadata
.
getMeta
(
FIELD_parent_prod_name
)));
map
.
put
(
FIELD_leaf
,
StringUtils
.
toString
(
leaf
,
eiMetadata
.
getMeta
(
FIELD_leaf
)));
map
.
put
(
FIELD_sort
,
StringUtils
.
toString
(
sort
,
eiMetadata
.
getMeta
(
FIELD_sort
)));
map
.
put
(
FIELD_lv
,
StringUtils
.
toString
(
lv
,
eiMetadata
.
getMeta
(
FIELD_lv
)));
map
.
put
(
FIELD_material_id
,
StringUtils
.
toString
(
materialId
,
eiMetadata
.
getMeta
(
FIELD_material_id
)));
map
.
put
(
FIELD_material_id
,
StringUtils
.
toString
(
materialId
,
eiMetadata
.
getMeta
(
FIELD_material_id
)));
map
.
put
(
FIELD_product_code
,
StringUtils
.
toString
(
productCode
,
eiMetadata
.
getMeta
(
FIELD_product_code
)));
map
.
put
(
FIELD_product_code
,
StringUtils
.
toString
(
productCode
,
eiMetadata
.
getMeta
(
FIELD_product_code
)));
map
.
put
(
FIELD_product_name
,
StringUtils
.
toString
(
productName
,
eiMetadata
.
getMeta
(
FIELD_product_name
)));
map
.
put
(
FIELD_product_name
,
StringUtils
.
toString
(
productName
,
eiMetadata
.
getMeta
(
FIELD_product_name
)));
map
.
put
(
FIELD_product_id
,
StringUtils
.
toString
(
productId
,
eiMetadata
.
getMeta
(
FIELD_product_id
)));
map
.
put
(
FIELD_product_type
,
StringUtils
.
toString
(
productName
,
eiMetadata
.
getMeta
(
FIELD_product_type
)));
map
.
put
(
FIELD_product_status
,
StringUtils
.
toString
(
productStatus
,
eiMetadata
.
getMeta
(
FIELD_product_status
)));
map
.
put
(
FIELD_product_status
,
StringUtils
.
toString
(
productStatus
,
eiMetadata
.
getMeta
(
FIELD_product_status
)));
map
.
put
(
FIELD_change_type
,
StringUtils
.
toString
(
changeType
,
eiMetadata
.
getMeta
(
FIELD_change_type
)));
map
.
put
(
FIELD_change_type
,
StringUtils
.
toString
(
changeType
,
eiMetadata
.
getMeta
(
FIELD_change_type
)));
map
.
put
(
FIELD_quantity
,
StringUtils
.
toString
(
quantity
,
eiMetadata
.
getMeta
(
FIELD_quantity
)));
map
.
put
(
FIELD_quantity
,
StringUtils
.
toString
(
quantity
,
eiMetadata
.
getMeta
(
FIELD_quantity
)));
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC004.java
View file @
f37e2510
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sc.domain.HGSC003
;
import
com.baosight.hggp.hg.sc.domain.HGSC003
;
import
com.baosight.hggp.hg.sc.domain.HGSC004
;
import
com.baosight.hggp.hg.sc.domain.HGSC004
;
import
com.baosight.hggp.hg.sc.domain.HGSC004A
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.*
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
org.springframework.util.CollectionUtils
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -58,7 +62,26 @@ public class ServiceHGSC004 extends ServiceBase {
...
@@ -58,7 +62,26 @@ public class ServiceHGSC004 extends ServiceBase {
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 蓝图ids
// 蓝图ids
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
HGSC004
.
FIELD_id
);
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
HGSC004
.
FIELD_id
);
DaoUtils
.
update
(
HGSC004
.
BATCH_DELETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
//变更清单里面的公司、项目信息
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"ids"
,
ids
);
List
<
HGSC004
>
hgsc004List
=
this
.
dao
.
query
(
HGSC004
.
QUERY
,
map
,
0
,
-
999999
);
for
(
HGSC004
hgsc004
:
hgsc004List
){
//如果
if
(
hgsc004
.
getMaterialStatus
().
intValue
()
==
HGConstant
.
MaterialStatus
.
WTJ
.
intValue
()){
//变更清单里面的公司、项目信息
Map
<
String
,
Object
>
mapA
=
new
HashMap
<>();
mapA
.
put
(
"materialIds"
,
ids
);
List
<
HGSC004A
>
hgsc004AList
=
dao
.
query
(
HGSC004A
.
QUERY_ALL
,
mapA
,
0
,
-
999999
);
if
(!
CollectionUtils
.
isEmpty
(
hgsc004AList
)){
List
<
Long
>
detailIds
=
hgsc004AList
.
stream
().
map
(
HGSC004A:
:
getId
).
collect
(
Collectors
.
toList
());
DaoUtils
.
update
(
HGSC004A
.
BATCH_DELETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
detailIds
);}});
}
DaoUtils
.
update
(
HGSC004
.
DELETE
,
hgsc004
);
}
else
{
DaoUtils
.
update
(
HGSC004
.
UPDATE_DEL
,
hgsc004
);
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
...
@@ -68,21 +91,6 @@ public class ServiceHGSC004 extends ServiceBase {
...
@@ -68,21 +91,6 @@ public class ServiceHGSC004 extends ServiceBase {
return
inInfo
;
return
inInfo
;
}
}
public
EiInfo
batchSubmit
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 蓝图ids
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
"id"
);
DaoUtils
.
update
(
HGSC004
.
BATCH_SUBMIT
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据停用成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"操作失败"
);
}
return
inInfo
;
}
public
EiInfo
save
(
EiInfo
inInfo
){
public
EiInfo
save
(
EiInfo
inInfo
){
try
{
try
{
Map
resultMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
EiConstant
.
resultBlock
);
Map
resultMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
EiConstant
.
resultBlock
);
...
@@ -93,10 +101,24 @@ public class ServiceHGSC004 extends ServiceBase {
...
@@ -93,10 +101,24 @@ public class ServiceHGSC004 extends ServiceBase {
this
.
checkSaveData
(
hgsc004
,
hgsc003
);
this
.
checkSaveData
(
hgsc004
,
hgsc003
);
if
(
Objects
.
nonNull
(
hgsc004
.
getId
())&&
hgsc004
.
getId
()!=
0
){
if
(
Objects
.
nonNull
(
hgsc004
.
getId
())&&
hgsc004
.
getId
()!=
0
){
DaoUtils
.
update
(
HGSC004
.
UPDATE
,
hgsc004
);
DaoUtils
.
update
(
HGSC004
.
UPDATE
,
hgsc004
);
//变更清单里面的公司、项目信息
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"materialId"
,
hgsc004
.
getId
());
List
<
HGSC004A
>
hgsc004AList
=
dao
.
query
(
HGSC004A
.
QUERY_ALL
,
map
,
0
,
-
999999
);
hgsc004AList
.
forEach
(
o
->{
o
.
setProjCode
(
hgsc004
.
getProjCode
());
o
.
setProjName
(
hgsc004
.
getProjName
());
o
.
setCompanyCode
(
hgsc004
.
getCompanyCode
());
o
.
setCompanyName
(
hgsc004
.
getCompanyName
());
});
DaoUtils
.
updateBatch
(
HGSC004A
.
UPDATE
,
hgsc004AList
);
}
else
{
}
else
{
hgsc004
.
setMaterialStatus
(
HGConstant
.
MaterialStatus
.
WTJ
);
hgsc004
.
setMaterialStatus
(
HGConstant
.
MaterialStatus
.
WTJ
);
DaoUtils
.
insert
(
HGSC004
.
INSERT
,
hgsc004
);
DaoUtils
.
insert
(
HGSC004
.
INSERT
,
hgsc004
);
this
.
insertTree
(
hgsc004
);
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"保存成功!"
);
inInfo
.
setMsg
(
"保存成功!"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -112,6 +134,7 @@ public class ServiceHGSC004 extends ServiceBase {
...
@@ -112,6 +134,7 @@ public class ServiceHGSC004 extends ServiceBase {
*/
*/
private
void
checkSaveData
(
HGSC004
hgsc004
,
HGSC003
hgsc003
)
{
private
void
checkSaveData
(
HGSC004
hgsc004
,
HGSC003
hgsc003
)
{
if
(
Objects
.
nonNull
(
hgsc004
.
getId
())&&
hgsc004
.
getId
()>
0
){
if
(
Objects
.
nonNull
(
hgsc004
.
getId
())&&
hgsc004
.
getId
()>
0
){
AssertUtils
.
isTrue
(
hgsc004
.
getMaterialStatus
().
compareTo
(
HGConstant
.
MaterialStatus
.
WTJ
)
>
0
,
"非未提交不可修改!"
);
AssertUtils
.
isTrue
(
hgsc003
.
getBlueprintStatus
().
compareTo
(
HGConstant
.
EnablingStatus
.
TY
)
==
0
,
"蓝图已停用不可修改!"
);
AssertUtils
.
isTrue
(
hgsc003
.
getBlueprintStatus
().
compareTo
(
HGConstant
.
EnablingStatus
.
TY
)
==
0
,
"蓝图已停用不可修改!"
);
}
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
@@ -134,6 +157,46 @@ public class ServiceHGSC004 extends ServiceBase {
...
@@ -134,6 +157,46 @@ public class ServiceHGSC004 extends ServiceBase {
}
}
/**
* 录入树结构
*
* @param hgsc004
*/
private
void
insertTree
(
HGSC004
hgsc004
)
{
//变更清单里面的公司、项目信息
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"companyCode"
,
hgsc004
.
getCompanyCode
());
map
.
put
(
"projCode"
,
hgsc004
.
getProjCode
());
List
<
HGSC004A
>
hgsc004AList
=
dao
.
query
(
HGSC004A
.
QUERY_ALL
,
map
,
0
,
-
999999
);
if
(
CollectionUtils
.
isEmpty
(
hgsc004AList
)){
//录入树结构,公司
HGSC004A
rootHgsc004A
=
new
HGSC004A
();
BeanUtil
.
copyProperties
(
hgsc004
,
rootHgsc004A
,
"id"
);
//因为获取不到id,所以根据公司编号+项目编号得到树结构
rootHgsc004A
.
setMaterialId
(
hgsc004
.
getId
());
rootHgsc004A
.
setParentProdCode
(
"root"
);
rootHgsc004A
.
setParentProdName
(
hgsc004
.
getCompanyName
());
rootHgsc004A
.
setLeaf
(
2
);
//有叶子节点
rootHgsc004A
.
setLv
(
1
);
rootHgsc004A
.
setSort
(
1
);
rootHgsc004A
.
setProductCode
(
hgsc004
.
getCompanyCode
());
rootHgsc004A
.
setProductName
(
hgsc004
.
getCompanyName
());
DaoUtils
.
insert
(
HGSC004A
.
INSERT
,
rootHgsc004A
);
//录入2级目录,项目
HGSC004A
projectHgsc004A
=
new
HGSC004A
();
BeanUtil
.
copyProperties
(
hgsc004
,
projectHgsc004A
,
"id"
);
projectHgsc004A
.
setMaterialId
(
hgsc004
.
getId
());
projectHgsc004A
.
setParentProdCode
(
rootHgsc004A
.
getProductCode
());
projectHgsc004A
.
setParentProdName
(
rootHgsc004A
.
getProductName
());
projectHgsc004A
.
setLeaf
(
2
);
//有叶子节点
projectHgsc004A
.
setLv
(
2
);
projectHgsc004A
.
setSort
(
1
);
projectHgsc004A
.
setProductCode
(
hgsc004
.
getProjCode
());
projectHgsc004A
.
setProductName
(
hgsc004
.
getProjName
());
DaoUtils
.
insert
(
HGSC004A
.
INSERT
,
projectHgsc004A
);
}
}
}
}
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
View file @
f37e2510
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
import
c
n.hutool.core.bean.BeanUtil
;
import
c
om.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005A
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.sc.domain.HGSC003
;
import
com.baosight.hggp.hg.sc.domain.HGSC003
;
import
com.baosight.hggp.hg.sc.domain.HGSC004
;
import
com.baosight.hggp.hg.sc.domain.HGSC004A
;
import
com.baosight.hggp.hg.sc.domain.HGSC004A
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.resource.I18nMessages
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.util.*
;
import
java.util.*
;
...
@@ -33,7 +36,7 @@ public class ServiceHGSC004A extends ServiceBase {
...
@@ -33,7 +36,7 @@ public class ServiceHGSC004A extends ServiceBase {
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
HGSC004A
.
FIELD_account_code
,
UserSessionUtils
.
getAccountCode
());
map
.
put
(
HGSC004A
.
FIELD_account_code
,
UserSessionUtils
.
getAccountCode
());
CommonMethod
.
initBlock
(
inInfo
,
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_RECORD
_BLOCK_ID
),
map
,
false
Arrays
.
asList
(
DdynamicEnum
.
PRODUCT
_BLOCK_ID
),
map
,
false
);
);
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
...
@@ -47,7 +50,7 @@ public class ServiceHGSC004A extends ServiceBase {
...
@@ -47,7 +50,7 @@ public class ServiceHGSC004A extends ServiceBase {
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
HGSC004A
.
FIELD_account_code
,
UserSessionUtils
.
getAccountCode
());
map
.
put
(
HGSC004A
.
FIELD_account_code
,
UserSessionUtils
.
getAccountCode
());
CommonMethod
.
initBlock
(
inInfo
,
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_RECORD
_BLOCK_ID
),
map
,
false
Arrays
.
asList
(
DdynamicEnum
.
PRODUCT
_BLOCK_ID
),
map
,
false
);
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
...
@@ -62,7 +65,7 @@ public class ServiceHGSC004A extends ServiceBase {
...
@@ -62,7 +65,7 @@ public class ServiceHGSC004A extends ServiceBase {
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 蓝图ids
// 蓝图ids
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
HGSC004A
.
FIELD_id
);
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
HGSC004A
.
FIELD_id
);
//
DaoUtils.update(HGSC004A.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
DaoUtils
.
update
(
HGSC004A
.
BATCH_DELETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
...
@@ -72,28 +75,36 @@ public class ServiceHGSC004A extends ServiceBase {
...
@@ -72,28 +75,36 @@ public class ServiceHGSC004A extends ServiceBase {
return
inInfo
;
return
inInfo
;
}
}
public
EiInfo
batchSubmit
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 蓝图ids
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
"id"
);
// DaoUtils.update(HGSC004A.BATCH_SUBMIT, new HashMap<String,Object>(){{put("ids",ids);}});
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据停用成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"操作失败"
);
}
return
inInfo
;
}
public
EiInfo
save
(
EiInfo
inInfo
){
public
EiInfo
save
(
EiInfo
inInfo
){
try
{
try
{
Map
resultMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
EiConstant
.
resultBlock
);
Map
resultMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
EiConstant
.
resultBlock
);
HGSC004A
hgsc004a
=
new
HGSC004A
();
HGSC004A
hgsc004a
=
new
HGSC004A
();
hgsc004a
.
fromMap
(
resultMap
);
hgsc004a
.
fromMap
(
resultMap
);
//蓝图信息,用于蓝图状态校验
HGSC003
hgsc003
=
(
HGSC003
)
super
.
dao
.
get
(
HGSC003
.
QUERY
,
HGSC004A
.
FIELD_id
,
hgsc004a
.
getId
());
HGSC003
hgsc003
=
(
HGSC003
)
super
.
dao
.
get
(
HGSC003
.
QUERY
,
HGSC004A
.
FIELD_id
,
hgsc004a
.
getId
());
//主表信息,用于取值
Long
materialId
=
Long
.
valueOf
(
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSC004A
.
FIELD_material_id
));
HGSC004
hgsc004
=
(
HGSC004
)
super
.
dao
.
get
(
HGSC004
.
QUERY
,
HGSC004A
.
FIELD_id
,
materialId
);
if
(
Objects
.
nonNull
(
hgsc004
)){
hgsc004a
.
setCompanyCode
(
hgsc004
.
getCompanyCode
());
hgsc004a
.
setCompanyName
(
hgsc004
.
getCompanyName
());
hgsc004a
.
setProjCode
(
hgsc004
.
getProjCode
());
hgsc004a
.
setProjName
(
hgsc004
.
getProjName
());
hgsc004a
.
setDepCode
(
hgsc004
.
getDepCode
());
hgsc004a
.
setDepName
(
hgsc004
.
getDepName
());
hgsc004a
.
setMaterialId
(
hgsc004
.
getId
());
hgsc004a
.
setLv
(
hgsc004a
.
getLv
()
+
1
);
//不为4级都有叶子节点
if
(
hgsc004a
.
getLv
().
intValue
()
<=
4
){
hgsc004a
.
setLeaf
(
2
);
}
else
{
hgsc004a
.
setLeaf
(
1
);
}
}
this
.
checkSaveData
(
hgsc004a
,
hgsc003
);
this
.
checkSaveData
(
hgsc004a
,
hgsc003
);
if
(
Objects
.
nonNull
(
hgsc004a
.
getId
())&&
hgsc004a
.
getId
()!=
0
){
if
(
Objects
.
nonNull
(
hgsc004a
.
getId
())&&
hgsc004a
.
getId
()!=
0
){
DaoUtils
.
update
(
HGSC004A
.
UPDATE
,
hgsc004a
);
DaoUtils
.
update
(
HGSC004A
.
UPDATE
,
hgsc004a
);
...
@@ -126,72 +137,92 @@ public class ServiceHGSC004A extends ServiceBase {
...
@@ -126,72 +137,92 @@ public class ServiceHGSC004A extends ServiceBase {
}
}
/**
* 指定树节点
* @param inInfo
* @return
*/
public
EiInfo
queryTreeRoot
(
EiInfo
inInfo
)
{
String
orgEname
=
StringUtils
.
toString
(
inInfo
.
get
(
"orgEname"
));
Map
queryMap
=
new
HashMap
();
String
root
=
""
;
if
(
orgEname
!=
null
)
{
Map
map
=
new
HashMap
();
map
.
put
(
"orgEname"
,
orgEname
);
map
.
put
(
"orgType"
,
OrgTypeEnum
.
COMPANY
.
getCode
());
Org
org
=
(
Org
)
dao
.
get
(
"HGSC004A.queryCompany"
,
"id"
,
orgEname
);
root
=
org
.
getOrgEname
()
+
":"
+
org
.
getOrgCname
();
}
inInfo
.
set
(
"root"
,
root
);
return
inInfo
;
}
//树查询服务
//树查询服务
public
EiInfo
queryTreeNode
(
EiInfo
inInfo
)
{
public
EiInfo
queryTreeNode
(
EiInfo
inInfo
)
{
//1 获取参数
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
pEname
=
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
0
,
"node"
);
String
node
=
MapUtils
.
getString
(
queryRow
,
"node"
);
if
(
org
.
apache
.
commons
.
lang
.
StringUtils
.
equals
(
"$"
,
pEname
)){
//获取物料详情数据
pEname
=
"root"
;
String
projCode
=
StringUtils
.
toString
(
inInfo
.
get
(
"projCode"
));
}
String
companyCode
=
StringUtils
.
toString
(
inInfo
.
get
(
"companyCode"
));
Long
projId
=
NumberUtils
.
toLong
(
inInfo
.
get
(
"projId"
));
String
orgEname
=
StringUtils
.
toString
(
inInfo
.
get
(
"orgEname"
));
Map
queryMap
=
new
HashMap
();
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"companyCode"
,
pEname
);
queryMap
.
put
(
"companyCode"
,
com
.
baosight
.
hggp
.
util
.
StringUtils
.
isNotBlank
(
companyCode
)
?
companyCode
:
"null"
);
if
(
orgEname
!=
null
)
{
queryMap
.
put
(
"projCode"
,
com
.
baosight
.
hggp
.
util
.
StringUtils
.
isNotBlank
(
projCode
)
?
projCode
:
"null"
);
Map
map
=
new
HashMap
();
map
.
put
(
"orgEname"
,
orgEname
);
queryMap
.
put
(
"pEname"
,
"$"
.
equals
(
node
)
?
"root"
:
node
);
List
list
=
dao
.
query
(
"HGSC004A.queryCompany"
,
map
);
if
(
list
.
size
()
>
0
)
{
queryMap
.
put
(
"orgEname"
,
orgEname
);
}
}
//2 查询节点
//2 查询节点
List
rows
=
dao
.
query
(
"HGSC004A.query"
,
queryMap
);
List
rows
=
dao
.
query
(
"HGSC004A.query
Tree
"
,
queryMap
);
//3 增加节点block块
//3 增加节点block块
EiInfo
outInfo
=
new
EiInfo
();
EiInfo
outInfo
=
new
EiInfo
();
EiBlock
outBlock
=
outInfo
.
addBlock
(
BeanUtil
.
isEmpty
(
pEname
)
?
""
:
pEnam
e
);
EiBlock
outBlock
=
outInfo
.
addBlock
(
nod
e
);
outBlock
.
addRows
(
rows
);
outBlock
.
addRows
(
rows
);
return
outInfo
;
return
outInfo
;
}
}
/**
/**
*
修改父级节点的LEAF状态为1
*
下拉框
*
*
* @param id
* @param inInfo
* @return
*/
*/
@OperationLogAnnotation
(
operModul
=
"存货档案"
,
operType
=
"查询"
,
operDesc
=
"下拉框"
)
public
EiInfo
queryProductComboBox
(
EiInfo
inInfo
)
{
try
{
List
<
DdynamicEnum
>
list
=
new
ArrayList
<>();
list
.
add
(
DdynamicEnum
.
PRODUCT_BLOCK_ID
);
CommonMethod
.
initBlock
(
inInfo
,
list
,
EiInfoUtils
.
getFirstRow
(
inInfo
),
false
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询存货档案失败"
);
}
return
inInfo
;
}
public
void
checkTreeNodeLeaf
(
Long
id
)
{
EiInfo
eiInfo
=
new
EiInfo
();
/**
//1 获取参数
* 修改提交状态
Map
queryMap
=
new
HashMap
();
* @param inInfo
queryMap
.
put
(
"id"
,
id
);
* @return
// List rows = this.dao.query("HPSC002.queryTreeNodeByParentPrtdCode", queryMap);
*/
// if(rows.size() > 0){
public
EiInfo
updateProductStatus
(
EiInfo
inInfo
){
// queryMap.put("leaf", "0");
int
i
=
0
;
// }else{
try
{
// queryMap.put("leaf", "1");
HGSC004A
hgsc004a
=
new
HGSC004A
();
// }
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
// DaoUtils.update("HPSC002.updateTreeNodeLeaf", queryMap);
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hgsc004a
.
fromMap
(
map
);
DaoUtils
.
update
(
HGSC004A
.
UPDATE_PRODUCT_STATUS
,
hgsc004a
);
}
HGSC004
hgsc004
=
(
HGSC004
)
super
.
dao
.
get
(
HGSC004
.
QUERY
,
HGSC001
.
FIELD_id
,
hgsc004a
.
getMaterialId
());
if
(
Objects
.
nonNull
(
hgsc004
)){
if
(
hgsc004
.
getMaterialStatus
().
intValue
()
==
HGConstant
.
MaterialStatus
.
WTJ
.
intValue
()){
//如果是未提交则修改为部分提交
hgsc004
.
setMaterialStatus
(
HGConstant
.
MaterialStatus
.
BFTJ
);
DaoUtils
.
update
(
HGSC004
.
UPDATE_MATERIAL_STATUS
,
hgsc004
);
}
else
if
(
hgsc004
.
getMaterialStatus
().
intValue
()
==
HGConstant
.
MaterialStatus
.
BFTJ
.
intValue
()){
//如果不存在未提交的,就标记主表为全部提交
Map
<
String
,
Object
>
mapA
=
new
HashMap
<>();
mapA
.
put
(
"materialId"
,
hgsc004a
.
getMaterialId
());
mapA
.
put
(
"productStatus"
,
HGConstant
.
ProductStatus
.
WTJ
);
mapA
.
put
(
"notId"
,
hgsc004a
.
getId
());
List
<
HGSC004A
>
hgsc004AList
=
dao
.
query
(
HGSC004A
.
QUERY_ALL
,
mapA
,
0
,
-
999999
);
if
(!
CollectionUtils
.
isEmpty
(
hgsc004AList
)){
hgsc004
.
setMaterialStatus
(
HGConstant
.
MaterialStatus
.
QBTJ
);
DaoUtils
.
update
(
HGSC004
.
UPDATE_MATERIAL_STATUS
,
hgsc004
);
}
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleUpdateException
(
inInfo
,
i
,
e
);
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
}
return
inInfo
;
}
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC004.xml
View file @
f37e2510
...
@@ -60,6 +60,12 @@
...
@@ -60,6 +60,12 @@
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
updated_time = #updatedTime#
updated_time = #updatedTime#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"delStatus"
>
del_status = #delStatus#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"ids"
>
ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
@@ -77,6 +83,7 @@
...
@@ -77,6 +83,7 @@
proj_name as "projName",
<!-- 项目名称 -->
proj_name as "projName",
<!-- 项目名称 -->
material_status as "materialStatus",
<!-- 物料状态 0:未提交,1:部分提交,2:全部提交 -->
material_status as "materialStatus",
<!-- 物料状态 0:未提交,1:部分提交,2:全部提交 -->
approval_status as "approvalStatus",
<!-- 审批状态 0:待审;1:审核中;2:已审 -->
approval_status as "approvalStatus",
<!-- 审批状态 0:待审;1:审核中;2:已审 -->
del_status as "delStatus",
<!-- 数据状态 0:保存,1:删除 -->
account_code as "accountCode",
<!-- 帐套 -->
account_code as "accountCode",
<!-- 帐套 -->
created_by as "createdBy",
<!-- 创建人 -->
created_by as "createdBy",
<!-- 创建人 -->
created_name as "createdName",
<!-- 创建人名称 -->
created_name as "createdName",
<!-- 创建人名称 -->
...
@@ -99,65 +106,6 @@
...
@@ -99,65 +106,6 @@
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
</select>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintId">
blueprint_id = #blueprintId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintCode">
blueprint_code = #blueprintCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintName">
blueprint_name = #blueprintName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialStatus">
material_status = #materialStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
created_time = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
updated_time = #updatedTime#
</isNotEmpty>
-->
<insert
id=
"insert"
>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGSC004 (id,
<!-- 主键 -->
INSERT INTO ${hggpSchema}.HGSC004 (id,
<!-- 主键 -->
...
@@ -171,6 +119,7 @@
...
@@ -171,6 +119,7 @@
proj_code,
<!-- 项目编码 -->
proj_code,
<!-- 项目编码 -->
proj_name,
<!-- 项目名称 -->
proj_name,
<!-- 项目名称 -->
material_status,
<!-- 物料状态 0:未提交,1:部分提交,2:全部提交 -->
material_status,
<!-- 物料状态 0:未提交,1:部分提交,2:全部提交 -->
del_status,
<!-- 数据状态 0:保存,1:删除 -->
approval_status,
<!-- 审批状态 0:待审;1:审核中;2:已审 -->
approval_status,
<!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code,
<!-- 帐套 -->
account_code,
<!-- 帐套 -->
created_by,
<!-- 创建人 -->
created_by,
<!-- 创建人 -->
...
@@ -180,7 +129,7 @@
...
@@ -180,7 +129,7 @@
updated_name,
<!-- 修改人名称 -->
updated_name,
<!-- 修改人名称 -->
updated_time
<!-- 更新时间 -->
updated_time
<!-- 更新时间 -->
)
)
VALUES (#id#, #blueprintId#, #companyCode#, #companyName#, #depCode#, #depName#, #blueprintCode#, #blueprintName#, #projCode#, #projName#, #materialStatus#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
VALUES (#id#, #blueprintId#, #companyCode#, #companyName#, #depCode#, #depName#, #blueprintCode#, #blueprintName#, #projCode#, #projName#, #materialStatus#, #
delStatus#, #
approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
...
@@ -200,6 +149,7 @@
...
@@ -200,6 +149,7 @@
proj_code = #projCode#,
<!-- 项目编码 -->
proj_code = #projCode#,
<!-- 项目编码 -->
proj_name = #projName#,
<!-- 项目名称 -->
proj_name = #projName#,
<!-- 项目名称 -->
material_status = #materialStatus#,
<!-- 物料状态 0:未提交,1:部分提交,2:全部提交 -->
material_status = #materialStatus#,
<!-- 物料状态 0:未提交,1:部分提交,2:全部提交 -->
del_status = #delStatus#,
<!-- 数据状态 0:保存,1:删除 -->
approval_status = #approvalStatus#,
<!-- 审批状态 0:待审;1:审核中;2:已审 -->
approval_status = #approvalStatus#,
<!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code = #accountCode#,
<!-- 帐套 -->
account_code = #accountCode#,
<!-- 帐套 -->
created_by = #createdBy#,
<!-- 创建人 -->
created_by = #createdBy#,
<!-- 创建人 -->
...
@@ -215,4 +165,26 @@
...
@@ -215,4 +165,26 @@
DELETE FROM ${hggpSchema}.HGSC004 WHERE
DELETE FROM ${hggpSchema}.HGSC004 WHERE
id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</delete>
</delete>
<update
id=
"updateDel"
>
UPDATE ${hggpSchema}.HGSC004
SET
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
DEL_STATUS = 1
<!-- 数据状态 0:保存,1:删除 -->
WHERE
ID = #id#
</update>
<update
id=
"updateMaterialStatus"
>
UPDATE ${hggpSchema}.HGSC004
SET
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
MATERIAL_STATUS = #materialStatus#
WHERE
ID = #id#
</update>
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC004A.xml
View file @
f37e2510
...
@@ -2,6 +2,38 @@
...
@@ -2,6 +2,38 @@
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGSC004A"
>
<sqlMap
namespace=
"HGSC004A"
>
<sql
id=
"column"
>
id as "id",
<!-- 主键 -->
company_code as "companyCode",
<!-- 公司编码(预留) -->
company_name as "companyName",
<!-- 公司名称(预留) -->
dep_code as "depCode",
<!-- 部门编号(预留) -->
dep_name as "depName",
<!-- 部门名称(预留) -->
proj_code as "projCode",
<!-- 项目编码(预留) -->
proj_name as "projName",
<!-- 项目名称(预留) -->
parent_prod_code as "parentProdCode",
<!-- 父节点-产品编码 -->
parent_prod_name as "parentProdName",
<!-- 父节点-产品名称 -->
material_id as "materialId",
<!-- 物料清单id -->
product_id as "productId",
<!-- 产品id -->
product_type as "productType",
<!-- 产品类别 -->
product_code as "productCode",
<!-- 产品编号 -->
product_name as "productName",
<!-- 产品名称 -->
product_status as "productStatus",
<!-- 产品状态 0:未提交,1:已提交 -->
change_type as "changeType",
<!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity as "quantity",
<!-- 数量 -->
single_weight as "singleWeight",
<!-- 单重 -->
total_weight as "totalWeight",
<!-- 总重 -->
approval_status as "approvalStatus",
<!-- 审批状态 0:待审;1:审核中;2:已审 -->
leaf as "leaf",
<!-- 是否有叶子节点 -->
sort as "sort",
<!-- 排序字段 -->
lv as "lv",
<!-- 层级 -->
account_code as "accountCode",
<!-- 帐套 -->
created_by as "createdBy",
<!-- 创建人 -->
created_name as "createdName",
<!-- 创建人名称 -->
created_time as "createdTime",
<!-- 创建时间 -->
updated_by as "updatedBy",
<!-- 更新人 -->
updated_name as "updatedName",
<!-- 修改人名称 -->
updated_time as "updatedTime"
<!-- 更新时间 -->
</sql>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
id = #id#
id = #id#
...
@@ -78,37 +110,26 @@
...
@@ -78,37 +110,26 @@
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
updated_time = #updatedTime#
updated_time = #updatedTime#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"materialIds"
>
material_Id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"materialIds"
>
#materialIds[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"productId"
>
product_id = #productId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"productType"
>
product_type = #productType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"notId"
>
id != #notId#
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC004A"
>
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC004A"
>
SELECT
SELECT
id as "id",
<!-- 主键 -->
<include
refid=
"column"
/>
company_code as "companyCode",
<!-- 公司编码(预留) -->
company_name as "companyName",
<!-- 公司名称(预留) -->
dep_code as "depCode",
<!-- 部门编号(预留) -->
dep_name as "depName",
<!-- 部门名称(预留) -->
proj_code as "projCode",
<!-- 项目编码(预留) -->
proj_name as "projName",
<!-- 项目名称(预留) -->
parent_prod_code as "parentProdCode",
<!-- 父节点-产品编码 -->
parent_prod_name as "parentProdName",
<!-- 父节点-产品名称 -->
material_id as "materialId",
<!-- 物料清单id -->
product_code as "productCode",
<!-- 产品编号 -->
product_name as "productName",
<!-- 产品名称 -->
product_status as "productStatus",
<!-- 产品状态 0:未提交,1:已提交 -->
change_type as "changeType",
<!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity as "quantity",
<!-- 数量 -->
single_weight as "singleWeight",
<!-- 单重 -->
total_weight as "totalWeight",
<!-- 总重 -->
approval_status as "approvalStatus",
<!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code as "accountCode",
<!-- 帐套 -->
created_by as "createdBy",
<!-- 创建人 -->
created_name as "createdName",
<!-- 创建人名称 -->
created_time as "createdTime",
<!-- 创建时间 -->
updated_by as "updatedBy",
<!-- 更新人 -->
updated_name as "updatedName",
<!-- 修改人名称 -->
updated_time as "updatedTime"
<!-- 更新时间 -->
FROM ${hggpSchema}.HGSC004A WHERE 1=1
FROM ${hggpSchema}.HGSC004A WHERE 1=1
AND lv NOT IN (1,2)
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
<isNotEmpty
property=
"orderBy"
>
...
@@ -118,88 +139,25 @@
...
@@ -118,88 +139,25 @@
</select>
</select>
<select
id=
"queryAll"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC004A"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGSC004A WHERE 1=1
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
</dynamic>
</select>
<select
id=
"count"
resultClass=
"int"
>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGSC004A WHERE 1=1
SELECT COUNT(*) FROM ${hggpSchema}.HGSC004A WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
</select>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentProdCode">
parent_prod_code = #parentProdCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentProdName">
parent_prod_name = #parentProdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialId">
material_id = #materialId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
product_code = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
product_name = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productStatus">
product_status = #productStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="changeType">
change_type = #changeType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
single_weight = #singleWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWeight">
total_weight = #totalWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
created_time = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
updated_time = #updatedTime#
</isNotEmpty>
-->
<insert
id=
"insert"
>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGSC004A (id,
<!-- 主键 -->
INSERT INTO ${hggpSchema}.HGSC004A (id,
<!-- 主键 -->
...
@@ -211,7 +169,12 @@
...
@@ -211,7 +169,12 @@
proj_name,
<!-- 项目名称(预留) -->
proj_name,
<!-- 项目名称(预留) -->
parent_prod_code,
<!-- 父节点-产品编码 -->
parent_prod_code,
<!-- 父节点-产品编码 -->
parent_prod_name,
<!-- 父节点-产品名称 -->
parent_prod_name,
<!-- 父节点-产品名称 -->
leaf,
<!-- 是否有叶子节点 -->
sort,
<!-- 排序字段 -->
lv,
<!-- 层级 -->
material_id,
<!-- 物料清单id -->
material_id,
<!-- 物料清单id -->
product_id,
<!-- 产品id -->
product_type,
<!-- 产品类别 -->
product_code,
<!-- 产品编号 -->
product_code,
<!-- 产品编号 -->
product_name,
<!-- 产品名称 -->
product_name,
<!-- 产品名称 -->
product_status,
<!-- 产品状态 0:未提交,1:已提交 -->
product_status,
<!-- 产品状态 0:未提交,1:已提交 -->
...
@@ -228,7 +191,11 @@
...
@@ -228,7 +191,11 @@
updated_name,
<!-- 修改人名称 -->
updated_name,
<!-- 修改人名称 -->
updated_time
<!-- 更新时间 -->
updated_time
<!-- 更新时间 -->
)
)
VALUES (#id#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #parentProdCode#, #parentProdName#, #materialId#, #productCode#, #productName#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #totalWeight#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
VALUES (#id#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#,
#parentProdCode#, #parentProdName#,#leaf#,#sort#,#lv#, #materialId#, #productId#,#productType#,
#productCode#, #productName#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #totalWeight#,
#approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#)
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
...
@@ -246,7 +213,12 @@
...
@@ -246,7 +213,12 @@
proj_name = #projName#,
<!-- 项目名称(预留) -->
proj_name = #projName#,
<!-- 项目名称(预留) -->
parent_prod_code = #parentProdCode#,
<!-- 父节点-产品编码 -->
parent_prod_code = #parentProdCode#,
<!-- 父节点-产品编码 -->
parent_prod_name = #parentProdName#,
<!-- 父节点-产品名称 -->
parent_prod_name = #parentProdName#,
<!-- 父节点-产品名称 -->
leaf = #leaf#,
<!-- 是否有叶子节点 -->
sort = #sort#,
<!-- 排序字段 -->
lv = #lv#,
<!-- 层级 -->
material_id = #materialId#,
<!-- 物料清单id -->
material_id = #materialId#,
<!-- 物料清单id -->
product_id = #productId#,
<!-- 产品id -->
product_type = #productType#,
<!-- 产品类别 -->
product_code = #productCode#,
<!-- 产品编号 -->
product_code = #productCode#,
<!-- 产品编号 -->
product_name = #productName#,
<!-- 产品名称 -->
product_name = #productName#,
<!-- 产品名称 -->
product_status = #productStatus#,
<!-- 产品状态 0:未提交,1:已提交 -->
product_status = #productStatus#,
<!-- 产品状态 0:未提交,1:已提交 -->
...
@@ -271,8 +243,8 @@
...
@@ -271,8 +243,8 @@
select
select
a.ORG_ENAME as "orgEname",
a.ORG_ENAME as "orgEname",
a.ORG_CNAME as "orgCname"
a.ORG_CNAME as "orgCname"
from
iplat_hggp
.txsog01 a
from
${platSchema}
.txsog01 a
left join
iplat_hggp
.txsog02 b on a.ORG_ID = b.ORG_ID
left join
${platSchema}
.txsog02 b on a.ORG_ID = b.ORG_ID
where
where
a.ACCOUNT_CODE = #accountCode#
a.ACCOUNT_CODE = #accountCode#
and a.ORG_TYPE = #orgType#
and a.ORG_TYPE = #orgType#
...
@@ -280,4 +252,60 @@
...
@@ -280,4 +252,60 @@
a.ORG_ENAME = #orgEname#
a.ORG_ENAME = #orgEname#
</isNotEmpty>
</isNotEmpty>
</select>
</select>
<select
id=
"queryTree"
resultClass=
"java.util.HashMap"
>
SELECT
PRODUCT_CODE as "nodeId",
product_id as "productId",
<!-- 产品id -->
product_type as "productType",
<!-- 产品类别 -->
PRODUCT_CODE as "productCode",
<!-- 产品编码 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PRODUCT_NAME as "productName",
<!-- 产品名称 -->
PRODUCT_CODE as "label",
<!-- 名部件编码-->
case when lv = 3 then concat(PRODUCT_CODE,' ',PRODUCT_NAME) else PRODUCT_NAME end as "text",
<!-- 部件名称 -->
PARENT_PROD_CODE as "pId",
<!-- 父节点编码 -->
PARENT_PROD_NAME as "pName",
<!-- 父节点名称 -->
LEAF as "leaf",
<!-- 是否有叶子节点 -->
SORT as "sort",
<!-- 排序字段 -->
lv as "lv"
FROM
${hggpSchema}.HGSC004A
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"pEname"
>
PARENT_PROD_CODE = #pEname#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"materialId"
>
MATERIAL_ID = #materialId#
</isNotEmpty>
ORDER BY CREATED_TIME DESC
</select>
<delete
id=
"batchDelete"
>
DELETE FROM ${hggpSchema}.HGSC004A WHERE
id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</delete>
<update
id=
"updateProductStatus"
>
UPDATE ${hggpSchema}.HGSC004A
SET
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
PRODUCT_STATUS = #productStatus#
<!-- 产品状态 0:未提交,1:已提交 -->
WHERE
ID = #id#
</update>
</sqlMap>
</sqlMap>
src/main/webapp/HG/SC/HGSC004.js
View file @
f37e2510
...
@@ -33,7 +33,7 @@ $(function (){
...
@@ -33,7 +33,7 @@ $(function (){
let
template
=
''
;
let
template
=
''
;
if
(
item
.
id
){
if
(
item
.
id
){
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showDetail('
+
item
.
id
+
',
\'
'
+
item
.
blueprintCode
+
'
\'
,
\'
'
+
item
.
blueprintName
+
'
\'
,
\'
'
+
item
.
companyNam
e
+
'
\'
)" >物料清单</a>'
;
+
'onclick="showDetail('
+
item
.
id
+
',
\'
'
+
item
.
companyCode
+
'
\'
,
\'
'
+
item
.
projCod
e
+
'
\'
)" >物料清单</a>'
;
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
id
+
')" >附件</a>'
;
'onclick="showUploadFile('
+
item
.
id
+
')" >附件</a>'
;
}
}
...
@@ -218,9 +218,9 @@ let save = function (btnNode) {
...
@@ -218,9 +218,9 @@ let save = function (btnNode) {
/**
/**
* 显示详情
* 显示详情
*/
*/
function
showDetail
(
id
)
{
function
showDetail
(
id
,
companyCode
,
projCode
)
{
JSColorbox
.
open
({
JSColorbox
.
open
({
href
:
"HGSC004A?methodName=initLoad&inqu_status-0-materialId="
+
id
,
href
:
"HGSC004A?
companyCode="
+
companyCode
+
"&projCode="
+
projCode
+
"&
methodName=initLoad&inqu_status-0-materialId="
+
id
,
title
:
"<div style='text-align: center;'>蓝图清单详情</div>"
,
title
:
"<div style='text-align: center;'>蓝图清单详情</div>"
,
width
:
"80%"
,
width
:
"80%"
,
height
:
"80%"
,
height
:
"80%"
,
...
...
src/main/webapp/HG/SC/HGSC004A.js
View file @
f37e2510
var
inventNameGlobalData
=
[];
// 传递参数 将附件ID与当前记录ID进行绑定
// let rowId = '';
let
parentId
=
''
;
let
projCode
=
''
;
let
projCode
=
''
;
var
strs
;
var
companyCode
=
''
;
var
url
=
location
.
search
;
//获取url中"?"符后的字串
if
(
url
.
indexOf
(
"?"
)
!=
-
1
)
{
//判断是否有参数
var
str
=
url
.
substr
(
1
);
//从第一个字符开始 因为第0个是?号 获取所有除问号的所有符串
strs
=
str
.
split
(
"="
);
//用等号进行分隔 (因为知道只有一个参数 所以直接用等号进分隔 如果有多个参数 要用&号分隔 再用等号进行分隔)
// console.log('strs=' + strs) //直接弹出第一个参数 (如果有多个参数 还要进行循环的)
}
$
(
function
()
{
$
(
function
()
{
var
productCodeBox
=
__eiInfo
.
getBlock
(
"product_block_id"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
query
();
});
let
inventNameGlobalData
=
[];
let
parentId
=
''
;
var
strs
;
var
url
=
location
.
search
;
//获取url中"?"符后的字串
if
(
url
.
indexOf
(
"?"
)
!=
-
1
)
{
//判断是否有参数
var
str
=
url
.
substr
(
1
);
//从第一个字符开始 因为第0个是?号 获取所有除问号的所有符串
strs
=
str
.
split
(
"&"
);
//用等号进行分隔 (因为知道只有一个参数 所以直接用等号进分隔 如果有多个参数 要用&号分隔 再用等号进行分隔)
//完全确定的数据,不能复用,获取公司编码
companyCode
=
strs
[
0
].
split
(
"="
)[
1
];
projCode
=
strs
[
1
].
split
(
"="
)[
1
];
}
IPLATUI
.
EFTree
=
{
IPLATUI
.
EFTree
=
{
"materialTree"
:
{
"materialTree"
:
{
ROOT
:
"root:公司列表"
,
//
ROOT: "root:公司列表",
/**
/**
* 树加载完成后的回调函数
* 树加载完成后的回调函数
* @param options: 树的配置项
* @param options: 树的配置项
*/
*/
query
:
function
(
postEiInfo
,
model
)
{
query
:
function
(
postEiInfo
,
model
)
{
postEiInfo
.
set
(
"companyCode"
,
strs
?
strs
[
1
]
:
null
);
postEiInfo
.
set
(
"companyCode"
,
companyCode
?
companyCode
:
null
);
postEiInfo
.
set
(
"projCode"
,
projCode
?
projCode
:
null
);
return
postEiInfo
;
return
postEiInfo
;
},
},
loadComplete
:
function
(
options
)
{
loadComplete
:
function
(
options
)
{
...
@@ -40,30 +52,122 @@ $(function () {
...
@@ -40,30 +52,122 @@ $(function () {
*/
*/
select
:
function
(
e
)
{
select
:
function
(
e
)
{
var
nodeData
=
this
.
dataItem
(
e
.
node
);
var
nodeData
=
this
.
dataItem
(
e
.
node
);
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
nodeId
=
nodeData
.
nodeId
;
// 选择最后一级时,自动点击上一级
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
prdtCode
=
nodeData
.
prdtCode
;
if
(
nodeData
.
lv
==
4
)
{
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
projCode
=
nodeData
.
projCode
;
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
nodeId
=
nodeData
.
pId
;
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
prdtName
=
nodeData
.
prdtName
;
// 刷新树
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
projName
=
nodeData
.
projName
;
refreshTree
();
// 重新查询EFGrid
}
else
{
parentId
=
nodeData
.
nodeId
;
let
eiInfo
=
new
EiInfo
();
if
(
nodeData
.
lv
==
2
)
{
eiInfo
.
set
(
"inqu_status-0-parInventType"
,
"root"
);
}
else
if
(
nodeData
.
lv
==
3
)
{
eiInfo
.
set
(
"inqu_status-0-parInventType"
,
nodeData
.
productType
);
}
var
dataSource
;
EiCommunicator
.
send
(
"HGSC004A"
,
"queryProductComboBox"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"product_block_id"
).
getMappedRows
();
productCodeBox
=
dataSource
;
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
// 设置树节点的值
setTreeNodeValue
(
nodeData
);
}
// 动态显示列名
dynamicColumnName
();
// 刷新列表数据
$
(
"#inqu_status-0-parentProdCode"
).
val
(
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
nodeId
);
query
();
query
();
},
},
selectTreeNode
:
{}
selectTreeNode
:
{}
}
}
};
};
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
query
();
});
IPLATUI
.
EFGrid
=
{
IPLATUI
.
EFGrid
=
{
result
:
{
result
:
{
pageable
:
{
pageable
:
{
pageSize
:
10
,
pageSize
:
10
,
pageSizes
:
[
10
,
20
,
50
,
100
,
200
],
pageSizes
:
[
10
,
20
,
50
,
100
,
200
],
},
},
columns
:
[
{
field
:
"operator"
,
title
:
"操作"
,
template
:
function
(
item
)
{
let
status
=
item
.
productStatus
;
let
template
=
''
;
if
(
item
.
id
){
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showDetail('
+
item
.
id
+
')" >变更详情</a>'
;
if
(
status
==
0
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="updateProductStatus('
+
item
.
id
+
',1)" >提交</a>'
;
}
// else if (status == 1) {
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
// 'onclick="updateProductStatus(' + item.id + ',0)" >取消提交</a>';
// }
}
return
template
;
}
},
{
field
:
"productCode"
,
template
:
function
(
item
)
{
let
template
=
""
;
if
(
item
.
productCode
){
for
(
let
i
=
0
;
i
<
productCodeBox
.
length
;
i
++
){
if
(
item
.
productCode
===
productCodeBox
[
i
][
'valueField'
]){
item
[
'productName'
]
=
productCodeBox
[
i
][
'textField'
];
item
[
'productId'
]
=
productCodeBox
[
i
][
'param1Field'
];
item
[
'productType'
]
=
productCodeBox
[
i
][
'param2Field'
];
console
.
log
(
item
)
template
=
productCodeBox
[
i
][
'valueField'
];
}
}
}
return
template
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-companyCode"
,
options
.
model
[
"companyCode"
]);
var
nodeData
=
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
;
if
(
nodeData
.
lv
==
2
)
{
inInfo
.
set
(
"inqu_status-0-parInventType"
,
"root"
);
}
else
if
(
nodeData
.
lv
==
3
)
{
inInfo
.
set
(
"inqu_status-0-parInventType"
,
nodeData
.
productType
);
}
else
if
(
nodeData
.
lv
==
4
)
{
//上方刷新过树结构了
inInfo
.
set
(
"inqu_status-0-parInventType"
,
nodeData
.
productType
);
}
inInfo
.
set
(
"field"
,
options
.
field
);
let
dataSource
=
inventNameGlobalData
;
EiCommunicator
.
send
(
"HGSC004A"
,
"queryProductComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"product_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
dataSource
:
dataSource
,
minLength
:
0
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#"
,
valueTemplate
:
"[#:valueField#]#:textField#"
,
template
:
"[#:valueField#]#:textField#"
,
filter
:
"contains"
});
}
}
],
loadComplete
:
function
(
grid
)
{
// 在Grid加载完成后,才能给Grid上的按钮绑定事件
loadComplete
:
function
(
grid
)
{
// 在Grid加载完成后,才能给Grid上的按钮绑定事件
$
(
"#SC02"
).
on
(
"click"
,
function
()
{
$
(
"#SC02"
).
on
(
"click"
,
function
()
{
if
(
grid
.
getCheckedBlockData
().
rows
.
length
===
0
)
{
if
(
grid
.
getCheckedBlockData
().
rows
.
length
===
0
)
{
...
@@ -76,7 +180,17 @@ $(function () {
...
@@ -76,7 +180,17 @@ $(function () {
}
else
{
}
else
{
console
.
log
(
grid
.
getCheckedBlockData
().
rows
[
0
][
10
]);
console
.
log
(
grid
.
getCheckedBlockData
().
rows
[
0
][
10
]);
}
}
});
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
// 判断父级节点是否发生变化
if
(
e
.
field
==
"productCode"
)
{
loadChange
(
grid
,
e
,
"productId"
);
loadChange
(
grid
,
e
,
"productType"
);
loadChange
(
grid
,
e
,
"productName"
);
}
});
});
},
},
onSuccess
:
function
(
e
)
{
onSuccess
:
function
(
e
)
{
...
@@ -85,16 +199,6 @@ $(function () {
...
@@ -85,16 +199,6 @@ $(function () {
query
();
query
();
}
}
},
},
query
:
function
()
{
var
ei
=
new
EiInfo
();
ei
.
set
(
"inqu_status-0-prdtType"
,
$
(
"#inqu_status-0-prdtType"
).
val
());
ei
.
set
(
"inqu_status-0-prdtCode"
,
$
(
"#inqu_status-0-prdtCode"
).
val
());
ei
.
set
(
"inqu_status-0-status"
,
$
(
"#inqu_status-0-status"
).
val
());
ei
.
set
(
"inqu_status-0-parentId"
,
parentId
?
parentId
:
strs
[
1
]);
// ei.set("inqu_status-0-parentId",-1);
return
ei
;
},
/**
/**
* 点击行首checkbox,勾选行时触发的事件
* 点击行首checkbox,勾选行时触发的事件
* @param e kendo的Event对象
* @param e kendo的Event对象
...
@@ -127,6 +231,17 @@ $(function () {
...
@@ -127,6 +231,17 @@ $(function () {
});
});
e
.
preventDefault
();
e
.
preventDefault
();
}
}
var
logicLv
=
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
lv
===
'1'
?
true
:
false
;
if
(
logicLv
)
{
// 通过业务逻辑判断, 控制是否进行新增
IPLAT
.
alert
({
message
:
'<b>请选择项目或产品层级</b>'
,
okFn
:
function
(
e
)
{
},
title
:
'提示'
});
e
.
preventDefault
();
}
},
},
/**
/**
* EFGrid新增行时触发的事件,此时数据行tr元素还未渲染
* EFGrid新增行时触发的事件,此时数据行tr元素还未渲染
...
@@ -142,8 +257,9 @@ $(function () {
...
@@ -142,8 +257,9 @@ $(function () {
$
.
each
(
e
.
items
,
function
(
index
,
item
)
{
$
.
each
(
e
.
items
,
function
(
index
,
item
)
{
item
[
'projCode'
]
=
selectTreeNode
.
projCode
;
item
[
'projCode'
]
=
selectTreeNode
.
projCode
;
item
[
'projName'
]
=
selectTreeNode
.
projName
;
item
[
'projName'
]
=
selectTreeNode
.
projName
;
item
[
'parentId'
]
=
selectTreeNode
.
nodeId
;
item
[
'parentProdCode'
]
=
selectTreeNode
.
nodeId
;
item
[
'parentPrdtName'
]
=
selectTreeNode
.
prdtName
;
item
[
'parentProdName'
]
=
selectTreeNode
.
pName
;
item
[
'lv'
]
=
selectTreeNode
.
lv
;
});
});
},
},
/**
/**
...
@@ -152,7 +268,13 @@ $(function () {
...
@@ -152,7 +268,13 @@ $(function () {
* e.sender Grid对象
* e.sender Grid对象
*/
*/
onSave
:
function
(
e
)
{
onSave
:
function
(
e
)
{
// 不向后台保存
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
let
btnNode
=
$
(
this
);
//禁用按钮
btnNode
.
attr
(
"disabled"
,
true
);
save
(
btnNode
);
var
tree
=
$
(
"#materialTree"
).
data
(
"kendoTreeView"
);
var
tree
=
$
(
"#materialTree"
).
data
(
"kendoTreeView"
);
var
inInfo
=
new
EiInfo
();
var
inInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HGSC004A"
,
"queryTreeNode"
,
inInfo
,
{
//传入参数
EiCommunicator
.
send
(
"HGSC004A"
,
"queryTreeNode"
,
inInfo
,
{
//传入参数
...
@@ -176,6 +298,7 @@ $(function () {
...
@@ -176,6 +298,7 @@ $(function () {
tree
.
reload
(
"root"
);
//更新树
tree
.
reload
(
"root"
);
//更新树
}
}
});
});
refreshTree
();
},
},
toolbarConfig
:
{
toolbarConfig
:
{
hidden
:
false
,
// true时,不显示功能按钮,但保留setting导出按钮
hidden
:
false
,
// true时,不显示功能按钮,但保留setting导出按钮
...
@@ -183,33 +306,6 @@ $(function () {
...
@@ -183,33 +306,6 @@ $(function () {
// cancel: false, // 不显示取消按钮
// cancel: false, // 不显示取消按钮
// save: false, // 不显示保存按钮
// save: false, // 不显示保存按钮
delete
:
true
,
// 显示删除按钮
delete
:
true
,
// 显示删除按钮
},
columns
:
[
{
field
:
"operator"
,
template
:
function
(
item
)
{
console
.
log
(
item
)
let
auditStatus
=
item
.
status
;
let
leaf
=
item
.
leaf
let
template
=
''
;
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
// + 'onclick="openUploadFile(' + item.id + ',1)" >附件上传</a>';
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
id
+
')" >附件清单</a>'
;
if
(
leaf
===
'1'
)
{
if
(
auditStatus
==
0
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="check('
+
item
.
id
+
',1)" >审核</a>'
;
}
else
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="check('
+
item
.
id
+
',0)" >反审</a>'
;
}
}
return
template
;
}
}
],
loadComplete
:
function
(
grid
)
{
}
}
},
},
};
};
...
@@ -250,7 +346,7 @@ $(function () {
...
@@ -250,7 +346,7 @@ $(function () {
inInfo
.
set
(
"inventType"
,
prdtType
);
inInfo
.
set
(
"inventType"
,
prdtType
);
EiCommunicator
.
send
(
"HPPZ004"
,
"queryComboBox"
,
inInfo
,
{
EiCommunicator
.
send
(
"HPPZ004"
,
"queryComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
onSuccess
:
function
(
ei
)
{
var
input
=
$
(
"#inqu_status-0-pr
d
tCode"
);
var
input
=
$
(
"#inqu_status-0-pr
oduc
tCode"
);
dataEdition
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
dataEdition
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
input
.
kendoDropDownList
({
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
valuePrimitive
:
true
,
...
@@ -312,3 +408,137 @@ function check(id, auditStatus) {
...
@@ -312,3 +408,137 @@ function check(id, auditStatus) {
}
}
);
);
}
}
/**
* 刷新树
*/
let
refreshTree
=
function
()
{
setTimeout
(()
=>
{
// 刷新树节点
const
tree
=
$
(
"#materialTree"
).
data
(
"kendoTreeView"
);
// 选中的节点
const
treeId
=
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
nodeId
;
tree
.
reload
(
treeId
)
// 展开成功后选中对应的树节点
expandTreeNode
(
tree
,
treeId
);
// 展开成功后选中对应的树节点
selectTreeNode
(
tree
,
treeId
);
},
500
);
}
/**
* 展开对应的树节点
*
* @param tree
* @param treeId
*/
let
expandTreeNode
=
function
(
tree
,
treeId
)
{
if
(
!
tree
||
treeId
==
null
)
{
return
}
setTimeout
(()
=>
{
let
barDataItem
=
tree
.
dataSource
.
get
(
treeId
);
if
(
barDataItem
)
{
tree
.
expandPath
([
treeId
])
}
else
{
expandTreeNode
(
tree
,
treeId
)
}
},
300
);
}
/**
* 选中树节点
*
* @param tree
* @param treeId
*/
let
selectTreeNode
=
(
tree
,
treeId
)
=>
{
if
(
!
tree
||
treeId
==
null
)
{
return
}
setTimeout
(()
=>
{
let
barDataItem
=
tree
.
dataSource
.
get
(
treeId
);
if
(
barDataItem
)
{
let
barElement
=
tree
.
findByUid
(
barDataItem
.
uid
);
// 刷新完成后选中对应的树节点
tree
.
select
(
barElement
);
// 赋值
setTreeNodeValue
(
barDataItem
);
}
else
{
selectTreeNode
(
tree
,
treeId
)
}
},
300
)
}
/**
* 设置树节点的值
*
* @param nodeData
*/
let
setTreeNodeValue
=
function
(
nodeData
)
{
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
nodeId
=
nodeData
.
nodeId
;
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
pId
=
nodeData
.
pId
;
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
pName
=
nodeData
.
pName
;
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
productType
=
nodeData
.
productType
;
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
productCode
=
nodeData
.
productCode
;
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
productName
=
nodeData
.
productName
;
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
projCode
=
nodeData
.
projCode
;
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
projName
=
nodeData
.
projName
;
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
lv
=
nodeData
.
lv
;
}
/**
* 保存
*/
let
save
=
function
(
btnNode
)
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGSC004A"
,
"save"
,
true
,
function
(
e
)
{
query
();
});
btnNode
.
attr
(
"disabled"
,
false
);
}
});
}
}
/**
* 动态显示列名
*/
let
dynamicColumnName
=
function
()
{
// 根据叶子节点动态设置列名
let
lv
=
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
lv
;
let
th
=
$
(
"th[data-field='prdtName']"
);
if
(
lv
==
2
)
{
th
.
html
(
"<span class=
\"
i-input-required
\"
>*</span>项目名称"
);
}
else
{
th
.
html
(
"<span class=
\"
i-input-required
\"
>*</span>产品名称"
);
}
}
function
updateProductStatus
(
id
,
status
)
{
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-id"
,
id
);
inEiInfo
.
set
(
"result-0-productStatus"
,
status
);
inEiInfo
.
set
(
"result-0-materialId"
,
$
(
"#inqu_status-0-materialId"
).
val
());
EiCommunicator
.
send
(
'HGSC004A'
,
'updateProductStatus'
,
inEiInfo
,
{
onSuccess
(
response
)
{
NotificationUtil
(
response
.
msg
);
query
();
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
src/main/webapp/HG/SC/HGSC004A.jsp
View file @
f37e2510
...
@@ -4,11 +4,11 @@
...
@@ -4,11 +4,11 @@
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<head>
<
%
--
<
link
rel=
"stylesheet"
href=
"${ctx}/css/simulatedOperation.css"
/>
--%>
</head>
<EF:EFPage
title=
"物料清单详情"
>
<EF:EFPage
title=
"物料清单详情"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<EF:EFInput
ename=
"inqu_status-0-materialId"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-parentProdCode"
type=
"hidden"
/>
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFInput
ename=
"inqu_status-0-productName"
cname=
"产品名称"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-productName"
cname=
"产品名称"
colWidth=
"3"
/>
<EF:EFSelect
cname=
"变更类型"
ename=
"inqu_status-0-changeType"
colWidth=
"3"
filter=
"contains"
>
<EF:EFSelect
cname=
"变更类型"
ename=
"inqu_status-0-changeType"
colWidth=
"3"
filter=
"contains"
>
...
@@ -38,27 +38,23 @@
...
@@ -38,27 +38,23 @@
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
checkMode=
"single"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
checkMode=
"single"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"level"
cname=
"层级"
hidden=
"true"
/>
<EF:EFColumn
ename=
"lv"
cname=
"层级"
hidden=
"true"
/>
<EF:EFColumn
enable=
"false"
ename=
"projCode"
cname=
"项目编码"
/>
<EF:EFColumn
enable=
"false"
ename=
"parentProdCode"
hidden=
"true"
cname=
"上级产品编号"
/>
<EF:EFColumn
enable=
"false"
ename=
"projName"
cname=
"项目名称"
/>
<EF:EFColumn
enable=
"false"
ename=
"parentProdName"
hidden=
"true"
cname=
"上级产品名称"
/>
<EF:EFComboColumn
cname=
"产品类型"
ename=
"prdtType"
width=
"90"
align=
"center"
required=
"true"
>
<EF:EFColumn
enable=
"false"
ename=
"productId"
hidden=
"true"
cname=
"产品id"
/>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
condition=
"ITEM_CODE IN ('3','4')"
/>
<EF:EFColumn
enable=
"false"
ename=
"productType"
hidden=
"true"
cname=
"产品类型"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
width=
"140"
enable=
"false"
readonly=
"false"
/>
<EF:EFComboColumn
cname=
"变更类型"
ename=
"changeType"
width=
"90"
align=
"center"
enable=
"false"
required=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.sc.changeType"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"inventRecordId"
required=
"true"
cname=
"产品名称"
/>
<EF:EFColumn
ename=
"productCode"
required=
"true"
cname=
"产品编号"
/>
<EF:EFColumn
ename=
"prdtCode"
required=
"true"
cname=
"产品编码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"productName"
cname=
"产品名称"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
enable=
"false"
ename=
"parentId"
hidden=
"true"
cname=
"上级产品名称"
/>
<EF:EFColumn
ename=
"quantity"
required=
"true"
cname=
"数量"
/>
<EF:EFColumn
enable=
"false"
ename=
"parentPrdtName"
cname=
"上级产品名称"
/>
<EF:EFColumn
ename=
"singleWeight"
required=
"true"
format=
"{0:N3}"
cname=
"单重(kg)"
/>
<EF:EFColumn
ename=
"num"
required=
"true"
cname=
"数量"
/>
<EF:EFColumn
enable=
"true"
required=
"true"
format=
"{0:N3}"
ename=
"totalWeight"
cname=
"总重(kg)"
/>
<EF:EFColumn
ename=
"unitWt"
required=
"true"
format=
"{0:N3}"
cname=
"单重"
/>
<EF:EFComboColumn
cname=
"提交状态"
ename=
"productStatus"
width=
"90"
align=
"center"
required=
"false"
>
<EF:EFColumn
enable=
"false"
format=
"{0:N3}"
ename=
"totalWt"
cname=
"总重"
/>
<EF:EFCodeOption
codeName=
"hggp.sc.productStatus"
/>
<EF:EFComboColumn
enable=
"false"
ename=
"status"
align=
"center"
columnTemplate=
"#=textField#"
optionLabel=
" "
itemTemplate=
"#=textField#"
textField=
"textField"
valueField=
"valueField"
cname=
"审核状态"
>
<EF:EFOption
label=
"未审核"
value=
"0"
></EF:EFOption>
<EF:EFOption
label=
"已审核"
value=
"1"
></EF:EFOption>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
width=
"200"
enable=
"false"
readonly=
"false"
/>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
</div>
</div>
...
@@ -68,4 +64,4 @@
...
@@ -68,4 +64,4 @@
let
ctx
=
"${ctx}"
;
let
ctx
=
"${ctx}"
;
</script>
</script>
<script
src=
"${ctx}/H
P
/SC/HGSC004A.js"
></script>
<script
src=
"${ctx}/H
G
/SC/HGSC004A.js"
></script>
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