Merge remote-tracking branch 'origin/master'
| | |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "列表", notes = "传入filterSelected或zoneId或areaId或unbound") |
| | | @ApiOperation(value = "列表", notes = "传入filterSelected或zoneId或areaId或unbound或sceneManageId") |
| | | public R<List<FwDefenseSceneVO>> list( |
| | | @ApiParam(value = "是否过滤已被选择的数据(1过滤 0不过滤)") @RequestParam(required = false) Integer filterSelected, |
| | | @ApiParam(value = "防区id") @RequestParam(required = false) Long zoneId, |
| | | @ApiParam(value = "区域id") @RequestParam(required = false) Long areaId, |
| | | @ApiParam(value = "是否仅返回未被场景管理绑定的数据(1是 0或空否)") @RequestParam(required = false) Integer unbound) { |
| | | List<FwDefenseSceneVO> list = fwDefenseSceneService.selectFwDefenseSceneList(filterSelected, zoneId, areaId, unbound); |
| | | @ApiParam(value = "是否仅返回未被场景管理绑定的数据(1是 0或空否)") @RequestParam(required = false) Integer unbound, |
| | | @ApiParam(value = "场景管理id(编辑回显使用)") @RequestParam(required = false) Long sceneManageId) { |
| | | List<FwDefenseSceneVO> list = fwDefenseSceneService.selectFwDefenseSceneList(filterSelected, zoneId, areaId, unbound, sceneManageId); |
| | | return R.data(list); |
| | | } |
| | | |
| | |
| | | left join ja_fw_police_station ps on ps.id = ad.police_station_id and ps.is_deleted = 0 |
| | | <where> |
| | | ad.is_deleted = 0 |
| | | <if test="flyTime != null"> |
| | | and (ad.fly_date_start is null or ad.fly_date_start <= #{flyTime}) |
| | | and (ad.fly_date_end is null or ad.fly_date_end >= #{flyTime}) |
| | | </if> |
| | | <if test="isSetSceneManage != null and isSetSceneManage == 1"> |
| | | and exists ( |
| | | select 1 |
| | |
| | | and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', '')) |
| | | ) |
| | | </if> |
| | | <if test="isSetSceneManage != null and isSetSceneManage == 1 and flyTime != null"> |
| | | and exists ( |
| | | select 1 |
| | | from ja_fw_defense_scene ds |
| | | join ja_fw_defense_scene_manage dsm on dsm.defense_scene_id = ds.id and dsm.is_deleted = 0 |
| | | where ds.is_deleted = 0 |
| | | and ds.area_divide_ids is not null |
| | | and ds.area_divide_ids != '' |
| | | and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', '')) |
| | | and (dsm.effective_date_start is null or dsm.effective_date_start <= #{flyTime}) |
| | | and (dsm.effective_date_end is null or dsm.effective_date_end >= #{flyTime}) |
| | | ) |
| | | </if> |
| | | <if test="filterSelected != null and filterSelected == 1"> |
| | | and ( |
| | | not exists ( |
| | |
| | | * @param zoneId |
| | | * @param areaId |
| | | * @param unbound |
| | | * @param sceneManageId |
| | | * @return |
| | | */ |
| | | List<FwDefenseSceneVO> selectFwDefenseSceneList(@Param("filterSelected") Integer filterSelected, @Param("zoneId") Long zoneId, @Param("areaId") Long areaId, @Param("unbound") Integer unbound); |
| | | List<FwDefenseSceneVO> selectFwDefenseSceneList(@Param("filterSelected") Integer filterSelected, @Param("zoneId") Long zoneId, @Param("areaId") Long areaId, @Param("unbound") Integer unbound, @Param("sceneManageId") Long sceneManageId); |
| | | |
| | | |
| | | /** |
| | |
| | | <where> |
| | | ds.is_deleted = 0 |
| | | <if test="unbound != null and unbound == 1"> |
| | | and not exists ( |
| | | select 1 |
| | | from ja_fw_defense_scene_manage dsm |
| | | where dsm.is_deleted = 0 |
| | | and dsm.defense_scene_id = ds.id |
| | | and ( |
| | | not exists ( |
| | | select 1 |
| | | from ja_fw_defense_scene_manage dsm |
| | | where dsm.is_deleted = 0 |
| | | and dsm.defense_scene_id = ds.id |
| | | ) |
| | | <if test="sceneManageId != null"> |
| | | or exists ( |
| | | select 1 |
| | | from ja_fw_defense_scene_manage dsm |
| | | where dsm.is_deleted = 0 |
| | | and dsm.id = #{sceneManageId} |
| | | and dsm.defense_scene_id = ds.id |
| | | ) |
| | | </if> |
| | | ) |
| | | </if> |
| | | <if test="filterSelected != null and filterSelected == 1"> |
| | |
| | | * @param zoneId |
| | | * @param areaId |
| | | * @param unbound |
| | | * @param sceneManageId |
| | | * @return |
| | | */ |
| | | List<FwDefenseSceneVO> selectFwDefenseSceneList(Integer filterSelected, Long zoneId, Long areaId, Integer unbound); |
| | | List<FwDefenseSceneVO> selectFwDefenseSceneList(Integer filterSelected, Long zoneId, Long areaId, Integer unbound, Long sceneManageId); |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<FwDefenseSceneVO> selectFwDefenseSceneList(Integer filterSelected, Long zoneId, Long areaId, Integer unbound) { |
| | | return baseMapper.selectFwDefenseSceneList(filterSelected, zoneId, areaId, unbound); |
| | | public List<FwDefenseSceneVO> selectFwDefenseSceneList(Integer filterSelected, Long zoneId, Long areaId, Integer unbound, Long sceneManageId) { |
| | | return baseMapper.selectFwDefenseSceneList(filterSelected, zoneId, areaId, unbound, sceneManageId); |
| | | } |
| | | |
| | | private List<Long> parseIdList(String ids) { |
| | |
| | | @ApiParam("净利润") @RequestParam(value = "netProfit", required = false) String netProfit, |
| | | @ApiParam("财务内部收益率") @RequestParam(value = "financialIrr", required = false) String financialIrr, |
| | | @ApiParam("市场空间") @RequestParam(value = "marketSpace", required = false) String marketSpace, |
| | | @ApiParam("收益预测") @RequestParam(value = "earnForecast", required = false) String earnForecast, |
| | | @ApiParam("创建人") @RequestParam(value = "nickName", required = false) String nickName |
| | | ) { |
| | | Page<GdOperationalRevenue> page = new Page<>(current, size); |
| | | IPage<GdOperationalRevenue> result = operationalRevenueService.selectPage(page, operatingIncome, totalCost, netProfit, financialIrr, marketSpace, nickName); |
| | | IPage<GdOperationalRevenue> result = operationalRevenueService.selectPage(page, operatingIncome, totalCost, netProfit, financialIrr, marketSpace, earnForecast, nickName); |
| | | |
| | | // 转换为Vo分页 |
| | | IPage<GdOperationalRevenueVo> voPage = result.convert(operationalRevenueService::convertToVo); |
| | |
| | | @TableField("nick_name") |
| | | private String nickName; |
| | | |
| | | @TableField(exist = false) |
| | | @TableField("earn_forecast") |
| | | private String earnForecast; |
| | | |
| | | /** |
| | |
| | | * @param netProfit 净利润 |
| | | * @param financialIrr 财务内部收益率 |
| | | * @param marketSpace 市场空间 |
| | | * @param earnForecast 收益预测 |
| | | * @param nickName 创建人 |
| | | * @return 分页结果 |
| | | */ |
| | | IPage<GdOperationalRevenue> selectPage(Page<GdOperationalRevenue> page, String operatingIncome, String totalCost, String netProfit, String financialIrr, String marketSpace, String nickName); |
| | | IPage<GdOperationalRevenue> selectPage(Page<GdOperationalRevenue> page, String operatingIncome, String totalCost, String netProfit, String financialIrr, String marketSpace, String earnForecast, String nickName); |
| | | |
| | | /** |
| | | * 实体类转换Vo |
| | |
| | | implements GdOperationalRevenueService { |
| | | |
| | | @Override |
| | | public IPage<GdOperationalRevenue> selectPage(Page<GdOperationalRevenue> page, String operatingIncome, String totalCost, String netProfit, String financialIrr, String marketSpace, String nickName) { |
| | | public IPage<GdOperationalRevenue> selectPage(Page<GdOperationalRevenue> page, String operatingIncome, String totalCost, String netProfit, String financialIrr, String marketSpace, String earnForecast, String nickName) { |
| | | LambdaQueryWrapper<GdOperationalRevenue> queryWrapper = new LambdaQueryWrapper<>(); |
| | | |
| | | // 根据营业收入查询 (转换为精确查询) |
| | |
| | | queryWrapper.like(GdOperationalRevenue::getMarketSpace, marketSpace); |
| | | } |
| | | |
| | | // 根据收益预测模糊查询 |
| | | if (StringUtils.hasText(earnForecast)) { |
| | | queryWrapper.like(GdOperationalRevenue::getEarnForecast, earnForecast); |
| | | } |
| | | |
| | | // 根据创建人名称模糊查询 |
| | | if (StringUtils.hasText(nickName)) { |
| | | queryWrapper.like(GdOperationalRevenue::getNickName, nickName); |