大屏项目初始化
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
package com.mini.mybigscreen.Job;
|
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.ErpTransactionFlow;
|
||||||
import com.mini.mybigscreen.biz.domain.IndexInfo;
|
import com.mini.mybigscreen.biz.domain.IndexInfo;
|
||||||
import com.mini.mybigscreen.biz.service.ErpTransactionFlowService;
|
import com.mini.mybigscreen.biz.service.ErpTransactionFlowService;
|
||||||
@@ -30,9 +30,9 @@ public class erpJobs {
|
|||||||
public void updateErpIndex() {
|
public void updateErpIndex() {
|
||||||
try {
|
try {
|
||||||
final BigDecimal BUDGET_AMOUNT = new BigDecimal("4000");
|
final BigDecimal BUDGET_AMOUNT = new BigDecimal("4000");
|
||||||
QueryWrapper<ErpTransactionFlow> query = new QueryWrapper<>();
|
LambdaQueryWrapper<ErpTransactionFlow> query = new LambdaQueryWrapper<ErpTransactionFlow>()
|
||||||
query.eq("year_date", DateUtils.getCurrentYear())
|
.eq(ErpTransactionFlow::getYearDate, DateUtils.getCurrentYear())
|
||||||
.eq("month_date", DateUtils.getCurrentMonth());
|
.eq(ErpTransactionFlow::getMonthDate, DateUtils.getCurrentMonth());
|
||||||
List<ErpTransactionFlow> flowList = flowService.list(query);
|
List<ErpTransactionFlow> flowList = flowService.list(query);
|
||||||
BigDecimal incomeAmount = flowList.stream()
|
BigDecimal incomeAmount = flowList.stream()
|
||||||
.filter(flow -> flow.getTransactionType().equals("2"))
|
.filter(flow -> flow.getTransactionType().equals("2"))
|
||||||
@@ -71,8 +71,8 @@ public class erpJobs {
|
|||||||
"ERP_006",
|
"ERP_006",
|
||||||
};
|
};
|
||||||
for (String index : indexList) {
|
for (String index : indexList) {
|
||||||
QueryWrapper<IndexInfo> queryWrapper = new QueryWrapper<>();
|
LambdaQueryWrapper<IndexInfo> queryWrapper = new LambdaQueryWrapper<IndexInfo>();
|
||||||
queryWrapper.eq("module_code", index);
|
queryWrapper.eq(IndexInfo::getModuleCode, index);
|
||||||
IndexInfo indexInfo = infoService.getOne(queryWrapper);
|
IndexInfo indexInfo = infoService.getOne(queryWrapper);
|
||||||
if (index.equals("ERP_001")) {
|
if (index.equals("ERP_001")) {
|
||||||
indexInfo.setValue(incomeAmount);
|
indexInfo.setValue(incomeAmount);
|
||||||
|
|||||||
11
src/main/java/com/mini/mybigscreen/Model/ItemEntity.java
Normal file
11
src/main/java/com/mini/mybigscreen/Model/ItemEntity.java
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
package com.mini.mybigscreen.Model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ItemEntity implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -25,7 +25,7 @@ import lombok.Setter;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@TableName("erp_transaction_flow_view")
|
@TableName("erp_transaction_flow_view")
|
||||||
public class ErpTransactionFlow extends BaseEntity implements Serializable {
|
public class ErpTransactionFlow extends BaseEntity implements Serializable {
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@@ -104,4 +104,11 @@ public class ErpTransactionFlow extends BaseEntity implements Serializable {
|
|||||||
|
|
||||||
@TableField("tran_type")
|
@TableField("tran_type")
|
||||||
private String tranType;
|
private String tranType;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField("year_date")
|
||||||
|
private String yearDate;
|
||||||
|
|
||||||
|
@TableField("month_date")
|
||||||
|
private String monthDate;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user