|
@@ -126,11 +126,12 @@ public class CasesEntryHospitalFacade extends CasesEntryHospitalServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public Boolean insertByHospital(InsertByHospitalVO insertByHospitalVO){
|
|
|
- if(insertByHospitalVO.getId().equals(null)){
|
|
|
+ if(insertByHospitalVO.getId()==null){
|
|
|
QueryWrapper<QcCasesEntry> qcCasesEntryWrapper = new QueryWrapper<>();
|
|
|
qcCasesEntryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey())
|
|
|
- .eq("name",insertByHospitalVO.getName());
|
|
|
- int sum = qcCacesEntryFacade.count();
|
|
|
+ .eq("name",insertByHospitalVO.getName())
|
|
|
+ .eq("cases_id",insertByHospitalVO.getCasesId());
|
|
|
+ int sum = qcCacesEntryFacade.count(qcCasesEntryWrapper);
|
|
|
if (sum != 0) {
|
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS, "该条目名称存在");
|
|
|
}
|