zhongrj
2025-02-20 d93c3e0310ad88dbe4d09dcfe0e497356d27f40e
部分查询,导入操作调整
6 files modified
27 ■■■■ changed files
src/main/java/org/springblade/modules/yw/entity/EmergencySuppliesEntity.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/yw/excel/EmergencySuppliesExcel.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/yw/excel/FirmInfoExcel.java 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/yw/mapper/EmergencySuppliesMapper.xml 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/yw/service/impl/EmergencySuppliesServiceImpl.java 7 ●●●●● patch | view | raw | blame | history
src/main/resources/application-dev.yml 6 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/yw/entity/EmergencySuppliesEntity.java
@@ -57,7 +57,7 @@
     * 应急物资类型
     */
    @ApiModelProperty(value = "应急物资类型")
    private Integer type;
    private String type;
    /**
     * 数量
     */
src/main/java/org/springblade/modules/yw/excel/EmergencySuppliesExcel.java
@@ -35,8 +35,9 @@
    private String name;
    @ColumnWidth(20)
    @ExcelProperty(value = "应急物资类型",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "eme_sup_type")
    @ExcelProperty(value = "应急物资类型")
//    @ExcelProperty(value = "应急物资类型",converter = ExcelDictConverter.class)
//    @ExcelDictItemLabel(type = "eme_sup_type")
    private String type;
    /**
     * 数量
src/main/java/org/springblade/modules/yw/excel/FirmInfoExcel.java
@@ -38,6 +38,7 @@
    private String address;
    @ColumnWidth(20)
    @ExcelProperty(value = "行业类别")
//    @ExcelProperty(value = "行业类别",converter = ExcelDictConverter.class)
//    @ExcelDictItemLabel(type = "industry_category")
    private String category;
src/main/java/org/springblade/modules/yw/mapper/EmergencySuppliesMapper.xml
@@ -26,13 +26,12 @@
        yfi.name as firmName,
        ys.per_in_cha as personInCha,ys.per_in_cha_pho as personInChaPhone,ys.address supAdd,
        ys.lng,ys.lat,
        bdb.dict_value as emeSupType,
        yes.type as emeSupType,
        concat(yes.num,ifnull(bdb1.dict_value,'')) as numUnit
        from
        yw_emergency_supplies yes
        left join yw_supplies ys on ys.id = yes.supplies_id and ys.is_deleted = 0
        left join yw_firm_info yfi on yfi.id = yes.firm_id and yfi.is_deleted = 0
        left join blade_dict_biz bdb on bdb.dict_key = yes.type and bdb.code = 'eme_sup_type'
        left join blade_dict_biz bdb1 on bdb1.dict_key = yes.unit and bdb1.code = 'unit'
        where yes.is_deleted = 0
        <if test="emergencySupplies.name!=null and emergencySupplies.name!=''">
@@ -61,14 +60,13 @@
        yfi.name as firmName,
        ys.per_in_cha as personInCha,ys.per_in_cha_pho as personInChaPhone,ys.address supAdd,
        ifnull(ys.lng,yp.lng) as lng,ifnull(ys.lat,yp.lat) as lat,
        bdb.dict_value as emeSupType,
        yes.type as emeSupType,
        concat(yes.num,ifnull(bdb1.dict_value,'')) as numUnit,
        yp.url as panoramicUrl
        from
        yw_emergency_supplies yes
        left join yw_supplies ys on ys.id = yes.supplies_id and ys.is_deleted = 0
        left join yw_firm_info yfi on yfi.id = yes.firm_id and yfi.is_deleted = 0
        left join blade_dict_biz bdb on bdb.dict_key = yes.type and bdb.code = 'eme_sup_type'
        left join blade_dict_biz bdb1 on bdb1.dict_key = yes.unit and bdb1.code = 'unit'
        left join yw_panoramic yp on yp.firm_id = yes.firm_id and yp.is_deleted = 0
        where yes.is_deleted = 0
src/main/java/org/springblade/modules/yw/service/impl/EmergencySuppliesServiceImpl.java
@@ -65,9 +65,9 @@
        for (EmergencySuppliesExcel emergencySuppliesExcel : data) {
            EmergencySuppliesEntity emergencySuppliesEntity = Objects.requireNonNull(BeanUtil.copy(emergencySuppliesExcel, EmergencySuppliesEntity.class));
            // 物资类型转换
            if (!Strings.isBlank(emergencySuppliesExcel.getType())){
                emergencySuppliesEntity.setType(Integer.parseInt(emergencySuppliesExcel.getType()));
            }
//            if (!Strings.isBlank(emergencySuppliesExcel.getType())){
//                emergencySuppliesEntity.setType(Integer.parseInt(emergencySuppliesExcel.getType()));
//            }
            // 物资单位转换
            if (!Strings.isBlank(emergencySuppliesExcel.getUnit())){
                emergencySuppliesEntity.setUnit(Integer.parseInt(emergencySuppliesExcel.getUnit()));
@@ -135,7 +135,6 @@
        wrapper.eq("name",emergencySuppliesExcel.getSuppliesName())
            .eq("is_deleted",0);
        if (!emergencySuppliesExcel.getSuppliesName().contains("园区")
            && !emergencySuppliesExcel.getSuppliesName().contains("码头工业城")
            && !emergencySuppliesExcel.getSuppliesName().contains("环境局")
        ){
            wrapper.eq("firm_id",emergencySuppliesEntity.getFirmId());
src/main/resources/application-dev.yml
@@ -5,7 +5,7 @@
    host: 127.0.0.1
    port: 6379
    password:
    database: 13
    database: 14
    ssl: false
    ##redis 集群环境配置
    #cluster:
@@ -13,9 +13,9 @@
    #  commandTimeout: 5000
  datasource:
    # MySql
    url: jdbc:mysql://139.196.74.78:3306/zhyq_ay_dev?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
    url: jdbc:mysql://127.0.0.1:3306/zhyq_ay_dev?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
    username: root
    password: jxpskj_2018
    password: root
    # PostgreSQL
    #url: jdbc:postgresql://127.0.0.1:5432/bladex_boot
    #username: postgres