MES设备数据查询报表-增加“日志类型名称”、“更新时间”、“更新人”

tags/yfai-mes-ext-v1.0
logic.fang 11 months ago
parent b664e74e37
commit 057a9f2f2f

@ -36,7 +36,8 @@ public class MesYfReportDaoImpl implements IMesYfReportDao {
dataQuerySql.append("select new ")
.append(MesDeviceDataQueryReportResultModel.class.getName())
.append("(organizeCode, workCenterCode, workCellCode, workOrderNo, serialNumber, ")
.append("logType, message, errorType, equipmentCode, equipmentName, createDatetime, createUser) ");
.append("logType, message, errorType, equipmentCode, equipmentName, createDatetime, createUser, " +
"modifyDatetime, modifyUser) ");
countQuerySql.append("select count(1) ");
commonQuerySql.append("from MesWorkCellScanMonitorLog " +
"where isValid = :isValid and isDeleted = :isDeleted and organizeCode = :organizeCode " +

@ -18,6 +18,7 @@ import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn;
import cn.estsh.i3plus.pojo.mes.repository.MesProdRuleNoSortCfgRepository;
import cn.estsh.i3plus.pojo.mes.repository.MesProdRuleSortCfgRepository;
import cn.estsh.i3plus.pojo.mes.repository.MesProduceSnRepository;
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
import cn.estsh.impp.framework.boot.util.ResultBean;
import jodd.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
@ -49,7 +50,13 @@ public class MesYfReportServiceImpl implements IMesYfReportService {
@Override
public ListPager<MesDeviceDataQueryReportResultModel> queryMesDeviceDataByPager(MesDeviceDataQueryReportConditionModel queryReportModel, Pager pager) {
return mesYfReportDao.queryMesDeviceDataByPager(queryReportModel, pager);
ListPager<MesDeviceDataQueryReportResultModel> mesDeviceDataQueryReportResultModelListPager =
mesYfReportDao.queryMesDeviceDataByPager(queryReportModel, pager);
List<MesDeviceDataQueryReportResultModel> objectList = mesDeviceDataQueryReportResultModelListPager.getObjectList();
for (MesDeviceDataQueryReportResultModel model : objectList) {
model.setLogTypeName(MesExtEnumUtil.LOG_TYPE.valueOfDescription(model.getLogType()));
}
return new ListPager<>(objectList, mesDeviceDataQueryReportResultModelListPager.getObjectPager());
}
@Override

@ -18,9 +18,6 @@ public class MesDeviceDataQueryReportConditionModel {
@ApiParam(value = "组织代码")
private String organizeCode;
/**
*
*/
@ApiParam(value = "工作中心(产线)")
private String workCenterCode;

@ -1,5 +1,6 @@
package cn.estsh.i3plus.ext.mes.pojo.model.report;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -15,46 +16,70 @@ import lombok.Data;
@ApiModel("设备数据查询报表-查询结果封装")
public class MesDeviceDataQueryReportResultModel {
@ApiParam(value = "ERP工厂号组织代码")
@ApiParam(value = "ERP工厂号")
@AnnoOutputColumn(name = "ERP工厂号")
private String organizeCode;
@ApiParam(value = "工作中心(产线)")
@ApiParam(value = "产线")
@AnnoOutputColumn(name = "产线")
private String workCenterCode;
@ApiParam(value = "工作单元代码(工位)")
@ApiParam(value = "工位代码")
@AnnoOutputColumn(name = "工位代码")
private String workCellCode;
@ApiParam(value = "生产工单号(工单)")
@ApiParam(value = "工单")
@AnnoOutputColumn(name = "工单")
private String workOrderNo;
@ApiParam(value = "过程条码(主条码)")
@ApiParam(value = "主条码")
@AnnoOutputColumn(name = "主条码")
private String serialNumber;
@ApiParam(value = "日志类型")
private Integer logType;
@ApiParam(value = "日志类型名称")
@AnnoOutputColumn(name = "日志类型名称")
private String logTypeName;
@ApiParam(value = "日志内容")
@AnnoOutputColumn(name = "日志内容")
private String message;
@ApiParam(value = "错误类型")
@AnnoOutputColumn(name = "错误类型")
private String errorType;
@ApiParam(value = "设备代码(设备编号)")
@ApiParam(value = "设备编号")
@AnnoOutputColumn(name = "设备编号")
private String equipmentCode;
@ApiParam(value = "设备名称")
@AnnoOutputColumn(name = "设备名称")
private String equipmentName;
@ApiParam(value = "创建时间")
@AnnoOutputColumn(name = "创建时间")
private String createDatetime;
@ApiParam(value = "创建人")
@AnnoOutputColumn(name = "创建人")
private String createUser;
@ApiParam(value = "更新时间")
@AnnoOutputColumn(name = "更新时间")
private String modifyDatetime;
@ApiParam(value = "更新人")
@AnnoOutputColumn(name = "更新人")
private String modifyUser;
public MesDeviceDataQueryReportResultModel(String organizeCode, String workCenterCode, String workCellCode,
String workOrderNo, String serialNumber, Integer logType, String message,
String errorType, String equipmentCode, String equipmentName,
String createDatetime, String createUser) {
String workOrderNo, String serialNumber, Integer logType,
String message, String errorType, String equipmentCode,
String equipmentName, String createDatetime, String createUser,
String modifyDatetime, String modifyUser) {
this.organizeCode = organizeCode;
this.workCenterCode = workCenterCode;
this.workCellCode = workCellCode;
@ -67,5 +92,8 @@ public class MesDeviceDataQueryReportResultModel {
this.equipmentName = equipmentName;
this.createDatetime = createDatetime;
this.createUser = createUser;
this.modifyDatetime = modifyDatetime;
this.modifyUser = modifyUser;
}
}

Loading…
Cancel
Save