From db3fc1165777c9e66e179ce018fc05aa15d2c051 Mon Sep 17 00:00:00 2001
From: puhanshu <a9236326>
Date: 星期四, 10 三月 2022 10:27:52 +0800
Subject: [PATCH] 大屏院落议事相关代码提交
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialWorkerServiceImpl.java | 58 ++++++++++++++++++++++++++++++++++------------------------
1 files changed, 34 insertions(+), 24 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialWorkerServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialWorkerServiceImpl.java
index a602b7c..5a36422 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialWorkerServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialWorkerServiceImpl.java
@@ -10,12 +10,9 @@
import com.panzhihua.common.model.vos.civil.ComActSocialWorkerDetailsVO;
import com.panzhihua.common.model.vos.civil.ComActSocialWorkerVO;
import com.panzhihua.common.utlis.StringUtils;
-import com.panzhihua.service_community.dao.ComActDAO;
-import com.panzhihua.service_community.dao.ComActSocialOrgDao;
-import com.panzhihua.service_community.dao.ComStreetDAO;
+import com.panzhihua.service_community.dao.*;
import com.panzhihua.service_community.entity.ComActSocialOrg;
import com.panzhihua.service_community.entity.ComActSocialWorker;
-import com.panzhihua.service_community.dao.ComActSocialWorkerDao;
import com.panzhihua.service_community.model.dos.ComActDO;
import com.panzhihua.service_community.model.dos.ComStreetDO;
import com.panzhihua.service_community.service.ComActSocialWorkerService;
@@ -26,6 +23,7 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
/**
@@ -45,6 +43,8 @@
private ComActSocialOrgDao comActSocialOrgMapper;
@Resource
private ComActDAO comActDAO;
+ @Resource
+ private ComActActivityDAO comActActivityDAO;
/**
* 新增社工
* @param comActSocialWorkerAddDTO
@@ -55,6 +55,7 @@
ComActSocialWorker comActSocialWorkerDO = new ComActSocialWorker();
BeanUtils.copyProperties(comActSocialWorkerAddDTO, comActSocialWorkerDO);
comActSocialWorkerDO.setCreateBy(comActSocialWorkerAddDTO.getUserId());
+ comActSocialWorkerDO.setCreateAt(new Date());
if(comActSocialWorkerMapper.insert(comActSocialWorkerDO)>0){
return R.ok();
}
@@ -110,14 +111,9 @@
* @return 查找结果
*/
@Override
- public R<ComActSocialWorkerDetailsVO> comActSocialWorkerDetails(Long id){
- ComActSocialWorker comActSocialWorkerDO = comActSocialWorkerMapper.selectById(id);
- if(comActSocialWorkerDO!=null) {
- ComActSocialWorkerDetailsVO comActSocialWorkerDetailsVO = new ComActSocialWorkerDetailsVO();
- BeanUtils.copyProperties(comActSocialWorkerDO, comActSocialWorkerDetailsVO);
- return R.ok(comActSocialWorkerDetailsVO);
- }
- return R.fail();
+ public R<ComActSocialWorkerVO> comActSocialWorkerDetails(Long id){
+ ComActSocialWorkerVO comActSocialWorkerDO = comActSocialWorkerMapper.selectOneById(id);
+ return R.ok(comActSocialWorkerDO);
}
@Override
@@ -127,18 +123,6 @@
for(ComActSocialWorkerExcelVO comActSocialWorkerExcelVO:lis) {
ComActSocialWorker comActSocialWorkerDO = new ComActSocialWorker();
BeanUtils.copyProperties(comActSocialWorkerExcelVO,comActSocialWorkerDO);
- if (StringUtils.isNotEmpty(comActSocialWorkerExcelVO.getStreetId())) {
- ComStreetDO comStreetDO=comStreetDAO.selectOne(new QueryWrapper<ComStreetDO>().eq("name",comActSocialWorkerExcelVO.getStreetId()));
- if(comStreetDO!=null){
- comActSocialWorkerDO.setStreetId(comStreetDO.getStreetId());
- }
- }
- if (StringUtils.isNotEmpty(comActSocialWorkerExcelVO.getSocialOrgId())) {
- ComActSocialOrg comActSocialOrgDO=comActSocialOrgMapper.selectOne(new QueryWrapper<ComActSocialOrg>().eq("name",comActSocialWorkerExcelVO.getSocialOrgId()));
- if(comActSocialOrgDO!=null){
- comActSocialWorkerDO.setSocialOrgId(comActSocialOrgDO.getId());
- }
- }
if(StringUtils.isNotEmpty(comActSocialWorkerExcelVO.getCommunityId())){
ComActDO comActDO= comActDAO.selectOne(new QueryWrapper<ComActDO>().eq("name",comActSocialWorkerExcelVO.getCommunityId()));
if(comActDO!=null){
@@ -153,6 +137,22 @@
comActSocialWorkerDO.setGen(0);
}
}
+ if(StringUtils.isNotEmpty(comActSocialWorkerExcelVO.getCredential())){
+ if("是".equals(comActSocialWorkerExcelVO.getCredential())){
+ comActSocialWorkerDO.setCredential(1);
+ }
+ else {
+ comActSocialWorkerDO.setCredential(0);
+ }
+ }
+ if(StringUtils.isNotEmpty(comActSocialWorkerExcelVO.getCredential())){
+ if("是".equals(comActSocialWorkerExcelVO.getCredential())){
+ comActSocialWorkerDO.setCredential(1);
+ }
+ else {
+ comActSocialWorkerDO.setCredential(0);
+ }
+ }
list.add(comActSocialWorkerDO);
}
this.saveBatch(list);
@@ -160,4 +160,14 @@
return R.ok();
}
+
+ @Override
+ public R activity(CommonPage commonPage) {
+ return R.ok(comActSocialWorkerMapper.selectActivity(new Page(commonPage.getPage(),commonPage.getSize()),commonPage.getParamId()));
+ }
+
+ @Override
+ public R activityList(CommonPage commonPage) {
+ return R.ok(comActActivityDAO.selectActivityBySocialWorker(new Page(commonPage.getPage(),commonPage.getSize()),commonPage.getParamId()));
+ }
}
--
Gitblit v1.7.1