|
@@ -1,28 +1,37 @@
|
|
|
package com.qunzhixinxi.hnqz.admin.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
+import cn.hutool.json.JSONObject;
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.qunzhixinxi.hnqz.admin.api.constant.CacheConstants;
|
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.SysDept;
|
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.SysUser;
|
|
|
import com.qunzhixinxi.hnqz.admin.config.TaxNotifyConfig;
|
|
|
+import com.qunzhixinxi.hnqz.admin.config.UpmsConfig;
|
|
|
import com.qunzhixinxi.hnqz.admin.entity.*;
|
|
|
import com.qunzhixinxi.hnqz.admin.entity.input.SettleAmountMonitorInput;
|
|
|
import com.qunzhixinxi.hnqz.admin.entity.input.SettleNoteStatusOutput;
|
|
|
import com.qunzhixinxi.hnqz.admin.entity.input.WmScorePackageSettleInput;
|
|
|
import com.qunzhixinxi.hnqz.admin.entity.output.SettleAmountMonitorOutput;
|
|
|
+import com.qunzhixinxi.hnqz.admin.enums.GigTypeEnum;
|
|
|
import com.qunzhixinxi.hnqz.admin.enums.PackageTypeEnum;
|
|
|
import com.qunzhixinxi.hnqz.admin.enums.SubjectTypeEnum;
|
|
|
import com.qunzhixinxi.hnqz.admin.mapper.SysUserMapper;
|
|
|
+import com.qunzhixinxi.hnqz.admin.mapper.SysUserSubMapper;
|
|
|
import com.qunzhixinxi.hnqz.admin.mapper.WmPayOffMapper;
|
|
|
import com.qunzhixinxi.hnqz.admin.service.*;
|
|
|
+import com.qunzhixinxi.hnqz.common.core.constant.CommonConstants;
|
|
|
import com.qunzhixinxi.hnqz.common.core.util.R;
|
|
|
import com.qunzhixinxi.hnqz.common.ding.config.DingConfig;
|
|
|
import com.qunzhixinxi.hnqz.common.ding.entity.*;
|
|
|
import com.qunzhixinxi.hnqz.common.ding.enums.DingEnum;
|
|
|
import com.qunzhixinxi.hnqz.common.ding.service.DingService;
|
|
|
+import com.qunzhixinxi.hnqz.common.rabbitmq.client.RabbitMqClient;
|
|
|
import com.qunzhixinxi.hnqz.common.security.service.HnqzUser;
|
|
|
import com.qunzhixinxi.hnqz.common.security.util.SecurityUtils;
|
|
|
+import com.qunzhixinxi.hnqz.common.sequence.sequence.Sequence;
|
|
|
import com.qunzhixinxi.hnqz.common.taxhelper.config.TaxHelperConfig;
|
|
|
import com.qunzhixinxi.hnqz.common.taxhelper.entity.model.TaxHelperSettlementModel;
|
|
|
import com.qunzhixinxi.hnqz.common.taxhelper.entity.request.TaxHelperSettlementRequest;
|
|
@@ -32,10 +41,17 @@ import com.qunzhixinxi.hnqz.common.taxhelper.service.TaxHelperService;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
+import org.apache.commons.lang.RandomStringUtils;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
+import org.springframework.http.HttpEntity;
|
|
|
+import org.springframework.http.HttpHeaders;
|
|
|
+import org.springframework.http.HttpMethod;
|
|
|
+import org.springframework.http.MediaType;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
+import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.time.LocalDateTime;
|
|
@@ -54,8 +70,10 @@ import java.util.stream.Collectors;
|
|
|
@AllArgsConstructor
|
|
|
public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> implements WmPayOffService {
|
|
|
|
|
|
+ private final UpmsConfig upmsConfig;
|
|
|
private final WmPayOffMapper wmPayOffMapper;
|
|
|
private final SysUserMapper sysUserMapper;
|
|
|
+ private final SysUserSubMapper sysUserSubMapper;
|
|
|
private final DingService dingService;
|
|
|
private final WmScorePackageService wmScorePackageService;
|
|
|
private final WmTaskService wmTaskService;
|
|
@@ -70,7 +88,15 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
private final WmDaDrugEntService wmDaDrugEntService;
|
|
|
private final TaxHelperService taxHelperService;
|
|
|
private final TaxNotifyConfig taxNotifyConfig;
|
|
|
+ private final RabbitMqClient rabbitMqClient;
|
|
|
+ private final Sequence paySequence;
|
|
|
|
|
|
+ /**
|
|
|
+ * 财务回退操作
|
|
|
+ *
|
|
|
+ * @param input 提交参数
|
|
|
+ * @return 操作结果
|
|
|
+ */
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public R settleBack(WmScorePackageSettleInput input) {
|
|
@@ -160,7 +186,7 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
// noteService.saveBatch(notes);
|
|
|
} else {
|
|
|
// notes.forEach(item -> item.setRealName(sysUserMapper.selectById(item.getUserId()).getRealname()));
|
|
|
- notes.forEach(item->{
|
|
|
+ notes.forEach(item -> {
|
|
|
SysUser user = sysUserMapper.selectById(item.getUserId());
|
|
|
item.setRealName(user.getRealname());
|
|
|
item.setIdCardNumber(user.getIdCardNumber());
|
|
@@ -240,48 +266,71 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
return R.ok(resultMap);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 业务提交结算信息到财务
|
|
|
+ *
|
|
|
+ * @param input 输入信息
|
|
|
+ * @return 提交结果
|
|
|
+ */
|
|
|
@Override
|
|
|
public R settleSubmit(WmScorePackageSettleInput input) {
|
|
|
WmScorePackage wmScorePackage = wmScorePackageService.getById(input.getId());
|
|
|
+
|
|
|
if (!"0".equals(wmScorePackage.getSettleFlag())) {
|
|
|
return R.failed("结算状态异常,请勿重复结算");
|
|
|
}
|
|
|
+
|
|
|
List<WmScorePackageSettleNote> notes = input.getNotes();
|
|
|
|
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
|
SysUser user = sysUserMapper.selectById(note.getUserId());
|
|
|
- if(StringUtils.isEmpty(user.getIdCardNumber())){
|
|
|
- return R.failed(user.getRealname()+"未认证,不能发起结算");
|
|
|
+ if (StringUtils.isEmpty(user.getIdCardNumber())) {
|
|
|
+ return R.failed(user.getRealname() + "未认证,不能发起结算");
|
|
|
}
|
|
|
- if("0".equals(input.getSubType())){
|
|
|
- if (!Objects.equals(user.getRljCertStatus(), DingEnum.CER_STATUS_1.getType())) {
|
|
|
- return R.failed(user.getRealname()+"未认证,不能发起结算");
|
|
|
- }
|
|
|
+
|
|
|
+ // 获取结算零工
|
|
|
+ GigTypeEnum gigTypeEnum = GigTypeEnum.resolve(Integer.parseInt(input.getSubType()));
|
|
|
+ if (gigTypeEnum == null){
|
|
|
+ return R.failed(user.getRealname() + "人员结算渠道不存在,不能结算");
|
|
|
}
|
|
|
- if("1".equals(input.getSubType())){
|
|
|
- // return R.failed("因系统维护,暂时不能提起支付,有问题请联系客服");
|
|
|
- if (!Objects.equals(user.getCertStatus(), TaxHelperCertStatus.CERT.getCode())) {
|
|
|
- return R.failed(user.getRealname()+"人员未认证或未绑卡,不能结算");
|
|
|
- }
|
|
|
+
|
|
|
+ SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery().eq(SysUserSub::getGigType, gigTypeEnum)
|
|
|
+ .eq(SysUserSub::getUserId, user.getUserId())
|
|
|
+ );
|
|
|
+
|
|
|
+ if (userSub == null){
|
|
|
+ return R.failed(user.getRealname() + "人员认证信息不存在,不能结算");
|
|
|
+ }
|
|
|
+
|
|
|
+ switch (gigTypeEnum) {
|
|
|
+ case REN_LI_JIA:
|
|
|
+ case OLADING:
|
|
|
+ if (!Objects.equals(userSub.getCertStatus(), DingEnum.CER_STATUS_1.getType())) {
|
|
|
+ return R.failed(user.getRealname() + "未认证,不能发起结算");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case TAX_HELPOR:
|
|
|
+ if (!Objects.equals(userSub.getCertStatus(), TaxHelperCertStatus.CERT.getCode())) {
|
|
|
+ return R.failed(user.getRealname() + "人员未认证或未绑卡,不能结算");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ return R.failed(user.getRealname() + "人员结算渠道不存在,不能结算");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * @Modify: start 校验当月结算额度
|
|
|
- * @Version: 2021.4.16
|
|
|
- * @Author: ryz
|
|
|
- * @Date: 2021/4/22
|
|
|
- */
|
|
|
+ // 校验当月结算额度
|
|
|
List<String> idCard = notes.stream().map(WmScorePackageSettleNote::getIdCardNumber).collect(Collectors.toList());
|
|
|
- List<Integer> ids = notes.stream().filter(item->null != item.getId()).map(WmScorePackageSettleNote::getId).collect(Collectors.toList());
|
|
|
+ List<Integer> ids = notes.stream().filter(item -> null != item.getId()).map(WmScorePackageSettleNote::getId).collect(Collectors.toList());
|
|
|
List<String> userIds = notes.stream().map(WmScorePackageSettleNote::getUserId).collect(Collectors.toList());
|
|
|
|
|
|
- SettleAmountMonitorInput monitorInput = SettleAmountMonitorInput.fromIdCard(idCard, ids,input.getSubType());
|
|
|
+ SettleAmountMonitorInput monitorInput = SettleAmountMonitorInput.fromIdCard(idCard, ids, input.getSubType());
|
|
|
List<SettleAmountMonitorOutput> monitorOutputList = sysDeptSubService.getSettleAmountMonitor(monitorInput);
|
|
|
|
|
|
- SettleAmountMonitorInput deptMonitorInput = SettleAmountMonitorInput.fromUserId(userIds, ids,input.getSubType());
|
|
|
+ SettleAmountMonitorInput deptMonitorInput = SettleAmountMonitorInput.fromUserId(userIds, ids, input.getSubType());
|
|
|
List<SettleAmountMonitorOutput> deptAmountMonitor = sysDeptSubService.getDeptAmountMonitor(deptMonitorInput);
|
|
|
|
|
|
+ // 结算渠道
|
|
|
SysDeptSub condition = new SysDeptSub();
|
|
|
condition.setDeptId(SecurityUtils.getUser().getDeptId());
|
|
|
condition.setSubjectType(input.getSubType());
|
|
@@ -291,6 +340,7 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
return R.failed("人员所在机构未配置结算信息");
|
|
|
}
|
|
|
|
|
|
+ // 限额
|
|
|
MonitoringIndicator monitoringIndicator = monitoringIndicatorService.getBySubType(input.getSubType());
|
|
|
|
|
|
BigDecimal deptLimit = sysDeptSub.getLimitAmount();
|
|
@@ -330,7 +380,7 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
note.setSubType(input.getSubType());
|
|
|
note.setInvoiceType(input.getInvoiceCategory());
|
|
|
note.setCategoryName(input.toCategoryName());
|
|
|
- if(null == note.getId()){
|
|
|
+ if (null == note.getId()) {
|
|
|
note.setCreateTime(LocalDateTime.now());
|
|
|
}
|
|
|
}
|
|
@@ -356,36 +406,58 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
return R.ok();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 业务保存操作
|
|
|
+ *
|
|
|
+ * @param input 提交信息
|
|
|
+ * @return 保存结果
|
|
|
+ */
|
|
|
@Override
|
|
|
public R settleSave(WmScorePackageSettleInput input) {
|
|
|
-// WmScorePackage wmScorePackage = wmScorePackageService.getById(input.getId());
|
|
|
|
|
|
List<WmScorePackageSettleNote> notes = input.getNotes();
|
|
|
|
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
|
SysUser user = sysUserMapper.selectById(note.getUserId());
|
|
|
- if(StringUtils.isEmpty(user.getIdCardNumber())){
|
|
|
- return R.failed(user.getRealname()+"未认证,不能发起结算");
|
|
|
+ if (StringUtils.isEmpty(user.getIdCardNumber())) {
|
|
|
+ return R.failed(user.getRealname() + "未认证,不能发起结算");
|
|
|
}
|
|
|
- if("0".equals(input.getSubType())){
|
|
|
- if (!Objects.equals(user.getRljCertStatus(), DingEnum.CER_STATUS_1.getType())) {
|
|
|
- return R.failed(user.getRealname()+"未认证,不能发起结算");
|
|
|
- }
|
|
|
+
|
|
|
+ // 获取结算零工
|
|
|
+ GigTypeEnum gigTypeEnum = GigTypeEnum.resolve(Integer.parseInt(input.getSubType()));
|
|
|
+
|
|
|
+ if (gigTypeEnum == null){
|
|
|
+ return R.failed(user.getRealname() + "人员结算渠道不存在,不能结算");
|
|
|
}
|
|
|
- if("1".equals(input.getSubType())){
|
|
|
- if (!Objects.equals(user.getCertStatus(), TaxHelperCertStatus.CERT.getCode())) {
|
|
|
- return R.failed(user.getRealname()+"人员未认证或未绑卡,不能结算");
|
|
|
- }
|
|
|
+
|
|
|
+ SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery().eq(SysUserSub::getGigType, gigTypeEnum)
|
|
|
+ .eq(SysUserSub::getUserId, user.getUserId())
|
|
|
+ );
|
|
|
+
|
|
|
+ if (userSub == null){
|
|
|
+ return R.failed(user.getRealname() + "人员认证信息不存在,不能结算");
|
|
|
+ }
|
|
|
+
|
|
|
+ switch (gigTypeEnum) {
|
|
|
+ case REN_LI_JIA:
|
|
|
+ case OLADING:
|
|
|
+ if (!Objects.equals(userSub.getCertStatus(), DingEnum.CER_STATUS_1.getType())) {
|
|
|
+ return R.failed(user.getRealname() + "未认证,不能发起结算");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case TAX_HELPOR:
|
|
|
+ if (!Objects.equals(userSub.getCertStatus(), TaxHelperCertStatus.CERT.getCode())) {
|
|
|
+ return R.failed(user.getRealname() + "人员未认证或未绑卡,不能结算");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ return R.failed(user.getRealname() + "人员结算渠道不存在,不能结算");
|
|
|
}
|
|
|
}
|
|
|
- /**
|
|
|
- * @Modify: start 校验当月结算额度
|
|
|
- * @Version: 2021.4.16
|
|
|
- * @Author: ryz
|
|
|
- * @Date: 2021/4/22
|
|
|
- */
|
|
|
+
|
|
|
+ // 校验当月结算额度
|
|
|
List<String> idCard = notes.stream().map(WmScorePackageSettleNote::getIdCardNumber).collect(Collectors.toList());
|
|
|
- List<Integer> ids = notes.stream().filter(item->null != item.getId()).map(WmScorePackageSettleNote::getId).collect(Collectors.toList());
|
|
|
+ List<Integer> ids = notes.stream().filter(item -> null != item.getId()).map(WmScorePackageSettleNote::getId).collect(Collectors.toList());
|
|
|
List<String> userIds = notes.stream().map(WmScorePackageSettleNote::getUserId).collect(Collectors.toList());
|
|
|
|
|
|
SettleAmountMonitorInput monitorInput = SettleAmountMonitorInput.fromIdCard(idCard, ids, input.getSubType());
|
|
@@ -442,7 +514,7 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
note.setSubType(input.getSubType());
|
|
|
note.setInvoiceType(input.getInvoiceCategory());
|
|
|
note.setCategoryName(input.toCategoryName());
|
|
|
- if(null == note.getId()){
|
|
|
+ if (null == note.getId()) {
|
|
|
note.setCreateTime(LocalDateTime.now());
|
|
|
}
|
|
|
|
|
@@ -504,12 +576,18 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
} else {
|
|
|
return R.failed("未配置企业的统一社会信用代码");
|
|
|
}
|
|
|
- return settleByShuiBangYun(input, sysDeptSub, wmScorePackage,taxCode);
|
|
|
+ return settleByShuiBangYun(input, sysDeptSub, wmScorePackage, taxCode);
|
|
|
// return settleByShuiBangYun();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 提交结算
|
|
|
+ *
|
|
|
+ * @param input 提交结算信息
|
|
|
+ * @return 提交结果
|
|
|
+ */
|
|
|
@Override
|
|
|
public R settleIssueBySubType(WmScorePackageSettleInput input) {
|
|
|
|
|
@@ -532,27 +610,420 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
return R.failed("机构appId未维护");
|
|
|
}
|
|
|
|
|
|
+ SysDept sysDept = sysDeptService.getById(SecurityUtils.getUser().getDeptId());
|
|
|
+
|
|
|
+ String taxCode = sysDept.getTaxCode();
|
|
|
+
|
|
|
+ // 人力家
|
|
|
if (SubjectTypeEnum.TYPE_RENLIJIA.getCode().equals(input.getSubType())) {
|
|
|
return settleByRenLiJia(input, sysDeptSub, wmScorePackage);
|
|
|
- } else {
|
|
|
- SysDept sysDept = sysDeptService.getById(SecurityUtils.getUser().getDeptId());
|
|
|
-
|
|
|
- String taxCode = sysDept.getTaxCode();
|
|
|
+ }
|
|
|
+ // 自由职家
|
|
|
+ else if (SubjectTypeEnum.TYPE_OLADING.getCode().equals(input.getSubType())) {
|
|
|
+ return settleByOlading(input, sysDeptSub, wmScorePackage, taxCode);
|
|
|
+ }
|
|
|
+ // 税邦云
|
|
|
+ else {
|
|
|
if (StringUtils.isNotEmpty(taxCode)) {
|
|
|
log.info("税邦云结算开始-获取会员所属企业的统一社会信用代码:{} ", taxCode);
|
|
|
} else {
|
|
|
return R.failed("未配置企业的统一社会信用代码");
|
|
|
}
|
|
|
- return settleByShuiBangYun(input, sysDeptSub, wmScorePackage,taxCode);
|
|
|
+ return settleByShuiBangYun(input, sysDeptSub, wmScorePackage, taxCode);
|
|
|
// return settleByShuiBangYun();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
- private R settleByShuiBangYun(){
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 阿拉丁结算操作
|
|
|
+ *
|
|
|
+ * @param input 结算数据
|
|
|
+ * @param sysDeptSub 结算配置
|
|
|
+ * @param wmScorePackage 积分包
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
+ private R settleByOlading(WmScorePackageSettleInput input,
|
|
|
+ SysDeptSub sysDeptSub,
|
|
|
+ WmScorePackage wmScorePackage,
|
|
|
+ String taxCode) {
|
|
|
+
|
|
|
+ List<WmScorePackageSettleNote> notes = input.getNotes();
|
|
|
+ StringBuilder noticeInfo = new StringBuilder();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * WmScorePackageSettleNote
|
|
|
+ */
|
|
|
+ for (WmScorePackageSettleNote note : notes) {
|
|
|
+ note.setInvoiceType(input.getInvoiceCategory());
|
|
|
+ note.setCategoryName(input.toCategoryName());
|
|
|
+ note.setSubToGigTime(LocalDateTime.now());
|
|
|
+ }
|
|
|
+ noteService.updateBatchById(notes);
|
|
|
+
|
|
|
+
|
|
|
+ for (int i = 0; i < notes.size(); i++) {
|
|
|
+ WmScorePackageSettleNote note = notes.get(i);
|
|
|
+ SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
|
+
|
|
|
+ SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery().eq(SysUserSub::getGigType, GigTypeEnum.OLADING)
|
|
|
+ .eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
|
+ );
|
|
|
+
|
|
|
+ if (userSub == null) {
|
|
|
+ log.info("结算对象-" + sysUser.getRealname() + ":认证信息不存在,不能结算");
|
|
|
+ return R.failed("结算对象-" + sysUser.getRealname() + ":认证信息不存在,不能结算");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!Objects.equals(userSub.getCertStatus(), DingEnum.CER_STATUS_1.getType())) {
|
|
|
+ return R.failed(sysUser.getRealname() + "人员未认证或未绑卡,不能结算");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (redisTemplate.hasKey(CacheConstants.SETTLE_PACKAGE_KEY + note.getId())) {
|
|
|
+ return R.failed("结算对象-" + sysUser.getRealname() + ":正在结算,请勿重复结算");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (DingEnum.NOTE_STATUS_SUCCESS.getType().equals(note.getSettleNoteStatus())) {
|
|
|
+ log.info("结算对象-" + sysUser.getRealname() + ":已结算,请勿重复结算");
|
|
|
+ return R.failed("结算对象-" + sysUser.getRealname() + ":已结算,请勿重复结算");
|
|
|
+ }
|
|
|
+ if (DingEnum.NOTE_STATUS_SUBMIT.getType().equals(note.getSettleNoteStatus())) {
|
|
|
+ log.info("结算对象-" + sysUser.getRealname() + ":已提交,请等待耐心结算结果");
|
|
|
+ return R.failed("结算对象-" + sysUser.getRealname() + ":已提交,请等待耐心结算结果");
|
|
|
+ }
|
|
|
+ sysUser.setBankCardNumber(userSub.getBankCardNumber());
|
|
|
+ }
|
|
|
+ HnqzUser operator = SecurityUtils.getUser();
|
|
|
+ String gigTokenUrl = upmsConfig.getGigServiceUrl() + "/gig/operation/token?tenantId={tenantId}&action={action}&userId={userId}";
|
|
|
+ String gigSettleUrl = upmsConfig.getGigServiceUrl() + "/gig/operation/settlement";
|
|
|
+
|
|
|
+ for (int i = 0; i < notes.size(); i++) {
|
|
|
+ WmScorePackageSettleNote note = notes.get(i);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 加锁
|
|
|
+ */
|
|
|
+ redisTemplate.opsForValue().set(CacheConstants.SETTLE_PACKAGE_KEY + note.getId(),
|
|
|
+ note.getId(), CacheConstants.SETTLE_TIME, TimeUnit.DAYS);
|
|
|
+
|
|
|
+ SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
|
+ try {
|
|
|
+ // 获取请求token
|
|
|
+ ResponseEntity<String> tokenResult = new RestTemplate().getForEntity(gigTokenUrl, String.class,
|
|
|
+ String.valueOf(operator.getDeptId()), "settle", String.valueOf(operator.getId()));
|
|
|
+ log.warn("获取结算token:{}", tokenResult.getBody());
|
|
|
+ if (!JSONUtil.isJson(tokenResult.getBody())){
|
|
|
+ return R.failed("获取结算token失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONObject jsonObject = JSONUtil.parseObj(tokenResult.getBody());
|
|
|
+
|
|
|
+ if (jsonObject.getInt("code") != 0 || StrUtil.isBlank(jsonObject.getStr("data"))){
|
|
|
+ return R.failed("获取结算token失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ String token = jsonObject.getStr("data");
|
|
|
+
|
|
|
+ // 间隔100毫秒
|
|
|
+ Thread.sleep(100);
|
|
|
+
|
|
|
+
|
|
|
+ // 封装结算参数
|
|
|
+ Map<String, Object> params = new HashMap<>();
|
|
|
+ params.put("token", token);
|
|
|
+ params.put("tenantId", operator.getDeptId());
|
|
|
+ params.put("operatorId", operator.getId());
|
|
|
+ params.put("requestId", RandomStringUtils.randomAlphabetic(12));
|
|
|
+ params.put("taskName", wmScorePackage.getScorePackageName() + "_" + System.currentTimeMillis());
|
|
|
+ params.put("amount", String.valueOf(note.getSettleAmount().doubleValue()));
|
|
|
+ params.put("taskStartTime", wmScorePackage.getCreateTime().toLocalDate());
|
|
|
+ params.put("taskEndTime", wmScorePackage.getUpdateTime().toLocalDate());
|
|
|
+ params.put("taskLocation", "要易云");
|
|
|
+ params.put("username", sysUser.getUsername());
|
|
|
+ params.put("idCard", sysUser.getIdCardNumber());
|
|
|
+ params.put("realName", sysUser.getRealname());
|
|
|
+ params.put("bankCard", sysUser.getBankCardNumber());
|
|
|
+ params.put("tagId", note.getInvoiceType());
|
|
|
+ params.put("endType", "CSO");
|
|
|
+ params.put("enterpriseCode", taxCode);
|
|
|
+ params.put("subjectType", "OLADING");
|
|
|
+ params.put("channel", "DEFAULT");
|
|
|
+ params.put("taskDescription", "根据要求,执行、并完成学术推广活动,并以在线平台工具采集、记录活动内容");
|
|
|
+ params.put("acceptanceStandard", "完成不同任务获得不同任务积分,根据不同任务给与0~30000积分,每个积分兑换0.8~1.2元,按次数结算");
|
|
|
+
|
|
|
+
|
|
|
+ // 发起结算
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
+ HttpEntity<String> result = new RestTemplate().exchange(gigSettleUrl, HttpMethod.POST, new HttpEntity<>(params, headers), String.class);
|
|
|
+ log.warn("阿拉丁结算: {}", result.getBody());
|
|
|
+ if (!JSONUtil.isJson(result.getBody())){
|
|
|
+ return R.failed("结算失败");
|
|
|
+ }
|
|
|
+ JSONObject settelObj = JSONUtil.parseObj(result.getBody());
|
|
|
+
|
|
|
+
|
|
|
+ if (Objects.equals(settelObj.getInt("code"), CommonConstants.SUCCESS)) {
|
|
|
+ log.info("自由职家结算提交成功: {}", note.getSettleNo());
|
|
|
+ //streamId 获取不到
|
|
|
+ if (StringUtils.isEmpty(settelObj.getStr("data"))) {
|
|
|
+ log.warn("自由职家结算提交成功 requestId 获取不到: {}", note.getSettleNo());
|
|
|
+ noticeInfo.append(sysUser.getRealname() + ":提交结算成功,业务流水号获取不到,请联系管理员;");
|
|
|
+ }
|
|
|
+ note.setUpdateTime(LocalDateTime.now());
|
|
|
+ note.setSettleNoteStatus(DingEnum.NOTE_STATUS_SUBMIT.getType());
|
|
|
+ // 新增字段streamId
|
|
|
+ note.setStreamId(settelObj.getStr("data"));
|
|
|
+ noticeInfo.append(sysUser.getRealname() + ":提交结算成功;");
|
|
|
+ } else {
|
|
|
+ log.warn("自由职家结算提交失败: {}", note.getSettleNo());
|
|
|
+ note.setUpdateTime(LocalDateTime.now());
|
|
|
+ note.setSettleNoteStatus(DingEnum.NOTE_STATUS_FAIL.getType());
|
|
|
+ noticeInfo.append(sysUser.getRealname() + ":结算提交失败-" + settelObj.getStr("msg") + ";");
|
|
|
+
|
|
|
+ log.info("认证状态异常,结算解锁settleNoteId:{}", note.getId());
|
|
|
+ redisTemplate.delete(CacheConstants.SETTLE_PACKAGE_KEY + note.getId());
|
|
|
+
|
|
|
+ }
|
|
|
+ } catch (Exception e){
|
|
|
+ log.warn("自由职家结算提交失败: {}", note.getSettleNo());
|
|
|
+ note.setUpdateTime(LocalDateTime.now());
|
|
|
+ note.setSettleNoteStatus(DingEnum.NOTE_STATUS_FAIL.getType());
|
|
|
+ noticeInfo.append(sysUser.getRealname() + ":结算提交失败;");
|
|
|
+
|
|
|
+ log.info("认证状态异常,结算解锁settleNoteId:{}", note.getId());
|
|
|
+ redisTemplate.delete(CacheConstants.SETTLE_PACKAGE_KEY + note.getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ noteService.updateBatchById(notes);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新结算结果
|
|
|
+ */
|
|
|
+ SettleNoteStatusOutput output = noteService.selectSettleNoteStatus(input.getId());
|
|
|
+ WmScorePackage updateEntity = new WmScorePackage();
|
|
|
+ updateEntity.setId(input.getId());
|
|
|
+ updateEntity.setSettleStatus(output.toSettleStatus());
|
|
|
+ wmScorePackageService.updateById(updateEntity);
|
|
|
+
|
|
|
+ return R.ok(null, noticeInfo.toString());
|
|
|
+ }
|
|
|
+
|
|
|
+ // /**
|
|
|
+ // * 自由职家结算
|
|
|
+ // *
|
|
|
+ // * @param input
|
|
|
+ // * @param sysDeptSub
|
|
|
+ // * @param wmScorePackage
|
|
|
+ // * @param taxCode
|
|
|
+ // * @return 提交结果
|
|
|
+ // */
|
|
|
+ // private R settleByOlading(WmScorePackageSettleInput input,
|
|
|
+ // SysDeptSub sysDeptSub,
|
|
|
+ // WmScorePackage wmScorePackage,
|
|
|
+ // String taxCode) {
|
|
|
+ //
|
|
|
+ // // 获取发票类型和名称
|
|
|
+ // int invoiceCategory = input.getInvoiceCategory();
|
|
|
+ // String categoryName = input.toCategoryName();
|
|
|
+ //
|
|
|
+ // // 获取结算记录
|
|
|
+ // List<WmScorePackageSettleNote> notes = input.getNotes();
|
|
|
+ //
|
|
|
+ // // 结算锁
|
|
|
+ // List<String> lockKey = new ArrayList<>(notes.size());
|
|
|
+ //
|
|
|
+ // // 校验,循环设置结算记录的发票信息
|
|
|
+ // notes.forEach(note -> {
|
|
|
+ // if (Boolean.TRUE.equals(redisTemplate.hasKey(String.format("%s:%d", CacheConstants.SETTLE_PACKAGE_KEY, note.getId())))
|
|
|
+ // || DingEnum.NOTE_STATUS_SUCCESS.getType().equals(note.getSettleNoteStatus())
|
|
|
+ // || DingEnum.NOTE_STATUS_SUBMIT.getType().equals(note.getSettleNoteStatus())) {
|
|
|
+ // String errMsg = String.format("结算记录-%d,存在历史或在途操作,请勿重复结算。", note.getId());
|
|
|
+ // log.error(errMsg);
|
|
|
+ // throw new RuntimeException(errMsg);
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // note.setInvoiceType(invoiceCategory);
|
|
|
+ // note.setCategoryName(categoryName);
|
|
|
+ // note.setSubToGigTime(LocalDateTime.now());
|
|
|
+ //
|
|
|
+ // lockKey.add(String.format("%s:%d",CacheConstants.SETTLE_PACKAGE_KEY, note.getId()));
|
|
|
+ //
|
|
|
+ // });
|
|
|
+ //
|
|
|
+ // noteService.updateBatchById(notes);
|
|
|
+ //
|
|
|
+ //
|
|
|
+ // // 校验信息
|
|
|
+ // List<String> userIds = notes.stream().map(WmScorePackageSettleNote::getUserId).distinct().collect(Collectors.toList());
|
|
|
+ // List<SysUser> sysUsers = sysUserMapper.selectList(Wrappers.<SysUser>lambdaQuery().in(SysUser::getUserId, userIds));
|
|
|
+ // List<SysUserSub> userSubs = sysUserSubMapper.selectList(Wrappers.<SysUserSub>lambdaQuery().in(SysUserSub::getUserId, userIds)
|
|
|
+ // .eq(SysUserSub::getGigType, GigTypeEnum.OLADING.getCode())
|
|
|
+ // .eq(SysUserSub::getGigChannel, GigChannelEnum.DEFAULT.getCode())
|
|
|
+ // .eq(SysUserSub::getCertStatus, OladingCertStatus.CERT.getCode())
|
|
|
+ // );
|
|
|
+ //
|
|
|
+ // if (CollUtil.isEmpty(sysUsers) || CollUtil.isEmpty(userSubs)){
|
|
|
+ // log.error("用户或用户认证记录缺失不能发起结算");
|
|
|
+ // throw new RuntimeException("用户或用户认证记录缺失不能发起结算");
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // Map<Integer, SysUser> userMap = sysUsers.stream().collect(Collectors.toMap(SysUser::getUserId, Function.identity()));
|
|
|
+ // Map<Integer, SysUserSub> userSubMap = userSubs.stream().collect(Collectors.toMap(SysUserSub::getUserId, Function.identity()));
|
|
|
+ //
|
|
|
+ // if (!userMap.keySet().containsAll(userMap.keySet())){
|
|
|
+ // log.error("用户尚未认证不能发起结算");
|
|
|
+ // throw new RuntimeException("用户尚未认证不能发起结算");
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ // // ~================================================================================================= 发起结算
|
|
|
+ //
|
|
|
+ // try {
|
|
|
+ // // 1 结算纪录锁定
|
|
|
+ // Map<String, String> keyMap = lockKey.stream().collect(Collectors.toMap(Function.identity(), Function.identity()));
|
|
|
+ // if (Boolean.FALSE.equals(redisTemplate.opsForValue().multiSetIfAbsent(keyMap))){
|
|
|
+ // log.error("存在在途的操作");
|
|
|
+ // throw new RuntimeException("存在在途的操作");
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // // 3 封装批量订单
|
|
|
+ // OmsOrderRequest.OrderBatchSubmitParams orderBatchSubmitParams = new OmsOrderRequest.OrderBatchSubmitParams();
|
|
|
+ // orderBatchSubmitParams.setBatchNo(paySequence.nextNo());
|
|
|
+ // orderBatchSubmitParams.setPayeeQuantity((long)sysUsers.size());
|
|
|
+ // orderBatchSubmitParams.setOrderToken(RandomStringUtils.randomNumeric(6));
|
|
|
+ // orderBatchSubmitParams.setRemarks("正常结算");
|
|
|
+ // orderBatchSubmitParams.setEndType(CheckoutType.SubmitEndType.CSO);
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ // orderBatchSubmitParams.setOrderQuantity();
|
|
|
+ // orderBatchSubmitParams.setOrderSubmits();
|
|
|
+ // orderBatchSubmitParams.setBatchAmountPayable();
|
|
|
+ //
|
|
|
+ //
|
|
|
+ // // 4 发送消息
|
|
|
+ //
|
|
|
+ // // 5 修改积分包
|
|
|
+ //
|
|
|
+ // } catch (Exception e){
|
|
|
+ // log.error("提交结算失败",e);
|
|
|
+ // redisTemplate.delete(lockKey);
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ // for (int i = 0; i < notes.size(); i++) {
|
|
|
+ // WmScorePackageSettleNote note = notes.get(i);
|
|
|
+ //
|
|
|
+ // /**
|
|
|
+ // * 加锁
|
|
|
+ // */
|
|
|
+ // redisTemplate.opsForValue().set(CacheConstants.SETTLE_PACKAGE_KEY + note.getId(),
|
|
|
+ // note.getId(), CacheConstants.SETTLE_TIME, TimeUnit.DAYS);
|
|
|
+ //
|
|
|
+ // SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
|
+ //
|
|
|
+ // TaxHelperConfig config = new TaxHelperConfig();
|
|
|
+ // config.setAppId(sysDeptSub.getAppId());
|
|
|
+ // config.setAppSecrete(sysDeptSub.getAppSecret());
|
|
|
+ // config.setQueryUrl(sysDeptSub.getQueryUrl());
|
|
|
+ //
|
|
|
+ // /**
|
|
|
+ // * 开始结算
|
|
|
+ // */
|
|
|
+ // TaxHelperSettlementModel taxHelperSettlementModel = new TaxHelperSettlementModel(config);
|
|
|
+ // taxHelperSettlementModel.setEnterpriseCode(taxCode);
|
|
|
+ //
|
|
|
+ // taxHelperSettlementModel.setExtendFieldNames(Arrays.asList("报告下载地址"));
|
|
|
+ // taxHelperSettlementModel.setCount(1);
|
|
|
+ //
|
|
|
+ // taxHelperSettlementModel.setNotifyUrl(taxNotifyConfig.getNotifyUrl() + "/admin/taxhelper/" + sysUser.getUserId() + "/settlementNotify");
|
|
|
+ // TaxHelperSettlementModel.DetailedArr detailedArr = new TaxHelperSettlementModel.DetailedArr();
|
|
|
+ // detailedArr.setIdCard(sysUser.getIdCardNumber());
|
|
|
+ // detailedArr.setInputAmount(note.getSettleAmount().doubleValue());
|
|
|
+ // detailedArr.setCategoryName(note.getCategoryName());
|
|
|
+ // taxHelperSettlementModel.setDetailedArr(Arrays.asList(detailedArr));
|
|
|
+ //
|
|
|
+ // TaxHelperSettlementModel.AbstractArr abstractArr = new TaxHelperSettlementModel.AbstractArr();
|
|
|
+ //
|
|
|
+ // abstractArr.setIdCard(sysUser.getIdCardNumber());
|
|
|
+ // abstractArr.setNumber(1);
|
|
|
+ // abstractArr.setPrice(note.getSettleAmount().doubleValue());
|
|
|
+ // abstractArr.setAmount(note.getSettleAmount().doubleValue());
|
|
|
+ //
|
|
|
+ // // abstractArr.setExtendField1(taxNotifyConfig.getTaskUrl() + "/admin/api/h5PackagePage?current=1&size=20&id=" + wmScorePackage.getScorePackageName());
|
|
|
+ // abstractArr.setExtendField1(taxNotifyConfig.getTaskUrl() + "/#/h5/indexTask?id=" + note.getPackageId() + "&userId=" + note.getUserId());
|
|
|
+ //
|
|
|
+ // taxHelperSettlementModel.setAbstractArr(Arrays.asList(abstractArr));
|
|
|
+ //
|
|
|
+ // TaxHelperSettlementRequest taxHelperSettlementRequest = new TaxHelperSettlementRequest(taxHelperSettlementModel);
|
|
|
+ //
|
|
|
+ // TaxHelperResponse response = taxHelperService.settlement(taxHelperSettlementRequest);
|
|
|
+ //
|
|
|
+ // log.info("税邦云结算: {}", response);
|
|
|
+ //
|
|
|
+ //
|
|
|
+ // if (response.success()) {
|
|
|
+ // log.info("税邦云结算提交成功: {}", note.getSettleNo());
|
|
|
+ // //streamId 获取不到
|
|
|
+ // if (StringUtils.isEmpty(response.getMessage())) {
|
|
|
+ // log.info("税邦云结算提交成功 streamId 获取不到: {}", note.getSettleNo());
|
|
|
+ // noticeInfo.append(sysUser.getRealname() + ":提交结算成功,业务流水号获取不到,请联系管理员;");
|
|
|
+ // }
|
|
|
+ // note.setUpdateTime(LocalDateTime.now());
|
|
|
+ // note.setSettleNoteStatus(DingEnum.NOTE_STATUS_SUBMIT.getType());
|
|
|
+ // // 新增字段streamId
|
|
|
+ // note.setStreamId(response.getMessage());
|
|
|
+ // noticeInfo.append(sysUser.getRealname() + ":提交结算成功;");
|
|
|
+ // } else {
|
|
|
+ // log.info("税邦云结算提交失败: {}", note.getSettleNo());
|
|
|
+ // note.setUpdateTime(LocalDateTime.now());
|
|
|
+ // note.setSettleNoteStatus(DingEnum.NOTE_STATUS_FAIL.getType());
|
|
|
+ // noticeInfo.append(sysUser.getRealname() + ":结算提交失败-" + response.getMessage() + ";");
|
|
|
+ //
|
|
|
+ // log.info("认证状态异常,结算解锁settleNoteId:{}", note.getId());
|
|
|
+ // redisTemplate.delete(CacheConstants.SETTLE_PACKAGE_KEY + note.getId());
|
|
|
+ //
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // noteService.updateBatchById(notes);
|
|
|
+ //
|
|
|
+ // /**
|
|
|
+ // * 更新结算结果
|
|
|
+ // */
|
|
|
+ // SettleNoteStatusOutput output = noteService.selectSettleNoteStatus(input.getId());
|
|
|
+ // WmScorePackage updateEntity = new WmScorePackage();
|
|
|
+ // updateEntity.setId(input.getId());
|
|
|
+ // updateEntity.setSettleStatus(output.toSettleStatus());
|
|
|
+ // wmScorePackageService.updateById(updateEntity);
|
|
|
+ //
|
|
|
+ // return R.ok(null, noticeInfo.toString());
|
|
|
+ // }
|
|
|
+
|
|
|
+ private R settleByShuiBangYun() {
|
|
|
return R.failed("因系统维护,暂时不能提起支付,有问题请联系客服");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 税邦云
|
|
|
+ *
|
|
|
+ * @param input 结算数据
|
|
|
+ * @param sysDeptSub 结算配置
|
|
|
+ * @param wmScorePackage 积分包
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
private R settleByShuiBangYun(WmScorePackageSettleInput input,
|
|
|
SysDeptSub sysDeptSub,
|
|
|
WmScorePackage wmScorePackage,
|
|
@@ -572,12 +1043,20 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
noteService.updateBatchById(notes);
|
|
|
|
|
|
|
|
|
-
|
|
|
for (int i = 0; i < notes.size(); i++) {
|
|
|
WmScorePackageSettleNote note = notes.get(i);
|
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
|
|
|
|
- if (!Objects.equals(sysUser.getCertStatus(), TaxHelperCertStatus.CERT.getCode())) {
|
|
|
+ SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery().eq(SysUserSub::getGigType, GigTypeEnum.TAX_HELPOR)
|
|
|
+ .eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
|
+ );
|
|
|
+
|
|
|
+ if (userSub == null){
|
|
|
+ log.info("结算对象-" + sysUser.getRealname() + ":认证信息不存在,不能结算");
|
|
|
+ return R.failed("结算对象-" + sysUser.getRealname() + ":认证信息不存在,不能结算");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!Objects.equals(userSub.getCertStatus(), TaxHelperCertStatus.CERT.getCode())) {
|
|
|
return R.failed(sysUser.getRealname() + "人员未认证或未绑卡,不能结算");
|
|
|
}
|
|
|
|
|
@@ -685,6 +1164,14 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
return R.ok(null, noticeInfo.toString());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 人力家结算
|
|
|
+ *
|
|
|
+ * @param input 结算数据
|
|
|
+ * @param sysDeptSub 结算配置
|
|
|
+ * @param wmScorePackage 积分包
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
private R settleByRenLiJia(WmScorePackageSettleInput input, SysDeptSub sysDeptSub, WmScorePackage wmScorePackage) {
|
|
|
List<WmScorePackageSettleNote> notes = input.getNotes();
|
|
|
|
|
@@ -712,6 +1199,14 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
WmScorePackageSettleNote note = notes.get(i);
|
|
|
|
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
|
+ SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery().eq(SysUserSub::getGigType, GigTypeEnum.REN_LI_JIA)
|
|
|
+ .eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
|
+ );
|
|
|
+
|
|
|
+ if (userSub == null){
|
|
|
+ log.info("结算对象-" + sysUser.getRealname() + ":认证信息不存在,不能结算");
|
|
|
+ return R.failed("结算对象-" + sysUser.getRealname() + ":认证信息不存在,不能结算");
|
|
|
+ }
|
|
|
|
|
|
if (StringUtils.isEmpty(sysUser.getIdCardNumber())) {
|
|
|
log.info("任务包众包代表-" + sysUser.getRealname() + ":身份证号未补录");
|
|
@@ -720,7 +1215,7 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
return R.failed("任务包众包代表-" + sysUser.getRealname() + ":身份证号未补录");
|
|
|
}
|
|
|
|
|
|
- if (!DingEnum.CER_STATUS_1.getType().equals(sysUser.getRljCertStatus())) {
|
|
|
+ if (!DingEnum.CER_STATUS_1.getType().equals(userSub.getCertStatus())) {
|
|
|
//认证中
|
|
|
log.info("结算对象-" + sysUser.getRealname() + ":未认证成功,不能结算");
|
|
|
return R.failed("结算对象-" + sysUser.getRealname() + ":未认证成功,不能结算");
|