Merge branch 'dev_visual_page' into dev

komen
zhaokai 2026-07-27 15:13:27 +08:00
commit a6c3aab30c
15 changed files with 99 additions and 14 deletions

View File

@ -165,8 +165,14 @@ public class CorpInfoController {
@ApiOperation("可视化大屏-企业用户汇总") @ApiOperation("可视化大屏-企业用户汇总")
@PostMapping("/corpUserSummary") @PostMapping("/corpUserSummary")
public SingleResponse<CorpUserSummaryCO> corpUserSummary() { public SingleResponse<CorpUserSummaryCO> corpUserSummary(@Validated @RequestBody CorpUserSummaryQry qry) {
return SingleResponse.of(corpInfoService.corpUserSummary()); return SingleResponse.of(corpInfoService.corpUserSummary(qry));
}
@ApiOperation("可视化大屏-企业列表")
@PostMapping("/corpListAll")
public MultiResponse<CorpInfoCO> corpListAll(@RequestBody CorpInfoQry corpInfoQry) {
return corpInfoService.listAll(corpInfoQry);
} }
} }

View File

@ -81,6 +81,19 @@ public class ImgFilesController {
imgFilesService.removeBatch(ids); imgFilesService.removeBatch(ids);
return SingleResponse.buildSuccess(); return SingleResponse.buildSuccess();
} }
@ApiOperation("删除")
@GetMapping("/getDelete")
public Response getDelete(@RequestParam String filePath) {
imgFilesService.removeFile(filePath);
return Response.buildSuccess();
}
@ApiOperation("删除多个")
@GetMapping("/getIds")
public Response getIds(@RequestParam Long[] ids) {
imgFilesService.removeBatch(ids);
return SingleResponse.buildSuccess();
}
@ApiOperation("修改") @ApiOperation("修改")
@PutMapping("/edit") @PutMapping("/edit")

View File

@ -69,6 +69,18 @@ public class CorpInfoUpdateExe {
} }
BeanUtils.copyProperties(corpInfoUpdateCmd, corpInfoE); BeanUtils.copyProperties(corpInfoUpdateCmd, corpInfoE);
//
if("1".equals(corpInfoE.getAreaCode())){
//东港区
corpInfoE.setPortArea(2);
}
if("2".equals(corpInfoE.getAreaCode())){
//西港区
corpInfoE.setPortArea(3);
}
boolean res = corpInfoGateway.update(corpInfoE); boolean res = corpInfoGateway.update(corpInfoE);
if (!res) { if (!res) {
throw new BizException("修改失败"); throw new BizException("修改失败");

View File

@ -323,8 +323,9 @@ public class CorpInfoQueryExe {
return PageResponse.of(list, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex()); return PageResponse.of(list, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
} }
public CorpUserSummaryCO corpUserSummary() { public CorpUserSummaryCO corpUserSummary(CorpUserSummaryQry qry) {
CorpUserSummaryDO corpUserSummaryDO = corpInfoRepository.corpUserSummary(); Map<String, Object> params = PageQueryHelper.toHashMap(qry);
CorpUserSummaryDO corpUserSummaryDO = corpInfoRepository.corpUserSummary(params);
CorpUserSummaryCO corpUserSummaryCO = new CorpUserSummaryCO(); CorpUserSummaryCO corpUserSummaryCO = new CorpUserSummaryCO();
BeanUtils.copyProperties(corpUserSummaryDO, corpUserSummaryCO); BeanUtils.copyProperties(corpUserSummaryDO, corpUserSummaryCO);
return corpUserSummaryCO; return corpUserSummaryCO;

View File

@ -153,8 +153,8 @@ public class CorpInfoServiceImpl implements CorpInfoServiceI {
} }
@Override @Override
public CorpUserSummaryCO corpUserSummary() { public CorpUserSummaryCO corpUserSummary(CorpUserSummaryQry qry) {
return corpInfoQueryExe.corpUserSummary(); return corpInfoQueryExe.corpUserSummary(qry);
} }
} }

View File

@ -58,6 +58,6 @@ public interface CorpInfoServiceI {
PageResponse<CorpUserStatisticCO> corpUserStatisticPage(CorpUserStatisticQry qry); PageResponse<CorpUserStatisticCO> corpUserStatisticPage(CorpUserStatisticQry qry);
CorpUserSummaryCO corpUserSummary(); CorpUserSummaryCO corpUserSummary(CorpUserSummaryQry qry);
} }

View File

@ -66,6 +66,9 @@ public class CorpInfoQry {
@ApiModelProperty(value = "企业类型1监管 2企业 3相关方", name = "enterpriseType", required = true) @ApiModelProperty(value = "企业类型1监管 2企业 3相关方", name = "enterpriseType", required = true)
private Integer enterpriseType; private Integer enterpriseType;
@ApiModelProperty(value = "港区1:秦皇岛港区,2:秦皇岛东,3:秦皇岛西", name = "portArea")
private Integer eqPortArea;
@ApiModelProperty(value = "企业类型1监管 2企业 3相关方", name = "enterpriseTypeList", required = true) @ApiModelProperty(value = "企业类型1监管 2企业 3相关方", name = "enterpriseTypeList", required = true)
private List<Integer> enterpriseTypeList; private List<Integer> enterpriseTypeList;
@ApiModelProperty(value = "统一社会信用代码", name = "code", required = true) @ApiModelProperty(value = "统一社会信用代码", name = "code", required = true)

View File

@ -1,6 +1,7 @@
package com.zcloud.basic.info.dto; package com.zcloud.basic.info.dto;
import com.alibaba.cola.dto.PageQuery; import com.alibaba.cola.dto.PageQuery;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -20,4 +21,10 @@ public class CorpUserStatisticQry extends PageQuery {
@ApiModelProperty(value = "企业类型1监管 2企业 3相关方", name = "enterpriseType") @ApiModelProperty(value = "企业类型1监管 2企业 3相关方", name = "enterpriseType")
private Integer enterpriseType; private Integer enterpriseType;
@ApiModelProperty(value = "港区1:秦皇岛港区,2:秦皇岛东,3:秦皇岛西", name = "portArea")
private Integer portArea;
@ApiModelProperty(value = "企业id", name = "corpinfoId")
private Long corpinfoId;
} }

View File

@ -0,0 +1,18 @@
package com.zcloud.basic.info.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
*/
@Data
public class CorpUserSummaryQry {
@ApiModelProperty(value = "港区1:秦皇岛港区,2:秦皇岛东,3:秦皇岛西", name = "portArea")
private Integer portArea;
@ApiModelProperty(value = "企业id", name = "corpinfoId")
private Long corpinfoId;
}

View File

@ -186,6 +186,8 @@ public class CorpInfoE extends BaseE {
@ApiModelProperty(value = "经营范围", name = "natureBusiness") @ApiModelProperty(value = "经营范围", name = "natureBusiness")
private String natureBusiness; private String natureBusiness;
@ApiModelProperty(value = "港区1:秦皇岛港区,2:秦皇岛东,3:秦皇岛西")
private Integer portArea;
public void initPassWord(Integer type) { public void initPassWord(Integer type) {
String encrypt = Sm2Util.encryptHex(MD5.md5(CorpTypeEnum.getPasswordByCode(type)), publicKey); String encrypt = Sm2Util.encryptHex(MD5.md5(CorpTypeEnum.getPasswordByCode(type)), publicKey);
this.setPassword(encrypt); this.setPassword(encrypt);

View File

@ -260,5 +260,9 @@ public class CorpInfoDO extends BaseDO {
@ApiModelProperty(value = "经营范围", name = "natureBusiness") @ApiModelProperty(value = "经营范围", name = "natureBusiness")
private String natureBusiness; private String natureBusiness;
@ApiModelProperty(value = "港区1:秦皇岛港区,2:秦皇岛东,3:秦皇岛西")
private Integer portArea;
} }

View File

@ -38,9 +38,9 @@ public interface CorpInfoMapper extends BaseMapper<CorpInfoDO> {
IPage<CorpInfoDO> selectUserPageNoPms(IPage<CorpInfoDO> iPage, @Param("ew") QueryWrapper<CorpInfoDO> queryWrapper, String menuPerms); IPage<CorpInfoDO> selectUserPageNoPms(IPage<CorpInfoDO> iPage, @Param("ew") QueryWrapper<CorpInfoDO> queryWrapper, String menuPerms);
IPage<CorpUserStatisticDO> corpUserStatisticPage(IPage<CorpUserStatisticDO> iPage, Map<String, Object> params); IPage<CorpUserStatisticDO> corpUserStatisticPage(IPage<CorpUserStatisticDO> iPage, @Param("params") Map<String, Object> params);
CorpUserSummaryDO corpUserSummary(); CorpUserSummaryDO corpUserSummary(@Param("params") Map<String, Object> params);
} }

View File

@ -52,6 +52,6 @@ public interface CorpInfoRepository extends BaseRepository<CorpInfoDO> {
PageResponse<CorpUserStatisticDO> corpUserStatisticPage(Map<String, Object> parmas); PageResponse<CorpUserStatisticDO> corpUserStatisticPage(Map<String, Object> parmas);
CorpUserSummaryDO corpUserSummary(); CorpUserSummaryDO corpUserSummary(Map<String, Object> parmas);
} }

View File

@ -139,6 +139,7 @@ public class CorpInfoRepositoryImpl extends BaseRepositoryImpl<CorpInfoMapper, C
if (CollUtil.isNotEmpty(enterpriseType)) { if (CollUtil.isNotEmpty(enterpriseType)) {
queryWrapper.in("type", enterpriseType); queryWrapper.in("type", enterpriseType);
} }
if (params.get("enterpriseTypeList") != null if (params.get("enterpriseTypeList") != null
&& params.get("enterpriseTypeList") instanceof List){ && params.get("enterpriseTypeList") instanceof List){
List<Integer> enterpriseTypeList = (List<Integer>) params.get("enterpriseTypeList"); List<Integer> enterpriseTypeList = (List<Integer>) params.get("enterpriseTypeList");
@ -354,8 +355,8 @@ public class CorpInfoRepositoryImpl extends BaseRepositoryImpl<CorpInfoMapper, C
} }
@Override @Override
public CorpUserSummaryDO corpUserSummary() { public CorpUserSummaryDO corpUserSummary(Map<String, Object> params) {
return corpInfoMapper.corpUserSummary(); return corpInfoMapper.corpUserSummary(params);
} }
} }

View File

@ -133,7 +133,7 @@
corpinfo_id, corpinfo_id,
COUNT(1) AS userCount COUNT(1) AS userCount
FROM user FROM user
WHERE delete_enum = 'FALSE' WHERE delete_enum = 'FALSE' and id!=corpinfo_id and employment_flag=1
GROUP BY corpinfo_id GROUP BY corpinfo_id
) u ON u.corpinfo_id = c.id ) u ON u.corpinfo_id = c.id
WHERE c.delete_enum = 'FALSE' WHERE c.delete_enum = 'FALSE'
@ -146,6 +146,12 @@
<if test="params.likeCorpName != null and params.likeCorpName.trim() != ''"> <if test="params.likeCorpName != null and params.likeCorpName.trim() != ''">
AND c.corp_name like concat('%',#{params.likeCorpName},'%') AND c.corp_name like concat('%',#{params.likeCorpName},'%')
</if> </if>
<if test="params.portArea != null">
AND c.port_area = #{params.portArea}
</if>
<if test="params.corpinfoId != null">
AND c.id = #{params.corpinfoId}
</if>
ORDER BY IFNULL(u.userCount, 0) DESC, IFNULL(d.departmentCount, 0) DESC, c.corp_order ASC, c.create_time DESC ORDER BY IFNULL(u.userCount, 0) DESC, IFNULL(d.departmentCount, 0) DESC, c.corp_order ASC, c.create_time DESC
</select> </select>
@ -157,10 +163,22 @@
SELECT COUNT(1) SELECT COUNT(1)
FROM user u FROM user u
INNER JOIN corp_info c ON c.id = u.corpinfo_id AND c.delete_enum = 'FALSE' INNER JOIN corp_info c ON c.id = u.corpinfo_id AND c.delete_enum = 'FALSE'
WHERE u.delete_enum = 'FALSE' WHERE u.delete_enum = 'FALSE' and u.employment_flag=1
<if test="params.portArea != null">
AND c.port_area = #{params.portArea}
</if>
<if test="params.corpinfoId != null">
AND c.id = #{params.corpinfoId}
</if>
), 0) AS userCount ), 0) AS userCount
FROM corp_info c FROM corp_info c
WHERE c.delete_enum = 'FALSE' WHERE c.delete_enum = 'FALSE'
<if test="params.portArea != null">
AND c.port_area = #{params.portArea}
</if>
<if test="params.corpinfoId != null">
AND c.id = #{params.corpinfoId}
</if>
</select> </select>
</mapper> </mapper>