Commit eae028f3 by wuwenlong

物料清单新增层级

parent b9215186
......@@ -52,7 +52,7 @@ public class HPSC002 extends DaoEPBase {
private String updatedBy = " "; /* 更新人*/
private String updatedTime; /* 更新时间*/
private String remark = " "; /* 备注*/
private Integer level = 0; /*层级*/
private Integer lv = 0; /*层级*/
/**
* initialize the metadata
......@@ -187,7 +187,7 @@ public class HPSC002 extends DaoEPBase {
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("level");
eiColumn = new EiColumn("lv");
eiColumn.setDescName("层级");
eiMetadata.addMeta(eiColumn);
}
......@@ -649,12 +649,12 @@ public class HPSC002 extends DaoEPBase {
this.remark = remark;
}
public Integer getLevel() {
return level;
public Integer getLv() {
return lv;
}
public void setLevel(Integer level) {
this.level = level;
public void setLv(Integer lv) {
this.lv = lv;
}
/**
......@@ -692,7 +692,7 @@ public class HPSC002 extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")),updatedTime));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("remark")), remark));
setLevel(NumberUtils.toInteger(StringUtils.toString(map.get("level")), level));
setLv(NumberUtils.toInteger(StringUtils.toString(map.get("lv")), lv));
}
/**
......@@ -731,7 +731,7 @@ public class HPSC002 extends DaoEPBase {
map.put("updatedBy", StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime", StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("remark", StringUtils.toString(remark, eiMetadata.getMeta("remark")));
map.put("level", StringUtils.toString(level, eiMetadata.getMeta("level")));
map.put("lv", StringUtils.toString(lv, eiMetadata.getMeta("lv")));
return map;
......
......@@ -87,10 +87,10 @@ public class ServiceHPSC002 extends ServiceBase {
hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName());
}
if(hppz002.getParentId().equals("root")){
hppz002.setLevel(new Integer(1));
hppz002.setLv(new Integer(1));
}else{
Integer level = (Integer) this.dao.get("HPSC002.queryLevel","id",hppz002.getParentId());
hppz002.setLevel(level.intValue()+1);
Integer lv = (Integer) this.dao.get("HPSC002.queryLv","id",hppz002.getParentId());
hppz002.setLv(lv.intValue()+1);
}
DaoUtils.insert("HPSC002.insert", hppz002.toMap());
// if (!hppz002.getParentId().equals("root")) {
......
......@@ -68,7 +68,7 @@
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark", <!-- 备注 -->
LEVEL as "level"
LV as "lv"
FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0
......@@ -96,8 +96,8 @@
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="level">
LEVEL = #level#
<isNotEmpty prepend=" AND " property="lv">
LV = #lv#
</isNotEmpty>
ORDER BY ID DESC
<!-- <dynamic prepend="ORDER BY">-->
......@@ -136,8 +136,8 @@
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="level">
LEVEL = #level#
<isNotEmpty prepend=" AND " property="lv">
LV = #lv#
</isNotEmpty>
</select>
......@@ -259,9 +259,9 @@
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
REMARK, <!-- 备注 -->
LEVEL
LV
)
VALUES (#id#, #companyCode#, #deptCode#, #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#, #level#)
VALUES (#id#, #companyCode#, #deptCode#, #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#)
</insert>
<delete id="delete">
......@@ -322,7 +322,7 @@
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 -->
LEVEL as "level"
LV as "lv"
FROM
hpjx.t_hpsc002
WHERE
......@@ -368,7 +368,7 @@
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark", <!-- 备注 -->
LEVEL as "level"
LV as "lv"
FROM hpjx.t_hpsc002
WHERE 1 = 1
<isNotEmpty prepend=" AND " property="id">
......@@ -413,7 +413,7 @@
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark", <!-- 备注 -->
LEVEL as "level"
LV as "lv"
FROM hpjx.t_hpsc002 WHERE 1 = 1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
......@@ -446,8 +446,8 @@
</isNotEmpty>
</select>
<select id="queryLevel" resultClass="int">
SELECT LEVEL from hpjx.t_hpsc002
<select id="queryLv" resultClass="int">
SELECT LV from hpjx.t_hpsc002
WHERE ID = #id#
</select>
......
......@@ -190,13 +190,13 @@ $(function () {
template: function (item) {
console.log(item)
let auditStatus = item.status;
let level = item.level
let lv = item.lv
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 (level === '3') {
if (lv === '3') {
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="check(' + item.id + ',1)" >审核</a>';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment