Merge remote-tracking branch 'origin/master'

This commit is contained in:
hongchao 2025-09-08 18:02:32 +08:00
commit 77623fb534
3 changed files with 14 additions and 6 deletions

View File

@ -30,7 +30,7 @@ public class InformMonthly {
* - 星期?表示星期由于每月第一天的星期不固定因此使用?表示
* - 年份不指定年份表示每年都执行
*/
@Scheduled(cron = "0 0 1 * * ?")
//@Scheduled(cron = "0 0 1 * * ?")
public void taskCycle() {
System.out.println("使用SpringMVC框架配置定时任务");
try {

View File

@ -1303,14 +1303,22 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
// 计算租赁天数
long leaseDays = calculateDaysBetween(calcStartTime, calcEndTime);
// 计算租赁费用
BigDecimal leaseCost = BigDecimal.ZERO;
if (result.getComsumable() != null && result.getComsumable() == 1) {
Date startTime =result.getStartTime();
long startDays = calculateDaysBetween(startTime, calcEndTime);
if (result.getNum() == null) {
result.setNum(BigDecimal.ZERO);
}
// 消耗性物资直接计算购置价
result.setConsumeCost(result.getNum().multiply(Optional.ofNullable(result.getBuyPrice()).orElse(BigDecimal.ZERO)));
if(startDays >0) {
// 消耗性物资直接计算购置价
result.setConsumeCost(result.getNum().multiply(Optional.ofNullable(result.getBuyPrice()).orElse(BigDecimal.ZERO)));
}
}
if (result.getNum() != null && result.getLeasePrice() != null && leaseDays >= 1) {
// 非消耗性物资按照租赁单价计算租赁费用
@ -1456,7 +1464,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
Calendar endCal = Calendar.getInstance();
endCal.setTime(endDate);
// 将结束时间设为当天00:00:00.000
// 将结束时间设为当天00:00:00.000
endCal.set(Calendar.HOUR_OF_DAY, 0);
endCal.set(Calendar.MINUTE, 0);
endCal.set(Calendar.SECOND, 0);

View File

@ -434,8 +434,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.leasePrice},
#{item.leaseCost},
#{item.taskId},
null,
0.00,
#{item.buyPrice},
#{item.consumeCost},
#{item.equipmentType}
)
</foreach>