修试入库
This commit is contained in:
parent
f92c7f4489
commit
54a6c380d0
|
|
@ -43,7 +43,7 @@ public class RepairTestInputController extends BaseController {
|
||||||
|
|
||||||
@ApiOperation(value = "修试后入库-入库操作")
|
@ApiOperation(value = "修试后入库-入库操作")
|
||||||
@PostMapping("inputByType")
|
@PostMapping("inputByType")
|
||||||
public AjaxResult inputByType(String params){
|
public AjaxResult inputByType(@RequestBody RepairTestInputDto dto){
|
||||||
return service.inputByType(params);
|
return service.inputByType(dto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,4 +27,6 @@ public class RepairTestInputDto{
|
||||||
/** 维修时间*/
|
/** 维修时间*/
|
||||||
private String wxTime;
|
private String wxTime;
|
||||||
|
|
||||||
|
private String params;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,5 +37,5 @@ public interface RepairTestInputService {
|
||||||
* @author cwchen
|
* @author cwchen
|
||||||
* @date 2023/12/16 18:35
|
* @date 2023/12/16 18:35
|
||||||
*/
|
*/
|
||||||
AjaxResult inputByType(String params);
|
AjaxResult inputByType(RepairTestInputDto dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,12 +47,12 @@ public class RepairTestInputServiceImpl implements RepairTestInputService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult inputByType(String params) {
|
public AjaxResult inputByType(RepairTestInputDto repairTestInputDto) {
|
||||||
try {
|
try {
|
||||||
if (StringUtils.isEmpty(params)) {
|
if (StringUtils.isEmpty(repairTestInputDto.getParams())) {
|
||||||
return AjaxResult.error(HttpStatus.ERROR, "参数不正确");
|
return AjaxResult.error(HttpStatus.ERROR, "参数不正确");
|
||||||
}
|
}
|
||||||
List<RepairTestWarehousingDto> list = JSONObject.parseArray(params, RepairTestWarehousingDto.class);
|
List<RepairTestWarehousingDto> list = JSONObject.parseArray(repairTestInputDto.getParams(), RepairTestWarehousingDto.class);
|
||||||
if(CollectionUtils.isEmpty(list)){
|
if(CollectionUtils.isEmpty(list)){
|
||||||
return AjaxResult.error(HttpStatus.ERROR, "参数不正确");
|
return AjaxResult.error(HttpStatus.ERROR, "参数不正确");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue