|
@@ -59,7 +59,7 @@ public class RegularManagementFacade {
|
|
|
*/
|
|
|
public IPage<GetRegularPageDTO> getRegularPage(GetRegularPageVO getRegularPageVO) {
|
|
|
QueryWrapper<RegularInfo> wrapper = new QueryWrapper();
|
|
|
- wrapper.like("name",getRegularPageVO.getName());
|
|
|
+ wrapper.like("name", getRegularPageVO.getName());
|
|
|
regularInfoFacade.list(wrapper);
|
|
|
return regularInfoFacade.getBaseMapper().getRegularPage(getRegularPageVO);
|
|
|
}
|
|
@@ -100,6 +100,7 @@ public class RegularManagementFacade {
|
|
|
//先获取正则维护关联表id
|
|
|
List<Long> regularMappingIdList = getRegularMappingId(upRegularByIdVO.getId());
|
|
|
if (regularInfoFacade.updateById(regularInfo)) {
|
|
|
+ if (ListUtil.isNotEmpty(regularMappingIdList)) {
|
|
|
return columnVerifyFacade.update(new UpdateWrapper<ColumnVerify>()
|
|
|
.in("verify_id", regularMappingIdList)
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -108,6 +109,8 @@ public class RegularManagementFacade {
|
|
|
.set("modifier", SysUserUtils.getCurrentPrinciple() == null ? "0" : SysUserUtils.getCurrentPrinciple())
|
|
|
.set("gmt_modified", DateUtil.now()));
|
|
|
}
|
|
|
+ return true;
|
|
|
+ }
|
|
|
return false;
|
|
|
}
|
|
|
|
|
@@ -146,39 +149,40 @@ public class RegularManagementFacade {
|
|
|
//先获取正则维护关联表id
|
|
|
List<Long> regularMappingIdList = getRegularMappingId(id);
|
|
|
//删除表字段的实际值与正则式关联关系
|
|
|
- if(regularMappingFacade.remove(new UpdateWrapper<RegularMapping>()
|
|
|
+ if (regularMappingFacade.remove(new UpdateWrapper<RegularMapping>()
|
|
|
.eq("regular_id", id)
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey()))){
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey()))) {
|
|
|
return columnVerifyFacade.remove(new UpdateWrapper<ColumnVerify>()
|
|
|
.in("verify_id", regularMappingIdList)
|
|
|
.eq("type", ColumnVerifyTypeEnum.REGULAR_TYPE.getKey())
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()));
|
|
|
}
|
|
|
//删除表字段的正则式校验结果表中的正则式
|
|
|
-// return regularResultFacade.update(new UpdateWrapper<RegularResult>()
|
|
|
-// .eq(hospitalId != null, "hospital_id", hospitalId)
|
|
|
-// .eq("regular_id", id)
|
|
|
-// .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
-// .set("modifier", SysUserUtils.getCurrentPrinciple() == null ? "0" : SysUserUtils.getCurrentPrinciple())
|
|
|
-// .set("gmt_modified", DateUtil.now())
|
|
|
-// .set("is_deleted", IsDeleteEnum.Y.getKey()));
|
|
|
+ // return regularResultFacade.update(new UpdateWrapper<RegularResult>()
|
|
|
+ // .eq(hospitalId != null, "hospital_id", hospitalId)
|
|
|
+ // .eq("regular_id", id)
|
|
|
+ // .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ // .set("modifier", SysUserUtils.getCurrentPrinciple() == null ? "0" : SysUserUtils.getCurrentPrinciple())
|
|
|
+ // .set("gmt_modified", DateUtil.now())
|
|
|
+ // .set("is_deleted", IsDeleteEnum.Y.getKey()));
|
|
|
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
- * 根据正则id获取正则维护表id集合
|
|
|
+ * 根据正则id获取正则维护表id集合
|
|
|
*
|
|
|
* @param id
|
|
|
* @return: 正则维护表id集合
|
|
|
*/
|
|
|
- public List<Long> getRegularMappingId(Long id){
|
|
|
+ public List<Long> getRegularMappingId(Long id) {
|
|
|
List<Long> regularMappingIdList = new ArrayList<>();
|
|
|
List<RegularMapping> regularMappingList = regularMappingFacade.getBaseMapper().selectList(new QueryWrapper<RegularMapping>()
|
|
|
.eq("regular_id", id)
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
);
|
|
|
- if(ListUtil.isNotEmpty(regularMappingList)) {
|
|
|
+ if (ListUtil.isNotEmpty(regularMappingList)) {
|
|
|
for (RegularMapping regularMapping : regularMappingList) {
|
|
|
regularMappingIdList.add(regularMapping.getId());
|
|
|
}
|