From 4bda9cc7829baab33d7289f3c393ef735d90bab3 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 20 Jan 2022 09:55:32 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E5=8F=98=E6=9B=B4=E8=AE=B0=E5=BD=95=E5=92=8C=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E6=98=8E=E7=BB=86=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcUserChangeRecordServiceImpl.java | 2 +- .../main/resources/mapper/IcResiUserDao.xml | 73 ++++++++++--------- 2 files changed, 39 insertions(+), 36 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java index 7a882e807e..4241e3428b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java @@ -180,7 +180,7 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl hash = new HashMap<>(); - //2.分批处理客户下居民数据 + //2.分批处理客户下居民数据【只查询在变更记录表不存在新增节点的居民】 int pageNo = NumConstant.ONE; List> icUserList = new ArrayList<>(); do { diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 99031d8f5e..5ef3c54d15 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -576,43 +576,46 @@ From 1ac84de0ffb12c44b66bd42859bc4f90f5ae34a7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 20 Jan 2022 10:30:56 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=8A=A0=E4=BA=86=E4=B8=AAID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/IndividualCategoryListResultDTO.java | 2 ++ .../main/resources/mapper/IcIndividualCategoryManageDao.xml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryListResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryListResultDTO.java index 4089a151df..cbfc8b5718 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryListResultDTO.java +++ b/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 String id; } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml index 926e0a8baf..68036233b5 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml @@ -14,7 +14,8 @@ cm.SORT, sc.LABEL, sc.MANAGEMENT_ICON, - sc.COLUMN_NAME + sc.COLUMN_NAME, + sc.id AS id 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') WHERE cm.DEL_FLAG = 0 From 833521d1d4ff06c41bac3f185623f5e5cfb51c7d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 20 Jan 2022 10:32:04 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=81=94=E5=BB=BA?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E6=97=B6=EF=BC=8C=E6=9C=8D=E5=8A=A1=E4=BA=8B?= =?UTF-8?q?=E9=A1=B9=E5=88=97=E8=A1=A8=EF=BC=8C=E6=8E=A5=E5=8F=A3=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=EF=BC=9A/api/heart/serviceitem/dict-list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IcServiceItemDictController.java | 14 +++++++++++ .../service/IcServiceItemDictService.java | 10 ++++++++ .../impl/IcServiceItemDictServiceImpl.java | 25 +++++++++++++++++++ 3 files changed, 49 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java index d2f9f6d412..d6234d4a2c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java +++ b/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.ServiceItemPageFormDTO; import com.epmet.dto.form.demand.StatusFormDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.demand.ServiceItemResultDTO; import com.epmet.service.IcServiceItemDictService; 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.RestController; +import java.util.List; + /** * 服务事项分类字典表 * @@ -68,4 +71,15 @@ public class IcServiceItemDictController { icServiceItemDictService.updateStatus(formDTO); return new Result(); } + + /** + * 新增联建单位,查询服务事项列表 + * + * @param tokenDto + * @return + */ + @PostMapping("dict-list") + public Result> queryDictList(@LoginUser TokenDto tokenDto){ + return new Result>().ok(icServiceItemDictService.queryDictList(tokenDto.getCustomerId())); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java index a93e50aaff..fc671c3cdc 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java +++ b/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.ServiceItemPageFormDTO; import com.epmet.dto.form.demand.StatusFormDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.demand.ServiceItemResultDTO; import com.epmet.entity.IcServiceItemDictEntity; +import java.util.List; + /** * 服务事项分类字典表 * @@ -52,4 +55,11 @@ public interface IcServiceItemDictService extends BaseService queryDictList(String customerId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java index 4235d282c5..1868076ade 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java +++ b/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.ServiceItemPageFormDTO; import com.epmet.dto.form.demand.StatusFormDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.demand.ServiceItemResultDTO; import com.epmet.entity.IcServiceItemDictEntity; import com.epmet.service.IcServiceItemDictService; @@ -37,6 +38,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -122,5 +124,28 @@ public class IcServiceItemDictServiceImpl extends BaseServiceImpl queryDictList(String customerId) { + List resultList=new ArrayList<>(); + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(IcServiceItemDictEntity::getCustomerId, customerId) + .orderByAsc(IcServiceItemDictEntity::getSort); + List 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; + } + } \ No newline at end of file From a286d4030f09887a9189a8514afaa5c26ee169ab Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 20 Jan 2022 10:55:32 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=201.=E5=8C=BA?= =?UTF-8?q?=E5=9D=97=E9=93=BE=E7=94=A8=E6=88=B7=E8=BA=AB=E4=BB=BD=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E8=B0=83=E6=95=B4=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=8Curl=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-auth-client/pom.xml | 7 ++++ .../result/BlockChainStaffAuthResultDTO.java | 25 +++++++++++ .../epmet/controller/GovLoginController.java | 21 ---------- .../epmet/controller/GovWebController.java | 20 +++++++++ .../com/epmet/service/GovLoginService.java | 8 ---- .../java/com/epmet/service/GovWebService.java | 9 ++++ .../service/impl/GovLoginServiceImpl.java | 25 ----------- .../epmet/service/impl/GovWebServiceImpl.java | 41 ++++++++++++++++++- 8 files changed, 101 insertions(+), 55 deletions(-) create mode 100644 epmet-auth-client/src/main/java/com/epmet/auth/dto/result/BlockChainStaffAuthResultDTO.java diff --git a/epmet-auth-client/pom.xml b/epmet-auth-client/pom.xml index 1aee53c24e..d84ead3ff5 100644 --- a/epmet-auth-client/pom.xml +++ b/epmet-auth-client/pom.xml @@ -11,4 +11,11 @@ epmet-auth-client + + + com.epmet + epmet-commons-tools + 2.0.0 + + \ No newline at end of file diff --git a/epmet-auth-client/src/main/java/com/epmet/auth/dto/result/BlockChainStaffAuthResultDTO.java b/epmet-auth-client/src/main/java/com/epmet/auth/dto/result/BlockChainStaffAuthResultDTO.java new file mode 100644 index 0000000000..2a1ca0dfcc --- /dev/null +++ b/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; + +} diff --git a/epmet-auth/src/main/java/com/epmet/controller/GovLoginController.java b/epmet-auth/src/main/java/com/epmet/controller/GovLoginController.java index deaa719859..8745418f90 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/GovLoginController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/GovLoginController.java @@ -122,26 +122,5 @@ public class GovLoginController { List staffOrgs = govLoginService.getMyOrgByPassword(formDTO); return new Result>().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 m = new HashMap<>(); - m.put("userId", userId); - return new Result().ok(m); - } - } diff --git a/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java b/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java index 8a85cb9da4..9320b5f140 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java @@ -1,8 +1,10 @@ package com.epmet.controller; +import com.epmet.auth.dto.result.BlockChainStaffAuthResultDTO; import com.epmet.commons.tools.utils.RSASignature; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.BcStaffAuthenticationFormDTO; import com.epmet.dto.form.GovWebLoginFormDTO; import com.epmet.dto.result.UserTokenResultDTO; 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.RestController; +import java.util.HashMap; + /** * @author sun @@ -63,5 +67,21 @@ public class GovWebController { 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); + } } diff --git a/epmet-auth/src/main/java/com/epmet/service/GovLoginService.java b/epmet-auth/src/main/java/com/epmet/service/GovLoginService.java index 2a493fd54c..ea6329ceda 100644 --- a/epmet-auth/src/main/java/com/epmet/service/GovLoginService.java +++ b/epmet-auth/src/main/java/com/epmet/service/GovLoginService.java @@ -76,12 +76,4 @@ public interface GovLoginService { * @Date 2020/6/30 22:43 **/ List getMyOrgByPassword(StaffOrgsFormDTO formDTO); - - /** - * 区块链系统通过用户密码认证身份 - * @param mobile - * @param password - * @return - */ - String blockChainStaffAuthenticationByPwd(String customerId, String mobile, String password); } diff --git a/epmet-auth/src/main/java/com/epmet/service/GovWebService.java b/epmet-auth/src/main/java/com/epmet/service/GovWebService.java index 30f8d8ae4c..10d86c20b4 100644 --- a/epmet-auth/src/main/java/com/epmet/service/GovWebService.java +++ b/epmet-auth/src/main/java/com/epmet/service/GovWebService.java @@ -1,5 +1,6 @@ package com.epmet.service; +import com.epmet.auth.dto.result.BlockChainStaffAuthResultDTO; import com.epmet.dto.form.GovWebLoginFormDTO; import com.epmet.dto.result.UserTokenResultDTO; @@ -16,4 +17,12 @@ public interface GovWebService { * @Description PC工作端-工作人员登录 **/ UserTokenResultDTO login(GovWebLoginFormDTO formDTO); + + /** + * 区块链系统通过用户密码认证身份 + * @param mobile + * @param password + * @return + */ + BlockChainStaffAuthResultDTO blockChainStaffAuthenticationByPwd(String customerId, String mobile, String password); } diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java index 8a36124e4d..8d78665550 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java @@ -492,30 +492,5 @@ public class GovLoginServiceImpl implements GovLoginService, ResultDataResolver } 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(); - } } diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java index 9d455af694..d6edfb8657 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java @@ -1,13 +1,21 @@ package com.epmet.service.impl; +import com.epmet.auth.dto.result.BlockChainStaffAuthResultDTO; 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.EpmetException; 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.password.PasswordUtils; import com.epmet.commons.tools.utils.CpUserDetailRedis; import com.epmet.commons.tools.utils.DateUtils; 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.GovWebOperLoginFormDTO; import com.epmet.dto.result.GovWebOperLoginResultDTO; @@ -32,7 +40,7 @@ import java.util.Map; */ @Slf4j @Service -public class GovWebServiceImpl implements GovWebService { +public class GovWebServiceImpl implements GovWebService, ResultDataResolver { private static final Logger logger = LoggerFactory.getLogger(GovWebServiceImpl.class); @Autowired @@ -131,5 +139,36 @@ public class GovWebServiceImpl implements GovWebService { 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; + } } From f9c71352f288d0634d1788176aa866a14dcaa1bc Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 20 Jan 2022 11:05:04 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E8=81=94=E5=BB=BA=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E7=94=A8=E5=88=B0=E6=9C=8D=E5=8A=A1=E4=BA=8B=E9=A1=B9=E7=9A=84?= =?UTF-8?q?=E5=9C=B0=E6=96=B9=EF=BC=8C=E7=BB=9F=E4=B8=80=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2ic=5Fservice=5Fitem=5Fdict?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/constant/ActConstant.java | 5 --- .../service/impl/ActInfoServiceImpl.java | 19 ++++----- .../impl/IcPartyActivityServiceImpl.java | 29 +++++--------- .../service/impl/IcPartyUnitServiceImpl.java | 26 ++++++------ .../service/impl/WorkActDraftServiceImpl.java | 13 ++---- .../service/impl/WorkActServiceImpl.java | 40 ++++++++----------- 6 files changed, 48 insertions(+), 84 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java index ce1d187bf2..9855cee625 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java +++ b/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"; - - /** - * 服务事项code - */ - String SERVICE_MATTER_CODE = "1010"; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java index 983c4834a2..e595bdd0c6 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java +++ b/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.dto.ActInfoDTO; import com.epmet.dto.IcPartyUnitDTO; -import com.epmet.dto.form.demand.SubCodeFormDTO; import com.epmet.dto.form.resi.*; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.resi.*; import com.epmet.entity.ActInfoEntity; import com.epmet.entity.ActUserRelationEntity; -import com.epmet.service.ActInfoService; -import com.epmet.service.ActUserRelationService; -import com.epmet.service.IcPartyUnitService; -import com.epmet.service.IcResiDemandDictService; +import com.epmet.service.*; import com.epmet.utils.CaculateDistance; +import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -77,9 +74,9 @@ public class ActInfoServiceImpl extends BaseServiceImpl page(Map params) { @@ -260,11 +257,9 @@ public class ActInfoServiceImpl extends BaseServiceImpl categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); - detailResultDTO.setServiceMatterName(categoryMap.get(detailResultDTO.getServiceMatter())); + List serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + detailResultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(detailResultDTO.getServiceMatter()) ? categoryMap.get(detailResultDTO.getServiceMatter()) : StrConstant.EPMETY_STR); } if (StringUtils.isNotBlank(detailResultDTO.getUnitId())) { //获取单位名称 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java index 67391ef70c..cdfa84d5e2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java +++ b/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.IcPartyUnitDTO; import com.epmet.dto.form.PartyActivityFormDTO; -import com.epmet.dto.form.demand.SubCodeFormDTO; import com.epmet.dto.result.ActivityStatisticsDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcPartyActivityEntity; import com.epmet.excel.IcPartyActivityImportExcel; import com.epmet.service.IcPartyActivityService; import com.epmet.service.IcPartyUnitService; -import com.epmet.service.IcResiDemandDictService; +import com.epmet.service.IcServiceItemDictService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; @@ -71,11 +70,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl search(PartyActivityFormDTO formDTO) { @@ -159,10 +155,9 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + List serviceItemList=icServiceItemDictService.queryDictList(entity.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + IcPartyActivityDTO dto = ConvertUtils.sourceToTarget(entity, IcPartyActivityDTO.class); dto.setServiceMatterName(categoryMap.get(dto.getServiceMatter())); //获取单位名称 @@ -225,10 +220,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getLabel, OptionDTO::getValue)); + List serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //获取联建单位 IcPartyUnitDTO unitDTO = new IcPartyUnitDTO(); unitDTO.setAgencyId(staffInfoCache.getAgencyId()); @@ -369,10 +362,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl option = icPartyUnitService.options(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //获取服务事项字典 - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(tokenDto.getCustomerId()); - codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + List serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //数据组装 dtoList.forEach(dto -> { dto.setServiceMatterName(categoryMap.get(dto.getServiceMatter())); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 3850acd354..383b5e58fa 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/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.PartyUnitFormDTO; 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.demand.OptionDTO; import com.epmet.dto.result.demand.ServiceStatDTO; @@ -54,6 +53,7 @@ import com.epmet.excel.IcPartyUnitImportExcel; import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.service.IcPartyUnitService; import com.epmet.service.IcResiDemandDictService; +import com.epmet.service.IcServiceItemDictService; import com.epmet.service.IcUserDemandRecService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -87,7 +87,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl search(PartyUnitFormDTO formDTO) { @@ -104,10 +105,10 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl pageInfo = new PageInfo<>(list); List dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); Result> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(formDTO.getCustomerId()); - codeFormDTO.setParentCategoryCode("1010"); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + //服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表 + List serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + dtoList.forEach(item -> { item.setType(unitTypeMap.getData().get(item.getType())); if (StringUtils.isNotBlank(item.getServiceMatter())) { @@ -138,10 +139,9 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl list = baseDao.selectList(wrapper); List dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); Result> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(formDTO.getCustomerId()); - codeFormDTO.setParentCategoryCode("1010"); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + //服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表 + List serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); dtoList.forEach(item -> { item.setType(unitTypeMap.getData().get(item.getType())); if (StringUtils.isNotBlank(item.getServiceMatter())) { @@ -312,10 +312,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getLabel, OptionDTO::getValue)); + List serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //1.数据校验 Iterator iterator = result.iterator(); while (iterator.hasNext()) { diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java index 6e2a67aa17..5572a48f48 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java +++ b/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.LatestActContentDTO; 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.DraftActContentFormDTO; import com.epmet.dto.form.work.DraftActInfoFormDTO; @@ -43,14 +42,10 @@ public class WorkActDraftServiceImpl implements WorkActDraftService { @Autowired private LatestActContentService latestActContentService; @Resource - private IcResiDemandDictService icResiDemandDictService; + private IcServiceItemDictService icServiceItemDictService; @Resource private IcPartyUnitService icPartyUnitService; - /** - * 服务事项code - */ - private static final String SERVICE_MATTER_CODE = "1010"; /** * @return com.epmet.dto.form.work.PublishActInitResultDTO @@ -142,10 +137,8 @@ public class WorkActDraftServiceImpl implements WorkActDraftService { if (StringUtils.isNotBlank(actPreviewResultDTO.getServiceMatter())) { //获取服务事项 - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(formDTO.getCustomerId()); - codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + List serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); actPreviewResultDTO.setServiceMatterName(categoryMap.get(actPreviewResultDTO.getServiceMatter())); } if (StringUtils.isNotBlank(actPreviewResultDTO.getUnitId())) { diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index e113d72019..7b076059b9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/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.UserMessageFormDTO; import com.epmet.dto.form.WxSubscribeMessageFormDTO; -import com.epmet.dto.form.demand.SubCodeFormDTO; import com.epmet.dto.form.work.*; import com.epmet.dto.result.ActSponsorResultDTO; import com.epmet.dto.result.demand.OptionDTO; @@ -34,6 +33,7 @@ import com.epmet.entity.*; import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.*; +import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -99,10 +99,9 @@ public class WorkActServiceImpl implements WorkActService { @Resource private IcPartyActivityService icPartyActivityService; @Resource - private IcResiDemandDictService icResiDemandDictService; - @Resource private IcPartyUnitService icPartyUnitService; - + @Resource + private IcServiceItemDictService icServiceItemDictService; /** @@ -782,11 +781,10 @@ public class WorkActServiceImpl implements WorkActService { if (StringUtils.isNotBlank(canceledActDetailResultDTO.getServiceMatter())) { //获取服务事项 - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(customerId); - codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); - canceledActDetailResultDTO.setServiceMatterName(categoryMap.get(canceledActDetailResultDTO.getServiceMatter())); + List serviceItemList = icServiceItemDictService.queryDictList(customerId); + Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + canceledActDetailResultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(canceledActDetailResultDTO.getServiceMatter()) ? + categoryMap.get(canceledActDetailResultDTO.getServiceMatter()) : StrConstant.EPMETY_STR); } if (StringUtils.isNotBlank(canceledActDetailResultDTO.getUnitId())) { //获取单位名称 @@ -840,11 +838,9 @@ public class WorkActServiceImpl implements WorkActService { if (StringUtils.isNotBlank(resultDTO.getServiceMatter())) { //获取服务事项 - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(formDTO.getCustomerId()); - codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); - resultDTO.setServiceMatterName(categoryMap.get(resultDTO.getServiceMatter())); + List serviceItemList = icServiceItemDictService.queryDictList(formDTO.getCustomerId()); + Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + resultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(resultDTO.getServiceMatter()) ? categoryMap.get(resultDTO.getServiceMatter()) : StrConstant.EPMETY_STR); } if (StringUtils.isNotBlank(resultDTO.getUnitId())) { //获取单位名称 @@ -921,11 +917,9 @@ public class WorkActServiceImpl implements WorkActService { } if (StringUtils.isNotBlank(resultDTO.getServiceMatter())) { //获取服务事项 - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(customerId); - codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); - resultDTO.setServiceMatterName(categoryMap.get(resultDTO.getServiceMatter())); + List serviceItemList=icServiceItemDictService.queryDictList(customerId); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + resultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(resultDTO.getServiceMatter()) ? categoryMap.get(resultDTO.getServiceMatter()) : StrConstant.EPMETY_STR); } if (StringUtils.isNotBlank(resultDTO.getUnitId())) { //获取单位名称 @@ -1317,11 +1311,9 @@ public class WorkActServiceImpl implements WorkActService { if (StringUtils.isNotBlank(resultDTO.getServiceMatter())) { //获取服务事项 - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(customerId); - codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); - resultDTO.setServiceMatterName(categoryMap.get(resultDTO.getServiceMatter())); + List serviceItemList=icServiceItemDictService.queryDictList(customerId); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + resultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(resultDTO.getServiceMatter()) ? categoryMap.get(resultDTO.getServiceMatter()) : StrConstant.EPMETY_STR); } if (StringUtils.isNotBlank(resultDTO.getUnitId())) { //获取单位名称 From 11162c3cd902aed6279722c299c188f5cbcb7c68 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 20 Jan 2022 14:10:33 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E4=BA=8B=E9=A1=B9?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AE=E4=BF=AE=E6=94=B9=EF=BC=9A?= =?UTF-8?q?=E8=81=94=E5=BB=BA=E5=8D=95=E4=BD=8D=E7=BD=AE=E7=A9=BA=EF=BC=8C?= =?UTF-8?q?=E8=81=94=E5=BB=BA=E6=B4=BB=E5=8A=A8=EF=BC=88=E6=80=BB=E7=BB=93?= =?UTF-8?q?=EF=BC=89=E4=BF=AE=E6=94=B9=E4=B8=BA=E6=96=B0=E7=9A=84=E7=BC=96?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E5=8F=91=E5=B8=83=E7=9A=84=E8=81=94=E5=BB=BA?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=94=B9=E4=B8=BA=E6=96=B0=E7=9A=84=E7=BC=96?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../V0.0.10__update_service_item.sql | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.10__update_service_item.sql diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.10__update_service_item.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.10__update_service_item.sql new file mode 100644 index 0000000000..e07a359452 --- /dev/null +++ b/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' ; \ No newline at end of file