Commit 7209008c authored by 董天德's avatar 董天德

Merge remote-tracking branch 'origin/dev_20230308_服务参数配置删除_zxl' into dev_ch_master

parents 050c0d71 19a952e5
...@@ -61,17 +61,18 @@ public class NursingServiceItemsController { ...@@ -61,17 +61,18 @@ public class NursingServiceItemsController {
/** /**
* 护理机构护理项目配置 * 护理机构护理项目配置
* * @param type 3删除
* @param project 护理项目 护理项目id(如果为null就是新增,否则就是修改) * @param project 护理项目 护理项目id(如果为null就是新增,否则就是修改)
*/ */
@RequestMapping("/organProjectConfig") @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 ) { if (StrUtil.isBlank(project.getItemName()) || StrUtil.isBlank(project.getServiceContent()) || project.getCategoryType() == null ) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
} }
nursingServiceItemsService.organProjectConfig(project); nursingServiceItemsService.organProjectConfig(project,type);
return Result.success(); return Result.success();
} }
......
...@@ -17,7 +17,7 @@ public interface NursingServiceItemsService { ...@@ -17,7 +17,7 @@ public interface NursingServiceItemsService {
Page<OrganProjectVO> organProjectList(Page<OrganProjectVO> page, String organIds,String organId, String name, String status); 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); void disableLevelConfig(String disableLevelId, String disableLevelName, Short disableLevelStartValue, Short disableLevelEndValue, String disableLevelRemark);
......
...@@ -51,13 +51,22 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic ...@@ -51,13 +51,22 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic
} }
@Override @Override
public void organProjectConfig(ChSrvOrganProject project) { public void organProjectConfig(ChSrvOrganProject project,int type) {
if (project.getProjectId() != null) { if(type ==3){
chSrvOrganProjectMapper.updateById(project); ChSrvOrganProject chSrvOrganProject = new ChSrvOrganProject();
} else { chSrvOrganProject.setStatus((short) 1);
project.setEffTime(new Date());//创建时间 UpdateWrapper<ChSrvOrganProject> updateWrapper = new UpdateWrapper<ChSrvOrganProject>();
chSrvOrganProjectMapper.insert(project); updateWrapper.eq("PROJECT_ID",project.getProjectId());
chSrvOrganProjectMapper.update(chSrvOrganProject,updateWrapper);
}else{
if (project.getProjectId() != null) {
chSrvOrganProjectMapper.updateById(project);
} else {
project.setEffTime(new Date());//创建时间
chSrvOrganProjectMapper.insert(project);
}
} }
} }
@Override @Override
......
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