فهرست منبع

设备管理,供应商管理, 考勤api接口修改

shudonghui 1 سال پیش
والد
کامیت
095b5f3715
21فایلهای تغییر یافته به همراه143 افزوده شده و 35 حذف شده
  1. 2 1
      sop-business/src/main/java/com/qmth/sop/business/bean/result/SysCustomResult.java
  2. 34 0
      sop-business/src/main/java/com/qmth/sop/business/bean/result/SysDeviceResult.java
  3. 4 3
      sop-business/src/main/java/com/qmth/sop/business/bean/result/SysDingGroupResult.java
  4. 34 0
      sop-business/src/main/java/com/qmth/sop/business/bean/result/SysDingGroupRoleResult.java
  5. 2 1
      sop-business/src/main/java/com/qmth/sop/business/bean/result/SysLevelResult.java
  6. 9 6
      sop-business/src/main/java/com/qmth/sop/business/entity/SysDevice.java
  7. 2 1
      sop-business/src/main/java/com/qmth/sop/business/mapper/SysDeviceMapper.java
  8. 5 0
      sop-business/src/main/java/com/qmth/sop/business/mapper/SysDingObjMapper.java
  9. 2 1
      sop-business/src/main/java/com/qmth/sop/business/service/SysDeviceService.java
  10. 4 0
      sop-business/src/main/java/com/qmth/sop/business/service/SysDingObjService.java
  11. 2 1
      sop-business/src/main/java/com/qmth/sop/business/service/impl/SysDeviceServiceImpl.java
  12. 7 6
      sop-business/src/main/java/com/qmth/sop/business/service/impl/SysDingGroupServiceImpl.java
  13. 7 0
      sop-business/src/main/java/com/qmth/sop/business/service/impl/SysDingObjServiceImpl.java
  14. 4 4
      sop-business/src/main/java/com/qmth/sop/business/service/impl/SysLevelServiceImpl.java
  15. 2 0
      sop-business/src/main/resources/db/log/shudonghui_update_log.sql
  16. 3 2
      sop-business/src/main/resources/mapper/SysDeviceMapper.xml
  17. 9 1
      sop-business/src/main/resources/mapper/SysDingObjMapper.xml
  18. 4 3
      sop-server/src/main/java/com/qmth/sop/server/api/SysDeviceController.java
  19. 2 2
      sop-server/src/main/java/com/qmth/sop/server/api/SysDingGroupController.java
  20. 1 1
      sop-server/src/main/java/com/qmth/sop/server/api/SysLevelController.java
  21. 4 2
      sop-server/src/main/java/com/qmth/sop/server/api/SysSupplierController.java

+ 2 - 1
sop-business/src/main/java/com/qmth/sop/business/bean/result/SysCustomResult.java

@@ -5,6 +5,7 @@ import com.qmth.sop.business.entity.SysCustomRole;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -30,7 +31,7 @@ public class SysCustomResult extends SysCustom implements Serializable {
     private String createName;
 
     @ApiModelProperty(value = "项目角色配置")
-    private List<SysCustomRoleResult>  roleList;
+    private List<SysCustomRoleResult>  roleList= new ArrayList<>();;
 
     public List<SysCustomRoleResult> getRoleList() {
         return roleList;

+ 34 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/SysDeviceResult.java

@@ -0,0 +1,34 @@
+package com.qmth.sop.business.bean.result;
+
+import com.qmth.sop.business.entity.SysCustom;
+import com.qmth.sop.business.entity.SysDevice;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * <p>
+ * 客户表
+ * </p>
+ *
+ * @author wangliang
+ * @since 2023-08-01
+ */
+
+public class SysDeviceResult extends SysDevice implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "客户经理")
+    private String supplier;
+
+    public String getSupplier() {
+        return supplier;
+    }
+
+    public void setSupplier(String supplier) {
+        this.supplier = supplier;
+    }
+}

+ 4 - 3
sop-business/src/main/java/com/qmth/sop/business/bean/result/SysDingGroupResult.java

@@ -5,6 +5,7 @@ import com.qmth.sop.business.entity.SysDingObj;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -29,13 +30,13 @@ public class SysDingGroupResult extends SysDingGroup implements Serializable {
     private Long supplier;
 
     @ApiModelProperty(value = "适用考勤对象")
-    private List<SysDingObj> dingObjs;
+    private List<SysDingGroupRoleResult> dingObjs= new ArrayList<>();
 
-    public List<SysDingObj> getDingObjs() {
+    public List<SysDingGroupRoleResult> getDingObjs() {
         return dingObjs;
     }
 
-    public void setDingObjs(List<SysDingObj> dingObjs) {
+    public void setDingObjs(List<SysDingGroupRoleResult> dingObjs) {
         this.dingObjs = dingObjs;
     }
 

+ 34 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/SysDingGroupRoleResult.java

@@ -0,0 +1,34 @@
+package com.qmth.sop.business.bean.result;
+
+import com.qmth.sop.business.entity.SysDingGroup;
+import com.qmth.sop.business.entity.SysDingObj;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * <p>
+ * 考勤组表
+ * </p>
+ *
+ * @author wangliang
+ * @since 2023-08-01
+ */
+
+public class SysDingGroupRoleResult extends SysDingObj implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "角色名称")
+    private String roleName;
+
+    public String getRoleName() {
+        return roleName;
+    }
+
+    public void setRoleName(String roleName) {
+        this.roleName = roleName;
+    }
+}

+ 2 - 1
sop-business/src/main/java/com/qmth/sop/business/bean/result/SysLevelResult.java

@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -31,7 +32,7 @@ public class SysLevelResult extends SysLevel implements Serializable {
 
 
     @ApiModelProperty(value = "项目角色配置")
-    private List<SysLevelRoleResult> roleList;
+    private List<SysLevelRoleResult> roleList = new ArrayList<>();
 
     public String getCreateName() {
         return createName;

+ 9 - 6
sop-business/src/main/java/com/qmth/sop/business/entity/SysDevice.java

@@ -1,5 +1,7 @@
 package com.qmth.sop.business.entity;
 
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.qmth.sop.common.base.BaseEntity;
 import com.qmth.sop.common.enums.DeviceStatusEnum;
 import io.swagger.annotations.ApiModel;
@@ -32,8 +34,9 @@ public class SysDevice extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "购买时间")
     private Long buyTime;
 
-    @ApiModelProperty(value = "供应商")
-    private String supplier;
+    @ApiModelProperty(value = "供应商id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long supplierId;
 
     @ApiModelProperty(value = "状态,NORMAL:正常,BREAK_DOWN:故障")
     private DeviceStatusEnum status;
@@ -82,12 +85,12 @@ public class SysDevice extends BaseEntity implements Serializable {
         this.buyTime = buyTime;
     }
 
-    public String getSupplier() {
-        return supplier;
+    public Long getSupplierId() {
+        return supplierId;
     }
 
-    public void setSupplier(String supplier) {
-        this.supplier = supplier;
+    public void setSupplierId(Long supplierId) {
+        this.supplierId = supplierId;
     }
 
     public DeviceStatusEnum getStatus() {

+ 2 - 1
sop-business/src/main/java/com/qmth/sop/business/mapper/SysDeviceMapper.java

@@ -3,6 +3,7 @@ package com.qmth.sop.business.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.qmth.sop.business.bean.result.SysDeviceResult;
 import com.qmth.sop.business.entity.SysDevice;
 import org.apache.ibatis.annotations.Param;
 import java.util.Map;
@@ -24,5 +25,5 @@ public interface SysDeviceMapper extends BaseMapper<SysDevice> {
 	 * @return
 	 */
 
-    <T> IPage<SysDevice> query(Page<T> iPage, @Param("query") String query);
+    <T> IPage<SysDeviceResult> query(Page<T> iPage, @Param("query") String query);
 }

+ 5 - 0
sop-business/src/main/java/com/qmth/sop/business/mapper/SysDingObjMapper.java

@@ -1,7 +1,11 @@
 package com.qmth.sop.business.mapper;
 
+import com.qmth.sop.business.bean.result.SysDingGroupRoleResult;
 import com.qmth.sop.business.entity.SysDingObj;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +17,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface SysDingObjMapper extends BaseMapper<SysDingObj> {
 
+    List<SysDingGroupRoleResult> getList(@Param("id") long id);
 }

+ 2 - 1
sop-business/src/main/java/com/qmth/sop/business/service/SysDeviceService.java

@@ -3,6 +3,7 @@ package com.qmth.sop.business.service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.sop.business.bean.result.SysDeviceResult;
 import com.qmth.sop.business.entity.SysDevice;
 import java.util.Map;
 
@@ -23,7 +24,7 @@ public interface SysDeviceService extends IService<SysDevice>{
     * @param
     * @return
     */
-    <T> IPage<SysDevice> query(Page<T> tPage, String query);
+    <T> IPage<SysDeviceResult> query(Page<T> tPage, String query);
 
     /**
     * 新增设备配置表

+ 4 - 0
sop-business/src/main/java/com/qmth/sop/business/service/SysDingObjService.java

@@ -1,8 +1,11 @@
 package com.qmth.sop.business.service;
 
+import com.qmth.sop.business.bean.result.SysDingGroupRoleResult;
 import com.qmth.sop.business.entity.SysDingObj;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 考勤组对象表 服务类
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface SysDingObjService extends IService<SysDingObj> {
 
+    List<SysDingGroupRoleResult> getList(long id);
 }

+ 2 - 1
sop-business/src/main/java/com/qmth/sop/business/service/impl/SysDeviceServiceImpl.java

@@ -3,6 +3,7 @@ package com.qmth.sop.business.service.impl;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.sop.business.bean.result.SysDeviceResult;
 import com.qmth.sop.business.entity.SysDevice;
 import com.qmth.sop.business.entity.SysSupplier;
 import com.qmth.sop.business.entity.SysUser;
@@ -33,7 +34,7 @@ public class SysDeviceServiceImpl extends ServiceImpl<SysDeviceMapper, SysDevice
      * @return
      */
     @Override
-    public <T> IPage<SysDevice> query(Page<T> iPage, String query) {
+    public <T> IPage<SysDeviceResult> query(Page<T> iPage, String query) {
         return this.baseMapper.query(iPage, query);
     }
 

+ 7 - 6
sop-business/src/main/java/com/qmth/sop/business/service/impl/SysDingGroupServiceImpl.java

@@ -43,7 +43,7 @@ public class SysDingGroupServiceImpl extends ServiceImpl<SysDingGroupMapper, Sys
     public IPage<SysDingGroupResult> query(IPage<Map> iPage, String query, Long serviceId) {
         IPage<SysDingGroupResult> dingGroupResultIPage = this.baseMapper.query(iPage, query, serviceId);
         dingGroupResultIPage.getRecords().forEach(e -> {
-            e.setDingObjs(sysDingObjService.list(new QueryWrapper<SysDingObj>().lambda().eq(SysDingObj::getDingGroupId, e.getId())));
+            e.setDingObjs(sysDingObjService.getList(e.getId()));
         });
         return dingGroupResultIPage;
     }
@@ -56,14 +56,15 @@ public class SysDingGroupServiceImpl extends ServiceImpl<SysDingGroupMapper, Sys
     @Override
     @Transactional
     public void add(SysDingGroupResult sysDingGroup) {
-        sysDingGroup.getDingObjs().forEach(e -> {
-            e.setDingGroupId(sysDingGroup.getId());
-        });
-        sysDingObjService.saveBatch(sysDingGroup.getDingObjs());
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         sysDingGroup.setCreateId(sysUser.getId());
         sysDingGroup.setCreateTime(System.currentTimeMillis());
         this.saveOrUpdate(sysDingGroup);
+        sysDingGroup.getDingObjs().forEach(e -> {
+            e.setDingGroupId(sysDingGroup.getId());
+            sysDingObjService.save(e);
+        });
+
     }
 
     /**
@@ -82,8 +83,8 @@ public class SysDingGroupServiceImpl extends ServiceImpl<SysDingGroupMapper, Sys
         sysDingObjService.remove(new QueryWrapper<SysDingObj>().lambda().eq(SysDingObj::getDingGroupId, sysDingGroup.getId()));
         sysDingGroup.getDingObjs().forEach(e -> {
             e.setDingGroupId(sysDingGroup.getId());
+            sysDingObjService.save(e);
         });
-        sysDingObjService.saveBatch(sysDingGroup.getDingObjs());
     }
 
     /**

+ 7 - 0
sop-business/src/main/java/com/qmth/sop/business/service/impl/SysDingObjServiceImpl.java

@@ -1,11 +1,14 @@
 package com.qmth.sop.business.service.impl;
 
+import com.qmth.sop.business.bean.result.SysDingGroupRoleResult;
 import com.qmth.sop.business.entity.SysDingObj;
 import com.qmth.sop.business.mapper.SysDingObjMapper;
 import com.qmth.sop.business.service.SysDingObjService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  * 考勤组对象表 服务实现类
@@ -17,4 +20,8 @@ import org.springframework.stereotype.Service;
 @Service
 public class SysDingObjServiceImpl extends ServiceImpl<SysDingObjMapper, SysDingObj> implements SysDingObjService {
 
+    @Override
+    public List<SysDingGroupRoleResult> getList(long id) {
+        return this.baseMapper.getList(id);
+    }
 }

+ 4 - 4
sop-business/src/main/java/com/qmth/sop/business/service/impl/SysLevelServiceImpl.java

@@ -55,14 +55,14 @@ public class SysLevelServiceImpl extends ServiceImpl<SysLevelMapper, SysLevel> i
     @Override
     @Transactional
     public void add(SysLevelResult sysLevel) {
-        sysLevel.getRoleList().forEach(e->{
-            e.setLevelId(sysLevel.getId());
-            sysLevelRoleService.saveOrUpdate(e);
-        });
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         sysLevel.setCreateId(sysUser.getId());
         sysLevel.setCreateTime(System.currentTimeMillis());
         this.saveOrUpdate(sysLevel);
+        sysLevel.getRoleList().forEach(e->{
+            e.setLevelId(sysLevel.getId());
+            sysLevelRoleService.saveOrUpdate(e);
+        });
     }
 
     /**

+ 2 - 0
sop-business/src/main/resources/db/log/shudonghui_update_log.sql

@@ -169,3 +169,5 @@ INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (10, 2
 ALTER TABLE `t_b_ding`
     ADD COLUMN `date_type` varchar(20) NULL COMMENT '日期类型:WEEKDAY("工作日"),WEEKEND("周末"),LEGAL_HOLIDAYS("法定节假日")' AFTER `sign_date`;
 -------------------------------
+ALTER TABLE `sys_device`
+    CHANGE COLUMN `supplier` `supplier_id` bigint NULL DEFAULT NULL COMMENT '供应商id' AFTER `buy_time`;

+ 3 - 2
sop-business/src/main/resources/mapper/SysDeviceMapper.xml

@@ -2,8 +2,9 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.qmth.sop.business.mapper.SysDeviceMapper">
 
-    <select id="query" resultType="com.qmth.sop.business.entity.SysDevice">
-        select * from sys_device a
+    <select id="query" resultType="com.qmth.sop.business.bean.result.SysDeviceResult">
+        select a.*,s.name supplier  from sys_device a
+        left join sys_supplier s on s.id=a.supplier_id
         <where>
             <if test="query != null and query != ''">
                 and ( a.name like concat('%', #{query} , '%') or a.serial_no like concat('%', #{query} , '%')

+ 9 - 1
sop-business/src/main/resources/mapper/SysDingObjMapper.xml

@@ -1,5 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.qmth.sop.business.mapper.SysDingObjMapper">
-
+    <select id="getList" resultType="com.qmth.sop.business.bean.result.SysDingGroupRoleResult">
+        select a.*,r.name role_name from sys_ding_obj a
+        left join sys_role r on r.id=a.role_id
+        <where>
+            <if test="id != null and id != ''">
+                and a.ding_group_id = #{id}
+            </if>
+        </where>
+    </select>
 </mapper>

+ 4 - 3
sop-server/src/main/java/com/qmth/sop/server/api/SysDeviceController.java

@@ -9,6 +9,7 @@ import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.sop.business.bean.result.EditResult;
+import com.qmth.sop.business.bean.result.SysDeviceResult;
 import com.qmth.sop.business.entity.SysDevice;
 import com.qmth.sop.business.entity.SysLevel;
 import com.qmth.sop.business.entity.TFCustomFlow;
@@ -47,12 +48,12 @@ public class SysDeviceController {
    
     @ApiOperation(value = "设备配置表查询接口")
     @RequestMapping(value = "/query", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "设备配置表列表信息", response = SysDevice.class)})
+    @ApiResponses({@ApiResponse(code = 200, message = "设备配置表列表信息", response = SysDeviceResult.class)})
     public Result query(
                 @ApiParam(value = "查询条件", required = false) @RequestParam(required = false) String query,
                 @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                 @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
-        IPage<SysDevice> resultIPage = sysDeviceService.query(new Page<>(pageNumber, pageSize),query);
+        IPage<SysDeviceResult> resultIPage = sysDeviceService.query(new Page<>(pageNumber, pageSize),query);
 
         return ResultUtil.ok(resultIPage);
     }
@@ -93,7 +94,7 @@ public class SysDeviceController {
     @RequestMapping(value = "/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "设备配置表列表", response = SysDevice.class)})
     public Result list(@ApiParam(value = "查询条件", required = false) @RequestParam(required = false) Boolean enable) {
-        return ResultUtil.ok(sysDeviceService.list(Objects.nonNull(enable)?new QueryWrapper<SysDevice>().lambda().eq(SysDevice::getEnable, enable):new QueryWrapper<>()));
+        return ResultUtil.ok(sysDeviceService.list(new QueryWrapper<SysDevice>().lambda().eq(Objects.nonNull(enable),SysDevice::getEnable, enable)));
     }
 
     /**

+ 2 - 2
sop-server/src/main/java/com/qmth/sop/server/api/SysDingGroupController.java

@@ -100,7 +100,7 @@ public class SysDingGroupController {
     @RequestMapping(value = "/list", method = RequestMethod.GET)
     @ApiResponses({@ApiResponse(code = 200, message = "考勤组表列表", response = SysDingGroup.class, responseContainer = "List")})
     public Result list(@ApiParam(value = "查询条件", required = false) @RequestParam(required = false) Boolean enable) {
-        return ResultUtil.ok(sysDingGroupService.list(Objects.nonNull(enable)?new QueryWrapper<SysDingGroup>().lambda().eq(SysDingGroup::getEnable, enable):new QueryWrapper<>()));
+        return ResultUtil.ok(sysDingGroupService.list(new QueryWrapper<SysDingGroup>().lambda().eq(Objects.nonNull(enable),SysDingGroup::getEnable, enable)));
     }
     /**
      * 获取单个
@@ -114,7 +114,7 @@ public class SysDingGroupController {
     public Result get(@ApiParam(value = "id", required = true) @RequestParam(value = "id") long id) {
         SysDingGroup sysDingGroup = sysDingGroupService.getById(id);
         SysDingGroupResult sysDingGroupResult= JSON.toJavaObject((JSON) JSON.toJSON(sysDingGroup),SysDingGroupResult.class);
-        sysDingGroupResult.setDingObjs(sysDingObjService.list(new QueryWrapper<SysDingObj>().lambda().eq(SysDingObj::getDingGroupId, id)));
+        sysDingGroupResult.setDingObjs(sysDingObjService.getList(id));
         return ResultUtil.ok(sysDingGroupResult);
     }
 

+ 1 - 1
sop-server/src/main/java/com/qmth/sop/server/api/SysLevelController.java

@@ -96,7 +96,7 @@ public class SysLevelController {
     @RequestMapping(value = "/list", method = RequestMethod.GET)
     @ApiResponses({@ApiResponse(code = 200, message = "档位表列表", response = SysLevel.class)})
     public Result list(@ApiParam(value = "查询条件", required = false) @RequestParam(required = false) Boolean enable) {
-        return ResultUtil.ok(sysLevelService.list(Objects.nonNull(enable) ? new QueryWrapper<SysLevel>().lambda().eq(SysLevel::getEnable, enable) : new QueryWrapper<>()));
+        return ResultUtil.ok(sysLevelService.list(new QueryWrapper<SysLevel>().lambda().eq(Objects.nonNull(enable),SysLevel::getEnable, enable)));
     }
 
     /**

+ 4 - 2
sop-server/src/main/java/com/qmth/sop/server/api/SysSupplierController.java

@@ -7,6 +7,7 @@ import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.sop.business.entity.SysSupplier;
 import com.qmth.sop.business.service.SysSupplierService;
 import com.qmth.sop.common.contant.SystemConstant;
+import com.qmth.sop.common.enums.SupplierTypeEnum;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
 import io.swagger.annotations.*;
@@ -87,8 +88,9 @@ public class SysSupplierController {
     @ApiOperation(value = "查询供应商表信息接口")
     @RequestMapping(value = "/list", method = RequestMethod.GET)
     @ApiResponses({@ApiResponse(code = 200, message = "供应商表信息", response = SysSupplier.class)})
-    public Result list(@ApiParam(value = "查询条件", required = false) @RequestParam(required = false) Boolean enable) {
-        return ResultUtil.ok(sysSupplierService.list(Objects.nonNull(enable)?new QueryWrapper<SysSupplier>().lambda().eq(SysSupplier::getEnable, enable):new QueryWrapper<>()));
+    public Result list(@ApiParam(value = "是否启用", required = false) @RequestParam(required = false) Boolean enable,
+                       @ApiParam(value = "类型", required = false) @RequestParam(required = false) SupplierTypeEnum type) {
+        return ResultUtil.ok(sysSupplierService.list(new QueryWrapper<SysSupplier>().lambda().eq(Objects.nonNull(enable),SysSupplier::getEnable, enable).eq(Objects.nonNull(enable),SysSupplier::getType, type)));
     }
 
     /**