Browse Source

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

master
jianjun 4 years ago
parent
commit
0b3d2ae316
  1. 19
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml
  2. 21
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java
  3. 5
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActDraftController.java
  4. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  5. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java
  6. 6
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDao.xml
  7. 19
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  8. 40
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

19
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'

21
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;
/**
* 活动标题
*/

5
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<ActPreviewResultDTO> previewActDetail(@RequestBody ActPreviewFormDTO formDTO){
public Result<ActPreviewResultDTO> 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<ActPreviewResultDTO>().ok(resultDTO);
}

3
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<IcUserDemandRecD
//待处理+已派单才可以指派
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), String.format("需求当前状态为【%s】,不可指派",entity.getStatus()),"当前状态,不可指派");
}
if (UserDemandConstant.VOLUNTEER.equals(formDTO.getServiceType()) && formDTO.getServerId().equals(entity.getDemandUserId())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), String.format("居民端用户上报的需求【%s】,需求人与服务方(志愿者)不能同为一人", entity.getId()), "需求人与服务方不能同为一人");
}
//1、修改主表
//置为已派单
entity.setStatus(UserDemandConstant.ASSIGNED);

2
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java

@ -256,7 +256,7 @@ public class IssueVoteDetailRedis {
IssueDTO issue = issueService.get(issueId);
if(null != issue){
// 如果是表决中的议题,数据现算
VoteRedisFormDTO voteCache = new VoteRedisFormDTO();
VoteRedisFormDTO voteCache;
if (issue.getIssueStatus().equals(IssueConstant.ISSUE_VOTING)){
SelectIssueVotingDetailFormDTO formDTO = new SelectIssueVotingDetailFormDTO();
formDTO.setIssueId(issueId);

6
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDao.xml

@ -119,9 +119,9 @@
<select id="selectVoteDetail" resultType="com.epmet.dto.form.VoteRedisFormDTO">
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}

19
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

40
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'

Loading…
Cancel
Save