结算异常处理

This commit is contained in:
syruan 2026-01-27 16:48:58 +08:00
parent d33c3610c3
commit b4d0d2d08d
3 changed files with 146 additions and 147 deletions

View File

@ -44,9 +44,7 @@ public class BmReportServiceImpl implements BmReportService {
@Override @Override
public List<PurChaseReportInfo> getPurChaseReportList(PurChaseReportInfo bean) { public List<PurChaseReportInfo> getPurChaseReportList(PurChaseReportInfo bean) {
bean.setUserId(SecurityUtils.getLoginUser().getUserid()); bean.setUserId(SecurityUtils.getLoginUser().getUserid());
/** // jsk
* jsk
*/
Long companyId=iTypeService.getUserDeptId(); Long companyId=iTypeService.getUserDeptId();
bean.setCompanyId(companyId); bean.setCompanyId(companyId);
BigDecimal totalPurchaseNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP); BigDecimal totalPurchaseNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
@ -169,6 +167,7 @@ public class BmReportServiceImpl implements BmReportService {
} }
return list; return list;
} }
private boolean containsKeyword(LeaseOutInfo item, String keyWord) { private boolean containsKeyword(LeaseOutInfo item, String keyWord) {
return (item.getTypeName() != null && item.getTypeName().contains(keyWord)) || return (item.getTypeName() != null && item.getTypeName().contains(keyWord)) ||
(item.getTypeModelName() != null && item.getTypeModelName().contains(keyWord)) || (item.getTypeModelName() != null && item.getTypeModelName().contains(keyWord)) ||

View File

@ -2037,11 +2037,7 @@ public class SltAgreementInfoController extends BaseController {
@ApiOperation(value = "进行结算审批") @ApiOperation(value = "进行结算审批")
@PostMapping("/costExamine") @PostMapping("/costExamine")
public AjaxResult costExamine(@RequestBody SltAgreementApply apply) { public AjaxResult costExamine(@RequestBody SltAgreementApply apply) {
try {
return sltAgreementInfoService.costExamine(apply); return sltAgreementInfoService.costExamine(apply);
} catch (Exception e) {
return error("系统错误, " + e.getMessage());
}
} }
/** /**

View File

@ -1180,12 +1180,16 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
return AjaxResult.error("结算信息为空,请刷新后重试!"); return AjaxResult.error("结算信息为空,请刷新后重试!");
} }
Long deptId = typeService.getUserDeptId(); Long deptId = null;
try {
deptId = typeService.getUserDeptId();
sltAgreementApply.setCompanyId(deptId); sltAgreementApply.setCompanyId(deptId);
} catch (Exception e) {
throw new ServiceException("结算权限校验不通过!");
}
Integer settlementType = sltAgreementApply.getSettlementType(); Integer settlementType = sltAgreementApply.getSettlementType();
String sltTask = sltAgreementApply.getSltTask(); String sltTask = sltAgreementApply.getSltTask();
try {
String userId = String.valueOf(SecurityUtils.getLoginUser().getUserid()); String userId = String.valueOf(SecurityUtils.getLoginUser().getUserid());
sltAgreementApply.setAuditor(userId); sltAgreementApply.setAuditor(userId);
@ -1197,13 +1201,17 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
sltAgreementApply.setSettlementType(sltType); sltAgreementApply.setSettlementType(sltType);
SltAgreementApply checkSltPer = sltAgreementInfoMapper.getSltPermission(sltAgreementApply); SltAgreementApply checkSltPer = sltAgreementInfoMapper.getSltPermission(sltAgreementApply);
Integer checkSettlementType = checkSltPer.getSettlementType(); Integer checkSettlementType = null;
try {
checkSettlementType = checkSltPer.getSettlementType();
} catch (Exception e) {
throw new ServiceException("结算权限校验不通过!");
}
if(GlobalConstants.LONG_JJ.equals(deptId)){ if(GlobalConstants.LONG_JJ.equals(deptId)){
if(checkSettlementType == 1 && "73".equals(userId)){ if(checkSettlementType == 1 && "73".equals(userId)){
sltSwitch = true; sltSwitch = true;
} }
if(checkSettlementType == 2 && "1549".equals(userId)){ if(checkSettlementType == 2 && "1549".equals(userId)){
sltSwitch = true; sltSwitch = true;
} }
@ -1218,7 +1226,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
} }
} }
if(sltSwitch){ if (sltSwitch) {
if (Objects.equals(REVIEW_REJECT, sltAgreementApply.getStatus())) { if (Objects.equals(REVIEW_REJECT, sltAgreementApply.getStatus())) {
// if (settlementType == 3 ) { // if (settlementType == 3 ) {
@ -1335,10 +1343,6 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
return AjaxResult.error("审批错误,账号没有审批权限"); return AjaxResult.error("审批错误,账号没有审批权限");
} }
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}
} }
/** /**