From 8d493a008ce655963f0363b116d5b55e02eff3d6 Mon Sep 17 00:00:00 2001
From: fengjin <1435304038@qq.com>
Date: 星期三, 16 十一月 2022 09:45:13 +0800
Subject: [PATCH] Merge branch 'zigonggao_dev' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into zigonggao_dev
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java | 65 ++++++++++++++++++++++++++++----
1 files changed, 56 insertions(+), 9 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java
index b9d27c1..fcd8157 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java
@@ -10,15 +10,18 @@
import com.panzhihua.common.model.vos.sanshuo.ComEventConciliationVO;
import com.panzhihua.common.model.vos.sanshuo.ComEventVO;
import com.panzhihua.common.model.vos.sanshuo.ComSanRequestVO;
+import com.panzhihua.common.service.user.UserService;
import com.panzhihua.common.utlis.CopyUtil;
import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.service_community.entity.ComEvent;
+import com.panzhihua.service_community.service.ComSanShuoExpertService;
import com.panzhihua.service_community.service.IComEventService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
@@ -27,6 +30,9 @@
import javax.validation.Valid;
import java.util.HashMap;
import java.util.List;
+
+import static java.util.Objects.isNull;
+import static java.util.Objects.nonNull;
/**
* ClassName ComEventController
@@ -43,6 +49,10 @@
@Resource
private IComEventService comEventService;
+ @Resource
+ private UserService userService;
+ @Resource
+ private ComSanShuoExpertService comSanShuoExpertService;
/**
@@ -64,6 +74,9 @@
comEvent.setRequestUserId(loginUser.getUserId());
comEvent.setRequestUserName(loginUser.getName());
comEvent.setRequestUserTel(loginUser.getPhone());
+ if (isNull(comEventVO.getAppId())){
+ comEvent.setAppId(loginUser.getAppId());
+ }
return comEventService.insertComEvent(comEvent);
}
@@ -131,7 +144,7 @@
@PostMapping("/list")
public R<List<ComEventVO>> listByComEvent(@RequestBody ComEventVO comEventVO) {
ComEvent comEvent = CopyUtil.copyProperties(comEventVO, ComEvent.class);
- return R.ok(CopyUtil.beanCopyList(comEventService.listByComEvent(comEvent), ComEventVO.class));
+ return R.ok(CopyUtil.beanCopyList(comEventService.listByComEvent(comEvent,this.getLoginUserInfo()), ComEventVO.class));
}
/**
@@ -153,8 +166,14 @@
@PostMapping("/page")
public R page(@RequestBody ComEventVO comEventVO, Long pageNo, Long pageSize) {
Page pagination = new Page(pageNo, pageSize);
- ComEvent comEvent = CopyUtil.copyProperties(comEventVO, ComEvent.class);
- return comEventService.pageByComEvent(comEvent, pagination);
+ ComEvent comEvent=new ComEvent();
+ BeanUtils.copyProperties(comEventVO, comEvent);
+ LoginUserInfoVO loginUserInfo = getLoginUserInfo();
+ if (isNull(comEventVO.getAppId())){
+ String appId = userService.detailUser(loginUserInfo.getUserId()).getData().getAppId();
+ comEvent.setAppId(appId);
+ }
+ return comEventService.pageByComEvent(comEvent, pagination,this.getLoginUserInfo());
}
@@ -174,7 +193,7 @@
public R remove(@PathVariable Long id) {
ComEvent comEvent = new ComEvent();
comEvent.setId(id);
- comEvent.setEventProcessStatus(8);
+ comEvent.setEventProcessStatus(9);
return comEventService.updateComEvent(comEvent);
}
@@ -246,10 +265,12 @@
})
@PutMapping("/reject/Request")
public R rejectRequest(@RequestParam("id") Long id) {
- ComEvent comEvent = new ComEvent();
- comEvent.setId(id);
- comEvent.setEventProcessStatus(SanShuoEventStatusEnum.REJECT.getCode());
- return comEventService.updateComEvent(comEvent);
+ ComEvent comEvent = comEventService.getById(id);
+ comEvent.setEventProcessStatus(SanShuoEventStatusEnum.VALID.getCode());
+ comEvent.setSpecialistName("待分配");
+ comEvent.setSpecialistId(null);
+ comEventService.updateEventStransferRecord(id);
+ return R.ok(comEventService.updateById(comEvent));
}
/**
@@ -312,7 +333,7 @@
@ApiOperation("事件各种状态(处理状态1待处理2待验证3专家已受理4专家未受理,拒绝5调解中6已结案归档7调解取消8 已删除)数据统计")
@GetMapping("/status/calculate")
public R calculate() {
- return comEventService.calculate();
+ return comEventService.calculate(getLoginUserInfo());
}
/**
@@ -332,4 +353,30 @@
public R eventIndexData(@RequestParam Integer type) {
return comEventService.eventIndexData(type);
}
+
+
+ /**
+ *可选街道列表
+ * */
+ @GetMapping("/streetList")
+ public R getStreetId(){
+ return comEventService.listStreetScreen();
+ }
+
+ /**
+ *可选社区列表
+ * */
+ @GetMapping("/communityList")
+ public R getCommunityList(){
+ return comEventService.listCommunityScreen();
+ }
+
+ /**
+ * 获取事件范围筛选列表
+ * */
+ @GetMapping("/rangeList")
+ public R rangeList(){
+ return comSanShuoExpertService.rangeList();
+ }
+
}
--
Gitblit v1.7.1