|
@@ -110,7 +110,7 @@ public class PlannerAction {
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping(value="inserAginSupplierList")
|
|
|
- public Map<String, Object> inserAginSupplierList(@RequestBody PlannerSupplier pp){
|
|
|
+ public Map<String, Object> inserAginSupplierList(@RequestBody User pp){
|
|
|
try {
|
|
|
@SuppressWarnings("unchecked")
|
|
|
Integer user_id = ValidationUtil.checkAndAssignInt(req.getHeader("Authorization").split("&")[1]);
|
|
@@ -118,11 +118,12 @@ public class PlannerAction {
|
|
|
Integer plannerId = ValidationUtil.checkAndAssignInt(pp.getPlannerId());//得到前端传来的计划员id(校验)
|
|
|
ValidationUtil.checkBlankAndAssignString(pp.getSign());//校验前端传来的签名
|
|
|
if(pp.getSupplierId().equals("")) {//判断如果传过来得到的供应商是没有移动的的 (就是点击配置后,什么操作都没做) 就提示他 不让删除原先得供应商
|
|
|
- throw new RuntimeException("不能操作");
|
|
|
+
|
|
|
+ throw new RuntimeException("什么都不用操作");
|
|
|
|
|
|
}else {//否则就做先删除原先得 在添加得到新的供应商id 做插入操作
|
|
|
plannerService.deleteBeforeSupplierByUserId(plannerId);//(前端传来的计划员id)根据计划员id先删除之前所对应的供应商
|
|
|
- plannerService.insertAgainSupplier(pp);
|
|
|
+ plannerService.insertAgainSupplier(pp);//然后在插入新得到的供应商id
|
|
|
}
|
|
|
|
|
|
return JSONUtil.getJsonMap(200, true, HintMSG.OPERATION_SUCCESS,pp);//待
|