Commit 4bf956e3 authored by zhengyi's avatar zhengyi

费用申请审批bug修复

parent 66f83982
...@@ -232,26 +232,34 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl ...@@ -232,26 +232,34 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
orderFeeApplicationDOOld.setBpmProcessId(String.valueOf(bpmProcessId)); orderFeeApplicationDOOld.setBpmProcessId(String.valueOf(bpmProcessId));
orderFeeApplicationDOOld.setStatus(1); orderFeeApplicationDOOld.setStatus(1);
feeApplicationMapper.updateById(orderFeeApplicationDOOld); feeApplicationMapper.updateById(orderFeeApplicationDOOld);
DictDataRespDTO dictDataFromCacheOld = DictFrameworkUtils.getDictDataFromCache(DictTypeConstants.RECEIVABLE_FEE_TYPE, String.valueOf(orderFeeApplicationDOOld.getFeeType())); DictDataRespDTO feeDictDataFromCacheOld = DictFrameworkUtils.getDictDataFromCache(DictTypeConstants.RECEIVABLE_FEE_TYPE, String.valueOf(orderFeeApplicationDOOld.getFeeType()));
DictDataRespDTO dictDataFromCache = DictFrameworkUtils.getDictDataFromCache(DictTypeConstants.RECEIVABLE_FEE_TYPE, String.valueOf(updateReqVO.getFeeType())); DictDataRespDTO feeDictDataFromCache = DictFrameworkUtils.getDictDataFromCache(DictTypeConstants.RECEIVABLE_FEE_TYPE, String.valueOf(updateReqVO.getFeeType()));
DictDataRespDTO payDictDataFromCacheOld = DictFrameworkUtils.getDictDataFromCache(DictTypeConstants.PAYMENT_TYPE, String.valueOf(orderFeeApplicationDOOld.getPayType()));
DictDataRespDTO payDictDataFromCache = DictFrameworkUtils.getDictDataFromCache(DictTypeConstants.PAYMENT_TYPE, String.valueOf(updateReqVO.getPayType()));
CurrencyDO currency = currencyService.getCurrency(updateReqVO.getApplicationFeeCurrency()); CurrencyDO currency = currencyService.getCurrency(updateReqVO.getApplicationFeeCurrency());
CurrencyDO currencyOld = currencyService.getCurrency(orderFeeApplicationDOOld.getApplicationFeeCurrency()); CurrencyDO currencyOld = currencyService.getCurrency(orderFeeApplicationDOOld.getApplicationFeeCurrency());
List<ApplyInfoVO> list = new ArrayList<>(); List<ApplyInfoVO> list = new ArrayList<>();
ApplyInfoVO applyInfoVO = new ApplyInfoVO(); ApplyInfoVO applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("申请费用名称"); applyInfoVO.setName("申请费用名称");
applyInfoVO.setOrgValue(I18nMessage.getLang() == 0 ? dictDataFromCacheOld.getLabel() : dictDataFromCacheOld.getLabelEn()); applyInfoVO.setOrgValue(I18nMessage.getLang() == 0 ? feeDictDataFromCacheOld.getLabel() : feeDictDataFromCacheOld.getLabelEn());
applyInfoVO.setNewValue(I18nMessage.getLang() == 0 ? dictDataFromCache.getLabel() : dictDataFromCache.getLabelEn()); applyInfoVO.setNewValue(I18nMessage.getLang() == 0 ? feeDictDataFromCache.getLabel() : feeDictDataFromCache.getLabelEn());
ApplyInfoVO applyInfoVO1 = new ApplyInfoVO();
applyInfoVO1.setName("金额");
applyInfoVO1.setOrgValue(String.valueOf(orderFeeApplicationDOOld.getApplicationFee().doubleValue()));
applyInfoVO1.setNewValue(String.valueOf(updateReqVO.getApplicationFee().doubleValue()));
ApplyInfoVO applyInfoVO2 = new ApplyInfoVO();
applyInfoVO2.setName("币种");
applyInfoVO2.setOrgValue(I18nMessage.getLang() == 0 ? currencyOld.getTitleZh() : currencyOld.getTitleEn());
applyInfoVO2.setNewValue(I18nMessage.getLang() == 0 ? currency.getTitleZh() : currency.getTitleEn());
list.add(applyInfoVO); list.add(applyInfoVO);
list.add(applyInfoVO1); applyInfoVO = new ApplyInfoVO();
list.add(applyInfoVO2); applyInfoVO.setName("金额");
applyInfoVO.setOrgValue(String.valueOf(orderFeeApplicationDOOld.getApplicationFee().doubleValue()));
applyInfoVO.setNewValue(String.valueOf(updateReqVO.getApplicationFee().doubleValue()));
list.add(applyInfoVO);
applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("币种");
applyInfoVO.setOrgValue(I18nMessage.getLang() == 0 ? currencyOld.getTitleZh() : currencyOld.getTitleEn());
applyInfoVO.setNewValue(I18nMessage.getLang() == 0 ? currency.getTitleZh() : currency.getTitleEn());
list.add(applyInfoVO);
applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("付款类型");
applyInfoVO.setOrgValue(I18nMessage.getLang() == 0 ? payDictDataFromCacheOld.getLabel() : payDictDataFromCacheOld.getLabelEn());
applyInfoVO.setNewValue(I18nMessage.getLang() == 0 ? payDictDataFromCache.getLabel() : payDictDataFromCache.getLabelEn());
list.add(applyInfoVO);
orderBusinessService.addOrderOperateLog(updateObj.getOrderId(), "", "费用修改提交审核", list); orderBusinessService.addOrderOperateLog(updateObj.getOrderId(), "", "费用修改提交审核", list);
} }
...@@ -280,11 +288,12 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl ...@@ -280,11 +288,12 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
feeApplicationMapper.deleteById(id); feeApplicationMapper.deleteById(id);
CurrencyDO currency = currencyService.getCurrency(orderFeeApplicationDO.getApplicationFeeCurrency()); CurrencyDO currency = currencyService.getCurrency(orderFeeApplicationDO.getApplicationFeeCurrency());
String currencyName = Objects.nonNull(currency) ? (I18nMessage.getLang() == 0 ? currency.getTitleZh() : currency.getTitleEn()) : (I18nMessage.getLang() == 0 ? "未知" : "NUKNOWN"); String currencyName = Objects.nonNull(currency) ? (I18nMessage.getLang() == 0 ? currency.getTitleZh() : currency.getTitleEn()) : (I18nMessage.getLang() == 0 ? "未知" : "NUKNOWN");
DictDataRespDTO dictDataFromCache = DictFrameworkUtils.getDictDataFromCache(DictTypeConstants.RECEIVABLE_FEE_TYPE, String.valueOf(orderFeeApplicationDO.getFeeType())); DictDataRespDTO feeTypeDictDataFromCache = DictFrameworkUtils.getDictDataFromCache(DictTypeConstants.RECEIVABLE_FEE_TYPE, String.valueOf(orderFeeApplicationDO.getFeeType()));
DictDataRespDTO payTypeDictDataFromCache = DictFrameworkUtils.getDictDataFromCache(DictTypeConstants.PAYMENT_TYPE, String.valueOf(orderFeeApplicationDO.getPayType()));
List<ApplyInfoVO> list = new ArrayList<>(); List<ApplyInfoVO> list = new ArrayList<>();
ApplyInfoVO applyInfoVO = new ApplyInfoVO(); ApplyInfoVO applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("申请费用名称"); applyInfoVO.setName("申请费用名称");
applyInfoVO.setNewValue(I18nMessage.getLang() == 0 ? dictDataFromCache.getLabel() : dictDataFromCache.getLabelEn()); applyInfoVO.setNewValue(I18nMessage.getLang() == 0 ? feeTypeDictDataFromCache.getLabel() : feeTypeDictDataFromCache.getLabelEn());
list.add(applyInfoVO); list.add(applyInfoVO);
applyInfoVO = new ApplyInfoVO(); applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("金额"); applyInfoVO.setName("金额");
...@@ -294,6 +303,10 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl ...@@ -294,6 +303,10 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
applyInfoVO.setName("币种"); applyInfoVO.setName("币种");
applyInfoVO.setNewValue(currencyName); applyInfoVO.setNewValue(currencyName);
list.add(applyInfoVO); list.add(applyInfoVO);
applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("付款类型");
applyInfoVO.setNewValue(I18nMessage.getLang() == 0 ? payTypeDictDataFromCache.getLabel() : payTypeDictDataFromCache.getLabelEn());
list.add(applyInfoVO);
orderBusinessService.addOrderOperateLog(orderFeeApplicationDO.getOrderId(), "订单操作", "费用申请删除", list); orderBusinessService.addOrderOperateLog(orderFeeApplicationDO.getOrderId(), "订单操作", "费用申请删除", list);
} }
...@@ -335,10 +348,11 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl ...@@ -335,10 +348,11 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
// 这里已经将修改后的内容更新到原数据中去了 // 这里已经将修改后的内容更新到原数据中去了
OrderFeeApplicationDO orderFeeApplicationDO = JSONObject.parseObject(orderApprovalDO.getDetails(), OrderFeeApplicationDO.class); OrderFeeApplicationDO orderFeeApplicationDO = JSONObject.parseObject(orderApprovalDO.getDetails(), OrderFeeApplicationDO.class);
if (orderFeeApplicationDO != null) { if (orderFeeApplicationDO != null) {
orderFeeApplicationDO.setStatus(result);
feeApplicationMapper.updateById(orderFeeApplicationDO);
List<FeeDto> feeDtos = new ArrayList<>(); List<FeeDto> feeDtos = new ArrayList<>();
if (result == 2) { if (result == 2) {
// 审批通过,更新状态与修改后的数据到数据库
orderFeeApplicationDO.setStatus(result);
feeApplicationMapper.updateById(orderFeeApplicationDO);
OrderBackVO order = orderQueryService.getOrder(orderFeeApplicationDO.getOrderId()); OrderBackVO order = orderQueryService.getOrder(orderFeeApplicationDO.getOrderId());
//生成应收 //生成应收
DictDataRespDTO dictDto = DictFrameworkUtils.getDictDataFromCache("receivable_fee_type", String.valueOf(orderFeeApplicationDO.getFeeType())); DictDataRespDTO dictDto = DictFrameworkUtils.getDictDataFromCache("receivable_fee_type", String.valueOf(orderFeeApplicationDO.getFeeType()));
...@@ -410,11 +424,12 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl ...@@ -410,11 +424,12 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
orderService.updateStatus(orderFeeApplicationDO.getOrderId(), null, null, null, null, null, 0, OrderApprovalTypeResultEnum.expense_apply_pass.getDesc()); orderService.updateStatus(orderFeeApplicationDO.getOrderId(), null, null, null, null, null, 0, OrderApprovalTypeResultEnum.expense_apply_pass.getDesc());
// orderBusinessService.addOrderOperateLog(orderFeeApplicationDO.getOrderId(),"","提交费用申请成功",""); // orderBusinessService.addOrderOperateLog(orderFeeApplicationDO.getOrderId(),"","提交费用申请成功","");
} else if (result == 4) { } else if (result == 4) {
feeApplicationMapper.deleteById(id); feeApplicationMapper.update(null, new LambdaUpdateWrapper<OrderFeeApplicationDO>().set(OrderFeeApplicationDO::getStatus, result).eq(OrderFeeApplicationDO::getId, orderFeeApplicationDO.getId()));
orderService.updateStatus(orderFeeApplicationDO.getOrderId(), null, null, null, null, null, 0, OrderApprovalTypeResultEnum.expense_apply_cancel.getDesc()); orderService.updateStatus(orderFeeApplicationDO.getOrderId(), null, null, null, null, null, 0, OrderApprovalTypeResultEnum.expense_apply_cancel.getDesc());
//bpmCreateServiceFactory.cancelBmpById(SecurityFrameworkUtils.getLoginUserId(),orderFeeApplicationDO.getBpmProcessId(),null); //bpmCreateServiceFactory.cancelBmpById(SecurityFrameworkUtils.getLoginUserId(),orderFeeApplicationDO.getBpmProcessId(),null);
// orderBusinessService.addOrderOperateLog(orderFeeApplicationDO.getOrderId(),"","取消费用申请",""); // orderBusinessService.addOrderOperateLog(orderFeeApplicationDO.getOrderId(),"","取消费用申请","");
} else if (result == 3) { } else if (result == 3) {
feeApplicationMapper.update(null, new LambdaUpdateWrapper<OrderFeeApplicationDO>().set(OrderFeeApplicationDO::getStatus, result).eq(OrderFeeApplicationDO::getId, orderFeeApplicationDO.getId()));
orderService.updateStatus(orderFeeApplicationDO.getOrderId(), null, null, null, null, null, 0, OrderApprovalTypeResultEnum.expense_apply_reject.getDesc()); orderService.updateStatus(orderFeeApplicationDO.getOrderId(), null, null, null, null, null, 0, OrderApprovalTypeResultEnum.expense_apply_reject.getDesc());
// orderBusinessService.addOrderOperateLog(orderFeeApplicationDO.getOrderId(),"","提交费用申请失败",""); // orderBusinessService.addOrderOperateLog(orderFeeApplicationDO.getOrderId(),"","提交费用申请失败","");
} }
......
...@@ -31,6 +31,7 @@ public interface DictTypeConstants { ...@@ -31,6 +31,7 @@ public interface DictTypeConstants {
String EXCEPTION_ORDER_TYPE = "order_error_type";//异常订单状态 String EXCEPTION_ORDER_TYPE = "order_error_type";//异常订单状态
String RECEIVABLE_FEE_TYPE = "receivable_fee_type";//费用类型 String RECEIVABLE_FEE_TYPE = "receivable_fee_type";//费用类型
String PAYMENT_TYPE = "payment_type";//收款类型
String ORDER_SPECIAL_NEED = "order_special_needs";//特需 String ORDER_SPECIAL_NEED = "order_special_needs";//特需
......
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