lin
2024-03-14 c4e2c196aad8af656d94bc47e9f1a80bc504b5d7
src/main/java/org/springblade/modules/place/controller/PlaceController.java
@@ -21,20 +21,17 @@
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.house.excel.HouseAndHoldExcel;
import org.springblade.modules.house.excel.HouseAndHoldImporter;
import org.springblade.modules.place.excel.PlaceAndRelExcel;
import org.springblade.modules.place.excel.PlaceAndRelImporter;
import org.springblade.modules.place.excel.PlaceExcel;
import org.springblade.modules.place.excel.PlaceImporter;
import org.springblade.modules.place.excel.*;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.place.entity.PlaceEntity;
@@ -43,6 +40,8 @@
import org.springblade.modules.place.service.IPlaceService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
 * 场所表 控制器
@@ -87,6 +86,28 @@
   @ApiOperation(value = "分页", notes = "传入place")
   public R<IPage<PlaceVO>> page(PlaceVO place, Query query) {
      IPage<PlaceVO> pages = placeService.selectPlacePage(Condition.getPage(query), place);
      return R.data(pages);
   }
   /**
    * 九小场所档案
    */
   @GetMapping("/ninePage")
   @ApiOperationSupport(order = 3)
   @ApiOperation(value = "分页", notes = "传入place")
   public R<IPage<PlaceVO>> ninePage(PlaceVO place, Query query) {
      IPage<PlaceVO> pages = placeService.selectNinePlacePage(Condition.getPage(query), place);
      return R.data(pages);
   }
   /**
    * 企业商超列表查询
    */
   @GetMapping("/mallPage")
   @ApiOperationSupport(order = 3)
   @ApiOperation(value = "分页", notes = "传入place")
   public R<IPage<PlaceVO>> mallPage(PlaceVO place, Query query) {
      IPage<PlaceVO> pages = placeService.selectMallPage(Condition.getPage(query), place);
      return R.data(pages);
   }
@@ -159,7 +180,9 @@
   @ApiOperationSupport(order = 7)
   @ApiOperation(value = "逻辑删除", notes = "传入ids")
   public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
      return R.status(placeService.removeByIds(Func.toLongList(ids)));
      List<Long> longs = Func.toLongList(ids);
      // 返回
      return R.status(placeService.removePlace(longs));
   }
   /**
@@ -180,6 +203,16 @@
   @GetMapping("/historyPlaceLabelHandle")
   public R historyPlaceLabelHandle(PlaceVO place) {
      return R.data(placeService.historyPlaceLabelHandle(place));
   }
   /**
    * 历史场所详情数据处理
    * @param place
    * @return
    */
   @GetMapping("/historyPlaceExtHandle")
   public R historyPlaceExtHandle(PlaceVO place) {
      return R.data(placeService.historyPlaceExtHandle(place));
   }
@@ -215,6 +248,15 @@
   }
   /**
    * 商超数据处理
    * @return
    */
   @GetMapping("/placeAndRelHandle")
   public R placeAndRelHandle() {
      return R.data(placeService.placeAndRelHandle());
   }
   /**
    * 场所数据处理-用户信息(场所负责人信息写入到场所表)
    */
   @GetMapping("/placeUserHandle")
@@ -229,4 +271,40 @@
   public R placeLabelHandle() {
      return R.data(placeService.placeLabelHandle());
   }
   /**
    * 导出九小统计
    */
   @GetMapping("exportNineType")
   @ApiOperationSupport(order = 13)
   @ApiOperation(value = "导出九小统计", notes = "传入place")
   public void exportNineType(PlaceVO place, HttpServletResponse response) {
      List<NinePlaceExcel> list = placeService.export(place);
      ExcelUtil.export(response, "档案管理" + DateUtil.time(), "场所数据表", list, NinePlaceExcel.class);
   }
   /**
    * 场所警务网格处理
    */
   @GetMapping("/placeJwGridCodeHandle")
   public R placeJwGridCodeHandle() {
      return R.data(placeService.placeJwGridCodeHandle());
   }
   /**
    * 场所综治网格处理
    */
   @GetMapping("/placeGridCodeHandle")
   public R placeGridCodeHandle() {
      return R.data(placeService.placeGridCodeHandle());
   }
   /**
    * 场所二维码绑定处理
    */
   @GetMapping("/placeDoorBindHandle")
   public R placeDoorBindHandle() {
      return R.data(placeService.placeDoorBindHandle());
   }
}