code formate
parent
fb0f3e8b03
commit
52b1335fc9
|
@ -214,8 +214,6 @@ public class WmToMoveGoodsController extends BaseController {
|
||||||
public AjaxJson doGetstock(HttpServletRequest request) {
|
public AjaxJson doGetstock(HttpServletRequest request) {
|
||||||
AjaxJson j = new AjaxJson();
|
AjaxJson j = new AjaxJson();
|
||||||
WmToMoveGoodsEntity wmToMoveGoods = new WmToMoveGoodsEntity();
|
WmToMoveGoodsEntity wmToMoveGoods = new WmToMoveGoodsEntity();
|
||||||
|
|
||||||
|
|
||||||
j.setObj(wmToMoveGoods);
|
j.setObj(wmToMoveGoods);
|
||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
|
@ -261,9 +259,7 @@ public class WmToMoveGoodsController extends BaseController {
|
||||||
MvCusEntity mvcus = systemService.findUniqueByProperty(MvCusEntity.class, "cusCode", wmToMoveGoods.getToCusCode());
|
MvCusEntity mvcus = systemService.findUniqueByProperty(MvCusEntity.class, "cusCode", wmToMoveGoods.getToCusCode());
|
||||||
t.setToCusName(mvcus.getCusName());
|
t.setToCusName(mvcus.getCusName());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wmToMoveGoodsService.saveOrUpdate(t);
|
wmToMoveGoodsService.saveOrUpdate(t);
|
||||||
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
|
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -296,9 +292,7 @@ public class WmToMoveGoodsController extends BaseController {
|
||||||
String movesta = "已完成";
|
String movesta = "已完成";
|
||||||
try {
|
try {
|
||||||
movesta = ResourceUtil.getConfigByName("wm.movesta");
|
movesta = ResourceUtil.getConfigByName("wm.movesta");
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
t.setMoveSta(movesta);
|
t.setMoveSta(movesta);
|
||||||
MyBeanUtils.copyBeanNotNull2Bean(jeecgDemo, t);
|
MyBeanUtils.copyBeanNotNull2Bean(jeecgDemo, t);
|
||||||
|
|
|
@ -158,7 +158,6 @@ public class WmToUpGoodsController extends BaseController {
|
||||||
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
message = "上架列表删除失败";
|
|
||||||
throw new BusinessException(e.getMessage());
|
throw new BusinessException(e.getMessage());
|
||||||
}
|
}
|
||||||
j.setMsg(message);
|
j.setMsg(message);
|
||||||
|
@ -186,7 +185,6 @@ public class WmToUpGoodsController extends BaseController {
|
||||||
}
|
}
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
message = "上架列表删除失败";
|
|
||||||
throw new BusinessException(e.getMessage());
|
throw new BusinessException(e.getMessage());
|
||||||
}
|
}
|
||||||
j.setMsg(message);
|
j.setMsg(message);
|
||||||
|
@ -247,7 +245,6 @@ public class WmToUpGoodsController extends BaseController {
|
||||||
}
|
}
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
message = "上架列表添加失败";
|
|
||||||
throw new BusinessException(e.getMessage());
|
throw new BusinessException(e.getMessage());
|
||||||
}
|
}
|
||||||
j.setMsg(message);
|
j.setMsg(message);
|
||||||
|
@ -272,7 +269,6 @@ public class WmToUpGoodsController extends BaseController {
|
||||||
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
|
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
message = "上架列表更新失败";
|
|
||||||
throw new BusinessException(e.getMessage());
|
throw new BusinessException(e.getMessage());
|
||||||
}
|
}
|
||||||
j.setMsg(message);
|
j.setMsg(message);
|
||||||
|
@ -516,11 +512,6 @@ public class WmToUpGoodsController extends BaseController {
|
||||||
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<?> update(@RequestBody WmToUpGoodsEntity wmToUpGoods) {
|
public ResponseEntity<?> update(@RequestBody WmToUpGoodsEntity wmToUpGoods) {
|
||||||
//调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息.
|
|
||||||
// Set<ConstraintViolation<WmToUpGoodsEntity>> failures = validator.validate(wmToUpGoods);
|
|
||||||
// if (!failures.isEmpty()) {
|
|
||||||
// return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
|
|
||||||
// }
|
|
||||||
ResultDO D0 = new ResultDO();
|
ResultDO D0 = new ResultDO();
|
||||||
//保存
|
//保存
|
||||||
try{
|
try{
|
||||||
|
@ -532,12 +523,9 @@ public class WmToUpGoodsController extends BaseController {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
D0.setOK(false);
|
D0.setOK(false);
|
||||||
// return new ResponseEntity(HttpStatus.NO_CONTENT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new ResponseEntity(D0, HttpStatus.OK);
|
return new ResponseEntity(D0, HttpStatus.OK);
|
||||||
//按Restful约定,返回204状态码, 无内容. 也可以返回200状态码.
|
|
||||||
// return new ResponseEntity(HttpStatus.NO_CONTENT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
|
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
|
||||||
|
|
Loading…
Reference in New Issue