提交 09be6765 作者: han

Merge branch 'develop'

...@@ -18,4 +18,4 @@ patches: ...@@ -18,4 +18,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms
newTag: 5046aa4b5db1f77c123165dfc3ea7bb0adabe47d newTag: a9bfdfcaf347c83aca6b0d3adba953e1913aaec0
...@@ -65,8 +65,8 @@ public class IndustryTypeController { ...@@ -65,8 +65,8 @@ public class IndustryTypeController {
@ApiOperation(value = "一级行业详情-全部") @ApiOperation(value = "一级行业详情-全部")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustryTypeDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustryTypeDTO.class)})
@GetMapping("getIndustryTypeById") @GetMapping("getIndustryTypeById")
public IndustryTypeDTO getIndustryTypeById(@RequestParam Integer id) { public IndustryTypeDTO getIndustryTypeById(@RequestParam Integer id, @RequestParam Integer inspectionId) {
return industryTypeService.getIndustryTypeById(id); return industryTypeService.getIndustryTypeById(id, inspectionId);
} }
@ApiOperation(value = "一级行业列表-全部") @ApiOperation(value = "一级行业列表-全部")
......
...@@ -30,4 +30,11 @@ public interface IndustryTypeDao { ...@@ -30,4 +30,11 @@ public interface IndustryTypeDao {
List<InspectionDO> listInspectionsByIndustryTypeIdId(Integer industryTypeId); List<InspectionDO> listInspectionsByIndustryTypeIdId(Integer industryTypeId);
IndustryTypeDO getIndustryTypeById(Integer id); IndustryTypeDO getIndustryTypeById(Integer id);
/**
* 获取二级分类的服务名称
* @param inspectionId 二级服务的id
* @return {@link String}
*/
String getInspectionNameById(Integer inspectionId);
} }
...@@ -2,6 +2,7 @@ package com.mmc.pms.entity.inspection; ...@@ -2,6 +2,7 @@ package com.mmc.pms.entity.inspection;
import com.mmc.pms.model.inspection.dto.IndustryTypeDTO; import com.mmc.pms.model.inspection.dto.IndustryTypeDTO;
import com.mmc.pms.model.inspection.vo.IndustryTypeVO; import com.mmc.pms.model.inspection.vo.IndustryTypeVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -46,6 +47,8 @@ public class IndustryTypeDO implements Serializable { ...@@ -46,6 +47,8 @@ public class IndustryTypeDO implements Serializable {
* 服务列表 * 服务列表
*/ */
private List<InspectionDO> inspectionDOS; private List<InspectionDO> inspectionDOS;
@ApiModelProperty(value = "二级服务分类名称")
private String inspectionName;
public IndustryTypeDO(IndustryTypeVO industryTypeVO) { public IndustryTypeDO(IndustryTypeVO industryTypeVO) {
this.id = industryTypeVO.getId(); this.id = industryTypeVO.getId();
...@@ -60,6 +63,7 @@ public class IndustryTypeDO implements Serializable { ...@@ -60,6 +63,7 @@ public class IndustryTypeDO implements Serializable {
.description(this.description).saleState(this.saleState).createTime(this.createTime) .description(this.description).saleState(this.saleState).createTime(this.createTime)
.inspectionDTOS(CollectionUtils.isNotEmpty(this.inspectionDOS) ? .inspectionDTOS(CollectionUtils.isNotEmpty(this.inspectionDOS) ?
this.inspectionDOS.stream().map(InspectionDO::buildInspectionDTO).collect(Collectors.toList()) : null) this.inspectionDOS.stream().map(InspectionDO::buildInspectionDTO).collect(Collectors.toList()) : null)
.inspectionName(this.inspectionName)
.build(); .build();
} }
......
...@@ -34,4 +34,6 @@ public class IndustryTypeDTO implements Serializable { ...@@ -34,4 +34,6 @@ public class IndustryTypeDTO implements Serializable {
private Date createTime; private Date createTime;
@ApiModelProperty(value = "服务列表") @ApiModelProperty(value = "服务列表")
private List<InspectionDTO> inspectionDTOS; private List<InspectionDTO> inspectionDTOS;
@ApiModelProperty(value = "二级服务分类名称")
private String inspectionName;
} }
...@@ -22,7 +22,7 @@ public interface IndustryTypeService { ...@@ -22,7 +22,7 @@ public interface IndustryTypeService {
ResultBody<IndustryTypeDTO> listInspectionsByIndustryTypeId(Integer id); ResultBody<IndustryTypeDTO> listInspectionsByIndustryTypeId(Integer id);
IndustryTypeDTO getIndustryTypeById(Integer id); IndustryTypeDTO getIndustryTypeById(Integer id,Integer inspectionId);
List<IndustryTypeDTO> listIndustry(); List<IndustryTypeDTO> listIndustry();
} }
...@@ -14,6 +14,7 @@ import com.mmc.pms.service.inspection.IndustryTypeService; ...@@ -14,6 +14,7 @@ import com.mmc.pms.service.inspection.IndustryTypeService;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -23,6 +24,7 @@ import java.util.stream.Collectors; ...@@ -23,6 +24,7 @@ import java.util.stream.Collectors;
* @Date: 2023/8/3 18:01 * @Date: 2023/8/3 18:01
*/ */
@Service @Service
@Transactional(rollbackFor = Exception.class)
public class IndustryTypeServiceImpl implements IndustryTypeService { public class IndustryTypeServiceImpl implements IndustryTypeService {
@Autowired @Autowired
private IndustryTypeDao industryTypeDao; private IndustryTypeDao industryTypeDao;
...@@ -84,8 +86,10 @@ public class IndustryTypeServiceImpl implements IndustryTypeService { ...@@ -84,8 +86,10 @@ public class IndustryTypeServiceImpl implements IndustryTypeService {
} }
@Override @Override
public IndustryTypeDTO getIndustryTypeById(Integer id) { public IndustryTypeDTO getIndustryTypeById(Integer id,Integer inspectionId) {
IndustryTypeDO industryTypeDO = industryTypeDao.getIndustryTypeById(id); IndustryTypeDO industryTypeDO = industryTypeDao.getIndustryTypeById(id);
String inspectionNameById = industryTypeDao.getInspectionNameById(inspectionId);
industryTypeDO.setInspectionName(inspectionNameById);
return industryTypeDO.buildIndustryTypeDTO(); return industryTypeDO.buildIndustryTypeDTO();
} }
......
...@@ -119,4 +119,7 @@ ...@@ -119,4 +119,7 @@
from industry_type it from industry_type it
where it.id = #{id} where it.id = #{id}
</select> </select>
<select id="getInspectionNameById" resultType="java.lang.String">
select inspection_name from inspection where id = #{inspectionId}
</select>
</mapper> </mapper>
...@@ -42,3 +42,4 @@ data-filter: ...@@ -42,3 +42,4 @@ data-filter:
- /pms/brand/listBrandInfo - /pms/brand/listBrandInfo
- /pms/app/lease/leaseGoodsList - /pms/app/lease/leaseGoodsList
- /pms/lease/goods/getLeaseTermInfo - /pms/lease/goods/getLeaseTermInfo
- /pms/app/goods/brandStoreList
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论