From a97b38655411a84660037a9014d309657316c467 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期四, 26 九月 2024 14:41:18 +0800 Subject: [PATCH] 预测项列表 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java | 32 +++++++++++++------------------- 1 files changed, 13 insertions(+), 19 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java index 4a44fde..d229a5a 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java @@ -1,6 +1,7 @@ package com.iailab.module.model.mcs.pre.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.util.object.BeanUtils; @@ -10,8 +11,9 @@ import com.iailab.module.model.mcs.pre.enums.ItemIncreaseCodeEnum; import com.iailab.module.model.mcs.pre.enums.ItemTypeEnum; import com.iailab.module.model.mcs.pre.service.MmPredictItemService; -import com.iailab.module.model.mcs.pre.service.SequenceNumService; +import com.iailab.module.model.mcs.pre.service.MmSequenceNumService; import com.iailab.module.model.mcs.pre.vo.MmPredictItemPageReqVO; +import com.iailab.module.model.mcs.pre.vo.MmPredictItemRespVO; import com.iailab.module.model.mdk.vo.ItemVO; import com.iailab.module.model.mdk.vo.MergeItemVO; import org.apache.commons.lang3.StringUtils; @@ -50,29 +52,21 @@ private MmItemTypeImpl mmItemTypeImpl; @Autowired - private SequenceNumService sequenceNumService; + private MmSequenceNumService sequenceNumService; @Autowired private MmPredictItemDao mmPredictItemDao; @Override - public PageResult<MmPredictItemEntity> queryPage(MmPredictItemPageReqVO reqVO) { - return mmPredictItemDao.selectPage(reqVO); + public PageResult<MmPredictItemRespVO> queryPage(MmPredictItemPageReqVO reqVO) { + IPage<MmPredictItemRespVO> page = mmPredictItemDao.selectPage(reqVO); + + return new PageResult<MmPredictItemRespVO>(page.getRecords(), page.getTotal()); } -// @Override -// public void add(MmPredictItemEntity mmPredictItemEntity) { -// mmPredictItemDao.insert(mmPredictItemEntity); -// } - -// @Override -// public void update(MmPredictItemEntity mmPredictItemEntity) { -// mmPredictItemDao.updateById(mmPredictItemEntity); -// } - @Override - public List<MmPredictItemEntity> list(Map<String, Object> params) { - return Collections.emptyList(); + public List<MmPredictItemRespVO> list(Map<String, Object> params) { + return mmPredictItemDao.queryList(params); } @Override @@ -84,12 +78,12 @@ MmItemTypeEntity itemType = mmItemTypeImpl.getById(predictItem.getItemtypeid()); if (itemType != null && ItemTypeEnum.NORMAL_ITEM.getName().equals(itemType.getItemtypename())) { - SequenceNumEntity sequenceNumEntity = sequenceNumService.getAndIncreaseByCode(ItemIncreaseCodeEnum.IM.toString()); + MmSequenceNumEntity sequenceNumEntity = sequenceNumService.getAndIncreaseByCode(ItemIncreaseCodeEnum.IM.toString()); String str = String.format("%010d", sequenceNumEntity.getSequenceNum()); predictItem.setItemno(sequenceNumEntity.getPrefix() + str); MmPredictModelEntity mmPredictModel = mmPredictItemDto.getMmPredictModel(); - SequenceNumEntity preMdlSequenceNumEntity = sequenceNumService.getAndIncreaseByCode(ItemIncreaseCodeEnum.PRE_MDL.toString()); + MmSequenceNumEntity preMdlSequenceNumEntity = sequenceNumService.getAndIncreaseByCode(ItemIncreaseCodeEnum.PRE_MDL.toString()); String preMdlStr = String.format("%04d", preMdlSequenceNumEntity.getSequenceNum()); mmPredictModel.setModelno(preMdlSequenceNumEntity.getPrefix() + preMdlStr); mmPredictModel.setItemid(predictItem.getId()); @@ -107,7 +101,7 @@ }); mmModelParamService.saveList(mmModelParamList); } else if (itemType != null && ItemTypeEnum.MERGE_ITEM.getName().equals(itemType.getItemtypename())) { - SequenceNumEntity sequenceNumEntity = sequenceNumService.getAndIncreaseByCode(ItemIncreaseCodeEnum.IC.toString()); + MmSequenceNumEntity sequenceNumEntity = sequenceNumService.getAndIncreaseByCode(ItemIncreaseCodeEnum.IC.toString()); String str = String.format("%010d", sequenceNumEntity.getSequenceNum()); predictItem.setItemno(sequenceNumEntity.getPrefix() + str); -- Gitblit v1.9.3