|
@@ -1,18 +1,24 @@
|
|
|
package com.project.zcustom.controller.logistics;
|
|
|
|
|
|
+import com.project.common.annotation.Log;
|
|
|
+import com.project.common.core.controller.BaseController;
|
|
|
import com.project.common.core.domain.AjaxResult;
|
|
|
+import com.project.common.enums.BusinessType;
|
|
|
+import com.project.common.utils.poi.ExcelUtil;
|
|
|
+import com.project.zcustom.domain.addional.LargeHousingLand;
|
|
|
import com.project.zcustom.service.logistics.ILargeHousingLandService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
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.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.Arrays;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/large/housing")
|
|
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
|
-public class PlatHousingLandController {
|
|
|
+public class PlatHousingLandController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private ILargeHousingLandService largeHousingLandService;
|
|
@@ -40,4 +46,36 @@ public class PlatHousingLandController {
|
|
|
public AjaxResult getInvestFinishState() {
|
|
|
return AjaxResult.success("查询成功", largeHousingLandService.getInvestFinishState());
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/list")
|
|
|
+ public AjaxResult list(LargeHousingLand entity) {
|
|
|
+ return AjaxResult.success("查询成功", largeHousingLandService.pagingLargePlatHousingLandList(entity));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping(value = "/getInfo/{id}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
|
+ return AjaxResult.success("查询成功", largeHousingLandService.getById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthorize("@ss.hasPermi('zcustom:platHousingLand:add')")
|
|
|
+ @Log(title = "房产土地", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping("add")
|
|
|
+ public AjaxResult add(@RequestBody LargeHousingLand entity) {
|
|
|
+ return toAjax(largeHousingLandService.save(entity));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthorize("@ss.hasPermi('zcustom:platHousingLand:edit')")
|
|
|
+ @Log(title = "房产土地", businessType = BusinessType.UPDATE)
|
|
|
+ @PostMapping("edit")
|
|
|
+ public AjaxResult edit(@RequestBody LargeHousingLand entity) {
|
|
|
+ return toAjax(largeHousingLandService.updateById(entity));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthorize("@ss.hasPermi('zcustom:platHousingLand:remove')")
|
|
|
+ @Log(title = "房产土地", businessType = BusinessType.DELETE)
|
|
|
+ @GetMapping("/remove/{ids}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids) {
|
|
|
+ return toAjax(largeHousingLandService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
|
|
+ }
|
|
|
}
|