Merge remote-tracking branch 'origin/master'

# Conflicts:
#	ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/AppTaskController.java
This commit is contained in:
葛林强 2025-02-26 15:56:54 +08:00
commit b50023b60e
2 changed files with 14 additions and 1 deletions

View File

@ -69,7 +69,7 @@ public class AppPmsController extends BaseController {
// 判断入库单号是否重复 // 判断入库单号是否重复
AppPmsOrderIn existAppPmsOrderIn = appPmsOrderInService.selectAppPmsOrderInByListId(orderInRequest.getListId()); AppPmsOrderIn existAppPmsOrderIn = appPmsOrderInService.selectAppPmsOrderInByListId(orderInRequest.getListId());
if (existAppPmsOrderIn != null) { if (existAppPmsOrderIn != null) {
return error("入库单号重复。"); return AjaxResult.error(201,"入库单已存在");
} }
AppPmsOrderIn appPmsOrderIn = new AppPmsOrderIn(); AppPmsOrderIn appPmsOrderIn = new AppPmsOrderIn();
BeanUtils.copyProperties(orderInRequest, appPmsOrderIn); BeanUtils.copyProperties(orderInRequest, appPmsOrderIn);

View File

@ -23,6 +23,7 @@ public class AjaxResult extends HashMap<String, Object>
/** 数据对象 */ /** 数据对象 */
public static final String DATA_TAG = "data"; public static final String DATA_TAG = "data";
/** /**
* 初始化一个新创建的 AjaxResult 对象使其表示一个空消息 * 初始化一个新创建的 AjaxResult 对象使其表示一个空消息
*/ */
@ -59,6 +60,8 @@ public class AjaxResult extends HashMap<String, Object>
} }
} }
/** /**
* 返回成功消息 * 返回成功消息
* *
@ -102,6 +105,16 @@ public class AjaxResult extends HashMap<String, Object>
return new AjaxResult(HttpStatus.SUCCESS, msg, data); return new AjaxResult(HttpStatus.SUCCESS, msg, data);
} }
public static AjaxResult success(int code,String msg, Object returnDate)
{
return new AjaxResult(code, msg, returnDate);
}
public static AjaxResult success(int code,String msg)
{
return new AjaxResult(code, msg);
}
/** /**
* 返回警告消息 * 返回警告消息
* *