1.pms全过程用户临时档案月报

This commit is contained in:
2024-10-28 17:52:43 +08:00
parent 7c19a21d92
commit 474a368670
3 changed files with 19 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ import lombok.Setter;
@Getter @Getter
@Setter @Setter
@TableName("pms_tem_process_report") @TableName("pms_tem_process_report")
public class PmsTemProcessReport extends BaseEntity { public class PmsTemProcessReport{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@@ -2,6 +2,7 @@ package com.njcn.harmonic.service.upload.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -45,7 +46,7 @@ public class PmsTemProcessReportServiceImpl extends ServiceImpl<PmsTemProcessRep
lambdaQueryWrapper.in(PmsTemProcessReport::getObjId,ids); lambdaQueryWrapper.in(PmsTemProcessReport::getObjId,ids);
List<PmsTemProcessReport> pmsTemProcessReportList = this.list(lambdaQueryWrapper); List<PmsTemProcessReport> pmsTemProcessReportList = this.list(lambdaQueryWrapper);
if(CollUtil.isEmpty(pmsTemProcessReportList)){ if(CollUtil.isEmpty(pmsTemProcessReportList)){
throw new BusinessException("查询用户临时档案数据为空"); throw new BusinessException("查询月报数据为空");
} }
List<List<PmsTemProcessReport>> list = CollUtil.split(pmsTemProcessReportList,100); List<List<PmsTemProcessReport>> list = CollUtil.split(pmsTemProcessReportList,100);
@@ -76,7 +77,7 @@ public class PmsTemProcessReportServiceImpl extends ServiceImpl<PmsTemProcessRep
public List<PmsTemProcessReport> getList(PmsTemUserParam.QueryPmsTemUserParam param) { public List<PmsTemProcessReport> getList(PmsTemUserParam.QueryPmsTemUserParam param) {
LambdaQueryWrapper<PmsTemProcessReport> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<PmsTemProcessReport> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(PmsTemProcessReport::getStatisticalDate,param.getSearchBeginTime()); lambdaQueryWrapper.eq(PmsTemProcessReport::getStatisticalDate, param.getSearchBeginTime().substring(0,7));
return this.list(lambdaQueryWrapper); return this.list(lambdaQueryWrapper);
} }

View File

@@ -13,11 +13,13 @@ import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.device.pms.enums.PmsEnum; import com.njcn.device.pms.enums.PmsEnum;
import com.njcn.harmonic.mapper.upload.PmsTemProcessApprovalMapper;
import com.njcn.harmonic.mapper.upload.PmsTemProcessTrackMapper; import com.njcn.harmonic.mapper.upload.PmsTemProcessTrackMapper;
import com.njcn.harmonic.mapper.upload.PmsTemUserMapper; import com.njcn.harmonic.mapper.upload.PmsTemUserMapper;
import com.njcn.harmonic.pojo.dto.upload.RUploadMainMonitorDataDTO; import com.njcn.harmonic.pojo.dto.upload.RUploadMainMonitorDataDTO;
import com.njcn.harmonic.pojo.param.UploadDataParam; import com.njcn.harmonic.pojo.param.UploadDataParam;
import com.njcn.harmonic.pojo.param.upload.PmsTemUserParam; import com.njcn.harmonic.pojo.param.upload.PmsTemUserParam;
import com.njcn.harmonic.pojo.po.upload.PmsTemProcessApproval;
import com.njcn.harmonic.pojo.po.upload.PmsTemProcessTrackPO; import com.njcn.harmonic.pojo.po.upload.PmsTemProcessTrackPO;
import com.njcn.harmonic.pojo.po.upload.PmsTemUserPO; import com.njcn.harmonic.pojo.po.upload.PmsTemUserPO;
import com.njcn.harmonic.pojo.po.upload.RUploadMainMonitorData; import com.njcn.harmonic.pojo.po.upload.RUploadMainMonitorData;
@@ -58,6 +60,8 @@ public class PmsTemUserServiceImpl extends ServiceImpl<PmsTemUserMapper, PmsTemU
private final PmsTemProcessTrackMapper pmsTemProcessTrackMapper; private final PmsTemProcessTrackMapper pmsTemProcessTrackMapper;
private final PmsTemProcessApprovalMapper pmsTemProcessApprovalMapper;
@@ -84,6 +88,11 @@ public class PmsTemUserServiceImpl extends ServiceImpl<PmsTemUserMapper, PmsTemU
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean delPmsTemUser(List<String> ids) { public Boolean delPmsTemUser(List<String> ids) {
long count = pmsTemProcessApprovalMapper.selectCount(new LambdaQueryWrapper<PmsTemProcessApproval>().in(PmsTemProcessApproval::getTempUserDossierId,ids));
if(count>0){
throw new BusinessException("当前用户存在评估文档整改情况,不可删除");
}
this.removeByIds(ids); this.removeByIds(ids);
pmsTemProcessTrackMapper.delete(new LambdaQueryWrapper<PmsTemProcessTrackPO>().in(PmsTemProcessTrackPO::getTempUserDossierId,ids)); pmsTemProcessTrackMapper.delete(new LambdaQueryWrapper<PmsTemProcessTrackPO>().in(PmsTemProcessTrackPO::getTempUserDossierId,ids));
return true; return true;
@@ -118,6 +127,12 @@ public class PmsTemUserServiceImpl extends ServiceImpl<PmsTemUserMapper, PmsTemU
throw new BusinessException("查询用户临时档案数据为空"); throw new BusinessException("查询用户临时档案数据为空");
} }
pmsTemUserPOList.forEach(item->{
item.setGcVoltageLevel(String.format("%02d",Integer.valueOf(item.getGcVoltageLevel())));
item.setGcSubstationVoltageLevel(String.format("%02d",Integer.valueOf(item.getGcSubstationVoltageLevel())));
});
List<List<PmsTemUserPO>> list = CollUtil.split(pmsTemUserPOList,100); List<List<PmsTemUserPO>> list = CollUtil.split(pmsTemUserPOList,100);
for(int i=0;i<list.size();i++){ for(int i=0;i<list.size();i++){
SendParam sendParam = new SendParam(); SendParam sendParam = new SendParam();