Commit eae028f3 by wuwenlong

物料清单新增层级

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