Browse Source

Merge remote-tracking branch 'remotes/origin/dev_bugfix' into dev_screen_data_2.0

# Conflicts:
#	epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java
dev_shibei_match
jianjun 5 years ago
parent
commit
e7b359a2a1
  1. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java
  2. 21
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
  3. 2
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/CommonPageUserFormDTO.java
  4. 54
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java
  5. 3
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  6. 2
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java

@ -34,7 +34,7 @@ public class PublicPartiProfileResultDTO implements Serializable {
/**
* 较上月趋势incr上升decr下降
* */
*/
private String issueCompareLatestTrend = "";
/**
@ -42,6 +42,9 @@ public class PublicPartiProfileResultDTO implements Serializable {
*/
private BigDecimal averageJoin = new BigDecimal(NumConstant.ZERO);
/**
* 较上月百分比
*/
private String joinCompareLatestMonth = "";
private String joinCompareLatestTrend = "";

21
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java

@ -108,18 +108,17 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
UserJoinIndicatorGrowthRateResultDTO latest = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId);
//保证获取公众参与概率数据的最大可能性
int time = NumConstant.TWELVE;
while(null == latest && time > NumConstant.ONE)
{
time --;
monthId = dateUtils.getPreviousMonthIdByDest(null,monthId);
latest = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId);
}
while (null == latest && time > NumConstant.ONE) {
time--;
monthId = dateUtils.getPreviousMonthIdByDest(null, monthId);
latest = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId);
}
if(null == latest) return new PublicPartiProfileResultDTO();
PublicPartiProfileResultDTO result = ConvertUtils.sourceToTarget(latest,PublicPartiProfileResultDTO.class);
result.setMonthIncr(convertPercentStr(latest.getMonthIncr(),NumConstant.ZERO));
result.setJoinCompareLatestMonth(convertPercentStr(latest.getJoinCompareLatestMonth(),NumConstant.ZERO));
result.setIssueCompareLatestMonth(convertPercentStr(latest.getIssueCompareLatestMonth(),NumConstant.ZERO));
if (null == latest) return new PublicPartiProfileResultDTO();
PublicPartiProfileResultDTO result = ConvertUtils.sourceToTarget(latest, PublicPartiProfileResultDTO.class);
result.setMonthIncr(convertPercentStr(latest.getMonthIncr(), NumConstant.ZERO));
result.setJoinCompareLatestMonth(convertPercentStr(latest.getJoinCompareLatestMonth().abs(), NumConstant.ZERO));
result.setIssueCompareLatestMonth(convertPercentStr(latest.getIssueCompareLatestMonth().abs(), NumConstant.ZERO));
return result;
}

2
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/CommonPageUserFormDTO.java

@ -27,6 +27,6 @@ public class CommonPageUserFormDTO implements Serializable {
private Integer pageSize = 10;
@NotBlank(message = "获取不到户Id" , groups = PageUserGroup.class)
@NotBlank(message = "获取不到户Id" , groups = PageUserGroup.class)
private String customerId;
}

54
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java

@ -7,8 +7,10 @@ import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CodeConstant;
import com.epmet.constant.ModuleConstant;
import com.epmet.dao.AuthorizationInfoDao;
import com.epmet.dao.ComponentAccessTokenDao;
import com.epmet.dao.MiniInfoDao;
@ -17,7 +19,9 @@ import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.OperCrmOpenFeignClient;
import com.epmet.feign.OssFeignClient;
import com.epmet.redis.RedisThird;
import com.epmet.service.*;
import com.epmet.wxapi.constant.WxMaCodeConstant;
import com.epmet.wxapi.param.*;
import com.epmet.wxapi.result.*;
import com.epmet.wxapi.service.WxMaCodeService;
@ -27,6 +31,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -71,6 +76,11 @@ public class CodeServiceImpl implements CodeService {
private MiniInfoDao miniInfoDao;
@Autowired
private OperCrmOpenFeignClient operCrmOpenFeignClient;
@Autowired
private RedisThird redisThird;
@Value("${third.platform.appId}")
private String componentAppId;
@Override
public List<TemplateListResultDTO> templateList() {
@ -117,29 +127,42 @@ public class CodeServiceImpl implements CodeService {
if (null == authInfo) {
throw new RenException("未授权");
}
/*CustomerDTO customerFormDTO = new CustomerDTO();
customerFormDTO.setId(formDTO.getCustomerId());
Result<CustomerDTO> result = operCrmOpenFeignClient.getCustomerInfo(customerFormDTO);
if (!result.success()) {
throw new RenException(result.getCode(), result.getMsg());
}*/
String customerName = "";
Result<List<CustomerDTO>> customerList = operCrmOpenFeignClient.getAllCustomerList();
if (customerList.success()) {
for (CustomerDTO dto : customerList.getData()) {
if(formDTO.getCustomerId().equals(dto.getId())) {
customerName = dto.getCustomerName();
}
}
}
String resiName = "";
String workName = "";
if(CodeConstant.RESI.equals(formDTO.getClientType())) {
resiName = getNickName(authInfo.getAuthorizerAppid());
AuthorizationInfoDTO workAuthInfo = authorizationInfoDao.getAuthInfoByCustomer(formDTO.getCustomerId(), CodeConstant.WORK);
workName = getNickName(workAuthInfo.getAuthorizerAppid());
} else {
workName = getNickName(authInfo.getAuthorizerAppid());
AuthorizationInfoDTO resiAuthInfo = authorizationInfoDao.getAuthInfoByCustomer(formDTO.getCustomerId(), CodeConstant.RESI);
resiName = getNickName(resiAuthInfo.getAuthorizerAppid());
}
//获取小程序居民端与工作端名称
String resiName = miniInfoDao.getNickName(formDTO.getCustomerId(), CodeConstant.RESI);
String workName = miniInfoDao.getNickName(formDTO.getCustomerId(), CodeConstant.WORK);
String extJson = getExtJson(formDTO);
WxExtJson wxExtJson = JSONObject.parseObject(extJson, WxExtJson.class);
wxExtJson.setExtAppid(authInfo.getAuthorizerAppid());
wxExtJson.getExt().setExtAppid(authInfo.getAuthorizerAppid());
wxExtJson.getExt().setResiName(resiName);
wxExtJson.getExt().setWorkName(workName);
//wxExtJson.getExt().setCustomerName(null == result.getData().getCustomerName()?"":result.getData().getCustomerName());
wxExtJson.getExt().setCustomerName("");
wxExtJson.getExt().setCustomerName(customerName);
if (CodeConstant.RESI.equals(formDTO.getClientType())) {
wxExtJson.getWindow().setNavigationBarTitleText(resiName);
} else {
wxExtJson.getWindow().setNavigationBarTitleText(workName);
}
extJson = JSON.toJSONString(wxExtJson);
log.info(extJson);
CodeExtDTO codeExtDTO = codeExtService.getExtByCustomer(formDTO.getCustomerId(), formDTO.getClientType());
if (null == codeExtDTO) {
codeExtDTO = new CodeExtDTO();
@ -729,4 +752,15 @@ public class CodeServiceImpl implements CodeService {
codeOperationHistoryService.save(operationDTO);
}
private String getNickName(String appId) {
JSONObject jsonObject = new JSONObject();
jsonObject.put(ModuleConstant.COMPONENT_APP_ID,componentAppId);
jsonObject.put(ModuleConstant.AUTHORIZER_APP_ID,appId);
String componentAccessToken = componentAccessTokenDao.getComponentAccessToken();
String data = HttpClientManager.getInstance().sendPostByJSON(WxMaCodeConstant.API_GET_AUTHORIZER_INFO + componentAccessToken , JSON.toJSONString(jsonObject)).getData();
Map map = JSON.parseObject(data, Map.class);
Map authInfo = (Map) map.get(ModuleConstant.AUTHORIZER_INFO);
return ConvertUtils.mapToEntity(authInfo, MiniInfoFormDTO.class).getNick_name();
}
}

3
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -458,6 +458,9 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
ProjectStaffDTO projectStaffDTO = projectStaffService.getProjectStaffInfo(fromDTO.getProjectProcessId());
ProjectStaffEntity projectStaff = ConvertUtils.sourceToTarget(projectStaffDTO, ProjectStaffEntity.class);
projectStaff.setId(null);
//防止将被退回的项目相关人员节点的创建时间赋值给新增的相关人员节点的创建时间,否则数据统计将出现误差
projectStaff.setCreatedTime(null);
projectStaff.setUpdatedTime(null);
projectStaff.setProcessId(projectProcessEntity.getId());
projectStaff.setIsHandle(ProjectConstant.UNHANDLED);
projectStaffService.insert(projectStaff);

2
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java

@ -225,7 +225,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
//人工审核数据状态设为通过
PartymemberConfirmManualDTO partymemberConfirmManualDTO =
partymemberConfirmManualService.getInfoByPartyMemberInfoId(partyMemberInfoDTO.getId());
partymemberConfirmManualService.getInfoByPartyMemberInfoId(partyMemberInfoEntity.getId());
if (null != partymemberConfirmManualDTO) {
partymemberConfirmManualDTO.setAuditStatus(PartyMemberConstant.APPROVED);
partymemberConfirmManualService.updateById(ConvertUtils.sourceToTarget(partymemberConfirmManualDTO,

Loading…
Cancel
Save