From 5cd81c86fc3c0d96e28c0bbe5f97126b15a567d8 Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期三, 15 十一月 2023 16:28:23 +0800
Subject: [PATCH] 社区组织共建状态

---
 springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/NewFightProjectPlanServiceImpl.java |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/NewFightProjectPlanServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/NewFightProjectPlanServiceImpl.java
index e41a245..3a18b56 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/NewFightProjectPlanServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/NewFightProjectPlanServiceImpl.java
@@ -12,6 +12,9 @@
 import com.panzhihua.service_dangjian.service.NewFightProjectPlanService;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+import java.util.Date;
+
 /**
  * @program: springcloud_k8s_panzhihuazhihuishequ
  * @description: 党组织
@@ -22,6 +25,10 @@
 public class NewFightProjectPlanServiceImpl extends ServiceImpl<NewFightProjectPlanDAO,
         NewFightProjectPlanDTO> implements NewFightProjectPlanService
 {
+
+
+    @Resource
+    private NewFightCommunityConstructionService constructionService;
 
 
     @Override
@@ -38,6 +45,38 @@
     }
 
     @Override
+    public R editProjectPlanAccomplish(String id)
+    {
+        NewFightProjectPlanDTO item =new NewFightProjectPlanDTO();
+        item.setId(id);
+        item.setAffirmTime(new Date());
+        item.setAccomplish("1");
+        int num=baseMapper.editData(item);
+
+        if(num>0)
+        {
+            NewFightProjectPlanDTO planDTO=baseMapper.getDetails(id);
+            int pNum=baseMapper.getNum(id,null);
+            int accomplishNum=baseMapper.getNum(id,"1");
+            NewFightCommunityConstructionDTO dto=new NewFightCommunityConstructionDTO();
+            dto.setId(planDTO.getProjectId());
+            if(pNum==accomplishNum)
+            {
+                //已完成
+                dto.setStatus("3");
+            }
+            else
+            {
+                //进行中
+                dto.setStatus("2");
+            }
+            constructionService.editData(dto);
+            return R.ok();
+        }
+        return R.fail("操作失败");
+    }
+
+    @Override
     public R addData(NewFightProjectPlanDTO item)
     {
         int num=baseMapper.addData(item);

--
Gitblit v1.7.1