|
@@ -5,14 +5,21 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import platform.common.Constant;
|
|
import platform.common.Constant;
|
|
|
import platform.common.base.controller.BaseController;
|
|
import platform.common.base.controller.BaseController;
|
|
|
|
|
+import platform.common.util.DateUtil;
|
|
|
|
|
+import platform.common.util.ExportExcel;
|
|
|
import platform.common.util.ShiroUtils;
|
|
import platform.common.util.ShiroUtils;
|
|
|
|
|
+import platform.modules.build.entity.Company;
|
|
|
import platform.modules.carrier.dto.*;
|
|
import platform.modules.carrier.dto.*;
|
|
|
import platform.modules.carrier.entity.Contract;
|
|
import platform.modules.carrier.entity.Contract;
|
|
|
import platform.modules.carrier.entity.ContractFloor;
|
|
import platform.modules.carrier.entity.ContractFloor;
|
|
|
import platform.modules.carrier.service.IcContractService;
|
|
import platform.modules.carrier.service.IcContractService;
|
|
|
|
|
+import platform.modules.company.dto.CompanyInfoExportDto;
|
|
|
|
|
+import platform.modules.company.dto.CompanyInfoManageDto;
|
|
|
import platform.modules.government.entity.Street;
|
|
import platform.modules.government.entity.Street;
|
|
|
|
|
+import platform.modules.sys.report.ContractExport;
|
|
|
import platform.modules.sys.web.ResponseMessage;
|
|
import platform.modules.sys.web.ResponseMessage;
|
|
|
|
|
|
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -109,13 +116,38 @@ public class IcContractController extends BaseController {
|
|
|
@PostMapping(value = "/contracts")
|
|
@PostMapping(value = "/contracts")
|
|
|
public ResponseMessage list(@RequestBody CustomSearchCondition condition) throws Exception {
|
|
public ResponseMessage list(@RequestBody CustomSearchCondition condition) throws Exception {
|
|
|
|
|
|
|
|
- log.info("分页查询招商信息,pageNum = {},condition = {}", condition.getPageNum(), condition.toString(), false);
|
|
|
|
|
|
|
+ log.info("分页查询租住信息,pageNum = {},condition = {}", condition.getPageNum(), condition.toString(), false);
|
|
|
PageInfo<ContractFloor> pageInfo = contractService.findContractList(condition.getPageNum(), condition.getPageSize(), condition);
|
|
PageInfo<ContractFloor> pageInfo = contractService.findContractList(condition.getPageNum(), condition.getPageSize(), condition);
|
|
|
- log.info("分页查询招商信息列表结果! pageInfo = {}", pageInfo);
|
|
|
|
|
|
|
+ log.info("分页查询租住信息列表结果! pageInfo = {}", pageInfo);
|
|
|
|
|
|
|
|
return ResponseMessage.success("success", pageInfo);
|
|
return ResponseMessage.success("success", pageInfo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 后台管理导出
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return
|
|
|
|
|
+ * @throws Exception
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping(value = "/contract/export")
|
|
|
|
|
+ public void export(
|
|
|
|
|
+ HttpServletResponse response,
|
|
|
|
|
+ @RequestParam(required = false) String park_id,
|
|
|
|
|
+ @RequestParam(required = false) String street_id,
|
|
|
|
|
+ @RequestParam(required = false) String status,
|
|
|
|
|
+ @RequestParam(required = false) String title
|
|
|
|
|
+ ) throws Exception {
|
|
|
|
|
+
|
|
|
|
|
+ CustomSearchCondition condition = new CustomSearchCondition();
|
|
|
|
|
+ condition.setPark_id(park_id);
|
|
|
|
|
+ condition.setStreet_id(street_id);
|
|
|
|
|
+ condition.setStatus(status);
|
|
|
|
|
+ condition.setTitle(title);
|
|
|
|
|
+ List<ContractFloor> list = contractService.findList(condition);
|
|
|
|
|
+ String fileName = "租住信息 " + DateUtil.getCurrentDateString("yyyy-MM-dd") + ".xlsx";
|
|
|
|
|
+ new ExportExcel("租住信息 " + DateUtil.getCurrentDateString("yyyy-MM-dd"), IcContractExportDto.class).setDataList(list).write(response, fileName).dispose();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 获取详情
|
|
* 获取详情
|
|
|
*
|
|
*
|
|
@@ -138,7 +170,7 @@ public class IcContractController extends BaseController {
|
|
|
public Object getStreetAreaStatistic(
|
|
public Object getStreetAreaStatistic(
|
|
|
@RequestParam(defaultValue = "1", required = false) Integer pageNum,
|
|
@RequestParam(defaultValue = "1", required = false) Integer pageNum,
|
|
|
@RequestParam(defaultValue = "10", required = false) Integer pageSize
|
|
@RequestParam(defaultValue = "10", required = false) Integer pageSize
|
|
|
- ){
|
|
|
|
|
|
|
+ ) {
|
|
|
PageInfo<CarrierLibraryResult> pageInfo = contractService.getStreetAreaStatistic(pageNum, pageSize);
|
|
PageInfo<CarrierLibraryResult> pageInfo = contractService.getStreetAreaStatistic(pageNum, pageSize);
|
|
|
return ResponseMessage.success("success", pageInfo);
|
|
return ResponseMessage.success("success", pageInfo);
|
|
|
}
|
|
}
|
|
@@ -150,7 +182,7 @@ public class IcContractController extends BaseController {
|
|
|
*/
|
|
*/
|
|
|
@GetMapping(value = "/contract/park/list")
|
|
@GetMapping(value = "/contract/park/list")
|
|
|
public ResponseMessage getParkList() {
|
|
public ResponseMessage getParkList() {
|
|
|
- if (Objects.equals(Constant.UserType.GOVERNMENT, ShiroUtils.getUserType())){
|
|
|
|
|
|
|
+ if (Objects.equals(Constant.UserType.GOVERNMENT, ShiroUtils.getUserType())) {
|
|
|
List<StreetTree> streetList = contractService.findStreetBuildingList();
|
|
List<StreetTree> streetList = contractService.findStreetBuildingList();
|
|
|
return ResponseMessage.success("success", streetList);
|
|
return ResponseMessage.success("success", streetList);
|
|
|
}
|
|
}
|