Commit 19a952e5 authored by Zengxiaoli's avatar Zengxiaoli

服务参数配置-服务方式定义列表加删除功能

parent 9adf0859
......@@ -61,17 +61,18 @@ public class NursingServiceItemsController {
/**
* 护理机构护理项目配置
*
* @param type 3删除
* @param project 护理项目 护理项目id(如果为null就是新增,否则就是修改)
*/
@RequestMapping("/organProjectConfig")
public Result<Object> organProjectConfig(ChSrvOrganProject project) {
public Result<Object> organProjectConfig(ChSrvOrganProject project,int type) {
if (type!=3){
//参数校验
//project.getSrvOrganId() == null || || project.getItemPrice() == null
if (StrUtil.isBlank(project.getItemName()) || StrUtil.isBlank(project.getServiceContent()) || project.getCategoryType() == null ) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
nursingServiceItemsService.organProjectConfig(project);
}
nursingServiceItemsService.organProjectConfig(project,type);
return Result.success();
}
......
......@@ -17,7 +17,7 @@ public interface NursingServiceItemsService {
Page<OrganProjectVO> organProjectList(Page<OrganProjectVO> page, String organIds,String organId, String name, String status);
void organProjectConfig(ChSrvOrganProject project);
void organProjectConfig(ChSrvOrganProject project,int type);
void disableLevelConfig(String disableLevelId, String disableLevelName, Short disableLevelStartValue, Short disableLevelEndValue, String disableLevelRemark);
......
......@@ -51,7 +51,14 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic
}
@Override
public void organProjectConfig(ChSrvOrganProject project) {
public void organProjectConfig(ChSrvOrganProject project,int type) {
if(type ==3){
ChSrvOrganProject chSrvOrganProject = new ChSrvOrganProject();
chSrvOrganProject.setStatus((short) 1);
UpdateWrapper<ChSrvOrganProject> updateWrapper = new UpdateWrapper<ChSrvOrganProject>();
updateWrapper.eq("PROJECT_ID",project.getProjectId());
chSrvOrganProjectMapper.update(chSrvOrganProject,updateWrapper);
}else{
if (project.getProjectId() != null) {
chSrvOrganProjectMapper.updateById(project);
} else {
......@@ -60,6 +67,8 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic
}
}
}
@Override
public void disableLevelConfig(String disableLevelId, String disableLevelName, Short disableLevelStartValue, Short disableLevelEndValue, String disableLevelRemark) {
if (StringUtils.isNotBlank(disableLevelId)) {
......
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