MES-PCN设备停机类型+开关班记录+产线与班组+产线与班次关系

tags/yfai-pcn-ext-v1.0
gsz 12 months ago
parent e087cd2d93
commit 529edd19d6

@ -0,0 +1,24 @@
package cn.estsh.i3plus.ext.mes.pcn.api.base;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.mes.bean.MesDowntimeReasonType;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : gsz
* @CreateDate 2024/5/17 14:06
* @Modify:
**/
public interface IMesBasDowntimeReasonTypeService {
/**
*
* @param downtimeReasonType
* @param pager
* @return
*/
List<MesDowntimeReasonType> findMesDowntimeTypeReason(MesDowntimeReasonType downtimeReasonType, Pager pager);
}

@ -0,0 +1,23 @@
package cn.estsh.i3plus.ext.mes.pcn.api.base;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.mes.bean.MesProdShiftRecord;
import io.swagger.annotations.ApiOperation;
/**
* @Description:
* @Author: gsz
* @Date: 2024/5/25 18:16
* @Modify:
*/
public interface IMesProdShiftRecordService {
@ApiOperation(value = "查询开关班记录")
public ListPager<MesProdShiftRecord> queryMesProdShiftRecordByPager(MesProdShiftRecord partInspection, Pager pager);
void insertMesProdShiftRecord(MesProdShiftRecord item, String organizeCode);
void saveMesProdShiftRecord(MesProdShiftRecord item, String organizeCode);
}

@ -0,0 +1,20 @@
package cn.estsh.i3plus.ext.mes.pcn.api.base;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.mes.bean.MesShiftGroupCenterCfg;
import io.swagger.annotations.ApiOperation;
/**
* @Description: 线
* @Author: gsz
* @Date: 2024/5/25 18:16
* @Modify:
*/
public interface IMesShiftGroupCenterCfgService {
@ApiOperation(value = "查询产线与班组的对应关系")
public ListPager<MesShiftGroupCenterCfg> queryMesShiftGroupCenterCfgByPager(MesShiftGroupCenterCfg mesShiftGroupCenterCfg, Pager pager);
}

@ -0,0 +1,21 @@
package cn.estsh.i3plus.ext.mes.pcn.api.base;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.mes.bean.MesShift;
import io.swagger.annotations.ApiOperation;
/**
* @Description: 线
* @Author: gsz
* @Date: 2024/5/25 18:16
* @Modify:
*/
public interface IMesShiftService {
@ApiOperation(value = "查询产线与班次的对应关系")
public ListPager<MesShift> queryMesShiftByPager(MesShift mesShift, Pager pager);
}

@ -0,0 +1,51 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesBasDowntimeReasonTypeService;
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
import cn.estsh.i3plus.pojo.mes.bean.MesDowntimeReasonType;
import cn.estsh.impp.framework.boot.auth.AuthUtil;
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
import cn.estsh.impp.framework.boot.util.ResultBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : gsz
* @CreateDate : 2024-05-17 14:16
* @Modify:
**/
@RestController
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesDowntimeReasonType")
public class MesDowntimeReasonTypeController {
@Autowired
private IMesBasDowntimeReasonTypeService downtimeReasonTypeService;
@GetMapping(value = "/find-downtime-type-reason")
@ApiOperation(value = "查询设备停机类型和原因")
public ResultBean findMesDowntimeTypeReason(MesDowntimeReasonType mesDowntimeReasontype, Pager pager) {
try {
mesDowntimeReasontype.setOrganizeCode(AuthUtil.getOrganizeCode());
//查询汇总工单数量
List<MesDowntimeReasonType> mesDowntimeReasonTypes = downtimeReasonTypeService.findMesDowntimeTypeReason(mesDowntimeReasontype, pager);
return ResultBean.success("查询成功")
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode())
.setListPager(new ListPager<>(mesDowntimeReasonTypes, pager));
} catch (ImppBusiException e) {
return ResultBean.fail(e).build();
} catch (Exception e) {
return ResultBean.fail(e);
}
}
}

@ -0,0 +1,82 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesProdShiftRecordService;
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.mes.bean.MesProdShiftRecord;
import cn.estsh.impp.framework.boot.auth.AuthUtil;
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
import cn.estsh.impp.framework.boot.util.ResultBean;
import cn.estsh.impp.framework.boot.util.ValidatorBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
/**
* @Description:
* @Author: gsz
* @Date: 2024/5/25 18:16
* @Modify:
*/
@RestController
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesProdShiftRecord")
public class MesProdShiftRecordController {
private IMesProdShiftRecordService mesProdShiftRecordService;
@GetMapping("/query-pager")
@ApiOperation(value = "查询开关班记录")
public ResultBean queryMesProdShiftRecordByPager(MesProdShiftRecord mesProdShiftRecord, Pager pager) {
try {
mesProdShiftRecord.setOrganizeCode(AuthUtil.getOrganizeCode());
ListPager<MesProdShiftRecord> partInspectionListPager = mesProdShiftRecordService.queryMesProdShiftRecordByPager(mesProdShiftRecord, pager);
return ResultBean.success("查询成功").setListPager(partInspectionListPager);
} catch (ImppBusiException imppException) {
return ResultBean.fail(imppException);
} catch (Exception e) {
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
@PostMapping("/insert")
@ApiOperation(value = "保存开关班记录")
public ResultBean insertMesProdShiftRecord(@RequestBody MesProdShiftRecord item) {
try {
// 数据校验
ValidatorBean.checkNotNull(item.getOrganizeCode(), "工厂号不能为空");
ValidatorBean.checkNotNull(item.getWorkCenterCode(), "workCenterCode不能为空" );
ValidatorBean.checkNotNull(item.getShiftGroup(), "shiftGroup不能为空");
ValidatorBean.checkNotNull(item.getShiftCode(), "shiftCode不能为空");
mesProdShiftRecordService.insertMesProdShiftRecord(item, AuthUtil.getOrganizeCode());
return ResultBean.success("NC处理成功");
} catch (ImppBusiException imppException) {
return ResultBean.fail(imppException);
} catch (Exception e) {
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
@PostMapping("/update")
@ApiOperation(value = "保存开关班记录")
public ResultBean updateMesProdShiftRecord(@RequestBody MesProdShiftRecord item) {
try {
// 数据校验
ValidatorBean.checkNotNull(item.getOrganizeCode(), "工厂号不能为空");
ValidatorBean.checkNotNull(item.getWorkCenterCode(), "workCenterCode不能为空" );
ValidatorBean.checkNotNull(item.getShiftGroup(), "shiftGroup不能为空");
ValidatorBean.checkNotNull(item.getShiftCode(), "shiftCode不能为空");
mesProdShiftRecordService.saveMesProdShiftRecord(item, AuthUtil.getOrganizeCode());
return ResultBean.success("NC处理成功");
} catch (ImppBusiException imppException) {
return ResultBean.fail(imppException);
} catch (Exception e) {
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
}

@ -0,0 +1,44 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesShiftService;
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.mes.bean.MesShift;
import cn.estsh.impp.framework.boot.auth.AuthUtil;
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
import cn.estsh.impp.framework.boot.util.ResultBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Description: 线
* @Author: gsz
* @Date: 2024/5/25 18:16
* @Modify:
*/
@RestController
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesShift")
public class MesShiftController {
private IMesShiftService mesShiftService;
@GetMapping("/query-pager")
@ApiOperation(value = "产线与班次的对应关系")
public ResultBean queryMesShiftByPager(MesShift mesShift, Pager pager) {
try {
mesShift.setOrganizeCode(AuthUtil.getOrganizeCode());
ListPager<MesShift> partInspectionListPager = mesShiftService.queryMesShiftByPager(mesShift, pager);
return ResultBean.success("查询成功").setListPager(partInspectionListPager);
} catch (ImppBusiException imppException) {
return ResultBean.fail(imppException);
} catch (Exception e) {
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
}

@ -0,0 +1,41 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesShiftGroupCenterCfgService;
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.mes.bean.MesShiftGroupCenterCfg;
import cn.estsh.impp.framework.boot.auth.AuthUtil;
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
import cn.estsh.impp.framework.boot.util.ResultBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
/**
* @Description: 线
* @Author: gsz
* @Date: 2024/5/25 18:16
* @Modify:
*/
@RestController
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesShiftGroupCenterCfg")
public class MesShiftGroupCenterCfgController {
private IMesShiftGroupCenterCfgService mesShiftGroupCenterCfgService;
@GetMapping("/query-pager")
@ApiOperation(value = "产线与班组的对应关系")
public ResultBean queryMesShiftGroupCenterCfgByPager(MesShiftGroupCenterCfg mesShiftGroupCenterCfg, Pager pager) {
try {
mesShiftGroupCenterCfg.setOrganizeCode(AuthUtil.getOrganizeCode());
ListPager<MesShiftGroupCenterCfg> partInspectionListPager = mesShiftGroupCenterCfgService.queryMesShiftGroupCenterCfgByPager(mesShiftGroupCenterCfg, pager);
return ResultBean.success("查询成功").setListPager(partInspectionListPager);
} catch (ImppBusiException imppException) {
return ResultBean.fail(imppException);
} catch (Exception e) {
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
}

@ -0,0 +1,70 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.base;
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesBasDowntimeReasonTypeService;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.base.util.StringUtil;
import cn.estsh.i3plus.pojo.mes.bean.MesDowntimeReason;
import cn.estsh.i3plus.pojo.mes.bean.MesDowntimeReasonType;
import cn.estsh.i3plus.pojo.mes.repository.IMesBasDowntimeReasonRepository;
import cn.estsh.i3plus.pojo.mes.repository.IMesBasDowntimeReasonTypeRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @Description :
* @Reference :
* @Author : gsz
* @CreateDate 2024/5/17 14:06
* @Modify:
**/
@Service
@Slf4j
public class MesBasDowntimeReasonTypeServiceImpl implements IMesBasDowntimeReasonTypeService {
@Autowired
private IMesBasDowntimeReasonRepository downtimeReasonRDao;
@Autowired
private IMesBasDowntimeReasonTypeRepository downtimeReasonTypeRDao;
/**
*
*
* @param downtimeReasonType
* @param pager
* @return
*/
@Override
public List<MesDowntimeReasonType> findMesDowntimeTypeReason(MesDowntimeReasonType downtimeReasonType, Pager pager) {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(downtimeReasonType.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(downtimeReasonType.getReasonTypeCode(), "reasonTypeCode", packBean);
List<MesDowntimeReasonType> downtimeReasonTypeList = downtimeReasonTypeRDao.findByHqlPage(packBean, pager);
if (!CollectionUtils.isEmpty(downtimeReasonTypeList)) {
//查对应原因
List<MesDowntimeReason> mesDowntimeReasonList = downtimeReasonRDao.findByProperty(
new String[]{"organizeCode", "isDeleted", "isValid"},
new Object[]{downtimeReasonType.getOrganizeCode(),
CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue()});
Map<String, List<MesDowntimeReason>> reasonMap = mesDowntimeReasonList.stream().collect(Collectors.groupingBy(MesDowntimeReason::getReasonTypeCode));
for (MesDowntimeReasonType mesDowntimeReasonType : downtimeReasonTypeList) {
if (!StringUtil.isEmpty(reasonMap.get(mesDowntimeReasonType.getReasonTypeCode()))) {
mesDowntimeReasonType.setDowntimeReasonList(reasonMap.get(mesDowntimeReasonType.getReasonTypeCode()));
}
}
}
return downtimeReasonTypeList;
}
}

@ -0,0 +1,79 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.base;
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesProdShiftRecordService;
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.base.common.PagerHelper;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.base.util.StringUtil;
import cn.estsh.i3plus.pojo.mes.bean.MesProdShiftRecord;
import cn.estsh.i3plus.pojo.mes.repository.MesProdShiftRecordRepository;
import cn.estsh.impp.framework.boot.auth.AuthUtil;
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description:
* @Author: gsz
* @Date: 2024/5/21 14:16
* @Modify:
*/
@Service
@Slf4j
public class MesProdShiftRecordServiceImpl implements IMesProdShiftRecordService {
@Autowired
private MesProdShiftRecordRepository mesProdShiftRecordRDao;
@Override
public ListPager<MesProdShiftRecord> queryMesProdShiftRecordByPager(MesProdShiftRecord bean, Pager pager) {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBean);
DdlPreparedPack.getStringEqualPack(bean.getShiftGroup(), "shiftGroup", packBean);
DdlPreparedPack.getStringEqualPack(bean.getShiftCode(), "shiftCode", packBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
pager = PagerHelper.getPager(pager, mesProdShiftRecordRDao.findByHqlWhereCount(packBean));
List<MesProdShiftRecord> resultList = mesProdShiftRecordRDao.findByHqlWherePage(packBean, pager);
return new ListPager<>(resultList, pager);
}
@Override
public void insertMesProdShiftRecord(MesProdShiftRecord item, String organizeCode) {
ConvertBean.serviceModelInitialize(item, AuthUtil.getSessionUser().getUserName());
mesProdShiftRecordRDao.save(item);
}
@Override
public void saveMesProdShiftRecord(MesProdShiftRecord item, String organizeCode) {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(item.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(item.getWorkCenterCode(), "workCenterCode", packBean);
// DdlPreparedPack.getStringEqualPack(item.getShiftGroup(), "shiftGroup", packBean);
// DdlPreparedPack.getStringEqualPack(item.getShiftCode(), "shiftCode", packBean);
MesProdShiftRecord mesProdShiftRecord = mesProdShiftRecordRDao.getByProperty(packBean);
if (StringUtil.isEmpty(mesProdShiftRecord)) {
throw ImppExceptionBuilder.newInstance()
.setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode())
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
.setErrorDetail("开关班记录产线【%s】班组代码【%s】班次代码【%s】不存在请检查数据",
item.getWorkCenterCode(),item.getShiftGroup(),item.getShiftCode())
.build();
}
mesProdShiftRecord.setShiftGroup(item.getShiftGroup());
mesProdShiftRecord.setShiftCode(item.getShiftCode());
ConvertBean.serviceModelUpdate(item, AuthUtil.getSessionUser().getUserName());
mesProdShiftRecordRDao.save(item);
}
}

@ -0,0 +1,46 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.base;
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesShiftGroupCenterCfgService;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.base.common.PagerHelper;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.mes.bean.MesShiftGroupCenterCfg;
import cn.estsh.i3plus.pojo.mes.repository.MesShiftGroupCenterCfgRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description: 线
* @Author: gsz
* @Date: 2024/5/21 14:16
* @Modify:
*/
@Service
@Slf4j
public class MesShiftGroupCenterCfgServiceImpl implements IMesShiftGroupCenterCfgService {
@Autowired
private MesShiftGroupCenterCfgRepository mesShiftGroupCenterCfgRDao;
@Override
public ListPager<MesShiftGroupCenterCfg> queryMesShiftGroupCenterCfgByPager(MesShiftGroupCenterCfg bean, Pager pager) {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBean);
DdlPreparedPack.getStringEqualPack(bean.getShiftGroup(), "shiftGroup", packBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
pager = PagerHelper.getPager(pager, mesShiftGroupCenterCfgRDao.findByHqlWhereCount(packBean));
List<MesShiftGroupCenterCfg> resultList = mesShiftGroupCenterCfgRDao.findByHqlWherePage(packBean, pager);
return new ListPager<>(resultList, pager);
}
}

@ -0,0 +1,46 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.base;
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesShiftService;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.base.common.PagerHelper;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.mes.bean.MesShift;
import cn.estsh.i3plus.pojo.mes.repository.MesShiftRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description: 线
* @Author: gsz
* @Date: 2024/5/21 14:16
* @Modify:
*/
@Service
@Slf4j
public class MesShiftServiceImpl implements IMesShiftService {
@Autowired
private MesShiftRepository mesShiftRepository;
@Override
public ListPager<MesShift> queryMesShiftByPager(MesShift bean, Pager pager) {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBean);
DdlPreparedPack.getStringEqualPack(bean.getShiftCode(), "shiftCode", packBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
pager = PagerHelper.getPager(pager, mesShiftRepository.findByHqlWhereCount(packBean));
List<MesShift> resultList = mesShiftRepository.findByHqlWherePage(packBean, pager);
return new ListPager<>(resultList, pager);
}
}
Loading…
Cancel
Save