|
@@ -1,6 +1,7 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.diagbot.dto.GetUpdateInfoDTO;
|
|
|
import com.diagbot.dto.GetUpdateInfoDetialDTO;
|
|
@@ -8,6 +9,7 @@ import com.diagbot.dto.QcCasesEntryAllDTO;
|
|
|
import com.diagbot.dto.QcHospitalInfoAllDTO;
|
|
|
import com.diagbot.entity.CasesEntryHospital;
|
|
|
import com.diagbot.entity.QcCasesEntry;
|
|
|
+import com.diagbot.entity.QcInputcasesMapping;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.service.impl.QcCasesEntryServiceImpl;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
@@ -88,14 +90,31 @@ public class QcCacesEntryFacade extends QcCasesEntryServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public Boolean deleteQcCasesEntry(GetUpdateInfoVO getUpdateInfoVO){
|
|
|
- //删除条目
|
|
|
+ /* //删除条目
|
|
|
QueryWrapper<QcCasesEntry> qcCasesEntryQueryWrapper = new QueryWrapper<>();
|
|
|
qcCasesEntryQueryWrapper.eq("id",getUpdateInfoVO.getId());
|
|
|
this.remove(qcCasesEntryQueryWrapper);
|
|
|
//删除明细
|
|
|
QueryWrapper<CasesEntryHospital> casesEntryHospitalQueryWrapper = new QueryWrapper<>();
|
|
|
qcCasesEntryQueryWrapper.eq("cases_entry_id",getUpdateInfoVO.getId());
|
|
|
- casesEntryHospitalFacade.remove(casesEntryHospitalQueryWrapper);
|
|
|
- return true;
|
|
|
+ casesEntryHospitalFacade.remove(casesEntryHospitalQueryWrapper);*/
|
|
|
+ //优化后
|
|
|
+ boolean res = false;
|
|
|
+ UpdateWrapper<QcCasesEntry> qcCasesEntryQueryUpdate = new UpdateWrapper<>();
|
|
|
+ qcCasesEntryQueryUpdate
|
|
|
+ .eq("is_deleted",IsDeleteEnum.N.getKey())
|
|
|
+ .eq("id",getUpdateInfoVO.getId())
|
|
|
+ .set("is_deleted",IsDeleteEnum.Y.getKey());
|
|
|
+ res = update(qcCasesEntryQueryUpdate);
|
|
|
+ if (res) {
|
|
|
+ UpdateWrapper<CasesEntryHospital> qcHospitalUpdate = new UpdateWrapper<>();
|
|
|
+ qcHospitalUpdate
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("cases_entry_id",getUpdateInfoVO.getId())
|
|
|
+ .set("is_deleted", IsDeleteEnum.Y.getKey());
|
|
|
+ res = casesEntryHospitalFacade.update(qcHospitalUpdate);
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+
|
|
|
}
|
|
|
}
|