1.0.42.0:

市场项目预算保存和更新功能完成;
研发项目预算保存功能完成
dev
xs 3 weeks ago
parent a21088dd07
commit 05d13e3ac1

@ -130,7 +130,7 @@ public class ErpBudgetInfoController extends BaseController {
@SaCheckPermission("oa:erp/budgetInfo:list")
@GetMapping("/listProjectInfo")
public TableDataInfo<ErpProjectInfoVo> listProjectInfo(ErpProjectInfoBo bo, PageQuery pageQuery) {
return erpProjectInfoService.queryPageList(bo, pageQuery);
return erpProjectInfoService.queryPageList4Select(bo, pageQuery);
}
/**

@ -7,6 +7,7 @@ import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
import java.util.List;
/**
* erp_budget_info
@ -165,4 +166,100 @@ public class ErpBudgetInfo extends TenantEntity {
private String delFlag;
@TableField(exist = false)
private List<ErpBudgetDetail> erpBudgetDetailList;
@TableField(exist = false)
private List<ErpBudgetMaterialCost> erpBudgetMaterialCostList;
@TableField(exist = false)
private List<ErpBudgetLaborCost> erpBudgetLaborCostList;
@TableField(exist = false)
private List<ErpBudgetInstallCost> erpBudgetInstallCostList;
@TableField(exist = false)
private List<ErpBudgetTravelCost> erpBudgetTravelCostList;
@TableField(exist = false)
private List<ErpBudgetOtherCost> erpBudgetOtherCostList;
@TableField(exist = false)
private List<Long> toDeletedMaterialCostIdList;
@TableField(exist = false)
private List<Long> toDeletedLaborCostIdList;
@TableField(exist = false)
private List<Long> toDeletedInstallCostIdList;
@TableField(exist = false)
private List<Long> toDeletedTravelCostIdList;
@TableField(exist = false)
private List<Long> toDeletedOtherCostIdList;
@TableField(exist = false)
private List<ErpRdBudgetEquipmentCost> erpRdBudgetEquipmentCostList;
@TableField(exist = false)
private List<ErpRdBudgetMaterialCost> erpRdBudgetMaterialCostList;
@TableField(exist = false)
private List<ErpRdBudgetTravelCost> erpRdBudgetTravelCostList;
@TableField(exist = false)
private List<ErpRdBudgetMeetingCost> erpRdBudgetMeetingCostList;
@TableField(exist = false)
private List<ErpRdBudgetExchangeCost> erpRdBudgetExchangeCostList;
@TableField(exist = false)
private List<ErpRdBudgetTechCost> erpRdBudgetTechCostList;
@TableField(exist = false)
private List<ErpRdBudgetLaborCost> erpRdBudgetLaborCostList;
@TableField(exist = false)
private List<ErpRdBudgetLiteratureCost> erpRdBudgetLiteratureCostList;
@TableField(exist = false)
private List<ErpRdBudgetTestingCost> erpRdBudgetTestingCostList;
@TableField(exist = false)
private List<ErpRdBudgetOtherCost> erpRdBudgetOtherCostList;
@TableField(exist = false)
private List<Long> toDeletedRdEquipmentCostIdList;
@TableField(exist = false)
private List<Long> toDeletedRdMaterialCostIdList;
@TableField(exist = false)
private List<Long> toDeletedRdTravelCostIdList;
@TableField(exist = false)
private List<Long> toDeletedRdMeetingCostIdList;
@TableField(exist = false)
private List<Long> toDeletedRdExchangeCostIdList;
@TableField(exist = false)
private List<Long> toDeletedRdTechCostIdList;
@TableField(exist = false)
private List<Long> toDeletedRdLaborCostIdList;
@TableField(exist = false)
private List<Long> toDeletedRdLiteratureCostIdList;
@TableField(exist = false)
private List<Long> toDeletedRdTestingCostIdList;
@TableField(exist = false)
private List<Long> toDeletedRdOtherCostIdList;
}

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_budget_install_cost
@ -50,22 +51,28 @@ public class ErpBudgetInstallCost extends TenantEntity {
/**
*
*/
private Long cumulativeTime;
private BigDecimal cumulativeTime;
/**
* %
*/
private Long monthRate;
private BigDecimal monthRate;
/**
* /
*/
private Long artificialStandard;
private BigDecimal artificialStandard;
/**
*
*/
private Long price;
private BigDecimal price;
/**
*
*/
private String reducePersonnelCategory;
/**
*
@ -75,22 +82,22 @@ public class ErpBudgetInstallCost extends TenantEntity {
/**
*
*/
private Long reduceCumulativeTime;
private BigDecimal reduceCumulativeTime;
/**
* %
*/
private Long reduceMonthRate;
private BigDecimal reduceMonthRate;
/**
* /
*/
private Long reduceArtificialStandard;
private BigDecimal reduceArtificialStandard;
/**
*
*/
private Long reducePrice;
private BigDecimal reducePrice;
/**
*

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_budget_labor_cost
@ -50,22 +51,22 @@ public class ErpBudgetLaborCost extends TenantEntity {
/**
*
*/
private Long cumulativeTime;
private BigDecimal cumulativeTime;
/**
* %100
*/
private Long monthRate;
private BigDecimal monthRate;
/**
* /
*/
private Long artificialStandard;
private BigDecimal artificialStandard;
/**
*
*/
private Long price;
private BigDecimal price;
/**
* ,sys_dict_datadict_value
@ -80,22 +81,22 @@ public class ErpBudgetLaborCost extends TenantEntity {
/**
*
*/
private Long reduceCumulativeTime;
private BigDecimal reduceCumulativeTime;
/**
* %
*/
private Long reduceMonthRate;
private BigDecimal reduceMonthRate;
/**
* /
*/
private Long reduceArtificialStandard;
private BigDecimal reduceArtificialStandard;
/**
*
*/
private Long reducePrice;
private BigDecimal reducePrice;
/**
*

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_budget_material_cost
@ -70,32 +71,32 @@ public class ErpBudgetMaterialCost extends TenantEntity {
/**
* ()
*/
private Long unitPrice;
private BigDecimal unitPrice;
/**
*
*/
private Long amount;
private BigDecimal amount;
/**
*
*/
private Long price;
private BigDecimal price;
/**
* ()
*/
private Long reduceUnitPrice;
private BigDecimal reduceUnitPrice;
/**
*
*/
private Long reduceAmount;
private BigDecimal reduceAmount;
/**
*
*/
private Long reducePrice;
private BigDecimal reducePrice;
/**
*

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_budget_other_cost
@ -45,7 +46,7 @@ public class ErpBudgetOtherCost extends TenantEntity {
/**
*
*/
private Long price;
private BigDecimal price;
/**
*
@ -55,7 +56,7 @@ public class ErpBudgetOtherCost extends TenantEntity {
/**
*
*/
private Long reducePrice;
private BigDecimal reducePrice;
/**
*

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_budget_travel_cost
@ -60,32 +61,47 @@ public class ErpBudgetTravelCost extends TenantEntity {
/**
*
*/
private Long days;
private BigDecimal days;
/**
* 宿
*/
private Long stayStandard;
private BigDecimal stayStandard;
/**
*
*/
private Long travelExpenses;
private BigDecimal travelExpenses;
/**
* 宿
*/
private Long stayCosts;
private BigDecimal stayCosts;
/**
*
*/
private Long subsidyCosts;
private BigDecimal subsidyCosts;
/**
*
*/
private Long subtotalCosts;
private BigDecimal subtotalCosts;
/**
*
*/
private Long reduceSortOrder;
/**
*
*/
private String reduceTripLocation;
/**
*
*/
private String reduceReason;
/**
*
@ -100,32 +116,32 @@ public class ErpBudgetTravelCost extends TenantEntity {
/**
*
*/
private Long reduceDayNumber;
private BigDecimal reduceDayNumber;
/**
* 宿
*/
private Long reduceStayStandard;
private BigDecimal reduceStayStandard;
/**
*
*/
private Long reduceTravelExpenses;
private BigDecimal reduceTravelExpenses;
/**
* 宿
*/
private Long reduceStayCosts;
private BigDecimal reduceStayCosts;
/**
*
*/
private Long reduceSubsidyCosts;
private BigDecimal reduceSubsidyCosts;
/**
*
*/
private Long reduceSubtotalCosts;
private BigDecimal reduceSubtotalCosts;
/**
*

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_rd_budget_equipment_cost
@ -50,17 +51,17 @@ public class ErpRdBudgetEquipmentCost extends TenantEntity {
/**
* (/)
*/
private Long unitPrice;
private BigDecimal unitPrice;
/**
* ()
*/
private Long amount;
private BigDecimal amount;
/**
*
*/
private Long price;
private BigDecimal price;
/**
*

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_rd_budget_exchange_cost
@ -60,22 +61,22 @@ public class ErpRdBudgetExchangeCost extends TenantEntity {
/**
*
*/
private Long days;
private BigDecimal days;
/**
* 宿()
*/
private Long travelAccommodationExpense;
private BigDecimal travelAccommodationExpense;
/**
*
*/
private Long subsidy;
private BigDecimal subsidy;
/**
*
*/
private Long price;
private BigDecimal price;
/**
*

@ -1,11 +1,13 @@
package org.dromara.oa.erp.domain;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.tenant.core.TenantEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_rd_budget_labor_cost
@ -55,22 +57,22 @@ public class ErpRdBudgetLaborCost extends TenantEntity {
/**
*
*/
private Long cumulativeTime;
private BigDecimal cumulativeTime;
/**
* %
*/
private Long monthRate;
private BigDecimal monthRate;
/**
* /
*/
private Long artificialStandard;
private BigDecimal artificialStandard;
/**
*
*/
private Long price;
private BigDecimal price;
/**
* ,
@ -94,4 +96,10 @@ public class ErpRdBudgetLaborCost extends TenantEntity {
private String delFlag;
public String[] getProjectPersonnelArray(){
if(StringUtils.isNotEmpty(projectPersonnel)){
return projectPersonnel.split(",");
}
return null;
}
}

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_rd_budget_literature_cost
@ -50,7 +51,7 @@ public class ErpRdBudgetLiteratureCost extends TenantEntity {
/**
*
*/
private Long price;
private BigDecimal price;
/**
*

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_rd_budget_material_cost
@ -42,6 +43,11 @@ public class ErpRdBudgetMaterialCost extends TenantEntity {
*/
private String materialName;
/**
*
*/
private String materialType;
/**
* ,base_unit_info
*/
@ -55,17 +61,17 @@ public class ErpRdBudgetMaterialCost extends TenantEntity {
/**
* (/)
*/
private Long unitPrice;
private BigDecimal unitPrice;
/**
*
*/
private Long amount;
private BigDecimal amount;
/**
*
*/
private Long price;
private BigDecimal price;
/**
*

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_rd_budget_meeting_cost
@ -50,22 +51,22 @@ public class ErpRdBudgetMeetingCost extends TenantEntity {
/**
* ()
*/
private Long rentalFee;
private BigDecimal rentalFee;
/**
* ()
*/
private Long dailyExpense;
private BigDecimal dailyExpense;
/**
*
*/
private Long days;
private BigDecimal days;
/**
* 宿()
*/
private Long expertExpense;
private BigDecimal expertExpense;
/**
*
@ -75,12 +76,12 @@ public class ErpRdBudgetMeetingCost extends TenantEntity {
/**
* ()
*/
private Long perPersonExpense;
private BigDecimal perPersonExpense;
/**
*
*/
private Long meetingPrice;
private BigDecimal meetingPrice;
/**
*

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_rd_budget_other_cost
@ -45,7 +46,7 @@ public class ErpRdBudgetOtherCost extends TenantEntity {
/**
*
*/
private Long price;
private BigDecimal price;
/**
*

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_rd_budget_tech_cost
@ -65,7 +66,7 @@ public class ErpRdBudgetTechCost extends TenantEntity {
/**
*
*/
private Long days;
private BigDecimal days;
/**
*
@ -75,7 +76,7 @@ public class ErpRdBudgetTechCost extends TenantEntity {
/**
*
*/
private Long price;
private BigDecimal price;
/**
*

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_rd_budget_testing_cost
@ -60,17 +61,17 @@ public class ErpRdBudgetTestingCost extends TenantEntity {
/**
* (/)
*/
private Long unitPrice;
private BigDecimal unitPrice;
/**
*
*/
private Long amount;
private BigDecimal amount;
/**
*
*/
private Long price;
private BigDecimal price;
/**
*

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.math.BigDecimal;
/**
* erp_rd_budget_travel_cost
@ -60,32 +61,32 @@ public class ErpRdBudgetTravelCost extends TenantEntity {
/**
*
*/
private Long days;
private BigDecimal days;
/**
* 宿
*/
private Long stayStandard;
private BigDecimal stayStandard;
/**
*
*/
private Long travelExpenses;
private BigDecimal travelExpenses;
/**
* 宿
*/
private Long stayCosts;
private BigDecimal stayCosts;
/**
*
*/
private Long subsidyCosts;
private BigDecimal subsidyCosts;
/**
*
*/
private Long subtotalCosts;
private BigDecimal subtotalCosts;
/**
*

@ -1,5 +1,6 @@
package org.dromara.oa.erp.domain.bo;
import com.baomidou.mybatisplus.annotation.TableField;
import org.dromara.oa.erp.domain.*;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
@ -174,4 +175,52 @@ public class ErpBudgetInfoBo extends BaseEntity {
private List<ErpBudgetTravelCost> erpBudgetTravelCostList;
private List<ErpBudgetOtherCost> erpBudgetOtherCostList;
private List<Long> toDeletedMaterialCostIdList;
private List<Long> toDeletedLaborCostIdList;
private List<Long> toDeletedInstallCostIdList;
private List<Long> toDeletedTravelCostIdList;
private List<Long> toDeletedOtherCostIdList;
private List<ErpRdBudgetEquipmentCost> erpRdBudgetEquipmentCostList;
private List<ErpRdBudgetMaterialCost> erpRdBudgetMaterialCostList;
private List<ErpRdBudgetTravelCost> erpRdBudgetTravelCostList;
private List<ErpRdBudgetMeetingCost> erpRdBudgetMeetingCostList;
private List<ErpRdBudgetExchangeCost> erpRdBudgetExchangeCostList;
private List<ErpRdBudgetTechCost> erpRdBudgetTechCostList;
private List<ErpRdBudgetLaborCost> erpRdBudgetLaborCostList;
private List<ErpRdBudgetLiteratureCost> erpRdBudgetLiteratureCostList;
private List<ErpRdBudgetTestingCost> erpRdBudgetTestingCostList;
private List<ErpRdBudgetOtherCost> erpRdBudgetOtherCostList;
private List<Long> toDeletedRdEquipmentCostIdList;
private List<Long> toDeletedRdMaterialCostIdList;
private List<Long> toDeletedRdTravelCostIdList;
private List<Long> toDeletedRdMeetingCostIdList;
private List<Long> toDeletedRdExchangeCostIdList;
private List<Long> toDeletedRdTechCostIdList;
private List<Long> toDeletedRdLaborCostIdList;
private List<Long> toDeletedRdLiteratureCostIdList;
private List<Long> toDeletedRdTestingCostIdList;
private List<Long> toDeletedRdOtherCostIdList;
}

@ -1,5 +1,6 @@
package org.dromara.oa.erp.domain.bo;
import cn.idev.excel.annotation.ExcelProperty;
import org.dromara.oa.erp.domain.ErpBudgetInstallCost;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
@ -9,6 +10,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_budget_install_cost
*
@ -50,22 +53,27 @@ public class ErpBudgetInstallCostBo extends BaseEntity {
/**
*
*/
private Long cumulativeTime;
private BigDecimal cumulativeTime;
/**
* %
*/
private Long monthRate;
private BigDecimal monthRate;
/**
* /
*/
private Long artificialStandard;
private BigDecimal artificialStandard;
/**
*
*/
private Long price;
private BigDecimal price;
/**
*
*/
private String reducePersonnelCategory;
/**
*
@ -75,22 +83,22 @@ public class ErpBudgetInstallCostBo extends BaseEntity {
/**
*
*/
private Long reduceCumulativeTime;
private BigDecimal reduceCumulativeTime;
/**
* %
*/
private Long reduceMonthRate;
private BigDecimal reduceMonthRate;
/**
* /
*/
private Long reduceArtificialStandard;
private BigDecimal reduceArtificialStandard;
/**
*
*/
private Long reducePrice;
private BigDecimal reducePrice;
/**
*

@ -9,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_budget_labor_cost
*
@ -50,22 +52,22 @@ public class ErpBudgetLaborCostBo extends BaseEntity {
/**
*
*/
private Long cumulativeTime;
private BigDecimal cumulativeTime;
/**
* %100
*/
private Long monthRate;
private BigDecimal monthRate;
/**
* /
*/
private Long artificialStandard;
private BigDecimal artificialStandard;
/**
*
*/
private Long price;
private BigDecimal price;
/**
* ,sys_dict_datadict_value
@ -80,22 +82,22 @@ public class ErpBudgetLaborCostBo extends BaseEntity {
/**
*
*/
private Long reduceCumulativeTime;
private BigDecimal reduceCumulativeTime;
/**
* %
*/
private Long reduceMonthRate;
private BigDecimal reduceMonthRate;
/**
* /
*/
private Long reduceArtificialStandard;
private BigDecimal reduceArtificialStandard;
/**
*
*/
private Long reducePrice;
private BigDecimal reducePrice;
/**
*

@ -9,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_budget_material_cost
*
@ -70,32 +72,32 @@ public class ErpBudgetMaterialCostBo extends BaseEntity {
/**
* ()
*/
private Long unitPrice;
private BigDecimal unitPrice;
/**
*
*/
private Long amount;
private BigDecimal amount;
/**
*
*/
private Long price;
private BigDecimal price;
/**
* ()
*/
private Long reduceUnitPrice;
private BigDecimal reduceUnitPrice;
/**
*
*/
private Long reduceAmount;
private BigDecimal reduceAmount;
/**
*
*/
private Long reducePrice;
private BigDecimal reducePrice;
/**
*

@ -9,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_budget_other_cost
*
@ -45,7 +47,7 @@ public class ErpBudgetOtherCostBo extends BaseEntity {
/**
*
*/
private Long price;
private BigDecimal price;
/**
*
@ -55,7 +57,7 @@ public class ErpBudgetOtherCostBo extends BaseEntity {
/**
*
*/
private Long reducePrice;
private BigDecimal reducePrice;
/**
*

@ -9,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_budget_travel_cost
*
@ -60,38 +62,53 @@ public class ErpBudgetTravelCostBo extends BaseEntity {
/**
*
*/
private Long days;
private BigDecimal days;
/**
* 宿
*/
private Long stayStandard;
private BigDecimal stayStandard;
/**
*
*/
private Long travelExpenses;
private BigDecimal travelExpenses;
/**
* 宿
*/
private Long stayCosts;
private BigDecimal stayCosts;
/**
*
*/
private Long subsidyCosts;
private BigDecimal subsidyCosts;
/**
*
*/
private Long subtotalCosts;
private BigDecimal subtotalCosts;
/**
*
*/
private Long reduceSortOrder;
/**
*
*/
private Long reduceFrequency;
/**
*
*/
private String reduceTripLocation;
/**
*
*/
private String reduceReason;
/**
*
*/
@ -100,32 +117,32 @@ public class ErpBudgetTravelCostBo extends BaseEntity {
/**
*
*/
private Long reduceDayNumber;
private BigDecimal reduceDayNumber;
/**
* 宿
*/
private Long reduceStayStandard;
private BigDecimal reduceStayStandard;
/**
*
*/
private Long reduceTravelExpenses;
private BigDecimal reduceTravelExpenses;
/**
* 宿
*/
private Long reduceStayCosts;
private BigDecimal reduceStayCosts;
/**
*
*/
private Long reduceSubsidyCosts;
private BigDecimal reduceSubsidyCosts;
/**
*
*/
private Long reduceSubtotalCosts;
private BigDecimal reduceSubtotalCosts;
/**
*

@ -9,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_rd_budget_equipment_cost
*
@ -50,17 +52,17 @@ public class ErpRdBudgetEquipmentCostBo extends BaseEntity {
/**
* (/)
*/
private Long unitPrice;
private BigDecimal unitPrice;
/**
* ()
*/
private Long amount;
private BigDecimal amount;
/**
*
*/
private Long price;
private BigDecimal price;
/**
*

@ -9,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_rd_budget_exchange_cost
*
@ -60,22 +62,22 @@ public class ErpRdBudgetExchangeCostBo extends BaseEntity {
/**
*
*/
private Long days;
private BigDecimal days;
/**
* 宿()
*/
private Long travelAccommodationExpense;
private BigDecimal travelAccommodationExpense;
/**
*
*/
private Long subsidy;
private BigDecimal subsidy;
/**
*
*/
private Long price;
private BigDecimal price;
/**
*

@ -9,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_rd_budget_labor_cost
*
@ -57,22 +59,22 @@ public class ErpRdBudgetLaborCostBo extends BaseEntity {
/**
*
*/
private Long cumulativeTime;
private BigDecimal cumulativeTime;
/**
* %
*/
private Long monthRate;
private BigDecimal monthRate;
/**
* /
*/
private Long artificialStandard;
private BigDecimal artificialStandard;
/**
*
*/
private Long price;
private BigDecimal price;
/**
* ,

@ -9,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_rd_budget_literature_cost
*
@ -50,7 +52,7 @@ public class ErpRdBudgetLiteratureCostBo extends BaseEntity {
/**
*
*/
private Long price;
private BigDecimal price;
/**
*

@ -9,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_rd_budget_material_cost
*
@ -42,6 +44,12 @@ public class ErpRdBudgetMaterialCostBo extends BaseEntity {
*/
private String materialName;
/**
*
*/
private String materialType;
/**
* ,base_unit_info
*/
@ -55,17 +63,17 @@ public class ErpRdBudgetMaterialCostBo extends BaseEntity {
/**
* (/)
*/
private Long unitPrice;
private BigDecimal unitPrice;
/**
*
*/
private Long amount;
private BigDecimal amount;
/**
*
*/
private Long price;
private BigDecimal price;
/**
*

@ -9,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_rd_budget_meeting_cost
*
@ -50,22 +52,22 @@ public class ErpRdBudgetMeetingCostBo extends BaseEntity {
/**
* ()
*/
private Long rentalFee;
private BigDecimal rentalFee;
/**
* ()
*/
private Long dailyExpense;
private BigDecimal dailyExpense;
/**
*
*/
private Long days;
private BigDecimal days;
/**
* 宿()
*/
private Long expertExpense;
private BigDecimal expertExpense;
/**
*
@ -75,12 +77,12 @@ public class ErpRdBudgetMeetingCostBo extends BaseEntity {
/**
* ()
*/
private Long perPersonExpense;
private BigDecimal perPersonExpense;
/**
*
*/
private Long meetingPrice;
private BigDecimal meetingPrice;
/**
*

@ -9,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_rd_budget_other_cost
*
@ -45,7 +47,7 @@ public class ErpRdBudgetOtherCostBo extends BaseEntity {
/**
*
*/
private Long price;
private BigDecimal price;
/**
*

@ -9,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_rd_budget_tech_cost
*
@ -66,7 +68,7 @@ public class ErpRdBudgetTechCostBo extends BaseEntity {
/**
*
*/
private Long days;
private BigDecimal days;
/**
*
@ -76,7 +78,7 @@ public class ErpRdBudgetTechCostBo extends BaseEntity {
/**
*
*/
private Long price;
private BigDecimal price;
/**
*

@ -9,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_rd_budget_testing_cost
*
@ -60,17 +62,17 @@ public class ErpRdBudgetTestingCostBo extends BaseEntity {
/**
* (/)
*/
private Long unitPrice;
private BigDecimal unitPrice;
/**
*
*/
private Long amount;
private BigDecimal amount;
/**
*
*/
private Long price;
private BigDecimal price;
/**
*

@ -9,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
/**
* erp_rd_budget_travel_cost
*
@ -60,32 +62,32 @@ public class ErpRdBudgetTravelCostBo extends BaseEntity {
/**
*
*/
private Long days;
private BigDecimal days;
/**
* 宿
*/
private Long stayStandard;
private BigDecimal stayStandard;
/**
*
*/
private Long travelExpenses;
private BigDecimal travelExpenses;
/**
* 宿
*/
private Long stayCosts;
private BigDecimal stayCosts;
/**
*
*/
private Long subsidyCosts;
private BigDecimal subsidyCosts;
/**
*
*/
private Long subtotalCosts;
private BigDecimal subtotalCosts;
/**
*

@ -1,6 +1,6 @@
package org.dromara.oa.erp.domain.vo;
import org.dromara.oa.erp.domain.ErpBudgetInfo;
import org.dromara.oa.erp.domain.*;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
@ -12,7 +12,7 @@ import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
@ -196,4 +196,35 @@ public class ErpBudgetInfoVo implements Serializable {
private String remark;
private List<ErpBudgetDetail> erpBudgetDetailList;
private List<ErpBudgetMaterialCost> erpBudgetMaterialCostList;
private List<ErpBudgetLaborCost> erpBudgetLaborCostList;
private List<ErpBudgetInstallCost> erpBudgetInstallCostList;
private List<ErpBudgetTravelCost> erpBudgetTravelCostList;
private List<ErpBudgetOtherCost> erpBudgetOtherCostList;
private List<ErpRdBudgetEquipmentCost> erpRdBudgetEquipmentCostList;
private List<ErpRdBudgetMaterialCost> erpRdBudgetMaterialCostList;
private List<ErpRdBudgetTravelCost> erpRdBudgetTravelCostList;
private List<ErpRdBudgetMeetingCost> erpRdBudgetMeetingCostList;
private List<ErpRdBudgetExchangeCost> erpRdBudgetExchangeCostList;
private List<ErpRdBudgetTechCost> erpRdBudgetTechCostList;
private List<ErpRdBudgetLaborCost> erpRdBudgetLaborCostList;
private List<ErpRdBudgetLiteratureCost> erpRdBudgetLiteratureCostList;
private List<ErpRdBudgetTestingCost> erpRdBudgetTestingCostList;
private List<ErpRdBudgetOtherCost> erpRdBudgetOtherCostList;
}

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -63,29 +64,34 @@ public class ErpBudgetInstallCostVo implements Serializable {
*/
@ExcelProperty(value = "累计时间", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "月=")
private Long cumulativeTime;
private BigDecimal cumulativeTime;
/**
* %
*/
@ExcelProperty(value = "月平均投入比例", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "%=")
private Long monthRate;
private BigDecimal monthRate;
/**
* /
*/
@ExcelProperty(value = "人工标准", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=/人月")
private Long artificialStandard;
private BigDecimal artificialStandard;
/**
*
*/
@ExcelProperty(value = "金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long price;
private BigDecimal price;
/**
*
*/
@ExcelProperty(value = "降成本人员类别")
private String reducePersonnelCategory;
/**
*
*/
@ -97,28 +103,28 @@ public class ErpBudgetInstallCostVo implements Serializable {
*/
@ExcelProperty(value = "降成本累计时间", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "月=")
private Long reduceCumulativeTime;
private BigDecimal reduceCumulativeTime;
/**
* %
*/
@ExcelProperty(value = "降成本月平均投入比例", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "%=")
private Long reduceMonthRate;
private BigDecimal reduceMonthRate;
/**
* /
*/
@ExcelProperty(value = "降成本人工标准", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=/人月")
private Long reduceArtificialStandard;
private BigDecimal reduceArtificialStandard;
/**
*
*/
@ExcelProperty(value = "降成本降成本金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long reducePrice;
private BigDecimal reducePrice;
/**
*

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -63,28 +64,28 @@ public class ErpBudgetLaborCostVo implements Serializable {
*/
@ExcelProperty(value = "累计时间", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "月=")
private Long cumulativeTime;
private BigDecimal cumulativeTime;
/**
* %100
*/
@ExcelProperty(value = "月平均投入比例", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "%=")
private Long monthRate;
private BigDecimal monthRate;
/**
* /
*/
@ExcelProperty(value = "人工标准", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=/人月")
private Long artificialStandard;
private BigDecimal artificialStandard;
/**
*
*/
@ExcelProperty(value = "金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long price;
private BigDecimal price;
/**
* ,sys_dict_datadict_value
@ -103,28 +104,28 @@ public class ErpBudgetLaborCostVo implements Serializable {
*/
@ExcelProperty(value = "降成本累计时间", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "月=")
private Long reduceCumulativeTime;
private BigDecimal reduceCumulativeTime;
/**
* %
*/
@ExcelProperty(value = "降成本月平均投入比例", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "%=")
private Long reduceMonthRate;
private BigDecimal reduceMonthRate;
/**
* /
*/
@ExcelProperty(value = "降成本人工标准", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=/人月")
private Long reduceArtificialStandard;
private BigDecimal reduceArtificialStandard;
/**
*
*/
@ExcelProperty(value = "降成本金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long reducePrice;
private BigDecimal reducePrice;
/**
*

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -86,39 +87,39 @@ public class ErpBudgetMaterialCostVo implements Serializable {
* ()
*/
@ExcelProperty(value = "单价(元)")
private Long unitPrice;
private BigDecimal unitPrice;
/**
*
*/
@ExcelProperty(value = "购置数量")
private Long amount;
private BigDecimal amount;
/**
*
*/
@ExcelProperty(value = "金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long price;
private BigDecimal price;
/**
* ()
*/
@ExcelProperty(value = "降成本单价(元)")
private Long reduceUnitPrice;
private BigDecimal reduceUnitPrice;
/**
*
*/
@ExcelProperty(value = "降成本数量")
private Long reduceAmount;
private BigDecimal reduceAmount;
/**
*
*/
@ExcelProperty(value = "降成本金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long reducePrice;
private BigDecimal reducePrice;
/**
*

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -57,7 +58,7 @@ public class ErpBudgetOtherCostVo implements Serializable {
*/
@ExcelProperty(value = "金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long price;
private BigDecimal price;
/**
*
@ -70,7 +71,7 @@ public class ErpBudgetOtherCostVo implements Serializable {
*/
@ExcelProperty(value = "降成本金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long reducePrice;
private BigDecimal reducePrice;
/**
*

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -74,42 +75,57 @@ public class ErpBudgetTravelCostVo implements Serializable {
*
*/
@ExcelProperty(value = "天数")
private Long days;
private BigDecimal days;
/**
* 宿
*/
@ExcelProperty(value = "住宿标准", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long stayStandard;
private BigDecimal stayStandard;
/**
*
*/
@ExcelProperty(value = "往返路费", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long travelExpenses;
private BigDecimal travelExpenses;
/**
* 宿
*/
@ExcelProperty(value = "住宿费", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long stayCosts;
private BigDecimal stayCosts;
/**
*
*/
@ExcelProperty(value = "补贴", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long subsidyCosts;
private BigDecimal subsidyCosts;
/**
*
*/
@ExcelProperty(value = "小计", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long subtotalCosts;
private BigDecimal subtotalCosts;
/**
*
*/
private Long reduceSortOrder;
/**
*
*/
private String reduceTripLocation;
/**
*
*/
private String reduceReason;
/**
*
@ -127,42 +143,42 @@ public class ErpBudgetTravelCostVo implements Serializable {
*
*/
@ExcelProperty(value = "降成本天数")
private Long reduceDayNumber;
private BigDecimal reduceDayNumber;
/**
* 宿
*/
@ExcelProperty(value = "降成本住宿标准", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long reduceStayStandard;
private BigDecimal reduceStayStandard;
/**
*
*/
@ExcelProperty(value = "降成本往返路费", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long reduceTravelExpenses;
private BigDecimal reduceTravelExpenses;
/**
* 宿
*/
@ExcelProperty(value = "降成本住宿费", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long reduceStayCosts;
private BigDecimal reduceStayCosts;
/**
*
*/
@ExcelProperty(value = "降成本补贴", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long reduceSubsidyCosts;
private BigDecimal reduceSubsidyCosts;
/**
*
*/
@ExcelProperty(value = "降成本小计", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long reduceSubtotalCosts;
private BigDecimal reduceSubtotalCosts;
/**
*

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -62,20 +63,20 @@ public class ErpRdBudgetEquipmentCostVo implements Serializable {
* (/)
*/
@ExcelProperty(value = "单价(元/台件)")
private Long unitPrice;
private BigDecimal unitPrice;
/**
* ()
*/
@ExcelProperty(value = "数量(台件)")
private Long amount;
private BigDecimal amount;
/**
*
*/
@ExcelProperty(value = "金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long price;
private BigDecimal price;
/**
*

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -76,27 +77,27 @@ public class ErpRdBudgetExchangeCostVo implements Serializable {
*/
@ExcelProperty(value = "时间", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "天=")
private Long days;
private BigDecimal days;
/**
* 宿()
*/
@ExcelProperty(value = "往返路费及住宿费(元)")
private Long travelAccommodationExpense;
private BigDecimal travelAccommodationExpense;
/**
*
*/
@ExcelProperty(value = "补贴", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long subsidy;
private BigDecimal subsidy;
/**
*
*/
@ExcelProperty(value = "小计", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long price;
private BigDecimal price;
/**
*

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -69,28 +70,28 @@ public class ErpRdBudgetLaborCostVo implements Serializable {
*/
@ExcelProperty(value = "累计时间", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "月=")
private Long cumulativeTime;
private BigDecimal cumulativeTime;
/**
* %
*/
@ExcelProperty(value = "月平均投入比例", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "%=")
private Long monthRate;
private BigDecimal monthRate;
/**
* /
*/
@ExcelProperty(value = "人工标准", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=/人月")
private Long artificialStandard;
private BigDecimal artificialStandard;
/**
*
*/
@ExcelProperty(value = "金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long price;
private BigDecimal price;
/**
* ,

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -64,7 +65,7 @@ public class ErpRdBudgetLiteratureCostVo implements Serializable {
*/
@ExcelProperty(value = "金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long price;
private BigDecimal price;
/**
*

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -52,6 +53,12 @@ public class ErpRdBudgetMaterialCostVo implements Serializable {
@ExcelProperty(value = "材料名称")
private String materialName;
/**
*
*/
@ExcelProperty(value = "材料类型")
private String materialType;
/**
* ,base_unit_info
*/
@ -68,20 +75,20 @@ public class ErpRdBudgetMaterialCostVo implements Serializable {
* (/)
*/
@ExcelProperty(value = "单价(元/台件)")
private Long unitPrice;
private BigDecimal unitPrice;
/**
*
*/
@ExcelProperty(value = "数量")
private Long amount;
private BigDecimal amount;
/**
*
*/
@ExcelProperty(value = "金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long price;
private BigDecimal price;
/**
*

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -62,25 +63,25 @@ public class ErpRdBudgetMeetingCostVo implements Serializable {
* ()
*/
@ExcelProperty(value = "场地日租金(元)")
private Long rentalFee;
private BigDecimal rentalFee;
/**
* ()
*/
@ExcelProperty(value = "日均杂费(元)")
private Long dailyExpense;
private BigDecimal dailyExpense;
/**
*
*/
@ExcelProperty(value = "天数")
private Long days;
private BigDecimal days;
/**
* 宿()
*/
@ExcelProperty(value = "专家交通住宿费(元)")
private Long expertExpense;
private BigDecimal expertExpense;
/**
*
@ -92,14 +93,14 @@ public class ErpRdBudgetMeetingCostVo implements Serializable {
* ()
*/
@ExcelProperty(value = "人均花费(元)")
private Long perPersonExpense;
private BigDecimal perPersonExpense;
/**
*
*/
@ExcelProperty(value = "会议费", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long meetingPrice;
private BigDecimal meetingPrice;
/**
*

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -57,7 +58,7 @@ public class ErpRdBudgetOtherCostVo implements Serializable {
*/
@ExcelProperty(value = "金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long price;
private BigDecimal price;
/**
*

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -80,7 +81,7 @@ public class ErpRdBudgetTechCostVo implements Serializable {
*
*/
@ExcelProperty(value = "天数")
private Long days;
private BigDecimal days;
/**
*
@ -93,7 +94,7 @@ public class ErpRdBudgetTechCostVo implements Serializable {
*/
@ExcelProperty(value = "金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long price;
private BigDecimal price;
/**
*

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -74,20 +75,20 @@ public class ErpRdBudgetTestingCostVo implements Serializable {
* (/)
*/
@ExcelProperty(value = "单价(元/单位数量)")
private Long unitPrice;
private BigDecimal unitPrice;
/**
*
*/
@ExcelProperty(value = "数量")
private Long amount;
private BigDecimal amount;
/**
*
*/
@ExcelProperty(value = "金额", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long price;
private BigDecimal price;
/**
*

@ -10,6 +10,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -74,42 +75,42 @@ public class ErpRdBudgetTravelCostVo implements Serializable {
*
*/
@ExcelProperty(value = "天数")
private Long days;
private BigDecimal days;
/**
* 宿
*/
@ExcelProperty(value = "住宿标准", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long stayStandard;
private BigDecimal stayStandard;
/**
*
*/
@ExcelProperty(value = "往返路费", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long travelExpenses;
private BigDecimal travelExpenses;
/**
* 宿
*/
@ExcelProperty(value = "住宿费", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long stayCosts;
private BigDecimal stayCosts;
/**
*
*/
@ExcelProperty(value = "补贴", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long subsidyCosts;
private BigDecimal subsidyCosts;
/**
*
*/
@ExcelProperty(value = "小计", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "元=")
private Long subtotalCosts;
private BigDecimal subtotalCosts;
/**
*

@ -0,0 +1,64 @@
package org.dromara.oa.erp.enums;
import lombok.Getter;
import org.dromara.common.core.enums.OAStatusEnum;
/**
* @author xins
* @description
*
* @date 2025/11/4 9:41
*/
@Getter
public enum ProjectCategoryEnum {
/**
*
*/
MARKET("1", "销售(实施、物流)"),
/**
*
*/
MARKET_PART("2", "销售(备件)"),
/**
*
*/
RD("3", "研发"),
/**
*
*/
PRE_PRODUCTION("4", "预投");
/**
*
*/
private final String code;
/**
*
*/
private final String name;
ProjectCategoryEnum(String code, String name) {
this.code = code;
this.name = name;
}
/**
*
*/
public static ProjectCategoryEnum getByCode(String code) {
for (ProjectCategoryEnum config : values()) {
if (config.getCode().equals(code)) {
return config;
}
}
return null;
}
}

@ -0,0 +1,89 @@
package org.dromara.oa.erp.enums;
import org.dromara.oa.erp.domain.*;
import java.util.HashMap;
import java.util.Map;
/**
* @Author xins
* @Date 2025/11/27 13:28
* @Description: -
*/
public enum RdBudgetCostEnums {
EQUIPMENT(ErpRdBudgetEquipmentCost.class, (cost, budgetId, projectId) -> {
((ErpRdBudgetEquipmentCost) cost).setBudgetId(budgetId);
((ErpRdBudgetEquipmentCost) cost).setProjectId(projectId);
}),
MATERIAL(ErpRdBudgetMaterialCost.class, (cost, budgetId, projectId) -> {
((ErpRdBudgetMaterialCost) cost).setBudgetId(budgetId);
((ErpRdBudgetMaterialCost) cost).setProjectId(projectId);
}),
TRAVEL(ErpRdBudgetTravelCost.class, (cost, budgetId, projectId) -> {
((ErpRdBudgetTravelCost) cost).setBudgetId(budgetId);
((ErpRdBudgetTravelCost) cost).setProjectId(projectId);
}),
MEETING(ErpRdBudgetMeetingCost.class, (cost, budgetId, projectId) -> {
((ErpRdBudgetMeetingCost) cost).setBudgetId(budgetId);
((ErpRdBudgetMeetingCost) cost).setProjectId(projectId);
}),
EXCHANGE(ErpRdBudgetExchangeCost.class, (cost, budgetId, projectId) -> {
((ErpRdBudgetExchangeCost) cost).setBudgetId(budgetId);
((ErpRdBudgetExchangeCost) cost).setProjectId(projectId);
}),
TECH(ErpRdBudgetTechCost.class, (cost, budgetId, projectId) -> {
((ErpRdBudgetTechCost) cost).setBudgetId(budgetId);
((ErpRdBudgetTechCost) cost).setProjectId(projectId);
}),
LABOR(ErpRdBudgetLaborCost.class, (cost, budgetId, projectId) -> {
((ErpRdBudgetLaborCost) cost).setBudgetId(budgetId);
((ErpRdBudgetLaborCost) cost).setProjectId(projectId);
}),
LITERATURE(ErpRdBudgetLiteratureCost.class, (cost, budgetId, projectId) -> {
((ErpRdBudgetLiteratureCost) cost).setBudgetId(budgetId);
((ErpRdBudgetLiteratureCost) cost).setProjectId(projectId);
}),
TESTING(ErpRdBudgetTestingCost.class, (cost, budgetId, projectId) -> {
((ErpRdBudgetTestingCost) cost).setBudgetId(budgetId);
((ErpRdBudgetTestingCost) cost).setProjectId(projectId);
}),
OTHER(ErpRdBudgetOtherCost.class, (cost, budgetId, projectId) -> {
((ErpRdBudgetOtherCost) cost).setBudgetId(budgetId);
((ErpRdBudgetOtherCost) cost).setProjectId(projectId);
});
private final Class<?> costClass;
private final TriConsumer<Object, Long, Long> setter;
RdBudgetCostEnums(Class<?> costClass, TriConsumer<Object, Long, Long> setter) {
this.costClass = costClass;
this.setter = setter;
}
public Class<?> getCostClass() {
return costClass;
}
public TriConsumer<Object, Long, Long> getSetter() {
return setter;
}
private static final Map<Class<?>, RdBudgetCostEnums> CLASS_TO_TYPE = new HashMap<>();
static {
for (RdBudgetCostEnums type : values()) {
CLASS_TO_TYPE.put(type.costClass, type);
}
}
public static RdBudgetCostEnums fromClass(Class<?> clazz) {
return CLASS_TO_TYPE.get(clazz);
}
@FunctionalInterface
public interface TriConsumer<T, U, V> {
void accept(T t, U u, V v);
}
}

@ -73,4 +73,13 @@ public interface IErpProjectInfoService {
* @return
*/
ErpProjectInfoVo projectSubmitAndFlowStart(ErpProjectInfoBo bo);
/**
* ,使
*
* @param bo
* @param pageQuery
* @return
*/
public TableDataInfo<ErpProjectInfoVo> queryPageList4Select(ErpProjectInfoBo bo, PageQuery pageQuery);
}

@ -1,5 +1,7 @@
package org.dromara.oa.erp.service.impl;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.seata.spring.annotation.GlobalTransactional;
import org.dromara.common.core.enums.OAStatusEnum;
@ -12,10 +14,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.toolkit.JoinWrappers;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import lombok.RequiredArgsConstructor;
import org.dromara.oa.erp.domain.ErpBudgetDetail;
import org.dromara.oa.erp.domain.ErpBudgetMaterialCost;
import org.dromara.oa.erp.mapper.ErpBudgetDetailMapper;
import org.dromara.oa.erp.mapper.ErpBudgetMaterialCostMapper;
import org.dromara.oa.erp.domain.*;
import org.dromara.oa.erp.enums.ProjectCategoryEnum;
import org.dromara.oa.erp.enums.RdBudgetCostEnums;
import org.dromara.oa.erp.mapper.*;
import org.dromara.oa.workflow.strategy.BudgetWorkflowStrategy;
import org.dromara.workflow.api.RemoteWorkflowService;
import org.dromara.workflow.api.domain.RemoteStartProcess;
@ -23,14 +25,16 @@ import org.dromara.workflow.strategy.AbstractWorkflowService;
import org.springframework.stereotype.Service;
import org.dromara.oa.erp.domain.bo.ErpBudgetInfoBo;
import org.dromara.oa.erp.domain.vo.ErpBudgetInfoVo;
import org.dromara.oa.erp.domain.ErpBudgetInfo;
import org.dromara.oa.erp.mapper.ErpBudgetInfoMapper;
import org.dromara.oa.erp.service.IErpBudgetInfoService;
import org.dromara.workflow.strategy.WorkflowStrategy;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Collection;
import java.util.function.Consumer;
import java.util.function.Function;
/**
* Service
@ -48,6 +52,35 @@ public class ErpBudgetInfoServiceImpl extends AbstractWorkflowService<ErpBudgetI
private final ErpBudgetMaterialCostMapper erpBudgetMaterialCostMapper;
private final ErpBudgetLaborCostMapper erpBudgetLaborCostMapper;
private final ErpBudgetInstallCostMapper erpBudgetInstallCostMapper;
private final ErpBudgetTravelCostMapper erpBudgetTravelCostMapper;
private final ErpBudgetOtherCostMapper erpBudgetOtherCostMapper;
private final ErpRdBudgetEquipmentCostMapper erpRdBudgetEquipmentCostMapper;
private final ErpRdBudgetMaterialCostMapper erpRdBudgetMaterialCostMapper;
private final ErpRdBudgetTravelCostMapper erpRdBudgetTravelCostMapper;
private final ErpRdBudgetMeetingCostMapper erpRdBudgetMeetingCostMapper;
private final ErpRdBudgetExchangeCostMapper erpRdBudgetExchangeCostMapper;
private final ErpRdBudgetTechCostMapper erpRdBudgetTechCostMapper;
private final ErpRdBudgetLaborCostMapper erpRdBudgetLaborCostMapper;
private final ErpRdBudgetLiteratureCostMapper erpRdBudgetLiteratureCostMapper;
private final ErpRdBudgetTestingCostMapper erpRdBudgetTestingCostMapper;
private final ErpRdBudgetOtherCostMapper erpRdBudgetOtherCostMapper;
@DubboReference(timeout = 30000)
private RemoteWorkflowService remoteWorkflowService;
@ -60,7 +93,7 @@ public class ErpBudgetInfoServiceImpl extends AbstractWorkflowService<ErpBudgetI
* remoteWorkflowService.startCompleteTask(startProcess);
*/
@Override
protected boolean doStartWorkflow(RemoteStartProcess startProcess){
protected boolean doStartWorkflow(RemoteStartProcess startProcess) {
return remoteWorkflowService.startCompleteTask(startProcess);
}
@ -72,7 +105,95 @@ public class ErpBudgetInfoServiceImpl extends AbstractWorkflowService<ErpBudgetI
*/
@Override
public ErpBudgetInfoVo queryById(Long budgetId) {
return baseMapper.selectVoById(budgetId);
ErpBudgetInfoVo erpBudgetInfoVo = baseMapper.selectVoById(budgetId);
if (erpBudgetInfoVo != null) {
String projectCategory = erpBudgetInfoVo.getProjectCategory();
MPJLambdaWrapper<ErpBudgetDetail> budgetDetailMPJLambdaWrapper = JoinWrappers.lambda(ErpBudgetDetail.class)
.selectAll(ErpBudgetDetail.class)
.eq(ErpBudgetDetail::getBudgetId, budgetId);
List<ErpBudgetDetail> erpBudgetDetailList = erpBudgetDetailMapper.selectList(budgetDetailMPJLambdaWrapper);
erpBudgetInfoVo.setErpBudgetDetailList(erpBudgetDetailList);
if (projectCategory.equals(ProjectCategoryEnum.MARKET.getCode()) || projectCategory.equals(ProjectCategoryEnum.MARKET_PART.getCode())) {
MPJLambdaWrapper<ErpBudgetMaterialCost> budgetMaterialCostMPJLambdaWrapper = JoinWrappers.lambda(ErpBudgetMaterialCost.class)
.selectAll(ErpBudgetMaterialCost.class)
.eq(ErpBudgetMaterialCost::getBudgetId, budgetId);
List<ErpBudgetMaterialCost> erpBudgetMaterialCostList = erpBudgetMaterialCostMapper.selectList(budgetMaterialCostMPJLambdaWrapper);
erpBudgetInfoVo.setErpBudgetMaterialCostList(erpBudgetMaterialCostList);
MPJLambdaWrapper<ErpBudgetLaborCost> budgetLaborCostMPJLambdaWrapper = JoinWrappers.lambda(ErpBudgetLaborCost.class)
.selectAll(ErpBudgetLaborCost.class)
.eq(ErpBudgetLaborCost::getBudgetId, budgetId);
List<ErpBudgetLaborCost> erpBudgetLaborCostList = erpBudgetLaborCostMapper.selectList(budgetLaborCostMPJLambdaWrapper);
erpBudgetInfoVo.setErpBudgetLaborCostList(erpBudgetLaborCostList);
MPJLambdaWrapper<ErpBudgetInstallCost> budgetInstallCostMPJLambdaWrapper = JoinWrappers.lambda(ErpBudgetInstallCost.class)
.selectAll(ErpBudgetInstallCost.class)
.eq(ErpBudgetInstallCost::getBudgetId, budgetId);
List<ErpBudgetInstallCost> erpBudgetInstallCostList = erpBudgetInstallCostMapper.selectList(budgetInstallCostMPJLambdaWrapper);
erpBudgetInfoVo.setErpBudgetInstallCostList(erpBudgetInstallCostList);
MPJLambdaWrapper<ErpBudgetTravelCost> budgetTravelCostMPJLambdaWrapper = JoinWrappers.lambda(ErpBudgetTravelCost.class)
.selectAll(ErpBudgetTravelCost.class)
.eq(ErpBudgetTravelCost::getBudgetId, budgetId);
List<ErpBudgetTravelCost> erpBudgetTravelCostList = erpBudgetTravelCostMapper.selectList(budgetTravelCostMPJLambdaWrapper);
erpBudgetInfoVo.setErpBudgetTravelCostList(erpBudgetTravelCostList);
MPJLambdaWrapper<ErpBudgetOtherCost> budgetOtherCostMPJLambdaWrapper = JoinWrappers.lambda(ErpBudgetOtherCost.class)
.selectAll(ErpBudgetOtherCost.class)
.eq(ErpBudgetOtherCost::getBudgetId, budgetId);
List<ErpBudgetOtherCost> erpBudgetOtherCostList = erpBudgetOtherCostMapper.selectList(budgetOtherCostMPJLambdaWrapper);
erpBudgetInfoVo.setErpBudgetOtherCostList(erpBudgetOtherCostList);
} else {
loadRdBudgetCosts(budgetId, erpBudgetInfoVo);
}
}
return erpBudgetInfoVo;
}
private <T> List<T> queryBudgetCosts(BaseMapper<T> mapper, Class<T> entityClass, Long budgetId) {
MPJLambdaWrapper<T> wrapper = JoinWrappers.lambda(entityClass)
.selectAll(entityClass)
.eq("budget_id", budgetId); // 直接使用字段名
return mapper.selectList(wrapper);
}
private void loadBudgetCosts(Long budgetId, ErpBudgetInfoVo erpBudgetInfoVo) {
erpBudgetInfoVo.setErpBudgetMaterialCostList(
queryBudgetCosts(erpBudgetMaterialCostMapper, ErpBudgetMaterialCost.class, budgetId));
erpBudgetInfoVo.setErpBudgetLaborCostList(
queryBudgetCosts(erpBudgetLaborCostMapper, ErpBudgetLaborCost.class, budgetId));
erpBudgetInfoVo.setErpBudgetInstallCostList(
queryBudgetCosts(erpBudgetInstallCostMapper, ErpBudgetInstallCost.class, budgetId));
erpBudgetInfoVo.setErpBudgetTravelCostList(
queryBudgetCosts(erpBudgetTravelCostMapper, ErpBudgetTravelCost.class, budgetId));
erpBudgetInfoVo.setErpBudgetOtherCostList(
queryBudgetCosts(erpBudgetOtherCostMapper, ErpBudgetOtherCost.class, budgetId));
}
private void loadRdBudgetCosts(Long budgetId, ErpBudgetInfoVo erpBudgetInfoVo) {
erpBudgetInfoVo.setErpRdBudgetEquipmentCostList(
queryBudgetCosts(erpRdBudgetEquipmentCostMapper, ErpRdBudgetEquipmentCost.class, budgetId));
erpBudgetInfoVo.setErpRdBudgetMaterialCostList(
queryBudgetCosts(erpRdBudgetMaterialCostMapper, ErpRdBudgetMaterialCost.class, budgetId));
erpBudgetInfoVo.setErpRdBudgetTravelCostList(
queryBudgetCosts(erpRdBudgetTravelCostMapper, ErpRdBudgetTravelCost.class, budgetId));
erpBudgetInfoVo.setErpRdBudgetMeetingCostList(
queryBudgetCosts(erpRdBudgetMeetingCostMapper, ErpRdBudgetMeetingCost.class, budgetId));
erpBudgetInfoVo.setErpRdBudgetExchangeCostList(
queryBudgetCosts(erpRdBudgetExchangeCostMapper, ErpRdBudgetExchangeCost.class, budgetId));
erpBudgetInfoVo.setErpRdBudgetTechCostList(
queryBudgetCosts(erpRdBudgetTechCostMapper, ErpRdBudgetTechCost.class, budgetId));
erpBudgetInfoVo.setErpRdBudgetLaborCostList(
queryBudgetCosts(erpRdBudgetLaborCostMapper, ErpRdBudgetLaborCost.class, budgetId));
erpBudgetInfoVo.setErpRdBudgetLiteratureCostList(
queryBudgetCosts(erpRdBudgetLiteratureCostMapper, ErpRdBudgetLiteratureCost.class, budgetId));
erpBudgetInfoVo.setErpRdBudgetTestingCostList(
queryBudgetCosts(erpRdBudgetTestingCostMapper, ErpRdBudgetTestingCost.class, budgetId));
erpBudgetInfoVo.setErpRdBudgetOtherCostList(
queryBudgetCosts(erpRdBudgetOtherCostMapper, ErpRdBudgetOtherCost.class, budgetId));
}
/**
@ -140,19 +261,21 @@ public class ErpBudgetInfoServiceImpl extends AbstractWorkflowService<ErpBudgetI
* @return
*/
@Override
@GlobalTransactional(rollbackFor = Exception.class)
@Transactional(rollbackFor = Exception.class)
public Boolean insertByBo(ErpBudgetInfoBo bo) {
ErpBudgetInfo add = MapstructUtils.convert(bo, ErpBudgetInfo.class);
validEntityBeforeSave(add);
add.setApprovedFlag(add.getProjectId());
add.setBudgetVersion(1L);
boolean flag = baseMapper.insert(add) > 0;
List<ErpBudgetDetail> erpBudgetDetailList = bo.getErpBudgetDetailList();
erpBudgetDetailList.forEach(erpBudgetDetail -> erpBudgetDetail.setBudgetId(add.getBudgetId()));
List<ErpBudgetMaterialCost> erpBudgetMaterialCostList = bo.getErpBudgetMaterialCostList();
erpBudgetMaterialCostList.forEach(erpBudgetMaterialCost -> erpBudgetMaterialCost.setBudgetId(add.getBudgetId()));
erpBudgetDetailMapper.insertBatch(erpBudgetDetailList);
erpBudgetMaterialCostMapper.insertBatch(erpBudgetMaterialCostList);
if (add.getProjectCategory().equals(ProjectCategoryEnum.MARKET.getCode())
|| add.getProjectCategory().equals(ProjectCategoryEnum.MARKET_PART.getCode())) {
batchBudgetCosts(add);
} else {
batchRdBudgetCosts(add);
}
if (flag) {
bo.setBudgetId(add.getBudgetId());
}
@ -189,11 +312,19 @@ public class ErpBudgetInfoServiceImpl extends AbstractWorkflowService<ErpBudgetI
* @return
*/
@Override
@GlobalTransactional(rollbackFor = Exception.class)
@Transactional(rollbackFor = Exception.class)
public Boolean updateByBo(ErpBudgetInfoBo bo) {
ErpBudgetInfo update = MapstructUtils.convert(bo, ErpBudgetInfo.class);
validEntityBeforeSave(update);
boolean isUpdated = baseMapper.updateById(update) > 0;
if (update.getProjectCategory().equals(ProjectCategoryEnum.MARKET.getCode())
|| update.getProjectCategory().equals(ProjectCategoryEnum.MARKET_PART.getCode())) {
batchBudgetCosts(update);
} else {
batchRdBudgetCosts(update);
}
boolean isUpdated = baseMapper.updateById(update) > 0;
this.executeWorkflow(bo);
return isUpdated;
}
@ -205,6 +336,352 @@ public class ErpBudgetInfoServiceImpl extends AbstractWorkflowService<ErpBudgetI
//TODO 做一些数据校验,如唯一约束
}
private void batchBudgetCosts(ErpBudgetInfo erpBudgetInfo) {
Long budgetId = erpBudgetInfo.getBudgetId();
Long projectId = erpBudgetInfo.getProjectId();
List<ErpBudgetDetail> erpBudgetDetailList = erpBudgetInfo.getErpBudgetDetailList();
erpBudgetDetailList.forEach(erpBudgetDetail -> erpBudgetDetail.setBudgetId(budgetId));
List<Long> toDeletedMaterialCostIdList = erpBudgetInfo.getToDeletedMaterialCostIdList();
erpBudgetMaterialCostMapper.deleteByIds(toDeletedMaterialCostIdList);
List<Long> toDeletedLaborCostIdList = erpBudgetInfo.getToDeletedLaborCostIdList();
erpBudgetLaborCostMapper.deleteByIds(toDeletedLaborCostIdList);
List<Long> toDeletedInstallCostIdList = erpBudgetInfo.getToDeletedInstallCostIdList();
erpBudgetInstallCostMapper.deleteByIds(toDeletedInstallCostIdList);
List<Long> toDeletedTravelCostIdList = erpBudgetInfo.getToDeletedTravelCostIdList();
erpBudgetTravelCostMapper.deleteByIds(toDeletedTravelCostIdList);
List<Long> toDeletedOtherCostIdList = erpBudgetInfo.getToDeletedOtherCostIdList();
erpBudgetOtherCostMapper.deleteByIds(toDeletedOtherCostIdList);
List<ErpBudgetMaterialCost> erpBudgetMaterialCostList = erpBudgetInfo.getErpBudgetMaterialCostList();
if (erpBudgetMaterialCostList != null) {
erpBudgetMaterialCostList.forEach(erpBudgetMaterialCost -> {
erpBudgetMaterialCost.setBudgetId(budgetId);
erpBudgetMaterialCost.setProjectId(projectId);
});
}
List<ErpBudgetLaborCost> erpBudgetLaborCostList = erpBudgetInfo.getErpBudgetLaborCostList();
erpBudgetLaborCostList.forEach(erpBudgetLaborCost -> {
erpBudgetLaborCost.setBudgetId(budgetId);
erpBudgetLaborCost.setProjectId(projectId);
});
List<ErpBudgetInstallCost> erpBudgetInstallCostList = erpBudgetInfo.getErpBudgetInstallCostList();
erpBudgetInstallCostList.forEach(erpBudgetInstallCost -> {
erpBudgetInstallCost.setBudgetId(budgetId);
erpBudgetInstallCost.setProjectId(projectId);
});
List<ErpBudgetTravelCost> erpBudgetTravelCostList = erpBudgetInfo.getErpBudgetTravelCostList();
erpBudgetTravelCostList.forEach(erpBudgetTravelCost -> {
erpBudgetTravelCost.setBudgetId(budgetId);
erpBudgetTravelCost.setProjectId(projectId);
});
List<ErpBudgetOtherCost> erpBudgetOtherCostList = erpBudgetInfo.getErpBudgetOtherCostList();
erpBudgetOtherCostList.forEach(erpBudgetOtherCost -> {
erpBudgetOtherCost.setBudgetId(budgetId);
erpBudgetOtherCost.setProjectId(projectId);
});
erpBudgetDetailMapper.insertOrUpdateBatch(erpBudgetDetailList);
erpBudgetMaterialCostMapper.insertOrUpdateBatch(erpBudgetMaterialCostList);
erpBudgetLaborCostMapper.insertOrUpdateBatch(erpBudgetLaborCostList);
erpBudgetInstallCostMapper.insertOrUpdateBatch(erpBudgetInstallCostList);
erpBudgetTravelCostMapper.insertOrUpdateBatch(erpBudgetTravelCostList);
erpBudgetOtherCostMapper.insertOrUpdateBatch(erpBudgetOtherCostList);
}
private void batchRdBudgetCosts(ErpBudgetInfo erpBudgetInfo) {
Long budgetId = erpBudgetInfo.getBudgetId();
Long projectId = erpBudgetInfo.getProjectId();
// 1. 处理预算明细
processRdBudgetDetails(erpBudgetInfo, budgetId);
// 2. 批量处理删除操作 - 在同一个事务中
processRdBudgetDeletions(erpBudgetInfo);
// 3. 批量处理插入/更新操作 - 在同一个事务中
processRdBudgetInsertOrUpdates(erpBudgetInfo, budgetId, projectId);
// List<ErpBudgetDetail> erpBudgetDetailList = erpBudgetInfo.getErpBudgetDetailList();
// erpBudgetDetailList.forEach(erpBudgetDetail -> erpBudgetDetail.setBudgetId(budgetId));
//
// List<Long> toDeletedRdEquipmentCostIdList = erpBudgetInfo.getToDeletedRdEquipmentCostIdList();
// erpRdBudgetEquipmentCostMapper.deleteByIds(toDeletedRdEquipmentCostIdList);
//
// List<Long> toDeletedRdMaterialCostIdList = erpBudgetInfo.getToDeletedRdMaterialCostIdList();
// erpRdBudgetMaterialCostMapper.deleteByIds(toDeletedRdMaterialCostIdList);
//
// List<Long> toDeletedRdTravelCostIdList = erpBudgetInfo.getToDeletedRdTravelCostIdList();
// erpRdBudgetTravelCostMapper.deleteByIds(toDeletedRdTravelCostIdList);
//
// List<Long> toDeletedRdMeetingCostIdList = erpBudgetInfo.getToDeletedRdMeetingCostIdList();
// erpRdBudgetMeetingCostMapper.deleteByIds(toDeletedRdMeetingCostIdList);
//
// List<Long> toDeletedRdExchangeCostIdList = erpBudgetInfo.getToDeletedRdExchangeCostIdList();
// erpRdBudgetExchangeCostMapper.deleteByIds(toDeletedRdExchangeCostIdList);
//
// List<Long> toDeletedRdTechCostIdList = erpBudgetInfo.getToDeletedRdTechCostIdList();
// erpRdBudgetTechCostMapper.deleteByIds(toDeletedRdTechCostIdList);
//
// List<Long> toDeletedRdLaborCostIdList = erpBudgetInfo.getToDeletedRdLaborCostIdList();
// erpRdBudgetLaborCostMapper.deleteByIds(toDeletedRdLaborCostIdList);
//
// List<Long> toDeletedRdLiteratureCostIdList = erpBudgetInfo.getToDeletedRdLiteratureCostIdList();
// erpRdBudgetLiteratureCostMapper.deleteByIds(toDeletedRdLiteratureCostIdList);
//
// List<Long> toDeletedRdTestingCostIdList = erpBudgetInfo.getToDeletedRdTestingCostIdList();
// erpRdBudgetTestingCostMapper.deleteByIds(toDeletedRdTestingCostIdList);
//
// List<Long> toDeletedRdOtherCostIdList = erpBudgetInfo.getToDeletedRdOtherCostIdList();
// erpRdBudgetOtherCostMapper.deleteByIds(toDeletedRdOtherCostIdList);
//
//
// List<ErpRdBudgetEquipmentCost> erpRdBudgetEquipmentCostList = erpBudgetInfo.getErpRdBudgetEquipmentCostList();
// if (erpRdBudgetEquipmentCostList != null) {
// erpRdBudgetEquipmentCostList.forEach(erpRdBudgetEquipmentCost -> {
// erpRdBudgetEquipmentCost.setBudgetId(budgetId);
// erpRdBudgetEquipmentCost.setProjectId(projectId);
// });
// }
//
// List<ErpRdBudgetMaterialCost> erpRdBudgetMaterialCostList = erpBudgetInfo.getErpRdBudgetMaterialCostList();
// if (erpRdBudgetMaterialCostList != null) {
// erpRdBudgetMaterialCostList.forEach(erpRdBudgetMaterialCost -> {
// erpRdBudgetMaterialCost.setBudgetId(budgetId);
// erpRdBudgetMaterialCost.setProjectId(projectId);
// });
// }
//
// List<ErpRdBudgetTravelCost> erpRdBudgetTravelCostList = erpBudgetInfo.getErpRdBudgetTravelCostList();
// if (erpRdBudgetTravelCostList != null) {
// erpRdBudgetTravelCostList.forEach(erpRdBudgetTravelCost -> {
// erpRdBudgetTravelCost.setBudgetId(budgetId);
// erpRdBudgetTravelCost.setProjectId(projectId);
// });
// }
//
// List<ErpRdBudgetMeetingCost> erpRdBudgetMeetingCostList = erpBudgetInfo.getErpRdBudgetMeetingCostList();
// if (erpRdBudgetMeetingCostList != null) {
// erpRdBudgetMeetingCostList.forEach(erpRdBudgetMeetingCost -> {
// erpRdBudgetMeetingCost.setBudgetId(budgetId);
// erpRdBudgetMeetingCost.setProjectId(projectId);
// });
// }
//
// List<ErpRdBudgetExchangeCost> erpRdBudgetExchangeCostList = erpBudgetInfo.getErpRdBudgetExchangeCostList();
// if (erpRdBudgetExchangeCostList != null) {
// erpRdBudgetExchangeCostList.forEach(erpRdBudgetExchangeCost -> {
// erpRdBudgetExchangeCost.setBudgetId(budgetId);
// erpRdBudgetExchangeCost.setProjectId(projectId);
// });
// }
//
// List<ErpRdBudgetTechCost> erpRdBudgetTechCostList = erpBudgetInfo.getErpRdBudgetTechCostList();
// if (erpRdBudgetTechCostList != null) {
// erpRdBudgetTechCostList.forEach(erpRdBudgetTechCost -> {
// erpRdBudgetTechCost.setBudgetId(budgetId);
// erpRdBudgetTechCost.setProjectId(projectId);
// });
// }
//
// List<ErpRdBudgetLaborCost> erpRdBudgetLaborCostList = erpBudgetInfo.getErpRdBudgetLaborCostList();
// if (erpRdBudgetLaborCostList != null) {
// erpRdBudgetLaborCostList.forEach(erpRdBudgetLaborCost -> {
// erpRdBudgetLaborCost.setBudgetId(budgetId);
// erpRdBudgetLaborCost.setProjectId(projectId);
// });
// }
//
// List<ErpRdBudgetLiteratureCost> erpRdBudgetLiteratureCostList = erpBudgetInfo.getErpRdBudgetLiteratureCostList();
// if (erpRdBudgetLiteratureCostList != null) {
// erpRdBudgetLiteratureCostList.forEach(erpRdBudgetLiteratureCost -> {
// erpRdBudgetLiteratureCost.setBudgetId(budgetId);
// erpRdBudgetLiteratureCost.setProjectId(projectId);
// });
// }
//
// List<ErpRdBudgetTestingCost> erpRdBudgetTestingCostList = erpBudgetInfo.getErpRdBudgetTestingCostList();
// if (erpRdBudgetTestingCostList != null) {
// erpRdBudgetTestingCostList.forEach(erpRdBudgetTestingCost -> {
// erpRdBudgetTestingCost.setBudgetId(budgetId);
// erpRdBudgetTestingCost.setProjectId(projectId);
// });
// }
//
// List<ErpRdBudgetOtherCost> erpRdBudgetOtherCostList = erpBudgetInfo.getErpRdBudgetOtherCostList();
// if (erpRdBudgetOtherCostList != null) {
// erpRdBudgetOtherCostList.forEach(erpRdBudgetOtherCost -> {
// erpRdBudgetOtherCost.setBudgetId(budgetId);
// erpRdBudgetOtherCost.setProjectId(projectId);
// });
// }
//
//
// erpBudgetDetailMapper.insertOrUpdateBatch(erpBudgetDetailList);
// erpRdBudgetEquipmentCostMapper.insertOrUpdateBatch(erpRdBudgetEquipmentCostList);
// erpRdBudgetMaterialCostMapper.insertOrUpdateBatch(erpRdBudgetMaterialCostList);
// erpRdBudgetTravelCostMapper.insertOrUpdateBatch(erpRdBudgetTravelCostList);
// erpRdBudgetMeetingCostMapper.insertOrUpdateBatch(erpRdBudgetMeetingCostList);
// erpRdBudgetExchangeCostMapper.insertOrUpdateBatch(erpRdBudgetExchangeCostList);
// erpRdBudgetTechCostMapper.insertOrUpdateBatch(erpRdBudgetTechCostList);
// erpRdBudgetLaborCostMapper.insertOrUpdateBatch(erpRdBudgetLaborCostList);
// erpRdBudgetLiteratureCostMapper.insertOrUpdateBatch(erpRdBudgetLiteratureCostList);
// erpRdBudgetTestingCostMapper.insertOrUpdateBatch(erpRdBudgetTestingCostList);
// erpRdBudgetOtherCostMapper.insertOrUpdateBatch(erpRdBudgetOtherCostList);
}
/**
*
*
* @param erpBudgetInfo
* @param budgetId ID
*/
private void processRdBudgetDetails(ErpBudgetInfo erpBudgetInfo, Long budgetId) {
List<ErpBudgetDetail> detailList = erpBudgetInfo.getErpBudgetDetailList();
if (detailList != null && !detailList.isEmpty()) {
// log.debug("处理预算明细,数量: {}", detailList.size());
detailList.forEach(detail -> detail.setBudgetId(budgetId));
erpBudgetDetailMapper.insertOrUpdateBatch(detailList);
}
}
/**
*
* 使
*
* @param erpBudgetInfo
*/
private void processRdBudgetDeletions(ErpBudgetInfo erpBudgetInfo) {
executeInBatch(() -> {
deleteIfNotEmpty(erpBudgetInfo.getToDeletedRdEquipmentCostIdList(),
erpRdBudgetEquipmentCostMapper::deleteByIds, "设备成本");
deleteIfNotEmpty(erpBudgetInfo.getToDeletedRdMaterialCostIdList(),
erpRdBudgetMaterialCostMapper::deleteByIds, "材料成本");
deleteIfNotEmpty(erpBudgetInfo.getToDeletedRdTravelCostIdList(),
erpRdBudgetTravelCostMapper::deleteByIds, "差旅成本");
deleteIfNotEmpty(erpBudgetInfo.getToDeletedRdMeetingCostIdList(),
erpRdBudgetMeetingCostMapper::deleteByIds, "会议成本");
deleteIfNotEmpty(erpBudgetInfo.getToDeletedRdExchangeCostIdList(),
erpRdBudgetExchangeCostMapper::deleteByIds, "交流成本");
deleteIfNotEmpty(erpBudgetInfo.getToDeletedRdTechCostIdList(),
erpRdBudgetTechCostMapper::deleteByIds, "技术成本");
deleteIfNotEmpty(erpBudgetInfo.getToDeletedRdLaborCostIdList(),
erpRdBudgetLaborCostMapper::deleteByIds, "人工成本");
deleteIfNotEmpty(erpBudgetInfo.getToDeletedRdLiteratureCostIdList(),
erpRdBudgetLiteratureCostMapper::deleteByIds, "文献成本");
deleteIfNotEmpty(erpBudgetInfo.getToDeletedRdTestingCostIdList(),
erpRdBudgetTestingCostMapper::deleteByIds, "测试成本");
deleteIfNotEmpty(erpBudgetInfo.getToDeletedRdOtherCostIdList(),
erpRdBudgetOtherCostMapper::deleteByIds, "其他成本");
});
}
/**
* /
*
* @param erpBudgetInfo
* @param budgetId ID
* @param projectId ID
*/
private void processRdBudgetInsertOrUpdates(ErpBudgetInfo erpBudgetInfo, Long budgetId, Long projectId) {
executeInBatch(() -> {
processCostList(erpBudgetInfo.getErpRdBudgetEquipmentCostList(), budgetId, projectId,
erpRdBudgetEquipmentCostMapper::insertOrUpdateBatch, ErpRdBudgetEquipmentCost.class);
processCostList(erpBudgetInfo.getErpRdBudgetMaterialCostList(), budgetId, projectId,
erpRdBudgetMaterialCostMapper::insertOrUpdateBatch, ErpRdBudgetMaterialCost.class);
processCostList(erpBudgetInfo.getErpRdBudgetTravelCostList(), budgetId, projectId,
erpRdBudgetTravelCostMapper::insertOrUpdateBatch, ErpRdBudgetTravelCost.class);
processCostList(erpBudgetInfo.getErpRdBudgetMeetingCostList(), budgetId, projectId,
erpRdBudgetMeetingCostMapper::insertOrUpdateBatch, ErpRdBudgetMeetingCost.class);
processCostList(erpBudgetInfo.getErpRdBudgetExchangeCostList(), budgetId, projectId,
erpRdBudgetExchangeCostMapper::insertOrUpdateBatch, ErpRdBudgetExchangeCost.class);
processCostList(erpBudgetInfo.getErpRdBudgetTechCostList(), budgetId, projectId,
erpRdBudgetTechCostMapper::insertOrUpdateBatch, ErpRdBudgetTechCost.class);
processCostList(erpBudgetInfo.getErpRdBudgetLaborCostList(), budgetId, projectId,
erpRdBudgetLaborCostMapper::insertOrUpdateBatch, ErpRdBudgetLaborCost.class);
processCostList(erpBudgetInfo.getErpRdBudgetLiteratureCostList(), budgetId, projectId,
erpRdBudgetLiteratureCostMapper::insertOrUpdateBatch, ErpRdBudgetLiteratureCost.class);
processCostList(erpBudgetInfo.getErpRdBudgetTestingCostList(), budgetId, projectId,
erpRdBudgetTestingCostMapper::insertOrUpdateBatch, ErpRdBudgetTestingCost.class);
processCostList(erpBudgetInfo.getErpRdBudgetOtherCostList(), budgetId, projectId,
erpRdBudgetOtherCostMapper::insertOrUpdateBatch, ErpRdBudgetOtherCost.class);
});
}
/**
*
*
* @param costList
* @param budgetId ID
* @param projectId ID
* @param saveFunction
* @param clazz Class
*/
private <T> void processCostList(List<T> costList, Long budgetId, Long projectId,
Consumer<List<T>> saveFunction, Class<T> clazz) {
if (costList != null && !costList.isEmpty()) {
// log.debug("处理{}成本数据,数量: {}", clazz.getSimpleName(), costList.size());
setBudgetAndProjectIds(costList, budgetId, projectId, clazz);
saveFunction.accept(costList);
}
}
/**
* IDID
* 使if-else
*
* @param costList
* @param budgetId ID
* @param projectId ID
* @param clazz Class
*/
private <T> void setBudgetAndProjectIds(List<T> costList, Long budgetId, Long projectId, Class<T> clazz) {
RdBudgetCostEnums rdBudgetCostEnums = RdBudgetCostEnums.fromClass(clazz);
if (rdBudgetCostEnums != null) {
costList.forEach(cost -> rdBudgetCostEnums.getSetter().accept(cost, budgetId, projectId));
} else {
// log.warn("未找到对应的CostType枚举类名: {}", clazz.getName());
}
}
/**
* ID
*
* @param idList ID
* @param deleteFunction
* @param costTypeName
*/
private void deleteIfNotEmpty(List<Long> idList, Consumer<List<Long>> deleteFunction, String costTypeName) {
if (idList != null && !idList.isEmpty()) {
// log.debug("删除{}数据,数量: {}", costTypeName, idList.size());
deleteFunction.accept(idList);
}
}
/**
* -
*
* @param task
*/
private void executeInBatch(Runnable task) {
// 这里可以添加批量操作的相关优化,如批量提交、性能监控等
long startTime = System.currentTimeMillis();
task.run();
long endTime = System.currentTimeMillis();
// log.debug("批量操作执行完成,耗时: {}ms", endTime - startTime);
}
/**
*
*

@ -1,8 +1,12 @@
package org.dromara.oa.erp.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.map.MapUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.extern.slf4j.Slf4j;
import org.dromara.common.core.constant.SystemConstants;
import org.dromara.common.core.enums.BusinessStatusEnum;
import org.dromara.common.core.enums.OAStatusEnum;
import org.dromara.common.core.utils.MapstructUtils;
@ -14,6 +18,7 @@ import com.github.yulichang.toolkit.JoinWrappers;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import lombok.RequiredArgsConstructor;
import org.dromara.common.tenant.helper.TenantHelper;
import org.dromara.oa.erp.enums.ProjectCategoryEnum;
import org.dromara.workflow.api.event.ProcessEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;
@ -227,4 +232,40 @@ public class ErpProjectInfoServiceImpl implements IErpProjectInfoService {
});
}
/**
* ,使
*
* @param bo
* @param pageQuery
* @return
*/
@Override
public TableDataInfo<ErpProjectInfoVo> queryPageList4Select(ErpProjectInfoBo bo, PageQuery pageQuery) {
MPJLambdaWrapper<ErpProjectInfo> lqw = buildQueryWrapper4Select(bo);
Page<ErpProjectInfoVo> result = baseMapper.selectCustomErpProjectInfoVoList(pageQuery.build(), lqw);
return TableDataInfo.build(result);
}
private MPJLambdaWrapper<ErpProjectInfo> buildQueryWrapper4Select(ErpProjectInfoBo bo) {
MPJLambdaWrapper<ErpProjectInfo> wrapper = JoinWrappers.lambda(ErpProjectInfo.class);
wrapper.like(StringUtils.isNotBlank(bo.getProjectCode()), ErpProjectInfo::getProjectCode, bo.getProjectCode())
.like(StringUtils.isNotBlank(bo.getProjectName()), ErpProjectInfo::getProjectName, bo.getProjectName())
.and(w ->
{
if(StringUtils.isNotBlank(bo.getProjectCategory()) && bo.getProjectCategory().equals(ProjectCategoryEnum.MARKET.getCode())){
w.eq(StringUtils.isNotBlank(bo.getProjectCategory()) ,ErpProjectInfo::getProjectCategory, ProjectCategoryEnum.MARKET.getCode())
.or().eq(StringUtils.isNotBlank(bo.getProjectCategory()) ,ErpProjectInfo::getProjectCategory, ProjectCategoryEnum.MARKET_PART.getCode());
}else if(StringUtils.isNotBlank(bo.getProjectCategory()) && bo.getProjectCategory().equals(ProjectCategoryEnum.RD.getCode())){
w.eq(StringUtils.isNotBlank(bo.getProjectCategory()) ,ErpProjectInfo::getProjectCategory, ProjectCategoryEnum.RD.getCode())
.or().eq(StringUtils.isNotBlank(bo.getProjectCategory()) ,ErpProjectInfo::getProjectCategory, ProjectCategoryEnum.PRE_PRODUCTION.getCode());
}
}).orderByDesc(ErpProjectInfo::getCreateTime);;
return wrapper;
}
}

@ -305,4 +305,13 @@ public class SysUserController extends BaseController {
return R.ok(userService.selectUserListByDept(deptId));
}
/**
*
*/
@GetMapping("/getUserList")
public R<List<SysUserVo>> getUserList(SysUserBo bo) {
List<SysUserVo> list = userService.selectUserList();
return R.ok(list);
}
}

@ -274,4 +274,11 @@ public interface ISysUserService {
*/
List<Long> selectUserIdsByRoleIds(List<Long> roleIds);
/**
*
*
* @return
*/
public List<SysUserVo> selectUserList();
}

@ -680,4 +680,17 @@ public class SysUserServiceImpl implements ISysUserService {
return ObjectUtils.notNullGetter(sysUser, SysUser::getEmail);
}
/**
*
*
* @return
*/
@Override
public List<SysUserVo> selectUserList() {
LambdaQueryWrapper<SysUser> lqw = Wrappers.lambdaQuery();
lqw.orderByAsc(SysUser::getNickName);
return baseMapper.selectVoList(lqw);
}
}

Loading…
Cancel
Save