Commit 50d25213 authored by huyuchen's avatar huyuchen

huych-合同自动化代码提交

parent 5496fb45
...@@ -91,7 +91,6 @@ public class TEmployeeContractPre extends BaseEntity { ...@@ -91,7 +91,6 @@ public class TEmployeeContractPre extends BaseEntity {
@Schema(description = "法大大模版名称") @Schema(description = "法大大模版名称")
private String fadadaTemplate; private String fadadaTemplate;
@Schema(description = "数据来源1客户端 2客服端") @Schema(description = "数据来源1客户端 2客服端")
private String dataSource; private String dataSource;
...@@ -102,16 +101,13 @@ public class TEmployeeContractPre extends BaseEntity { ...@@ -102,16 +101,13 @@ public class TEmployeeContractPre extends BaseEntity {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime expectedConfirmTime; private LocalDateTime expectedConfirmTime;
@Schema(description = "预计发起时间") @Schema(description = "预计发起时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime expectedCollectionTime; private LocalDateTime expectedCollectionTime;
@Schema(description = "确认人") @Schema(description = "确认人")
private String confirmUser; private String confirmUser;
@Schema(description = "合同名称") @Schema(description = "合同名称")
private String contractName; private String contractName;
......
...@@ -56,7 +56,6 @@ public class EmployeeRegistrationPreVo implements Serializable { ...@@ -56,7 +56,6 @@ public class EmployeeRegistrationPreVo implements Serializable {
@TableField(updateStrategy = FieldStrategy.IGNORED) @TableField(updateStrategy = FieldStrategy.IGNORED)
private String townCode; private String townCode;
@Schema(description = "员工姓名") @Schema(description = "员工姓名")
private String employeeName; private String employeeName;
...@@ -124,7 +123,7 @@ public class EmployeeRegistrationPreVo implements Serializable { ...@@ -124,7 +123,7 @@ public class EmployeeRegistrationPreVo implements Serializable {
private List<TEmployeeInsurancePreVo> employeeInsurancePreVos; private List<TEmployeeInsurancePreVo> employeeInsurancePreVos;
@Schema(description = "合同待派单信息") @Schema(description = "合同待派单信息")
private TEmployeeContractPreVo employeeContractPreVo; private TEmployeeContractPreVo employeeContractPreVos;
@Schema(description = "附件集合") @Schema(description = "附件集合")
private List<TAttaInfoSaveVo> attaList; private List<TAttaInfoSaveVo> attaList;
......
...@@ -218,8 +218,8 @@ public class TEmployeeContractPreVo extends RowIndex implements Serializable { ...@@ -218,8 +218,8 @@ public class TEmployeeContractPreVo extends RowIndex implements Serializable {
/** /**
* 签订期限 * 签订期限
*/ */
@ExcelAttribute(name = "签订期限") @ExcelAttribute(name = "签订期限 0 固定期限 1 无固定期限 3.以完成一定工作任务为期限")
@Schema(description = "签订期限") @Schema(description = "签订期限 0 固定期限 1 无固定期限 3.以完成一定工作任务为期限")
private String contractTerm; private String contractTerm;
@ExcelAttribute(name = "合同年限-年") @ExcelAttribute(name = "合同年限-年")
......
...@@ -1328,13 +1328,11 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -1328,13 +1328,11 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} }
pre.setInsurancePreList(oldList); pre.setInsurancePreList(oldList);
} }
List<TAttaInfo> attaInfoAll = new ArrayList<>();
//获取合同待签订数据 //获取合同待签订数据
TEmployeeContractPre contract = contractPreMapper.selectOne(Wrappers.<TEmployeeContractPre>query().lambda() TEmployeeContractPre contract = contractPreMapper.selectOne(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getRegisterId,id) .eq(TEmployeeContractPre::getRegisterId,id)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(contract)) { if (Common.isNotNull(contract)) {
pre.setEmployeeContractPre(contract);
//附件赋值 //附件赋值
List<TAttaInfo> attaContractInfo = attaInfoService.list(Wrappers.<TAttaInfo>query().lambda() List<TAttaInfo> attaContractInfo = attaInfoService.list(Wrappers.<TAttaInfo>query().lambda()
.eq(TAttaInfo::getDomainId, contract.getId())); .eq(TAttaInfo::getDomainId, contract.getId()));
...@@ -1345,7 +1343,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -1345,7 +1343,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
url = ossUtil.getObjectUrl(null, a.getAttaSrc()); url = ossUtil.getObjectUrl(null, a.getAttaSrc());
a.setAttaUrl(null != url ? url.toString(): ""); a.setAttaUrl(null != url ? url.toString(): "");
} }
attaInfoAll.addAll(attaContractInfo); contract.setAttaList(attaContractInfo);
pre.setEmployeeContractPre(contract);
} }
} }
...@@ -1358,13 +1357,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -1358,13 +1357,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
url = ossUtil.getObjectUrl(null, a.getAttaSrc()); url = ossUtil.getObjectUrl(null, a.getAttaSrc());
a.setAttaUrl(null != url ? url.toString(): ""); a.setAttaUrl(null != url ? url.toString(): "");
} }
attaInfoAll.addAll(attaInfo); pre.setAttaList(attaInfo);
} }
if (!attaInfoAll.isEmpty()) {
pre.setAttaList(attaInfoAll);
} }
}
return pre; return pre;
} }
......
...@@ -600,8 +600,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -600,8 +600,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
} }
//1.9.12合同自动化校验逻辑 //1.9.12合同自动化校验逻辑
if (preVo.getServerItem().contains("合同") && null != preVo.getEmployeeContractPreVo()) { if (preVo.getServerItem().contains("合同") && null != preVo.getEmployeeContractPreVos()) {
TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVo(); TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVos();
//根据身份证号码和项目编号查询合同 //根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo(); TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo();
cardVo.setEmpIdcard(registration.getEmpIdcard()); cardVo.setEmpIdcard(registration.getEmpIdcard());
...@@ -644,17 +644,19 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -644,17 +644,19 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//生成档案待建档数据 //生成档案待建档数据
initRegistPreInfo(registration, preVo, user, CommonConstants.ZERO_STRING); initRegistPreInfo(registration, preVo, user, CommonConstants.ZERO_STRING);
R<String> domainR = archivesDaprUtil.saveRegistPreInfo(preVo); R<String> domainR = archivesDaprUtil.saveRegistPreInfo(preVo);
if (Common.isNotNull(domainR) && Common.isNotNull(domainR.getData()) && if (Common.isNotNull(domainR) && Common.isNotNull(domainR.getData())) {
preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) { if (preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) {
//生成商险待购买的数据 //生成商险待购买的数据
for (TEmployeeInsurancePreVo insurancePreVo : preVo.getEmployeeInsurancePreVos()) { for (TEmployeeInsurancePreVo insurancePreVo : preVo.getEmployeeInsurancePreVos()) {
initInsruancePreInfo(registration, insurancePreVo, user,domainR.getData()); initInsruancePreInfo(registration, insurancePreVo, user, domainR.getData());
} }
insuranceDaprUtil.saveInsurancePreInfo(preVo); insuranceDaprUtil.saveInsurancePreInfo(preVo);
if (Common.isNotNull(preVo.getEmployeeContractPreVo()) && }
CommonConstants.ONE_STRING.equals(preVo.getEmployeeContractPreVo().getContractFlag())) { if (preVo.getServerItem().contains("合同") && null != preVo.getEmployeeContractPreVos() &&
Common.isNotNull(preVo.getEmployeeContractPreVos().getContractFlag()) &&
CommonConstants.ONE_STRING.equals(preVo.getEmployeeContractPreVos().getContractFlag())) {
//生成合同待购买数据 //生成合同待购买数据
initContractPreInfo(registration, preVo.getEmployeeContractPreVo(), user, domainR.getData()); initContractPreInfo(registration, preVo.getEmployeeContractPreVos(), user, domainR.getData());
} }
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -891,8 +893,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -891,8 +893,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
} }
//1.9.12合同自动化校验逻辑 //1.9.12合同自动化校验逻辑
if (preVo.getServerItem().contains("合同") && null != preVo.getEmployeeContractPreVo()) { if (preVo.getServerItem().contains("合同") && null != preVo.getEmployeeContractPreVos()) {
TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVo(); TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVos();
//根据身份证号码和项目编号查询合同 //根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo(); TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo();
cardVo.setEmpIdcard(registration.getEmpIdcard()); cardVo.setEmpIdcard(registration.getEmpIdcard());
...@@ -949,15 +951,17 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -949,15 +951,17 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//生成档案待建档数据 //生成档案待建档数据
initRegistPreInfo(registration, preVo, user, CommonConstants.ZERO_STRING); initRegistPreInfo(registration, preVo, user, CommonConstants.ZERO_STRING);
R<String> domainR = archivesDaprUtil.saveRegistPreInfo(preVo); R<String> domainR = archivesDaprUtil.saveRegistPreInfo(preVo);
if (Common.isNotNull(domainR) && Common.isNotNull(domainR.getData()) && if (Common.isNotNull(domainR) && Common.isNotNull(domainR.getData())) {
preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) { if (preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) {
//生成商险待购买的数据 //生成商险待购买的数据
TEmployeeInsurancePreVo insurancePreVo = preVo.getEmployeeInsurancePreVos().get(0); TEmployeeInsurancePreVo insurancePreVo = preVo.getEmployeeInsurancePreVos().get(0);
initInsruancePreInfo(registration, insurancePreVo, user,domainR.getData()); initInsruancePreInfo(registration, insurancePreVo, user, domainR.getData());
insuranceDaprUtil.saveInsurancePreInfo(preVo); insuranceDaprUtil.saveInsurancePreInfo(preVo);
TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVo(); }
if (Common.isNotNull(employeeContractPreVo) && Common.isNotNull(employeeContractPreVo.getContractFlag()) TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVos();
&& CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractFlag())) { if (preVo.getServerItem().contains("合同") && Common.isNotNull(employeeContractPreVo) &&
Common.isNotNull(employeeContractPreVo.getContractFlag()) &&
CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractFlag())) {
//生成合同待购买数据 //生成合同待购买数据
initContractPreInfo(registration, employeeContractPreVo, user, domainR.getData()); initContractPreInfo(registration, employeeContractPreVo, user, domainR.getData());
} }
...@@ -1097,7 +1101,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1097,7 +1101,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
initInsruancePreInfo(registrationNow, insurancePreVo, user, domainR.getData()); initInsruancePreInfo(registrationNow, insurancePreVo, user, domainR.getData());
} }
insuranceDaprUtil.saveInsurancePreInfo(preVo); insuranceDaprUtil.saveInsurancePreInfo(preVo);
TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVo(); TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVos();
if (Common.isNotNull(employeeContractPreVo) && Common.isNotNull(employeeContractPreVo.getContractFlag()) if (Common.isNotNull(employeeContractPreVo) && Common.isNotNull(employeeContractPreVo.getContractFlag())
&& CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractFlag())) { && CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractFlag())) {
//生成合同待购买数据 //生成合同待购买数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment