Commit 7db57197 authored by helinlin's avatar helinlin

开发特种设备详情页

parent ebe53da0
package com.yeejoin.amos.boot.module.tzs.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.IdxUjer;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface IdxUjerMapper extends BaseMapper<IdxUjer> {
IPage<IdxUjer> getPage(IPage<IdxUjer> page, @Param("ids") List<String> ids, @Param("bizType") String bizType);
}
package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.time.LocalDateTime;
@Data
public class IdxBaseEntity {
@TableId(value = "id", type = IdType.UUID)
private String id;
@TableField("valid")
private boolean valid;
@TableField("record")
private String record;
@TableField("date")
private LocalDateTime date;
@TableField("creator")
private String creator;
@TableField("creatorName")
private String creatorName;
@TableField("status")
private String status;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@TableName("idx_biz_ujer")
public class IdxUjer extends IdxBaseEntity {
@TableField("businessName")
private String businessName;
@TableField("attachment")
private String attachment;
@TableField("remarks")
private String remarks;
@TableField("development")
private String development;
@TableField("companyId")
private String companyId;
@TableField("companyId_LABEL")
private String companyIdLabel;
private transient String bizType;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.feign;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
@FeignClient(value = "idx")
public interface IdxFeignService {
@RequestMapping("/dimensionTable/getTreeChildIds")
ResponseModel<List<String>> getTreeChildIds(@RequestParam String dimensionTableId, @RequestParam String selectValue);
}
package com.yeejoin.amos.boot.module.tzs.flc.api.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.IdxUjer;
public interface InspectionService {
IPage<IdxUjer> bizDetailList(String dimensionTableId, String selectValue, String bizType, int current, int size);
}
package com.yeejoin.amos.boot.module.tzs.biz.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.IdxUjer;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.InspectionService;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
@RestController
@RequestMapping("/Inspection")
@Api(value = "双重预防 监察处置分析")
public class InspectionController {
@Autowired
InspectionService inspectionService;
@GetMapping("/bizDetailList")
@ApiOperation(value = "检察任务填报详情")
@TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<IPage<IdxUjer>> bizDetailList(
@RequestParam String dimensionTableId,
@RequestParam String selectValue,
@RequestParam(required = false) String bizType,
@RequestParam int current,
@RequestParam int size
) {
IPage<IdxUjer> page = inspectionService.bizDetailList(dimensionTableId, selectValue, bizType, current, size);
return ResponseHelper.buildResponse(page);
}
}
package com.yeejoin.amos.boot.module.tzs.biz.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tzs.api.mapper.IdxUjerMapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.IdxUjer;
import com.yeejoin.amos.boot.module.tzs.flc.api.feign.IdxFeignService;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.InspectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class InspectionServiceImpl implements InspectionService {
@Autowired
JdbcTemplate jdbcTemplate;
@Autowired
IdxFeignService idxFeignService;
@Autowired
IdxUjerMapper idxUjerMapper;
public IPage<IdxUjer> bizDetailList(
String dimensionTableId,
String selectValue,
String bizType, int current, int size
) {
List<String> ids = idxFeignService.getTreeChildIds(dimensionTableId, selectValue).getResult();
IPage<IdxUjer> idxUjerPage = new Page<>(current, size);
return idxUjerMapper.getPage(idxUjerPage, ids, bizType);
}
}
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