Commit 0b77910d by wancheng

日志查询

parent 3891d88f
...@@ -184,8 +184,23 @@ public enum DdynamicEnum { ...@@ -184,8 +184,23 @@ public enum DdynamicEnum {
* 用途:物料清单部件类型 耗材 零件 部件 * 用途:物料清单部件类型 耗材 零件 部件
* 编写:ly * 编写:ly
*/ */
CODESET_CODE_BLOCK_ID("codeset_code_block_id","itemCode","itemCname","HPSC002.querySmallCode"); CODESET_CODE_BLOCK_ID("codeset_code_block_id","itemCode","itemCname","HPSC002.querySmallCode"),
/**
* 模块:日志管理
* 用途:日志查询
* 编写:wan
*/
OPER_MODUL_BLOCK_ID("oper_modul_block_id","operModul","operModul","HPRZ001.queryOperModulComboBox"),
/**
* 模块:日志管理
* 用途:日志查询
* 编写:wan
*/
OPER_TYPE_BLOCK_ID("oper_type_block_id","operType","operType","HPRZ001.queryOperTypeComboBox");
/** 将结果集放入的块名 */ /** 将结果集放入的块名 */
private final String blockId; private final String blockId;
/** 字段名 */ /** 字段名 */
......
package com.baosight.hpjx.hp.rz.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.rz.domian.HPRZ001;
import com.baosight.hpjx.util.*;
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 org.apache.commons.collections.MapUtils;
import java.math.BigDecimal;
import java.util.*;
/**
* @author YK
* @date 2024年01月09日 10:18
*/
public class ServiceHPRZ001 extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode()};
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
Map queryMap = new HashMap();
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_RECORD_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.OPER_MODUL_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.OPER_TYPE_BLOCK_ID), queryMap);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPRZ001().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPRZ001.QUERY, new HPRZ001());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 查询操作模块下拉框
*
* @param inInfo
* @return
*/
public EiInfo queryOperModulComboBox(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put("companyCode", UserSessionUtils.getCompanyCode());
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.OPER_MODUL_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, queryMap);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询企业失败");
}
return inInfo;
}
/**
* 查询操作类型下拉框
*
* @param inInfo
* @return
*/
public EiInfo queryOperTypeComboBox(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put("companyCode", UserSessionUtils.getCompanyCode());
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.OPER_TYPE_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, queryMap);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询企业失败");
}
return inInfo;
}
}
let whNameGlobalData = [];
let inventNameGlobalData = [];
let inventAllGlobalData = [];
$(function() {
IPLATUI.EFGrid = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
}
// 查询
$("#QUERY").on("click", query);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 仓库名称
/* let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [1, 2]);
EiCommunicator.send("HPPZ007", "queryComboBox", inInfo, {
onSuccess: function (ei) {
whNameGlobalData = ei.getBlock("wh_record_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
// 存货名称
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
// 规格
EiCommunicator.send("HPPZ006", "queryComboBoxAll", inInfo, {
onSuccess: function (ei) {
inventAllGlobalData = ei.getBlock("invent_all_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});*/
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="日志查询">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect cname="企业编码" ename="inqu_status-0-companyCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput cname="创建人名称" ename="inqu_status-0-createdName" colWidth="3"/>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyyMMdd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>
<div class="row">
<EF:EFSelect cname="操作模块" ename="inqu_status-0-operModul" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="oper_modul_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="操作类型" ename="inqu_status-0-operType" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="oper_type_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="主键id" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" enable="false" readonly="true" width="100" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人名称" enable="false" readonly="true" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" readonly="true" width="120" align="center"/>
<EF:EFColumn ename="operModul" cname="操作模块" enable="false" readonly="true" width="100" align="center"/>
<EF:EFColumn ename="operType" cname="操作类型" enable="false" readonly="true" width="80" align="center"/>
<EF:EFColumn ename="operDesc" cname="操作说明" enable="false" readonly="true" width="100" align="center"/>
<EF:EFColumn ename="operContent" cname="操作内容" enable="false" readonly="true" width="800" align="center"/>
</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