Commit 2478960a by huluobin

update

parent be3599ce
......@@ -92,7 +92,7 @@ public class CostTemplate implements Serializable {
}
public boolean shouldFinalCheck(BigDecimal amount) {
return amount.compareTo(finalMinimumReviewAmount) > 0;
return amount.compareTo(finalMinimumReviewAmount) >= 0;
}
}
......@@ -61,7 +61,8 @@ public class FinalCheckState extends CostState {
if (!costTemplate.shouldFinalCheck(costDomain.getAmount())) {
costDomain.setCostStatus(CostDomain.STATUS_UN_PAY);
costDao.updateById(costDomain);
costLogService.saveByManage(costDomain.getCostNo(), "金额不够最终审核标准,无需最终审核", null);
costLogService.saveByManage(costDomain.getCostNo(), "最终审核自动通过", CostLogDomain.FINAL_AUTO_PASS);
//通知财务系统
costContext.costService.toFinancial(costDomain);
......
......@@ -97,7 +97,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
return;
}
// 2.1、冲销刚好抵消差额 / 冲销小于差额 ===== 生成一张无需付款的借还单
// 2.1、冲销刚好抵消差额 / 冲销小于差额 ===== 生成一张无需推送财务系统的借还单
if (counteract.compareTo(subtract) <= 0) {
CostDomain costDomain = planToCost(costPlanDomain.getCostPlanNo());
costDomain.setCostNo(getCostNo());
......@@ -156,6 +156,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
*/
CostPlanDomain payPlan = new CostPlanDomain();
BeanUtils.copyProperties(costPlanDomain, payPlan);
//付款金额 (关联借支单币种)
BigDecimal compensate = costPlanDomain.getCounteract().subtract(subtract);
payPlan.setCostPlanNo("S" + createNo());
......
......@@ -134,8 +134,8 @@ public class CostPlanNewPayServiceImpl extends AbstractCostPlanService implement
// 执行添加记录流程
costDomain.setCostPlanNo(costPlanNo);
Integer insert = costDao.insert(costDomain);
if (null != insert && insert >= 1) {
int insert = costDao.insert(costDomain);
if (insert >= 1) {
// 记录日志
costLogService.save(costDomain.getCostNo(), costDomain.getCreateUserid(), "由费用计划:" + costDomain.getCostPlanNo() + " 生成付款单");
......
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