提交 f527d121 authored 作者: zhoushaopan's avatar zhoushaopan

feat(自查模块): 修改自查

修改自查
上级 e9639952
...@@ -7,6 +7,8 @@ import lombok.AllArgsConstructor; ...@@ -7,6 +7,8 @@ import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.util.List;
/** /**
* @author zsp * @author zsp
* @create 2021/11/23 14:37 * @create 2021/11/23 14:37
...@@ -22,4 +24,7 @@ public class SelfCheckVo { ...@@ -22,4 +24,7 @@ public class SelfCheckVo {
@ApiModelProperty(value = "自查的id") @ApiModelProperty(value = "自查的id")
private Integer selfBillId; private Integer selfBillId;
@ApiModelProperty(value = "过滤状态")
private List<String> filterStatusList;
} }
...@@ -312,9 +312,15 @@ public class SelfCheckController { ...@@ -312,9 +312,15 @@ public class SelfCheckController {
} }
@ApiOperation(value = "生成自查待办", notes = "可以通过这个接口生成自查待办") @ApiOperation(value = "生成自查待办", notes = "可以通过这个接口生成自查待办")
@GetMapping(value = "/create/{type}/{storageLocationId}") // @GetMapping(value = "/create/{type}/{storageLocationId}")
@PostMapping("/create")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity createTask(@PathVariable("type") int type,@PathVariable("storageLocationId") Integer storageLocationId){ // public ResponseEntity createTask(@PathVariable("type") int type,@PathVariable("storageLocationId") Integer storageLocationId,
// String filterStatus){
public ResponseEntity createTask(@RequestBody CreateVO createVO){
Integer type = createVO.getType();
Integer storageLocationId = createVO.getStorageLocationId();
String filterStatus = createVO.getFilterStatus();
String message = type==0?"手动":"扫码"; String message = type==0?"手动":"扫码";
String message2 = type==0?"手动":"终端"; String message2 = type==0?"手动":"终端";
String unitName = userUtils.getCurrentUserUnitName(); String unitName = userUtils.getCurrentUserUnitName();
...@@ -324,6 +330,7 @@ public class SelfCheckController { ...@@ -324,6 +330,7 @@ public class SelfCheckController {
selfCheckBill.setCheckUnitId(userUtils.getCurrentUnitId()); selfCheckBill.setCheckUnitId(userUtils.getCurrentUnitId());
selfCheckBill.setTitle(unitName + "发起的"+message2+"自查任务"); selfCheckBill.setTitle(unitName + "发起的"+message2+"自查任务");
selfCheckBill.setStorageLocationId(storageLocationId); selfCheckBill.setStorageLocationId(storageLocationId);
selfCheckBill.setFilterStatus(filterStatus);
SelfCheckBill selfCheckBill1 = selfExaminationBillService.addEntity(selfCheckBill); SelfCheckBill selfCheckBill1 = selfExaminationBillService.addEntity(selfCheckBill);
//发起待自查任务 //发起待自查任务
List<Integer> userIds = new ArrayList<>(); List<Integer> userIds = new ArrayList<>();
...@@ -993,6 +1000,10 @@ public class SelfCheckController { ...@@ -993,6 +1000,10 @@ public class SelfCheckController {
String unit = userUtils.getCurrentUserUnitName(); String unit = userUtils.getCurrentUserUnitName();
PredicateBuilder<DeviceLibrary> predicateBuilder = Specifications.and(); PredicateBuilder<DeviceLibrary> predicateBuilder = Specifications.and();
predicateBuilder.eq("locationUnit", unit); predicateBuilder.eq("locationUnit", unit);
if (selfCheckVo.getFilterStatusList() != null){
predicateBuilder.notIn("lifeStatus",selfCheckVo.getFilterStatusList().toArray());
}
if(selfBillId != null){ if(selfBillId != null){
SelfCheckBill checkBill = selfCheckBillService.getOne(selfBillId); SelfCheckBill checkBill = selfCheckBillService.getOne(selfBillId);
Integer storageLocationId1 = checkBill.getStorageLocationId(); Integer storageLocationId1 = checkBill.getStorageLocationId();
...@@ -1042,6 +1053,12 @@ public class SelfCheckController { ...@@ -1042,6 +1053,12 @@ public class SelfCheckController {
return ResultUtil.success(map); return ResultUtil.success(map);
} }
@GetMapping("findById")
@ApiOperation("通过id查询")
public ResponseEntity findById(Integer id){
return ResponseEntity.ok(selfCheckBillService.getOne(id));
}
// @ApiOperation(value = "发起日常检查业务", notes = "发起日常检查业务") // @ApiOperation(value = "发起日常检查业务", notes = "发起日常检查业务")
// @PostMapping(value = "/addDayBill") // @PostMapping(value = "/addDayBill")
// @Transactional(rollbackFor = Exception.class) // @Transactional(rollbackFor = Exception.class)
......
...@@ -148,6 +148,9 @@ public class SelfCheckBill { ...@@ -148,6 +148,9 @@ public class SelfCheckBill {
@ApiModelProperty(value = "装备存放位置Id",notes = "默认是库房, null代表是所有库房") @ApiModelProperty(value = "装备存放位置Id",notes = "默认是库房, null代表是所有库房")
private Integer storageLocationId; private Integer storageLocationId;
@ApiModelProperty(value = "过滤状态列表")
private String filterStatus;
@ApiModelProperty(value = "装备存放位置Id",notes = "默认是库房, null代表是所有库房") @ApiModelProperty(value = "装备存放位置Id",notes = "默认是库房, null代表是所有库房")
@Transient @Transient
private String storageLocationName; private String storageLocationName;
......
package com.tykj.dev.device.selfcheck.subject.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author dengdiyi
*/
@Data
@ApiModel("手动或者自动的vo")
public class CreateVO {
@ApiModelProperty(name = "类型")
private Integer type;
@ApiModelProperty(value = "库房id")
private Integer storageLocationId;
@ApiModelProperty(name = "过滤状态")
private String filterStatus;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论