Browse Source

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

feature/dangjian
wanggongfeng 4 years ago
parent
commit
a96c2610d6
  1. 2
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java
  2. 23
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java
  3. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
  4. 1
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
  5. 56
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/ActivePointLogServiceImpl.java
  6. 5
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/ActivePointLogDao.xml
  7. 2
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/UserEntity.java
  8. 1
      esua-epdc/kettle-Code/esua_epdc_analysis_job/analysis_extracting/epdc_issue_item_statistics_plantform_item_extracting.ktr
  9. 19
      esua-epdc/kettle-Code/esua_epdc_behavior/behavior.kjb
  10. 6
      esua-epdc/kettle-Code/esua_epdc_behavior/behavior_basic.kjb
  11. 4
      esua-epdc/kettle-Code/governanceRankingMonth/organization/base_and_common/epdc_gr_street_month_new_TYPICAL_CASE.ktr

2
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java

@ -369,7 +369,7 @@ public interface UserFeignClient {
/** /**
* 志愿者认证 * 志愿者认证
* *needCachingUserInfoByUserId
* @param userId * @param userId
* @return * @return
*/ */

23
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java

@ -741,7 +741,10 @@ public class AppUserServiceImpl implements AppUserService {
// IP地址 // IP地址
HttpServletRequest request = HttpContextUtils.getHttpServletRequest(); HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
return this.dealWithUserRegisterState(userResult.getData(), openId, unionId, IpUtils.getIpAddr(request), formDto.getInviteUserId(), formDto.getGridId());
Result<EpdcAppAuthorizationDTO> result = this.dealWithUserRegisterState(userResult.getData(), openId, unionId, IpUtils.getIpAddr(request), formDto.getInviteUserId(), formDto.getGridId());
return result;
} }
@Override @Override
@ -758,16 +761,6 @@ public class AppUserServiceImpl implements AppUserService {
} }
epdcAppUserRegisterFormDTO.setWxCode(formDto.getWxCode()); epdcAppUserRegisterFormDTO.setWxCode(formDto.getWxCode());
Result<EpdcAppAuthorizationDTO> maV2Token = this.getMaV2Token(epdcAppUserRegisterFormDTO); Result<EpdcAppAuthorizationDTO> maV2Token = this.getMaV2Token(epdcAppUserRegisterFormDTO);
// 注册埋点
if (maV2Token.success()) {
PointLogFormDTO pointLogFormDTO = new PointLogFormDTO();
pointLogFormDTO.setType(BehaviorEnum.POINTS_REGISTER_RULES.getValue());
pointLogFormDTO.setUserId(maV2Token.getData().getUserId());
pointFeignClient.updataPoint(pointLogFormDTO);
} else {
log.error("报错:"+maV2Token.getMsg() + "-" + maV2Token.toString());
}
return maV2Token; return maV2Token;
} }
@ -987,6 +980,11 @@ public class AppUserServiceImpl implements AppUserService {
Result<CachingUserInfoDTO> cachingUserResult = userFeignClient.needCachingUserInfoByUserId(tokenDto.getUserId()); Result<CachingUserInfoDTO> cachingUserResult = userFeignClient.needCachingUserInfoByUserId(tokenDto.getUserId());
CachingUserInfoDTO cachingUserInfoDTO = cachingUserResult.getData(); CachingUserInfoDTO cachingUserInfoDTO = cachingUserResult.getData();
EpdcAppAuthorizationDTO authorizationDto = cachingUserInfoForAuthorization(cachingUserInfoDTO, user.getGrid(), user.getState()); EpdcAppAuthorizationDTO authorizationDto = cachingUserInfoForAuthorization(cachingUserInfoDTO, user.getGrid(), user.getState());
// 注册埋点
PointLogFormDTO pointLogFormDTO = new PointLogFormDTO();
pointLogFormDTO.setType(BehaviorEnum.POINTS_REGISTER_RULES.getValue());
pointLogFormDTO.setUserId(authorizationDto.getUserId());
pointFeignClient.updataPoint(pointLogFormDTO);
// 党员认证失败 // 党员认证失败
if (100006001 == completeResult.getCode()) { if (100006001 == completeResult.getCode()) {
@ -996,10 +994,11 @@ public class AppUserServiceImpl implements AppUserService {
} }
// 更新社群用户党员标识并加入关联的所有网格党员群 // 更新社群用户党员标识并加入关联的所有网格党员群
boolean partyFlag = UserTagUtils.containIdentity(cachingUserInfoDTO.getUserTagInfos(), UserTagEnum.PARTY_MEMBER); boolean partyFlag = UserTagUtils.containIdentity(cachingUserInfoDTO.getUserTagInfos(), UserTagEnum.PARTY_MEMBER);
if (partyFlag) { if (partyFlag) {
initPartyGroupInfo(cachingUserInfoDTO); initPartyGroupInfo(cachingUserInfoDTO);
// 积分埋点 党员认证规则 // 积分埋点 党员认证规则
PointLogFormDTO pointLogFormDTO = new PointLogFormDTO(); pointLogFormDTO = new PointLogFormDTO();
pointLogFormDTO.setType(BehaviorEnum.POINTS_PARTY_AUTHENTICATION_RULES.getValue()); pointLogFormDTO.setType(BehaviorEnum.POINTS_PARTY_AUTHENTICATION_RULES.getValue());
pointLogFormDTO.setUserId(tokenDto.getUserId()); pointLogFormDTO.setUserId(tokenDto.getUserId());
pointFeignClient.updataPoint(pointLogFormDTO); pointFeignClient.updataPoint(pointLogFormDTO);

2
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml

@ -512,7 +512,7 @@
<foreach collection="deptIdList" item="id" index="index" open="(" close=")" separator=","> <foreach collection="deptIdList" item="id" index="index" open="(" close=")" separator=",">
#{id} #{id}
</foreach> </foreach>
and date_format( CREATED_TIME, '%Y-%m-%d' ) > date_format( date_add( now( ), INTERVAL - 90 day), '%Y-%m-%d' ) <![CDATA[ and date_format( CREATED_TIME, '%Y-%m-%d' ) > date_format( date_add( now( ), INTERVAL - 90 day), '%Y-%m-%d' ) ]]>
</select> </select>
<resultMap id="workIssueList" type="com.elink.esua.epdc.dto.issue.result.WorkIssueListResultDTO"> <resultMap id="workIssueList" type="com.elink.esua.epdc.dto.issue.result.WorkIssueListResultDTO">

1
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml

@ -842,6 +842,7 @@
WHERE WHERE
DEL_FLAG = '0' DEL_FLAG = '0'
AND GRID_ID = #{deptId} AND GRID_ID = #{deptId}
AND EVENT_ID is not null
AND ITEM_STATE = #{state} AND ITEM_STATE = #{state}
AND ID NOT IN ( AND ID NOT IN (
SELECT SELECT

56
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/ActivePointLogServiceImpl.java

@ -161,11 +161,14 @@ public class ActivePointLogServiceImpl extends BaseServiceImpl<ActivePointLogDao
if (BehaviorEnum.POINTS_SIGN_RULES.getValue().equals(formDTO.getType())) { if (BehaviorEnum.POINTS_SIGN_RULES.getValue().equals(formDTO.getType())) {
// 获取五天之内签到次数 // 获取五天之内签到次数
int signCount = baseDao.selectDoubleTimeCount(formDTO); int signCount = baseDao.selectDoubleTimeCount(formDTO);
if (signCount >= 5) { if (signCount >= Integer.parseInt(doubleTime)) {
// 开启加倍 // 开启加倍
points = Integer.parseInt(points) * 2 + ""; points = Integer.parseInt(points) * 2 + "";
} }
} }
if ("0".equals(priod)) {
priod = "3";
}
// 查询当前用户积分状态 判断是否上线(次数) (上限) // 查询当前用户积分状态 判断是否上线(次数) (上限)
Map<String, String> parames = new HashMap<>(); Map<String, String> parames = new HashMap<>();
parames.put("userId", formDTO.getUserId()); parames.put("userId", formDTO.getUserId());
@ -173,36 +176,35 @@ public class ActivePointLogServiceImpl extends BaseServiceImpl<ActivePointLogDao
parames.put("priod", priod); parames.put("priod", priod);
UserPointInfo pointInfo = baseDao.selectByType(parames); UserPointInfo pointInfo = baseDao.selectByType(parames);
// 只允许加一次积分 并且 已经加过了 // 只允许加一次积分 并且 已经加过了
if ("0".equals(priod) && pointInfo.getPointTimeCount() != 0) { if (pointInfo.getPointTimeCount() >= Integer.parseInt(time) || pointInfo.getPointCount() >= Integer.parseInt(limit)) {
return; return;
} }
//没达到上限可以继续添加积分操作 //没达到上限可以继续添加积分操作
ActivePointLogEntity logEntity = new ActivePointLogEntity(); ActivePointLogEntity logEntity = new ActivePointLogEntity();
if (pointInfo.getPointCount() < Integer.parseInt(limit) && pointInfo.getPointTimeCount() < Integer.parseInt(time)) { // 获取用户真实姓名
// 获取用户真实姓名 Result<EpdcUserInfoResultDTO> infoById = userFeignClient.getInfoById(formDTO.getUserId());
Result<EpdcUserInfoResultDTO> infoById = userFeignClient.getInfoById(formDTO.getUserId());
logEntity.setUserId(formDTO.getUserId());
logEntity.setUserId(formDTO.getUserId()); logEntity.setOperationType(PointsOperationConstant.OPERATION_ADD);
logEntity.setOperationType(PointsOperationConstant.OPERATION_ADD); logEntity.setPoints(Integer.parseInt(points));
logEntity.setPoints(Integer.parseInt(points)); logEntity.setOperationCode(operationCode);
logEntity.setOperationCode(operationCode); logEntity.setOperationDesc(operationDesc);
logEntity.setOperationDesc(operationDesc); logEntity.setOperationTime(new Date());
logEntity.setOperationTime(new Date()); logEntity.setUserName(infoById.getData().getRealName());
logEntity.setUserName(infoById.getData().getRealName());
logEntity.setDeptId(infoById.getData().getGridId());
logEntity.setDeptId(infoById.getData().getGridId()); logEntity.setDeptName(infoById.getData().getGridName());
logEntity.setDeptName(infoById.getData().getRealName()); logEntity.setParentDeptIds(infoById.getData().getParentDeptIds());
logEntity.setParentDeptIds(infoById.getData().getRealName()); logEntity.setParentDeptNames(infoById.getData().getParentDeptNames());
logEntity.setParentDeptNames(infoById.getData().getRealName()); logEntity.setAllDeptIds(infoById.getData().getAllDeptIds());
logEntity.setAllDeptIds(infoById.getData().getRealName()); logEntity.setMobile(infoById.getData().getMobile());
logEntity.setAllDeptNames(infoById.getData().getRealName()); logEntity.setAllDeptNames(infoById.getData().getAllDeptNames());
baseDao.insert(logEntity); baseDao.insert(logEntity);
// 更新用户表积分 // 更新用户表积分
UserPointsFormDTO userPointsFormDTO = new UserPointsFormDTO(); UserPointsFormDTO userPointsFormDTO = new UserPointsFormDTO();
userPointsFormDTO.setPoints(Integer.parseInt(points)); userPointsFormDTO.setPoints(Integer.parseInt(points));
userPointsFormDTO.setUserId(formDTO.getUserId()); userPointsFormDTO.setUserId(formDTO.getUserId());
userFeignClient.updataUserPoint(userPointsFormDTO); userFeignClient.updataUserPoint(userPointsFormDTO);
}
} }

5
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/ActivePointLogDao.xml

@ -75,10 +75,11 @@
pl.USER_ID = #{userId} pl.USER_ID = #{userId}
AND pl.OPERATION_CODE = #{type} AND pl.OPERATION_CODE = #{type}
AND pl.DEL_FLAG = '0' AND pl.DEL_FLAG = '0'
<if test='priod ="1"'>
<if test='priod != null and priod != "" and priod == "1"'>
AND DATE_FORMAT(pl.CREATED_TIME, '%Y%m%d') = DATE_FORMAT(now(), '%Y%m%d') AND DATE_FORMAT(pl.CREATED_TIME, '%Y%m%d') = DATE_FORMAT(now(), '%Y%m%d')
</if> </if>
<if test='priod ="2"'> <if test='priod != null and priod != "" and priod == "2"'>
AND DATE_FORMAT(pl.CREATED_TIME, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m') AND DATE_FORMAT(pl.CREATED_TIME, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m')
</if> </if>
</select> </select>

2
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/UserEntity.java

@ -269,5 +269,5 @@ public class UserEntity extends DeptScope {
/** /**
* 活跃积分 * 活跃积分
*/ */
private int activePoints; private Integer activePoints;
} }

1
esua-epdc/kettle-Code/esua_epdc_analysis_job/analysis_extracting/epdc_issue_item_statistics_plantform_item_extracting.ktr

@ -605,6 +605,7 @@
AND eigp.DEL_FLAG = '0' AND eigp.DEL_FLAG = '0'
WHERE WHERE
item.DEL_FLAG = '0' item.DEL_FLAG = '0'
and item.EVENT_ID is not null
GROUP BY GROUP BY
item.GRID_ID)c item.GRID_ID)c
GROUP BY GROUP BY

19
esua-epdc/kettle-Code/esua_epdc_behavior/behavior.kjb

@ -515,7 +515,7 @@
<to>behavior_basic</to> <to>behavior_basic</to>
<from_nr>0</from_nr> <from_nr>0</from_nr>
<to_nr>0</to_nr> <to_nr>0</to_nr>
<enabled>Y</enabled> <enabled>N</enabled>
<evaluation>Y</evaluation> <evaluation>Y</evaluation>
<unconditional>Y</unconditional> <unconditional>Y</unconditional>
</hop> </hop>
@ -524,7 +524,7 @@
<to>behavior_participate</to> <to>behavior_participate</to>
<from_nr>0</from_nr> <from_nr>0</from_nr>
<to_nr>0</to_nr> <to_nr>0</to_nr>
<enabled>Y</enabled> <enabled>N</enabled>
<evaluation>Y</evaluation> <evaluation>Y</evaluation>
<unconditional>N</unconditional> <unconditional>N</unconditional>
</hop> </hop>
@ -542,7 +542,7 @@
<to>epdc_active_user_info</to> <to>epdc_active_user_info</to>
<from_nr>0</from_nr> <from_nr>0</from_nr>
<to_nr>0</to_nr> <to_nr>0</to_nr>
<enabled>Y</enabled> <enabled>N</enabled>
<evaluation>Y</evaluation> <evaluation>Y</evaluation>
<unconditional>N</unconditional> <unconditional>N</unconditional>
</hop> </hop>
@ -551,7 +551,7 @@
<to>成功</to> <to>成功</to>
<from_nr>0</from_nr> <from_nr>0</from_nr>
<to_nr>0</to_nr> <to_nr>0</to_nr>
<enabled>Y</enabled> <enabled>N</enabled>
<evaluation>Y</evaluation> <evaluation>Y</evaluation>
<unconditional>N</unconditional> <unconditional>N</unconditional>
</hop> </hop>
@ -560,10 +560,19 @@
<to>behavior_party</to> <to>behavior_party</to>
<from_nr>0</from_nr> <from_nr>0</from_nr>
<to_nr>0</to_nr> <to_nr>0</to_nr>
<enabled>Y</enabled> <enabled>N</enabled>
<evaluation>Y</evaluation> <evaluation>Y</evaluation>
<unconditional>N</unconditional> <unconditional>N</unconditional>
</hop> </hop>
<hop>
<from>Start</from>
<to>epdc_active_user_info</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
</hops> </hops>
<notepads> <notepads>
</notepads> </notepads>

6
esua-epdc/kettle-Code/esua_epdc_behavior/behavior_basic.kjb

@ -541,7 +541,7 @@ true;
<fields> <fields>
<field> <field>
<variable_name>statDays</variable_name> <variable_name>statDays</variable_name>
<variable_value>1</variable_value> <variable_value>8</variable_value>
<variable_type>CURRENT_JOB</variable_type> <variable_type>CURRENT_JOB</variable_type>
</field> </field>
</fields> </fields>
@ -610,7 +610,7 @@ true;
<to>if(statDays>0)</to> <to>if(statDays>0)</to>
<from_nr>0</from_nr> <from_nr>0</from_nr>
<to_nr>0</to_nr> <to_nr>0</to_nr>
<enabled>Y</enabled> <enabled>N</enabled>
<evaluation>Y</evaluation> <evaluation>Y</evaluation>
<unconditional>N</unconditional> <unconditional>N</unconditional>
</hop> </hop>
@ -664,7 +664,7 @@ true;
<to>统计天数减1</to> <to>统计天数减1</to>
<from_nr>0</from_nr> <from_nr>0</from_nr>
<to_nr>0</to_nr> <to_nr>0</to_nr>
<enabled>Y</enabled> <enabled>N</enabled>
<evaluation>Y</evaluation> <evaluation>Y</evaluation>
<unconditional>N</unconditional> <unconditional>N</unconditional>
</hop> </hop>

4
esua-epdc/kettle-Code/governanceRankingMonth/organization/base_and_common/epdc_gr_street_month_new_TYPICAL_CASE.ktr

@ -591,8 +591,8 @@
4 4
) + ) +
IF( IF(
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 3, sum( IF ( entity.BONUS_CATEGORY = '3', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 3,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ), sum( IF ( entity.BONUS_CATEGORY = '3', IFNULL( entity.BONUS, 0 ), 0 ) ),
3 3
) )
,2) AS TYPICAL_CASE, ,2) AS TYPICAL_CASE,

Loading…
Cancel
Save