|
|
@ -24,6 +24,7 @@ import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.PointsConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.enums.BehaviorEnum; |
|
|
|
import com.elink.esua.epdc.commons.tools.enums.pointsenum.PointsOperationEnum; |
|
|
|
import com.elink.esua.epdc.commons.tools.enums.pointsenum.PointsOperationModeEnum; |
|
|
|
import com.elink.esua.epdc.commons.tools.exception.RenException; |
|
|
@ -53,6 +54,7 @@ import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
|
* 积分记录表 积分记录表 |
|
|
@ -339,4 +341,39 @@ public class PointsLogsServiceImpl extends BaseServiceImpl<PointsLogsDao, Points |
|
|
|
public PointsStatisticsListResultDTO getPointsOverview(Map<String, Object> params) { |
|
|
|
return baseDao.selectPointsOverview(params); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result insertPointsResetLogs(List<UserDTO> formDTO) { |
|
|
|
List<PointsLogsEntity> list = new ArrayList<>(); |
|
|
|
Result<BehaviorResultDto> behaviorCodeInfoByBehaviorCode = pointsBehaviorService.getBehaviorCodeInfoByBehaviorCode(BehaviorEnum.POINTS_RESET.getValue()); |
|
|
|
for (UserDTO formDto : formDTO) { |
|
|
|
//根据动作编码获取动作信息
|
|
|
|
PointsLogsEntity pointsLogsEntity = new PointsLogsEntity(); |
|
|
|
pointsLogsEntity.setUserId(formDto.getId()); |
|
|
|
pointsLogsEntity.setNickname(formDto.getNickname()); |
|
|
|
pointsLogsEntity.setFaceImg(formDto.getFaceImg()); |
|
|
|
pointsLogsEntity.setOperationTime(new Date()); |
|
|
|
pointsLogsEntity.setOperationMode(PointsOperationModeEnum.OPERATION_MODE_ADMIN.getOperationMode()); |
|
|
|
pointsLogsEntity.setRuleCode(PointsConstant.behaviorCodeCode); |
|
|
|
pointsLogsEntity.setBehaviorCode(BehaviorEnum.POINTS_RESET.getValue()); |
|
|
|
pointsLogsEntity.setOperationDesc(behaviorCodeInfoByBehaviorCode.getData().getBehaviorDesc()); |
|
|
|
pointsLogsEntity.setPoints(formDto.getPoints()); |
|
|
|
pointsLogsEntity.setOperationType("0"); |
|
|
|
pointsLogsEntity.setReferenceId(formDto.getId()); |
|
|
|
pointsLogsEntity.setLavePoints(NumConstant.ZERO); |
|
|
|
pointsLogsEntity.setRemark(""); |
|
|
|
pointsLogsEntity.setRealName(formDto.getRealName()); |
|
|
|
// 赋值积分所属部门
|
|
|
|
pointsLogsEntity.setGrid(formDto.getGrid()); |
|
|
|
pointsLogsEntity.setGridId(formDto.getGridId()); |
|
|
|
pointsLogsEntity.setAllDeptIds(formDto.getAllDeptIds()); |
|
|
|
pointsLogsEntity.setAllDeptNames(formDto.getAllDeptNames()); |
|
|
|
pointsLogsEntity.setParentDeptIds(formDto.getParentDeptIds()); |
|
|
|
pointsLogsEntity.setParentDeptNames(formDto.getParentDeptNames()); |
|
|
|
list.add(pointsLogsEntity); |
|
|
|
} |
|
|
|
baseDao.insertBatchPointsResetLogs(list); |
|
|
|
usersFeignClient.resetUserPoints(); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
} |
|
|
|