|
|
|
@ -1,11 +1,15 @@ |
|
|
|
package com.biutag.supervision.controller.work; |
|
|
|
package com.biutag.supervision.controller.work; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.biutag.supervision.flow.FlowService; |
|
|
|
import com.biutag.supervision.flow.FlowService; |
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
import com.biutag.supervision.pojo.domain.NegativeDetail; |
|
|
|
import com.biutag.supervision.pojo.domain.NegativeDetail; |
|
|
|
import com.biutag.supervision.pojo.dto.ActionDto; |
|
|
|
import com.biutag.supervision.pojo.dto.ActionDto; |
|
|
|
import com.biutag.supervision.pojo.dto.NegativeDto; |
|
|
|
import com.biutag.supervision.pojo.dto.NegativeDto; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.entity.Negative; |
|
|
|
import com.biutag.supervision.pojo.entity.NegativeTask; |
|
|
|
import com.biutag.supervision.pojo.entity.NegativeTask; |
|
|
|
import com.biutag.supervision.pojo.param.NegativeQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.NegativeQueryParam; |
|
|
|
import com.biutag.supervision.pojo.vo.NegativeQueryVo; |
|
|
|
import com.biutag.supervision.pojo.vo.NegativeQueryVo; |
|
|
|
@ -16,6 +20,8 @@ import jakarta.validation.Valid; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
|
|
|
|
|
|
|
@RequiredArgsConstructor |
|
|
|
@RequiredArgsConstructor |
|
|
|
@RequestMapping("negative") |
|
|
|
@RequestMapping("negative") |
|
|
|
@RestController |
|
|
|
@RestController |
|
|
|
@ -44,6 +50,31 @@ public class NegativeController { |
|
|
|
return Result.success(negativeService.save(negativeDto)); |
|
|
|
return Result.success(negativeService.save(negativeDto)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PutMapping |
|
|
|
|
|
|
|
public Result<Boolean> update(@Valid @RequestBody NegativeDto negativeDto) { |
|
|
|
|
|
|
|
if (StrUtil.isBlank(negativeDto.getId())) { |
|
|
|
|
|
|
|
throw new RuntimeException("数据异常,请系统联系管理员【问题ID为空】"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
LambdaUpdateWrapper<Negative> updateWrapper = new LambdaUpdateWrapper<>(); |
|
|
|
|
|
|
|
updateWrapper.eq(Negative::getId, negativeDto.getId()) |
|
|
|
|
|
|
|
.set(Negative::getProblemSources, negativeDto.getProblemSources()) |
|
|
|
|
|
|
|
.set(Negative::getProblemSourcesCode, negativeDto.getProblemSourcesCode()) |
|
|
|
|
|
|
|
.set(Negative::getBusinessTypeCode, negativeDto.getBusinessTypeCode()) |
|
|
|
|
|
|
|
.set(Negative::getBusinessTypeName, negativeDto.getBusinessTypeName()) |
|
|
|
|
|
|
|
.set(Negative::getCaseNumber, negativeDto.getCaseNumber()) |
|
|
|
|
|
|
|
.set(Negative::getInvolveProblem, negativeDto.getInvolveProblem()) |
|
|
|
|
|
|
|
.set(Negative::getPoliceType, negativeDto.getPoliceType()) |
|
|
|
|
|
|
|
.set(Negative::getPoliceTypeName, negativeDto.getPoliceTypeName()) |
|
|
|
|
|
|
|
.set(Negative::getDiscoveryTime, negativeDto.getDiscoveryTime()) |
|
|
|
|
|
|
|
.set(Negative::getHappenTime, negativeDto.getHappenTime()) |
|
|
|
|
|
|
|
.set(Negative::getResponderName, negativeDto.getResponderName()) |
|
|
|
|
|
|
|
.set(Negative::getContactPhone, negativeDto.getContactPhone()) |
|
|
|
|
|
|
|
.set(Negative::getThingDesc, negativeDto.getThingDesc()) |
|
|
|
|
|
|
|
.set(Negative::getUpdTime, LocalDateTime.now()); |
|
|
|
|
|
|
|
negativeService.update(updateWrapper); |
|
|
|
|
|
|
|
return Result.success(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("{id}/execute") |
|
|
|
@PostMapping("{id}/execute") |
|
|
|
public Result<Boolean> execute(@PathVariable String id, @RequestBody ActionDto action) { |
|
|
|
public Result<Boolean> execute(@PathVariable String id, @RequestBody ActionDto action) { |
|
|
|
action.setNegativeId(id); |
|
|
|
action.setNegativeId(id); |
|
|
|
|