|
@@ -372,7 +372,20 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
|
|
|
if (CollUtil.isEmpty(deptSubs)) {
|
|
|
return R.failed("结算渠道不存在");
|
|
|
}
|
|
|
+ SysDeptSub sysDeptSub = deptSubs.get(0);
|
|
|
location = deptSubs.get(0).getSubjectLocation();
|
|
|
+
|
|
|
+ // 默认取渠道对应的第一个发票类目 TODO
|
|
|
+ String invoiceType = sysDeptSub.getSubjectLocation().getInvoiceType();
|
|
|
+ // 查询发票类目对应的字典
|
|
|
+ List<SysDictItem> invoices = sysDictItemMapper.selectList(Wrappers.<SysDictItem>lambdaQuery()
|
|
|
+ .eq(SysDictItem::getType, invoiceType)
|
|
|
+ .eq(SysDictItem::getDelFlag, DelEnum.NOT_DEL.val()));
|
|
|
+ if (CollUtil.isEmpty(invoices)) {
|
|
|
+ return R.failed(user.getRealname() + "发票类目不存在,不能结算");
|
|
|
+ }
|
|
|
+ note.setInvoiceType(Integer.valueOf(invoices.get(0).getValue()));
|
|
|
+ note.setCategoryName(invoices.get(0).getLabel());
|
|
|
}
|
|
|
|
|
|
String subType = String.valueOf(location.getGigType().getCode());
|
|
@@ -649,19 +662,6 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
|
|
|
return R.failed(sysUser.getRealname() + "人员结算渠道不存在,不能结算");
|
|
|
}
|
|
|
|
|
|
- if (SubjectLocation.MAH_SETTLE.equals(wmScorePackage.getLocation())) {
|
|
|
- // MAH结算的发票类目 暂默认选一个 TODO
|
|
|
- String invoiceType = sysDeptSub.getSubjectLocation().getInvoiceType();
|
|
|
- // 查询发票类目对应的字典
|
|
|
- List<SysDictItem> invoices = sysDictItemMapper.selectList(Wrappers.<SysDictItem>lambdaQuery()
|
|
|
- .eq(SysDictItem::getType, invoiceType)
|
|
|
- .eq(SysDictItem::getDelFlag, DelEnum.NOT_DEL.val()));
|
|
|
- if (CollUtil.isEmpty(invoices)) {
|
|
|
- return R.failed(sysUser.getRealname() + "发票类目不存在,不能结算");
|
|
|
- }
|
|
|
- note.setInvoiceType(Integer.valueOf(invoices.get(0).getValue()));
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 发起结算
|
|
|
*/
|