Commit a9b770c0 authored by suhuiguang's avatar suhuiguang

1.设备种类下拉多压力管道原件

parent 2320e937
......@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService;
import com.yeejoin.amos.boot.module.jg.biz.service.IPdfService;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgRegistrationHistoryServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.utils.CodeUtil;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import com.yeejoin.amos.feign.systemctl.Systemctl;
......@@ -191,7 +192,7 @@ public class CommonController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equipmentClassification")
@ApiOperation(httpMethod = "GET", value = "设备分类", notes = "1,设备种类 2,设备类别 3,设备品种")
public ResponseModel<List<EquipmentCategory>> equipmentClassification(@RequestParam(value = "type") String type) {
public ResponseModel<List<EquipmentCategoryDto>> equipmentClassification(@RequestParam(value = "type") String type) {
return ResponseHelper.buildResponse(commonService.equipmentClassification(type));
}
......
......@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.jg.api.dto.InstanceRuntimeData;
import com.yeejoin.amos.boot.module.jg.api.dto.UseFlagParamDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import javax.servlet.http.HttpServletResponse;
......@@ -184,7 +185,7 @@ public interface ICommonService {
* @param type 1,设备种类 2,设备类别 3,设备品种
* @return
*/
List<EquipmentCategory> equipmentClassification(String type);
List<EquipmentCategoryDto> equipmentClassification(String type);
/**
* 套打使用标志生成
......
......@@ -47,6 +47,7 @@ import com.yeejoin.amos.boot.module.jg.biz.utils.FileExporter;
import com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils;
import com.yeejoin.amos.boot.module.jg.biz.utils.JsonUtils;
import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipTechParamPipeline;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo;
......@@ -1968,9 +1969,9 @@ public class CommonServiceImpl implements ICommonService {
* .c@return
*/
@Override
public List<EquipmentCategory> equipmentClassification(String type) {
List<EquipmentCategory> categoryList = equipmentCategoryMapper.selectList(new QueryWrapper<>());
List<EquipmentCategory> result = Collections.emptyList();
public List<EquipmentCategoryDto> equipmentClassification(String type) {
List<EquipmentCategoryDto> categoryList = equipmentCategoryMapper.selectClassifyNoStart7();
List<EquipmentCategoryDto> result = Collections.emptyList();
switch (type) {
case "1":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*000$").matcher(category.getCode()).matches()).collect(Collectors.toList());
......
......@@ -23,6 +23,10 @@ import java.util.Map;
@Mapper
public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
@Select("SELECT * FROM tz_equipment_category WHERE code NOT LIKE '7%' ORDER BY parent_id")
List<EquipmentCategoryDto> selectClassifyNoStart7();
@Select("select * from tz_equipment_category where code in('1000','2000','3000','4000','5000','6000','8000','9000')")
List<EquipmentCategoryDto> selectClassify();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment