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 c88dde6e87..180877f027 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 @@ -57,6 +57,7 @@ import org.apache.commons.fileupload.FileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.lang3.StringUtils; import org.apache.http.entity.ContentType; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.commons.CommonsMultipartFile; @@ -418,6 +419,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl>().ok(articleService.getLatestArticleList(commonArticleListFormDTO)); } + /** + * @param formDTO + * @return 烟台钉钉应用:实时动态周边疫情 就业服务 警民互动 物业通知 党务公开 居务公开 财务公开 以上标签在实时动态里写死吧 + * 包括最新活动 + */ + @PostMapping("article-list-ytding") + public Result> pageArticleListByTagName(@RequestBody CommonArticleListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, CommonArticleListFormDTO.YanTaiShowGroup.class); + return new Result>().ok(articleService.pageArticleListByTagName(formDTO.getPageNo(), + formDTO.getPageSize(), + formDTO.getGridId(), + formDTO.getTagName())); + } + + /** * @param articlePageFormDTO * @return List diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java index 3a549dfa61..53524c9bb7 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java @@ -167,4 +167,16 @@ public interface ArticleDao extends BaseDao { List subjectList(@Param("pidList")List pidList); List selectAllArticle(ArticleListFormDTO formDTO); + + /** + * 根据标签名,查询文章列表 + * @param gridId + * @param tagName + * @param customerId + * @return + */ + List pageArticleListByTagName(@Param("gridId")String gridId, + @Param("tagName")String tagName, + @Param("customerId")String customerId, + @Param("agencyId")String agencyId); } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java index dca18d0bb7..d9374b1263 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java @@ -278,4 +278,18 @@ public interface ArticleService extends BaseService { * @param currentOperUserId */ void delete(List articleIds,String customerId,String currentOperUserId); + + /** + * 烟台钉钉居民端:需求来源:烟台钉钉应用:实时动态周边疫情 就业服务 警民互动 物业通知 党务公开 居务公开 财务公开 以上标签在实时动态里写死吧 + * + * @param pageNo + * @param pageSize + * @param gridId + * @param tagName + * @return + */ + PageData pageArticleListByTagName(Integer pageNo, + Integer pageSize, + String gridId, + String tagName); } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index b0e780209a..a1777b5056 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -42,10 +42,7 @@ import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.user.LoginUserUtil; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.utils.ScanContentUtils; +import com.epmet.commons.tools.utils.*; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constant.*; import com.epmet.dao.*; @@ -2007,5 +2004,24 @@ public class ArticleServiceImpl extends BaseServiceImpl pageArticleListByTagName(Integer pageNo, Integer pageSize, String gridId, String tagName) { + PageHelper.startPage(pageNo, pageSize); + List list = baseDao.pageArticleListByTagName( + gridId, + tagName, + EpmetRequestHolder.getLoginUserCustomerId(), + null); + PageInfo pageInfo = new PageInfo<>(list); + return new PageData<>(list, pageInfo.getTotal()); + } } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml index 379e7fbbc1..5e67b953a0 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml @@ -481,6 +481,7 @@ WHERE del_flag = '0' AND article_id = a.id AND agency_id = #{publishRangeId} + and PUBLISH_STATUS='published' ) @@ -489,6 +490,7 @@ WHERE del_flag = '0' AND article_id = a.id AND grid_id = #{publishRangeId} + and PUBLISH_STATUS='published' ) @@ -506,4 +508,43 @@ ORDER BY a.publish_date DESC, a.updated_time DESC + + diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/CustomerInitFormDTO.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/CustomerInitFormDTO.java index 04a40b5871..def7584d23 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/CustomerInitFormDTO.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/CustomerInitFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.form; import lombok.Data; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; /** @@ -12,11 +13,55 @@ import java.io.Serializable; @Data public class CustomerInitFormDTO implements Serializable { - public interface GetCustomerDetailGroup { - } + /** + * 初始化带小程序的客户 + */ + public interface InitMiniAppCustomerGroup {} + + /** + * 初始化本地客户 + */ + public interface InitLocalCustomerGroup {} - @NotBlank(message = "客户Id不能为空", groups = {GetCustomerDetailGroup.class}) + @NotBlank(message = "客户Id不能为空", groups = {InitMiniAppCustomerGroup.class}) private String customerId; + @NotNull(message = "缺少paCustomer信息", groups = InitLocalCustomerGroup.class) + private PaCustomer paCustomer; + @NotNull(message = "缺少paCustomerAgency信息", groups = InitLocalCustomerGroup.class) + private PaCustomerAgency paAgency; + @NotNull(message = "缺少paUser信息", groups = InitLocalCustomerGroup.class) + private PaUser paUser; + + + @Data + public static class PaCustomer { + private String customerName; + private String isInitialize; + private String source; + private String type; + } + + @Data + public static class PaCustomerAgency { + private String id; + private String agencyName; + private String areaCode; + private String city; + private String customerId; + private String district; + private String level; + private String levelNum; + private Integer partybranchnum; + private String province; + } + + @Data + public static class PaUser { + private String gender; + private String phone; + private String realName; + } + } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java index 907ffbc967..6b3fe736cb 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java @@ -257,11 +257,23 @@ public class CustomerController { **/ @PostMapping("init") public Result init(@RequestBody CustomerInitFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO, CustomerInitFormDTO.GetCustomerDetailGroup.class); + ValidatorUtils.validateEntity(formDTO, CustomerInitFormDTO.InitMiniAppCustomerGroup.class); customerService.init(formDTO); return new Result(); } + /** + * 本地初始化客户,不经过小程序 + * @param formDTO + * @return + */ + @PostMapping("initLocally") + public Result initLocally(@RequestBody CustomerInitFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, CustomerInitFormDTO.InitLocalCustomerGroup.class); + customerService.initLocal(formDTO); + return new Result(); + } + /** * desc:获取所有未删除的客户 * @return diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java index f1efa2d087..c0ae3c1309 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java @@ -166,6 +166,11 @@ public interface CustomerService extends BaseService { **/ void init(CustomerInitFormDTO formDTO); + /** + * 本地初始化(不走小程序) + */ + void initLocal(CustomerInitFormDTO input); + /** * desc:获取所有客户列表 * @return diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java index 856a72c96d..0c1c2a3d47 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java @@ -22,6 +22,7 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.rocketmq.messages.InitCustomerMQMsg; import com.epmet.commons.tools.constant.FieldConstant; @@ -585,6 +586,74 @@ public class CustomerServiceImpl extends BaseServiceImpl resultPoint = epmetPointOpenFeignClient.initPointRule(customerId); + if (!resultPoint.success()) { + throw new RenException(resultPoint.getCode(), resultPoint.getInternalMsg()); + } + + //9.新客户初始化评价指标 权重 + InitCustomerIndexForm indexForm = new InitCustomerIndexForm(); + indexForm.setCustomerId(customerId); + Result resultData = dataStatisticalOpenFeignClient.initCustomerIndex(indexForm); + if (!resultData.success()) { + throw new RenException(resultData.getCode(), resultData.getInternalMsg()); + } + //2021.1.25 end + + } + private InitCustomerMQMsg.InitCustomerStaff constructStaffInfo4CustomerInit(String agencyId, PaUserDTO paUser) { InitCustomerMQMsg.InitCustomerStaff staff = new InitCustomerMQMsg.InitCustomerStaff(); staff.setAgencyId(agencyId);