完善检查项目模块
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
This commit is contained in:
parent
e9a46f6dfb
commit
6381043a77
@ -27,7 +27,6 @@ import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.doctor.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.doctor.DoctorDO;
|
||||
import cn.iocoder.yudao.module.system.service.doctor.DoctorService;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
@ -46,9 +46,20 @@ public class examitemsController {
|
||||
@Operation(summary = "创建检查部位")
|
||||
@PreAuthorize("@ss.hasPermission('examitems:examitems:create')")
|
||||
public CommonResult<String> createexamitems(@Valid @RequestBody examitemsSaveReqVO createReqVO) {
|
||||
UUID guid = UUID.randomUUID();
|
||||
createReqVO.setId(guid.toString());
|
||||
return success(examitemsService.createexamitems(createReqVO));
|
||||
|
||||
String msg="";
|
||||
if(!examitemsService.getexamItemcodexist(createReqVO.getExamItemCode()))
|
||||
{
|
||||
UUID guid = UUID.randomUUID();
|
||||
createReqVO.setId(guid.toString());
|
||||
msg= examitemsService.createexamitems(createReqVO);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg="项目ID已经存在";
|
||||
}
|
||||
|
||||
return success(msg);
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
|
@ -1,15 +1,13 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.examitems;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.doctor.DoctorDO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.examitems.examitemsDO;
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.examitems.vo.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 检查部位 Mapper
|
||||
@ -30,4 +28,5 @@ public interface examitemsMapper extends BaseMapperX<examitemsDO> {
|
||||
.orderByDesc(examitemsDO::getId));
|
||||
}
|
||||
|
||||
int selectItemCount(@Param("examItemCode") String examItemCode);
|
||||
}
|
@ -53,4 +53,5 @@ public interface examitemsService {
|
||||
*/
|
||||
PageResult<examitemsDO> getexamitemsPage(examitemsPageReqVO pageReqVO);
|
||||
|
||||
boolean getexamItemcodexist(String code);
|
||||
}
|
@ -74,4 +74,20 @@ public class examitemsServiceImpl implements examitemsService {
|
||||
return examitemsMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getexamItemcodexist(String examItemCode) {
|
||||
boolean bol=false;
|
||||
int count = examitemsMapper.selectItemCount(examItemCode);
|
||||
if(count>0)
|
||||
{
|
||||
bol=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
bol=false;
|
||||
}
|
||||
|
||||
return bol;
|
||||
}
|
||||
|
||||
}
|
@ -9,4 +9,9 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<select id="selectItemCount" resultType="java.lang.Integer">
|
||||
select count(1) FROM tb_examitems where examItemCode=#{examItemCode}
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user