Commit d308a261 authored by kongfm's avatar kongfm

Merge remote-tracking branch 'origin/developer' into developer

parents e91fff96 86ac4bcd
...@@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode; ...@@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode;
import java.util.Date; import java.util.Date;
/** /**
* 危化品 * '
* *
* @author system_generator * @author system_generator
* @date 2021-06-29 * @date 2021-06-29
......
...@@ -39,7 +39,7 @@ public class FireTeamDto extends BaseDto { ...@@ -39,7 +39,7 @@ public class FireTeamDto extends BaseDto {
private String companyCode; private String companyCode;
@ExplicitConstraint(indexNum = 1, sourceClass = RoleNameExplicitConstraint.class,method="getFireTeam") //动态下拉内容 @ExplicitConstraint(indexNum = 1, sourceClass = RoleNameExplicitConstraint.class,method="getFireTeam") //动态下拉内容
@ExcelProperty(value = "上级单位", index = 1) @ExcelProperty(value = "上级队伍", index = 1)
@ApiModelProperty(value = "父级名称") @ApiModelProperty(value = "父级名称")
private String parentName; private String parentName;
......
package com.yeejoin.amos.boot.module.common.api.dto; package com.yeejoin.amos.boot.module.common.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.entity.SourceFile; import com.yeejoin.amos.boot.module.common.api.entity.SourceFile;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -20,88 +24,99 @@ import java.util.List; ...@@ -20,88 +24,99 @@ import java.util.List;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "LinkageUnitDto", description = "联动单位") @ApiModel(value = "LinkageUnitDto", description = "联动单位")
public class LinkageUnitDto extends BaseDto { public class LinkageUnitDto extends BaseDto {
@ExcelIgnore
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ExcelProperty(value = "单位名称", index = 0)
@ApiModelProperty(value = "单位名称") @ApiModelProperty(value = "单位名称")
private String unitName; private String unitName;
@ExcelIgnore
@ApiModelProperty(value = "单位code") @ApiModelProperty(value = "单位code")
private String unitCode; private String unitCode;
@ExcelIgnore
@ApiModelProperty(value = "父级单位id") @ApiModelProperty(value = "父级单位id")
private String parentId; private String parentId;
@ApiModelProperty(value = "联动单位类别") @ExcelProperty(value = "服务类别", index = 1)
@ExplicitConstraint(type = "LDDWLB", indexNum =1, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内容
@ApiModelProperty(value = "服务类别")
private String linkageUnitType; private String linkageUnitType;
@ExcelIgnore
@ApiModelProperty(value = "联动单位类别code") @ApiModelProperty(value = "联动单位类别code")
private String linkageUnitTypeCode; private String linkageUnitTypeCode;
@ExcelIgnore
@ApiModelProperty(value = "行政区划") @ApiModelProperty(value = "行政区划")
private String administrativeDivisions; private String administrativeDivisions;
@ExcelIgnore
@ApiModelProperty(value = "行政区划代码") @ApiModelProperty(value = "行政区划代码")
private String administrativeDivisionsCode; private String administrativeDivisionsCode;
@ExcelProperty(value = "地址", index = 2)
@ApiModelProperty(value = "地址") @ApiModelProperty(value = "地址")
private String address; private String address;
@ExcelProperty(value = "经度", index = 3)
@ApiModelProperty(value = "经度") @ApiModelProperty(value = "经度")
private Double longitude; private Double longitude;
@ExcelProperty(value = "纬度", index = 4)
@ApiModelProperty(value = "纬度") @ApiModelProperty(value = "纬度")
private Double latitude; private Double latitude;
@ExcelProperty(value = "协议开始日期", index = 5)
@ApiModelProperty(value = "协议开始日期") @ApiModelProperty(value = "协议开始日期")
private Date agreementStartDate; private Date agreementStartDate;
@ExcelProperty(value = "协议结束日期", index = 6)
@ApiModelProperty(value = "协议结束日期") @ApiModelProperty(value = "协议结束日期")
private Date agreementEndDate; private Date agreementEndDate;
@ExcelProperty(value = "应急联动单位类别", index = 7)
@ExplicitConstraint(type = "YJLDDW", indexNum =7, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内容
@ApiModelProperty(value = "应急联动单位类别") @ApiModelProperty(value = "应急联动单位类别")
private String emergencyLinkageUnit; private String emergencyLinkageUnit;
@ExcelIgnore
@ApiModelProperty(value = "应急联动单位类别code") @ApiModelProperty(value = "应急联动单位类别code")
private String emergencyLinkageUnitCode; private String emergencyLinkageUnitCode;
@ExcelProperty(value = "联系人", index = 8)
@ApiModelProperty(value = "联系人 ") @ApiModelProperty(value = "联系人 ")
private String contactUser; private String contactUser;
@ExcelProperty(value = "联系人电话", index = 9)
@ApiModelProperty(value = "联系人电话") @ApiModelProperty(value = "联系人电话")
private String contactPhone; private String contactPhone;
@ExcelIgnore
@ApiModelProperty(value = "实例id") @ApiModelProperty(value = "实例id")
private Long instanceId; private Long instanceId;
@ExcelIgnore
@ApiModelProperty(value = "组织机构代码") @ApiModelProperty(value = "组织机构代码")
private String orgCode; private String orgCode;
@ExcelIgnore
@ApiModelProperty(value = "操作人名称") @ApiModelProperty(value = "操作人名称")
private String recUserName; private String recUserName;
@ExcelIgnore
@ApiModelProperty(value = "是否在协议期 ") @ApiModelProperty(value = "是否在协议期 ")
private String inAgreement; private String inAgreement;
@ExcelProperty(value = "消防救援能力", index = 10)
@ApiModelProperty(value = "消防救援能力") @ApiModelProperty(value = "消防救援能力")
private String fireRescueCapability; private String fireRescueCapability;
@ExcelProperty(value = "职责_简要情况", index = 11)
@ApiModelProperty(value = "职责_简要情况") @ApiModelProperty(value = "职责_简要情况")
private String responsibilitiesSituation; private String responsibilitiesSituation;
@ExcelProperty(value = "应急服务内容", index = 12)
@ApiModelProperty(value = "应急服务内容") @ApiModelProperty(value = "应急服务内容")
private String emergencyServiceContent; private String emergencyServiceContent;
@ExcelProperty(value = "单位_简要情况", index = 13)
@ApiModelProperty(value = "单位_简要情况") @ApiModelProperty(value = "单位_简要情况")
private String unitSituation; private String unitSituation;
@ExcelIgnore
@ApiModelProperty(value = "联动单位图片") @ApiModelProperty(value = "联动单位图片")
private List<SourceFile> image; private List<SourceFile> image;
@ExcelIgnore
@ApiModelProperty(value = "车辆数量") @ApiModelProperty(value = "车辆数量")
private String vehicleNumber; private String vehicleNumber;
@ExcelIgnore
@ApiModelProperty(value = "特岗人数") @ApiModelProperty(value = "特岗人数")
private String personNumber; private String personNumber;
} }
package com.yeejoin.amos.boot.module.common.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 机构/部门/人员表
*
* @author tb
* @date 2021-06-18
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="OrgUsrExcelDto", description="机构/部门/人员表")
public class OrgUsrExcelDto extends BaseDto {
@ExcelProperty(value = "姓名", index = 0)
@ApiModelProperty(value = "机构/部门名称")
private String bizOrgName;
@ExcelIgnore
@ApiModelProperty(value = "机构编码")
private String bizOrgCode;
@ExcelIgnore
@ApiModelProperty(value = "amos中公司/部门ID")
private String amosOrgId;
@ExcelIgnore
@ApiModelProperty(value = "amos中公司/部门编码")
private String amosOrgCode;
@ExcelIgnore
@ApiModelProperty(value = "机构类型(部门:DEPARTMENT,单位:COMPANY,人员:PERSON)")
private String bizOrgType;
@ExcelIgnore
@ApiModelProperty(value = "所属建筑名称")
private String buildName;
@ExcelIgnore
@ApiModelProperty(value = "所属建筑ID")
private String buildId;
@ExcelProperty(value = "所属单位部门", index = 1)
@ExplicitConstraint(indexNum = 1, sourceClass = RoleNameExplicitConstraint.class, method = "getparent") //固定下拉内容
@ApiModelProperty(value = "归属机构/部门/人员")
private String parentId;
@ExcelIgnore
@ApiModelProperty(value = "扩展属性1")
private String orgExpandAttr1;
@ExcelIgnore
@ApiModelProperty(value = "扩展属性2")
private String orgExpandAttr2;
@ExcelIgnore
@ApiModelProperty(value = "扩展属性3")
private String orgExpandAttr3;
@ExcelIgnore
@ApiModelProperty(value = "扩展属性4")
private String orgExpandAttr4;
@ExcelIgnore
private String orgExpandAttr5;
@ExcelIgnore
private String orgExpandAttr6;
@ExcelIgnore
private String orgExpandAttr7;
@ExcelIgnore
private String orgExpandAttr8;
@ExcelIgnore
@ApiModelProperty(value = "更新人")
@TableField(fill= FieldFill.INSERT_UPDATE)
private String recUserName;
@ExcelIgnore
@ApiModelProperty(value = "动态表单值")
private List<DynamicFormInstance> dynamicFormValue;
@ExcelProperty(value = "行政职务", index = 2)
@ExplicitConstraint(type = "XZZW", indexNum =2, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内
private String administrativePositionCode;// 行政职务
@ExcelProperty(value = "审核周期", index = 3)
@ExplicitConstraint(type = "SHZQ", indexNum =3, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内
private String auditCycle; //审核周期
@ExcelProperty(value = "证件号码", index = 4)
private String certificatesNumber;// 证件号码
@ExcelProperty(value = "证件类型", index = 5)
@ExplicitConstraint(type = "RYZJLX", indexNum =5, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内
private String certificatesTypeCode; //证件类型
@ExcelProperty(value = "持证类别", index = 6)
@ExplicitConstraint(type = "CZLB", indexNum =6, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内
private String certificateType; //持证类别
@ExcelProperty(value = "消防管理岗位", index = 7)
@ExplicitConstraint(type = "XFGLGW", indexNum =7, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内
private String fireManagementPostCode; //消防管理岗位
@ExcelProperty(value = "性别", index = 8)
@ExplicitConstraint(type = "XB", indexNum =8, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内
private String gender; //性别
@ExcelProperty(value = "消防管理组织机构内部职务", index = 9)
@ExplicitConstraint(type = "JGNBZW", indexNum =9, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内
private String internalPositionCode; //消防管理组织机构内部职务
@ExcelProperty(value = "员工编号", index = 10)
private String personNumber; //员工编号
@ExcelProperty(value = "岗位类型", index = 11)
@ExplicitConstraint(type = "GWMC", indexNum =11, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内
private String positionType; //岗位类型
@ExcelProperty(value = "是否进行安全培训", index = 12)
@ExplicitConstraint(type = "AQPX", indexNum =12, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内
private String safetyTraining; //是否进行安全培训
@ExcelProperty(value = "人员状态", index = 13)
@ExplicitConstraint(type = "RYZT", indexNum =13, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内
private String stateCode; //人员状态
@ExcelProperty(value = "联系电话", index = 14)
private String telephone; //联系电话
}
...@@ -60,7 +60,7 @@ public interface LinkageUnitMapper extends BaseMapper<LinkageUnit> { ...@@ -60,7 +60,7 @@ public interface LinkageUnitMapper extends BaseMapper<LinkageUnit> {
*/ */
Page<List<LinkageUnitDto>> getEmergencyLinkageUnitList(IPage<LinkageUnitDto> page,String unitName, Page<List<LinkageUnitDto>> getEmergencyLinkageUnitList(IPage<LinkageUnitDto> page,String unitName,
String linkageUnitTypeCode, String emergencyLinkageUnitCode); String linkageUnitTypeCode, String emergencyLinkageUnitCode);
List<LinkageUnitDto> exportToExcel();
} }
...@@ -59,4 +59,8 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> { ...@@ -59,4 +59,8 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List< OrgUsrzhDto> getOrgUsrzhDto(@Param("bizOrgName")String bizOrgName); List< OrgUsrzhDto> getOrgUsrzhDto(@Param("bizOrgName")String bizOrgName);
List< Map<String,Object>> getparent();
List< OrgUsrExcelDto> exportToExcel();
} }
...@@ -48,5 +48,6 @@ public interface ILinkageUnitService { ...@@ -48,5 +48,6 @@ public interface ILinkageUnitService {
* @return * @return
*/ */
public List<Menu> getEmergencyLinkageUnitCodeGroupBy(String type, String rootName) ; public List<Menu> getEmergencyLinkageUnitCodeGroupBy(String type, String rootName) ;
List<LinkageUnitDto> exportToExcel();
} }
...@@ -173,4 +173,7 @@ public interface IOrgUsrService { ...@@ -173,4 +173,7 @@ public interface IOrgUsrService {
List<ESOrgUsrDto> selectByIddata(String name); List<ESOrgUsrDto> selectByIddata(String name);
List< Map<String,Object>> getparent();
List< OrgUsrExcelDto> exportToExcel();
} }
...@@ -87,6 +87,29 @@ ...@@ -87,6 +87,29 @@
emergency_linkage_unit_code emergency_linkage_unit_code
</select> </select>
<select id="exportToExcel" resultType="com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto">
select
a.unit_name unitName,
a.linkage_unit_type linkageUnitType,
a.address ,
a.latitude,
a.longitude,
a.agreement_start_date agreementStartDate,
a.agreement_end_date agreementEndDate,
a.contact_user contactUser,
a.contact_phone contactPhone,
b.*
from cb_linkage_unit a LEFT JOIN
(SELECT
m.instance_id,
max(case m.field_code when 'emergencyServiceContent' then m.field_value end) emergencyServiceContent,
max(case m.field_code when 'fireRescueCapability' then m.field_value end) fireRescueCapability,
max(case m.field_code when 'responsibilitiesSituation' then m.field_value end) responsibilitiesSituation,
max(case m.field_code when 'unitSituation' then m.field_value end) unitSituation
FROM cb_dynamic_form_instance m GROUP BY m.instance_id) b
on b.instance_id=a.instance_id where a.unit_name is not null
</select>
<select id="getEmergencyLinkageUnitList" <select id="getEmergencyLinkageUnitList"
......
...@@ -297,4 +297,43 @@ LEFT JOIN ( ...@@ -297,4 +297,43 @@ LEFT JOIN (
keysite.belong_id keysite.belong_id
) keysite_sur ON company_sur.sequence_nbr = keysite_sur.belong_id ) keysite_sur ON company_sur.sequence_nbr = keysite_sur.belong_id
</select> </select>
<select id="getparent" resultType="Map">
SELECT important_companys.id ,important_companys.name
FROM important_companys
</select>
<select id="exportToExcel" resultType="com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto">
select
a.biz_org_name bizOrgName,
(select c.biz_org_name from cb_org_usr c where c.sequence_nbr=a.parent_id) parentId,
b.*
from cb_org_usr a LEFT JOIN
(SELECT
instance_id,
max(case field_code when 'administrativePositionCode' then field_value_label end) administrativePositionCode,
max(case field_code when 'auditCycle' then field_value_label end) auditCycle,
max(case field_code when 'certificatesNumber' then field_value end) certificatesNumber,
max(case field_code when 'certificatesTypeCode' then field_value_label end) certificatesTypeCode,
max(case field_code when 'certificateType' then field_value_label end) certificateType,
max(case field_code when 'fireManagementPostCode' then field_value_label end) fireManagementPostCode,
max(case field_code when 'gender' then field_value_label end) gender,
max(case field_code when 'internalPositionCode' then field_value_label end) internalPositionCode,
max(case field_code when 'personNumber' then field_value end) personNumber,
max(case field_code when 'positionType' then field_value_label end) positionType,
max(case field_code when 'safetyTraining' then field_value_label end) safetyTraining,
max(case field_code when 'stateCode' then field_value_label end) stateCode,
max(case field_code when 'telephone' then field_value end) telephone
FROM cb_dynamic_form_instance GROUP BY instance_id) b
on b.instance_id=a.sequence_nbr where a.biz_org_name is not null
</select>
</mapper> </mapper>
package com.yeejoin.amos.boot.module.jcs.api.enums; package com.yeejoin.amos.boot.module.jcs.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/** /**
* 导出类型常量 * 导出类型常量
***/ ***/
public class ExcelEnums { @Getter
public static final String WHP = "WHP";// ("WHP","危险品"), @AllArgsConstructor
public static final String XFZJ = "XFZJ";//("XFZJ","消防专家"), public enum ExcelEnums {
public static final String SYXX = "SYXX";//("SYXX","水源信息"), WHP ("危险品", "危险品", "com.yeejoin.amos.boot.module.common.api.dto.FireChemicalDto","WHP"),// ("WHP","危险品"),
public static final String HKQ = "HKQ";//("HKQ","航空器"); XFZJ ("消防专家", "消防专家", "com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto","XFZJ"),//("XFZJ","消防专家"),
public static final String XFDW = "XFDW";//("XFDW","消防队伍") SYXX ("水源信息", "水源信息", "com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto","SYXX"),//("SYXX","水源信息"),
public static final String WXXFZ = "WXXFZ";//("WXXFZ","微型消防站") HKQ ("航空器", "航空器", "com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto","HKQ"),//("HKQ","航空器");
public static final String XFRY = "XFRY";//("XFRY","消防人员") XFDW ("消防队伍", "消防队伍", "com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto","XFDW"),//("XFDW","消防队伍")
public static final String CLZQ = "CLZQ";//("CLZQ","车辆执勤") WXXFZ("微型消防站", "微型消防站", "com.yeejoin.amos.boot.module.common.api.dto.FireStationDto","WXXFZ"),//("WXXFZ","微型消防站")
public static final String RYZB = "RYZB";//("RYZB","人员值班") XFRY ("消防人员", "消防人员", "com.yeejoin.amos.boot.module.common.api.dto.FirefightersExcelDto","XFRY"),//("XFRY","消防人员")
public static final String WBRY = "WBRY";//("WBRY",维保人员) WBRY ("维保人员", "维保人员", "com.yeejoin.amos.boot.module.common.api.dto.MaintenancePersonExcleDto","WBRY"),//("WBRY",维保人员)
public static final String KEYSITE = "KEYSITE";//{"KEYSITE":重點部位} KEYSITE ("重點部位", "重點部位", "com.yeejoin.amos.boot.module.common.api.dto.KeySiteExcleDto","KEYSITE"),//{"KEYSITE":重點部位}
CLZQ ("车辆执勤", "车辆执勤", "com.yeejoin.amos.boot.module.common.api.dto.DutyCarExcelDto","CLZQ"),//("CLZQ","车辆执勤")
JCDWRY ("机场单位人员", "机场单位人员", "com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto","JCDWRY"),//("JCDW","机场单位")
LDDW ("联动单位", "联动单位", "com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto","LDDW"),//("JCDW","机场单位")
RYZB ("人员值班", "人员值班", "com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto","RYZB");//("RYZB","人员值班")
private String fileName;
private String sheetName;
private String classUrl;
private String type;
public static ExcelEnums getByKey(String type) {
for (ExcelEnums status : ExcelEnums.values())
{
if (status.getType().equals(type))
{
return status;
}
}
return null;
}
} }
...@@ -64,9 +64,6 @@ public class RescueStationDto extends BaseDto { ...@@ -64,9 +64,6 @@ public class RescueStationDto extends BaseDto {
@ApiModelProperty(value = "所属单位id") @ApiModelProperty(value = "所属单位id")
private Long affiliatedUnitId; private Long affiliatedUnitId;
@ApiModelProperty(value = "经纬度")
private String longitudeLatitude;
@ApiModelProperty(value = "经度") @ApiModelProperty(value = "经度")
private String longitude; private String longitude;
......
...@@ -70,9 +70,6 @@ public class RescueStation extends BaseEntity { ...@@ -70,9 +70,6 @@ public class RescueStation extends BaseEntity {
@ApiModelProperty(value = "所属单位id") @ApiModelProperty(value = "所属单位id")
private Long affiliatedUnitId; private Long affiliatedUnitId;
@ApiModelProperty(value = "经纬度")
private String longitudeLatitude;
@ApiModelProperty(value = "经度") @ApiModelProperty(value = "经度")
private String longitude; private String longitude;
......
//package com.yeejoin.amos.boot.module.tzs.api.vo;
//
//import com.baomidou.mybatisplus.annotation.TableName;
//import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//import lombok.experimental.Accessors;
//
//import java.util.Date;
//
///**
// * 警情接警填报记录
// *
// * @author litw
// * @date 2021-08-03
// */
//@Data
//@EqualsAndHashCode(callSuper = true)
//@Accessors(chain = true)
//@TableName("tz_alert_called")
//@ApiModel(value = "AlertCalledVo", description = "AlertCalledVo")
//public class AlertCalledVo extends BaseEntity {
//
// private static final long serialVersionUID = 1L;
//
// /**
// * 警情状态 (0 未结案 1 结案)
// */
// @ApiModelProperty("警情状态")
// private Boolean alertStatus;
//
// /**
// * 警情来源类型
// */
// @ApiModelProperty("警情来源类型")
// private String alertSource;
//
// /**
// * 警情来源类型Code
// */
// @ApiModelProperty("警情来源类型Code")
// private String alertSourceCode;
//
// /**
// * 接警时间
// */
// @ApiModelProperty("接警时间")
// private Date callTime;
//
// /**
// * 报警人电话
// */
// @ApiModelProperty("报警人电话")
// private String emergencyCall;
//
// /**
// * 报警人名称,默认为先生或女士
// */
// @ApiModelProperty("报警人名称,默认为先生或女士")
// private String emergencyPerson;
//
// /**
// * 联系人姓名
// */
// @ApiModelProperty("联系人姓名")
// private String contactUser;
//
// /**
// * 联系人电话
// */
// @ApiModelProperty("联系人电话")
// private String contactPhone;
//
// /**
// * 设备分类,字典表数据
// */
// @ApiModelProperty("设备分类")
// private String equipmentClassification;
//
// /**
// * 报警类型
// */
// @ApiModelProperty("报警类型")
// private String type;
//
// /**
// * 警情类别
// */
// @ApiModelProperty("警情类别")
// private String alarmType;
//
// /**
// * 通话记录信息id
// */
// @ApiModelProperty("通话记录信息id")
// private Integer callRecordId;
//
// /**
// * 警情阶段
// */
// @ApiModelProperty("警情阶段")
// private String alertStage;
//
// /**
// * 父警情id
// */
// @ApiModelProperty("父警情id")
// private Long fatherAlert;
//
// /**
// * 设备识别码
// */
// @ApiModelProperty("设备识别码")
// private String deviceId;
//
// /**
// * 注册编码
// */
// @ApiModelProperty("注册编码")
// private String registrationCode;
//
// /**
// * 备注
// */
// @ApiModelProperty("备注")
// private String remark;
//
// /**
// * 更新时间
// */
// @ApiModelProperty("更新时间")
// private Date updateTime;
//
// /**
// * 设备分类code
// */
// @ApiModelProperty("设备分类code")
// private String equipmentClassificationCode;
//
// /**
// * 报警类型code
// */
// @ApiModelProperty("报警类型code")
// private String typeCode;
//
// /**
// * 警情类别code
// */
// @ApiModelProperty("警情类别code")
// private String alarmTypeCode;
//
// /**
// * 警情阶段code
// */
// @ApiModelProperty("警情阶段code")
// private String alertStageCode;
//
// /**
// * 组织机构
// */
// @ApiModelProperty("组织机构")
// private String orgCode;
//
//
// @ApiModelProperty(value = "使用单位")
// private String useUnit;
//
//
// @ApiModelProperty(value = "地址")
// private String address;
//
// @ApiModelProperty(value = "接警时间开始---用于列表过滤")
// private Date callTimeStart ;
//
// @ApiModelProperty(value = "接警时间结束---用于列表过滤")
// private Date callTimeEnd ;
//
// @ApiModelProperty(value = "是否处警")
// private Boolean isFatherAlert = false;
//
// @ApiModelProperty(value = "所属省")
// private String province;
//
// @ApiModelProperty(value = "所属地市")
// private String city;
//
// @ApiModelProperty(value = "所属区县")
// private String district;
//
// @ApiModelProperty(value = "所属区域代码")
// private String regionCode;
//
// @ApiModelProperty(value = "使用场所分类")
// private String useSiteCategory;
//
// @ApiModelProperty(value = "电梯使用状态")
// private Integer useStatus;
//
// @ApiModelProperty(value = "警情地址")
// private String alertAddress;
//
// @ApiModelProperty(value = "响应级别")
// private String responseLevel;
//
// /**
// * 工单编号
// */
// @ApiModelProperty("工单编号")
// private String workOrderNumber;
//
// @ApiModelProperty(value = "接警时间str")
// private String callTimeStr;
//
//}
//package com.yeejoin.amos.boot.module.tzs.api.vo;
//
//import com.baomidou.mybatisplus.annotation.TableName;
//import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//import lombok.experimental.Accessors;
//
//import java.util.Date;
//import java.util.List;
//
///**
// * @author tb
// * @date 2021-06-01
// */
//@Data
//@EqualsAndHashCode(callSuper = true)
//@Accessors(chain = true)
//@TableName("tcb_elevator")
//@ApiModel(value = "ElevatorDto", description = "ElevatorDto")
//public class ElevatorDto extends BaseEntity {
//
// private static final long serialVersionUID = 1L;
//
//
// @ApiModelProperty(value = "电梯应急救援识别码")
// private Integer rescueCode;
//
// @ApiModelProperty(value = "设备注册代码")
// private String registerCode;
//
// @ApiModelProperty(value = "所属省")
// private String province;
//
// @ApiModelProperty(value = "所属地市")
// private String city;
//
// @ApiModelProperty(value = "所属区县")
// private String district;
//
// @ApiModelProperty(value = "所属区域代码")
// private String regionCode;
//
// @ApiModelProperty(value = "安装地址")
// private String address;
//
// @ApiModelProperty(value = "内部编号")
// private String innerNum;
//
// @ApiModelProperty(value = "电梯品牌")
// private String brand;
//
// @ApiModelProperty(value = "出厂编号")
// private String factoryNum;
//
// @ApiModelProperty(value = "电梯安装单位")
// private String installationUnit;
//
// @ApiModelProperty(value = "制造日期(出厂时间)")
// private Date factoryDate;
//
// @ApiModelProperty(value = "电梯大修/改造日期")
// private Date overhaulDate;
//
// @ApiModelProperty(value = "开始使用日期")
// private Date startUseDate;
//
// @ApiModelProperty(value = "设备类别")
// private String category;
//
// @ApiModelProperty(value = "使用场所分类")
// private String useSiteCategory;
//
// @ApiModelProperty(value = "电梯型号")
// private String model;
//
// @ApiModelProperty(value = "电梯层数")
// private Integer floors;
//
// @ApiModelProperty(value = "电梯站数")
// private Integer stations;
//
// @ApiModelProperty(value = "电梯门数")
// private Integer doors;
//
// @ApiModelProperty(value = "电梯额定速度(单位:m/s)")
// private Float ratedSpeed;
//
// @ApiModelProperty(value = "电梯额定载重量(单位:kg)")
// private Float ratedLoad;
//
// @ApiModelProperty(value = "最大荷载人数")
// private Integer maxPersonLoad;
//
// @ApiModelProperty(value = "提升高度")
// private Float raiseHeight;
//
// @ApiModelProperty(value = "拖动方式")
// private String dragMode;
//
// @ApiModelProperty(value = "电梯使用状态")
// private Integer useStatus;
//
// @ApiModelProperty(value = "使用单位")
// private String useUnit;
//
// @ApiModelProperty(value = "使用单位id")
// private Long useUnitId;
//
// @ApiModelProperty(value = "制造单位名称")
// private String manufacturerName;
//
// @ApiModelProperty(value = "制造许可编号")
// private String manufacturingLicense;
//
// @ApiModelProperty(value = "维保类型")
// private String maintainType;
//
// @ApiModelProperty(value = "维护周期")
// private String maintainPeriod;
//
// @ApiModelProperty(value = "维保单位")
// private String maintainUnit;
//
// @ApiModelProperty(value = "维保单位id")
// private Long maintainUnitId;
//
// @ApiModelProperty(value = "维保负责人")
// private String maintainLeader;
//
// @ApiModelProperty(value = "维保负责人id")
// private Long maintainLeaderId;
//
// @ApiModelProperty(value = "维保负责人手机")
// private String maintainLeaderPhone;
//
// @ApiModelProperty(value = "主机模式")
// private String hostModel;
//
// @ApiModelProperty(value = "主机编号")
// private String hostNum;
//
// @ApiModelProperty(value = "动力类型")
// private String engineType;
//
// @ApiModelProperty(value = "动力编号")
// private String engineNum;
//
// @ApiModelProperty(value = "面板模型")
// private String panelModel;
//
// @ApiModelProperty(value = "面板编号")
// private String panelNum;
//
// @ApiModelProperty(value = "级联模型")
// private String cascadeModel;
//
// @ApiModelProperty(value = "级联线路模型")
// private String cascadeLineModel;
//
// @ApiModelProperty(value = "扶手带类型")
// private String handrailType;
//
// @ApiModelProperty(value = "扶手面板模型")
// private String handrailPanelModel;
//
// @ApiModelProperty(value = "扶手面板品牌")
// private String handrailPanelBrand;
//
// @ApiModelProperty(value = "滚转机模式")
// private String rollerMode;
//
// @ApiModelProperty(value = "倾斜的角度")
// private String tiltAngle;
//
// @ApiModelProperty(value = "横向跨度")
// private String horizontalSpan;
//
// @ApiModelProperty(value = "运行噪音")
// private String runningNoise;
//
// @ApiModelProperty(value = "运行方式")
// private String runningMode;
//
// @ApiModelProperty(value = "运行振动")
// private String runningVibration;
//
// @ApiModelProperty(value = "功率")
// private String power;
//
// @ApiModelProperty(value = "设备图片")
// private String photos;
//
// @ApiModelProperty(value = "设备图片")
// private List<Img> img;
//
// @ApiModelProperty(value = "原始表id(来自历史数据库)")
// private String originalId;
//
// @Data
// @EqualsAndHashCode()
// @Accessors(chain = true)
// @ApiModel(value = "Img", description = "Img")
// public static class Img {
// private String url;
//
// public Img(String url) {
// this.url = url;
// }
// }
//
//}
//package com.yeejoin.amos.boot.module.tzs.api.vo;
//
//import com.baomidou.mybatisplus.annotation.TableName;
//import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//import lombok.experimental.Accessors;
//
///**
// * @author tb
// * @date 2021-06-01
// */
//@Data
//@EqualsAndHashCode(callSuper = true)
//@Accessors(chain = true)
//@TableName("cb_maintenance_unit")
//@ApiModel(value = "MaintenanceUnitVo", description = "MaintenanceUnitVo")
//public class MaintenanceUnitVo extends BaseEntity {
//
// private static final long serialVersionUID = 1L;
//
//
// @ApiModelProperty(value = "统一社会信用代码")
// private String socialCreditCode;
//
// @ApiModelProperty(value = "维护保养单位名称")
// private String unitName;
//
// @ApiModelProperty(value = "省份")
// private String province;
//
// @ApiModelProperty(value = "地市")
// private String city;
//
// @ApiModelProperty(value = "区县")
// private String district;
//
// @ApiModelProperty(value = "区域代码")
// private String regionCode;
//
// @ApiModelProperty(value = "地址(详细地址,包括道路、门牌号码)")
// private String address;
//
// @ApiModelProperty(value = "经度")
// private String longitude;
//
// @ApiModelProperty(value = "纬度")
// private String latitude;
//
// @ApiModelProperty(value = "法人id")
// private Long legalPersonId;
//
// @ApiModelProperty(value = "法人")
// private String legalPerson;
//
// @ApiModelProperty(value = "法人电话/注册电话")
// private String legalPersonPhone;
//
// @ApiModelProperty(value = "企业资质等级")
// private String qualificationLevel;
//
// @ApiModelProperty(value = "信用级别")
// private Integer creditLevel;
//
// @ApiModelProperty(value = "许可证编号")
// private String licenseNum;
//
// @ApiModelProperty(value = "值班电话")
// private String dutyPhone;
//
// @ApiModelProperty(value = "紧急电话号码")
// private String emergencyPhone;
//
// @ApiModelProperty(value = "主要负责人1")
// private String principalFirst;
//
// @ApiModelProperty(value = "主要负责人1手机号码")
// private String principalFirstPhone;
//
// @ApiModelProperty(value = "主要负责人1id")
// private Long principalFirstId;
//
// @ApiModelProperty(value = "主要负责人2")
// private String principalSecond;
//
// @ApiModelProperty(value = "主要负责人2手机号码")
// private String principalSecondPhone;
//
// @ApiModelProperty(value = "主要负责人2id")
// private Long principalSecondId;
//
// @ApiModelProperty(value = "原始表id(来自历史数据库)")
// private String originalId;
//
//}
//package com.yeejoin.amos.boot.module.tzs.api.vo;
//
//import com.baomidou.mybatisplus.annotation.TableName;
//import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//import lombok.experimental.Accessors;
//
///**
// * @author tb
// * @date 2021-06-01
// */
//@Data
//@EqualsAndHashCode(callSuper = true)
//@Accessors(chain = true)
//@TableName("tcb_rescue_station")
//@ApiModel(value = "RescueStationVo", description = "RescueStationVo")
//public class RescueStationVo extends BaseEntity {
//
// private static final long serialVersionUID = 1L;
//
//
// @ApiModelProperty(value = "应急救援机构名称")
// private String name;
//
// @ApiModelProperty(value = "省份")
// private String province;
//
// @ApiModelProperty(value = "地市")
// private String city;
//
// @ApiModelProperty(value = "区县")
// private String district;
//
// @ApiModelProperty(value = "区域代码")
// private String regionCode;
//
// @ApiModelProperty(value = "地址(详细地址,包括道路、门牌号码)")
// private String address;
//
// @ApiModelProperty(value = "责任人id")
// private Long principalId;
//
// @ApiModelProperty(value = "主要负责人")
// private String principal;
//
// @ApiModelProperty(value = "负责人电话")
// private String principalPhone;
//
// @ApiModelProperty(value = "应急救援负责人")
// private String rescueLeader;
//
// @ApiModelProperty(value = "应急救援负责人手机号")
// private String rescueLeaderPhone;
//
// @ApiModelProperty(value = "应急救援负责人id")
// private Long rescueLeaderId;
//
// @ApiModelProperty(value = "所属单位(维保单位)")
// private String affiliatedUnit;
//
// @ApiModelProperty(value = "所属单位id")
// private Long affiliatedUnitId;
//
// @ApiModelProperty(value = "经纬度")
// private String longitudeLatitude;
//
//}
//package com.yeejoin.amos.boot.module.tzs.api.vo;
//
//import com.baomidou.mybatisplus.annotation.TableName;
//import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//import lombok.experimental.Accessors;
//
///**
// * @author tb
// * @date 2021-06-01
// */
//@Data
//@EqualsAndHashCode(callSuper = true)
//@Accessors(chain = true)
//@TableName("tcb_use_unit")
//@ApiModel(value = "UseUnitVo", description = "UseUnitVo")
//public class UseUnitVo extends BaseEntity {
//
// private static final long serialVersionUID = 1L;
//
//
// @ApiModelProperty(value = "统一社会信用代码")
// private String socialCreditCode;
//
// @ApiModelProperty(value = "使用单位(小区)名称")
// private String useUnitName;
//
// @ApiModelProperty(value = "小区所属地产品牌")
// private String realEstateBrand;
//
// @ApiModelProperty(value = "物业公司所属品牌")
// private String propertyCompanyBrand;
//
// @ApiModelProperty(value = "省份")
// private String province;
//
// @ApiModelProperty(value = "地市")
// private String city;
//
// @ApiModelProperty(value = "区县")
// private String district;
//
// @ApiModelProperty(value = "区域代码")
// private String regionCode;
//
// @ApiModelProperty(value = "地址")
// private String address;
//
// @ApiModelProperty(value = "责任人id")
// private Long principalId;
//
// @ApiModelProperty(value = "主要负责人")
// private String principal;
//
// @ApiModelProperty(value = "负责人电话")
// private String principalPhone;
//
// @ApiModelProperty(value = "管理部门")
// private String management;
//
// @ApiModelProperty(value = "管理员id")
// private Long managerId;
//
// @ApiModelProperty(value = "电梯安全管理员")
// private String manager;
//
// @ApiModelProperty(value = "电梯管理员手机")
// private String managerPhone;
//
// @ApiModelProperty(value = "原始表id(来自历史数据库)")
// private String originalId;
//
//}
...@@ -150,6 +150,27 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU ...@@ -150,6 +150,27 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
return model; return model;
} }
public LinkageUnitDto saveLinkageModel(LinkageUnitDto linkageUnitDto) {
// 1.保存行数据
String groupCode = this.getGroupCode();
Map<String, Object> map = Bean.BeantoMap(linkageUnitDto);
Long instanceId = dynamicFormInstanceService.commonSave(groupCode, map);
linkageUnitDto.setInstanceId(instanceId);
// 2.保存基本信息
linkageUnitDto.setUnitCode(getUnitCodeStr());
LinkageUnitDto model = createWithModel(linkageUnitDto);
// 3.保存照片信息
sourceFileServiceImpl.saveSourceFile(model.getSequenceNbr(), model.getImage());
// 3.返回保存后的数据
return model;
}
@Override @Override
public LinkageUnitDto queryOne(Long sequenceNbr) { public LinkageUnitDto queryOne(Long sequenceNbr) {
String groupCode = getGroupCode(); String groupCode = getGroupCode();
...@@ -289,4 +310,9 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU ...@@ -289,4 +310,9 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
return menuList; return menuList;
} }
@Override
public List<LinkageUnitDto> exportToExcel() {
return linkageUnitMapper.exportToExcel();
}
} }
\ No newline at end of file
...@@ -6,21 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -6,21 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant; import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser; import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.common.api.dto.CompanyDto; import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.dto.CompanyPerson;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto;
import com.yeejoin.amos.boot.module.common.api.dto.ESOrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.FormValue;
import com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonExcelDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrzhDto;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
...@@ -974,7 +960,17 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -974,7 +960,17 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}); });
return lidataDtos; return lidataDtos;
} }
@Override
public List<Map<String, Object>> getparent() {
return orgUsrMapper.getparent();
}
@Override
public List<OrgUsrExcelDto> exportToExcel() {
return orgUsrMapper.exportToExcel();
}
public List<OrgUsr> getCompanyDetailTree() { public List<OrgUsr> getCompanyDetailTree() {
LambdaQueryWrapper<OrgUsr> wrapper= new LambdaQueryWrapper<OrgUsr>(); LambdaQueryWrapper<OrgUsr> wrapper= new LambdaQueryWrapper<OrgUsr>();
wrapper.eq(OrgUsr::getBizOrgType, "COMPANY"); wrapper.eq(OrgUsr::getBizOrgType, "COMPANY");
......
...@@ -2,16 +2,12 @@ package com.yeejoin.amos.boot.module.jcs.biz.controller; ...@@ -2,16 +2,12 @@ package com.yeejoin.amos.boot.module.jcs.biz.controller;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.ExcelDto; import com.yeejoin.amos.boot.module.common.api.dto.ExcelDto;
import com.yeejoin.amos.boot.module.jcs.api.enums.ExcelEnums;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.ExcelServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.ExcelServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...@@ -34,25 +30,15 @@ public class ExcelController extends BaseController { ...@@ -34,25 +30,15 @@ public class ExcelController extends BaseController {
private static final String NOT_DUTY = "休班"; private static final String NOT_DUTY = "休班";
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "下载模板")
@GetMapping("/template")
public void template(HttpServletResponse response, ExcelDto excelDto) {
try {
excelService.templateExport(response, excelDto);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("系统异常!");
}
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "下载模板") @ApiOperation(value = "下载模板")
@GetMapping("/download/template") @GetMapping("/download/template/{type}")
public void downloadTemplate(HttpServletResponse response, @RequestParam(required = false) String fileName, public void downloadTemplate(HttpServletResponse response, @PathVariable(value = "type") String type) {
@RequestParam(required = false) String sheetName, @RequestParam String classUrl) {
try { try {
ExcelDto excelDto = new ExcelDto(fileName, sheetName, classUrl, toString()); ExcelEnums excelEnums= ExcelEnums.getByKey(type);
ExcelDto excelDto = new ExcelDto(excelEnums.getFileName(), excelEnums.getSheetName(), excelEnums.getClassUrl(), excelEnums.getType());
excelService.templateExport(response, excelDto); excelService.templateExport(response, excelDto);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -62,9 +48,11 @@ public class ExcelController extends BaseController { ...@@ -62,9 +48,11 @@ public class ExcelController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "导出公用类") @ApiOperation(value = "导出公用类")
@GetMapping("/export") @GetMapping("/export/{type}")
public void getFireStationFile(HttpServletResponse response, ExcelDto excelDto) { public void getFireStationFile(HttpServletResponse response, @PathVariable(value = "type") String type) {
try { try {
ExcelEnums excelEnums= ExcelEnums.getByKey(type);
ExcelDto excelDto = new ExcelDto(excelEnums.getFileName(), excelEnums.getSheetName(), excelEnums.getClassUrl(), excelEnums.getType());
excelService.commonExport(response, excelDto); excelService.commonExport(response, excelDto);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -72,24 +60,15 @@ public class ExcelController extends BaseController { ...@@ -72,24 +60,15 @@ public class ExcelController extends BaseController {
} }
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "导出公用类2")
@GetMapping("/export/list")
public void exportByType(HttpServletResponse response, @RequestParam(required = false) String fileName,
@RequestParam(required = false) String sheetName, @RequestParam String type) {
try {
excelService.commonExport(response, new ExcelDto(fileName, sheetName, type));
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("系统异常!");
}
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "上传文件数据-") @ApiOperation(value = "导入公用")
@PostMapping("/upload") @PostMapping("/upload/{type}")
public void upload(@RequestPart("file") MultipartFile multipartFile, ExcelDto excelDto) { public void upload(@RequestPart("file") MultipartFile multipartFile, @PathVariable(value = "type") String type) {
try { try {
ExcelEnums excelEnums= ExcelEnums.getByKey(type);
ExcelDto excelDto = new ExcelDto(excelEnums.getFileName(), excelEnums.getSheetName(), excelEnums.getClassUrl(), excelEnums.getType());
excelService.commonUpload(multipartFile, excelDto); excelService.commonUpload(multipartFile, excelDto);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -97,21 +76,36 @@ public class ExcelController extends BaseController { ...@@ -97,21 +76,36 @@ public class ExcelController extends BaseController {
} }
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "上传文件数据-2")
@PostMapping("/upload2")
public void upload2(@RequestPart("file") MultipartFile multipartFile,
@RequestParam(required = false) String fileName,
@RequestParam(required = false) String sheetName,
@RequestParam String type) {
try {
excelService.commonUpload(multipartFile, new ExcelDto(fileName, sheetName, type));
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("系统异常!");
}
}
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "上传文件数据-2")
// @PostMapping("/upload2")
// public void upload2(@RequestPart("file") MultipartFile multipartFile,
// @RequestParam(required = false) String fileName,
// @RequestParam(required = false) String sheetName,
// @RequestParam String type) {
// try {
// excelService.commonUpload(multipartFile, new ExcelDto(fileName, sheetName, type));
// } catch (Exception e) {
// e.printStackTrace();
// throw new RuntimeException("系统异常!");
// }
// }
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "导出公用类2")
// @GetMapping("/export/list")
// public void exportByType(HttpServletResponse response, @RequestParam(required = false) String fileName,
// @RequestParam(required = false) String sheetName, @RequestParam String type) {
// try {
// excelService.commonExport(response, new ExcelDto(fileName, sheetName, type));
// } catch (Exception e) {
// e.printStackTrace();
// throw new RuntimeException("系统异常!");
// }
// }
/** /**
* 导出值班模板 * 导出值班模板
* *
......
...@@ -127,6 +127,12 @@ public class DataSourcesImpl implements DataSources { ...@@ -127,6 +127,12 @@ public class DataSourcesImpl implements DataSources {
case "getCompanyDetailTree": case "getCompanyDetailTree":
str =getCompanyDetailTree(); str =getCompanyDetailTree();
break; break;
case "getparent":
str =getparent();
break;
} }
} }
return str; return str;
...@@ -273,4 +279,19 @@ public class DataSourcesImpl implements DataSources { ...@@ -273,4 +279,19 @@ public class DataSourcesImpl implements DataSources {
String[] str = stringList.toArray(new String[stringList.size()]); String[] str = stringList.toArray(new String[stringList.size()]);
return str; return str;
} }
private String[] getparent() throws Exception {
String[] str=null;
List<Map<String ,Object>> orgUsrTree = orgUsrService.getparent();
if(orgUsrTree!=null&&orgUsrTree.size()>0){
List<String> buildingNames = orgUsrTree.stream().map(item -> {
return item.get("name") + "@" + item.get("id");
}).collect(Collectors.toList());
str = buildingNames.toArray(new String[buildingNames.size()]);
}
return str;
}
} }
...@@ -5,23 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -5,23 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Sequence; import com.baomidou.mybatisplus.core.toolkit.Sequence;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.common.api.dto.CompanyPerson; import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto;
import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto;
import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonShiftDto;
import com.yeejoin.amos.boot.module.common.api.dto.DutyShiftDto;
import com.yeejoin.amos.boot.module.common.api.dto.ExcelDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireChemicalDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersExcelDto;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersInfoDto;
import com.yeejoin.amos.boot.module.common.api.dto.KeySiteExcleDto;
import com.yeejoin.amos.boot.module.common.api.dto.MaintenancePersonExcleDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
import com.yeejoin.amos.boot.module.common.api.entity.FireChemical; import com.yeejoin.amos.boot.module.common.api.entity.FireChemical;
...@@ -35,17 +19,7 @@ import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil; ...@@ -35,17 +19,7 @@ import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil;
import com.yeejoin.amos.boot.module.common.api.service.IDutyPersonService; import com.yeejoin.amos.boot.module.common.api.service.IDutyPersonService;
import com.yeejoin.amos.boot.module.common.api.service.IKeySiteService; import com.yeejoin.amos.boot.module.common.api.service.IKeySiteService;
import com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService; import com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DutyCarServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.*;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DutyPersonServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DutyPersonShiftServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DutyShiftServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DynamicFormColumnServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FireChemicalServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FireExpertsServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FireStationServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl;
import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft; import com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft;
import com.yeejoin.amos.boot.module.jcs.api.enums.ExcelEnums; import com.yeejoin.amos.boot.module.jcs.api.enums.ExcelEnums;
...@@ -119,6 +93,9 @@ public class ExcelServiceImpl { ...@@ -119,6 +93,9 @@ public class ExcelServiceImpl {
@Autowired @Autowired
IDutyPersonService iDutyPersonService; IDutyPersonService iDutyPersonService;
@Autowired
LinkageUnitServiceImpl linkageUnitServiceImpl;
public void templateExport(HttpServletResponse response, ExcelDto excelDto) throws ClassNotFoundException { public void templateExport(HttpServletResponse response, ExcelDto excelDto) throws ClassNotFoundException {
String url = excelDto.getClassUrl(); String url = excelDto.getClassUrl();
Class<?> clz = Class.forName(url); Class<?> clz = Class.forName(url);
...@@ -129,53 +106,65 @@ public class ExcelServiceImpl { ...@@ -129,53 +106,65 @@ public class ExcelServiceImpl {
public void commonExport(HttpServletResponse response, ExcelDto excelDto) { public void commonExport(HttpServletResponse response, ExcelDto excelDto) {
switch (excelDto.getType()) { switch (excelDto.getType()) {
case ExcelEnums.WHP: case "WHP":
List<FireChemicalDto> data = fireChemicalServiceImpl.queryForFireChemicalList(false); List<FireChemicalDto> data = fireChemicalServiceImpl.queryForFireChemicalList(false);
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), data, ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), data,
FireChemicalDto.class, dataSourcesImpl, false); FireChemicalDto.class, dataSourcesImpl, false);
break; break;
case ExcelEnums.XFZJ: case "XFZJ":
List<FireExpertsDto> fireExpertsDtoList = fireExpertsServiceImpl.queryForFireExpertsList(false); List<FireExpertsDto> fireExpertsDtoList = fireExpertsServiceImpl.queryForFireExpertsList(false);
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(),
fireExpertsDtoList, FireExpertsDto.class, dataSourcesImpl, false); fireExpertsDtoList, FireExpertsDto.class, dataSourcesImpl, false);
break; break;
case ExcelEnums.SYXX: case "SYXX":
List<WaterResourceDto> waterResourceDtoList = waterResourceServiceImpl.exportToExcel(true); List<WaterResourceDto> waterResourceDtoList = waterResourceServiceImpl.exportToExcel(true);
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(),
waterResourceDtoList, WaterResourceDto.class, dataSourcesImpl, false); waterResourceDtoList, WaterResourceDto.class, dataSourcesImpl, false);
break; break;
case ExcelEnums.HKQ: case "HKQ":
List<AircraftDto> aircraftDtoList = aircraftServiceImpl.queryAircraftDtoForList(false); List<AircraftDto> aircraftDtoList = aircraftServiceImpl.queryAircraftDtoForList(false);
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(),
aircraftDtoList, AircraftDto.class, dataSourcesImpl, false); aircraftDtoList, AircraftDto.class, dataSourcesImpl, false);
break; break;
case ExcelEnums.XFDW: case "XFDW":
List<FireTeamDto> fireTeamDtoList = fireTeamService.queryFireTeamForList(false); List<FireTeamDto> fireTeamDtoList = fireTeamService.queryFireTeamForList(false);
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), fireTeamDtoList, ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), fireTeamDtoList,
FireTeamDto.class, dataSourcesImpl, false); FireTeamDto.class, dataSourcesImpl, false);
break; break;
case ExcelEnums.WXXFZ: case "WXXFZ":
List<FireStationDto> fireStationDtoList = fireStationService.queryForFireStationList(false); List<FireStationDto> fireStationDtoList = fireStationService.queryForFireStationList(false);
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(),
fireStationDtoList, FireStationDto.class, null, false); fireStationDtoList, FireStationDto.class, null, false);
break; break;
case ExcelEnums.XFRY: case "XFRY":
List<FirefightersExcelDto> firefightersExcelDtoList = firefightersService.exportToExcel(false); List<FirefightersExcelDto> firefightersExcelDtoList = firefightersService.exportToExcel(false);
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(),
firefightersExcelDtoList, FirefightersExcelDto.class, null, false); firefightersExcelDtoList, FirefightersExcelDto.class, null, false);
break; break;
case ExcelEnums.WBRY: case "WBRY":
List<MaintenancePersonExcleDto> maintenancePersonExcelDtoList = List<MaintenancePersonExcleDto> maintenancePersonExcelDtoList =
maintenanceCompanyService.exportToMaintenancePersonExcel(); maintenanceCompanyService.exportToMaintenancePersonExcel();
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(),
maintenancePersonExcelDtoList, MaintenancePersonExcleDto.class, null, false); maintenancePersonExcelDtoList, MaintenancePersonExcleDto.class, null, false);
break; break;
case ExcelEnums.KEYSITE: case "KEYSITE":
List<KeySiteExcleDto> keySiteDtoList = keySiteService.exportToExcel(); List<KeySiteExcleDto> keySiteDtoList = keySiteService.exportToExcel();
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(),
keySiteDtoList, KeySiteExcleDto.class, null, false); keySiteDtoList, KeySiteExcleDto.class, null, false);
break; break;
default: case "JCDWRY":
List<OrgUsrExcelDto> orgUsrList = orgUsrService.exportToExcel();
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(),
orgUsrList, OrgUsrExcelDto.class, null, false);
break;
case "LDDW":
List<LinkageUnitDto> LinkageUnitDtoList = linkageUnitServiceImpl.exportToExcel();
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(),
LinkageUnitDtoList, LinkageUnitDto.class, null, false);
break;
default:
break; break;
} }
} }
...@@ -183,40 +172,90 @@ public class ExcelServiceImpl { ...@@ -183,40 +172,90 @@ public class ExcelServiceImpl {
public void commonUpload(MultipartFile multipartFile, ExcelDto excelDto) throws Exception { public void commonUpload(MultipartFile multipartFile, ExcelDto excelDto) throws Exception {
switch (excelDto.getType()) { switch (excelDto.getType()) {
case ExcelEnums.WHP: case "WHP":
excelImportFireChemical(multipartFile); excelImportFireChemical(multipartFile);
break; break;
case ExcelEnums.XFZJ: case "XFZJ":
excelImportFireExperts(multipartFile); excelImportFireExperts(multipartFile);
break; break;
case ExcelEnums.SYXX: case "SYXX":
excelImportWaterResource(multipartFile); excelImportWaterResource(multipartFile);
break; break;
case ExcelEnums.HKQ: case "HKQ":
excelImportAircraft(multipartFile); excelImportAircraft(multipartFile);
break; break;
case ExcelEnums.XFDW: case "XFDW":
excelImportFireTeam(multipartFile); excelImportFireTeam(multipartFile);
break; break;
case ExcelEnums.WXXFZ: case "WXXFZ":
excelImportFireStation(multipartFile); excelImportFireStation(multipartFile);
break; break;
case ExcelEnums.XFRY: case "XFRY":
excelImportFirefighters(multipartFile); excelImportFirefighters(multipartFile);
break; break;
case ExcelEnums.CLZQ: case "CLZQ":
excelImportDutyPerson(multipartFile, ExcelEnums.CLZQ); excelImportDutyPerson(multipartFile, "CLZQ");
break;
case "RYZB":
excelImportDutyPerson(multipartFile, "RYZB");
break; break;
case ExcelEnums.RYZB: case "WBRY":
excelImportDutyPerson(multipartFile, ExcelEnums.RYZB);
case ExcelEnums.WBRY:
excelImportMaintenancePerson(multipartFile); excelImportMaintenancePerson(multipartFile);
case ExcelEnums.KEYSITE: break;
case "KEYSITE":
excelImportKeySite(multipartFile); excelImportKeySite(multipartFile);
break;
case "JCDWRY":
excelImportOrgUsrExcelDto(multipartFile);
case "LDDW":
excelImportLinkageUnitZhDto(multipartFile);
} }
return; return;
} }
private void excelImportLinkageUnitZhDto(MultipartFile multipartFile) throws Exception {
List<LinkageUnitDto> excelDtoList = ExcelUtil.readFirstSheetExcel(multipartFile,
LinkageUnitDto.class, 1);
if(excelDtoList!=null&&excelDtoList.size()>0){
excelDtoList.forEach(linkageUnitDto->{
if(linkageUnitDto.getLinkageUnitType()!=null){
String[] certificates = linkageUnitDto.getLinkageUnitType().split("@");
linkageUnitDto.setLinkageUnitType(certificates[0]);
linkageUnitDto.setLinkageUnitTypeCode(certificates[1]);
}
if(linkageUnitDto.getEmergencyLinkageUnit()!=null){
String[] certificates = linkageUnitDto.getEmergencyLinkageUnit().split("@");
linkageUnitDto.setEmergencyLinkageUnit(certificates[0]);
linkageUnitDto.setEmergencyLinkageUnitCode(certificates[1]);
}
linkageUnitServiceImpl.saveLinkageModel(linkageUnitDto);
});
}
}
private void excelImportOrgUsrExcelDto(MultipartFile multipartFile) throws Exception {
List<OrgUsrExcelDto> excelDtoList = ExcelUtil.readFirstSheetExcel(multipartFile,
OrgUsrExcelDto.class, 1);
// keySiteService.saveExcel(excelDtoList);
}
private void excelImportFirefighters(MultipartFile multipartFile) throws Exception { private void excelImportFirefighters(MultipartFile multipartFile) throws Exception {
List<FirefightersExcelDto> excelDtoList = ExcelUtil.readFirstSheetExcel(multipartFile, List<FirefightersExcelDto> excelDtoList = ExcelUtil.readFirstSheetExcel(multipartFile,
FirefightersExcelDto.class, 1); FirefightersExcelDto.class, 1);
...@@ -469,10 +508,10 @@ public class ExcelServiceImpl { ...@@ -469,10 +508,10 @@ public class ExcelServiceImpl {
String dateStr = monthCell == null ? "" : monthCell.toString(); String dateStr = monthCell == null ? "" : monthCell.toString();
List<Date> dayByMonth = DateUtils.getDayByMonth(dateStr); List<Date> dayByMonth = DateUtils.getDayByMonth(dateStr);
if (ExcelEnums.CLZQ.equals(dutyType)) { if (ExcelEnums.CLZQ.getType().equals(dutyType)) {
initDutyCarData(sheet, dataList, dayByMonth); initDutyCarData(sheet, dataList, dayByMonth);
dutyCarService.saveImportData(dataList); dutyCarService.saveImportData(dataList);
} else if (ExcelEnums.RYZB.equals(dutyType)) { } else if (ExcelEnums.RYZB.getType().equals(dutyType)) {
initDutyPersonData(sheet, dataList, dayByMonth); initDutyPersonData(sheet, dataList, dayByMonth);
dutyPersonService.saveImportData(dataList); dutyPersonService.saveImportData(dataList);
} }
...@@ -613,12 +652,19 @@ public class ExcelServiceImpl { ...@@ -613,12 +652,19 @@ public class ExcelServiceImpl {
keySiteService.saveExcel(excelDtoList); keySiteService.saveExcel(excelDtoList);
} }
public void dutyTemplateExport(HttpServletResponse response, String beginDate, String endDate, ExcelDto excelDto, public void dutyTemplateExport(HttpServletResponse response, String beginDate, String endDate, ExcelDto excelDto,
String ids) { String ids) {
List<List<Object>> data = new ArrayList<>(); List<List<Object>> data = new ArrayList<>();
if (ExcelEnums.CLZQ.equals(excelDto.getType())) { if (ExcelEnums.CLZQ.getType().equals(excelDto.getType())) {
data = initDutyCarTemplate(ids); data = initDutyCarTemplate(ids);
} else if (ExcelEnums.RYZB.equals(excelDto.getType())) { } else if (ExcelEnums.RYZB.getType().equals(excelDto.getType())) {
data = initDutyPersonTemplate(ids); data = initDutyPersonTemplate(ids);
} }
// 获取日期 // 获取日期
...@@ -636,9 +682,9 @@ public class ExcelServiceImpl { ...@@ -636,9 +682,9 @@ public class ExcelServiceImpl {
List<String> dayByMonth = new ArrayList<>(); List<String> dayByMonth = new ArrayList<>();
rangeDate.forEach(item -> dayByMonth.add((String) item.get("date"))); rangeDate.forEach(item -> dayByMonth.add((String) item.get("date")));
List<List<Object>> data = new ArrayList<>(); List<List<Object>> data = new ArrayList<>();
if (ExcelEnums.CLZQ.equals(excelDto.getType())) { if (ExcelEnums.CLZQ.getType().equals(excelDto.getType())) {
data = initDutyCarInfo(beginDate, endDate, dayByMonth); data = initDutyCarInfo(beginDate, endDate, dayByMonth);
} else if (ExcelEnums.RYZB.equals(excelDto.getType())) { } else if (ExcelEnums.RYZB.getType().equals(excelDto.getType())) {
data = initDutyPersonInfo(beginDate, endDate, dayByMonth); data = initDutyPersonInfo(beginDate, endDate, dayByMonth);
} }
......
...@@ -22,6 +22,7 @@ import org.springframework.cloud.client.ServiceInstance; ...@@ -22,6 +22,7 @@ import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper; import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.exception.BaseException; import org.typroject.tyboot.core.foundation.exception.BaseException;
...@@ -361,7 +362,7 @@ public class DocAuditService { ...@@ -361,7 +362,7 @@ public class DocAuditService {
AtomicBoolean isRange = new AtomicBoolean(false); AtomicBoolean isRange = new AtomicBoolean(false);
AtomicReference<String> resRight = new AtomicReference<>(""); AtomicReference<String> resRight = new AtomicReference<>("");
AtomicReference<String> unit = new AtomicReference<>(""); AtomicReference<String> unit = new AtomicReference<>("");
if (!ValidationUtil.isEmpty(values.isEmpty())) { if (!ObjectUtils.isEmpty(values)) {
values.forEach(value -> { values.forEach(value -> {
if (TagValueService.VALUE_TAG_FIELD_RANGE_MAX.equals(value.getFieldName())) { if (TagValueService.VALUE_TAG_FIELD_RANGE_MAX.equals(value.getFieldName())) {
resRight.set(value.getTagValue()); resRight.set(value.getTagValue());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment