From 4be7d863a161b64f8592a789d699e807545e7dc6 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期五, 15 十一月 2024 16:46:12 +0800
Subject: [PATCH] 计划数据

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/plan/item/service/impl/PlanItemServiceImpl.java |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/plan/item/service/impl/PlanItemServiceImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/plan/item/service/impl/PlanItemServiceImpl.java
index c3740dd..6b89b39 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/plan/item/service/impl/PlanItemServiceImpl.java
+++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/plan/item/service/impl/PlanItemServiceImpl.java
@@ -4,21 +4,18 @@
 import com.iailab.framework.common.pojo.PageResult;
 import com.iailab.framework.common.service.impl.BaseServiceImpl;
 import com.iailab.framework.common.util.object.BeanUtils;
-import com.iailab.module.data.ind.item.dao.IndItemDao;
-import com.iailab.module.data.ind.item.entity.IndItemEntity;
-import com.iailab.module.data.ind.item.service.IndItemService;
-import com.iailab.module.data.ind.item.vo.IndItemPageReqVO;
-import com.iailab.module.data.ind.item.vo.IndItemSaveReqVO;
 import com.iailab.module.data.plan.item.dao.PlanItemDao;
 import com.iailab.module.data.plan.item.entity.PlanItemEntity;
 import com.iailab.module.data.plan.item.service.PlanItemService;
+import com.iailab.module.data.plan.item.vo.PlanItemDataVO;
 import com.iailab.module.data.plan.item.vo.PlanItemPageReqVO;
 import com.iailab.module.data.plan.item.vo.PlanItemSaveReqVO;
+import com.iailab.module.data.common.enums.IncreaseCodeEnum;
+import com.iailab.module.data.point.service.DaSequenceNumService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.Date;
-import java.util.List;
-import java.util.UUID;
+import java.util.*;
 
 /**
  * @author PanZhibao
@@ -28,14 +25,18 @@
 @Service
 public class PlanItemServiceImpl extends BaseServiceImpl<PlanItemDao, PlanItemEntity> implements PlanItemService {
 
+    @Autowired
+    private DaSequenceNumService daSequenceNumService;
+
     @Override
     public PageResult<PlanItemEntity> page(PlanItemPageReqVO reqVO) {
         return baseDao.selectPage(reqVO);
     }
 
     @Override
-    public List<PlanItemEntity> list() {
+    public List<PlanItemEntity> list(Map<String, Object> params) {
         QueryWrapper<PlanItemEntity> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq(params.get("status") != null, "status", params.get("status"));
         queryWrapper.orderByDesc("create_time");
         return baseDao.selectList(queryWrapper);
     }
@@ -44,6 +45,7 @@
     public void create(PlanItemSaveReqVO createReqVO) {
         PlanItemEntity entity = BeanUtils.toBean(createReqVO, PlanItemEntity.class);
         entity.setId(UUID.randomUUID().toString());
+        entity.setItemNo(daSequenceNumService.getAndIncreaseByCode(IncreaseCodeEnum.PLAN.name()));
         entity.setCreateTime(new Date());
         baseDao.insert(entity);
     }
@@ -71,4 +73,9 @@
     public void delete(String id) {
         baseDao.deleteById(id);
     }
+
+    @Override
+    public List<PlanItemDataVO> getSourceValue(Map<String, Object> params) {
+        return baseDao.getSourceValue(params);
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3