大屏项目初始化

This commit is contained in:
2026-03-11 23:09:00 +08:00
parent 0763e1cc40
commit f3bb1ba118
3 changed files with 25 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
package com.mini.mybigscreen.Job;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mini.mybigscreen.biz.domain.ErpTransactionFlow;
import com.mini.mybigscreen.biz.domain.IndexInfo;
import com.mini.mybigscreen.biz.service.ErpTransactionFlowService;
@@ -30,9 +30,9 @@ public class erpJobs {
public void updateErpIndex() {
try {
final BigDecimal BUDGET_AMOUNT = new BigDecimal("4000");
QueryWrapper<ErpTransactionFlow> query = new QueryWrapper<>();
query.eq("year_date", DateUtils.getCurrentYear())
.eq("month_date", DateUtils.getCurrentMonth());
LambdaQueryWrapper<ErpTransactionFlow> query = new LambdaQueryWrapper<ErpTransactionFlow>()
.eq(ErpTransactionFlow::getYearDate, DateUtils.getCurrentYear())
.eq(ErpTransactionFlow::getMonthDate, DateUtils.getCurrentMonth());
List<ErpTransactionFlow> flowList = flowService.list(query);
BigDecimal incomeAmount = flowList.stream()
.filter(flow -> flow.getTransactionType().equals("2"))
@@ -71,8 +71,8 @@ public class erpJobs {
"ERP_006",
};
for (String index : indexList) {
QueryWrapper<IndexInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("module_code", index);
LambdaQueryWrapper<IndexInfo> queryWrapper = new LambdaQueryWrapper<IndexInfo>();
queryWrapper.eq(IndexInfo::getModuleCode, index);
IndexInfo indexInfo = infoService.getOne(queryWrapper);
if (index.equals("ERP_001")) {
indexInfo.setValue(incomeAmount);

View File

@@ -0,0 +1,11 @@
package com.mini.mybigscreen.Model;
import lombok.Data;
import java.io.Serializable;
@Data
public class ItemEntity implements Serializable {
}

View File

@@ -25,7 +25,7 @@ import lombok.Setter;
@Getter
@Setter
@TableName("erp_transaction_flow_view")
public class ErpTransactionFlow extends BaseEntity implements Serializable {
public class ErpTransactionFlow extends BaseEntity implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@@ -104,4 +104,11 @@ public class ErpTransactionFlow extends BaseEntity implements Serializable {
@TableField("tran_type")
private String tranType;
@TableField("year_date")
private String yearDate;
@TableField("month_date")
private String monthDate;
}