Commit ffe45f56 by liuyang

2024-05-14 设备台账详情

parent 7e92ce00
package com.baosight.hggp.hg.sb.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.sb.domain.HGSB001;
import com.baosight.hggp.hg.sb.domain.HGSB001A;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiBlockMeta;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
/**
* @author LiuYang
* @version 1.0 2024/5/14
*/
public class ServiceHGSB001A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
EiBlock queryBlock = inInfo.getBlock(EiConstant.queryBlock);
queryBlock.setCell(ACConstants.ROW_CODE_0, HGSB001.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
//queryBlock.set(EiConstant.offsetStr,EiConstant.defaultOffset);
//queryBlock.set(EiConstant.limitStr,EiConstant.defaultLimit);
//EiBlock resultBlock = new EiBlock(EiConstant.resultBlock);
//resultBlock.set(EiConstant.isCountFlag,true);
//inInfo.setBlock(resultBlock);
inInfo = super.query(inInfo, HGSB001A.RESULT_QUERY, new HGSB001A(),false, new EiBlockMeta(),EiConstant.queryBlock,EiConstant.resultBlock,EiConstant.resultBlock,"resultCount");
EiInfo eiInfo = super.query(inInfo, HGSB001A.DETAIL_QUERY, new HGSB001A(), false, new EiBlockMeta(), EiConstant.queryBlock, CommonConstant.Field.DETAIL, CommonConstant.Field.DETAIL, "HGSB001A.detailCount");
inInfo.setBlock(eiInfo.getBlock(CommonConstant.Field.DETAIL));
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.USER_BLOCK_ID,DdynamicEnum.GROUP_CODE_BOX_BLOCK_ID),null
);
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
EiBlock block = inInfo.getBlock(EiConstant.queryBlock);
block.setCell(ACConstants.ROW_CODE_0, HGSB001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGSB001A.RESULT_QUERY, new HGSB001A(),false, new EiBlockMeta(),EiConstant.queryBlock,EiConstant.resultBlock,EiConstant.resultBlock,"HGSB001A.resultCount");
//queryDetail(inInfo);
return inInfo;
}
/**
* 设备保养
* @param inInfo 参数对象
*/
public EiInfo queryDetail (EiInfo inInfo){
/*HGSB001A hgsb001A = new HGSB001A();
EiBlock block = inInfo.getBlock(EiConstant.queryBlock);
EiBlock detail = inInfo.getBlock(CommonConstant.Field.DETAIL);
if (detail == null) {
detail = new EiBlock(CommonConstant.Field.DETAIL);
}
Map params = block.getRow(ACConstants.ROW_CODE_0);
Integer offset = detail.getString(EiConstant.offsetStr)==null?0:Integer.parseInt(block.getString(EiConstant.offsetStr));
Integer limit = detail.getString(EiConstant.limitStr)==null?10:Integer.parseInt(block.getString(EiConstant.limitStr));
List<HGSB001A> list = this.dao.query(HGSB001A.DETAIL_QUERY,params,offset,limit);
detail.addBlockMeta(hgsb001A.eiMetadata);
detail.setRows(list);
detail.set(EiConstant.offsetStr,offset);
detail.set(EiConstant.limitStr, limit);
detail.set(EiConstant.countStr,list.size());
inInfo.setBlock(detail);*/
EiBlock block = inInfo.getBlock(EiConstant.queryBlock);
block.setCell(ACConstants.ROW_CODE_0, HGSB001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGSB001A.DETAIL_QUERY, new HGSB001A(), false, new EiBlockMeta(), EiConstant.queryBlock, CommonConstant.Field.DETAIL, CommonConstant.Field.DETAIL, "HGSB001A.detailCount");
}
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/5/14
Time: 11:07
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<EF:EFPage title="设备台账详情">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" readonly="true" filter="contains">
<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="设备区域" readonly="true" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="deviceType" cname="设备类型" readonly="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpsb.deviceType"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceName" cname="设备名称" readonly="true" placeholder="模糊查询" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="inspecDate" cname="点检日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="upkeepDate" cname="保养日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="点检记录">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="inspecDate" cname="点检日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="inspecCode" cname="点检单号" width="100" enable="false" readonly="true" align="center" required="true"/>
<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 cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="detail" title="保养记录">
<EF:EFGrid blockId="detail" autoDraw="override" isFloat="true" queryMethod="queryDetail">
<EF:EFColumn ename="upkeepDate" cname="保养日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="upkeepCode" cname="保养单号" width="100" enable="false" readonly="true" align="center" required="true"/>
<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 cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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