|
|
@ -453,7 +453,7 @@ public class DepositoryRecordController { |
|
|
} |
|
|
} |
|
|
if (integer != 0 && params.size() < 1) { |
|
|
if (integer != 0 && params.size() < 1) { |
|
|
return CrudUtil.postHandle(integer, 1); |
|
|
return CrudUtil.postHandle(integer, 1); |
|
|
} else if (integer != 0 && params.size() > 1) { |
|
|
} else if (integer != 0 && params.size() >= 1) { |
|
|
return CrudUtil.postHandle(integer, params.size() + 1); |
|
|
return CrudUtil.postHandle(integer, params.size() + 1); |
|
|
} else { |
|
|
} else { |
|
|
return new RestResponse("", 666, new StatusInfo("出库失败", "请联系管理员进行操作")); |
|
|
return new RestResponse("", 666, new StatusInfo("出库失败", "请联系管理员进行操作")); |
|
|
@ -599,8 +599,9 @@ public class DepositoryRecordController { |
|
|
// 查看出库申请
|
|
|
// 查看出库申请
|
|
|
@GetMapping("/applicationOutView") |
|
|
@GetMapping("/applicationOutView") |
|
|
public RestResponse findApplicationOutRecordByCondition(@RequestParam Map<String, Object> map, HttpServletRequest request) { |
|
|
public RestResponse findApplicationOutRecordByCondition(@RequestParam Map<String, Object> map, HttpServletRequest request) { |
|
|
|
|
|
UserByPort userByPort = (UserByPort) request.getAttribute("userToken"); |
|
|
// 获取对应主订单
|
|
|
// 获取对应主订单
|
|
|
List<ApplicationOutRecordP> list = depositoryRecordService.findApplicationOutRecordPByCondition(map, request); |
|
|
List<ApplicationOutRecordP> list = depositoryRecordService.findApplicationOutRecordPByUser(userByPort,map); |
|
|
for (ApplicationOutRecordP outRecordP : list) { |
|
|
for (ApplicationOutRecordP outRecordP : list) { |
|
|
// 根据主订单获取所有子订单
|
|
|
// 根据主订单获取所有子订单
|
|
|
List<ApplicationOutRecordMin> applicationOutMinByParentId = depositoryRecordService.findApplicationOutMinByParentId(outRecordP.getId()); |
|
|
List<ApplicationOutRecordMin> applicationOutMinByParentId = depositoryRecordService.findApplicationOutMinByParentId(outRecordP.getId()); |
|
|
@ -628,7 +629,7 @@ public class DepositoryRecordController { |
|
|
outRecordP.setQuantity(sumQuantity); |
|
|
outRecordP.setQuantity(sumQuantity); |
|
|
outRecordP.setPrice(sumPrice); |
|
|
outRecordP.setPrice(sumPrice); |
|
|
} |
|
|
} |
|
|
return new RestResponse(list, depositoryRecordService.findApplicationOutRecordPCountByCondition(map), 200); |
|
|
return new RestResponse(list, depositoryRecordService.findApplicationOutRecordPCountByUser(userByPort,map), 200); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -833,7 +834,7 @@ public class DepositoryRecordController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 删除入库记录
|
|
|
// 删除入库记录
|
|
|
@PostMapping("deleteApplicationInRecord") |
|
|
@PostMapping("/deleteApplicationInRecord") |
|
|
public RestResponse deleteApplicationInRecord(@RequestBody Map<String, Object> map) { |
|
|
public RestResponse deleteApplicationInRecord(@RequestBody Map<String, Object> map) { |
|
|
if (map.containsKey("id")) { |
|
|
if (map.containsKey("id")) { |
|
|
Integer id = ObjectFormatUtil.toInteger(map.get("id")); |
|
|
Integer id = ObjectFormatUtil.toInteger(map.get("id")); |
|
|
@ -847,7 +848,7 @@ public class DepositoryRecordController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 删除出库记录
|
|
|
// 删除出库记录
|
|
|
@PostMapping("deleteApplicationOutRecord") |
|
|
@PostMapping("/deleteApplicationOutRecord") |
|
|
public RestResponse deleteApplicationOutRecord(@RequestBody Map<String, Object> map) { |
|
|
public RestResponse deleteApplicationOutRecord(@RequestBody Map<String, Object> map) { |
|
|
if (map.containsKey("id")) { |
|
|
if (map.containsKey("id")) { |
|
|
Integer id = ObjectFormatUtil.toInteger(map.get("id")); |
|
|
Integer id = ObjectFormatUtil.toInteger(map.get("id")); |
|
|
@ -860,6 +861,20 @@ public class DepositoryRecordController { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 用于判断该记录是否正在运行
|
|
|
|
|
|
@PostMapping("/judgeApplicationOutRecordStatus") |
|
|
|
|
|
public RestResponse judgeApplicationOutRecordStatus(@RequestBody Map<String,Object> map){ |
|
|
|
|
|
if (map.containsKey("id")) { |
|
|
|
|
|
Integer id = ObjectFormatUtil.toInteger(map.get("id")); |
|
|
|
|
|
|
|
|
|
|
|
} else if (map.containsKey("ids")) { |
|
|
|
|
|
List<Integer> ids = (List<Integer>) map.get("ids"); |
|
|
|
|
|
} |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 自动生成出入库订单 |
|
|
* 自动生成出入库订单 |
|
|
|