diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/controller/SelectController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/controller/SelectController.java index 862fd6c6..8d407a5f 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/controller/SelectController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/controller/SelectController.java @@ -3,6 +3,7 @@ package com.bonus.material.common.controller; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.material.common.domain.dto.SelectDto; import com.bonus.material.common.service.SelectService; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -14,6 +15,7 @@ import javax.annotation.Resource; * @author 10488 * 统一下拉选 */ +@Api(tags = "统一下拉选接口") @RestController @RequestMapping("/select/") public class SelectController { diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml index 78c6a8fe..a5b2f99f 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml @@ -94,13 +94,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mt.type_name AS label, mt.parent_id AS parentId, mt.unit_name AS unitName, - mt.company_id AS companyId, - mt.code, CASE mt.manage_type WHEN 0 THEN IFNULL(subquery0.num, 0) ELSE - IFNULL(mt.num, 0) + IFNULL(mt.storage_num, 0) END as num, mt.model_code AS modelCode, mt.manage_type AS manageType @@ -114,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id WHERE mm.ma_code is not null and mm.ma_status in (15) GROUP BY mt.type_id) AS subquery0 ON subquery0.type_id = mt.type_id - WHERE mt.del_flag = '0' and mt.is_whole_set IS NULL + WHERE mt.del_flag = '0' AND mt.level IN ('1','2')