refactor(open-platform): 调整保安单位信息展示位置
- 将保安单位相关字段从 SecurityUnitUseStatisticsDTO 类中移至内部类 _ServiceProjectVo - 更新 OpenApiMapper.xml,将对应字段移至 JSON 数组内- 移除前端无用的示例代码
This commit is contained in:
		
							parent
							
								
									b0b0279db5
								
							
						
					
					
						commit
						372d7e12cf
					
				| 
						 | 
				
			
			@ -38,19 +38,6 @@ public class SecurityUnitUseStatisticsDTO {
 | 
			
		|||
    @Schema(description = "公安单位名称")
 | 
			
		||||
    private String policeUnitName;
 | 
			
		||||
 | 
			
		||||
    @Schema(description = "保安单位id")
 | 
			
		||||
    private Long securityUnitId;
 | 
			
		||||
    @Schema(description = "保安单位名称")
 | 
			
		||||
    private String securityUnitName;
 | 
			
		||||
    @Schema(description = "保安单位法人信息")
 | 
			
		||||
    private LegalPersonInfo securityUnitLegalPersonInfo;
 | 
			
		||||
 | 
			
		||||
    @Schema(description = "项目经理")
 | 
			
		||||
    private String serviceProjectManager;
 | 
			
		||||
    @Schema(description = "项目经理联系方式")
 | 
			
		||||
    private String serviceProjectManagerTelephone;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @Data
 | 
			
		||||
    static class _ServiceProjectVo {
 | 
			
		||||
        @Schema(description = "服务项目id")
 | 
			
		||||
| 
						 | 
				
			
			@ -74,6 +61,18 @@ public class SecurityUnitUseStatisticsDTO {
 | 
			
		|||
        @Schema(description = "持证保安数量")
 | 
			
		||||
        private Integer haveCardSecurityUserCount;
 | 
			
		||||
 | 
			
		||||
        @Schema(description = "保安单位id")
 | 
			
		||||
        private Long securityUnitId;
 | 
			
		||||
        @Schema(description = "保安单位名称")
 | 
			
		||||
        private String securityUnitName;
 | 
			
		||||
        @Schema(description = "保安单位法人信息")
 | 
			
		||||
        private LegalPersonInfo securityUnitLegalPersonInfo;
 | 
			
		||||
 | 
			
		||||
        @Schema(description = "项目经理")
 | 
			
		||||
        private String serviceProjectManager;
 | 
			
		||||
        @Schema(description = "项目经理联系方式")
 | 
			
		||||
        private String serviceProjectManagerTelephone;
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,10 +29,6 @@
 | 
			
		|||
        order by eu.create_time desc
 | 
			
		||||
    </select>
 | 
			
		||||
    <resultMap id="SecurityUnitUseStatisticsDTOResultMap" type="com.changhu.pojo.dto.SecurityUnitUseStatisticsDTO">
 | 
			
		||||
        <result
 | 
			
		||||
                column="securityUnitLegalPersonInfo"
 | 
			
		||||
                typeHandler="com.baomidou.mybatisplus.extension.handlers.Fastjson2TypeHandler"
 | 
			
		||||
                property="securityUnitLegalPersonInfo"/>
 | 
			
		||||
        <result
 | 
			
		||||
                column="serviceProjectList"
 | 
			
		||||
                typeHandler="com.baomidou.mybatisplus.extension.handlers.Fastjson2TypeHandler"
 | 
			
		||||
| 
						 | 
				
			
			@ -58,11 +54,6 @@
 | 
			
		|||
        eu.address as 'address',
 | 
			
		||||
        pu.snow_flake_id as 'policeUnitId',
 | 
			
		||||
        pu.name as 'policeUnitName',
 | 
			
		||||
        su.snow_flake_id as 'securityUnitId',
 | 
			
		||||
        su.name as 'securityUnitName',
 | 
			
		||||
        su.legal_person_info as 'securityUnitLegalPersonInfo',
 | 
			
		||||
        mpu.name as 'serviceProjectManagerName',
 | 
			
		||||
        mpu.telephone as 'serviceProjectManagerTelephone',
 | 
			
		||||
        json_arrayagg(
 | 
			
		||||
        json_object(
 | 
			
		||||
        'snowFlakeId', sp.snow_flake_id,
 | 
			
		||||
| 
						 | 
				
			
			@ -73,7 +64,12 @@
 | 
			
		|||
        'isFiling', sp.is_filing,
 | 
			
		||||
        'idNumber', sp.id_number,
 | 
			
		||||
        'securityUserTotal', suc.securityUserTotal,
 | 
			
		||||
        'haveCardSecurityUserCount', suc.haveCardSecurityUserCount
 | 
			
		||||
        'haveCardSecurityUserCount', suc.haveCardSecurityUserCount,
 | 
			
		||||
        'securityUnitId',su.snow_flake_id,
 | 
			
		||||
        'securityUnitName',su.name,
 | 
			
		||||
        'securityUnitLegalPersonInfo',su.legal_person_info,
 | 
			
		||||
        'serviceProjectManagerName',mpu.name,
 | 
			
		||||
        'serviceProjectManagerTelephone',mpu.telephone
 | 
			
		||||
        )) as 'serviceProjectList'
 | 
			
		||||
        from
 | 
			
		||||
        police_unit pu
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -128,36 +128,19 @@ const a = () => {
 | 
			
		|||
  const accessKey = "w2wzi0wefmmo6s735z2el8tfzitya5gj"
 | 
			
		||||
  const secretKey = "db1b5214-02ee-497f-957c-88323b4351bf"
 | 
			
		||||
  const now = Date.now()
 | 
			
		||||
  // const params = {
 | 
			
		||||
  //   name: 'zhangsan',
 | 
			
		||||
  //   age: 14,
 | 
			
		||||
  //   addr: '湖南省长沙市'
 | 
			
		||||
  // }
 | 
			
		||||
 | 
			
		||||
  // const sign = generatedSign(params, now, accessKey, secretKey)
 | 
			
		||||
 | 
			
		||||
  // const headers = {
 | 
			
		||||
  //   'Access-Key': accessKey,
 | 
			
		||||
  //   'Time-Stamp': now,
 | 
			
		||||
  //   'Sign': sign
 | 
			
		||||
  // }
 | 
			
		||||
  // axios.get('http://127.0.0.1:8765/open/dataView', {
 | 
			
		||||
  //   params,
 | 
			
		||||
  //   headers
 | 
			
		||||
  // })
 | 
			
		||||
 | 
			
		||||
  const params2 = {
 | 
			
		||||
  const params = {
 | 
			
		||||
    code: 'SSP001',
 | 
			
		||||
    level: 5
 | 
			
		||||
  }
 | 
			
		||||
  const sign2 = generatedSign(params2, now, accessKey, secretKey)
 | 
			
		||||
  const sign = generatedSign(params, now, accessKey, secretKey)
 | 
			
		||||
  const headers2 = {
 | 
			
		||||
    'Access-Key': accessKey,
 | 
			
		||||
    'Time-Stamp': now,
 | 
			
		||||
    'Sign': sign2
 | 
			
		||||
    'Sign': sign
 | 
			
		||||
  }
 | 
			
		||||
  console.log(headers2);
 | 
			
		||||
  axios.get('http://127.0.0.1:8765/open/dataView', {
 | 
			
		||||
    params: params2,
 | 
			
		||||
    params: params,
 | 
			
		||||
    headers: {
 | 
			
		||||
      ...headers2
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue