Commit c69027a0 authored by huyuchen's avatar huyuchen

户配置代码提交

parent 1d5b4a20
......@@ -180,36 +180,6 @@ public class FddContractAttachInfo extends BaseEntity {
@Schema(description ="结算主体编码")
private String departNo;
/**
* 创建者
*/
@Schema(description ="创建者")
private String createBy;
/**
* 更新人
*/
@Schema(description ="更新人")
private String updateBy;
/**
* 创建时间
*/
@Schema(description ="创建时间")
private LocalDateTime createTime;
/**
* 更新时间
*/
@Schema(description ="更新时间")
private LocalDateTime updateTime;
/**
* 创建人姓名
*/
@Schema(description ="创建人姓名")
private String createName;
/**
* 结算主体名称
*/
......
......@@ -141,35 +141,4 @@ public class FddContractInfo extends BaseEntity {
@Schema(description ="合同模板id")
private String fddTemplateId;
/**
* 创建者
*/
@Schema(description ="创建者")
private String createBy;
/**
* 更新人
*/
@Schema(description ="更新人")
private String updateBy;
/**
* 创建时间
*/
@Schema(description ="创建时间")
private LocalDateTime createTime;
/**
* 更新时间
*/
@Schema(description ="更新时间")
private LocalDateTime updateTime;
/**
* 创建人姓名
*/
@Schema(description ="创建人姓名")
private String createName;
}
......@@ -99,35 +99,4 @@ public class FddPersonAccount extends BaseEntity {
@Schema(description ="实名短信发送:0未发送 1已发送")
private String realMessageFlag;
/**
* 创建者
*/
@Schema(description ="创建者")
private String createBy;
/**
* 更新人
*/
@Schema(description ="更新人")
private String updateBy;
/**
* 创建时间
*/
@Schema(description ="创建时间")
private LocalDateTime createTime;
/**
* 更新时间
*/
@Schema(description ="更新时间")
private LocalDateTime updateTime;
/**
* 创建人姓名
*/
@Schema(description ="创建人姓名")
private String createName;
}
......@@ -83,7 +83,7 @@ public class FddController {
fddPersonAccountService.updateById(fddPersonAccount);
}
}
return R.ok();
return R.ok(null,"成功");
}
/**
......@@ -127,7 +127,7 @@ public class FddController {
fddPersonAccount.setCompanyInfoId(companyInfo.getId());
}
fddPersonAccountService.updateById(fddPersonAccount);
return R.ok();
return R.ok(null,"成功");
}
}
}
......@@ -186,7 +186,7 @@ public class FddController {
}
});
}
return R.ok();
return R.ok(null,"成功");
}
}
} else if (StringUtils.equals(fddEvent, "reviseTask")) {
......@@ -218,7 +218,7 @@ public class FddController {
e.printStackTrace();
}
});
return R.ok();
return R.ok(null,"成功");
}
}
} else if (StringUtils.equals(fddEvent, "sign")) {
......@@ -260,7 +260,7 @@ public class FddController {
employeeContractInfoService.updateById(ec);
}
}
return R.ok();
return R.ok(null,"成功");
}else if (StringUtils.equals(fddEvent, "notifyUrlVerify")) {
return R.ok(null,"success");
}
......
......@@ -84,7 +84,7 @@ public class FddPersonAccountController {
@PostMapping
@PreAuthorize("@pms.hasPermission('demo_fddpersonaccount_add')" )
public R saveAuth(@RequestBody FddPersonAccount fddPersonAccount) {
return R.ok(fddPersonAccountService.save(fddPersonAccount));
return fddPersonAccountService.saveInfo(fddPersonAccount);
}
/**
......
......@@ -78,5 +78,12 @@ public interface FddPersonAccountService extends IService<FddPersonAccount> {
* @return R
*/
R<List<FddCompanyInfo>> getAllDepart(String id);
/**
* 新增员工
* @param fddPersonAccount
* @return R
*/
R saveInfo (FddPersonAccount fddPersonAccount);
}
......@@ -86,27 +86,11 @@ public class FddPersonAccountServiceImpl extends ServiceImpl<FddPersonAccountMap
@Override
public R<String> getPersonUnionIdUrl(FddPersonAccount fddPersonAccount) throws ApiException {
long mobileCount = this.count(Wrappers.<FddPersonAccount>query().lambda().eq(FddPersonAccount::getMoblie, fddPersonAccount.getMoblie())
.eq(FddPersonAccount::getSystemFlag, CommonConstants.ZERO_STRING));
if(mobileCount > CommonConstants.ZERO_INT){
return R.failed("手机号已存在");
}
long idCardCount = this.count(Wrappers.<FddPersonAccount>query().lambda().eq(FddPersonAccount::getIdCard, fddPersonAccount.getIdCard())
.eq(FddPersonAccount::getSystemFlag, CommonConstants.ZERO_STRING));
if(idCardCount > CommonConstants.ZERO_INT){
return R.failed("身份证号已存在");
}
FddPersonAccount entity = new FddPersonAccount();
entity.setIdCard(fddPersonAccount.getIdCard());
entity.setName(fddPersonAccount.getName());
entity.setMoblie(fddPersonAccount.getMoblie());
entity.setSystemFlag(CommonConstants.ZERO_STRING);
this.save(entity);
//发送请求
GetPersonUnionIdUrlReq req = new GetPersonUnionIdUrlReq();
req.setToken(fddUtil.getToken());
req.setClientId(entity.getId());
req.setClientId(fddPersonAccount.getId());
req.setAuthScheme(CommonConstants.ZERO_INT);
NoticeReq notice = new NoticeReq();
//短信发送实名认证链接
......@@ -131,7 +115,8 @@ public class FddPersonAccountServiceImpl extends ServiceImpl<FddPersonAccountMap
reqLogService.saveLog(Thread.currentThread().getStackTrace()[1].getClassName(), Thread.currentThread().getStackTrace()[1].getMethodName(), req, rsp);
//校验参数
if (StringUtils.equals(rsp.getCode(), FddUtil.SUCCESS)) {
entity.setRealMessageFlag(CommonConstants.ONE_STRING);
fddPersonAccount.setRealMessageFlag(CommonConstants.ONE_STRING);
baseMapper.updateById(fddPersonAccount);
return new R<>(rsp.getData().getNextUrl());
} else {
return R.failed(rsp.getMsg());
......@@ -285,4 +270,20 @@ public class FddPersonAccountServiceImpl extends ServiceImpl<FddPersonAccountMap
return new R<>(fddCompanyInfoList);
}
@Override
public R saveInfo(FddPersonAccount fddPersonAccount) {
long mobileCount = this.count(Wrappers.<FddPersonAccount>query().lambda().eq(FddPersonAccount::getMoblie, fddPersonAccount.getMoblie())
.eq(FddPersonAccount::getSystemFlag, CommonConstants.ZERO_STRING));
if(mobileCount>CommonConstants.ZERO_INT){
return R.failed("手机号已存在");
}
long idCardCount = this.count(Wrappers.<FddPersonAccount>query().lambda().eq(FddPersonAccount::getIdCard, fddPersonAccount.getIdCard())
.eq(FddPersonAccount::getSystemFlag, CommonConstants.ZERO_STRING));
if(idCardCount>CommonConstants.ZERO_INT){
return R.failed("身份证号已存在");
}
baseMapper.insert(fddPersonAccount);
return R.ok();
}
}
......@@ -206,6 +206,22 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
TEmployeeInfo tEmployeeInfoCompare = tEmployeeInfoMapper.selectById(tEmployeeInfo.getId());
//获取项目和单位信息
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmployeeProject.getDeptNo()).eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag, CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(tSettleDomain)) {
tEmployeeProject.setDeptId(tSettleDomain.getId());
tEmployeeProject.setBusinessPrimaryType(tSettleDomain.getBusinessPrimaryType());
tEmployeeProject.setBusinessSecondType(tSettleDomain.getBusinessSecondType());
tEmployeeProject.setBusinessThirdType(tSettleDomain.getBusinessThirdType());
TCustomerInfo tCustomerInfo = tCustomerInfoMapper.selectById(tSettleDomain.getCustomerId());
if (Common.isNotNull(tCustomerInfo)) {
tEmployeeProject.setUnitId(tCustomerInfo.getId());
tEmployeeProject.setUnitNo(tCustomerInfo.getCustomerCode());
}
}
String empNO = getEmpNo(tEmployeeProject.getDeptNo());
tEmployeeProject.setEmpNo(empNO);
tEmployeeProject.setEmpId(tEmployeeInfo.getId());
......
......@@ -119,6 +119,6 @@
1=1
<include refid="fddPersonAccount_where"/>
</where>
GROUP BY a.NAME
GROUP BY a.ID_CARD ORDER BY a.CREATE_TIME desc
</select>
</mapper>
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