手工导入计价up
This commit is contained in:
parent
6a362088c3
commit
3b87ecbc5b
@ -1,5 +1,6 @@
|
||||
package org.dromara.mps.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -7,6 +8,9 @@ import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.dromara.common.core.enums.FormatsType;
|
||||
import org.dromara.common.core.utils.DateUtils;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.dromara.common.excel.core.ExcelResult;
|
||||
@ -32,7 +36,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
* 手工导入计价
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-07-25
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@ -79,8 +83,11 @@ public class MpsManualPricingController extends BaseController {
|
||||
@Log(title = "手工导入计价", businessType = BusinessType.IMPORT)
|
||||
@SaCheckPermission("mps:manualPricing:import")
|
||||
@PostMapping(value = "/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public R<Void> importData(@RequestPart("file") MultipartFile file, boolean updateSupport) throws Exception {
|
||||
ExcelResult<MpsManualPricingImportVo> result = ExcelUtil.importExcel(file.getInputStream(), MpsManualPricingImportVo.class, new MpsManualPricingImportListener(updateSupport));
|
||||
public R<Void> importData(@RequestPart("file") MultipartFile file, boolean updateSupport,
|
||||
@RequestParam @DateTimeFormat(pattern = "yyyy-MM") Date importMonth) throws Exception {
|
||||
String importTime = DateUtils.parseDateToStr(FormatsType.YYYY_MM,importMonth);
|
||||
mpsManualPricingService.deleteDataByMonth(importTime);
|
||||
ExcelResult<MpsManualPricingImportVo> result = ExcelUtil.importExcel(file.getInputStream(), MpsManualPricingImportVo.class, new MpsManualPricingImportListener(updateSupport,importTime));
|
||||
return R.ok(result.getAnalysis());
|
||||
}
|
||||
|
||||
@ -92,7 +99,7 @@ public class MpsManualPricingController extends BaseController {
|
||||
@SaCheckPermission("mps:manualPricing:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<MpsManualPricingVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Integer id) {
|
||||
@PathVariable Long id) {
|
||||
return R.ok(mpsManualPricingService.queryById(id));
|
||||
}
|
||||
|
||||
@ -127,7 +134,7 @@ public class MpsManualPricingController extends BaseController {
|
||||
@Log(title = "手工导入计价", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Integer[] ids) {
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(mpsManualPricingService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,6 @@ import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
@ -14,7 +12,7 @@ import java.io.Serial;
|
||||
* 手工导入计价对象 mps_manual_pricing
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-07-25
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ -31,9 +29,9 @@ public class MpsManualPricing extends TenantEntity {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 营销人员营销号
|
||||
* 支行
|
||||
*/
|
||||
private String yxId;
|
||||
private String branch;
|
||||
|
||||
/**
|
||||
* 员工身份证号
|
||||
@ -46,44 +44,109 @@ public class MpsManualPricing extends TenantEntity {
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
* 岗位
|
||||
*/
|
||||
private Date date;
|
||||
private String position;
|
||||
|
||||
/**
|
||||
* 营销人员营销号
|
||||
*/
|
||||
private String marketingCode;
|
||||
|
||||
/**
|
||||
* 存量综合收单商户留存率提升
|
||||
*/
|
||||
private BigDecimal clzhsdshlclts;
|
||||
private BigDecimal merchantRetentionRate;
|
||||
|
||||
/**
|
||||
* 代收水费
|
||||
* 新增党费、工会费缴费单位
|
||||
*/
|
||||
private BigDecimal water;
|
||||
private BigDecimal newPartyFeeUnits;
|
||||
|
||||
/**
|
||||
* 代收电费
|
||||
* 新增物业费缴费单位
|
||||
*/
|
||||
private BigDecimal electricity;
|
||||
private BigDecimal newPropertyFeeUnits;
|
||||
|
||||
/**
|
||||
* 缴费业务
|
||||
* 新增餐费缴费单位
|
||||
*/
|
||||
private BigDecimal charge;
|
||||
private BigDecimal newCateringFeeUnits;
|
||||
|
||||
/**
|
||||
* 外汇业务
|
||||
* 新开立外汇账户有效户
|
||||
*/
|
||||
private BigDecimal forex;
|
||||
private BigDecimal newForeignAccounts;
|
||||
|
||||
/**
|
||||
* 理财业务
|
||||
* 新增理财销售有效户(个人)
|
||||
*/
|
||||
private BigDecimal financing;
|
||||
private BigDecimal newIndividualTreasury;
|
||||
|
||||
/**
|
||||
* 新增理财销售有效户(对公)
|
||||
*/
|
||||
private BigDecimal newCorporateTreasury;
|
||||
|
||||
/**
|
||||
* 理财销售系统业务量
|
||||
*/
|
||||
private BigDecimal treasuryTransactions;
|
||||
|
||||
/**
|
||||
* 代销定期类理财产品
|
||||
*/
|
||||
private BigDecimal regularProducts;
|
||||
|
||||
/**
|
||||
* 新增公积金缴存账户
|
||||
*/
|
||||
private BigDecimal xzgjjjczh;
|
||||
private BigDecimal newHousingFund;
|
||||
|
||||
/**
|
||||
* 合计计价
|
||||
*/
|
||||
private BigDecimal totalScore;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
private String importTime;
|
||||
|
||||
/**
|
||||
* 冗余1
|
||||
*/
|
||||
private BigDecimal fill1;
|
||||
|
||||
/**
|
||||
* 冗余2
|
||||
*/
|
||||
private BigDecimal fill2;
|
||||
|
||||
/**
|
||||
* 冗余4
|
||||
*/
|
||||
private BigDecimal fill3;
|
||||
|
||||
/**
|
||||
* 冗余4
|
||||
*/
|
||||
private BigDecimal fill4;
|
||||
|
||||
/**
|
||||
* 冗余5
|
||||
*/
|
||||
private BigDecimal fill5;
|
||||
|
||||
/**
|
||||
* 冗余6
|
||||
*/
|
||||
private BigDecimal fill6;
|
||||
|
||||
/**
|
||||
* 冗余7
|
||||
*/
|
||||
private BigDecimal fill7;
|
||||
|
||||
|
||||
}
|
||||
|
@ -9,14 +9,12 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 手工导入计价业务对象 mps_manual_pricing
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-07-25
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ -29,59 +27,147 @@ public class MpsManualPricingBo extends BaseEntity {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 营销人员营销号
|
||||
* 支行
|
||||
*/
|
||||
private String yxId;
|
||||
@NotBlank(message = "支行不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String branch;
|
||||
|
||||
/**
|
||||
* 员工身份证号
|
||||
*/
|
||||
@NotBlank(message = "员工身份证号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String idcardNo;
|
||||
|
||||
/**
|
||||
* 员工姓名
|
||||
*/
|
||||
@NotBlank(message = "员工姓名不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
* 岗位
|
||||
*/
|
||||
private Date date;
|
||||
@NotBlank(message = "岗位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String position;
|
||||
|
||||
/**
|
||||
* 营销人员营销号
|
||||
*/
|
||||
private String marketingCode;
|
||||
|
||||
/**
|
||||
* 存量综合收单商户留存率提升
|
||||
*/
|
||||
private BigDecimal clzhsdshlclts;
|
||||
@NotNull(message = "存量综合收单商户留存率提升不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal merchantRetentionRate;
|
||||
|
||||
/**
|
||||
* 代收水费
|
||||
* 新增党费、工会费缴费单位
|
||||
*/
|
||||
private BigDecimal water;
|
||||
@NotNull(message = "新增党费、工会费缴费单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal newPartyFeeUnits;
|
||||
|
||||
/**
|
||||
* 代收电费
|
||||
* 新增物业费缴费单位
|
||||
*/
|
||||
private BigDecimal electricity;
|
||||
@NotNull(message = "新增物业费缴费单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal newPropertyFeeUnits;
|
||||
|
||||
/**
|
||||
* 缴费业务
|
||||
* 新增餐费缴费单位
|
||||
*/
|
||||
private BigDecimal charge;
|
||||
@NotNull(message = "新增餐费缴费单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal newCateringFeeUnits;
|
||||
|
||||
/**
|
||||
* 外汇业务
|
||||
* 新开立外汇账户有效户
|
||||
*/
|
||||
private BigDecimal forex;
|
||||
@NotNull(message = "新开立外汇账户有效户不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal newForeignAccounts;
|
||||
|
||||
/**
|
||||
* 理财业务
|
||||
* 新增理财销售有效户(个人)
|
||||
*/
|
||||
private BigDecimal financing;
|
||||
@NotNull(message = "新增理财销售有效户(个人)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal newIndividualTreasury;
|
||||
|
||||
/**
|
||||
* 新增理财销售有效户(对公)
|
||||
*/
|
||||
@NotNull(message = "新增理财销售有效户(对公)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal newCorporateTreasury;
|
||||
|
||||
/**
|
||||
* 理财销售系统业务量
|
||||
*/
|
||||
@NotNull(message = "理财销售系统业务量不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal treasuryTransactions;
|
||||
|
||||
/**
|
||||
* 代销定期类理财产品
|
||||
*/
|
||||
@NotNull(message = "代销定期类理财产品不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal regularProducts;
|
||||
|
||||
/**
|
||||
* 新增公积金缴存账户
|
||||
*/
|
||||
private BigDecimal xzgjjjczh;
|
||||
@NotNull(message = "新增公积金缴存账户不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal newHousingFund;
|
||||
|
||||
/**
|
||||
* 合计计价
|
||||
*/
|
||||
@NotNull(message = "合计计价不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal totalScore;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@NotBlank(message = "日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String importTime;
|
||||
|
||||
/**
|
||||
* 冗余1
|
||||
*/
|
||||
@NotNull(message = "冗余1不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal fill1;
|
||||
|
||||
/**
|
||||
* 冗余2
|
||||
*/
|
||||
@NotNull(message = "冗余2不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal fill2;
|
||||
|
||||
/**
|
||||
* 冗余4
|
||||
*/
|
||||
@NotNull(message = "冗余4不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal fill3;
|
||||
|
||||
/**
|
||||
* 冗余4
|
||||
*/
|
||||
@NotNull(message = "冗余4不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal fill4;
|
||||
|
||||
/**
|
||||
* 冗余5
|
||||
*/
|
||||
@NotNull(message = "冗余5不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal fill5;
|
||||
|
||||
/**
|
||||
* 冗余6
|
||||
*/
|
||||
@NotNull(message = "冗余6不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal fill6;
|
||||
|
||||
/**
|
||||
* 冗余7
|
||||
*/
|
||||
@NotNull(message = "冗余7不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal fill7;
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package org.dromara.mps.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
@ -21,7 +19,7 @@ import java.util.Date;
|
||||
* 自行按照业务需要修改模板列
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-07-25
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@ -38,70 +36,148 @@ public class MpsManualPricingImportVo implements Serializable {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 营销人员营销号
|
||||
* 支行
|
||||
*/
|
||||
@ExcelProperty(value = "营销人员营销号")
|
||||
private String yxId;
|
||||
@ExcelProperty(value = "支行")
|
||||
private String branch;
|
||||
|
||||
/**
|
||||
* 员工身份证号
|
||||
*/
|
||||
@ExcelProperty(value = "员工身份证号")
|
||||
@ExcelProperty(value = "证件号码")
|
||||
private String idcardNo;
|
||||
|
||||
/**
|
||||
* 员工姓名
|
||||
*/
|
||||
@ExcelProperty(value = "员工姓名")
|
||||
@ExcelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
* 岗位
|
||||
*/
|
||||
@ExcelProperty(value = "日期")
|
||||
private Date date;
|
||||
@ExcelProperty(value = "岗位")
|
||||
private String position;
|
||||
|
||||
/**
|
||||
* 营销人员营销号
|
||||
*/
|
||||
@ExcelProperty(value = "营销号")
|
||||
private String marketingCode;
|
||||
|
||||
/**
|
||||
* 存量综合收单商户留存率提升
|
||||
*/
|
||||
@ExcelProperty(value = "存量综合收单商户留存率提升")
|
||||
private BigDecimal clzhsdshlclts;
|
||||
private BigDecimal merchantRetentionRate;
|
||||
|
||||
/**
|
||||
* 代收水费
|
||||
* 新增党费、工会费缴费单位
|
||||
*/
|
||||
@ExcelProperty(value = "代收水费")
|
||||
private BigDecimal water;
|
||||
@ExcelProperty(value = "新增党费、工会费缴费单位")
|
||||
private BigDecimal newPartyFeeUnits;
|
||||
|
||||
/**
|
||||
* 代收电费
|
||||
* 新增物业费缴费单位
|
||||
*/
|
||||
@ExcelProperty(value = "代收电费")
|
||||
private BigDecimal electricity;
|
||||
@ExcelProperty(value = "新增物业费缴费单位")
|
||||
private BigDecimal newPropertyFeeUnits;
|
||||
|
||||
/**
|
||||
* 缴费业务
|
||||
* 新增餐费缴费单位
|
||||
*/
|
||||
@ExcelProperty(value = "缴费业务")
|
||||
private BigDecimal charge;
|
||||
@ExcelProperty(value = "新增餐费缴费单位")
|
||||
private BigDecimal newCateringFeeUnits;
|
||||
|
||||
/**
|
||||
* 外汇业务
|
||||
* 新开立外汇账户有效户
|
||||
*/
|
||||
@ExcelProperty(value = "外汇业务")
|
||||
private BigDecimal forex;
|
||||
@ExcelProperty(value = "新开立外汇账户有效户")
|
||||
private BigDecimal newForeignAccounts;
|
||||
|
||||
/**
|
||||
* 理财业务
|
||||
* 新增理财销售有效户(个人)
|
||||
*/
|
||||
@ExcelProperty(value = "理财业务")
|
||||
private BigDecimal financing;
|
||||
@ExcelProperty(value = "新增理财销售有效户(个人)")
|
||||
private BigDecimal newIndividualTreasury;
|
||||
|
||||
/**
|
||||
* 新增理财销售有效户(对公)
|
||||
*/
|
||||
@ExcelProperty(value = "新增理财销售有效户(对公)")
|
||||
private BigDecimal newCorporateTreasury;
|
||||
|
||||
/**
|
||||
* 理财销售系统业务量
|
||||
*/
|
||||
@ExcelProperty(value = "理财销售系统业务量")
|
||||
private BigDecimal treasuryTransactions;
|
||||
|
||||
/**
|
||||
* 代销定期类理财产品
|
||||
*/
|
||||
@ExcelProperty(value = "代销定期类理财产品")
|
||||
private BigDecimal regularProducts;
|
||||
|
||||
/**
|
||||
* 新增公积金缴存账户
|
||||
*/
|
||||
@ExcelProperty(value = "新增公积金缴存账户")
|
||||
private BigDecimal xzgjjjczh;
|
||||
private BigDecimal newHousingFund;
|
||||
|
||||
/**
|
||||
* 合计计价
|
||||
*/
|
||||
@ExcelProperty(value = "合计计价")
|
||||
private BigDecimal totalScore;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@ExcelProperty(value = "日期")
|
||||
private String importTime;
|
||||
|
||||
/**
|
||||
* 冗余1
|
||||
*/
|
||||
@ExcelProperty(value = "冗余1")
|
||||
private BigDecimal fill1;
|
||||
|
||||
/**
|
||||
* 冗余2
|
||||
*/
|
||||
@ExcelProperty(value = "冗余2")
|
||||
private BigDecimal fill2;
|
||||
|
||||
/**
|
||||
* 冗余4
|
||||
*/
|
||||
@ExcelProperty(value = "冗余4")
|
||||
private BigDecimal fill3;
|
||||
|
||||
/**
|
||||
* 冗余4
|
||||
*/
|
||||
@ExcelProperty(value = "冗余4")
|
||||
private BigDecimal fill4;
|
||||
|
||||
/**
|
||||
* 冗余5
|
||||
*/
|
||||
@ExcelProperty(value = "冗余5")
|
||||
private BigDecimal fill5;
|
||||
|
||||
/**
|
||||
* 冗余6
|
||||
*/
|
||||
@ExcelProperty(value = "冗余6")
|
||||
private BigDecimal fill6;
|
||||
|
||||
/**
|
||||
* 冗余7
|
||||
*/
|
||||
@ExcelProperty(value = "冗余7")
|
||||
private BigDecimal fill7;
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package org.dromara.mps.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.mps.domain.MpsManualPricing;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
@ -21,7 +19,7 @@ import java.util.Date;
|
||||
* 手工导入计价视图对象 mps_manual_pricing
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-07-25
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@ -38,70 +36,148 @@ public class MpsManualPricingVo implements Serializable {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 营销人员营销号
|
||||
* 支行
|
||||
*/
|
||||
@ExcelProperty(value = "营销人员营销号")
|
||||
private String yxId;
|
||||
@ExcelProperty(value = "支行")
|
||||
private String branch;
|
||||
|
||||
/**
|
||||
* 员工身份证号
|
||||
*/
|
||||
@ExcelProperty(value = "员工身份证号")
|
||||
@ExcelProperty(value = "证件号码")
|
||||
private String idcardNo;
|
||||
|
||||
/**
|
||||
* 员工姓名
|
||||
*/
|
||||
@ExcelProperty(value = "员工姓名")
|
||||
@ExcelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
* 岗位
|
||||
*/
|
||||
@ExcelProperty(value = "日期")
|
||||
private Date date;
|
||||
@ExcelProperty(value = "岗位")
|
||||
private String position;
|
||||
|
||||
/**
|
||||
* 营销人员营销号
|
||||
*/
|
||||
@ExcelProperty(value = "营销号")
|
||||
private String marketingCode;
|
||||
|
||||
/**
|
||||
* 存量综合收单商户留存率提升
|
||||
*/
|
||||
@ExcelProperty(value = "存量综合收单商户留存率提升")
|
||||
private BigDecimal clzhsdshlclts;
|
||||
private BigDecimal merchantRetentionRate;
|
||||
|
||||
/**
|
||||
* 代收水费
|
||||
* 新增党费、工会费缴费单位
|
||||
*/
|
||||
@ExcelProperty(value = "代收水费")
|
||||
private BigDecimal water;
|
||||
@ExcelProperty(value = "新增党费、工会费缴费单位")
|
||||
private BigDecimal newPartyFeeUnits;
|
||||
|
||||
/**
|
||||
* 代收电费
|
||||
* 新增物业费缴费单位
|
||||
*/
|
||||
@ExcelProperty(value = "代收电费")
|
||||
private BigDecimal electricity;
|
||||
@ExcelProperty(value = "新增物业费缴费单位")
|
||||
private BigDecimal newPropertyFeeUnits;
|
||||
|
||||
/**
|
||||
* 缴费业务
|
||||
* 新增餐费缴费单位
|
||||
*/
|
||||
@ExcelProperty(value = "缴费业务")
|
||||
private BigDecimal charge;
|
||||
@ExcelProperty(value = "新增餐费缴费单位")
|
||||
private BigDecimal newCateringFeeUnits;
|
||||
|
||||
/**
|
||||
* 外汇业务
|
||||
* 新开立外汇账户有效户
|
||||
*/
|
||||
@ExcelProperty(value = "外汇业务")
|
||||
private BigDecimal forex;
|
||||
@ExcelProperty(value = "新开立外汇账户有效户")
|
||||
private BigDecimal newForeignAccounts;
|
||||
|
||||
/**
|
||||
* 理财业务
|
||||
* 新增理财销售有效户(个人)
|
||||
*/
|
||||
@ExcelProperty(value = "理财业务")
|
||||
private BigDecimal financing;
|
||||
@ExcelProperty(value = "新增理财销售有效户(个人)")
|
||||
private BigDecimal newIndividualTreasury;
|
||||
|
||||
/**
|
||||
* 新增理财销售有效户(对公)
|
||||
*/
|
||||
@ExcelProperty(value = "新增理财销售有效户(对公)")
|
||||
private BigDecimal newCorporateTreasury;
|
||||
|
||||
/**
|
||||
* 理财销售系统业务量
|
||||
*/
|
||||
@ExcelProperty(value = "理财销售系统业务量")
|
||||
private BigDecimal treasuryTransactions;
|
||||
|
||||
/**
|
||||
* 代销定期类理财产品
|
||||
*/
|
||||
@ExcelProperty(value = "代销定期类理财产品")
|
||||
private BigDecimal regularProducts;
|
||||
|
||||
/**
|
||||
* 新增公积金缴存账户
|
||||
*/
|
||||
@ExcelProperty(value = "新增公积金缴存账户")
|
||||
private BigDecimal xzgjjjczh;
|
||||
private BigDecimal newHousingFund;
|
||||
|
||||
/**
|
||||
* 合计计价
|
||||
*/
|
||||
@ExcelProperty(value = "合计计价")
|
||||
private BigDecimal totalScore;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@ExcelProperty(value = "日期")
|
||||
private String importTime;
|
||||
|
||||
/**
|
||||
* 冗余1
|
||||
*/
|
||||
@ExcelProperty(value = "冗余1")
|
||||
private BigDecimal fill1;
|
||||
|
||||
/**
|
||||
* 冗余2
|
||||
*/
|
||||
@ExcelProperty(value = "冗余2")
|
||||
private BigDecimal fill2;
|
||||
|
||||
/**
|
||||
* 冗余4
|
||||
*/
|
||||
@ExcelProperty(value = "冗余4")
|
||||
private BigDecimal fill3;
|
||||
|
||||
/**
|
||||
* 冗余4
|
||||
*/
|
||||
@ExcelProperty(value = "冗余4")
|
||||
private BigDecimal fill4;
|
||||
|
||||
/**
|
||||
* 冗余5
|
||||
*/
|
||||
@ExcelProperty(value = "冗余5")
|
||||
private BigDecimal fill5;
|
||||
|
||||
/**
|
||||
* 冗余6
|
||||
*/
|
||||
@ExcelProperty(value = "冗余6")
|
||||
private BigDecimal fill6;
|
||||
|
||||
/**
|
||||
* 冗余7
|
||||
*/
|
||||
@ExcelProperty(value = "冗余7")
|
||||
private BigDecimal fill7;
|
||||
|
||||
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ public class MpsManualPricingImportListener extends AnalysisEventListener<MpsMan
|
||||
private final Boolean isUpdateSupport;
|
||||
private final Long operUserId;
|
||||
private int countN = 1;
|
||||
private String importTime;
|
||||
|
||||
// 存储所有解析成功的对象
|
||||
private final Collection<MpsManualPricing> successList = new ArrayList<>();
|
||||
@ -47,10 +48,11 @@ public class MpsManualPricingImportListener extends AnalysisEventListener<MpsMan
|
||||
//private final Collection<Pair<MpsManualPricingImportVo, String>> failureList = new ArrayList<>();
|
||||
private final Collection<Pair<Integer, String>> failureList = new ArrayList<>();
|
||||
|
||||
public MpsManualPricingImportListener(Boolean isUpdateSupport) {
|
||||
public MpsManualPricingImportListener(Boolean isUpdateSupport, String importTime) {
|
||||
this.mpsManualPricingService = SpringUtils.getBean(IMpsManualPricingService.class);
|
||||
this.isUpdateSupport = isUpdateSupport;
|
||||
this.operUserId = LoginHelper.getUserId();
|
||||
this.importTime = importTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -66,7 +68,7 @@ public class MpsManualPricingImportListener extends AnalysisEventListener<MpsMan
|
||||
|
||||
// 2. 转换为业务对象
|
||||
MpsManualPricing mpsManualPricing = BeanUtil.toBean(mpsManualPricingImportVo, MpsManualPricing.class);
|
||||
|
||||
mpsManualPricing.setImportTime(importTime);
|
||||
// 3. 添加到成功列表(稍后批量处理)
|
||||
successList.add(mpsManualPricing);
|
||||
|
||||
|
@ -10,11 +10,13 @@ import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.common.mybatis.annotation.DataColumn;
|
||||
import org.dromara.common.mybatis.annotation.DataPermission;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 手工导入计价Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-07-25
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
public interface MpsManualPricingMapper extends BaseMapperPlus<MpsManualPricing, MpsManualPricingVo> {
|
||||
|
||||
@ -33,4 +35,7 @@ public interface MpsManualPricingMapper extends BaseMapperPlus<MpsManualPricing,
|
||||
//})
|
||||
// List<SysUserExportVo> selectMpsManualPricingExportList(@Param(Constants.WRAPPER) Wrapper<MpsManualPricing> queryWrapper);
|
||||
|
||||
// 批量插入
|
||||
void batchInsert(@Param("list") Collection<MpsManualPricing> list);
|
||||
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ import java.util.List;
|
||||
* 手工导入计价Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-07-25
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
public interface IMpsManualPricingService {
|
||||
|
||||
@ -29,7 +29,7 @@ public interface IMpsManualPricingService {
|
||||
* @param id 主键
|
||||
* @return 手工导入计价
|
||||
*/
|
||||
MpsManualPricingVo queryById(Integer id);
|
||||
MpsManualPricingVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询手工导入计价列表
|
||||
@ -71,5 +71,8 @@ public interface IMpsManualPricingService {
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Integer> ids, Boolean isValid);
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
Boolean deleteDataByMonth(String importMonth);
|
||||
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.original.domain.OriginalHeat;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.mps.domain.bo.MpsManualPricingBo;
|
||||
import org.dromara.mps.domain.vo.MpsManualPricingVo;
|
||||
@ -25,7 +26,7 @@ import java.util.*;
|
||||
* 手工导入计价Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-07-25
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@ -49,6 +50,29 @@ public class MpsManualPricingServiceImpl implements IMpsManualPricingService {
|
||||
baseMapper.insertOrUpdateBatch(list);
|
||||
} else {
|
||||
baseMapper.insertBatch(list);
|
||||
|
||||
/**
|
||||
* 多笔写入方式有循环写入、开启数据库batch模式、sql拼接后多笔入库以及mapper foreach多笔写入模式
|
||||
* 经对比验证,foreach方式效率最高
|
||||
*
|
||||
* **/
|
||||
|
||||
//由于mybatis的批量方法为伪批量,以下优化为真批量
|
||||
//SqlHelper与service的注解事务管理冲突,所以此处自行写分批
|
||||
// int batchSize = 1000;//每批1000条
|
||||
// List<MpsManualPricing> batchList = new ArrayList<>(batchSize);
|
||||
// for (MpsManualPricing item : list) {
|
||||
// batchList.add(item);
|
||||
// if (batchList.size() == batchSize) {
|
||||
// baseMapper.batchInsert(batchList);
|
||||
// batchList.clear();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // 处理最后一批不满batchSize的数据
|
||||
// if (!batchList.isEmpty()) {
|
||||
// baseMapper.batchInsert(batchList);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +95,7 @@ public class MpsManualPricingServiceImpl implements IMpsManualPricingService {
|
||||
* @return 手工导入计价
|
||||
*/
|
||||
@Override
|
||||
public MpsManualPricingVo queryById(Integer id){
|
||||
public MpsManualPricingVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
@ -105,17 +129,30 @@ public class MpsManualPricingServiceImpl implements IMpsManualPricingService {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MpsManualPricing> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(MpsManualPricing::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getYxId()), MpsManualPricing::getYxId, bo.getYxId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBranch()), MpsManualPricing::getBranch, bo.getBranch());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getIdcardNo()), MpsManualPricing::getIdcardNo, bo.getIdcardNo());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getName()), MpsManualPricing::getName, bo.getName());
|
||||
lqw.eq(bo.getDate() != null, MpsManualPricing::getDate, bo.getDate());
|
||||
lqw.eq(bo.getClzhsdshlclts() != null, MpsManualPricing::getClzhsdshlclts, bo.getClzhsdshlclts());
|
||||
lqw.eq(bo.getWater() != null, MpsManualPricing::getWater, bo.getWater());
|
||||
lqw.eq(bo.getElectricity() != null, MpsManualPricing::getElectricity, bo.getElectricity());
|
||||
lqw.eq(bo.getCharge() != null, MpsManualPricing::getCharge, bo.getCharge());
|
||||
lqw.eq(bo.getForex() != null, MpsManualPricing::getForex, bo.getForex());
|
||||
lqw.eq(bo.getFinancing() != null, MpsManualPricing::getFinancing, bo.getFinancing());
|
||||
lqw.eq(bo.getXzgjjjczh() != null, MpsManualPricing::getXzgjjjczh, bo.getXzgjjjczh());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPosition()), MpsManualPricing::getPosition, bo.getPosition());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMarketingCode()), MpsManualPricing::getMarketingCode, bo.getMarketingCode());
|
||||
lqw.eq(bo.getMerchantRetentionRate() != null, MpsManualPricing::getMerchantRetentionRate, bo.getMerchantRetentionRate());
|
||||
lqw.eq(bo.getNewPartyFeeUnits() != null, MpsManualPricing::getNewPartyFeeUnits, bo.getNewPartyFeeUnits());
|
||||
lqw.eq(bo.getNewPropertyFeeUnits() != null, MpsManualPricing::getNewPropertyFeeUnits, bo.getNewPropertyFeeUnits());
|
||||
lqw.eq(bo.getNewCateringFeeUnits() != null, MpsManualPricing::getNewCateringFeeUnits, bo.getNewCateringFeeUnits());
|
||||
lqw.eq(bo.getNewForeignAccounts() != null, MpsManualPricing::getNewForeignAccounts, bo.getNewForeignAccounts());
|
||||
lqw.eq(bo.getNewIndividualTreasury() != null, MpsManualPricing::getNewIndividualTreasury, bo.getNewIndividualTreasury());
|
||||
lqw.eq(bo.getNewCorporateTreasury() != null, MpsManualPricing::getNewCorporateTreasury, bo.getNewCorporateTreasury());
|
||||
lqw.eq(bo.getTreasuryTransactions() != null, MpsManualPricing::getTreasuryTransactions, bo.getTreasuryTransactions());
|
||||
lqw.eq(bo.getRegularProducts() != null, MpsManualPricing::getRegularProducts, bo.getRegularProducts());
|
||||
lqw.eq(bo.getNewHousingFund() != null, MpsManualPricing::getNewHousingFund, bo.getNewHousingFund());
|
||||
lqw.eq(bo.getTotalScore() != null, MpsManualPricing::getTotalScore, bo.getTotalScore());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getImportTime()), MpsManualPricing::getImportTime, bo.getImportTime());
|
||||
lqw.eq(bo.getFill1() != null, MpsManualPricing::getFill1, bo.getFill1());
|
||||
lqw.eq(bo.getFill2() != null, MpsManualPricing::getFill2, bo.getFill2());
|
||||
lqw.eq(bo.getFill3() != null, MpsManualPricing::getFill3, bo.getFill3());
|
||||
lqw.eq(bo.getFill4() != null, MpsManualPricing::getFill4, bo.getFill4());
|
||||
lqw.eq(bo.getFill5() != null, MpsManualPricing::getFill5, bo.getFill5());
|
||||
lqw.eq(bo.getFill6() != null, MpsManualPricing::getFill6, bo.getFill6());
|
||||
lqw.eq(bo.getFill7() != null, MpsManualPricing::getFill7, bo.getFill7());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@ -164,10 +201,17 @@ public class MpsManualPricingServiceImpl implements IMpsManualPricingService {
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Integer> ids, Boolean isValid) {
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteDataByMonth(String importMonth) {
|
||||
|
||||
return baseMapper.delete(new LambdaQueryWrapper<MpsManualPricing>().eq(MpsManualPricing::getImportTime, importMonth))>0;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,77 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.mps.mapper.MpsManualPricingMapper">
|
||||
|
||||
<!--mysql写法,达梦兼容-->
|
||||
<insert id="batchInsert">
|
||||
INSERT INTO mps_manual_pricing
|
||||
(
|
||||
id,
|
||||
branch,
|
||||
idcard_no,
|
||||
name,
|
||||
position,
|
||||
marketing_code,
|
||||
merchant_retention_rate,
|
||||
new_party_fee_units,
|
||||
new_property_fee_units,
|
||||
new_catering_fee_units,
|
||||
new_foreign_accounts,
|
||||
new_individual_treasury,
|
||||
new_corporate_treasury,
|
||||
treasury_transactions,
|
||||
regular_products,
|
||||
new_housing_fund,
|
||||
total_score,
|
||||
import_time,
|
||||
fill1,
|
||||
fill2,
|
||||
fill3,
|
||||
fill4,
|
||||
fill5,
|
||||
fill6,
|
||||
fill7,
|
||||
tenant_id,
|
||||
create_dept,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.branch},
|
||||
#{item.idcardNo},
|
||||
#{item.name},
|
||||
#{item.position},
|
||||
#{item.marketingCode},
|
||||
#{item.merchantRetentionRate},
|
||||
#{item.newPartyFeeUnits},
|
||||
#{item.newPropertyFeeUnits},
|
||||
#{item.newCateringFeeUnits},
|
||||
#{item.newForeignAccounts},
|
||||
#{item.newIndividualTreasury},
|
||||
#{item.newCorporateTreasury},
|
||||
#{item.treasuryTransactions},
|
||||
#{item.regularProducts},
|
||||
#{item.newHousingFund},
|
||||
#{item.totalScore},
|
||||
#{item.importTime},
|
||||
#{item.fill1},
|
||||
#{item.fill2},
|
||||
#{item.fill3},
|
||||
#{item.fill4},
|
||||
#{item.fill5},
|
||||
#{item.fill6},
|
||||
#{item.fill7},
|
||||
#{item.tenantId},
|
||||
#{item.createDept},
|
||||
#{item.createBy},
|
||||
#{item.createTime},
|
||||
#{item.updateBy},
|
||||
#{item.updateTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user