|
|
@ -34,10 +34,7 @@ import com.elink.esua.epdc.commons.tools.security.user.UserDetail; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
|
import com.elink.esua.epdc.dao.PointsLogsDao; |
|
|
|
import com.elink.esua.epdc.dto.EpdcAdjustUserPointsDTO; |
|
|
|
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; |
|
|
|
import com.elink.esua.epdc.dto.PointsLogsDTO; |
|
|
|
import com.elink.esua.epdc.dto.UserDTO; |
|
|
|
import com.elink.esua.epdc.dto.*; |
|
|
|
import com.elink.esua.epdc.dto.constant.PointsNoticeConstant; |
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO; |
|
|
@ -57,7 +54,6 @@ import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
|
* 积分记录表 积分记录表 |
|
|
@ -503,4 +499,39 @@ public class PointsLogsServiceImpl extends BaseServiceImpl<PointsLogsDao, Points |
|
|
|
|
|
|
|
return data; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result insertPointsResetLogsCommunity(ResetPointsDTO formDTO) { |
|
|
|
List<PointsLogsEntity> list = new ArrayList<>(); |
|
|
|
Result<BehaviorResultDto> behaviorCodeInfoByBehaviorCode = pointsBehaviorService.getBehaviorCodeInfoByBehaviorCode(BehaviorEnum.POINTS_RESET.getValue()); |
|
|
|
for (UserDTO formDto : formDTO.getUserList()) { |
|
|
|
//根据动作编码获取动作信息
|
|
|
|
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.resetUserPointsCommunity(formDTO); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
} |
|
|
|