|
|
|
|
@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
import com.chinaweal.aiccs.aiccs.abnormal.entity.EBaseinfo;
|
|
|
|
|
import com.chinaweal.aiccs.aiccs.abnormal.service.EBaseinfoService;
|
|
|
|
|
import com.chinaweal.aiccs.aiccs.dict.service.CmsDictCodeService;
|
|
|
|
|
import com.chinaweal.aiccs.aiccs.susnate.dto.EntBaseWithFalPerInfoQueryDTO;
|
|
|
|
|
import com.chinaweal.aiccs.aiccs.susnate.dto.FalPerInfoAddDTO;
|
|
|
|
|
import com.chinaweal.aiccs.aiccs.susnate.dto.FalPerInfoQueryDTO;
|
|
|
|
|
@ -13,9 +16,13 @@ import com.chinaweal.aiccs.aiccs.susnate.entity.EFalPerInfo;
|
|
|
|
|
import com.chinaweal.aiccs.aiccs.susnate.mapper.EFalPerInfoMapper;
|
|
|
|
|
import com.chinaweal.aiccs.aiccs.susnate.service.IEFalPerInfoService;
|
|
|
|
|
import com.chinaweal.aiccs.aiccs.susnate.vo.EntBaseWithFalPerInfoVO;
|
|
|
|
|
import com.chinaweal.aiccs.aiccs.system.service.TRBaseCodeService;
|
|
|
|
|
import com.chinaweal.aiccs.common.constant.CommonConstants;
|
|
|
|
|
import com.chinaweal.aiccs.common.util.StringUtils;
|
|
|
|
|
import com.chinaweal.aiccs.org.entity.OrgUnits;
|
|
|
|
|
import com.chinaweal.aiccs.org.service.AicorgService;
|
|
|
|
|
import com.chinaweal.aicorg.model.AICUser;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
@ -28,6 +35,18 @@ import java.time.LocalDateTime;
|
|
|
|
|
@Service
|
|
|
|
|
public class EFalPerInfoServiceImpl extends ServiceImpl<EFalPerInfoMapper, EFalPerInfo> implements IEFalPerInfoService {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private EBaseinfoService eBaseinfoService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private TRBaseCodeService trBaseCodeService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private CmsDictCodeService cmsDictCodeService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private AicorgService aicorgService;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public EFalPerInfo addFalPerInfo(FalPerInfoAddDTO dto, AICUser curUser) {
|
|
|
|
|
EFalPerInfo entity = new EFalPerInfo();
|
|
|
|
|
@ -43,7 +62,26 @@ public class EFalPerInfoServiceImpl extends ServiceImpl<EFalPerInfoMapper, EFalP
|
|
|
|
|
entity.setJudDate(dto.getJudDate());
|
|
|
|
|
entity.setDstate(CommonConstants.FALSE_0);
|
|
|
|
|
entity.setSExtDataTime(LocalDateTime.now());
|
|
|
|
|
entity.setSExtFromNode(curUser.getRegionID());
|
|
|
|
|
// BUG修复:s_ext_fromnode 统一设置为 150000
|
|
|
|
|
entity.setSExtFromNode("150000");
|
|
|
|
|
|
|
|
|
|
// BUG修复:通过 uniscid 或 regno 获取 pripid
|
|
|
|
|
if (StringUtils.isBlank(entity.getPripid()) && StringUtils.isNotBlank(dto.getUniscid())) {
|
|
|
|
|
EBaseinfo baseinfo = eBaseinfoService.getEntBaseInfoByCode(dto.getUniscid());
|
|
|
|
|
if (baseinfo != null) {
|
|
|
|
|
entity.setPripid(baseinfo.getPripid());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// BUG修复:通过 judAuth 获取 judAuthCn
|
|
|
|
|
if (StringUtils.isNotBlank(dto.getJudAuth())) {
|
|
|
|
|
String code = StringUtils.fillZeroSuffix(StringUtils.clearRegionZero(dto.getJudAuth()), 6);
|
|
|
|
|
OrgUnits one = aicorgService.lambdaQuery().eq(OrgUnits::getOrgNumber, code).eq(OrgUnits::getUnitType, "1")
|
|
|
|
|
.eq(OrgUnits::getDeleted, CommonConstants.FALSE_0).last("limit 1").one();
|
|
|
|
|
if (one != null) {
|
|
|
|
|
entity.setJudAuthCn(one.getOrgUnitName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
save(entity);
|
|
|
|
|
return entity;
|
|
|
|
|
}
|
|
|
|
|
@ -63,6 +101,25 @@ public class EFalPerInfoServiceImpl extends ServiceImpl<EFalPerInfoMapper, EFalP
|
|
|
|
|
entity.setJudAuth(dto.getJudAuth());
|
|
|
|
|
entity.setJudDate(dto.getJudDate());
|
|
|
|
|
entity.setSExtDataTime(LocalDateTime.now());
|
|
|
|
|
|
|
|
|
|
// BUG修复:通过 uniscid 或 regno 获取 pripid
|
|
|
|
|
if (StringUtils.isBlank(entity.getPripid()) && StringUtils.isNotBlank(dto.getUniscid())) {
|
|
|
|
|
EBaseinfo baseinfo = eBaseinfoService.getEntBaseInfoByCode(dto.getUniscid());
|
|
|
|
|
if (baseinfo != null) {
|
|
|
|
|
entity.setPripid(baseinfo.getPripid());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// BUG修复:通过 judAuth 获取 judAuthCn
|
|
|
|
|
if (StringUtils.isNotBlank(dto.getJudAuth())) {
|
|
|
|
|
String code = StringUtils.fillZeroSuffix(StringUtils.clearRegionZero(dto.getJudAuth()), 6);
|
|
|
|
|
OrgUnits one = aicorgService.lambdaQuery().eq(OrgUnits::getOrgNumber, code).eq(OrgUnits::getUnitType, "1")
|
|
|
|
|
.eq(OrgUnits::getDeleted, CommonConstants.FALSE_0).last("limit 1").one();
|
|
|
|
|
if (one != null) {
|
|
|
|
|
entity.setJudAuthCn(one.getOrgUnitName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updateById(entity);
|
|
|
|
|
return entity;
|
|
|
|
|
}
|
|
|
|
|
|