Commit f1b01b0f by huluobin

last update time update

parent 1895f99b
...@@ -44,6 +44,7 @@ public class CostStatusSyncJob extends QuartzJobBean { ...@@ -44,6 +44,7 @@ public class CostStatusSyncJob extends QuartzJobBean {
costDomainList.forEach(costDomain -> { costDomainList.forEach(costDomain -> {
costDomain.setCostStatus(CostDomain.STATUS_DELETE); costDomain.setCostStatus(CostDomain.STATUS_DELETE);
costDomain.setLastModifyDate(LocalDateTime.now());
int result = costDao.updateById(costDomain); int result = costDao.updateById(costDomain);
if (result > 0) { if (result > 0) {
CostLogDomain costLog = new CostLogDomain(); CostLogDomain costLog = new CostLogDomain();
......
...@@ -24,6 +24,7 @@ public interface CostService { ...@@ -24,6 +24,7 @@ public interface CostService {
Integer saveNewCost(CostDomain costDomain); Integer saveNewCost(CostDomain costDomain);
void setPrimaryDepartment(List<CostDomain> costDomains); void setPrimaryDepartment(List<CostDomain> costDomains);
/** /**
* 获取所有费用单 * 获取所有费用单
* *
......
...@@ -24,7 +24,6 @@ import org.slf4j.Logger; ...@@ -24,7 +24,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -351,7 +350,6 @@ public class CostApiServiceImpl implements CostApiService { ...@@ -351,7 +350,6 @@ public class CostApiServiceImpl implements CostApiService {
costDetailDomain.setFilePath(path); costDetailDomain.setFilePath(path);
costDetailDao.insert(costDetailDomain); costDetailDao.insert(costDetailDomain);
CostLogDomain costLogDomain = new CostLogDomain(); CostLogDomain costLogDomain = new CostLogDomain();
costLogDomain.setCostNo(costNo); costLogDomain.setCostNo(costNo);
costLogDomain.setUpdateUserid(user.getUserid()); costLogDomain.setUpdateUserid(user.getUserid());
......
...@@ -46,6 +46,7 @@ import org.springframework.util.StringUtils; ...@@ -46,6 +46,7 @@ import org.springframework.util.StringUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -173,6 +174,7 @@ public abstract class AbstractCostService implements CostService { ...@@ -173,6 +174,7 @@ public abstract class AbstractCostService implements CostService {
UpdateCostResp resp = new UpdateCostResp(); UpdateCostResp resp = new UpdateCostResp();
setCostDomain(costDomain); setCostDomain(costDomain);
costDomain.setLastModifyDate(LocalDateTime.now());
Integer update = costDao.update(costDomain, new LambdaQueryWrapper<CostDomain>() Integer update = costDao.update(costDomain, new LambdaQueryWrapper<CostDomain>()
.eq(CostDomain::getCostNo, costDomain.getCostNo())); .eq(CostDomain::getCostNo, costDomain.getCostNo()));
...@@ -231,6 +233,7 @@ public abstract class AbstractCostService implements CostService { ...@@ -231,6 +233,7 @@ public abstract class AbstractCostService implements CostService {
costDomain.setKindNo(costDetailDomains.get(0).getKindNo()); costDomain.setKindNo(costDetailDomains.get(0).getKindNo());
costDomain.setKindName(costDetailDomains.get(0).getKindName()); costDomain.setKindName(costDetailDomains.get(0).getKindName());
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.update(costDomain, new LambdaQueryWrapper<CostDomain>() costDao.update(costDomain, new LambdaQueryWrapper<CostDomain>()
.eq(CostDomain::getCostNo, costDomain.getCostNo())); .eq(CostDomain::getCostNo, costDomain.getCostNo()));
} }
...@@ -241,12 +244,14 @@ public abstract class AbstractCostService implements CostService { ...@@ -241,12 +244,14 @@ public abstract class AbstractCostService implements CostService {
CostDomain costDomain = new CostDomain(); CostDomain costDomain = new CostDomain();
costDomain.setCostNo(costNo); costDomain.setCostNo(costNo);
costDomain.setCostStatus(i); costDomain.setCostStatus(i);
costDomain.setLastModifyDate(LocalDateTime.now());
return costDao.update(costDomain, new LambdaQueryWrapper<CostDomain>() return costDao.update(costDomain, new LambdaQueryWrapper<CostDomain>()
.eq(CostDomain::getCostNo, costDomain.getCostNo())); .eq(CostDomain::getCostNo, costDomain.getCostNo()));
} }
@Override @Override
public Integer updateById(CostDomain costDomain) { public Integer updateById(CostDomain costDomain) {
costDomain.setLastModifyDate(LocalDateTime.now());
return costDao.updateById(costDomain); return costDao.updateById(costDomain);
} }
...@@ -255,6 +260,7 @@ public abstract class AbstractCostService implements CostService { ...@@ -255,6 +260,7 @@ public abstract class AbstractCostService implements CostService {
CostDomain costDomain = costDao.selectByCostNo(costNo); CostDomain costDomain = costDao.selectByCostNo(costNo);
costDomain.setCashierFilePath(filePath); costDomain.setCashierFilePath(filePath);
costDomain.setCashierDownloadPath(downloadUrl); costDomain.setCashierDownloadPath(downloadUrl);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
} }
...@@ -349,12 +355,14 @@ public abstract class AbstractCostService implements CostService { ...@@ -349,12 +355,14 @@ public abstract class AbstractCostService implements CostService {
//费用计划关联借支单 //费用计划关联借支单
CostDomain supCost = costDao.selectByCostNo(costDomain.getSupCostNo()); CostDomain supCost = costDao.selectByCostNo(costDomain.getSupCostNo());
supCost.setCompensate(supCost.getCompensate().subtract(costDomain.getAmount())); supCost.setCompensate(supCost.getCompensate().subtract(costDomain.getAmount()));
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(supCost); costDao.updateById(supCost);
} }
CostDomain costDomain = costDao.selectByCostNo(costNo); CostDomain costDomain = costDao.selectByCostNo(costNo);
costDomain.setCostStatus(CostDomain.STATUS_REJECT); costDomain.setCostStatus(CostDomain.STATUS_REJECT);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
} }
......
...@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -50,6 +51,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost ...@@ -50,6 +51,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
cost.setToRmbRate(toRmbRate); cost.setToRmbRate(toRmbRate);
cost.setAmountRmb(cost.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP)); cost.setAmountRmb(cost.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP));
cost.setAuditTime(new Date()); cost.setAuditTime(new Date());
cost.setLastModifyDate(LocalDateTime.now());
costDao.updateById(cost); costDao.updateById(cost);
//借还单 //借还单
...@@ -68,6 +70,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost ...@@ -68,6 +70,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
//todo 邮件通知 //todo 邮件通知
log.error("金额异常 联系管理员,costNo:{}", supCostDomain.getCostNo()); log.error("金额异常 联系管理员,costNo:{}", supCostDomain.getCostNo());
} }
supCostDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(supCostDomain); costDao.updateById(supCostDomain);
} }
return; return;
...@@ -117,6 +120,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost ...@@ -117,6 +120,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
CostDomain supCost = costDao.selectByCostNo(costDomain.getSupCostNo()); CostDomain supCost = costDao.selectByCostNo(costDomain.getSupCostNo());
supCost.setRepaymentAppliedAmount(supCost.getRepaymentAppliedAmount().subtract(costDomain.getAmount())); supCost.setRepaymentAppliedAmount(supCost.getRepaymentAppliedAmount().subtract(costDomain.getAmount()));
supCost.setLastModifyDate(LocalDateTime.now());
costDao.updateById(supCost); costDao.updateById(supCost);
} }
...@@ -135,6 +139,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost ...@@ -135,6 +139,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
costDomain.setToRmbRate(toRmbRate); costDomain.setToRmbRate(toRmbRate);
costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP)); costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP));
costDomain.setAuditTime(new Date()); costDomain.setAuditTime(new Date());
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
...@@ -154,6 +159,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost ...@@ -154,6 +159,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
//todo 邮件通知 //todo 邮件通知
log.error("金额异常 联系管理员,costNo:{}", supCostDomain.getCostNo()); log.error("金额异常 联系管理员,costNo:{}", supCostDomain.getCostNo());
} }
supCostDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(supCostDomain); costDao.updateById(supCostDomain);
} }
......
...@@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDateTime;
/** /**
* <p> * <p>
...@@ -49,6 +50,7 @@ public class DepartmentCheckState extends CostState { ...@@ -49,6 +50,7 @@ public class DepartmentCheckState extends CostState {
if (!costTemplate.shouldDepartmentCheck(costDomain, oaDepartment.getDepartmentMinimumReviewAmount())) { if (!costTemplate.shouldDepartmentCheck(costDomain, oaDepartment.getDepartmentMinimumReviewAmount())) {
costDomain.setCostStatus(CostDomain.STATUS_HR_CHECK); costDomain.setCostStatus(CostDomain.STATUS_HR_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
...@@ -66,6 +68,7 @@ public class DepartmentCheckState extends CostState { ...@@ -66,6 +68,7 @@ public class DepartmentCheckState extends CostState {
//自动审核通过 //自动审核通过
if (this.autoCheck(costDomain)) { if (this.autoCheck(costDomain)) {
costDomain.setCostStatus(CostDomain.STATUS_HR_CHECK); costDomain.setCostStatus(CostDomain.STATUS_HR_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
costLogService.saveByManage(costDomain.getCostNo(), "部门自动审核通过", CostLogDomain.DEPARTMENT_AUTO_PASS); costLogService.saveByManage(costDomain.getCostNo(), "部门自动审核通过", CostLogDomain.DEPARTMENT_AUTO_PASS);
...@@ -82,6 +85,7 @@ public class DepartmentCheckState extends CostState { ...@@ -82,6 +85,7 @@ public class DepartmentCheckState extends CostState {
//人工审核通过 //人工审核通过
if (costReviewerMapper.queryOne(costUser.getPrimaryDepartmentId(), CostReviewer.departmentReviewer, currentUserId) != null) { if (costReviewerMapper.queryOne(costUser.getPrimaryDepartmentId(), CostReviewer.departmentReviewer, currentUserId) != null) {
costDomain.setCostStatus(CostDomain.STATUS_HR_CHECK); costDomain.setCostStatus(CostDomain.STATUS_HR_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
costLogService.save(costDomain.getCostNo(), currentUserId, "部门审核通过", CostLogDomain.DEPARTMENT_MANUAL_PASS); costLogService.save(costDomain.getCostNo(), currentUserId, "部门审核通过", CostLogDomain.DEPARTMENT_MANUAL_PASS);
......
...@@ -11,6 +11,7 @@ import org.springframework.stereotype.Component; ...@@ -11,6 +11,7 @@ import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDateTime;
/** /**
* <p> * <p>
...@@ -46,6 +47,7 @@ public class FinalCheckState extends CostState { ...@@ -46,6 +47,7 @@ public class FinalCheckState extends CostState {
//如果不需要审核 并且主体不是工会 直接通过 //如果不需要审核 并且主体不是工会 直接通过
if (!costTemplate.shouldFinalCheck(costDomain)) { if (!costTemplate.shouldFinalCheck(costDomain)) {
costDomain.setCostStatus(CostDomain.STATUS_UN_PAY); costDomain.setCostStatus(CostDomain.STATUS_UN_PAY);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
costLogService.saveByManage(costDomain.getCostNo(), "最终审核自动通过", CostLogDomain.FINAL_AUTO_PASS); costLogService.saveByManage(costDomain.getCostNo(), "最终审核自动通过", CostLogDomain.FINAL_AUTO_PASS);
...@@ -59,6 +61,7 @@ public class FinalCheckState extends CostState { ...@@ -59,6 +61,7 @@ public class FinalCheckState extends CostState {
//自动审核通过 //自动审核通过
if (this.autoCheck(costDomain)) { if (this.autoCheck(costDomain)) {
costDomain.setCostStatus(CostDomain.STATUS_UN_PAY); costDomain.setCostStatus(CostDomain.STATUS_UN_PAY);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
costLogService.saveByManage(costDomain.getCostNo(), "最终审核自动通过", CostLogDomain.FINAL_AUTO_PASS); costLogService.saveByManage(costDomain.getCostNo(), "最终审核自动通过", CostLogDomain.FINAL_AUTO_PASS);
...@@ -74,6 +77,7 @@ public class FinalCheckState extends CostState { ...@@ -74,6 +77,7 @@ public class FinalCheckState extends CostState {
//人工审核通过 //人工审核通过
if (costReviewerMapper.queryOne(costCompany.getId(), CostReviewer.finalReviewer, currentUserId) != null) { if (costReviewerMapper.queryOne(costCompany.getId(), CostReviewer.finalReviewer, currentUserId) != null) {
costDomain.setCostStatus(CostDomain.STATUS_UN_PAY); costDomain.setCostStatus(CostDomain.STATUS_UN_PAY);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
costLogService.save(costDomain.getCostNo(), currentUserId, "最终审核通过", CostLogDomain.FINAL_MANUAL_PASS); costLogService.save(costDomain.getCostNo(), currentUserId, "最终审核通过", CostLogDomain.FINAL_MANUAL_PASS);
......
...@@ -12,6 +12,7 @@ import org.springframework.stereotype.Component; ...@@ -12,6 +12,7 @@ import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDateTime;
/** /**
* <p> * <p>
...@@ -49,6 +50,7 @@ public class FinancialCheckState extends CostState { ...@@ -49,6 +50,7 @@ public class FinancialCheckState extends CostState {
//自动审核通过 //自动审核通过
if (this.autoCheck(costDomain)) { if (this.autoCheck(costDomain)) {
costDomain.setCostStatus(CostDomain.STATUS_FINAL_CHECK); costDomain.setCostStatus(CostDomain.STATUS_FINAL_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
costLogService.saveByManage(costDomain.getCostNo(), "财务自动审核通过", CostLogDomain.FINANCIAL_AUTO_PASS); costLogService.saveByManage(costDomain.getCostNo(), "财务自动审核通过", CostLogDomain.FINANCIAL_AUTO_PASS);
...@@ -66,6 +68,7 @@ public class FinancialCheckState extends CostState { ...@@ -66,6 +68,7 @@ public class FinancialCheckState extends CostState {
//人工审核通过 //人工审核通过
if (costReviewerMapper.queryOne(costCompany.getId(), CostReviewer.financialReviewer, currentUserId) != null) { if (costReviewerMapper.queryOne(costCompany.getId(), CostReviewer.financialReviewer, currentUserId) != null) {
costDomain.setCostStatus(CostDomain.STATUS_FINAL_CHECK); costDomain.setCostStatus(CostDomain.STATUS_FINAL_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
costLogService.save(costDomain.getCostNo(), currentUserId, "财务审核通过", CostLogDomain.FINANCIAL_MANUAL_PASS); costLogService.save(costDomain.getCostNo(), currentUserId, "财务审核通过", CostLogDomain.FINANCIAL_MANUAL_PASS);
......
...@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDateTime;
/** /**
* <p> * <p>
...@@ -50,6 +51,7 @@ public class HrCheckState extends CostState { ...@@ -50,6 +51,7 @@ public class HrCheckState extends CostState {
if (!costTemplate.shouldHrCheck(costDomain)) { if (!costTemplate.shouldHrCheck(costDomain)) {
costDomain.setCostStatus(CostDomain.STATUS_FINANCIAL_CHECK); costDomain.setCostStatus(CostDomain.STATUS_FINANCIAL_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
//流转状态 //流转状态
...@@ -66,6 +68,7 @@ public class HrCheckState extends CostState { ...@@ -66,6 +68,7 @@ public class HrCheckState extends CostState {
//人工审核通过 //人工审核通过
if (costReviewerMapper.queryOne(costCompany.getId(), CostReviewer.hrReviewer, currentUserId) != null) { if (costReviewerMapper.queryOne(costCompany.getId(), CostReviewer.hrReviewer, currentUserId) != null) {
costDomain.setCostStatus(CostDomain.STATUS_FINANCIAL_CHECK); costDomain.setCostStatus(CostDomain.STATUS_FINANCIAL_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
costLogService.save(costDomain.getCostNo(), currentUserId, "行政审核通过", CostLogDomain.HR_PASS); costLogService.save(costDomain.getCostNo(), currentUserId, "行政审核通过", CostLogDomain.HR_PASS);
......
...@@ -6,6 +6,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -6,6 +6,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
/** /**
* <p> * <p>
* *
...@@ -33,6 +35,7 @@ public class UnSubmitState extends CostState { ...@@ -33,6 +35,7 @@ public class UnSubmitState extends CostState {
//更新费用单 //更新费用单
costDomain.setCostStatus(CostDomain.STATUS_DEPARTMENT_CHECK); costDomain.setCostStatus(CostDomain.STATUS_DEPARTMENT_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
costLogService.save(costDomain.getCostNo(), costContext.currentUserId, "提交费用单"); costLogService.save(costDomain.getCostNo(), costContext.currentUserId, "提交费用单");
......
...@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
...@@ -142,6 +143,7 @@ public abstract class AbstractCostPlanService implements CostPlanService { ...@@ -142,6 +143,7 @@ public abstract class AbstractCostPlanService implements CostPlanService {
//费用计划关联借支单 //费用计划关联借支单
CostDomain costDomain = costDao.selectByCostNo(costPlanDomain.getSupCostNo()); CostDomain costDomain = costDao.selectByCostNo(costPlanDomain.getSupCostNo());
costDomain.setCompensate(costDomain.getCompensate().subtract(costPlanDomain.getPlanAmount())); costDomain.setCompensate(costDomain.getCompensate().subtract(costPlanDomain.getPlanAmount()));
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
} }
costPlanDao.deleteByNo(costPlanNo); costPlanDao.deleteByNo(costPlanNo);
......
...@@ -14,6 +14,7 @@ import org.springframework.stereotype.Service; ...@@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime;
/** /**
...@@ -113,6 +114,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme ...@@ -113,6 +114,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
//更新借支单申请归还金额 //更新借支单申请归还金额
supCost.setRepaymentAppliedAmount(supCost.getRepaymentAppliedAmount().add(counteract)); supCost.setRepaymentAppliedAmount(supCost.getRepaymentAppliedAmount().add(counteract));
supCost.setLastModifyDate(LocalDateTime.now());
costDao.updateById(supCost); costDao.updateById(supCost);
log.info("冲销刚好抵消差额 / 冲销小于差额 ===== 生成一张无需付款的借还单:" + costDomain); log.info("冲销刚好抵消差额 / 冲销小于差额 ===== 生成一张无需付款的借还单:" + costDomain);
...@@ -138,6 +140,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme ...@@ -138,6 +140,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
//更新借支单申请归还金额 //更新借支单申请归还金额
supCost.setRepaymentAppliedAmount(supCost.getRepaymentAppliedAmount().add(costDomain.getCounteract())); supCost.setRepaymentAppliedAmount(supCost.getRepaymentAppliedAmount().add(costDomain.getCounteract()));
supCost.setLastModifyDate(LocalDateTime.now());
costDao.updateById(supCost); costDao.updateById(supCost);
log.info("生成一张无需收款的借还单:" + costDomain); log.info("生成一张无需收款的借还单:" + costDomain);
...@@ -189,6 +192,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme ...@@ -189,6 +192,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
//更新借支单归还金额 //更新借支单归还金额
supCost.setCompensate(supCost.getCompensate().add(payPlan.getPlanAmount())); supCost.setCompensate(supCost.getCompensate().add(payPlan.getPlanAmount()));
supCost.setLastModifyDate(LocalDateTime.now());
costDao.updateById(supCost); costDao.updateById(supCost);
} }
} }
...@@ -235,6 +239,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme ...@@ -235,6 +239,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
//更新借支单申请归还金额 //更新借支单申请归还金额
supCost.setRepaymentAppliedAmount(supCost.getRepaymentAppliedAmount().add(lendBalance)); supCost.setRepaymentAppliedAmount(supCost.getRepaymentAppliedAmount().add(lendBalance));
supCost.setLastModifyDate(LocalDateTime.now());
costDao.updateById(supCost); costDao.updateById(supCost);
log.info("1、冲销 0,还大于0 ==== 生成一张收款的借还单: " + costDomain); log.info("1、冲销 0,还大于0 ==== 生成一张收款的借还单: " + costDomain);
......
...@@ -43,6 +43,7 @@ import java.io.File; ...@@ -43,6 +43,7 @@ import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.*; import java.util.*;
@Service @Service
...@@ -381,6 +382,7 @@ public class BuyServiceImpl implements BuyService { ...@@ -381,6 +382,7 @@ public class BuyServiceImpl implements BuyService {
costDao.insert(backCost); costDao.insert(backCost);
costLogService.save(backCost.getCostNo(), updateUserId, "采购单【" + buyListDto.getBuyno() + "】冲销借支单【" + linkLendCost.getCostNo() + "】时由系统自动生成"); costLogService.save(backCost.getCostNo(), updateUserId, "采购单【" + buyListDto.getBuyno() + "】冲销借支单【" + linkLendCost.getCostNo() + "】时由系统自动生成");
linkLendCost.setLastModifyDate(LocalDateTime.now());
costDao.update(linkLendCost, new LambdaQueryWrapper<CostDomain>() costDao.update(linkLendCost, new LambdaQueryWrapper<CostDomain>()
.eq(CostDomain::getCostNo, linkLendCost.getCostNo())); .eq(CostDomain::getCostNo, linkLendCost.getCostNo()));
costLogService.save(linkLendCost.getCostNo(), updateUserId, "财务审核:" + result); costLogService.save(linkLendCost.getCostNo(), updateUserId, "财务审核:" + result);
......
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