add:c出入库单参数非空校验
This commit is contained in:
@@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@ServletComponentScan
|
||||
@EnableTransactionManagement
|
||||
@MapperScan("org.nl.**.mapper")
|
||||
//@EnableDynamicTp
|
||||
@EnableDynamicTp
|
||||
public class AppRun implements CommandLineRunner {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(AppRun.class, args);
|
||||
|
||||
@@ -82,7 +82,7 @@ public class SecurityUtils {
|
||||
* @return 权限列表
|
||||
*/
|
||||
public static List<String> getCurrentUserPermissions() {
|
||||
JSONObject json = (JSONObject) StpUtil.getExtra("loginInfo");
|
||||
JSONObject json =JSONObject.parseObject(String.valueOf(StpUtil.getExtra("loginInfo")));
|
||||
JSONArray permissions = json.getJSONArray("permissions");
|
||||
if (permissions.size() > 0) {
|
||||
return permissions.toJavaList(String.class);
|
||||
|
||||
@@ -71,6 +71,12 @@ public class GroupDickInStorageTask extends AbstractTask {
|
||||
if (CollectionUtils.isEmpty(item)){
|
||||
throw new BadRequestException("申请任务失败:载具"+vehicle_code+"组盘信息不存在");
|
||||
}
|
||||
SchBaseTask schBaseTask = iSchBaseTaskService.getOne(new QueryWrapper<SchBaseTask>()
|
||||
.eq("vehicle_code", vehicle_code).select("task_code")
|
||||
.lt("status",StatusEnum.FORM_STATUS.code("完成")));
|
||||
if (schBaseTask!=null){
|
||||
throw new BadRequestException("申请任务失败:载具"+vehicle_code+"已经存任务"+schBaseTask.getTask_code());
|
||||
}
|
||||
JSONObject mstJ = (JSONObject) JSONObject.toJSON(mst);
|
||||
MdPbVehicleMaterVo vehicleMater = item.get(0);
|
||||
mstJ.put("stor_code", vehicleMater.getStor_code());
|
||||
|
||||
@@ -44,17 +44,20 @@ public class StIvtIostorinvOutController {
|
||||
return new ResponseEntity<>(TableDataInfo.build(result), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("delete")
|
||||
@Log("删除出库单")
|
||||
public ResponseEntity<Object> delete(@RequestBody List<String> ids) {
|
||||
iStIvtIostorinvService.removeByIds(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@PostMapping
|
||||
@Log("创建出库单")
|
||||
public ResponseEntity<Object> save(@RequestBody JSONObject form) {
|
||||
iStIvtIostorinvService.save(form);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@Log("更新出库单")
|
||||
public ResponseEntity<Object> update(@RequestBody JSONObject form) {
|
||||
iStIvtIostorinvService.update(form);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
@@ -72,6 +75,7 @@ public class StIvtIostorinvOutController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/outDecision")
|
||||
@Log("出库单明细分配")
|
||||
public ResponseEntity<Object> outDecision(@RequestBody JSONObject dtl) {
|
||||
String vechicle_codes = iStIvtIostorinvService.outDispense(dtl);
|
||||
return new ResponseEntity<>(vechicle_codes,HttpStatus.OK);
|
||||
@@ -83,6 +87,7 @@ public class StIvtIostorinvOutController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/cancelDecision")
|
||||
@Log("出库单取消分配")
|
||||
public ResponseEntity<Object> cancelDecision(@RequestBody JSONObject dtl) {
|
||||
iStIvtIostorinvService.canceldispense(dtl);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
@@ -95,6 +100,7 @@ public class StIvtIostorinvOutController {
|
||||
}
|
||||
|
||||
@PostMapping("/taskOpen")
|
||||
@Log("出库单作业下发")
|
||||
public ResponseEntity<Object> taskOpen(@RequestBody JSONObject dtl) {
|
||||
iStIvtIostorinvService.taskOpen(dtl);
|
||||
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||
|
||||
Reference in New Issue
Block a user