Commit d5ffacd8 by liuyang

2024-05-27

1、更改设备计划重复添加提示
2、维保申请附件删除逻辑调整
3、设备点检详情点检附件多条上传
4、设备保养详情保养附件多条上传
parent 2925a238
......@@ -91,23 +91,21 @@ public class ServiceHGSB002A extends ServiceEPBase {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
Long parentId = Long.valueOf(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSB002A.FIELD_PARENT_ID));
HGSB002 hgsb002 = HGSBTools.Hgsb002.get(parentId);
List<HGSB002A> hgsb002AList = HGSBTools.Hgsb002.getDetails(parentId);
// 写入数据
for (Map resultRow : resultRows) {
HGSB002A hgsb002a = new HGSB002A();
hgsb002a.fromMap(resultRow);
// 状态==1抛出异常
if (hgsb002.getPlanStatus()==1) {
String str = "设备计划已审批完成,保存失败!";
throw new PlatException(str);
throw new PlatException("设备计划已审批完成,保存失败!");
}
if (hgsb002a.getId() == null || hgsb002a.getId() == 0) {
List<HGSB002A> hgsb002AList = HGSBTools.Hgsb002.getDetails(parentId);
for (HGSB002A hgsb002a1: hgsb002AList) {
if (hgsb002a1.getDeviceCode().equals(hgsb002a.getDeviceCode())) {
String str = String.format("无法重复添加!");
throw new PlatException(str);
throw new PlatException("无法重复添加!");
}
}
if (hgsb002a.getId() == null || hgsb002a.getId() == 0) {
hgsb002a.setParentId(parentId);
this.add(hgsb002a);
} else {
......
package com.baosight.hggp.hg.sb.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.ds.domain.HGDS002;
......@@ -49,6 +50,7 @@ public class ServiceHGSB099 extends ServiceEPBase {
return inInfo;
}
@OperationLogAnnotation(operModul = "设备附件详情",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
try {
......@@ -69,7 +71,7 @@ public class ServiceHGSB099 extends ServiceEPBase {
}
return inInfo;
}
@OperationLogAnnotation(operModul = "设备附件详情",operType = "新增",operDesc = "新增操作")
@Override
public EiInfo insert(EiInfo inInfo) {
try {
......
......@@ -117,6 +117,16 @@ public class HGSBTools {
return results;
}
/**
* 查询设备计划详情
*
* @param queryMap
*/
public static List<HGSB002A> getDetails(Map queryMap) {
queryMap.put(HGSB002A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
List<HGSB002A> results = DaoBase.getInstance().query(HGSB002A.QUERY, queryMap);
return results;
}
}
/**
......
......@@ -36,24 +36,24 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="账套" hidden="true"/>
<EF:EFComboColumn ename="groupCode" cname="设备区域" enable="false"
<EF:EFComboColumn ename="groupCode" cname="设备区域" readonly="true"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="120" required="true"
maxLength="16" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="group_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="deviceType" cname="设备类型"
<EF:EFComboColumn ename="deviceType" cname="设备类型" readonly="true"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="80" readonly="false" required="true"
maxLength="16" width="80" required="true"
align="center" filter="contains" sort="true">
<EF:EFCodeOption codeName="hpjx.hpsb.deviceType" />
</EF:EFComboColumn>
<EF:EFComboColumn ename="deviceCode" cname="设备名称"
<EF:EFComboColumn ename="deviceCode" cname="设备名称" readonly="true"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="120" required="true"
maxLength="16" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="deviceCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
......
......@@ -30,7 +30,7 @@ $(function () {
let template = '';
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="uploadFile(' + item.id + ')" >附件详情</a>';
+ 'onclick="uploadFile(' + item.id + ',\''+item.status+'\')" >附件详情</a>';
}
if (item.id) {
if (auditStatus == 0) {
......@@ -274,10 +274,10 @@ function updateStatus(id,deviceStatus) {
*
* @param id
*/
function uploadFile(id) {
function uploadFile(id,status) {
JSColorbox.open({
href: "HGSB099?methodName=initLoad&inqu_status-0-matId="+id+"&inqu_status-0-bizType=SB003",
title: "<div style='text-align: center;'>附件上传</div>",
href: "HGSB099?methodName=initLoad&inqu_status-0-matId="+id+"&inqu_status-0-bizType=SB003&inqu_status-0-checkStatus="+status,
title: "<div style='text-align: center;'>附件详情</div>",
width: "60%",
height: "50%",
//callbackName: uploadFileCallback
......
......@@ -31,7 +31,7 @@ $(function () {
let template = '';
if (item.companyCode) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ',\''+item.companyCode+'\',\''+item.companyName+'\')" >点检详情</a>';
+ 'onclick="showDetail(' + item.id + ',\''+item.companyCode+'\',\''+item.companyName+'\',\''+item.checkStatus+'\')" >点检详情</a>';
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >审批完成</a>';
......@@ -273,9 +273,9 @@ function updateStatus(id,deviceStatus) {
/**
* 显示详情
*/
function showDetail(id,companyCode,companyName) {
function showDetail(id,companyCode,companyName,checkStatus) {
JSColorbox.open({
href: "HGSB004A?methodName=initLoad&inqu_status-0-parentId=" + id+"&inqu_status-0-companyCode="+companyCode+"&inqu_status-0-companyName="+companyName,
href: "HGSB004A?methodName=initLoad&inqu_status-0-parentId=" + id+"&inqu_status-0-companyCode="+companyCode+"&inqu_status-0-companyName="+companyName+"&inqu_status-0-checkStatus="+checkStatus,
title: "<div style='text-align: center;'>设备点检详情</div>",
width: "80%",
height: "80%",
......
......@@ -29,7 +29,7 @@ $(function () {
let template = '';
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="uploadFile(' + item.id + ')" >附件上传</a>';
+ 'onclick="uploadFile(' + item.id + ')" >附件详情</a>';
}
return template;
......@@ -55,7 +55,7 @@ $(function () {
}
return dataItem["deviceCode"]
}
}, {
}/*, {
field: "docId",
template: function (item) {
let template = '';
......@@ -65,7 +65,7 @@ $(function () {
}
return template;
}
}
}*/
],
exportGrid: {
exportFileName: function (gridInstance) {
......@@ -191,12 +191,13 @@ let save = function (btnNode) {
* @param id
*/
function uploadFile(id) {
let checkStatus = $("#inqu_status-0-checkStatus").val();
JSColorbox.open({
href: "HGSB003A?methodName=initLoad&inqu_status-0-id="+id,
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
href: "HGSB099?methodName=initLoad&inqu_status-0-matId="+id+"&inqu_status-0-bizType=SB004&inqu_status-0-checkStatus="+checkStatus,
title: "<div style='text-align: center;'>附件详情</div>",
width: "70%",
height: "50%",
callbackName: uploadFileCallback
//callbackName: uploadFileCallback
});
}
......
......@@ -28,6 +28,7 @@
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="checkItem" cname="检查项" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="parentId" cname="上级ID" colWidth="3" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="checkStatus" cname="审核状态" colWidth="3" type="hidden"/>
</div>
</EF:EFRegion>
......@@ -53,7 +54,7 @@
<EF:EFColumn ename="checkItem" cname="检查项" width="100" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="checkDescrip" cname="检查描述" editType="textarea" width="160" align="center"/>
<EF:EFColumn ename="checkResult" cname="检查结果" editType="textarea" width="160" align="center"/>
<EF:EFColumn ename="docId" cname="点检图片" width="100" enable="false" readonly="true" align="center"/>
<%--<EF:EFColumn ename="docId" cname="点检图片" width="100" enable="false" readonly="true" align="center"/>--%>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
......
......@@ -31,7 +31,7 @@ $(function () {
let template = '';
if (item.companyCode) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ',\''+item.companyCode+'\',\''+item.companyName+'\')" >保养详情</a>';
+ 'onclick="showDetail(' + item.id + ',\''+item.companyCode+'\',\''+item.companyName+'\',\''+item.checkStatus+'\')" >保养详情</a>';
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >审批完成</a>';
......@@ -273,9 +273,9 @@ function updateStatus(id,deviceStatus) {
/**
* 显示详情
*/
function showDetail(id,companyCode,companyName) {
function showDetail(id,companyCode,companyName,checkStatus) {
JSColorbox.open({
href: "HGSB005A?methodName=initLoad&inqu_status-0-parentId=" + id+"&inqu_status-0-companyCode="+companyCode+"&inqu_status-0-companyName="+companyName,
href: "HGSB005A?methodName=initLoad&inqu_status-0-parentId=" + id+"&inqu_status-0-companyCode="+companyCode+"&inqu_status-0-companyName="+companyName+"&inqu_status-0-checkStatus="+checkStatus,
title: "<div style='text-align: center;'>设备保养详情</div>",
width: "80%",
height: "80%",
......
......@@ -23,7 +23,7 @@ $(function () {
let template = '';
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="uploadFile(' + item.id + ')" >附件上传</a>';
+ 'onclick="uploadFile(' + item.id + ')" >附件详情</a>';
}
return template;
......@@ -49,7 +49,7 @@ $(function () {
}
return dataItem["deviceCode"]
}
}, {
}/*, {
field: "docId",
template: function (item) {
let template = '';
......@@ -59,7 +59,7 @@ $(function () {
}
return template;
}
}
}*/
],
exportGrid: {
exportFileName: function (gridInstance) {
......@@ -185,12 +185,13 @@ let save = function (btnNode) {
* @param id
*/
function uploadFile(id) {
let checkStatus = $("#inqu_status-0-checkStatus").val();
JSColorbox.open({
href: "HGSB003A?methodName=initLoad&inqu_status-0-id="+id,
title: "<div style='text-align: center;'>附件上传</div>",
href: "HGSB099?methodName=initLoad&inqu_status-0-matId="+id+"&inqu_status-0-bizType=SB005&inqu_status-0-checkStatus="+checkStatus,
title: "<div style='text-align: center;'>附件详情</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
height: "60%",
//callbackName: uploadFileCallback
});
}
......
......@@ -28,6 +28,7 @@
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="checkItem" cname="检查项" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="parentId" cname="上级ID" colWidth="3" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="checkStatus" cname="审核状态" colWidth="3" type="hidden"/>
</div>
</EF:EFRegion>
......@@ -53,7 +54,7 @@
<EF:EFColumn ename="checkItem" cname="检查项" width="100" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="checkDescrip" cname="检查描述" editType="textarea" width="160" align="center"/>
<EF:EFColumn ename="checkResult" cname="检查结果" editType="textarea" width="160" align="center"/>
<EF:EFColumn ename="docId" cname="点检图片" width="100" enable="false" readonly="true" align="center"/>
<%--<EF:EFColumn ename="docId" cname="点检图片" width="100" enable="false" readonly="true" align="center"/>--%>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
......
......@@ -43,7 +43,7 @@ $(function () {
template: function (item) {
let earlyStatus;
if (!isBlank(item.checkResult.trim()) || !isBlank(item.docId.trim())){
earlyStatus = "<span>已完成</span>";;
earlyStatus = "<span>已完成</span>";
}else if (item.remainderDays == 0){
earlyStatus = "<span style='color: #67c20b'>点检期</span>";
}else if (item.remainderDays < 0){
......
......@@ -55,7 +55,7 @@ function uploadFile(id) {
href: "HGSB003A?methodName=initLoad&inqu_status-0-bizType="+$("#inqu_status-0-bizType").val()+"&inqu_status-0-matId="+$("#inqu_status-0-matId").val(),
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
height: "70%",
callbackName: uploadFileCallback
});
}
......@@ -95,6 +95,11 @@ function deleteFunc() {
message("请先勾选数据!");
return;
}
let checkStatus = $("#inqu_status-0-checkStatus").val();
if (checkStatus==1){
message("审批完成,不能删除!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HGSB099", "delete", true);
......
......@@ -16,6 +16,7 @@
<EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="主表ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="checkStatus" cname="审核状态" colWidth="3" type="hidden"/>
<div class="row">
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3" />
</div>
......
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