Commit 06c0e8e6 authored by wei's avatar wei 🎱

供应商停用接口

parent cc3a5d29
......@@ -64,6 +64,12 @@ public class ExtSupplierManageController<V extends ExtSupplierManageVO, S extend
extSupplierManageService.generateSupplierNumber(extSupplierManageVO);
return ApiResult.ok(ApiResult.SUCCESS, "更新供方编号成功");
}
@ApiOperation("供应商停用")
@PostMapping(value = "/contextDisable")
public ApiResult contextDisable(@RequestParam("id") Long id) {
return ApiResult.ok(extSupplierManageService.contextDisable(id), "操作完成");
}
}
......@@ -17,6 +17,7 @@ import java.util.List;
public interface ExtSupplierManageService<V extends ExtSupplierManageVO> extends ExtSupplierManageServiceShadow<V> {
/**
* 流程启动
*
* @param id
* @return
*/
......@@ -26,6 +27,7 @@ public interface ExtSupplierManageService<V extends ExtSupplierManageVO> extends
/**
* 导出
*
* @param searchQueryCondition
* @param warningDay
* @return
......@@ -34,6 +36,7 @@ public interface ExtSupplierManageService<V extends ExtSupplierManageVO> extends
/**
* 修改供应商编码
*
* @param extSupplierManageVO
*/
void generateSupplierNumber(ExtSupplierManageVO extSupplierManageVO);
......@@ -42,4 +45,12 @@ public interface ExtSupplierManageService<V extends ExtSupplierManageVO> extends
* 定时任务修改状态
*/
void changeSupplierStatus();
/**
* 停用
*
* @param id
* @return
*/
ExtSupplierManageVO contextDisable(Long id);
}
......@@ -153,6 +153,18 @@ public class ExtSupplierManageServiceImpl<V extends ExtSupplierManageVO> impleme
this.changeStatus(id, "Expired", true);
}
}
@Override
public ExtSupplierManageVO contextDisable(Long id) {
ExtSupplierManageVO extSupplierManageVO = this.get(id);
if (extSupplierManageVO == null) {
throw new DxBusinessException("500", "获取不到对象");
}
if (!extSupplierManageVO.getState().equals(Constants.RELEASE)) {
throw new DxBusinessException("500", "该对象不是编制状态");
}
return this.changeStatus(extSupplierManageVO.getId(), Constants.CONTEXT_DISABLE, true);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment