Przeglądaj źródła

违法检查记录调试20241128

xuxiaodong 2 miesięcy temu
rodzic
commit
c9c6c60a36

+ 11 - 4
zfjg-api/zfjg-api-manage/src/main/java/com/zfjg/manage/api/domain/other/WReport.java

@@ -10,10 +10,11 @@ import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serializable;
 import java.time.LocalDateTime;
+import java.util.Date;
 
 /**
  * <p>
- * 
+ *
  * </p>
  *
  * @author xuxiaodong
@@ -44,12 +45,16 @@ public class WReport implements Serializable {
     @ApiModelProperty("不当履行职责执法过错情形数量")
     private Integer wTypeC;
 
+    private String wTypeT;
+
     @ApiModelProperty("未履行职责执法过错情形")
     private String nType;
 
     @ApiModelProperty("未履行职责执法过错情形数量")
     private Integer nTypeC;
 
+    private String nTypeT;
+
     @ApiModelProperty("违法履行职责执法过错情形")
     private String sType;
 
@@ -59,6 +64,8 @@ public class WReport implements Serializable {
     @ApiModelProperty("违法履行职责执法过错情形")
     private Integer sTypeC;
 
+    private String sTypeT;
+
     @ApiModelProperty("上传文件")
     private String fDown;
 
@@ -69,7 +76,7 @@ public class WReport implements Serializable {
 
     private LocalDateTime updateTime;
 
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private LocalDateTime sTime;
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date sTime;
 }

+ 11 - 3
zfjg-api/zfjg-api-manage/src/main/java/com/zfjg/manage/api/dto/other/WReportDto.java

@@ -8,7 +8,9 @@ import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.time.LocalDateTime;
+import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 @Data
 public class WReportDto {
@@ -23,10 +25,16 @@ public class WReportDto {
 
     private List<String> wrongCategory;
 
+    private List<Map> wrongCategory1;
+
     private List<String> notCategory;
 
+    private List<Map> notCategory1;
+
     private List<String> breakLawCategory;
 
+    private List<Map> breakLawCategory1;
+
     private List<String> doHandlerCategory;
 
     private List<String> files;
@@ -35,7 +43,7 @@ public class WReportDto {
 
     private String caseData;
 
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private LocalDateTime sTime;
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date sTime;
 }

+ 2 - 2
zfjg-api/zfjg-api-manage/src/main/java/com/zfjg/manage/api/dto/other/WReportQuery.java

@@ -22,8 +22,8 @@ public class WReportQuery {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime endTime;
 
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private LocalDateTime sTime;
 
     private String year;

+ 11 - 1
zfjg-modules/zfjg-manage/src/main/java/com/zfjg/manage/controller/other/WReportController.java

@@ -1,6 +1,8 @@
 package com.zfjg.manage.controller.other;
 
 import cn.hutool.core.collection.ListUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.TypeReference;
 import com.zfjg.common.core.domain.R;
 import com.zfjg.common.core.exception.ServiceException;
 import com.zfjg.common.core.utils.ServletUtils;
@@ -66,7 +68,7 @@ public class WReportController extends BaseController {
 
     @ApiOperation(value = "详情")
     @GetMapping("/info")
-    public R<WReportDto> info(@RequestParam String ids) {
+    public R<WReportDto> info(@RequestParam(required = false) String ids) {
         Long id = 0L;
         try {
             id = Long.parseLong(ids);
@@ -81,6 +83,9 @@ public class WReportController extends BaseController {
             wReportDto.setNotCategory(Optional.ofNullable(e.getNType()).map(item -> Arrays.asList(item.split("\\|\\|\\|"))).orElseGet(ArrayList::new));
             wReportDto.setWrongCategory(Optional.ofNullable(e.getWType()).map(item -> Arrays.asList(item.split("\\|\\|\\|"))).orElseGet(ArrayList::new));
             wReportDto.setBreakLawCategory(Optional.ofNullable(e.getSType()).map(item -> Arrays.asList(item.split("\\|\\|\\|"))).orElseGet(ArrayList::new));
+            wReportDto.setWrongCategory1(Optional.ofNullable(e.getWTypeT()).map(item -> JSON.parseArray(item).toJavaList(Map.class)).orElseGet(ArrayList::new));
+            wReportDto.setNotCategory1(Optional.ofNullable(e.getNTypeT()).map(item -> JSON.parseArray(item).toJavaList(Map.class)).orElseGet(ArrayList::new));
+            wReportDto.setBreakLawCategory1(Optional.ofNullable(e.getSTypeT()).map(item -> JSON.parseArray(item).toJavaList(Map.class)).orElseGet(ArrayList::new));
             return wReportDto;
         }).orElseThrow(() -> new ServiceException("error"));
         return R.ok(wReportDto1);
@@ -96,11 +101,16 @@ public class WReportController extends BaseController {
             wReportDto.setOrgId(it.getOrgId());
             wReportDto.setWUser(it.getWUser());
             wReportDto.setOrgName(ListUtil.of(it.getOrgName()));
+            wReportDto.setSTime(it.getSTime());
             wReportDto.setFiles(Optional.ofNullable(it.getFDown()).map(item -> Arrays.asList(item.split("\\|\\|\\|"))).orElseGet(ArrayList::new));
             wReportDto.setDoHandler(Optional.ofNullable(it.getDDo()).map(item -> Arrays.asList(item.split("\\|\\|\\|"))).orElseGet(ArrayList::new));
             wReportDto.setNotCategory(Optional.ofNullable(it.getNType()).map(item -> Arrays.asList(item.split("\\|\\|\\|"))).orElseGet(ArrayList::new));
             wReportDto.setWrongCategory(Optional.ofNullable(it.getWType()).map(item -> Arrays.asList(item.split("\\|\\|\\|"))).orElseGet(ArrayList::new));
             wReportDto.setBreakLawCategory(Optional.ofNullable(it.getSType()).map(item -> Arrays.asList(item.split("\\|\\|\\|"))).orElseGet(ArrayList::new));
+            wReportDto.setWrongCategory1(Optional.ofNullable(it.getWTypeT()).map(item -> JSON.parseArray(item).toJavaList(Map.class)).orElseGet(ArrayList::new));
+            wReportDto.setNotCategory1(Optional.ofNullable(it.getNTypeT()).map(item -> JSON.parseArray(item).toJavaList(Map.class)).orElseGet(ArrayList::new));
+            wReportDto.setBreakLawCategory1(Optional.ofNullable(it.getSTypeT()).map(item -> JSON.parseArray(item).toJavaList(Map.class)).orElseGet(ArrayList::new));
+
             return wReportDto;
         }).collect(Collectors.toList());
         return R.ok(wReportDtos);

+ 26 - 0
zfjg-modules/zfjg-manage/src/main/java/com/zfjg/manage/service/impl/other/WReportServiceImpl.java

@@ -2,6 +2,7 @@ package com.zfjg.manage.service.impl.other;
 
 import cn.hutool.core.util.IdUtil;
 import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -71,6 +72,19 @@ public class WReportServiceImpl extends ServiceImpl<WReportMapper, WReport> impl
             wReport.setSTypeC(reportDto.getBreakLawCategory().size());
         }
 
+
+        if (ObjectUtil.isNotEmpty(reportDto.getWrongCategory1())) {
+            wReport.setWTypeT(JSON.toJSONString(reportDto.getWrongCategory1()));
+        }
+
+        if (ObjectUtil.isNotEmpty(reportDto.getNotCategory1())) {
+            wReport.setNTypeT(JSON.toJSONString(reportDto.getNotCategory1()));
+        }
+
+        if (ObjectUtil.isNotEmpty(reportDto.getBreakLawCategory1())) {
+            wReport.setSTypeT(JSON.toJSONString(reportDto.getBreakLawCategory1()));
+        }
+
         if (ObjectUtil.isNotEmpty(reportDto.getFiles())) {
             wReport.setFDown(String.join("|||", reportDto.getFiles()));
         }
@@ -89,6 +103,18 @@ public class WReportServiceImpl extends ServiceImpl<WReportMapper, WReport> impl
         WReport wReport = this.getById(reportDto.getId());
         WReport report = Optional.ofNullable(wReport).map(it -> {
             BeanUtils.copyProperties(reportDto, it);
+
+            if (ObjectUtil.isNotEmpty(reportDto.getWrongCategory1())) {
+                it.setWTypeT(JSON.toJSONString(reportDto.getWrongCategory1()));
+            }
+
+            if (ObjectUtil.isNotEmpty(reportDto.getNotCategory1())) {
+                it.setNTypeT(JSON.toJSONString(reportDto.getNotCategory1()));
+            }
+
+            if (ObjectUtil.isNotEmpty(reportDto.getBreakLawCategory1())) {
+                it.setSTypeT(JSON.toJSONString(reportDto.getBreakLawCategory1()));
+            }
             return it;
         }).orElseThrow(() -> new ServiceException("error"));
         this.updateById(report);