Browse Source

Merge remote-tracking branch 'origin/develop' into release_temp

dev
yinzuomei 4 years ago
parent
commit
70d608ebf6
  1. 7
      epmet-auth-client/pom.xml
  2. 25
      epmet-auth-client/src/main/java/com/epmet/auth/dto/result/BlockChainStaffAuthResultDTO.java
  3. 21
      epmet-auth/src/main/java/com/epmet/controller/GovLoginController.java
  4. 20
      epmet-auth/src/main/java/com/epmet/controller/GovWebController.java
  5. 8
      epmet-auth/src/main/java/com/epmet/service/GovLoginService.java
  6. 9
      epmet-auth/src/main/java/com/epmet/service/GovWebService.java
  7. 25
      epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java
  8. 41
      epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java
  9. 5
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java
  10. 14
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java
  11. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java
  12. 19
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java
  13. 29
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java
  14. 26
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  15. 25
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java
  16. 13
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java
  17. 40
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
  18. 49
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.10__update_service_item.sql
  19. 2
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryListResultDTO.java
  20. 3
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml
  21. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java
  22. 73
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

7
epmet-auth-client/pom.xml

@ -11,4 +11,11 @@
<artifactId>epmet-auth-client</artifactId> <artifactId>epmet-auth-client</artifactId>
<dependencies>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-tools</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
</project> </project>

25
epmet-auth-client/src/main/java/com/epmet/auth/dto/result/BlockChainStaffAuthResultDTO.java

@ -0,0 +1,25 @@
package com.epmet.auth.dto.result;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @ClassName BlockChainStaffAuthResultDTO
* @Description 区块链用户认证结果
* @Author wangxianzhang
* @Date 2022/1/20 10:41 上午
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BlockChainStaffAuthResultDTO {
private String userId;
private String realName;
private String phone;
private String headUrl;
private String agencyId;
private String agencyName;
}

21
epmet-auth/src/main/java/com/epmet/controller/GovLoginController.java

@ -122,26 +122,5 @@ public class GovLoginController {
List<StaffOrgsResultDTO> staffOrgs = govLoginService.getMyOrgByPassword(formDTO); List<StaffOrgsResultDTO> staffOrgs = govLoginService.getMyOrgByPassword(formDTO);
return new Result<List<StaffOrgsResultDTO>>().ok(staffOrgs); return new Result<List<StaffOrgsResultDTO>>().ok(staffOrgs);
} }
/**
* 区块链web 系统身份认证
* @param input
* @return
*/
@PostMapping("/blockchain/authentication")
public Result blockChainGetStaffInfoByPwd(@RequestBody BcStaffAuthenticationFormDTO input) {
ValidatorUtils.validateEntity(input);
String customerId = input.getCustomerId();
String mobile = input.getMobile();
String password = input.getPassword();
String userId = govLoginService.blockChainStaffAuthenticationByPwd(customerId, mobile, password);
HashMap<String, String> m = new HashMap<>();
m.put("userId", userId);
return new Result().ok(m);
}
} }

20
epmet-auth/src/main/java/com/epmet/controller/GovWebController.java

@ -1,8 +1,10 @@
package com.epmet.controller; package com.epmet.controller;
import com.epmet.auth.dto.result.BlockChainStaffAuthResultDTO;
import com.epmet.commons.tools.utils.RSASignature; import com.epmet.commons.tools.utils.RSASignature;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.BcStaffAuthenticationFormDTO;
import com.epmet.dto.form.GovWebLoginFormDTO; import com.epmet.dto.form.GovWebLoginFormDTO;
import com.epmet.dto.result.UserTokenResultDTO; import com.epmet.dto.result.UserTokenResultDTO;
import com.epmet.service.GovWebService; import com.epmet.service.GovWebService;
@ -13,6 +15,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
/** /**
* @author sun * @author sun
@ -63,5 +67,21 @@ public class GovWebController {
return new Result().ok(publicKey); return new Result().ok(publicKey);
} }
/**
* 区块链web 系统身份认证
* @param input
* @return
*/
@PostMapping("/blockchain/authentication")
public Result blockChainGetStaffInfoByPwd(@RequestBody BcStaffAuthenticationFormDTO input) {
ValidatorUtils.validateEntity(input);
String customerId = input.getCustomerId();
String mobile = input.getMobile();
String password = input.getPassword();
BlockChainStaffAuthResultDTO r = govWebService.blockChainStaffAuthenticationByPwd(customerId, mobile, password);
return new Result().ok(r);
}
} }

8
epmet-auth/src/main/java/com/epmet/service/GovLoginService.java

@ -76,12 +76,4 @@ public interface GovLoginService {
* @Date 2020/6/30 22:43 * @Date 2020/6/30 22:43
**/ **/
List<StaffOrgsResultDTO> getMyOrgByPassword(StaffOrgsFormDTO formDTO); List<StaffOrgsResultDTO> getMyOrgByPassword(StaffOrgsFormDTO formDTO);
/**
* 区块链系统通过用户密码认证身份
* @param mobile
* @param password
* @return
*/
String blockChainStaffAuthenticationByPwd(String customerId, String mobile, String password);
} }

9
epmet-auth/src/main/java/com/epmet/service/GovWebService.java

@ -1,5 +1,6 @@
package com.epmet.service; package com.epmet.service;
import com.epmet.auth.dto.result.BlockChainStaffAuthResultDTO;
import com.epmet.dto.form.GovWebLoginFormDTO; import com.epmet.dto.form.GovWebLoginFormDTO;
import com.epmet.dto.result.UserTokenResultDTO; import com.epmet.dto.result.UserTokenResultDTO;
@ -16,4 +17,12 @@ public interface GovWebService {
* @Description PC工作端-工作人员登录 * @Description PC工作端-工作人员登录
**/ **/
UserTokenResultDTO login(GovWebLoginFormDTO formDTO); UserTokenResultDTO login(GovWebLoginFormDTO formDTO);
/**
* 区块链系统通过用户密码认证身份
* @param mobile
* @param password
* @return
*/
BlockChainStaffAuthResultDTO blockChainStaffAuthenticationByPwd(String customerId, String mobile, String password);
} }

25
epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java

@ -492,30 +492,5 @@ public class GovLoginServiceImpl implements GovLoginService, ResultDataResolver
} }
return result.getData(); return result.getData();
} }
@Override
public String blockChainStaffAuthenticationByPwd(String customerId, String mobile, String password) {
GovWebOperLoginFormDTO form = new GovWebOperLoginFormDTO();
form.setCustomerId(customerId);
form.setMobile(mobile);
GovWebOperLoginResultDTO staff = getResultDataOrThrowsException(epmetUserFeignClient.getStaffIdAndPwd(form), ServiceConstant.EPMET_USER_SERVER,
EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),
String.format("【区块链获取用户信息】根据手机号%s和指定客户ID:%s查找用户信息失败", mobile, customerId),
"查询用户失败");
if (staff == null) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),
String.format("【区块链获取用户信息】根据手机号%s和指定客户ID:%s查找用户信息失败", mobile, customerId));
}
if (!PasswordUtils.matches(password, staff.getPassWord())) {
// 密码不匹配
throw new EpmetException(EpmetErrorCode.ERR10004.getCode(), String.format("【区块链获取用户信息】密码不匹配,手机号:%s", mobile));
}
return staff.getUserId();
}
} }

41
epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java

@ -1,13 +1,21 @@
package com.epmet.service.impl; package com.epmet.service.impl;
import com.epmet.auth.dto.result.BlockChainStaffAuthResultDTO;
import com.epmet.common.token.constant.LoginConstant; import com.epmet.common.token.constant.LoginConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.security.dto.GovTokenDto; import com.epmet.commons.tools.security.dto.GovTokenDto;
import com.epmet.commons.tools.security.password.PasswordUtils; import com.epmet.commons.tools.security.password.PasswordUtils;
import com.epmet.commons.tools.utils.CpUserDetailRedis; import com.epmet.commons.tools.utils.CpUserDetailRedis;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.form.CustomerStaffFormDTO;
import com.epmet.dto.form.GovWebLoginFormDTO; import com.epmet.dto.form.GovWebLoginFormDTO;
import com.epmet.dto.form.GovWebOperLoginFormDTO; import com.epmet.dto.form.GovWebOperLoginFormDTO;
import com.epmet.dto.result.GovWebOperLoginResultDTO; import com.epmet.dto.result.GovWebOperLoginResultDTO;
@ -32,7 +40,7 @@ import java.util.Map;
*/ */
@Slf4j @Slf4j
@Service @Service
public class GovWebServiceImpl implements GovWebService { public class GovWebServiceImpl implements GovWebService, ResultDataResolver {
private static final Logger logger = LoggerFactory.getLogger(GovWebServiceImpl.class); private static final Logger logger = LoggerFactory.getLogger(GovWebServiceImpl.class);
@Autowired @Autowired
@ -131,5 +139,36 @@ public class GovWebServiceImpl implements GovWebService {
return token; return token;
} }
@Override
public BlockChainStaffAuthResultDTO blockChainStaffAuthenticationByPwd(String customerId, String mobile, String password) {
GovWebOperLoginFormDTO form = new GovWebOperLoginFormDTO();
form.setCustomerId(customerId);
form.setMobile(mobile);
// 用户认证
GovWebOperLoginResultDTO staff = getResultDataOrThrowsException(epmetUserFeignClient.getStaffIdAndPwd(form), ServiceConstant.EPMET_USER_SERVER,
EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),
String.format("【区块链用户认证】根据手机号%s和指定客户ID:%s认证用户失败", mobile, customerId),
"认证失败");
if (staff == null) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),
String.format("【区块链用户认证】根据手机号%s和指定客户ID:%s认证用户失败", mobile, customerId));
}
if (!PasswordUtils.matches(password, staff.getPassWord())) {
// 密码不匹配
throw new EpmetException(EpmetErrorCode.ERR10004.getCode(), String.format("【区块链用户认证】密码不匹配,手机号:%s", mobile));
}
// 用户基础信息
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, staff.getUserId());
BlockChainStaffAuthResultDTO r = new BlockChainStaffAuthResultDTO(staff.getUserId(), staffInfo.getRealName(),
staffInfo.getMobile(), staffInfo.getHeadPhoto(), staffInfo.getAgencyId(), staffInfo.getAgencyName());
return r;
}
} }

5
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java

@ -169,9 +169,4 @@ public interface ActConstant {
* 活动类型-联建活动 * 活动类型-联建活动
*/ */
String PARTY = "party"; String PARTY = "party";
/**
* 服务事项code
*/
String SERVICE_MATTER_CODE = "1010";
} }

14
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java

@ -9,6 +9,7 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.demand.ServiceItemAddFormDTO; import com.epmet.dto.form.demand.ServiceItemAddFormDTO;
import com.epmet.dto.form.demand.ServiceItemPageFormDTO; import com.epmet.dto.form.demand.ServiceItemPageFormDTO;
import com.epmet.dto.form.demand.StatusFormDTO; import com.epmet.dto.form.demand.StatusFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.demand.ServiceItemResultDTO; import com.epmet.dto.result.demand.ServiceItemResultDTO;
import com.epmet.service.IcServiceItemDictService; import com.epmet.service.IcServiceItemDictService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -17,6 +18,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/** /**
* 服务事项分类字典表 * 服务事项分类字典表
* *
@ -68,4 +71,15 @@ public class IcServiceItemDictController {
icServiceItemDictService.updateStatus(formDTO); icServiceItemDictService.updateStatus(formDTO);
return new Result(); return new Result();
} }
/**
* 新增联建单位查询服务事项列表
*
* @param tokenDto
* @return
*/
@PostMapping("dict-list")
public Result<List<OptionDTO>> queryDictList(@LoginUser TokenDto tokenDto){
return new Result<List<OptionDTO>>().ok(icServiceItemDictService.queryDictList(tokenDto.getCustomerId()));
}
} }

10
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java

@ -22,9 +22,12 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.form.demand.ServiceItemAddFormDTO; import com.epmet.dto.form.demand.ServiceItemAddFormDTO;
import com.epmet.dto.form.demand.ServiceItemPageFormDTO; import com.epmet.dto.form.demand.ServiceItemPageFormDTO;
import com.epmet.dto.form.demand.StatusFormDTO; import com.epmet.dto.form.demand.StatusFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.demand.ServiceItemResultDTO; import com.epmet.dto.result.demand.ServiceItemResultDTO;
import com.epmet.entity.IcServiceItemDictEntity; import com.epmet.entity.IcServiceItemDictEntity;
import java.util.List;
/** /**
* 服务事项分类字典表 * 服务事项分类字典表
* *
@ -52,4 +55,11 @@ public interface IcServiceItemDictService extends BaseService<IcServiceItemDictE
* @return * @return
*/ */
void updateStatus(StatusFormDTO formDTO); void updateStatus(StatusFormDTO formDTO);
/**
* 新增联建单位查询服务事项列表
* @param customerId
* @return
*/
List<OptionDTO> queryDictList(String customerId);
} }

19
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java

@ -35,17 +35,14 @@ import com.epmet.dao.ActUserRelationDao;
import com.epmet.dao.HeartUserInfoDao; import com.epmet.dao.HeartUserInfoDao;
import com.epmet.dto.ActInfoDTO; import com.epmet.dto.ActInfoDTO;
import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.demand.SubCodeFormDTO;
import com.epmet.dto.form.resi.*; import com.epmet.dto.form.resi.*;
import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.resi.*; import com.epmet.dto.result.resi.*;
import com.epmet.entity.ActInfoEntity; import com.epmet.entity.ActInfoEntity;
import com.epmet.entity.ActUserRelationEntity; import com.epmet.entity.ActUserRelationEntity;
import com.epmet.service.ActInfoService; import com.epmet.service.*;
import com.epmet.service.ActUserRelationService;
import com.epmet.service.IcPartyUnitService;
import com.epmet.service.IcResiDemandDictService;
import com.epmet.utils.CaculateDistance; import com.epmet.utils.CaculateDistance;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -77,9 +74,9 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
@Autowired @Autowired
private HeartUserInfoDao heartUserInfoDao; private HeartUserInfoDao heartUserInfoDao;
@Resource @Resource
private IcResiDemandDictService icResiDemandDictService;
@Resource
private IcPartyUnitService icPartyUnitService; private IcPartyUnitService icPartyUnitService;
@Resource
private IcServiceItemDictService icServiceItemDictService;
@Override @Override
public PageData<ActInfoDTO> page(Map<String, Object> params) { public PageData<ActInfoDTO> page(Map<String, Object> params) {
@ -260,11 +257,9 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
if (StringUtils.isNotBlank(detailResultDTO.getServiceMatter())) { if (StringUtils.isNotBlank(detailResultDTO.getServiceMatter())) {
//获取服务事项 //获取服务事项
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId());
codeFormDTO.setCustomerId(tokenDto.getCustomerId()); Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); detailResultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(detailResultDTO.getServiceMatter()) ? categoryMap.get(detailResultDTO.getServiceMatter()) : StrConstant.EPMETY_STR);
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
detailResultDTO.setServiceMatterName(categoryMap.get(detailResultDTO.getServiceMatter()));
} }
if (StringUtils.isNotBlank(detailResultDTO.getUnitId())) { if (StringUtils.isNotBlank(detailResultDTO.getUnitId())) {
//获取单位名称 //获取单位名称

29
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java

@ -35,14 +35,13 @@ import com.epmet.dao.IcPartyActivityDao;
import com.epmet.dto.IcPartyActivityDTO; import com.epmet.dto.IcPartyActivityDTO;
import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO; import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.demand.SubCodeFormDTO;
import com.epmet.dto.result.ActivityStatisticsDTO; import com.epmet.dto.result.ActivityStatisticsDTO;
import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyActivityEntity; import com.epmet.entity.IcPartyActivityEntity;
import com.epmet.excel.IcPartyActivityImportExcel; import com.epmet.excel.IcPartyActivityImportExcel;
import com.epmet.service.IcPartyActivityService; import com.epmet.service.IcPartyActivityService;
import com.epmet.service.IcPartyUnitService; import com.epmet.service.IcPartyUnitService;
import com.epmet.service.IcResiDemandDictService; import com.epmet.service.IcServiceItemDictService;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -71,11 +70,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
@Resource @Resource
private IcPartyUnitService icPartyUnitService; private IcPartyUnitService icPartyUnitService;
@Resource @Resource
private IcResiDemandDictService icResiDemandDictService; private IcServiceItemDictService icServiceItemDictService;
/**
* 服务事项code
*/
private static final String SERVICE_MATTER_CODE = "1010";
@Override @Override
public PageData<IcPartyActivityDTO> search(PartyActivityFormDTO formDTO) { public PageData<IcPartyActivityDTO> search(PartyActivityFormDTO formDTO) {
@ -159,10 +155,9 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
return null; return null;
} }
//获取服务事项名称 //获取服务事项名称
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(entity.getCustomerId());
codeFormDTO.setCustomerId(entity.getCustomerId()); Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE);
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
IcPartyActivityDTO dto = ConvertUtils.sourceToTarget(entity, IcPartyActivityDTO.class); IcPartyActivityDTO dto = ConvertUtils.sourceToTarget(entity, IcPartyActivityDTO.class);
dto.setServiceMatterName(categoryMap.get(dto.getServiceMatter())); dto.setServiceMatterName(categoryMap.get(dto.getServiceMatter()));
//获取单位名称 //获取单位名称
@ -225,10 +220,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
//获取服务事项 //获取服务事项
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId());
codeFormDTO.setCustomerId(tokenDto.getCustomerId()); Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE);
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getLabel, OptionDTO::getValue));
//获取联建单位 //获取联建单位
IcPartyUnitDTO unitDTO = new IcPartyUnitDTO(); IcPartyUnitDTO unitDTO = new IcPartyUnitDTO();
unitDTO.setAgencyId(staffInfoCache.getAgencyId()); unitDTO.setAgencyId(staffInfoCache.getAgencyId());
@ -369,10 +362,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
//获取联建单位 //获取联建单位
Map<String, String> option = icPartyUnitService.options(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); Map<String, String> option = icPartyUnitService.options(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
//获取服务事项字典 //获取服务事项字典
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId());
codeFormDTO.setCustomerId(tokenDto.getCustomerId()); Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE);
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
//数据组装 //数据组装
dtoList.forEach(dto -> { dtoList.forEach(dto -> {
dto.setServiceMatterName(categoryMap.get(dto.getServiceMatter())); dto.setServiceMatterName(categoryMap.get(dto.getServiceMatter()));

26
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java

@ -45,7 +45,6 @@ import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO; import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.PartyUnitFormDTO; import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.form.demand.SubCodeFormDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO; import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.demand.ServiceStatDTO; import com.epmet.dto.result.demand.ServiceStatDTO;
@ -54,6 +53,7 @@ import com.epmet.excel.IcPartyUnitImportExcel;
import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.service.IcPartyUnitService; import com.epmet.service.IcPartyUnitService;
import com.epmet.service.IcResiDemandDictService; import com.epmet.service.IcResiDemandDictService;
import com.epmet.service.IcServiceItemDictService;
import com.epmet.service.IcUserDemandRecService; import com.epmet.service.IcUserDemandRecService;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
@ -87,7 +87,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
private IcUserDemandRecService icUserDemandRecService; private IcUserDemandRecService icUserDemandRecService;
@Resource @Resource
private IcResiDemandDictService icResiDemandDictService; private IcResiDemandDictService icResiDemandDictService;
@Resource
private IcServiceItemDictService icServiceItemDictService;
@Override @Override
public PageData<IcPartyUnitDTO> search(PartyUnitFormDTO formDTO) { public PageData<IcPartyUnitDTO> search(PartyUnitFormDTO formDTO) {
@ -104,10 +105,10 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
PageInfo<IcPartyUnitEntity> pageInfo = new PageInfo<>(list); PageInfo<IcPartyUnitEntity> pageInfo = new PageInfo<>(list);
List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class);
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); //服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表
codeFormDTO.setCustomerId(formDTO.getCustomerId()); List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId());
codeFormDTO.setParentCategoryCode("1010"); Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
dtoList.forEach(item -> { dtoList.forEach(item -> {
item.setType(unitTypeMap.getData().get(item.getType())); item.setType(unitTypeMap.getData().get(item.getType()));
if (StringUtils.isNotBlank(item.getServiceMatter())) { if (StringUtils.isNotBlank(item.getServiceMatter())) {
@ -138,10 +139,9 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); List<IcPartyUnitEntity> list = baseDao.selectList(wrapper);
List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class);
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); //服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表
codeFormDTO.setCustomerId(formDTO.getCustomerId()); List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId());
codeFormDTO.setParentCategoryCode("1010"); Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
dtoList.forEach(item -> { dtoList.forEach(item -> {
item.setType(unitTypeMap.getData().get(item.getType())); item.setType(unitTypeMap.getData().get(item.getType()));
if (StringUtils.isNotBlank(item.getServiceMatter())) { if (StringUtils.isNotBlank(item.getServiceMatter())) {
@ -312,10 +312,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
if (null == staffInfoCache) { if (null == staffInfoCache) {
throw new EpmetException(8000, "获取用户缓存失败"); throw new EpmetException(8000, "获取用户缓存失败");
} }
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId());
codeFormDTO.setCustomerId(tokenDto.getCustomerId()); Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
codeFormDTO.setParentCategoryCode("1010");
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getLabel, OptionDTO::getValue));
//1.数据校验 //1.数据校验
Iterator<IcPartyUnitImportExcel> iterator = result.iterator(); Iterator<IcPartyUnitImportExcel> iterator = result.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {

25
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java

@ -28,6 +28,7 @@ import com.epmet.dao.IcServiceItemDictDao;
import com.epmet.dto.form.demand.ServiceItemAddFormDTO; import com.epmet.dto.form.demand.ServiceItemAddFormDTO;
import com.epmet.dto.form.demand.ServiceItemPageFormDTO; import com.epmet.dto.form.demand.ServiceItemPageFormDTO;
import com.epmet.dto.form.demand.StatusFormDTO; import com.epmet.dto.form.demand.StatusFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.demand.ServiceItemResultDTO; import com.epmet.dto.result.demand.ServiceItemResultDTO;
import com.epmet.entity.IcServiceItemDictEntity; import com.epmet.entity.IcServiceItemDictEntity;
import com.epmet.service.IcServiceItemDictService; import com.epmet.service.IcServiceItemDictService;
@ -37,6 +38,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -122,5 +124,28 @@ public class IcServiceItemDictServiceImpl extends BaseServiceImpl<IcServiceItemD
baseDao.update(null, update); baseDao.update(null, update);
} }
/**
* 新增联建单位查询服务事项列表
*
* @param customerId
* @return
*/
@Override
public List<OptionDTO> queryDictList(String customerId) {
List<OptionDTO> resultList=new ArrayList<>();
LambdaQueryWrapper<IcServiceItemDictEntity> query = new LambdaQueryWrapper<>();
query.eq(IcServiceItemDictEntity::getCustomerId, customerId)
.orderByAsc(IcServiceItemDictEntity::getSort);
List<IcServiceItemDictEntity> list=baseDao.selectList(query);
for(IcServiceItemDictEntity entity:list){
OptionDTO optionDTO=new OptionDTO();
optionDTO.setLabel(entity.getCategoryName());
optionDTO.setValue(entity.getCategoryCode());
optionDTO.setAwardPoint(entity.getAwardPoint());
resultList.add(optionDTO);
}
return resultList;
}
} }

13
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java

@ -6,7 +6,6 @@ import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.LatestActContentDTO; import com.epmet.dto.LatestActContentDTO;
import com.epmet.dto.LatestActInfoDTO; import com.epmet.dto.LatestActInfoDTO;
import com.epmet.dto.form.demand.SubCodeFormDTO;
import com.epmet.dto.form.work.ActPreviewFormDTO; import com.epmet.dto.form.work.ActPreviewFormDTO;
import com.epmet.dto.form.work.DraftActContentFormDTO; import com.epmet.dto.form.work.DraftActContentFormDTO;
import com.epmet.dto.form.work.DraftActInfoFormDTO; import com.epmet.dto.form.work.DraftActInfoFormDTO;
@ -43,14 +42,10 @@ public class WorkActDraftServiceImpl implements WorkActDraftService {
@Autowired @Autowired
private LatestActContentService latestActContentService; private LatestActContentService latestActContentService;
@Resource @Resource
private IcResiDemandDictService icResiDemandDictService; private IcServiceItemDictService icServiceItemDictService;
@Resource @Resource
private IcPartyUnitService icPartyUnitService; private IcPartyUnitService icPartyUnitService;
/**
* 服务事项code
*/
private static final String SERVICE_MATTER_CODE = "1010";
/** /**
* @return com.epmet.dto.form.work.PublishActInitResultDTO * @return com.epmet.dto.form.work.PublishActInitResultDTO
@ -142,10 +137,8 @@ public class WorkActDraftServiceImpl implements WorkActDraftService {
if (StringUtils.isNotBlank(actPreviewResultDTO.getServiceMatter())) { if (StringUtils.isNotBlank(actPreviewResultDTO.getServiceMatter())) {
//获取服务事项 //获取服务事项
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId());
codeFormDTO.setCustomerId(formDTO.getCustomerId()); Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE);
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
actPreviewResultDTO.setServiceMatterName(categoryMap.get(actPreviewResultDTO.getServiceMatter())); actPreviewResultDTO.setServiceMatterName(categoryMap.get(actPreviewResultDTO.getServiceMatter()));
} }
if (StringUtils.isNotBlank(actPreviewResultDTO.getUnitId())) { if (StringUtils.isNotBlank(actPreviewResultDTO.getUnitId())) {

40
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java

@ -25,7 +25,6 @@ import com.epmet.dto.*;
import com.epmet.dto.form.SystemMsgFormDTO; import com.epmet.dto.form.SystemMsgFormDTO;
import com.epmet.dto.form.UserMessageFormDTO; import com.epmet.dto.form.UserMessageFormDTO;
import com.epmet.dto.form.WxSubscribeMessageFormDTO; import com.epmet.dto.form.WxSubscribeMessageFormDTO;
import com.epmet.dto.form.demand.SubCodeFormDTO;
import com.epmet.dto.form.work.*; import com.epmet.dto.form.work.*;
import com.epmet.dto.result.ActSponsorResultDTO; import com.epmet.dto.result.ActSponsorResultDTO;
import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.demand.OptionDTO;
@ -34,6 +33,7 @@ import com.epmet.entity.*;
import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.*; import com.epmet.service.*;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -99,10 +99,9 @@ public class WorkActServiceImpl implements WorkActService {
@Resource @Resource
private IcPartyActivityService icPartyActivityService; private IcPartyActivityService icPartyActivityService;
@Resource @Resource
private IcResiDemandDictService icResiDemandDictService;
@Resource
private IcPartyUnitService icPartyUnitService; private IcPartyUnitService icPartyUnitService;
@Resource
private IcServiceItemDictService icServiceItemDictService;
/** /**
@ -782,11 +781,10 @@ public class WorkActServiceImpl implements WorkActService {
if (StringUtils.isNotBlank(canceledActDetailResultDTO.getServiceMatter())) { if (StringUtils.isNotBlank(canceledActDetailResultDTO.getServiceMatter())) {
//获取服务事项 //获取服务事项
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); List<OptionDTO> serviceItemList = icServiceItemDictService.queryDictList(customerId);
codeFormDTO.setCustomerId(customerId); Map<String, String> categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); canceledActDetailResultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(canceledActDetailResultDTO.getServiceMatter()) ?
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); categoryMap.get(canceledActDetailResultDTO.getServiceMatter()) : StrConstant.EPMETY_STR);
canceledActDetailResultDTO.setServiceMatterName(categoryMap.get(canceledActDetailResultDTO.getServiceMatter()));
} }
if (StringUtils.isNotBlank(canceledActDetailResultDTO.getUnitId())) { if (StringUtils.isNotBlank(canceledActDetailResultDTO.getUnitId())) {
//获取单位名称 //获取单位名称
@ -840,11 +838,9 @@ public class WorkActServiceImpl implements WorkActService {
if (StringUtils.isNotBlank(resultDTO.getServiceMatter())) { if (StringUtils.isNotBlank(resultDTO.getServiceMatter())) {
//获取服务事项 //获取服务事项
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); List<OptionDTO> serviceItemList = icServiceItemDictService.queryDictList(formDTO.getCustomerId());
codeFormDTO.setCustomerId(formDTO.getCustomerId()); Map<String, String> categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); resultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(resultDTO.getServiceMatter()) ? categoryMap.get(resultDTO.getServiceMatter()) : StrConstant.EPMETY_STR);
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
resultDTO.setServiceMatterName(categoryMap.get(resultDTO.getServiceMatter()));
} }
if (StringUtils.isNotBlank(resultDTO.getUnitId())) { if (StringUtils.isNotBlank(resultDTO.getUnitId())) {
//获取单位名称 //获取单位名称
@ -921,11 +917,9 @@ public class WorkActServiceImpl implements WorkActService {
} }
if (StringUtils.isNotBlank(resultDTO.getServiceMatter())) { if (StringUtils.isNotBlank(resultDTO.getServiceMatter())) {
//获取服务事项 //获取服务事项
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(customerId);
codeFormDTO.setCustomerId(customerId); Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); resultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(resultDTO.getServiceMatter()) ? categoryMap.get(resultDTO.getServiceMatter()) : StrConstant.EPMETY_STR);
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
resultDTO.setServiceMatterName(categoryMap.get(resultDTO.getServiceMatter()));
} }
if (StringUtils.isNotBlank(resultDTO.getUnitId())) { if (StringUtils.isNotBlank(resultDTO.getUnitId())) {
//获取单位名称 //获取单位名称
@ -1317,11 +1311,9 @@ public class WorkActServiceImpl implements WorkActService {
if (StringUtils.isNotBlank(resultDTO.getServiceMatter())) { if (StringUtils.isNotBlank(resultDTO.getServiceMatter())) {
//获取服务事项 //获取服务事项
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(customerId);
codeFormDTO.setCustomerId(customerId); Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); resultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(resultDTO.getServiceMatter()) ? categoryMap.get(resultDTO.getServiceMatter()) : StrConstant.EPMETY_STR);
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
resultDTO.setServiceMatterName(categoryMap.get(resultDTO.getServiceMatter()));
} }
if (StringUtils.isNotBlank(resultDTO.getUnitId())) { if (StringUtils.isNotBlank(resultDTO.getUnitId())) {
//获取单位名称 //获取单位名称

49
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.10__update_service_item.sql

@ -0,0 +1,49 @@
-- 服务事项从需求分类字典表中抽离出来了,对应历史数据修改如下
-- 1、联建单位的服务事项置空
update ic_party_unit set SERVICE_MATTER ='';
-- 2、联建活动的服务事项修改为新的编码
update ic_party_activity set SERVICE_MATTER='1006' where SERVICE_MATTER = '10100006';
update ic_party_activity set SERVICE_MATTER='1008' where SERVICE_MATTER = '10100008';
update ic_party_activity set SERVICE_MATTER='1002' where SERVICE_MATTER = '10100002';
update ic_party_activity set SERVICE_MATTER='1009' where SERVICE_MATTER = '10100009';
update ic_party_activity set SERVICE_MATTER='1017' where SERVICE_MATTER = '10100017';
update ic_party_activity set SERVICE_MATTER='1021' where SERVICE_MATTER = '10100021';
update ic_party_activity set SERVICE_MATTER='1015' where SERVICE_MATTER = '10100015';
update ic_party_activity set SERVICE_MATTER='1011' where SERVICE_MATTER = '10100011';
update ic_party_activity set SERVICE_MATTER='1018' where SERVICE_MATTER = '10100018';
update ic_party_activity set SERVICE_MATTER='1005' where SERVICE_MATTER = '10100005';
update ic_party_activity set SERVICE_MATTER='1010' where SERVICE_MATTER = '10100010';
update ic_party_activity set SERVICE_MATTER='1003' where SERVICE_MATTER = '10100003';
update ic_party_activity set SERVICE_MATTER='1020' where SERVICE_MATTER = '10100020';
update ic_party_activity set SERVICE_MATTER='1022' where SERVICE_MATTER = '10100022';
update ic_party_activity set SERVICE_MATTER='1014' where SERVICE_MATTER = '10100014';
update ic_party_activity set SERVICE_MATTER='1007' where SERVICE_MATTER = '10100007';
update ic_party_activity set SERVICE_MATTER='1001' where SERVICE_MATTER = '10100001';
update ic_party_activity set SERVICE_MATTER='1004' where SERVICE_MATTER = '10100004';
update ic_party_activity set SERVICE_MATTER='1016' where SERVICE_MATTER = '10100016';
update ic_party_activity set SERVICE_MATTER='1013' where SERVICE_MATTER = '10100013';
update ic_party_activity set SERVICE_MATTER='1012' where SERVICE_MATTER = '10100012';
update ic_party_activity set SERVICE_MATTER='1019' where SERVICE_MATTER = '10100019';
-- 3、爱心互助-活动类型为联建活动,对应的服务事项编码改为新的
update act_info set SERVICE_MATTER='1006' where ACT_TYPE='party' and SERVICE_MATTER='10100006' ;
update act_info set SERVICE_MATTER='1008' where ACT_TYPE='party' and SERVICE_MATTER='10100008' ;
update act_info set SERVICE_MATTER='1002' where ACT_TYPE='party' and SERVICE_MATTER='10100002' ;
update act_info set SERVICE_MATTER='1009' where ACT_TYPE='party' and SERVICE_MATTER='10100009' ;
update act_info set SERVICE_MATTER='1017' where ACT_TYPE='party' and SERVICE_MATTER='10100017' ;
update act_info set SERVICE_MATTER='1021' where ACT_TYPE='party' and SERVICE_MATTER='10100021' ;
update act_info set SERVICE_MATTER='1015' where ACT_TYPE='party' and SERVICE_MATTER='10100015' ;
update act_info set SERVICE_MATTER='1011' where ACT_TYPE='party' and SERVICE_MATTER='10100011' ;
update act_info set SERVICE_MATTER='1018' where ACT_TYPE='party' and SERVICE_MATTER='10100018' ;
update act_info set SERVICE_MATTER='1005' where ACT_TYPE='party' and SERVICE_MATTER='10100005' ;
update act_info set SERVICE_MATTER='1010' where ACT_TYPE='party' and SERVICE_MATTER='10100010' ;
update act_info set SERVICE_MATTER='1003' where ACT_TYPE='party' and SERVICE_MATTER='10100003' ;
update act_info set SERVICE_MATTER='1020' where ACT_TYPE='party' and SERVICE_MATTER='10100020' ;
update act_info set SERVICE_MATTER='1022' where ACT_TYPE='party' and SERVICE_MATTER='10100022' ;
update act_info set SERVICE_MATTER='1014' where ACT_TYPE='party' and SERVICE_MATTER='10100014' ;
update act_info set SERVICE_MATTER='1007' where ACT_TYPE='party' and SERVICE_MATTER='10100007' ;
update act_info set SERVICE_MATTER='1001' where ACT_TYPE='party' and SERVICE_MATTER='10100001' ;
update act_info set SERVICE_MATTER='1004' where ACT_TYPE='party' and SERVICE_MATTER='10100004' ;
update act_info set SERVICE_MATTER='1016' where ACT_TYPE='party' and SERVICE_MATTER='10100016' ;
update act_info set SERVICE_MATTER='1013' where ACT_TYPE='party' and SERVICE_MATTER='10100013' ;
update act_info set SERVICE_MATTER='1012' where ACT_TYPE='party' and SERVICE_MATTER='10100012' ;
update act_info set SERVICE_MATTER='1019' where ACT_TYPE='party' and SERVICE_MATTER='10100019' ;

2
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryListResultDTO.java

@ -33,4 +33,6 @@ public class IndividualCategoryListResultDTO implements Serializable {
* 排序 * 排序
*/ */
private Integer sort; private Integer sort;
private String id;
} }

3
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml

@ -14,7 +14,8 @@
cm.SORT, cm.SORT,
sc.LABEL, sc.LABEL,
sc.MANAGEMENT_ICON, sc.MANAGEMENT_ICON,
sc.COLUMN_NAME sc.COLUMN_NAME,
sc.id AS id
FROM ic_individual_category_manage cm FROM ic_individual_category_manage cm
INNER JOIN ic_resi_category_stats_config sc ON (sc.ID = cm.COLUMN_ID AND sc.DEL_FLAG = '0' AND `STATUS` = 'show') INNER JOIN ic_resi_category_stats_config sc ON (sc.ID = cm.COLUMN_ID AND sc.DEL_FLAG = '0' AND `STATUS` = 'show')
WHERE cm.DEL_FLAG = 0 WHERE cm.DEL_FLAG = 0

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java

@ -180,7 +180,7 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl<IcUserChangeR
IcUserChangeDetailedEntity detailed = null; IcUserChangeDetailedEntity detailed = null;
//存放工作人员姓名 //存放工作人员姓名
Map<String, String> hash = new HashMap<>(); Map<String, String> hash = new HashMap<>();
//2.分批处理客户下居民数据 //2.分批处理客户下居民数据【只查询在变更记录表不存在新增节点的居民】
int pageNo = NumConstant.ONE; int pageNo = NumConstant.ONE;
List<Map<String, String>> icUserList = new ArrayList<>(); List<Map<String, String>> icUserList = new ArrayList<>();
do { do {

73
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -576,43 +576,46 @@
<select id="getIcUserList" resultType="java.util.Map"> <select id="getIcUserList" resultType="java.util.Map">
SELECT SELECT
id ID, iru.id ID,
customer_id CUSTOMER_ID, iru.customer_id CUSTOMER_ID,
agency_id AGENCY_ID, iru.agency_id AGENCY_ID,
pids PIDS, iru.pids PIDS,
grid_id GRID_ID, iru.grid_id GRID_ID,
village_id VILLAGE_ID, iru.village_id VILLAGE_ID,
build_id BUILD_ID, iru.build_id BUILD_ID,
unit_id UNIT_ID, iru.unit_id UNIT_ID,
home_id HOME_ID, iru.home_id HOME_ID,
name NAME, iru.name NAME,
created_by CREATED_BY, iru.created_by CREATED_BY,
date_format(created_time, '%Y-%m-%d %h:%i:%s') CREATED_TIME, date_format(iru.created_time, '%Y-%m-%d %h:%i:%s') CREATED_TIME,
IFNULL(is_kc,'0') IS_KC, IFNULL(iru.is_kc,'0') IS_KC,
IFNULL(is_cj,'0') IS_CJ, IFNULL(iru.is_cj,'0') IS_CJ,
IFNULL(is_ylfn,'0') IS_YLFN, IFNULL(iru.is_ylfn,'0') IS_YLFN,
IFNULL(is_sn,'0') IS_SN, IFNULL(iru.is_sn,'0') IS_SN,
IFNULL(is_special,'0') IS_SPECIAL, IFNULL(iru.is_special,'0') IS_SPECIAL,
IFNULL(is_volunteer,'0') IS_VOLUNTEER, IFNULL(iru.is_volunteer,'0') IS_VOLUNTEER,
IFNULL(is_unemployed,'0') IS_UNEMPLOYED, IFNULL(iru.is_unemployed,'0') IS_UNEMPLOYED,
IFNULL(is_mb,'0') IS_MB, IFNULL(iru.is_mb,'0') IS_MB,
IFNULL(is_sz,'0') IS_SZ, IFNULL(iru.is_sz,'0') IS_SZ,
IFNULL(is_sd,'0') IS_SD, IFNULL(iru.is_sd,'0') IS_SD,
IFNULL(is_veterans,'0') IS_VETERANS, IFNULL(iru.is_veterans,'0') IS_VETERANS,
IFNULL(is_ensure_house,'0') IS_ENSURE_HOUSE, IFNULL(iru.is_ensure_house,'0') IS_ENSURE_HOUSE,
IFNULL(is_party,'0') IS_PARTY, IFNULL(iru.is_party,'0') IS_PARTY,
IFNULL(is_old_people,'0') IS_OLD_PEOPLE, IFNULL(iru.is_old_people,'0') IS_OLD_PEOPLE,
IFNULL(is_xfry,'0')IS_XFRY, IFNULL(iru.is_xfry,'0')IS_XFRY,
IFNULL(is_united_front,'0') IS_UNITED_FRONT, IFNULL(iru.is_united_front,'0') IS_UNITED_FRONT,
IFNULL(is_db,'0') IS_DB, IFNULL(iru.is_db,'0') IS_DB,
IFNULL(is_dbh,'0') IS_DBH IFNULL(iru.is_dbh,'0') IS_DBH
FROM FROM
ic_resi_user ic_resi_user iru
<!-- 只查询在变更记录表不存在新增节点的居民 -->
LEFT JOIN ic_user_change_record iucr ON iru.id = iucr.ic_user_id AND iucr.type = 'add'
WHERE WHERE
del_flag = '0' iucr.ic_user_id IS NULL
AND `status` = '0' AND iru.del_flag = '0'
AND customer_id = #{customerId} AND iru.`status` = '0'
ORDER BY created_time ASC AND iru.customer_id = #{customerId}
ORDER BY iru.created_time ASC
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save