wxc 5 months ago
parent
commit
c46d656ad0
  1. 40
      src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java
  2. 2
      src/main/java/com/biutag/supervision/job/Job.java
  3. 6
      src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintReplenishDto.java
  4. 3
      src/main/java/com/biutag/supervision/pojo/entity/DataPetitionComplaint.java
  5. 2
      src/main/java/com/biutag/supervision/pojo/vo/DataPetitionComplaintVo.java
  6. 7
      src/main/java/com/biutag/supervision/service/SupRotaService.java
  7. BIN
      src/main/resources/static/templates/涉及问题导入模板.xlsx

40
src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java

@ -1,6 +1,7 @@
package com.biutag.supervision.controller.data;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
@ -23,6 +24,7 @@ import com.biutag.supervision.pojo.dto.DataPetitionComplaintReplenishDto;
import com.biutag.supervision.pojo.entity.DataPetitionComplaint;
import com.biutag.supervision.pojo.entity.NegativeTask;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.entity.SupDictData;
import com.biutag.supervision.pojo.model.UserAuth;
import com.biutag.supervision.pojo.param.DataPetitionComplaintQueryParam;
import com.biutag.supervision.pojo.vo.DataPetitionComplaintVo;
@ -30,6 +32,7 @@ import com.biutag.supervision.pojo.vo.ExportGabxfVo;
import com.biutag.supervision.service.DataPetitionComplaintService;
import com.biutag.supervision.service.NegativeTaskService;
import com.biutag.supervision.service.SupDepartService;
import com.biutag.supervision.service.SupDictDataService;
import dm.jdbc.util.StringUtil;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
@ -65,6 +68,9 @@ public class DataPetitionComplaintController {
private final NegativeTaskService negativeTaskService;
private final SupDictDataService dictDataService;
@GetMapping
public Result<Page<DataPetitionComplaintVo>> list(DataPetitionComplaintQueryParam queryParam) {
return Result.success(dataPetitionComplaintService.page(queryParam));
@ -236,6 +242,40 @@ public class DataPetitionComplaintController {
return Result.success();
}
/**
* 补充涉及问题
* */
@PostMapping("/replenishInvolvedIssue")
public Result replenishInvolvedIssue(@RequestPart("file")MultipartFile file) throws IOException{
log.info("文件导入中-------------");
String fileNameType = FileUtil.extName(file.getOriginalFilename());
if (!"xls".equals(fileNameType) && !"xlsx".equals(fileNameType)) {
throw new RuntimeException("仅支持 xls/xlsx 格式文件的导入");
}
List<SupDictData> specialSupervisionDict = dictDataService.listByDictType("involvedIssue");
EasyExcel.read(file.getInputStream(),DataPetitionComplaintReplenishDto.class,new ReadListener<DataPetitionComplaintReplenishDto>(){
@Override
public void invoke(DataPetitionComplaintReplenishDto dto, AnalysisContext analysisContext) {
//专项督察
if(CollectionUtil.isNotEmpty(specialSupervisionDict)){
String specialSupervision = specialSupervisionDict.stream().filter(dict->dict.getDictLabel().equals(dto.getInvolvedIssue())).findFirst().map(SupDictData::getDictValue).orElse("");
LambdaUpdateWrapper<DataPetitionComplaint> updateWrapper =new LambdaUpdateWrapper<DataPetitionComplaint>()
.set(DataPetitionComplaint::getInvolvedIssue,specialSupervision)
.eq(DataPetitionComplaint::getOriginId,dto.getOriginId());
if(StrUtil.isNotEmpty(dto.getOriginId()) && StrUtil.isNotEmpty(dto.getInvolvedIssue())){
dataPetitionComplaintService.update(updateWrapper);
}
}
}
@Override
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
}
}).sheet(0).headRowNumber(1).doRead();
return Result.success();
}
//台帐导出

2
src/main/java/com/biutag/supervision/job/Job.java

@ -260,7 +260,7 @@ public class Job {
private final SupRotaMapper supRotaMapper;
//每天一次 00:20:00
//值班人员
@Scheduled(cron = "0 30 12 * * ?")
@Scheduled(cron = "0 55 17 * * ?")
public void operator(){
log.info("operator--------------------");
log.info("值班人员抓取中---------------------");

6
src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintReplenishDto.java

@ -34,4 +34,10 @@ public class DataPetitionComplaintReplenishDto {
* */
@ExcelProperty(value = "领导姓名")
private String receivingLeaderName;
/**
* 涉及问题
* */
@ExcelProperty(value = "涉及问题")
private String involvedIssue;
}

3
src/main/java/com/biutag/supervision/pojo/entity/DataPetitionComplaint.java

@ -105,4 +105,7 @@ public class DataPetitionComplaint {
// 信访办理情况
private String petitionProcessingStatus;
@TableField("involved_issue")
private String involvedIssue;
}

2
src/main/java/com/biutag/supervision/pojo/vo/DataPetitionComplaintVo.java

@ -83,5 +83,7 @@ public class DataPetitionComplaintVo {
// 信访办理情况
private String petitionProcessingStatus;
//涉及问题
private String involvedIssue;
}

7
src/main/java/com/biutag/supervision/service/SupRotaService.java

@ -51,11 +51,4 @@ public class SupRotaService extends ServiceImpl<SupRotaMapper, SupRota> {
return jsonObject;
}
// public JSONObject getSubofficeTable(SupRotaQueryParam queryParam){
// JSONObject jsonObject =new JSONObject();
// List<SupRotaVo> supRotaList = baseMapper.getSupRotaList(queryParam.getDate(),queryParam.getDeptId());
// jsonObject.fluentPut("supRotaList",supRotaList);
// return jsonObject;
// }
}

BIN
src/main/resources/static/templates/涉及问题导入模板.xlsx

Binary file not shown.
Loading…
Cancel
Save