From b1f48133eda26d7ccf838167519cf8b299fbe140 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期三, 25 九月 2024 10:30:02 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/enums/ItemIncreaseCodeEnum.java | 2 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmSequenceNumService.java | 12 ++++ iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java | 17 ++--- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/vo/MmPredictItemRespVO.java | 3 + iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmSequenceNumServiceImpl.java | 33 +++++++++++ iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/entity/MmSequenceNumEntity.java | 4 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmResultTableServiceImpl.java | 2 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmModelResultstrServiceImpl.java | 3 /dev/null | 33 ----------- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemTypeImpl.java | 3 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java | 33 +++++++++- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/dao/MmSequenceNumDao.java | 4 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmPredictItemService.java | 8 -- iailab-module-model/iailab-module-model-biz/src/main/resources/application.yml | 1 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java | 14 ++-- 15 files changed, 103 insertions(+), 69 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java index ad84b34..20a6779 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java @@ -20,7 +20,7 @@ import com.iailab.module.data.point.service.DaPointService; import com.iailab.module.data.point.service.DaSequenceNumService; import com.iailab.module.data.point.vo.DaPointPageReqVO; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.ObjectUtils; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -74,19 +74,18 @@ @Override public List<DaPointDTO> list(Map<String, Object> params) { - String page = (String) params.get("page"); - String limit = (String) params.get("limit"); - String pointType = (String)params.get("pointType"); + Object page = params.get("page"); + Object limit = params.get("limit"); + Object pointType = params.get("pointType"); List<String> pointNos = new ArrayList<>(); if (params.get("pointNos") != null) { pointNos = JSONArray.parseArray(JSONArray.toJSONString(params.get("pointNos")), String.class); } - String pointNoLike = (String)params.get("pointNoLike"); + Object pointNoLike = params.get("pointNoLike"); QueryWrapper<DaPointEntity> queryWrapper = new QueryWrapper(); - queryWrapper.eq(StringUtils.isNotBlank(pointType), "point_type", pointType) - .in(!CollectionUtils.isEmpty(pointNos),"point_no", pointNos) - .like(StringUtils.isNotBlank(pointNoLike), "point_no", pointNoLike) - .last("limit 1, 10"); + queryWrapper.eq(!ObjectUtils.isEmpty(pointType), "point_type", pointType); + queryWrapper.in(pointNos.size() != 0,"point_no", pointNos); + queryWrapper.like(!ObjectUtils.isEmpty(pointNoLike), "point_no", pointNoLike); List<DaPointEntity> list = daPointDao.selectList(queryWrapper); return ConvertUtils.sourceToTarget(list, DaPointDTO.class); } diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java index bf58c85..06590e6 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java @@ -5,8 +5,13 @@ import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.util.object.BeanUtils; import com.iailab.module.model.mcs.pre.dto.MmPredictItemDTO; +import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity; +import com.iailab.module.model.mcs.pre.entity.MmItemTypeEntity; import com.iailab.module.model.mcs.pre.entity.MmPredictItemEntity; +import com.iailab.module.model.mcs.pre.service.MmItemOutputService; +import com.iailab.module.model.mcs.pre.service.MmItemTypeService; import com.iailab.module.model.mcs.pre.service.MmPredictItemService; +import com.iailab.module.model.mcs.pre.service.MmResultTableService; import com.iailab.module.model.mcs.pre.vo.CountItemtypeVO; import com.iailab.module.model.mcs.pre.vo.MmPredictItemPageReqVO; import com.iailab.module.model.mcs.pre.vo.MmPredictItemRespVO; @@ -19,7 +24,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.UUID; import static com.iailab.framework.common.pojo.CommonResult.success; @@ -34,6 +38,15 @@ @Autowired private MmPredictItemService mmPredictItemService; + @Autowired + private MmItemTypeService mmItemTypeService; + + @Autowired + private MmItemOutputService mmItemOutputService; + + @Autowired + private MmResultTableService mmResultTableService; + /** * 预测项列表 */ @@ -41,13 +54,23 @@ @PreAuthorize("@ss.hasPermission('model:pre-predict:query')") public CommonResult<PageResult<MmPredictItemRespVO>> page(@Validated MmPredictItemPageReqVO reqVO) { PageResult<MmPredictItemEntity> page = mmPredictItemService.queryPage(reqVO); - return success(BeanUtils.toBean(page, MmPredictItemRespVO.class)); + PageResult<MmPredictItemRespVO> result = BeanUtils.toBean(page, MmPredictItemRespVO.class); + for (MmPredictItemRespVO item : result.getList()){ + + MmItemTypeEntity mmItemTypeEntity = mmItemTypeService.info(item.getItemtypeid()); + item.setItemtypename(mmItemTypeEntity== null ? "" :mmItemTypeEntity.getItemtypename()); + + MmItemOutputEntity mmItemOutputEntity = mmItemOutputService.getByItemid(item.getId()); + item.setTagname(mmItemOutputEntity== null ? "" :mmItemOutputEntity.getTagname()); + item.setResulttableid(mmItemOutputEntity== null ? "" :mmItemOutputEntity.getResulttableid()); + item.setTablename(item == null ? "" : mmResultTableService.info(item.getResulttableid()).getTablename()); + } + return success(result); } @GetMapping("/list") - @PreAuthorize("@ss.hasPermission('model:pre-predict:query')") - public CommonResult<List<MmPredictItemEntity>> list(@RequestParam Map<String, Object> params) { - List<MmPredictItemEntity> list = mmPredictItemService.list(params); + public CommonResult<List<MmPredictItemEntity>> list() { + List<MmPredictItemEntity> list = mmPredictItemService.list(); return success(list); } diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/dao/SequenceNumDao.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/dao/MmSequenceNumDao.java similarity index 67% rename from iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/dao/SequenceNumDao.java rename to iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/dao/MmSequenceNumDao.java index 82bb1e1..314e98d 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/dao/SequenceNumDao.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/dao/MmSequenceNumDao.java @@ -2,7 +2,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.iailab.framework.tenant.core.db.dynamic.TenantDS; -import com.iailab.module.model.mcs.pre.entity.SequenceNumEntity; +import com.iailab.module.model.mcs.pre.entity.MmSequenceNumEntity; import org.apache.ibatis.annotations.Mapper; /** @@ -11,5 +11,5 @@ */ @TenantDS @Mapper -public interface SequenceNumDao extends BaseMapper<SequenceNumEntity> { +public interface MmSequenceNumDao extends BaseMapper<MmSequenceNumEntity> { } diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/entity/SequenceNumEntity.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/entity/MmSequenceNumEntity.java similarity index 90% rename from iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/entity/SequenceNumEntity.java rename to iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/entity/MmSequenceNumEntity.java index 92c3d99..c2be0de 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/entity/SequenceNumEntity.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/entity/MmSequenceNumEntity.java @@ -13,8 +13,8 @@ * @date 2021年05月06日 12:00 */ @Data -@TableName("T_SEQUENCE_NUM") -public class SequenceNumEntity implements Serializable { +@TableName("T_MM_SEQUENCE_NUM") +public class MmSequenceNumEntity implements Serializable { private static final long serialVersionUID = 1L; /** diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/enums/ItemIncreaseCodeEnum.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/enums/ItemIncreaseCodeEnum.java index bddb2da..bc6ba5c 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/enums/ItemIncreaseCodeEnum.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/enums/ItemIncreaseCodeEnum.java @@ -6,5 +6,5 @@ * @createTime 2024年01月02日 16:19:00 */ public enum ItemIncreaseCodeEnum { - PRE_MDL, CM, IC, IM + PRE_MDL, CM, IC, IM,POINT_C,POINT_M,POINT_T } diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmPredictItemService.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmPredictItemService.java index 688c34a..1a5dd19 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmPredictItemService.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmPredictItemService.java @@ -1,19 +1,13 @@ package com.iailab.module.model.mcs.pre.service; -import com.iailab.framework.common.page.PageData; import com.iailab.framework.common.pojo.PageResult; -import com.iailab.framework.common.service.BaseService; import com.iailab.module.model.mcs.pre.dto.MmPredictItemDTO; import com.iailab.module.model.mcs.pre.entity.MmPredictItemEntity; 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 javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.util.List; -import java.util.Map; /** * @author PanZhibao @@ -41,5 +35,5 @@ void update(MmPredictItemDTO mmPredictItemDTO); - List<MmPredictItemEntity> list(Map<String, Object> params); + List<MmPredictItemEntity> list(); } diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmSequenceNumService.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmSequenceNumService.java new file mode 100644 index 0000000..3583d1d --- /dev/null +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmSequenceNumService.java @@ -0,0 +1,12 @@ +package com.iailab.module.model.mcs.pre.service; + +import com.iailab.module.model.mcs.pre.entity.MmSequenceNumEntity; + +/** + * @author PanZhibao + * @date 2021年05月06日 13:15 + */ +public interface MmSequenceNumService { + + MmSequenceNumEntity getAndIncreaseByCode(String code); +} diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/SequenceNumService.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/SequenceNumService.java deleted file mode 100644 index caa69f6..0000000 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/SequenceNumService.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.iailab.module.model.mcs.pre.service; - -import com.iailab.module.model.mcs.pre.entity.SequenceNumEntity; - -/** - * @author PanZhibao - * @date 2021年05月06日 13:15 - */ -public interface SequenceNumService{ - - SequenceNumEntity getAndIncreaseByCode(String code); -} diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemTypeImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemTypeImpl.java index 5258d78..ed43322 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemTypeImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemTypeImpl.java @@ -6,6 +6,7 @@ import com.iailab.framework.common.service.impl.BaseServiceImpl; import com.iailab.framework.common.util.collection.CollectionUtils; import com.iailab.module.model.mcs.pre.dao.MmItemTypeDao; +import com.iailab.module.model.mcs.pre.entity.DmModuleItemEntity; import com.iailab.module.model.mcs.pre.entity.MmItemTypeEntity; import com.iailab.module.model.mcs.pre.service.MmItemTypeService; import com.iailab.module.model.mcs.pre.vo.MmItemTypePageReqVO; @@ -74,6 +75,6 @@ @Override public List<MmItemTypeEntity> list(Map<String, Object> params) { - return Collections.emptyList(); + return mmItemTypeDao.selectList(new QueryWrapper<>()); } } diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmModelResultstrServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmModelResultstrServiceImpl.java index 7aaf512..9315e71 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmModelResultstrServiceImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmModelResultstrServiceImpl.java @@ -1,5 +1,6 @@ package com.iailab.module.model.mcs.pre.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.service.impl.BaseServiceImpl; @@ -38,6 +39,6 @@ @Override public List<MmModelResultstrEntity> list(Map<String, Object> params) { - return Collections.emptyList(); + return mmModelResultstrDao.selectList(new QueryWrapper<>()); } } 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..e8fc098 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 @@ -10,7 +10,7 @@ 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.mdk.vo.ItemVO; import com.iailab.module.model.mdk.vo.MergeItemVO; @@ -50,7 +50,7 @@ private MmItemTypeImpl mmItemTypeImpl; @Autowired - private SequenceNumService sequenceNumService; + private MmSequenceNumService sequenceNumService; @Autowired private MmPredictItemDao mmPredictItemDao; @@ -71,8 +71,8 @@ // } @Override - public List<MmPredictItemEntity> list(Map<String, Object> params) { - return Collections.emptyList(); + public List<MmPredictItemEntity> list() { + return mmPredictItemDao.selectList(new QueryWrapper<>()); } @Override @@ -84,12 +84,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 +107,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); diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmResultTableServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmResultTableServiceImpl.java index a3b54e7..ba9b6c3 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmResultTableServiceImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmResultTableServiceImpl.java @@ -37,7 +37,7 @@ @Override public List<MmResultTableEntity> list(Map<String, Object> params) { - return Collections.emptyList(); + return mmResultTableDao.selectList(new QueryWrapper<>()); } @Override diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmSequenceNumServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmSequenceNumServiceImpl.java new file mode 100644 index 0000000..c36ab21 --- /dev/null +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmSequenceNumServiceImpl.java @@ -0,0 +1,33 @@ +package com.iailab.module.model.mcs.pre.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.iailab.module.model.mcs.pre.dao.MmSequenceNumDao; +import com.iailab.module.model.mcs.pre.entity.MmSequenceNumEntity; +import com.iailab.module.model.mcs.pre.service.MmSequenceNumService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * @author PanZhibao + * @date 2021年05月06日 13:20 + */ +@Service +public class MmSequenceNumServiceImpl extends ServiceImpl<MmSequenceNumDao, MmSequenceNumEntity> implements MmSequenceNumService { + + @Autowired + private MmSequenceNumDao mmSequenceNumDao; + + @Override + public synchronized MmSequenceNumEntity getAndIncreaseByCode (String code) { + QueryWrapper queryWrapper = new QueryWrapper<MmSequenceNumEntity>(); + queryWrapper.eq("code", code); + MmSequenceNumEntity mmSequenceNumEntity = mmSequenceNumDao.selectOne(queryWrapper); + + MmSequenceNumEntity mmSequenceNumUpdate = new MmSequenceNumEntity(); + mmSequenceNumUpdate.setId(mmSequenceNumEntity.getId()); + mmSequenceNumUpdate.setSequenceNum(mmSequenceNumEntity.getSequenceNum() + 1); + mmSequenceNumDao.updateById(mmSequenceNumUpdate); + return mmSequenceNumEntity; + } +} diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/SequenceNumServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/SequenceNumServiceImpl.java deleted file mode 100644 index 958ea5a..0000000 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/SequenceNumServiceImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.iailab.module.model.mcs.pre.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.iailab.module.model.mcs.pre.dao.SequenceNumDao; -import com.iailab.module.model.mcs.pre.entity.SequenceNumEntity; -import com.iailab.module.model.mcs.pre.service.SequenceNumService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * @author PanZhibao - * @date 2021年05月06日 13:20 - */ -@Service -public class SequenceNumServiceImpl extends ServiceImpl<SequenceNumDao, SequenceNumEntity> implements SequenceNumService { - - @Autowired - private SequenceNumDao sequenceNumDao; - - @Override - public synchronized SequenceNumEntity getAndIncreaseByCode (String code) { - QueryWrapper queryWrapper = new QueryWrapper<SequenceNumEntity>(); - queryWrapper.eq("code", code); - SequenceNumEntity sequenceNumEntity = sequenceNumDao.selectOne(queryWrapper); - - SequenceNumEntity sequenceNumUpdate = new SequenceNumEntity(); - sequenceNumUpdate.setId(sequenceNumEntity.getId()); - sequenceNumUpdate.setSequenceNum(sequenceNumEntity.getSequenceNum() + 1); - sequenceNumDao.updateById(sequenceNumUpdate); - return sequenceNumEntity; - } -} diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/vo/MmPredictItemRespVO.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/vo/MmPredictItemRespVO.java index ccdf7b6..5eeae05 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/vo/MmPredictItemRespVO.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/vo/MmPredictItemRespVO.java @@ -2,11 +2,13 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; +import com.iailab.module.model.mcs.pre.entity.*; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; +import java.util.List; /** * @author PanZhibao @@ -81,5 +83,6 @@ @Schema(description = "存放表") @ExcelProperty("存放表") private String tablename; + } diff --git a/iailab-module-model/iailab-module-model-biz/src/main/resources/application.yml b/iailab-module-model/iailab-module-model-biz/src/main/resources/application.yml index 0c290c1..9bed179 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/resources/application.yml +++ b/iailab-module-model/iailab-module-model-biz/src/main/resources/application.yml @@ -195,6 +195,7 @@ - t_mm_item_accuracy_rate - t_mm_predict_alarm_config - t_mm_predict_alarm_message + - t_mm_sequence_num - t_st_schedule_scheme - t_st_schedule_model - t_st_schedule_model_param -- Gitblit v1.9.3