|
|
@ -224,9 +224,7 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Override |
|
|
|
public Result updateNew(EpidemicReportUserInfoDTO dto) { |
|
|
|
if (dto.getUnitId() != null && dto.getUnitId() != NumConstant.ZERO) { |
|
|
|
saveHouseRelation(dto); |
|
|
|
} |
|
|
|
|
|
|
|
//基础信息dto
|
|
|
|
EpidemicUserInfoEntity userInfoDTO = new EpidemicUserInfoEntity(); |
|
|
|
//录入信息dto
|
|
|
@ -308,6 +306,11 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// 更新人房关系
|
|
|
|
if (dto.getUnitId() != null && dto.getUnitId() != NumConstant.ZERO) { |
|
|
|
dto.setUserName(entity.getUserName()); |
|
|
|
saveHouseRelation(dto); |
|
|
|
} |
|
|
|
} catch (RenException e) { |
|
|
|
return new Result().error(e.getMsg()); |
|
|
|
} |
|
|
@ -487,29 +490,9 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public Result deleteUserById(Long[] ids) { |
|
|
|
|
|
|
|
//物理删除
|
|
|
|
baseDao.deleteByIds(ids); |
|
|
|
// //1、获取详情id
|
|
|
|
// Long inoutRecord = ids[0];
|
|
|
|
// if (null != inoutRecord) {
|
|
|
|
// baseDao.deleteById(inoutRecord);
|
|
|
|
// //查询信息
|
|
|
|
// EpidemicUserInfoEntity entity = baseDao.selectByIdCard(inoutRecord);
|
|
|
|
// if (null == entity) {
|
|
|
|
// return new Result().error("数据错误,刷新后重试!!");
|
|
|
|
// }
|
|
|
|
// // 2、判断人员信息表中数据如果只有一条就全删
|
|
|
|
// Integer integer = inoutRecordDao.selectByState(entity.getIdCard());
|
|
|
|
// if (integer == 1) {
|
|
|
|
// // 若同时存在,则保留基础信息,删除额外信息。
|
|
|
|
// baseDao.deleteById(entity.getId());
|
|
|
|
// }
|
|
|
|
// inoutRecordDao.deleteById(inoutRecord);
|
|
|
|
// } else {
|
|
|
|
// return new Result().error("删除参数不正确,请联系管理员查看");
|
|
|
|
// }
|
|
|
|
//根据情况进项删除
|
|
|
|
epidemicUserInoutRecordDao.deleteByIds(ids); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|