Commit cb63a7ab by 宋祥

Merge remote-tracking branch 'origin/dev' into dev

parents 9a02e794 c7d550ee
......@@ -52,6 +52,7 @@ public class HPSC002 extends DaoEPBase {
private String updatedBy = " "; /* 更新人*/
private String updatedTime; /* 更新时间*/
private String remark = " "; /* 备注*/
private Integer lv = 0; /*层级*/
/**
* initialize the metadata
......@@ -186,7 +187,9 @@ public class HPSC002 extends DaoEPBase {
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("lv");
eiColumn.setDescName("层级");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -646,6 +649,14 @@ public class HPSC002 extends DaoEPBase {
this.remark = remark;
}
public Integer getLv() {
return lv;
}
public void setLv(Integer lv) {
this.lv = lv;
}
/**
* get the value from Map
*/
......@@ -681,6 +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));
setLv(NumberUtils.toInteger(StringUtils.toString(map.get("lv")), lv));
}
/**
......@@ -719,6 +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("lv", StringUtils.toString(lv, eiMetadata.getMeta("lv")));
return map;
......
......@@ -5,7 +5,6 @@ import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
......@@ -18,7 +17,6 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.DateUtil;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
......@@ -88,6 +86,12 @@ public class ServiceHPSC002 extends ServiceBase {
if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentId().equals("root")) {
hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName());
}
if(hppz002.getParentId().equals("root")){
hppz002.setLv(new Integer(1));
}else{
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")) {
this.checkTreeNodeLeaf(new Long(hppz002.getParentId()));
......@@ -349,7 +353,7 @@ public class ServiceHPSC002 extends ServiceBase {
*/
public void autoPlanInfo(String id) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
HPSC002 THPSC002 = (HPSC002) dao.get("HPSC002.query","id",id);
HPSC002 THPSC002 = (HPSC002) dao.get("HPSC002.queryEntityByParentPrtdCode","id",id);
String SCJHD = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC003_PROD_NO);
//生成生产计划t_hpsc003
HPSC003 HPSC003 = new HPSC003();
......@@ -372,7 +376,7 @@ public class ServiceHPSC002 extends ServiceBase {
//生产计划详情
Map queryMap = new HashMap();
queryMap.put("id", id);
queryMap.put("parentId", id);
List<HPSC002> rows = this.dao.query("HPSC002.queryEntityByParentPrtdCode", queryMap);
for (int i = 0; i < rows.size(); i++) {
......
......@@ -67,7 +67,8 @@
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark" <!-- 备注 -->
REMARK as "remark", <!-- 备注 -->
LV as "lv"
FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0
......@@ -95,7 +96,10 @@
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
ORDER BY CREATED_TIME DESC
<isNotEmpty prepend=" AND " property="lv">
LV = #lv#
</isNotEmpty>
ORDER BY ID DESC
<!-- <dynamic prepend="ORDER BY">-->
<!-- <isEmpty property="orderBy">-->
<!-- CREATED_TIME DESC-->
......@@ -132,6 +136,9 @@
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="lv">
LV = #lv#
</isNotEmpty>
</select>
<!--
......@@ -251,9 +258,10 @@
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
REMARK <!-- 备注 -->
REMARK, <!-- 备注 -->
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#)
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">
......@@ -313,7 +321,8 @@
TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
ICON as "icon" <!-- 图片地址 -->
ICON as "icon", <!-- 图片地址 -->
LV as "lv"
FROM
hpjx.t_hpsc002
WHERE
......@@ -358,7 +367,8 @@
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark" <!-- 备注 -->
REMARK as "remark", <!-- 备注 -->
LV as "lv"
FROM hpjx.t_hpsc002
WHERE 1 = 1
<isNotEmpty prepend=" AND " property="id">
......@@ -402,8 +412,15 @@
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark" <!-- 备注 -->
FROM hpjx.t_hpsc002 WHERE PARENT_ID = #id#
REMARK as "remark", <!-- 备注 -->
LV as "lv"
FROM hpjx.t_hpsc002 WHERE 1 = 1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
</select>
<update id="updateTreeNodeLeaf">
......@@ -424,16 +441,21 @@
WHERE 1 = 1
AND PARENT_ID != 'root'
AND `STATUS` = 0
<isNotEmpty prepend=" AND " property="parentId">
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
</select>
<select id="queryLv" resultClass="int">
SELECT LV from hpjx.t_hpsc002
WHERE ID = #id#
</select>
<select id="checkExamineNum1Count" resultClass="int">
SELECT COUNT(1) from hpjx.t_hpsc002
WHERE 1 = 1
AND PARENT_ID != 'root'
<isNotEmpty prepend=" AND " property="parentId">
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
</select>
......
......@@ -104,7 +104,7 @@
FROM
hpjx.T_HPSC004
WHERE
PROJ_CODE = hpjx.T_HPSC003.PROJ_CODE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO
),'%') AS "schedule"
FROM hpjx.T_HPSC003 WHERE 1=1
<include refid="condition" />
......
......@@ -79,6 +79,12 @@ $(function () {
});
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'){
query();
}
},
query: function () {
var ei = new EiInfo();
ei.set("inqu_status-0-prdtType",$("#inqu_status-0-prdtType").val());
......@@ -184,13 +190,13 @@ $(function () {
template: function (item) {
console.log(item)
let auditStatus = item.status;
let leaf = item.leaf
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 (leaf === '1') {
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>';
......
......@@ -43,6 +43,7 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="no" checkMode="single">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="level" cname="层级" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFComboColumn cname="产品类型" ename="prdtType" width="90" align="center" required="true">
......
......@@ -49,8 +49,16 @@
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFColumn enable="false" ename="princ1" cname="本公司项目负责人"/>
<EF:EFColumn enable="false" ename="princ2" cname="客户项目负责人"/>
<EF:EFComboColumn ename="princ1" cname="本公司项目负责人" width="120" align="center" required="true"
blockName="user_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="princ2" cname="客户项目负责人" width="120" align="center" required="true"
blockName="customer_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn required="true" align="center" ename="materialStatus" cname="物料审核状态" defaultValue="0">
<EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="部分审核" value="1"/>
......
......@@ -22,6 +22,11 @@ $(function () {
return;
}
let row = rows[0];
let isInput= decodeURI(window.location.href.split("&")[1]);
if(isInput==="isInput"){
parent.JSColorbox.setValueCallback(row.orgId);
return;
};
JSUtils.confirm("确定\"是否\"分派? ", {
ok: function () {
parent.JSColorbox.setValueCallback(row.orgId);
......
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