diff --git a/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/berthmanage/BerthManageController.java b/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/berthmanage/BerthManageController.java index e69df69..17af689 100644 --- a/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/berthmanage/BerthManageController.java +++ b/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/berthmanage/BerthManageController.java @@ -3,12 +3,15 @@ package com.zteits.irain.portal.web.parkinglotcloudplatform.berthmanage; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; +import java.util.HashMap; import java.util.List; +import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.poi.xssf.usermodel.XSSFSheet; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; @@ -31,7 +34,10 @@ import com.zteits.clouds.api.apibase.bean.PageBean; import com.zteits.clouds.api.apibase.exception.BizException; import com.zteits.clouds.api.dto.park.dto.BerthsDTO; import com.zteits.clouds.api.dto.park.param.BerthManageRequest; +import com.zteits.clouds.api.dto.sys.SysCodeValueDTO; +import com.zteits.clouds.api.dto.sys.param.SysCodeValueByKindQueryRequest; import com.zteits.clouds.api.service.park.BerthManageService; +import com.zteits.clouds.api.service.sys.SysCommonService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -57,6 +63,8 @@ import io.swagger.annotations.ApiOperation; public class BerthManageController extends BizController { @Autowired private BerthManageService berthManageService; + @Autowired + private SysCommonService sysCommonService; /** @@ -125,6 +133,18 @@ public class BerthManageController extends BizController { request.setBaseRequest(new BaseInfo(1, 1000)); request.setSysCode(sysCode); + //查询字典值 + Map codes = new HashMap<>(); + SysCodeValueByKindQueryRequest codeValueRequest = new SysCodeValueByKindQueryRequest(); + BeanUtils.copyProperties(request, codeValueRequest); + codeValueRequest.setSysCodeKind("SYS_CODE_PARK_STYLE"); + BizResult> codeValueDTO = sysCommonService.querySysCodeValueByKind(codeValueRequest); + if(CollectionUtils.isNotEmpty(codeValueDTO.getData())){ + for (SysCodeValueDTO dto : codeValueDTO.getData()) { + codes.put(dto.getCodeValue(), dto.getCodeValueName()); + } + } + BizResult> bizResult = berthManageService.queryBerthByCondition(request); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String[] title = new String[] { "序号","泊位编号", "所属停车场", "所属泊位区间", "停车方式" }; @@ -148,7 +168,7 @@ public class BerthManageController extends BizController { obj[index++] = b.getBerthNo(); obj[index++] = b.getPlName(); obj[index++] = b.getParkAreaName(); - obj[index++] = b.getParkType(); + obj[index++] = codes.get(b.getParkType()); contentList.add(obj); } ExcleFillDateManager fillUserManager = new ExcleFillDateManager(); diff --git a/src/main/resources/dubbo/dubbo-park-consumer.xml b/src/main/resources/dubbo/dubbo-park-consumer.xml index 4da85a3..72de840 100644 --- a/src/main/resources/dubbo/dubbo-park-consumer.xml +++ b/src/main/resources/dubbo/dubbo-park-consumer.xml @@ -169,4 +169,9 @@ + + + \ No newline at end of file