|
@@ -8,6 +8,7 @@ import cn.hutool.json.JSONUtil;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.qunzhixinxi.hnqz.admin.api.constant.CacheConstants;
|
|
import com.qunzhixinxi.hnqz.admin.api.constant.CacheConstants;
|
|
|
|
+import com.qunzhixinxi.hnqz.admin.api.constant.UpmsType;
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.SysDept;
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.SysDept;
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.SysDictItem;
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.SysDictItem;
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.SysUser;
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.SysUser;
|
|
@@ -16,8 +17,8 @@ import com.qunzhixinxi.hnqz.admin.config.UpmsConfig;
|
|
import com.qunzhixinxi.hnqz.admin.entity.*;
|
|
import com.qunzhixinxi.hnqz.admin.entity.*;
|
|
import com.qunzhixinxi.hnqz.admin.entity.input.SettleNoteStatusOutput;
|
|
import com.qunzhixinxi.hnqz.admin.entity.input.SettleNoteStatusOutput;
|
|
import com.qunzhixinxi.hnqz.admin.entity.input.WmScorePackageSettleInput;
|
|
import com.qunzhixinxi.hnqz.admin.entity.input.WmScorePackageSettleInput;
|
|
-import com.qunzhixinxi.hnqz.admin.enums.PackageStatusEnum;
|
|
|
|
import com.qunzhixinxi.hnqz.admin.enums.PackageTypeEnum;
|
|
import com.qunzhixinxi.hnqz.admin.enums.PackageTypeEnum;
|
|
|
|
+import com.qunzhixinxi.hnqz.admin.enums.ScorePackageStatusEnum;
|
|
import com.qunzhixinxi.hnqz.admin.enums.SettleStatusEnum;
|
|
import com.qunzhixinxi.hnqz.admin.enums.SettleStatusEnum;
|
|
import com.qunzhixinxi.hnqz.admin.enums.SubjectLocation;
|
|
import com.qunzhixinxi.hnqz.admin.enums.SubjectLocation;
|
|
import com.qunzhixinxi.hnqz.admin.enums.SubjectTypeEnum;
|
|
import com.qunzhixinxi.hnqz.admin.enums.SubjectTypeEnum;
|
|
@@ -92,6 +93,8 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
private final TaxHelperService taxHelperService;
|
|
private final TaxHelperService taxHelperService;
|
|
private final TaxNotifyConfig taxNotifyConfig;
|
|
private final TaxNotifyConfig taxNotifyConfig;
|
|
|
|
|
|
|
|
+ private final WmBizReminderService wmBizReminderService;
|
|
|
|
+
|
|
private final MathContext mc = new MathContext(2, RoundingMode.HALF_EVEN);
|
|
private final MathContext mc = new MathContext(2, RoundingMode.HALF_EVEN);
|
|
private final String GIG_TOKEN_URL = "%s/gig/operation/token?tenantId={tenantId}&action={action}&userId={userId}";
|
|
private final String GIG_TOKEN_URL = "%s/gig/operation/token?tenantId={tenantId}&action={action}&userId={userId}";
|
|
private final String GIG_SETTLE_URL = "%s/gig/operation/settlement";
|
|
private final String GIG_SETTLE_URL = "%s/gig/operation/settlement";
|
|
@@ -112,12 +115,20 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
}
|
|
}
|
|
WmScorePackage updateEntity = new WmScorePackage();
|
|
WmScorePackage updateEntity = new WmScorePackage();
|
|
updateEntity.setId(wmScorePackage.getId());
|
|
updateEntity.setId(wmScorePackage.getId());
|
|
- updateEntity.setScorePackageStatus("4");
|
|
|
|
|
|
+
|
|
|
|
+ if (UpmsType.MahSettleStep.FINANCE.equals(wmScorePackage.getMahSettleStep())) {
|
|
|
|
+ // mah结算回退到药企的业务(个人承接-其他)
|
|
|
|
+ updateEntity.setScorePackageStatus(ScorePackageStatusEnum.SUBMITTED_TO_DRUGENT.val());
|
|
|
|
+ updateEntity.setMahSettleStep(UpmsType.MahSettleStep.BUSINESS);
|
|
|
|
+ } else {
|
|
|
|
+ updateEntity.setScorePackageStatus(ScorePackageStatusEnum.TO_BE_SETTLED.val());
|
|
|
|
+ }
|
|
updateEntity.setSettleFlag("0");
|
|
updateEntity.setSettleFlag("0");
|
|
wmScorePackageService.updateById(updateEntity);
|
|
wmScorePackageService.updateById(updateEntity);
|
|
|
|
|
|
WmScorePackageSettleNote deleteQuery = new WmScorePackageSettleNote();
|
|
WmScorePackageSettleNote deleteQuery = new WmScorePackageSettleNote();
|
|
deleteQuery.setPackageId(input.getId());
|
|
deleteQuery.setPackageId(input.getId());
|
|
|
|
+ log.info("回退删除settlenote: {}", deleteQuery);
|
|
noteService.remove(Wrappers.query(deleteQuery));
|
|
noteService.remove(Wrappers.query(deleteQuery));
|
|
|
|
|
|
return R.ok(Boolean.TRUE);
|
|
return R.ok(Boolean.TRUE);
|
|
@@ -420,15 +431,113 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
updateEntity.setSettleAmount(total);
|
|
updateEntity.setSettleAmount(total);
|
|
updateEntity.setId(input.getId());
|
|
updateEntity.setId(input.getId());
|
|
updateEntity.setSettleStatus(DingEnum.SETTLE_STATUS_WAIT.getType());
|
|
updateEntity.setSettleStatus(DingEnum.SETTLE_STATUS_WAIT.getType());
|
|
- updateEntity.setScorePackageStatus("5");
|
|
|
|
updateEntity.setDescription(input.getDescription());
|
|
updateEntity.setDescription(input.getDescription());
|
|
updateEntity.setSubType(String.valueOf(input.getSubjectLocation().getGigType().getCode()));
|
|
updateEntity.setSubType(String.valueOf(input.getSubjectLocation().getGigType().getCode()));
|
|
- updateEntity.setLocation(input.getSubjectLocation());
|
|
|
|
|
|
+ updateEntity.setLocation(location);
|
|
updateEntity.setSettlementDate(LocalDateTime.now());
|
|
updateEntity.setSettlementDate(LocalDateTime.now());
|
|
|
|
+
|
|
|
|
+ if (PackageTypeEnum.TYPE2_SETTLE_PACKAGE.val().equals(wmScorePackage.getPackageType2())
|
|
|
|
+ && !StrUtil.equals(PackageTypeEnum.TYPE1_SCORE_AND_TASK_PACKAGE.val(), wmScorePackage.getPackageType1())) {
|
|
|
|
+ updateEntity.setPackageFinishStatus("1");
|
|
|
|
+ updateEntity.setTaskAddFlag("0");
|
|
|
|
+ }
|
|
|
|
+
|
|
if (SubjectLocation.MAH_SETTLE.equals(input.getSubjectLocation())) {
|
|
if (SubjectLocation.MAH_SETTLE.equals(input.getSubjectLocation())) {
|
|
updateEntity.setMahSettleDeptId(input.getMahSettleDeptId());
|
|
updateEntity.setMahSettleDeptId(input.getMahSettleDeptId());
|
|
|
|
+ // MAH结算提交给上级业务结算的标记
|
|
|
|
+ updateEntity.setMahSettleStep(UpmsType.MahSettleStep.BUSINESS);
|
|
|
|
+ // 这里是MAH业务提交到上级业务的情况,设为不可结算
|
|
|
|
+ updateEntity.setSettleFlag("0");
|
|
|
|
+ // 积分包状态设为已提交药企
|
|
|
|
+ updateEntity.setScorePackageStatus(ScorePackageStatusEnum.SUBMITTED_TO_DRUGENT.val());
|
|
|
|
+ } else {
|
|
|
|
+ updateEntity.setScorePackageStatus(ScorePackageStatusEnum.SETTLEMENT_SUBMITTED.val());
|
|
|
|
+ if (StrUtil.equals(PackageTypeEnum.TYPE1_SCORE_AND_TASK_PACKAGE.val(), wmScorePackage.getPackageType1())) {
|
|
|
|
+ // 多人承接积分包可以一直结算
|
|
|
|
+ updateEntity.setSettleFlag("0");
|
|
|
|
+ } else {
|
|
|
|
+ updateEntity.setSettleFlag("1");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ wmScorePackageService.updateById(updateEntity);
|
|
|
|
+ noteService.saveOrUpdateBatch(notes);
|
|
|
|
+
|
|
|
|
+ if (SubjectLocation.MAH_SETTLE.equals(input.getSubjectLocation())) {
|
|
|
|
+ // 给上级企业标记未读提醒
|
|
|
|
+ wmBizReminderService.markUnread(UpmsType.BizReminderType.ASSIGN_POINTS_OTHER_REMINDER, input.getMahSettleDeptId());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return R.ok(Boolean.TRUE);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 业务提交结算信息到财务-MAH(药企的个人承接-其他-结算)
|
|
|
|
+ *
|
|
|
|
+ * @param input 输入信息
|
|
|
|
+ * @return 提交结果
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public R<?> settleSubmitForMah(WmScorePackageSettleInput input) {
|
|
|
|
+
|
|
|
|
+ WmScorePackage wmScorePackage = wmScorePackageService.getById(input.getId());
|
|
|
|
+
|
|
|
|
+ if (!ScorePackageStatusEnum.SUBMITTED_TO_DRUGENT.getVal().equals(wmScorePackage.getScorePackageStatus())) {
|
|
|
|
+ return R.failed("积分包状态不正确");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 校验基本包状态
|
|
|
|
+ wmScorePackageService.checkPkgToSettle(wmScorePackage);
|
|
|
|
+
|
|
|
|
+ List<WmScorePackageSettleNote> notes = input.getNotes();
|
|
|
|
+ SubjectLocation location = input.getSubjectLocation();
|
|
|
|
+
|
|
|
|
+ Integer deptId = SecurityUtils.getUser().getDeptId();
|
|
|
|
+
|
|
|
|
+ // 校验是否配置了结算限制
|
|
|
|
+ SysDeptSub queryDeptSub = sysDeptSubService.getOne(Wrappers.<SysDeptSub>lambdaQuery()
|
|
|
|
+ .eq(SysDeptSub::getDeptId, deptId)
|
|
|
|
+ .eq(SysDeptSub::getSubjectLocation, location)
|
|
|
|
+ .eq(SysDeptSub::getEnableFlag, SubjectTypeEnum.ENABLE_FLAG_TRUE.getCode()));
|
|
|
|
+ if (!queryDeptSub.getSettleEnable()) {
|
|
|
|
+ log.info("{}企业配置了结算限制", deptId);
|
|
|
|
+ throw new RuntimeException("系统维护中,请联系管理员");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 校验人员信息
|
|
|
|
+ Set<Integer> userIds = notes.stream().map(WmScorePackageSettleNote::getUserId).map(Integer::valueOf).collect(Collectors.toSet());
|
|
|
|
+ userService.checkUserInfoToSettle(userIds, location);
|
|
|
|
+
|
|
|
|
+ // 校验结算
|
|
|
|
+ BigDecimal total = monitoringIndicatorService.settleMonitoringIndicator(notes, location);
|
|
|
|
+
|
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
|
+ notes.forEach(note -> {
|
|
|
|
+ note.setUpdateTime(now);
|
|
|
|
+ note.setSubTime(now);
|
|
|
|
+ note.setSubType(String.valueOf(location.getGigType().getCode()));
|
|
|
|
+ note.setSubjectLocation(location);
|
|
|
|
+ note.setInvoiceType(input.getInvoiceCategory());
|
|
|
|
+ note.setCategoryName(input.getCategoryName());
|
|
|
|
+ if (null == note.getId()) {
|
|
|
|
+ note.setCreateTime(LocalDateTime.now());
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ WmScorePackage updateEntity = new WmScorePackage();
|
|
|
|
+ updateEntity.setInvoiceCategory(input.getInvoiceCategory());
|
|
|
|
+ updateEntity.setSettleAmount(total);
|
|
|
|
+ updateEntity.setId(input.getId());
|
|
|
|
+ updateEntity.setSettleStatus(DingEnum.SETTLE_STATUS_WAIT.getType());
|
|
|
|
+ updateEntity.setScorePackageStatus(ScorePackageStatusEnum.SETTLEMENT_SUBMITTED.val());
|
|
|
|
+ updateEntity.setDescription(input.getDescription());
|
|
|
|
+ updateEntity.setSubType(String.valueOf(input.getSubjectLocation().getGigType().getCode()));
|
|
|
|
+ updateEntity.setLocation(input.getSubjectLocation());
|
|
|
|
+ updateEntity.setMahSettleTime(LocalDateTime.now());
|
|
|
|
+ updateEntity.setMahSettleDeptId(deptId);
|
|
|
|
+ // MAH提交到财务结算的标记
|
|
|
|
+ updateEntity.setMahSettleStep(UpmsType.MahSettleStep.FINANCE);
|
|
|
|
+
|
|
if (PackageTypeEnum.TYPE2_SETTLE_PACKAGE.val().equals(wmScorePackage.getPackageType2())
|
|
if (PackageTypeEnum.TYPE2_SETTLE_PACKAGE.val().equals(wmScorePackage.getPackageType2())
|
|
&& !StrUtil.equals(PackageTypeEnum.TYPE1_SCORE_AND_TASK_PACKAGE.val(), wmScorePackage.getPackageType1())) {
|
|
&& !StrUtil.equals(PackageTypeEnum.TYPE1_SCORE_AND_TASK_PACKAGE.val(), wmScorePackage.getPackageType1())) {
|
|
updateEntity.setPackageFinishStatus("1");
|
|
updateEntity.setPackageFinishStatus("1");
|
|
@@ -510,6 +619,51 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
return R.ok(Boolean.TRUE);
|
|
return R.ok(Boolean.TRUE);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 业务保存操作-MAH(药企的个人承接-其他-结算)
|
|
|
|
+ *
|
|
|
|
+ * @param input 提交信息
|
|
|
|
+ * @return 保存结果
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public R<?> settleSaveForMah(WmScorePackageSettleInput input) {
|
|
|
|
+
|
|
|
|
+ List<WmScorePackageSettleNote> notes = input.getNotes();
|
|
|
|
+ SubjectLocation location = input.getSubjectLocation();
|
|
|
|
+
|
|
|
|
+ // 校验人员信息
|
|
|
|
+ Set<Integer> userIds = notes.stream().map(WmScorePackageSettleNote::getUserId).map(Integer::valueOf).collect(Collectors.toSet());
|
|
|
|
+ userService.checkUserInfoToSettle(userIds, location);
|
|
|
|
+
|
|
|
|
+ // 校验结算
|
|
|
|
+ BigDecimal total = monitoringIndicatorService.settleMonitoringIndicator(notes, location);
|
|
|
|
+
|
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
|
+ notes.forEach(note -> {
|
|
|
|
+ note.setUpdateTime(now);
|
|
|
|
+ note.setSubTime(now);
|
|
|
|
+ note.setSubType(String.valueOf(location.getGigType().getCode()));
|
|
|
|
+ note.setSubjectLocation(location);
|
|
|
|
+ note.setInvoiceType(input.getInvoiceCategory());
|
|
|
|
+ note.setCategoryName(input.getCategoryName());
|
|
|
|
+ if (null == note.getId()) {
|
|
|
|
+ note.setCreateTime(LocalDateTime.now());
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ WmScorePackage updateEntity = new WmScorePackage();
|
|
|
|
+ updateEntity.setInvoiceCategory(input.getInvoiceCategory());
|
|
|
|
+ updateEntity.setSettleAmount(total);
|
|
|
|
+ updateEntity.setId(input.getId());
|
|
|
|
+ updateEntity.setDescription(input.getDescription());
|
|
|
|
+ updateEntity.setSubType(String.valueOf(location.getGigType().getCode()));
|
|
|
|
+ updateEntity.setLocation(input.getSubjectLocation());
|
|
|
|
+
|
|
|
|
+ wmScorePackageService.updateById(updateEntity);
|
|
|
|
+ noteService.saveOrUpdateBatch(notes);
|
|
|
|
+
|
|
|
|
+ return R.ok(Boolean.TRUE);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 重新结算
|
|
* 重新结算
|
|
*
|
|
*
|
|
@@ -584,13 +738,6 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
// 结算配置信息
|
|
// 结算配置信息
|
|
HnqzUser operator = SecurityUtils.getUser();
|
|
HnqzUser operator = SecurityUtils.getUser();
|
|
|
|
|
|
- if (SubjectLocation.MAH_SETTLE.equals(wmScorePackage.getLocation())) {
|
|
|
|
- // MAH结算的情况-标记
|
|
|
|
- input.setMahSettleDeptId(operator.getDeptId());
|
|
|
|
- } else {
|
|
|
|
- input.setMahSettleDeptId(null);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
SysDeptSub sysDeptSub = sysDeptSubService.getDeptSub(operator.getDeptId(), location);
|
|
SysDeptSub sysDeptSub = sysDeptSubService.getDeptSub(operator.getDeptId(), location);
|
|
SysDept sysDept = sysDeptService.getById(sysDeptSub.getDeptId());
|
|
SysDept sysDept = sysDeptService.getById(sysDeptSub.getDeptId());
|
|
String taxCode = sysDept.getTaxCode();
|
|
String taxCode = sysDept.getTaxCode();
|
|
@@ -674,18 +821,9 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
|
|
|
|
- Integer deptId;
|
|
|
|
- // MAH结算校验原企业认证信息
|
|
|
|
- if (input.getMahSettleDeptId() != null) {
|
|
|
|
- deptId = sysUser.getDeptId();
|
|
|
|
- } else {
|
|
|
|
- deptId = operator.getDeptId();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
- .eq(SysUserSub::getDeptId, deptId)
|
|
|
|
);
|
|
);
|
|
|
|
|
|
if (userSub == null) {
|
|
if (userSub == null) {
|
|
@@ -870,18 +1008,9 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
|
|
|
|
- Integer deptId;
|
|
|
|
- // MAH结算校验原企业认证信息
|
|
|
|
- if (input.getMahSettleDeptId() != null) {
|
|
|
|
- deptId = sysUser.getDeptId();
|
|
|
|
- } else {
|
|
|
|
- deptId = operator.getDeptId();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
- .eq(SysUserSub::getDeptId, deptId)
|
|
|
|
);
|
|
);
|
|
|
|
|
|
if (userSub == null) {
|
|
if (userSub == null) {
|
|
@@ -1073,18 +1202,9 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
|
|
|
|
- Integer deptId;
|
|
|
|
- // MAH结算校验原企业认证信息
|
|
|
|
- if (input.getMahSettleDeptId() != null) {
|
|
|
|
- deptId = sysUser.getDeptId();
|
|
|
|
- } else {
|
|
|
|
- deptId = operator.getDeptId();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
- .eq(SysUserSub::getDeptId, deptId)
|
|
|
|
);
|
|
);
|
|
|
|
|
|
if (userSub == null) {
|
|
if (userSub == null) {
|
|
@@ -1271,18 +1391,9 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
|
|
|
|
- Integer deptId;
|
|
|
|
- // MAH结算校验原企业认证信息
|
|
|
|
- if (input.getMahSettleDeptId() != null) {
|
|
|
|
- deptId = sysUser.getDeptId();
|
|
|
|
- } else {
|
|
|
|
- deptId = operator.getDeptId();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
- .eq(SysUserSub::getDeptId, deptId)
|
|
|
|
);
|
|
);
|
|
|
|
|
|
if (userSub == null) {
|
|
if (userSub == null) {
|
|
@@ -1478,18 +1589,9 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
|
|
|
|
- Integer deptId;
|
|
|
|
- // MAH结算校验原企业认证信息
|
|
|
|
- if (input.getMahSettleDeptId() != null) {
|
|
|
|
- deptId = sysUser.getDeptId();
|
|
|
|
- } else {
|
|
|
|
- deptId = operator.getDeptId();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
- .eq(SysUserSub::getDeptId, deptId)
|
|
|
|
);
|
|
);
|
|
|
|
|
|
if (userSub == null) {
|
|
if (userSub == null) {
|
|
@@ -1678,18 +1780,9 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
|
|
|
|
- Integer deptId;
|
|
|
|
- // MAH结算校验原企业认证信息
|
|
|
|
- if (input.getMahSettleDeptId() != null) {
|
|
|
|
- deptId = sysUser.getDeptId();
|
|
|
|
- } else {
|
|
|
|
- deptId = operator.getDeptId();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
- .eq(SysUserSub::getDeptId, deptId)
|
|
|
|
);
|
|
);
|
|
|
|
|
|
if (userSub == null) {
|
|
if (userSub == null) {
|
|
@@ -1889,18 +1982,9 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
|
|
|
|
- Integer deptId;
|
|
|
|
- // MAH结算校验原企业认证信息
|
|
|
|
- if (input.getMahSettleDeptId() != null) {
|
|
|
|
- deptId = sysUser.getDeptId();
|
|
|
|
- } else {
|
|
|
|
- deptId = operator.getDeptId();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
- .eq(SysUserSub::getDeptId, deptId)
|
|
|
|
);
|
|
);
|
|
|
|
|
|
if (userSub == null) {
|
|
if (userSub == null) {
|
|
@@ -2094,18 +2178,9 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
for (WmScorePackageSettleNote note : notes) {
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
|
|
|
|
- Integer deptId;
|
|
|
|
- // MAH结算校验原企业认证信息
|
|
|
|
- if (input.getMahSettleDeptId() != null) {
|
|
|
|
- deptId = sysUser.getDeptId();
|
|
|
|
- } else {
|
|
|
|
- deptId = operator.getDeptId();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
- .eq(SysUserSub::getDeptId, deptId)
|
|
|
|
);
|
|
);
|
|
|
|
|
|
if (userSub == null) {
|
|
if (userSub == null) {
|
|
@@ -2245,17 +2320,9 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
|
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
SysUser sysUser = sysUserMapper.selectById(note.getUserId());
|
|
|
|
|
|
- Integer deptId;
|
|
|
|
- // MAH结算校验原企业认证信息
|
|
|
|
- if (input.getMahSettleDeptId() != null) {
|
|
|
|
- deptId = sysUser.getDeptId();
|
|
|
|
- } else {
|
|
|
|
- deptId = operator.getDeptId();
|
|
|
|
- }
|
|
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getUserId, sysUser.getUserId())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
|
|
- .eq(SysUserSub::getDeptId, deptId)
|
|
|
|
);
|
|
);
|
|
|
|
|
|
if (userSub == null) {
|
|
if (userSub == null) {
|