Commit d6a5ed38 by liuyang

2024-05-11 优化设备管理查询条件显示优化

parent 58b70e01
......@@ -95,6 +95,10 @@ public class HGConstant {
public static final String CG_CONTRACT_NO = "CG_CONTRACT_NO";
// 采购收货号
public static final String CG_RECEIVE_NO = "CG_RECEIVE_NO";
// 点检单号
public static final String INSPEC_CODE = "INSPEC_CODE";
// 保养单号
public static final String UPKEEP_CODE = "UPKEEP_CODE";
}
/**
......
......@@ -45,6 +45,7 @@ public class HGSB002 extends DaoEPBase {
public static final String FIELD_PLAN_USER_ID = "planUserId"; /* 计划人编码*/
public static final String FIELD_PLAN_USER_NAME = "planUserName"; /* 计划人名称*/
public static final String FIELD_PLAN_STATUS = "planStatus"; /* 审批状态 0-停止 1-启用*/
public static final String FIELD_TASK_STATUS = "taskStatus"; /* 任务状态 0-未生成任务 1-已生成任务*/
public static final String COL_ID = "ID"; /* ID*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 账套*/
......@@ -103,6 +104,7 @@ public class HGSB002 extends DaoEPBase {
private String planUserId = " "; /* 计划人编码*/
private String planUserName = " "; /* 计划人名称*/
private Integer planStatus = 1; /* 审批状态 0-停止 1-启用*/
private Integer taskStatus = 0; /* 任务状态 0-未生成任务 1-已生成任务*/
/**
* initialize the metadata.
......@@ -207,7 +209,9 @@ public class HGSB002 extends DaoEPBase {
eiColumn.setDescName("审批状态 0-停止 1-启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TASK_STATUS);
eiColumn.setDescName("任务状态 0-未生成任务 1-已生成任务");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -601,6 +605,15 @@ public class HGSB002 extends DaoEPBase {
public void setPlanStatus(Integer planStatus) {
this.planStatus = planStatus;
}
public Integer getTaskStatus() {
return taskStatus;
}
public void setTaskStatus(Integer taskStatus) {
this.taskStatus = taskStatus;
}
/**
* get the value from Map.
*
......@@ -633,6 +646,7 @@ public class HGSB002 extends DaoEPBase {
setPlanUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_USER_ID)), planUserId));
setPlanUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_USER_NAME)), planUserName));
setPlanStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PLAN_STATUS)), planStatus));
setTaskStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TASK_STATUS)), taskStatus));
}
/**
......@@ -666,6 +680,7 @@ public class HGSB002 extends DaoEPBase {
map.put(FIELD_PLAN_USER_ID, StringUtils.toString(planUserId, eiMetadata.getMeta(FIELD_PLAN_USER_ID)));
map.put(FIELD_PLAN_USER_NAME, StringUtils.toString(planUserName, eiMetadata.getMeta(FIELD_PLAN_USER_NAME)));
map.put(FIELD_PLAN_STATUS, StringUtils.toString(planStatus, eiMetadata.getMeta(FIELD_PLAN_STATUS)));
map.put(FIELD_TASK_STATUS, StringUtils.toString(taskStatus, eiMetadata.getMeta(FIELD_TASK_STATUS)));
return map;
}
......
......@@ -40,6 +40,7 @@ public class HGSB003 extends DaoEPBase {
public static final String FIELD_CHECK_ITEM = "checkItem"; /* 检查项*/
public static final String FIELD_CHECK_DESCRIP = "checkDescrip"; /* 检查结果*/
public static final String FIELD_DOC_ID = "docId"; /* 附件ID*/
public static final String FIELD_DOC_NAME = "docName"; /* 附件ID*/
public static final String FIELD_APPLY_USER_ID = "applyUserId"; /* 申请人*/
public static final String FIELD_APPLY_USER_NAME = "applyUserName"; /* 申请人名称*/
public static final String FIELD_STATUS = "status"; /* 审批状态 0-审批未完成 1-审批完成*/
......@@ -95,6 +96,7 @@ public class HGSB003 extends DaoEPBase {
private String checkItem = " "; /* 检查项*/
private String checkDescrip = " "; /* 检查结果*/
private String docId = " "; /* 附件ID*/
private String docName = " ";
private String applyUserId = " "; /* 申请人*/
private String applyUserName = " "; /* 申请人名称*/
private Integer status = 0; /* 审批状态 0-审批未完成 1-审批完成*/
......@@ -182,6 +184,10 @@ public class HGSB003 extends DaoEPBase {
eiColumn.setDescName("附件ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_NAME);
eiColumn.setDescName("附件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_APPLY_USER_ID);
eiColumn.setDescName("申请人");
eiMetadata.addMeta(eiColumn);
......@@ -508,6 +514,15 @@ public class HGSB003 extends DaoEPBase {
public void setDocId(String docId) {
this.docId = docId;
}
public String getDocName() {
return docName;
}
public void setDocName(String docName) {
this.docName = docName;
}
/**
* get the applyUserId - 申请人.
* @return the applyUserId
......@@ -583,6 +598,7 @@ public class HGSB003 extends DaoEPBase {
setCheckItem(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHECK_ITEM)), checkItem));
setCheckDescrip(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHECK_DESCRIP)), checkDescrip));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
setApplyUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_APPLY_USER_ID)), applyUserId));
setApplyUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_APPLY_USER_NAME)), applyUserName));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
......@@ -614,6 +630,7 @@ public class HGSB003 extends DaoEPBase {
map.put(FIELD_CHECK_ITEM, StringUtils.toString(checkItem, eiMetadata.getMeta(FIELD_CHECK_ITEM)));
map.put(FIELD_CHECK_DESCRIP, StringUtils.toString(checkDescrip, eiMetadata.getMeta(FIELD_CHECK_DESCRIP)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
map.put(FIELD_APPLY_USER_ID, StringUtils.toString(applyUserId, eiMetadata.getMeta(FIELD_APPLY_USER_ID)));
map.put(FIELD_APPLY_USER_NAME, StringUtils.toString(applyUserName, eiMetadata.getMeta(FIELD_APPLY_USER_NAME)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-05-09 14:12:07
Version : 1.0
schema : hggp
......@@ -55,7 +56,8 @@
PLAN_END_DATE as "planEndDate", <!-- 计划结束日期 -->
PLAN_USER_ID as "planUserId", <!-- 计划人编码 -->
PLAN_USER_NAME as "planUserName", <!-- 计划人名称 -->
PLAN_STATUS as "planStatus" <!-- 审批状态 0-停止 1-启用 -->
PLAN_STATUS as "planStatus", <!-- 审批状态 0-停止 1-启用 -->
TASK_STATUS as "taskStatus"
</sql>
<sql id="authCondition">
......@@ -151,6 +153,9 @@
<isNotEmpty prepend=" AND " property="planStatus">
PLAN_STATUS = #planStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taskStatus">
TASK_STATUS = #taskStatus#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......@@ -274,9 +279,10 @@
PLAN_END_DATE, <!-- 计划结束日期 -->
PLAN_USER_ID, <!-- 计划人编码 -->
PLAN_USER_NAME, <!-- 计划人名称 -->
PLAN_STATUS <!-- 审批状态 0-停止 1-启用 -->
PLAN_STATUS, <!-- 审批状态 0-停止 1-启用 -->
TASK_STATUS
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #factoryCode#, #factoryName#, #groupCode#, #groupName#, #planDate#, #planCode#, #planType#, #planStartDate#, #planEndDate#, #planUserId#, #planUserName#, #planStatus#)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #factoryCode#, #factoryName#, #groupCode#, #groupName#, #planDate#, #planCode#, #planType#, #planStartDate#, #planEndDate#, #planUserId#, #planUserName#, #planStatus#, #taskStatus#)
</insert>
<delete id="delete">
......@@ -320,7 +326,8 @@
PLAN_END_DATE = #planEndDate#, <!-- 计划结束日期 -->
PLAN_USER_ID = #planUserId#, <!-- 计划人编码 -->
PLAN_USER_NAME = #planUserName#, <!-- 计划人名称 -->
PLAN_STATUS = #planStatus# <!-- 审批状态 0-停止 1-启用 -->
PLAN_STATUS = #planStatus#, <!-- 审批状态 0-停止 1-启用 -->
TASK_STATUS = #taskStatus#
WHERE
ID = #id#
</update>
......@@ -336,4 +343,15 @@
ID = #id#
</update>
<update id="updateTaskStatus">
UPDATE ${hggpSchema}.HGSB002
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
TASK_STATUS = #taskStatus# <!-- 任务状态0.启用1.停止 -->
WHERE
ID = #id#
</update>
</sqlMap>
......@@ -50,6 +50,7 @@
CHECK_ITEM as "checkItem", <!-- 检查项 -->
CHECK_DESCRIP as "checkDescrip", <!-- 检查结果 -->
DOC_ID as "docId", <!-- 附件ID -->
DOC_NAME as "docName",
APPLY_USER_ID as "applyUserId", <!-- 申请人 -->
APPLY_USER_NAME as "applyUserName", <!-- 申请人名称 -->
STATUS as "status" <!-- 审批状态 0-审批未完成 1-审批完成 -->
......@@ -256,11 +257,12 @@
CHECK_ITEM, <!-- 检查项 -->
CHECK_DESCRIP, <!-- 检查结果 -->
DOC_ID, <!-- 附件ID -->
DOC_NAME,
APPLY_USER_ID, <!-- 申请人 -->
APPLY_USER_NAME, <!-- 申请人名称 -->
STATUS <!-- 审批状态 0-审批未完成 1-审批完成 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #applyDate#, #applyCode#, #deviceCode#, #deviceName#, #checkItem#, #checkDescrip#, #docId#, #applyUserId#, #applyUserName#, #status#)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #applyDate#, #applyCode#, #deviceCode#, #deviceName#, #checkItem#, #checkDescrip#, #docId#, #docName#, #applyUserId#, #applyUserName#, #status#)
</insert>
<delete id="delete">
......@@ -300,6 +302,7 @@
CHECK_ITEM = #checkItem#, <!-- 检查项 -->
CHECK_DESCRIP = #checkDescrip#, <!-- 检查结果 -->
DOC_ID = #docId#, <!-- 附件ID -->
DOC_NAME = #docName#,
APPLY_USER_ID = #applyUserId#, <!-- 申请人 -->
APPLY_USER_NAME = #applyUserName#, <!-- 申请人名称 -->
STATUS = #status# <!-- 审批状态 0-审批未完成 1-审批完成 -->
......@@ -324,7 +327,8 @@
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DOC_ID = #docId# <!-- 附件ID -->
DOC_ID = #docId#, <!-- 附件ID -->
DOC_NAME = #docName#
WHERE
ID = #id#
</update>
......
......@@ -23,7 +23,7 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="设备区域" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="设备区域" placeholder="模糊查询" colWidth="3"/>
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="groupCode" cname="设备区域" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="groupCodeBox_block_id" textField="textField" valueField="valueField"/>
......@@ -33,8 +33,8 @@
<EF:EFCodeOption codeName="hpjx.hpsb.deviceType"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="purchaseDate" cname="购置日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceCode" cname="设备编码" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceName" cname="设备名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceCode" cname="设备编码" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceName" cname="设备名称" placeholder="模糊查询" colWidth="3"/>
</div>
</EF:EFRegion>
......
......@@ -24,7 +24,7 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="设备区域" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="设备区域" placeholder="模糊查询" colWidth="3"/>
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="groupCode" cname="设备区域" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="groupCodeBox_block_id" textField="textField" valueField="valueField"/>
......@@ -34,7 +34,7 @@
<EF:EFCodeOption codeName="hggp.hgsb.planType"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="planDate" cname="计划日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="planUserName" cname="计划人" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="planUserName" cname="计划人" placeholder="模糊查询" colWidth="3"/>
</div>
</EF:EFRegion>
......
......@@ -25,7 +25,7 @@
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpsb.deviceType"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceName" cname="设备名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceName" cname="设备名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="groupCode" cname="设备区间编码" colWidth="3" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="设备区间名称" colWidth="3" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="parentId" cname="上级ID" colWidth="3" type="hidden"/>
......
......@@ -86,8 +86,9 @@ $(function () {
template: function (item) {
let template = '';
if (item.id>0 && item.docId.trim().length>0){
let docName = item.docName;
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + downloadHref(item.docId) + '" target="_blank">附件图片</a>';
+ 'href="' + downloadHref(item.docId) + '" target="_blank">'+item.docName+'</a>';
}
return template;
}
......@@ -275,6 +276,7 @@ function uploadFileCallback(result) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", result.id);
inEiInfo.set("result-0-docId", result.docId);
inEiInfo.set("result-0-docName", result.docName);
EiCommunicator.send('HGSB003', 'updateDocId', inEiInfo, {
onSuccess(ei) {
if (ei.status == "-1") {
......
......@@ -5,6 +5,7 @@ $(function () {
uploadFile: {
success: function(e) {
let docId = e.response.docId;
let docName = e.response.docName;
let id = $("#inqu_status-0-id").val()
if (isBlank(docId)) {
return;
......@@ -13,7 +14,7 @@ $(function () {
NotificationUtil("附件上传成功");
//saveTemp(e);
try {
parent.JSColorbox.setValueCallback({"id":id,"docId":docId});
parent.JSColorbox.setValueCallback({"id":id,"docId":docId,"docName":docName});
parent.JSColorbox.close();
} catch (e){
}
......
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