通用select接口
This commit is contained in:
parent
00b06418bf
commit
219fa82d64
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
<if test="level!=null and level!=''">
|
||||
<if test="level == 2">
|
||||
AND mt.level IN ('1','2')
|
||||
|
|
|
|||
Loading…
Reference in New Issue