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;
import java.util.Date;
/**
* 危化品
* '
*
* @author system_generator
* @date 2021-06-29
......
......@@ -39,7 +39,7 @@ public class FireTeamDto extends BaseDto {
private String companyCode;
@ExplicitConstraint(indexNum = 1, sourceClass = RoleNameExplicitConstraint.class,method="getFireTeam") //动态下拉内容
@ExcelProperty(value = "上级单位", index = 1)
@ExcelProperty(value = "上级队伍", index = 1)
@ApiModelProperty(value = "父级名称")
private String parentName;
......
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.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.ApiModelProperty;
import lombok.Data;
......@@ -20,88 +24,99 @@ import java.util.List;
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "LinkageUnitDto", description = "联动单位")
public class LinkageUnitDto extends BaseDto {
@ExcelIgnore
private static final long serialVersionUID = 1L;
@ExcelProperty(value = "单位名称", index = 0)
@ApiModelProperty(value = "单位名称")
private String unitName;
@ExcelIgnore
@ApiModelProperty(value = "单位code")
private String unitCode;
@ExcelIgnore
@ApiModelProperty(value = "父级单位id")
private String parentId;
@ApiModelProperty(value = "联动单位类别")
@ExcelProperty(value = "服务类别", index = 1)
@ExplicitConstraint(type = "LDDWLB", indexNum =1, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内容
@ApiModelProperty(value = "服务类别")
private String linkageUnitType;
@ExcelIgnore
@ApiModelProperty(value = "联动单位类别code")
private String linkageUnitTypeCode;
@ExcelIgnore
@ApiModelProperty(value = "行政区划")
private String administrativeDivisions;
@ExcelIgnore
@ApiModelProperty(value = "行政区划代码")
private String administrativeDivisionsCode;
@ExcelProperty(value = "地址", index = 2)
@ApiModelProperty(value = "地址")
private String address;
@ExcelProperty(value = "经度", index = 3)
@ApiModelProperty(value = "经度")
private Double longitude;
@ExcelProperty(value = "纬度", index = 4)
@ApiModelProperty(value = "纬度")
private Double latitude;
@ExcelProperty(value = "协议开始日期", index = 5)
@ApiModelProperty(value = "协议开始日期")
private Date agreementStartDate;
@ExcelProperty(value = "协议结束日期", index = 6)
@ApiModelProperty(value = "协议结束日期")
private Date agreementEndDate;
@ExcelProperty(value = "应急联动单位类别", index = 7)
@ExplicitConstraint(type = "YJLDDW", indexNum =7, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内容
@ApiModelProperty(value = "应急联动单位类别")
private String emergencyLinkageUnit;
@ExcelIgnore
@ApiModelProperty(value = "应急联动单位类别code")
private String emergencyLinkageUnitCode;
@ExcelProperty(value = "联系人", index = 8)
@ApiModelProperty(value = "联系人 ")
private String contactUser;
@ExcelProperty(value = "联系人电话", index = 9)
@ApiModelProperty(value = "联系人电话")
private String contactPhone;
@ExcelIgnore
@ApiModelProperty(value = "实例id")
private Long instanceId;
@ExcelIgnore
@ApiModelProperty(value = "组织机构代码")
private String orgCode;
@ExcelIgnore
@ApiModelProperty(value = "操作人名称")
private String recUserName;
@ExcelIgnore
@ApiModelProperty(value = "是否在协议期 ")
private String inAgreement;
@ExcelProperty(value = "消防救援能力", index = 10)
@ApiModelProperty(value = "消防救援能力")
private String fireRescueCapability;
@ExcelProperty(value = "职责_简要情况", index = 11)
@ApiModelProperty(value = "职责_简要情况")
private String responsibilitiesSituation;
@ExcelProperty(value = "应急服务内容", index = 12)
@ApiModelProperty(value = "应急服务内容")
private String emergencyServiceContent;
@ExcelProperty(value = "单位_简要情况", index = 13)
@ApiModelProperty(value = "单位_简要情况")
private String unitSituation;
@ExcelIgnore
@ApiModelProperty(value = "联动单位图片")
private List<SourceFile> image;
@ExcelIgnore
@ApiModelProperty(value = "车辆数量")
private String vehicleNumber;
@ExcelIgnore
@ApiModelProperty(value = "特岗人数")
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> {
*/
Page<List<LinkageUnitDto>> getEmergencyLinkageUnitList(IPage<LinkageUnitDto> page,String unitName,
String linkageUnitTypeCode, String emergencyLinkageUnitCode);
List<LinkageUnitDto> exportToExcel();
}
......@@ -59,4 +59,8 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List< OrgUsrzhDto> getOrgUsrzhDto(@Param("bizOrgName")String bizOrgName);
List< Map<String,Object>> getparent();
List< OrgUsrExcelDto> exportToExcel();
}
......@@ -48,5 +48,6 @@ public interface ILinkageUnitService {
* @return
*/
public List<Menu> getEmergencyLinkageUnitCodeGroupBy(String type, String rootName) ;
List<LinkageUnitDto> exportToExcel();
}
......@@ -173,4 +173,7 @@ public interface IOrgUsrService {
List<ESOrgUsrDto> selectByIddata(String name);
List< Map<String,Object>> getparent();
List< OrgUsrExcelDto> exportToExcel();
}
......@@ -87,6 +87,29 @@
emergency_linkage_unit_code
</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"
......
......@@ -297,4 +297,43 @@ LEFT JOIN (
keysite.belong_id
) keysite_sur ON company_sur.sequence_nbr = keysite_sur.belong_id
</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>
package com.yeejoin.amos.boot.module.jcs.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 导出类型常量
***/
public class ExcelEnums {
public static final String WHP = "WHP";// ("WHP","危险品"),
public static final String XFZJ = "XFZJ";//("XFZJ","消防专家"),
public static final String SYXX = "SYXX";//("SYXX","水源信息"),
public static final String HKQ = "HKQ";//("HKQ","航空器");
public static final String XFDW = "XFDW";//("XFDW","消防队伍")
public static final String WXXFZ = "WXXFZ";//("WXXFZ","微型消防站")
public static final String XFRY = "XFRY";//("XFRY","消防人员")
public static final String CLZQ = "CLZQ";//("CLZQ","车辆执勤")
public static final String RYZB = "RYZB";//("RYZB","人员值班")
public static final String WBRY = "WBRY";//("WBRY",维保人员)
public static final String KEYSITE = "KEYSITE";//{"KEYSITE":重點部位}
@Getter
@AllArgsConstructor
public enum ExcelEnums {
WHP ("危险品", "危险品", "com.yeejoin.amos.boot.module.common.api.dto.FireChemicalDto","WHP"),// ("WHP","危险品"),
XFZJ ("消防专家", "消防专家", "com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto","XFZJ"),//("XFZJ","消防专家"),
SYXX ("水源信息", "水源信息", "com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto","SYXX"),//("SYXX","水源信息"),
HKQ ("航空器", "航空器", "com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto","HKQ"),//("HKQ","航空器");
XFDW ("消防队伍", "消防队伍", "com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto","XFDW"),//("XFDW","消防队伍")
WXXFZ("微型消防站", "微型消防站", "com.yeejoin.amos.boot.module.common.api.dto.FireStationDto","WXXFZ"),//("WXXFZ","微型消防站")
XFRY ("消防人员", "消防人员", "com.yeejoin.amos.boot.module.common.api.dto.FirefightersExcelDto","XFRY"),//("XFRY","消防人员")
WBRY ("维保人员", "维保人员", "com.yeejoin.amos.boot.module.common.api.dto.MaintenancePersonExcleDto","WBRY"),//("WBRY",维保人员)
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 {
@ApiModelProperty(value = "所属单位id")
private Long affiliatedUnitId;
@ApiModelProperty(value = "经纬度")
private String longitudeLatitude;
@ApiModelProperty(value = "经度")
private String longitude;
......
......@@ -70,9 +70,6 @@ public class RescueStation extends BaseEntity {
@ApiModelProperty(value = "所属单位id")
private Long affiliatedUnitId;
@ApiModelProperty(value = "经纬度")
private String longitudeLatitude;
@ApiModelProperty(value = "经度")
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
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
public LinkageUnitDto queryOne(Long sequenceNbr) {
String groupCode = getGroupCode();
......@@ -289,4 +310,9 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
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;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
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.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.dto.*;
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.OrgUsr;
......@@ -974,7 +960,17 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
});
return lidataDtos;
}
@Override
public List<Map<String, Object>> getparent() {
return orgUsrMapper.getparent();
}
@Override
public List<OrgUsrExcelDto> exportToExcel() {
return orgUsrMapper.exportToExcel();
}
public List<OrgUsr> getCompanyDetailTree() {
LambdaQueryWrapper<OrgUsr> wrapper= new LambdaQueryWrapper<OrgUsr>();
wrapper.eq(OrgUsr::getBizOrgType, "COMPANY");
......
......@@ -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.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 io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
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.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
......@@ -34,25 +30,15 @@ public class ExcelController extends BaseController {
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)
@ApiOperation(value = "下载模板")
@GetMapping("/download/template")
public void downloadTemplate(HttpServletResponse response, @RequestParam(required = false) String fileName,
@RequestParam(required = false) String sheetName, @RequestParam String classUrl) {
@GetMapping("/download/template/{type}")
public void downloadTemplate(HttpServletResponse response, @PathVariable(value = "type") String type) {
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);
} catch (Exception e) {
e.printStackTrace();
......@@ -62,9 +48,11 @@ public class ExcelController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "导出公用类")
@GetMapping("/export")
public void getFireStationFile(HttpServletResponse response, ExcelDto excelDto) {
@GetMapping("/export/{type}")
public void getFireStationFile(HttpServletResponse response, @PathVariable(value = "type") String type) {
try {
ExcelEnums excelEnums= ExcelEnums.getByKey(type);
ExcelDto excelDto = new ExcelDto(excelEnums.getFileName(), excelEnums.getSheetName(), excelEnums.getClassUrl(), excelEnums.getType());
excelService.commonExport(response, excelDto);
} catch (Exception e) {
e.printStackTrace();
......@@ -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)
@ApiOperation(value = "上传文件数据-")
@PostMapping("/upload")
public void upload(@RequestPart("file") MultipartFile multipartFile, ExcelDto excelDto) {
@ApiOperation(value = "导入公用")
@PostMapping("/upload/{type}")
public void upload(@RequestPart("file") MultipartFile multipartFile, @PathVariable(value = "type") String type) {
try {
ExcelEnums excelEnums= ExcelEnums.getByKey(type);
ExcelDto excelDto = new ExcelDto(excelEnums.getFileName(), excelEnums.getSheetName(), excelEnums.getClassUrl(), excelEnums.getType());
excelService.commonUpload(multipartFile, excelDto);
} catch (Exception e) {
e.printStackTrace();
......@@ -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 {
case "getCompanyDetailTree":
str =getCompanyDetailTree();
break;
case "getparent":
str =getparent();
break;
}
}
return str;
......@@ -273,4 +279,19 @@ public class DataSourcesImpl implements DataSources {
String[] str = stringList.toArray(new String[stringList.size()]);
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;
}
}
......@@ -22,6 +22,7 @@ import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.exception.BaseException;
......@@ -361,7 +362,7 @@ public class DocAuditService {
AtomicBoolean isRange = new AtomicBoolean(false);
AtomicReference<String> resRight = new AtomicReference<>("");
AtomicReference<String> unit = new AtomicReference<>("");
if (!ValidationUtil.isEmpty(values.isEmpty())) {
if (!ObjectUtils.isEmpty(values)) {
values.forEach(value -> {
if (TagValueService.VALUE_TAG_FIELD_RANGE_MAX.equals(value.getFieldName())) {
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