diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml index ee8caafc3e..d2c47a0922 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml @@ -27,25 +27,12 @@ ca.level, ca.area_code, ca.parent_area_code, - ( CASE WHEN ca.longitude is null THEN - ( SELECT longitude FROM customer_agency - WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id) - ORDER BY pid ASC LIMIT 1 - ) - ELSE ca.longitude - END - ) longitude, - ( CASE WHEN ca.latitude is null THEN - ( SELECT latitude FROM customer_agency - WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id) - ORDER BY pid ASC LIMIT 1 - ) - ELSE ca.latitude - END - ) latitude + IFNULL(ca.longitude, cc.longitude) longitude, + IFNULL(ca.latitude, cc.latitude) latitude FROM customer_staff_agency csa INNER JOIN customer_agency ca ON csa.agency_id = ca.id + INNER JOIN customer_agency cc ON cc.pid = '0' AND ca.customer_id = cc.customer_id WHERE csa.del_flag = '0' AND ca.del_flag = '0' diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java index b747b77985..10180e0222 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java @@ -44,6 +44,27 @@ public class ActInfoDTO implements Serializable { */ private String customerId; + /** + * 活动类型爱心活动heart 联建活动party + */ + private String actType; + + /** + * 联建单位 + */ + private String unitId; + private String unitName; + /** + * 活动目标 + */ + private String target; + + /** + * 服务事项 + */ + private String serviceMatter; + private String serviceMatterName; + /** * 活动标题 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActDraftController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActDraftController.java index e960a2f926..9d018d7d81 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActDraftController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActDraftController.java @@ -1,5 +1,7 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.work.*; @@ -82,8 +84,9 @@ public class WorkActDraftController { * @Date 2020/7/21 17:24 **/ @PostMapping("preview") - public Result previewActDetail(@RequestBody ActPreviewFormDTO formDTO){ + public Result previewActDetail(@LoginUser TokenDto tokenDto, @RequestBody ActPreviewFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO,ActPreviewFormDTO.UserInternalGroup.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); ActPreviewResultDTO resultDTO=workActDraftService.previewActDetail(formDTO); return new Result().ok(resultDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 17833fe7cb..45a1e6f1f8 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -373,6 +373,9 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl SELECT ISSUE_ID, - SUPPORT_COUNT, - OPPOSITION_COUNT, - VOTABLE_COUNT + SUPPORT_COUNT AS supportAmount, + OPPOSITION_COUNT AS oppositionAmount, + VOTABLE_COUNT AS shouldVoteCount FROM issue_vote_statistical WHERE DEL_FLAG = '0' AND ISSUE_ID = #{issueId} diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index be7125e80c..13629cef31 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -190,23 +190,10 @@ ca.organization_name AS "agencyName", ca.pids AS "pids", ca.level level, - ( CASE WHEN ca.longitude is null THEN - ( SELECT longitude FROM customer_agency - WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id) - ORDER BY pid ASC LIMIT 1 - ) - ELSE ca.longitude - END - ) longitude, - ( CASE WHEN ca.latitude is null THEN - ( SELECT latitude FROM customer_agency - WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id) - ORDER BY pid ASC LIMIT 1 - ) - ELSE ca.latitude - END - ) latitude + IFNULL(ca.longitude, cc.longitude) longitude, + IFNULL(ca.latitude, cc.latitude) latitude FROM customer_agency ca + INNER JOIN customer_agency cc ON cc.pid = '0' AND ca.customer_id = cc.customer_id WHERE ca.del_flag = '0' AND ca.pids = #{subAgencyPids} ORDER BY ca.created_time DESC diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml index a08a4f534c..4c34ea5bed 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml @@ -409,25 +409,11 @@ ) agencyGridName, cg.grid_name gridName, - ( CASE WHEN cg.longitude is null THEN - ( SELECT longitude FROM customer_agency - WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id) - ORDER BY pid ASC LIMIT 1 - ) - ELSE cg.longitude - END - ) longitude, - ( CASE WHEN cg.latitude is null THEN - ( SELECT latitude FROM customer_agency - WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id) - ORDER BY pid ASC LIMIT 1 - ) - ELSE cg.latitude - END - ) latitude + IFNULL(cg.longitude, ca.longitude) longitude, + IFNULL(cg.latitude, ca.latitude) latitude FROM customer_grid cg - INNER JOIN customer_agency ca ON cg.pid = ca.id + INNER JOIN customer_agency ca ON ca.pid = '0' AND ca.customer_id = cg.customer_id WHERE cg.del_flag = '0' AND ca.del_flag = '0' @@ -758,25 +744,11 @@ cg.contacts, cg.mobile, - ( CASE WHEN cg.longitude is null THEN - ( SELECT longitude FROM customer_agency - WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id) - ORDER BY pid ASC LIMIT 1 - ) - ELSE cg.longitude - END - ) longitude, - ( CASE WHEN cg.latitude is null THEN - ( SELECT latitude FROM customer_agency - WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id) - ORDER BY pid ASC LIMIT 1 - ) - ELSE cg.latitude - END - ) latitude + IFNULL(cg.longitude,ca.longitude) longitude, + IFNULL(cg.latitude,ca.latitude) latitude FROM customer_grid cg - INNER JOIN customer_agency ca ON cg.pid = ca.id + INNER JOIN customer_agency ca ON ca.pid = '0' AND ca.customer_id = cg.customer_id WHERE cg.del_flag = '0' AND ca.del_flag = '0'