| | |
| | | import com.thhy.general.utils.UUIDUtils; |
| | | import com.thhy.general.utils.UserInfoUtils; |
| | | import com.thhy.secure.modules.biz.integralAccount.entity.IntegralAccountEntity; |
| | | import com.thhy.secure.modules.biz.integralAccount.entity.IntegralDetailDto; |
| | | import com.thhy.secure.modules.biz.integralAccount.entity.IntegralDetailEntity; |
| | | import com.thhy.secure.modules.biz.integralAccount.mapper.IntegralDetailMapper; |
| | | import com.thhy.secure.modules.biz.integralAccount.service.IntegralDetailService; |
| | |
| | | public BasicResult delete(String id){ |
| | | Map map =new HashMap(); |
| | | map.put("id",id); |
| | | IntegralDetailEntity integralDetailEntity = integralDetailMapper.selectSafeIntegralInfo(map).get(0); |
| | | IntegralDetailDto integralDetailEntity = integralDetailMapper.selectSafeIntegralInfo(map).get(0); |
| | | Double integralWater = integralDetailEntity.getIntegralWater();//获取消耗积分 |
| | | Map account = new HashMap(); |
| | | account.put("userId",integralDetailEntity.getUserId()); |
| | |
| | | int pageSize = (int) map.get("pageSize"); |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | map.put("companyId",companyId); |
| | | List<IntegralDetailEntity> integralDetailEntities = integralDetailMapper.selectSafeIntegralInfo(map); |
| | | List<IntegralDetailDto> integralDetailEntities = integralDetailMapper.selectSafeIntegralInfo(map); |
| | | map.put("data",new PageInfo<>(integralDetailEntities)); |
| | | return BasicResult.success(map); |
| | | } |
| | |
| | | map.put("companyId",companyId); |
| | | List<IntegralDetailEntity> integralDetailEntities = integralDetailMapper.selectPageList(map); |
| | | |
| | | integralDetailEntities.forEach(obj->{ |
| | | if(obj.getUserType() ==1){ |
| | | obj.setUserTypeName("管服人员"); |
| | | } |
| | | if(obj.getUserType() ==2){ |
| | | obj.setUserTypeName("劳务人员"); |
| | | } |
| | | }); |
| | | ExcelUtils.downExcel(integralDetailEntities,IntegralDetailEntity.class,rsp,"班组列表"); |
| | | } |
| | | |
| | |
| | | public void exportSafeIntegralInfo(Map map, HttpServletResponse rsp) { |
| | | SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); |
| | | String companyId = sysUserInfo.getCompanyId(); |
| | | |
| | | IntegralAccountEntity integralAccountEntity = integralDetailMapper.selectByOne(map); |
| | | map.put("integral",integralAccountEntity.getTotalIntegral()); |
| | | map.put("companyId",companyId); |
| | | List<IntegralDetailEntity> integralDetailEntities = integralDetailMapper.selectSafeIntegralInfo(map); |
| | | ExcelUtils.downExcel(integralDetailEntities,IntegralDetailEntity.class,rsp,"班组列表"); |
| | | List<IntegralDetailDto> integralDetailEntities = integralDetailMapper.selectSafeIntegralInfo(map); |
| | | integralDetailEntities.forEach(obj->{ |
| | | if(obj.getUserType() ==1){ |
| | | obj.setUserTypeName("管服人员"); |
| | | } |
| | | if(obj.getUserType() ==2){ |
| | | obj.setUserTypeName("劳务人员"); |
| | | } |
| | | if(obj.getType() == 1){ |
| | | obj.setTypeName("获取"); |
| | | } |
| | | if(obj.getType() == 2){ |
| | | obj.setTypeName("消耗"); |
| | | } |
| | | }); |
| | | ExcelUtils.downExcel(integralDetailEntities,IntegralDetailDto.class,rsp,"班组列表"); |
| | | } |
| | | |
| | | } |