Merge remote-tracking branch 'origin/develop_1' into develop_1

This commit is contained in:
Mr.Z
2021-09-26 13:48:47 +08:00
4 changed files with 32 additions and 2 deletions
@@ -218,7 +218,10 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
int result = sarStandardsInfoEOService.deleteSarStandards(ids);
if (result > 0) {
return Result.success("0", "删除成功", result);
} else {
}else if(result == -1) {
return Result.success("-1","所选的标准下挂有标准,无法删除");
}
else {
return Result.error("删除失败");
}
}
@@ -15,6 +15,8 @@ import com.adc.da.search.entity.StandLawsEO;
import com.adc.da.search.service.StandLawsSearchService;
import com.adc.da.slrs.otConvertMq.dao.OtConvertMqDao;
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarLawsAttrDetailedList;
import com.adc.da.slrs.sarLawsAttrDetailedList.service.impl.SarLawsAttrDetailedListServiceImpl;
import com.adc.da.slrs.sarLawsInfo.entity.SarLawsInfo;
import com.adc.da.slrs.sarLawsInfo.page.SarLawsInfoEOPage;
import com.adc.da.slrs.sarLawsInfo.page.SarLawsItemsEOPage;
@@ -1285,13 +1287,32 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
}
@Autowired
SarLawsAttrDetailedListServiceImpl detailedListService;
public int deleteSarStandards(String ids) {
QueryWrapper<SarLawsAttrDetailedList> detailedListQueryWrapper = new QueryWrapper<>();
String[] idArr = ids.split(",");
SarStandardsInfo sarStandardsInfoEO = new SarStandardsInfo();
sarStandardsInfoEO.setValidFlag("1");
sarStandardsInfoEO.setModifyTime(new Date());
int countResult = 0;
//如果清单下挂着标准A,在标准库里删除标准A的话,加个验证 不让删这个标准
for (String id : idArr){
detailedListQueryWrapper.eq("stand_id",id);
int count = detailedListService.count(detailedListQueryWrapper);
if (count>0){
countResult = -1;
return countResult;
}
}
for (String id : idArr) {
countResult++;
//查询删除的标准信息(为删除代替关系)
SarStandardsInfo getDelStandInfoList = dao.selectById(id);
@@ -70,7 +70,7 @@ public class TsUserServiceImpl extends ServiceImpl<TsUserDao, TsUser> implements
Page<TsUser> tsUserPage = new Page<>();
System.out.println(tsUser.getCurrent());
System.out.println(tsUser.getSize());
List<TsUser> tsUserList = tsUserDao.getUserAndPositionPage((tsUser.getCurrent()-1)*tsUser.getSize(),1*tsUser.getSize(),tsUser);
List<TsUser> tsUserList = tsUserDao.getUserAndPositionPage((tsUser.getCurrent()-1)*tsUser.getSize(),tsUser.getSize(),tsUser);
Integer total = tsUserDao.getUserAndPositionCount(tsUser);
tsUserPage.setRecords(tsUserList);
tsUserPage.setCurrent(tsUser.getCurrent());
@@ -51,6 +51,12 @@
left join ts_position p
on up.position_id=p.id
where u.institution_id=#{TsUser.institutionId}
<if test="TsUser.uname != null and TsUser.uname != '' ">
and u.uname like concat('%',#{TsUser.uname},'%')
</if>
<if test="TsUser.email != null and TsUser.email != '' ">
and u.email like concat('%',#{TsUser.email},'%')
</if>
</select>
<select id="getUserIdsByPositionIds" resultType="String">