|
|
|
@ -29,10 +29,12 @@ import com.biutag.supervision.service.SupDepartService; |
|
|
|
import com.biutag.supervision.service.Warning.WarningContentService; |
|
|
|
import com.biutag.supervision.service.Warning.WarningContentService; |
|
|
|
import com.biutag.supervision.service.Warning.WarningRecordService; |
|
|
|
import com.biutag.supervision.service.Warning.WarningRecordService; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.Comparator; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.function.Function; |
|
|
|
import java.util.function.Function; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
@ -80,6 +82,7 @@ public class WarningController { |
|
|
|
if(CollectionUtil.isNotEmpty(queryParam.getEndDate())){ |
|
|
|
if(CollectionUtil.isNotEmpty(queryParam.getEndDate())){ |
|
|
|
wrapper.between(CollectionUtil.isNotEmpty(queryParam.getEndDate()),"p.archiving",queryParam.getEndDate().get(0),queryParam.getEndDate().get(1)); |
|
|
|
wrapper.between(CollectionUtil.isNotEmpty(queryParam.getEndDate()),"p.archiving",queryParam.getEndDate().get(0),queryParam.getEndDate().get(1)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
wrapper.orderByAsc("p.warning_state"); |
|
|
|
wrapper.groupBy("p.id"); |
|
|
|
wrapper.groupBy("p.id"); |
|
|
|
Page<EntryWindowVo> page= reportProjectService.getPageWarning(new Page<>(queryParam.getCurrent(),queryParam.getSize()),wrapper,queryParam.getWarningState()); |
|
|
|
Page<EntryWindowVo> page= reportProjectService.getPageWarning(new Page<>(queryParam.getCurrent(),queryParam.getSize()),wrapper,queryParam.getWarningState()); |
|
|
|
List<EntryWindowVo> entryWindowVos = page.getRecords(); |
|
|
|
List<EntryWindowVo> entryWindowVos = page.getRecords(); |
|
|
|
@ -99,6 +102,7 @@ public class WarningController { |
|
|
|
s.setWarningContent(counts); |
|
|
|
s.setWarningContent(counts); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
entryWindowVos.sort(Comparator.comparingInt(e -> Integer.parseInt(e.getStateData()))); |
|
|
|
page.setRecords(entryWindowVos); |
|
|
|
page.setRecords(entryWindowVos); |
|
|
|
return Result.success(page); |
|
|
|
return Result.success(page); |
|
|
|
|
|
|
|
|
|
|
|
@ -155,6 +159,7 @@ public class WarningController { |
|
|
|
|
|
|
|
|
|
|
|
//保存或者修改 预警督察详情
|
|
|
|
//保存或者修改 预警督察详情
|
|
|
|
@PostMapping("/addOrUpData") |
|
|
|
@PostMapping("/addOrUpData") |
|
|
|
|
|
|
|
@Transactional |
|
|
|
public Result addOrUpData(@RequestBody WaringVo vo){ |
|
|
|
public Result addOrUpData(@RequestBody WaringVo vo){ |
|
|
|
vo.getRecord().setReportId(vo.getReportProject().getId()); |
|
|
|
vo.getRecord().setReportId(vo.getReportProject().getId()); |
|
|
|
UserAuth user = UserContextHolder.getCurrentUser(); |
|
|
|
UserAuth user = UserContextHolder.getCurrentUser(); |
|
|
|
|