供应链设置
This commit is contained in:
parent
35fcb4445e
commit
ccb427c2cb
|
|
@ -81,9 +81,9 @@ public class ImsSettingController extends BaseController {
|
||||||
//@RequiresPermissions("ims:setting:add")
|
//@RequiresPermissions("ims:setting:add")
|
||||||
@SysLog(title = "厨房功能参数配置", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增厨房功能参数配置")
|
@SysLog(title = "厨房功能参数配置", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增厨房功能参数配置")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody ImsSetting imsSetting) {
|
public AjaxResult add(@RequestBody List<ImsSetting> imsSettings) {
|
||||||
try {
|
try {
|
||||||
return toAjax(imsSettingService.insertImsSetting(imsSetting));
|
return toAjax(imsSettingService.insertImsSetting(imsSettings));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return error(e.getMessage());
|
return error(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
@ -97,9 +97,9 @@ public class ImsSettingController extends BaseController {
|
||||||
//@RequiresPermissions("ims:setting:edit")
|
//@RequiresPermissions("ims:setting:edit")
|
||||||
@SysLog(title = "厨房功能参数配置", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改厨房功能参数配置")
|
@SysLog(title = "厨房功能参数配置", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改厨房功能参数配置")
|
||||||
@PostMapping("/edit")
|
@PostMapping("/edit")
|
||||||
public AjaxResult edit(@RequestBody ImsSetting imsSetting) {
|
public AjaxResult edit(@RequestBody List<ImsSetting> imsSettings) {
|
||||||
try {
|
try {
|
||||||
return toAjax(imsSettingService.updateImsSetting(imsSetting));
|
return toAjax(imsSettingService.updateImsSetting(imsSettings));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return error(e.getMessage());
|
return error(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,18 +29,18 @@ public interface IImsSettingService {
|
||||||
/**
|
/**
|
||||||
* 新增厨房功能参数配置
|
* 新增厨房功能参数配置
|
||||||
*
|
*
|
||||||
* @param imsSetting 厨房功能参数配置
|
* @param imsSettings 厨房功能参数配置
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertImsSetting(ImsSetting imsSetting);
|
public int insertImsSetting(List<ImsSetting> imsSettings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改厨房功能参数配置
|
* 修改厨房功能参数配置
|
||||||
*
|
*
|
||||||
* @param imsSetting 厨房功能参数配置
|
* @param imsSettings 厨房功能参数配置
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int updateImsSetting(ImsSetting imsSetting);
|
public int updateImsSetting(List<ImsSetting> imsSettings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除厨房功能参数配置
|
* 批量删除厨房功能参数配置
|
||||||
|
|
|
||||||
|
|
@ -46,14 +46,18 @@ public class ImsSettingServiceImpl implements IImsSettingService {
|
||||||
/**
|
/**
|
||||||
* 新增厨房功能参数配置
|
* 新增厨房功能参数配置
|
||||||
*
|
*
|
||||||
* @param imsSetting 厨房功能参数配置
|
* @param imsSettings 厨房功能参数配置
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertImsSetting(ImsSetting imsSetting) {
|
public int insertImsSetting(List<ImsSetting> imsSettings) {
|
||||||
imsSetting.setCreateTime(DateUtils.getNowDate());
|
|
||||||
try {
|
try {
|
||||||
return imsSettingMapper.insertImsSetting(imsSetting);
|
int count = 0;
|
||||||
|
for (ImsSetting imsSetting : imsSettings) {
|
||||||
|
imsSetting.setCreateTime(DateUtils.getNowDate());
|
||||||
|
count += imsSettingMapper.insertImsSetting(imsSetting);
|
||||||
|
}
|
||||||
|
return count;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException(e.getMessage());
|
throw new ServiceException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
@ -62,15 +66,19 @@ public class ImsSettingServiceImpl implements IImsSettingService {
|
||||||
/**
|
/**
|
||||||
* 修改厨房功能参数配置
|
* 修改厨房功能参数配置
|
||||||
*
|
*
|
||||||
* @param imsSetting 厨房功能参数配置
|
* @param imsSettings 厨房功能参数配置
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateImsSetting(ImsSetting imsSetting) {
|
public int updateImsSetting(List<ImsSetting> imsSettings) {
|
||||||
imsSetting.setUpdateTime(DateUtils.getNowDate());
|
|
||||||
imsSetting.setUpdateBy(SecurityUtils.getUsername());
|
|
||||||
try {
|
try {
|
||||||
return imsSettingMapper.updateImsSetting(imsSetting);
|
int count = 0;
|
||||||
|
for (ImsSetting imsSetting : imsSettings) {
|
||||||
|
imsSetting.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
imsSetting.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
count += imsSettingMapper.updateImsSetting(imsSetting);
|
||||||
|
}
|
||||||
|
return count;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException(e.getMessage());
|
throw new ServiceException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue