Commit 2120762a by jianan

电子报聘生成合同前加参数校验

parent 91d40397
......@@ -549,8 +549,9 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
//收件地址
String address = systemConfigService.getSingleConfigValue("PractitionerHiringNotifyAddress");
//抄送地址
String ccAddress = systemConfigService.getSingleConfigValue("PractitionerHiringNotifyAddress");
String[] ccAddresses = {ccAddress};
List<String> ccList = systemConfigService.getListConfigValue("PractitionerHiringNotifyCCAddress");
List<String> arrList = new ArrayList(ccList);
String[] ccAddresses = arrList.toArray(new String[arrList.size()]);
AclPractitionerHiringMembership memberShip = membershipMapper.selectByHiringBasicInfoId(basicInfo.getId());
......
......@@ -571,6 +571,13 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
@Override
public CommonResultResponseVO saveBankAccount(SaveBankAccountRequestVO requestVO) {
CommonResultResponseVO resp = new CommonResultResponseVO();
String bankAccountOpening = requestVO.getBankAccountOpening();
String bankAccountId = requestVO.getBankAccountId();
if (StringUtils.isEmpty(bankAccountOpening) || StringUtils.isEmpty(bankAccountId)) {
resp.setCommonResult(new CommonResult(false, "开户行或银行卡号不能为空"));
return resp;
}
try {
AclPractitionerHiringBasicInfo basicInfo = new AclPractitionerHiringBasicInfo();
BeanUtils.copyProperties(requestVO, basicInfo);
......@@ -711,23 +718,28 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
Long hiringBasicInfoId = requestVO.getHiringBasicInfoId();
Long practitionerId = requestVO.getPractitionerId();
if (hiringBasicInfoId == null) {
resp.setCommonResult(new CommonResult(true, "此经纪人无电子合同"));
resp.setCommonResult(new CommonResult(false, "此经纪人无电子合同"));
return resp;
}
AclPractitioner practitioner = aclPractitionerMapper.selectByPrimaryKey(practitionerId);
String practitionerCode = practitioner == null ? null : practitioner.getPractitionerCode();
String practitionerRegNo = practitioner == null ? null : practitioner.getPractitionerRegNo();
if (StringUtils.isEmpty(practitionerRegNo)) {
resp.setCommonResult(new CommonResult(false, "执业编号不能为空,请保存后再生成合同"));
return resp;
}
if (StringUtils.isEmpty(practitionerCode)) {
resp.setCommonResult(new CommonResult(true, "内部编号不能为空,请注意保存"));
resp.setCommonResult(new CommonResult(false, "内部编号不能为空,请保存后再生成合同"));
return resp;
}
// if (contractNo != null) {
// resp.setCommonResult(new CommonResult(true, "合同已存在"));
// return resp;
// }
String contractNo = hiringContractService.getNextContractNo();
// 合同编号已存在就不生成新的
String contractNo = practitioner.getContractNo();
if (StringUtils.isEmpty(contractNo)) {
contractNo = hiringContractService.getNextContractNo();
}
String contractOssPath = hiringContractService.generatePractitionerContract(practitionerCode, contractNo, hiringBasicInfoId);
//4、经纪人表生成经纪人记录ag_acl_practitioner,ag_acl_practitioner.contract_oss_path
......
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