Преглед на файлове

系统管理→配置管理开发
1.客户配置开发
2.供应商配置开发
3.设备配置开发
4.服务档位配置开发
5.考勤配置

shudonghui преди 1 година
родител
ревизия
d90d0b0fb6
променени са 34 файла, в които са добавени 1722 реда и са изтрити 171 реда
  1. 1 0
      .gitignore
  2. 161 0
      sop-business/src/main/java/com/qmth/sop/business/bean/dto/CustomImportDto.java
  3. 53 0
      sop-business/src/main/java/com/qmth/sop/business/bean/result/SysCustomResult.java
  4. 48 0
      sop-business/src/main/java/com/qmth/sop/business/bean/result/SysDingGroupResult.java
  5. 36 0
      sop-business/src/main/java/com/qmth/sop/business/bean/result/SysLevelResult.java
  6. 25 6
      sop-business/src/main/java/com/qmth/sop/business/mapper/SysCustomMapper.java
  7. 20 8
      sop-business/src/main/java/com/qmth/sop/business/mapper/SysDeviceMapper.java
  8. 20 8
      sop-business/src/main/java/com/qmth/sop/business/mapper/SysDingGroupMapper.java
  9. 20 8
      sop-business/src/main/java/com/qmth/sop/business/mapper/SysLevelMapper.java
  10. 19 8
      sop-business/src/main/java/com/qmth/sop/business/mapper/SysSupplierMapper.java
  11. 28 7
      sop-business/src/main/java/com/qmth/sop/business/service/SysCustomService.java
  12. 42 7
      sop-business/src/main/java/com/qmth/sop/business/service/SysDeviceService.java
  13. 41 7
      sop-business/src/main/java/com/qmth/sop/business/service/SysDingGroupService.java
  14. 41 7
      sop-business/src/main/java/com/qmth/sop/business/service/SysLevelService.java
  15. 41 7
      sop-business/src/main/java/com/qmth/sop/business/service/SysSupplierService.java
  16. 57 7
      sop-business/src/main/java/com/qmth/sop/business/service/impl/SysCustomServiceImpl.java
  17. 74 7
      sop-business/src/main/java/com/qmth/sop/business/service/impl/SysDeviceServiceImpl.java
  18. 71 8
      sop-business/src/main/java/com/qmth/sop/business/service/impl/SysDingGroupServiceImpl.java
  19. 68 8
      sop-business/src/main/java/com/qmth/sop/business/service/impl/SysLevelServiceImpl.java
  20. 73 7
      sop-business/src/main/java/com/qmth/sop/business/service/impl/SysSupplierServiceImpl.java
  21. 83 0
      sop-business/src/main/java/com/qmth/sop/business/templete/execute/AsyncSysCustomImportService.java
  22. 8 0
      sop-business/src/main/java/com/qmth/sop/business/templete/service/TaskLogicService.java
  23. 83 2
      sop-business/src/main/java/com/qmth/sop/business/templete/service/impl/TaskLogicServiceImpl.java
  24. 22 1
      sop-business/src/main/resources/mapper/SysCustomMapper.xml
  25. 11 1
      sop-business/src/main/resources/mapper/SysDeviceMapper.xml
  26. 15 1
      sop-business/src/main/resources/mapper/SysDingGroupMapper.xml
  27. 6 1
      sop-business/src/main/resources/mapper/SysLevelMapper.xml
  28. 6 1
      sop-business/src/main/resources/mapper/SysSupplierMapper.xml
  29. 5 0
      sop-common/src/main/java/com/qmth/sop/common/contant/SystemConstant.java
  30. 109 10
      sop-server/src/main/java/com/qmth/sop/server/api/SysCustomController.java
  31. 117 11
      sop-server/src/main/java/com/qmth/sop/server/api/SysDeviceController.java
  32. 105 11
      sop-server/src/main/java/com/qmth/sop/server/api/SysDingGroupController.java
  33. 107 11
      sop-server/src/main/java/com/qmth/sop/server/api/SysLevelController.java
  34. 106 11
      sop-server/src/main/java/com/qmth/sop/server/api/SysSupplierController.java

+ 1 - 0
.gitignore

@@ -30,3 +30,4 @@ build/
 
 ### VS Code ###
 .vscode/
+rebel.xml

+ 161 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/dto/CustomImportDto.java

@@ -0,0 +1,161 @@
+package com.qmth.sop.business.bean.dto;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.HeadFontStyle;
+import com.alibaba.excel.annotation.write.style.HeadStyle;
+import com.qmth.sop.business.util.excel.BasicExcelRow;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Description: 客户导入Dto
+ * @Param:
+ * @return:
+ * @Author: shudonghui
+ * @Date: 2023/7/31
+ */
+@ColumnWidth(value = 30)
+@HeadStyle(fillForegroundColor = 11)
+@HeadFontStyle(color = 1)
+public class CustomImportDto extends BasicExcelRow implements Serializable {
+
+
+    @ExcelProperty(value = "客户ID")
+    @NotBlank(message = "客户ID不能为空")
+    private String code;
+
+    @ExcelProperty(value = "客户名称")
+    @NotBlank(message = "客户名称不能为空")
+    private String name;;
+
+    @ExcelProperty(value = "客户类型")
+    @NotBlank(message = "客户类型不能为空")
+    private String type;
+
+    @ExcelProperty(value = "省份")
+    @NotBlank(message = "省份不能为空")
+    private String province;
+
+    @ExcelProperty(value = "城市")
+    @NotBlank(message = "城市不能为空")
+    private String city;
+
+    @ExcelProperty(value = "县区")
+    @NotBlank(message = "县区不能为空")
+    private String area;
+
+    @ExcelProperty(value = "详细地址")
+    @NotBlank(message = "详细地址不能为空")
+    private String address;
+
+    @ExcelProperty(value = "客户经理")
+    @NotBlank(message = "客户经理不能为空")
+    private String manager;
+
+    @ExcelProperty(value = "服务档位名称")
+    private String level;
+
+    @ExcelProperty(value = "标准人天")
+    private Integer peoperDay;
+
+
+
+    public CustomImportDto() {
+
+    }
+
+    public CustomImportDto(String name, String code, String type, String province, String city, String area, String address, String manager, String level, Integer peoperDay) {
+        this.name = name;
+        this.code = code;
+        this.type = type;
+        this.province = province;
+        this.city = city;
+        this.area = area;
+        this.address = address;
+        this.manager = manager;
+        this.level = level;
+        this.peoperDay = peoperDay;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getArea() {
+        return area;
+    }
+
+    public void setArea(String area) {
+        this.area = area;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getManager() {
+        return manager;
+    }
+
+    public void setManager(String manager) {
+        this.manager = manager;
+    }
+
+    public String getLevel() {
+        return level;
+    }
+
+    public void setLevel(String level) {
+        this.level = level;
+    }
+
+    public Integer getPeoperDay() {
+        return peoperDay;
+    }
+
+    public void setPeoperDay(Integer peoperDay) {
+        this.peoperDay = peoperDay;
+    }
+}

+ 53 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/SysCustomResult.java

@@ -0,0 +1,53 @@
+package com.qmth.sop.business.bean.result;
+
+import com.qmth.sop.business.entity.SysCustom;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 客户表
+ * </p>
+ *
+ * @author wangliang
+ * @since 2023-08-01
+ */
+
+public class SysCustomResult extends SysCustom implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "名称")
+    private String managerName;
+
+    @ApiModelProperty(value = "编码")
+    private String level;
+
+    @ApiModelProperty(value = "创建人")
+    private String createName;
+
+    public String getManagerName() {
+        return managerName;
+    }
+
+    public void setManagerName(String managerName) {
+        this.managerName = managerName;
+    }
+
+    public String getLevel() {
+        return level;
+    }
+
+    public void setLevel(String level) {
+        this.level = level;
+    }
+
+    public String getCreateName() {
+        return createName;
+    }
+
+    public void setCreateName(String createName) {
+        this.createName = createName;
+    }
+}

+ 48 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/SysDingGroupResult.java

@@ -0,0 +1,48 @@
+package com.qmth.sop.business.bean.result;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.qmth.sop.business.entity.SysDingGroup;
+import com.qmth.sop.common.base.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 考勤组表
+ * </p>
+ *
+ * @author wangliang
+ * @since 2023-08-01
+ */
+
+public class SysDingGroupResult extends SysDingGroup implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "服务单元")
+    private String service;
+
+
+
+    @ApiModelProperty(value = "供应商")
+    private Long supplier;
+
+    public String getService() {
+        return service;
+    }
+
+    public void setService(String service) {
+        this.service = service;
+    }
+
+    public Long getSupplier() {
+        return supplier;
+    }
+
+    public void setSupplier(Long supplier) {
+        this.supplier = supplier;
+    }
+}

+ 36 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/SysLevelResult.java

@@ -0,0 +1,36 @@
+package com.qmth.sop.business.bean.result;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.qmth.sop.business.entity.SysLevel;
+import com.qmth.sop.common.enums.ProductTypeEnum;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 档位表
+ * </p>
+ *
+ * @author wangliang
+ * @since 2023-08-01
+ */
+public class SysLevelResult extends SysLevel implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+
+
+    @ApiModelProperty(value = "档位")
+    private String createName;
+
+    public String getCreateName() {
+        return createName;
+    }
+
+    public void setCreateName(String createName) {
+        this.createName = createName;
+    }
+}

+ 25 - 6
sop-business/src/main/java/com/qmth/sop/business/mapper/SysCustomMapper.java

@@ -1,16 +1,35 @@
 package com.qmth.sop.business.mapper;
 
-import com.qmth.sop.business.entity.SysCustom;
 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.SysCustomResult;
+import com.qmth.sop.business.entity.SysCustom;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.Map;
 
 /**
- * <p>
- * 客户表 Mapper 接口
- * </p>
+ * 客户表 Mapper 接口.
  *
- * @author wangliang
- * @since 2023-08-01
+ * @author: shudonghui
+ * @date: 2023-08-02 11:55:18
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
 public interface SysCustomMapper extends BaseMapper<SysCustom> {
 
+    /**
+     * 查询客户列表
+     *
+     * @param iPage
+     * @param type
+     * @param managerId
+     * @param name
+     * @param levelId
+     * @return
+     */
+    IPage<SysCustomResult> query(Page<Map> iPage, @Param("type") String type, @Param("managerId") Long managerId, @Param("name") String name, @Param("levelId") Long levelId);
+
 }

+ 20 - 8
sop-business/src/main/java/com/qmth/sop/business/mapper/SysDeviceMapper.java

@@ -1,16 +1,28 @@
 package com.qmth.sop.business.mapper;
 
-import com.qmth.sop.business.entity.SysDevice;
 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.entity.SysDevice;
+import org.apache.ibatis.annotations.Param;
+import java.util.Map;
 
 /**
- * <p>
- * 设备配置表 Mapper 接口
- * </p>
- *
- * @author wangliang
- * @since 2023-08-01
+ * 设备配置表 Mapper 接口.
+ * 
+ * @author: shudonghui
+ * @date: 2023-08-02 14:21:11
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
 public interface SysDeviceMapper extends BaseMapper<SysDevice> {
 
-}
+	/**
+	 * 查询列表
+	 * @param iPage
+	 * @return
+	 */
+
+    <T> IPage<SysDevice> query(Page<T> iPage, @Param("query") String query);
+}

+ 20 - 8
sop-business/src/main/java/com/qmth/sop/business/mapper/SysDingGroupMapper.java

@@ -1,16 +1,28 @@
 package com.qmth.sop.business.mapper;
 
-import com.qmth.sop.business.entity.SysDingGroup;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.qmth.sop.business.bean.result.SysDingGroupResult;
+import com.qmth.sop.business.entity.SysDingGroup;
+import org.apache.ibatis.annotations.Param;
+import java.util.Map;
 
 /**
- * <p>
- * 考勤组表 Mapper 接口
- * </p>
- *
- * @author wangliang
- * @since 2023-08-01
+ * 考勤组表 Mapper 接口.
+ * 
+ * @author: shudonghui
+ * @date: 2023-08-02 14:21:11
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
 public interface SysDingGroupMapper extends BaseMapper<SysDingGroup> {
 
-}
+	/**
+	 * 查询列表
+	 * @param iPage
+	 * @return
+	 */
+	public IPage<SysDingGroupResult> query(IPage<Map> iPage, @Param("query") String query, @Param("serviceId") long serviceId);
+
+}

+ 20 - 8
sop-business/src/main/java/com/qmth/sop/business/mapper/SysLevelMapper.java

@@ -1,16 +1,28 @@
 package com.qmth.sop.business.mapper;
 
-import com.qmth.sop.business.entity.SysLevel;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.qmth.sop.business.bean.result.SysLevelResult;
+import com.qmth.sop.business.entity.SysLevel;
+import org.apache.ibatis.annotations.Param;
+import java.util.Map;
 
 /**
- * <p>
- * 档位表 Mapper 接口
- * </p>
- *
- * @author wangliang
- * @since 2023-08-01
+ * 档位表 Mapper 接口.
+ * 
+ * @author: shudonghui
+ * @date: 2023-08-02 14:21:11
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
 public interface SysLevelMapper extends BaseMapper<SysLevel> {
 
-}
+	/**
+	 * 查询列表
+	 * @param iPage
+	 * @return
+	 */
+	public IPage<SysLevelResult> query(IPage<Map> iPage);
+
+}

+ 19 - 8
sop-business/src/main/java/com/qmth/sop/business/mapper/SysSupplierMapper.java

@@ -1,16 +1,27 @@
 package com.qmth.sop.business.mapper;
 
-import com.qmth.sop.business.entity.SysSupplier;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.qmth.sop.business.entity.SysSupplier;
+import org.apache.ibatis.annotations.Param;
+import java.util.Map;
 
 /**
- * <p>
- * 供应商表 Mapper 接口
- * </p>
- *
- * @author wangliang
- * @since 2023-08-01
+ * 供应商表 Mapper 接口.
+ * 
+ * @author: shudonghui
+ * @date: 2023-08-02 14:18:39
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
 public interface SysSupplierMapper extends BaseMapper<SysSupplier> {
 
-}
+	/**
+	 * 查询列表
+	 * @param iPage
+	 * @return
+	 */
+	public IPage<SysSupplier> query(IPage<Map> iPage);
+
+}

+ 28 - 7
sop-business/src/main/java/com/qmth/sop/business/service/SysCustomService.java

@@ -1,16 +1,37 @@
 package com.qmth.sop.business.service;
 
-import com.qmth.sop.business.entity.SysCustom;
+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.SysCustomResult;
+import com.qmth.sop.business.entity.SysCustom;
+import com.qmth.sop.common.enums.ProductTypeEnum;
+
+import java.util.Map;
 
 /**
- * <p>
  * 客户表 服务类
- * </p>
  *
- * @author wangliang
- * @since 2023-08-01
+ * @author: shudonghui
+ * @date: 2023-08-02 11:55:19
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
-public interface SysCustomService extends IService<SysCustom> {
+public interface SysCustomService extends IService<SysCustom>{
+
+    /**
+    * 查询列表
+    *
+    * @param iPage
+    * @return
+    */
+    IPage<SysCustomResult>  query(Page<Map> iPage, ProductTypeEnum type, Long managerId, String name, Long levelId);
+
+    void add(SysCustom sysCustom);
+
+    void update(SysCustom sysCustom);
+
+    void delete(Long id);
 
-}
+}

+ 42 - 7
sop-business/src/main/java/com/qmth/sop/business/service/SysDeviceService.java

@@ -1,16 +1,51 @@
 package com.qmth.sop.business.service;
 
-import com.qmth.sop.business.entity.SysDevice;
+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.entity.SysDevice;
+import java.util.Map;
 
 /**
- * <p>
  * 设备配置表 服务类
- * </p>
  *
- * @author wangliang
- * @since 2023-08-01
+ * @author: shudonghui
+ * @date: 2023-08-02 14:21:11
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
-public interface SysDeviceService extends IService<SysDevice> {
+public interface SysDeviceService extends IService<SysDevice>{
+
+    /**
+    * 查询列表
+    *
+    * @param
+    * @return
+    */
+    <T> IPage<SysDevice> query(Page<T> tPage, String query);
+
+    /**
+    * 新增设备配置表
+    *
+    * @param sysDevice
+    */
+    void add(SysDevice sysDevice);
+
+    /**
+    * 修改设备配置表
+    *
+    * @param sysDevice
+    */
+    void update(SysDevice sysDevice);
+
+    /**
+    * 删除设备配置表
+    *
+    * @param id
+    */
+    void delete(Long id);
+
 
-}
+    void disable(long id);
+}

+ 41 - 7
sop-business/src/main/java/com/qmth/sop/business/service/SysDingGroupService.java

@@ -1,16 +1,50 @@
 package com.qmth.sop.business.service;
 
-import com.qmth.sop.business.entity.SysDingGroup;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.sop.business.bean.result.SysDingGroupResult;
+import com.qmth.sop.business.entity.SysDingGroup;
+import java.util.Map;
 
 /**
- * <p>
  * 考勤组表 服务类
- * </p>
  *
- * @author wangliang
- * @since 2023-08-01
+ * @author: shudonghui
+ * @date: 2023-08-02 14:21:11
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
-public interface SysDingGroupService extends IService<SysDingGroup> {
+public interface SysDingGroupService extends IService<SysDingGroup>{
+
+    /**
+    * 查询列表
+    *
+    * @param iPage
+    * @return
+    */
+    IPage<SysDingGroupResult> query(IPage<Map> iPage, String query, long serviceId);
+
+    /**
+    * 新增考勤组表
+    *
+    * @param sysDingGroup
+    */
+    void add(SysDingGroup sysDingGroup);
+
+    /**
+    * 修改考勤组表
+    *
+    * @param sysDingGroup
+    */
+    void update(SysDingGroup sysDingGroup);
+
+    /**
+    * 删除考勤组表
+    *
+    * @param id
+    */
+    void delete(Long id);
+
 
-}
+}

+ 41 - 7
sop-business/src/main/java/com/qmth/sop/business/service/SysLevelService.java

@@ -1,16 +1,50 @@
 package com.qmth.sop.business.service;
 
-import com.qmth.sop.business.entity.SysLevel;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.sop.business.bean.result.SysLevelResult;
+import com.qmth.sop.business.entity.SysLevel;
+import java.util.Map;
 
 /**
- * <p>
  * 档位表 服务类
- * </p>
  *
- * @author wangliang
- * @since 2023-08-01
+ * @author: shudonghui
+ * @date: 2023-08-02 14:21:11
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
-public interface SysLevelService extends IService<SysLevel> {
+public interface SysLevelService extends IService<SysLevel>{
+
+    /**
+    * 查询列表
+    *
+    * @param iPage
+    * @return
+    */
+    IPage<SysLevelResult> query(IPage<Map> iPage);
+
+    /**
+    * 新增档位表
+    *
+    * @param sysLevel
+    */
+    void add(SysLevel sysLevel);
+
+    /**
+    * 修改档位表
+    *
+    * @param sysLevel
+    */
+    void update(SysLevel sysLevel);
+
+    /**
+    * 删除档位表
+    *
+    * @param id
+    */
+    void delete(Long id);
+
 
-}
+}

+ 41 - 7
sop-business/src/main/java/com/qmth/sop/business/service/SysSupplierService.java

@@ -1,16 +1,50 @@
 package com.qmth.sop.business.service;
 
-import com.qmth.sop.business.entity.SysSupplier;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.sop.business.entity.SysSupplier;
+import java.util.Map;
 
 /**
- * <p>
  * 供应商表 服务类
- * </p>
  *
- * @author wangliang
- * @since 2023-08-01
+ * @author: shudonghui
+ * @date: 2023-08-02 14:18:39
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
-public interface SysSupplierService extends IService<SysSupplier> {
+public interface SysSupplierService extends IService<SysSupplier>{
+
+    /**
+    * 查询列表
+    *
+    * @param iPage
+    * @return
+    */
+    IPage<SysSupplier> query(IPage<Map> iPage);
+
+    /**
+    * 新增供应商表
+    *
+    * @param sysSupplier
+    */
+    void add(SysSupplier sysSupplier);
+
+    /**
+    * 修改供应商表
+    *
+    * @param sysSupplier
+    */
+    void update(SysSupplier sysSupplier);
+
+    /**
+    * 删除供应商表
+    *
+    * @param id
+    */
+    void delete(Long id);
+
 
-}
+    void enable(long id);
+}

+ 57 - 7
sop-business/src/main/java/com/qmth/sop/business/service/impl/SysCustomServiceImpl.java

@@ -1,20 +1,70 @@
 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.SysCustomResult;
 import com.qmth.sop.business.entity.SysCustom;
+import com.qmth.sop.business.entity.SysUser;
 import com.qmth.sop.business.mapper.SysCustomMapper;
 import com.qmth.sop.business.service.SysCustomService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.sop.common.contant.SystemConstant;
+import com.qmth.sop.common.enums.ProductTypeEnum;
+import com.qmth.sop.common.util.ServletUtil;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Map;
+import java.util.Objects;
 
 /**
- * <p>
- * 客户表 服务实现类
- * </p>
+ * 客户表 服务实现.
  *
- * @author wangliang
- * @since 2023-08-01
+ * @author: shudonghui
+ * @date: 2023-08-02 11:55:19
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
 @Service
 public class SysCustomServiceImpl extends ServiceImpl<SysCustomMapper, SysCustom> implements SysCustomService {
 
-}
+
+    /**
+     * 查询列表
+     *
+     * @param iPage
+     * @return
+     */
+    @Override
+    public IPage<SysCustomResult> query(Page<Map> iPage, ProductTypeEnum type, Long managerId, String name, Long levelId) {
+        return this.baseMapper.query(iPage, Objects.nonNull(type) ? type.name() : null, Objects.nonNull(managerId) ? managerId : null, name, Objects.nonNull(levelId) ? levelId : null);
+    }
+
+    @Override
+    @Transactional
+    public void add(SysCustom sysCustom) {
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+        sysCustom.setCreateId(sysUser.getId());
+        sysCustom.setCreateTime(System.currentTimeMillis());
+        this.saveOrUpdate(sysCustom);
+    }
+
+    @Override
+    @Transactional
+    public void update(SysCustom sysCustom) {
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+        sysCustom.setUpdateId(sysUser.getId());
+        sysCustom.setUpdateTime(System.currentTimeMillis());
+        this.saveOrUpdate(sysCustom);
+    }
+
+
+    @Override
+    @Transactional
+    public void delete(Long id) {
+        this.removeById(id);
+    }
+
+
+}

+ 74 - 7
sop-business/src/main/java/com/qmth/sop/business/service/impl/SysDeviceServiceImpl.java

@@ -1,20 +1,87 @@
 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.entity.SysDevice;
+import com.qmth.sop.business.entity.SysSupplier;
+import com.qmth.sop.business.entity.SysUser;
 import com.qmth.sop.business.mapper.SysDeviceMapper;
 import com.qmth.sop.business.service.SysDeviceService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.sop.common.enums.DeviceStatusEnum;
+import com.qmth.sop.common.util.ServletUtil;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 /**
- * <p>
- * 设备配置表 服务实现类
- * </p>
+ * 设备配置表 服务实现.
  *
- * @author wangliang
- * @since 2023-08-01
+ * @author: shudonghui
+ * @date: 2023-08-02 14:21:11
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
 @Service
 public class SysDeviceServiceImpl extends ServiceImpl<SysDeviceMapper, SysDevice> implements SysDeviceService {
 
-}
+
+    /**
+     * 查询列表
+     *
+     * @param iPage
+     * @return
+     */
+    @Override
+    public <T> IPage<SysDevice> query(Page<T> iPage, String query) {
+        return this.baseMapper.query(iPage, query);
+    }
+
+    /**
+     * 新增设备配置表
+     *
+     * @param sysDevice
+     */
+    @Override
+    @Transactional
+    public void add(SysDevice sysDevice) {
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+        sysDevice.setCreateId(sysUser.getId());
+        sysDevice.setCreateTime(System.currentTimeMillis());
+        this.saveOrUpdate(sysDevice);
+    }
+
+    /**
+     * 修改设备配置表
+     *
+     * @param sysDevice
+     */
+    @Override
+    @Transactional
+    public void update(SysDevice sysDevice) {
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+        sysDevice.setUpdateId(sysUser.getId());
+        sysDevice.setUpdateTime(System.currentTimeMillis());
+        this.saveOrUpdate(sysDevice);
+    }
+
+    /**
+     * 删除设备配置表
+     *
+     * @param id
+     */
+    @Override
+    @Transactional
+    public void delete(Long id) {
+        this.removeById(id);
+    }
+
+    @Override
+    @Transactional
+    public void disable(long id) {
+        SysDevice sysDevice= this.getById(id);
+        sysDevice.setEnable(false);
+        this.update(sysDevice);
+    }
+
+}

+ 71 - 8
sop-business/src/main/java/com/qmth/sop/business/service/impl/SysDingGroupServiceImpl.java

@@ -1,20 +1,83 @@
 package com.qmth.sop.business.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.boot.api.exception.ApiException;
+import com.qmth.sop.business.bean.result.SysDingGroupResult;
 import com.qmth.sop.business.entity.SysDingGroup;
+import com.qmth.sop.business.entity.SysUser;
 import com.qmth.sop.business.mapper.SysDingGroupMapper;
 import com.qmth.sop.business.service.SysDingGroupService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.sop.common.contant.SystemConstant;
+import com.qmth.sop.common.util.ResultUtil;
+import com.qmth.sop.common.util.ServletUtil;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
 
 /**
- * <p>
- * 考勤组表 服务实现类
- * </p>
+ * 考勤组表 服务实现.
  *
- * @author wangliang
- * @since 2023-08-01
+ * @author: shudonghui
+ * @date: 2023-08-02 14:21:11
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
 @Service
-public class SysDingGroupServiceImpl extends ServiceImpl<SysDingGroupMapper, SysDingGroup> implements SysDingGroupService {
+public class SysDingGroupServiceImpl extends ServiceImpl<SysDingGroupMapper, SysDingGroup> implements SysDingGroupService{
+
+
+		/**
+		* 查询列表
+		*
+		* @param iPage
+		* @return
+		*/
+		@Override
+		public IPage<SysDingGroupResult> query(IPage<Map> iPage, String query, long serviceId) {
+				return this.baseMapper.query(iPage, query,serviceId);
+		}
+		/**
+		* 新增考勤组表
+		*
+		* @param sysDingGroup
+		*/
+		@Override
+		@Transactional
+		public void add(SysDingGroup sysDingGroup) {
+			SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+			sysDingGroup.setCreateId(sysUser.getId());
+			sysDingGroup.setCreateTime(System.currentTimeMillis());
+			this.saveOrUpdate(sysDingGroup);
+		}
+
+		/**
+		* 修改考勤组表
+		*
+		* @param sysDingGroup
+		*/
+		@Override
+		@Transactional
+		public void update(SysDingGroup sysDingGroup) {
+			SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+			sysDingGroup.setCreateId(sysUser.getId());
+			sysDingGroup.setUpdateTime(System.currentTimeMillis());
+			this.saveOrUpdate(sysDingGroup);
+		}
+
+		/**
+		* 删除考勤组表
+		*
+		* @param id
+		*/
+		@Override
+		@Transactional
+		public void delete(Long id) {
+			this.removeById(id);
+		}
 
-}
+}

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

@@ -1,20 +1,80 @@
 package com.qmth.sop.business.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.boot.api.exception.ApiException;
+import com.qmth.sop.business.bean.result.SysLevelResult;
 import com.qmth.sop.business.entity.SysLevel;
+import com.qmth.sop.business.entity.SysUser;
 import com.qmth.sop.business.mapper.SysLevelMapper;
 import com.qmth.sop.business.service.SysLevelService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.sop.common.contant.SystemConstant;
+import com.qmth.sop.common.util.ResultUtil;
+import com.qmth.sop.common.util.ServletUtil;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
 
 /**
- * <p>
- * 档位表 服务实现类
- * </p>
+ * 档位表 服务实现.
  *
- * @author wangliang
- * @since 2023-08-01
+ * @author: shudonghui
+ * @date: 2023-08-02 14:21:11
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
 @Service
-public class SysLevelServiceImpl extends ServiceImpl<SysLevelMapper, SysLevel> implements SysLevelService {
+public class SysLevelServiceImpl extends ServiceImpl<SysLevelMapper, SysLevel> implements SysLevelService{
+
+
+		/**
+		* 查询列表
+		*
+		* @param iPage
+		* @return
+		*/
+		@Override
+		public IPage<SysLevelResult> query(IPage<Map> iPage) {
+				return this.baseMapper.query(iPage);
+		}
+		/**
+		* 新增档位表
+		*
+		* @param sysLevel
+		*/
+		@Override
+		@Transactional
+		public void add(SysLevel sysLevel) {
+			SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+			sysLevel.setCreateId(sysUser.getId());
+			sysLevel.setCreateTime(System.currentTimeMillis());
+			this.saveOrUpdate(sysLevel);
+		}
+
+		/**
+		* 修改档位表
+		*
+		* @param sysLevel
+		*/
+		@Override
+		@Transactional
+		public void update(SysLevel sysLevel) {
+			this.saveOrUpdate(sysLevel);
+		}
+
+		/**
+		* 删除档位表
+		*
+		* @param id
+		*/
+		@Override
+		@Transactional
+		public void delete(Long id) {
+			this.removeById(id);
+		}
 
-}
+}

+ 73 - 7
sop-business/src/main/java/com/qmth/sop/business/service/impl/SysSupplierServiceImpl.java

@@ -1,20 +1,86 @@
 package com.qmth.sop.business.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.sop.business.entity.SysSupplier;
+import com.qmth.sop.business.entity.SysUser;
 import com.qmth.sop.business.mapper.SysSupplierMapper;
 import com.qmth.sop.business.service.SysSupplierService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.sop.common.util.ServletUtil;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Map;
 
 /**
- * <p>
- * 供应商表 服务实现类
- * </p>
+ * 供应商表 服务实现.
  *
- * @author wangliang
- * @since 2023-08-01
+ * @author: shudonghui
+ * @date: 2023-08-02 14:18:39
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
 @Service
 public class SysSupplierServiceImpl extends ServiceImpl<SysSupplierMapper, SysSupplier> implements SysSupplierService {
 
-}
+
+    /**
+     * 查询列表
+     *
+     * @param iPage
+     * @return
+     */
+    @Override
+    public IPage<SysSupplier> query(IPage<Map> iPage) {
+        return this.baseMapper.query(iPage);
+    }
+
+    /**
+     * 新增供应商表
+     *
+     * @param sysSupplier
+     */
+    @Override
+    @Transactional
+    public void add(SysSupplier sysSupplier) {
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+        sysSupplier.setCreateId(sysUser.getId());
+        sysSupplier.setCreateTime(System.currentTimeMillis());
+        this.saveOrUpdate(sysSupplier);
+    }
+
+    /**
+     * 修改供应商表
+     *
+     * @param sysSupplier
+     */
+    @Override
+    @Transactional
+    public void update(SysSupplier sysSupplier) {
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+        sysSupplier.setUpdateId(sysUser.getId());
+        sysSupplier.setUpdateTime(System.currentTimeMillis());
+        this.saveOrUpdate(sysSupplier);
+    }
+
+    /**
+     * 删除供应商表
+     *
+     * @param id
+     */
+    @Override
+    @Transactional
+    public void delete(Long id) {
+        this.removeById(id);
+    }
+
+    @Override
+    @Transactional
+    public void enable(long id) {
+        SysSupplier sysSupplier= this.getById(id);
+        sysSupplier.setEnable(!sysSupplier.getEnable());
+        this.update(sysSupplier);
+    }
+
+}

+ 83 - 0
sop-business/src/main/java/com/qmth/sop/business/templete/execute/AsyncSysCustomImportService.java

@@ -0,0 +1,83 @@
+package com.qmth.sop.business.templete.execute;
+
+import cn.hutool.core.date.DateUtil;
+import com.qmth.boot.api.exception.ApiException;
+import com.qmth.sop.business.bean.dto.CustomImportDto;
+import com.qmth.sop.business.entity.TBTask;
+import com.qmth.sop.business.service.TBTaskService;
+import com.qmth.sop.business.templete.importData.AsyncImportTaskTemplete;
+import com.qmth.sop.business.templete.service.TaskLogicService;
+import com.qmth.sop.business.util.excel.BasicExcelListener;
+import com.qmth.sop.common.contant.SystemConstant;
+import com.qmth.sop.common.enums.TaskResultEnum;
+import com.qmth.sop.common.enums.TaskStatusEnum;
+import com.qmth.sop.common.util.Result;
+import com.qmth.sop.common.util.ResultUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.util.LinkedMultiValueMap;
+
+import javax.annotation.Resource;
+import java.text.MessageFormat;
+import java.util.Date;
+import java.util.Map;
+import java.util.Objects;
+import java.util.StringJoiner;
+
+/** 
+* @Description: 客户表导入
+* @Param:  
+* @return:  
+* @Author: wangliang
+* @Date: 2023/8/1 
+*/ 
+@Service
+public class AsyncSysCustomImportService extends AsyncImportTaskTemplete {
+    private final static Logger log = LoggerFactory.getLogger(AsyncSysCustomImportService.class);
+    public static final String OBJ_TITLE = "客户信息";
+
+    @Resource
+    TaskLogicService taskLogicService;
+
+    @Resource
+    TBTaskService tbTaskService;
+
+    @Override
+    public Result importTask(Map<String, Object> map) throws Exception {
+        TBTask tbTask = (TBTask) map.get(SystemConstant.TASK);
+        StringJoiner stringJoinerSummary = new StringJoiner("\n").add(MessageFormat.format("{0}{1}{2}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), BEGIN_TITLE, OBJ_TITLE));
+        tbTask.setStatus(TaskStatusEnum.RUNNING);
+        tbTask.setSummary(stringJoinerSummary.toString());
+        tbTaskService.updateById(tbTask);
+        try {
+            // 执行导入基础用户数据
+            Map<String, Object> result = taskLogicService.executeImportCustomLogic(map);
+            LinkedMultiValueMap<String, CustomImportDto> customImportDtoLinkedMultiValueMap = (LinkedMultiValueMap<String, CustomImportDto>) result.get(SystemConstant.EXCEL_DATA);
+            String errorList = (String) result.get(SystemConstant.EXCEL_DATA_ERROR);
+            int successSize = Objects.nonNull(customImportDtoLinkedMultiValueMap.get(BasicExcelListener.SUCCESS)) ? customImportDtoLinkedMultiValueMap.get(BasicExcelListener.SUCCESS).size() : 0;
+            int errorSize = Objects.nonNull(customImportDtoLinkedMultiValueMap.get(BasicExcelListener.ERROR)) ? customImportDtoLinkedMultiValueMap.get(BasicExcelListener.ERROR).size() : 0;
+            stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}{4}{5}{6}{7}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, (successSize + errorSize), FINISH_TOTAL_SIZE, successSize, FINISH_SUCCESS_SIZE, errorSize, FINISH_ERROR_SIZE));
+            if (Objects.nonNull(errorList) && !Objects.equals(errorList, "")) {
+                tbTask.setResult(TaskResultEnum.ERROR);
+                stringJoinerSummary.add(MessageFormat.format("{0}{1}", ERROR_DATA, errorList));
+            } else {
+                tbTask.setResult(TaskResultEnum.SUCCESS);
+            }
+        } catch (Exception e) {
+            log.error(SystemConstant.LOG_ERROR, e);
+            stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
+            tbTask.setResult(TaskResultEnum.ERROR);
+            if (e instanceof ApiException) {
+                ResultUtil.error((ApiException) e, e.getMessage());
+            } else {
+                ResultUtil.error(e.getMessage());
+            }
+        } finally {//生成txt文件
+            tbTask.setSummary(stringJoinerSummary.toString());
+            super.createTxt(tbTask);
+            tbTaskService.updateById(tbTask);
+        }
+        return ResultUtil.ok(map);
+    }
+}

+ 8 - 0
sop-business/src/main/java/com/qmth/sop/business/templete/service/TaskLogicService.java

@@ -28,4 +28,12 @@ public interface TaskLogicService {
      * @throws Exception 异常
      */
     Map<String, Object> executeExportUserArchivesLogic(Map<String, Object> map) throws Exception;
+    /**
+     * 处理客户表导入
+     *
+     * @param map 数据源
+     * @return 结果
+     * @throws Exception 异常
+     */
+    Map<String, Object> executeImportCustomLogic(Map<String, Object> map) throws Exception;
 }

+ 83 - 2
sop-business/src/main/java/com/qmth/sop/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -1,14 +1,19 @@
 package com.qmth.sop.business.templete.service.impl;
 
 import com.alibaba.excel.EasyExcel;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.qmth.sop.business.bean.dto.CustomImportDto;
 import com.qmth.sop.business.bean.dto.UserArchivesImportDto;
-import com.qmth.sop.business.entity.BasicAttachment;
-import com.qmth.sop.business.entity.TBTask;
+import com.qmth.sop.business.entity.*;
 import com.qmth.sop.business.service.BasicAttachmentService;
+import com.qmth.sop.business.service.SysCustomService;
+import com.qmth.sop.business.service.SysLevelService;
+import com.qmth.sop.business.service.SysUserService;
 import com.qmth.sop.business.templete.service.TaskLogicService;
 import com.qmth.sop.business.util.ImportExportUtil;
 import com.qmth.sop.business.util.excel.BasicExcelListener;
 import com.qmth.sop.common.contant.SystemConstant;
+import com.qmth.sop.common.enums.ProductTypeEnum;
 import com.qmth.sop.common.enums.UploadFileEnum;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -38,6 +43,18 @@ public class TaskLogicServiceImpl implements TaskLogicService {
     @Resource
     BasicAttachmentService basicAttachmentService;
 
+
+    @Resource
+    SysCustomService sysCustomService;
+
+    @Resource
+    SysUserService sysUserService;
+
+
+    @Resource
+    SysLevelService sysLevelService;
+
+
     /**
      * 处理导入人员档案数据
      *
@@ -75,6 +92,68 @@ public class TaskLogicServiceImpl implements TaskLogicService {
         return map;
     }
 
+
+    /**
+     * 处理客户表导入
+     *
+     * @param map 数据源
+     * @return 结果
+     * @throws Exception 异常
+     */
+    @Override
+    @Transactional
+    public Map<String, Object> executeImportCustomLogic(Map<String, Object> map) throws Exception {
+        InputStream inputStream = null;
+        try {
+            TBTask tbTask = (TBTask) map.get(SystemConstant.TASK);
+            inputStream = importExportUtil.getUploadFileInputStream(tbTask);
+            LinkedMultiValueMap<String, CustomImportDto> customImportDtoLinkedMultiValueMap = new LinkedMultiValueMap<>();
+            StringJoiner errorData = new StringJoiner("");
+            EasyExcel.read(inputStream, CustomImportDto.class, new BasicExcelListener<CustomImportDto>() {
+
+                @Override
+                public void handle(LinkedMultiValueMap<String, CustomImportDto> dataList, StringJoiner errorDataSj) {
+                    customImportDtoLinkedMultiValueMap.addAll(dataList);
+                    errorData.add(errorDataSj.toString());
+                }
+            }).headRowNumber(2).sheet(0).doRead();
+
+
+            map.computeIfAbsent(SystemConstant.EXCEL_DATA, v -> customImportDtoLinkedMultiValueMap);
+            map.computeIfAbsent(SystemConstant.EXCEL_DATA_ERROR, v -> errorData.toString());
+            int errorSize = Objects.nonNull(customImportDtoLinkedMultiValueMap.get(BasicExcelListener.ERROR)) ? Objects.requireNonNull(customImportDtoLinkedMultiValueMap.get(BasicExcelListener.ERROR)).size() : 0;
+            if (errorSize == 0) {
+                Objects.requireNonNull(customImportDtoLinkedMultiValueMap.get(BasicExcelListener.SUCCESS)).forEach(e -> {
+                    SysCustom sysCustom = new SysCustom();
+                    sysCustom.setAddress(e.getAddress());
+                    sysCustom.setName(e.getName());
+                    sysCustom.setArea(e.getArea());
+                    sysCustom.setCity(e.getCity());
+                    sysCustom.setCode(e.getCode());
+                    ProductTypeEnum type=ProductTypeEnum.OFFICE.getTitle().equals(e.getType())?ProductTypeEnum.OFFICE:ProductTypeEnum.CLOUD_MARK;
+                    sysCustom.setType(type);
+                    sysCustom.setProvince(e.getProvince());
+                    sysCustom.setPeoperDay(e.getPeoperDay());
+                    SysUser sysUser = sysUserService.getOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getRealName, e.getManager()));
+                    sysCustom.setManagerId(sysUser.getId());
+                    SysLevel sysLevel = sysLevelService.getOne(new QueryWrapper<SysLevel>().lambda().eq(SysLevel::getLevel, e.getLevel()).eq(SysLevel::getType, type));
+                    sysCustom.setLevelId(sysLevel.getId());
+                    sysCustom.setSync(false);
+                    sysCustom.setEnable(true);
+                    sysCustomService.add(sysCustom);
+
+                });
+            }
+
+
+        } finally {
+            if (Objects.nonNull(inputStream)) {
+                inputStream.close();
+            }
+        }
+        return map;
+    }
+
     /**
      * 处理导出人员档案数据
      *
@@ -105,4 +184,6 @@ public class TaskLogicServiceImpl implements TaskLogicService {
         }
         return map;
     }
+
+
 }

+ 22 - 1
sop-business/src/main/resources/mapper/SysCustomMapper.xml

@@ -2,4 +2,25 @@
 <!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.SysCustomMapper">
 
-</mapper>
+    <select id="query" resultType="com.qmth.sop.business.bean.result.SysCustomResult">
+        select a.*,su.real_name as createName,ma.real_name as managerName,l.level from sys_custom a
+        left join sys_user su on su.id = a.create_id
+        left join sys_user ma on ma.id = a.manager_id
+        left join sys_level l on l.id = a.level_id
+        <where>
+            <if test="type != null and type != ''">
+                and a.type = #{type}
+            </if>
+            <if test="managerId != null and managerId != ''">
+                and a.manager_id = #{managerId}
+            </if>
+            <if test="name != null and name != ''">
+                and a.name = #{name}
+            </if>
+            <if test="levelId != null and levelId != ''">
+                and a.level_id = #{levelId}
+            </if>
+        </where>
+        order by a.create_time desc
+    </select>
+</mapper>

+ 11 - 1
sop-business/src/main/resources/mapper/SysDeviceMapper.xml

@@ -2,4 +2,14 @@
 <!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">
 
-</mapper>
+    <select id="query" resultType="com.qmth.sop.business.entity.SysDevice">
+        select * from sys_device a
+        <where>
+            <if test="query != null and query != ''">
+                and a.name like #{query} and a.serial_no like #{query}
+                and a.brand like #{query} and a.supplier like #{query} and a.buy_time like #{query}
+            </if>
+        </where>
+        order by a.create_time desc
+    </select>
+</mapper>

+ 15 - 1
sop-business/src/main/resources/mapper/SysDingGroupMapper.xml

@@ -2,4 +2,18 @@
 <!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.SysDingGroupMapper">
 
-</mapper>
+    <select id="query" resultType="com.qmth.sop.business.bean.result.SysDingGroupResult">
+        select a.*,s.name supplier,t.name service from sys_ding_group a
+        left join sys_supplier s on s.id = a.supplier_id
+        left join t_b_service t on t.id = a.service_id
+        <where>
+            <if test="serviceId != null and serviceId != ''">
+                and a.service_id = #{serviceId}
+            </if>
+            <if test="query != null and query != ''">
+                and (a.name like #{query})
+            </if>
+        </where>
+        order by a.create_time desc
+    </select>
+</mapper>

+ 6 - 1
sop-business/src/main/resources/mapper/SysLevelMapper.xml

@@ -2,4 +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.SysLevelMapper">
 
-</mapper>
+    <select id="query" resultType="com.qmth.sop.business.bean.result.SysLevelResult">
+        select a.*,su.real_name as createName from sys_level a
+        left join sys_user su on su.id = a.create_id
+        order by a.create_time desc
+    </select>
+</mapper>

+ 6 - 1
sop-business/src/main/resources/mapper/SysSupplierMapper.xml

@@ -2,4 +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.SysSupplierMapper">
 
-</mapper>
+    <select id="query" resultType="com.qmth.sop.business.entity.SysSupplier">
+        select * from sys_supplier a
+
+        order by a.create_time desc
+    </select>
+</mapper>

+ 5 - 0
sop-common/src/main/java/com/qmth/sop/common/contant/SystemConstant.java

@@ -119,6 +119,11 @@ public class SystemConstant {
     public static final String PREFIX_URL_TASK = "/admin/task";
     public static final String PREFIX_URL_SYS = "/admin/sys";
     public static final String PREFIX_URL_ORG = "/admin/org";
+    public static final String PREFIX_URL_CUSTOM = "/sys/custom";
+    public static final String PREFIX_URL_LEVEL = "/sys/level";
+    public static final String PREFIX_URL_DEVICE = "/sys/device";
+    public static final String PREFIX_URL_DING_GROUP = "/sys/ding/group";
+    public static final String PREFIX_URL_SUPPLIER = "/sys/supplier";
 
     /**
      * 缓存配置

+ 109 - 10
sop-server/src/main/java/com/qmth/sop/server/api/SysCustomController.java

@@ -1,20 +1,119 @@
 package com.qmth.sop.server.api;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+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.SysCustomResult;
+import com.qmth.sop.business.entity.SysCustom;
+import com.qmth.sop.business.entity.TBTask;
+import com.qmth.sop.business.service.SysCustomService;
+import com.qmth.sop.business.service.TBTaskService;
+import com.qmth.sop.business.templete.execute.AsyncSysCustomImportService;
+import com.qmth.sop.common.contant.SystemConstant;
+import com.qmth.sop.common.enums.ProductTypeEnum;
+import com.qmth.sop.common.enums.TaskTypeEnum;
+import com.qmth.sop.common.util.Result;
+import com.qmth.sop.common.util.ResultUtil;
+import io.swagger.annotations.*;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import java.util.Map;
 
 /**
- * <p>
- * 客户表 前端控制器
- * </p>
+ * 客户表 控制器.
  *
- * @author wangliang
- * @since 2023-08-01
+ * @author: shudonghui
+ * @date: 2023-08-02 11:55:19
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
+@Api(tags = "客户表 Controller")
 @RestController
-@RequestMapping("/sys-custom")
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_CUSTOM)
+@Validated
 public class SysCustomController {
 
-}
+
+    @Resource
+    SysCustomService sysCustomService;
+
+    @Resource
+    AsyncSysCustomImportService asyncSysCustomImportService;
+
+    @Resource
+    TBTaskService tbTaskService;
+
+    @ApiOperation(value = "客户表查询接口")
+    @RequestMapping(value = "/query", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "客户表列表信息", response = SysCustomResult.class)})
+    public Result query(
+            @ApiParam(value = "客户类型", required = false) @RequestParam(required = false) ProductTypeEnum type,
+            @ApiParam(value = "客户经理id", required = false) @RequestParam(required = false) Long managerId,
+            @ApiParam(value = "客户名称", required = false) @RequestParam(required = false) String name,
+            @ApiParam(value = "服务档位id", required = false) @RequestParam(required = false) Long levelId,
+            @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<SysCustomResult> resultIPage = sysCustomService.query(new Page<>(pageNumber, pageSize), type, managerId, name, levelId);
+        return ResultUtil.ok(resultIPage);
+    }
+
+    
+    @ApiOperation(value = "新增客户表接口")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "新增客户表信息", response = Object.class)})
+    public Result add(@ApiParam(value = "客户信息", required = true) @RequestBody(required = true) SysCustom sysCustom) {
+        sysCustomService.add(sysCustom);
+        return ResultUtil.ok();
+    }
+
+    @Aac(auth= BOOL.FALSE)
+    @ApiOperation(value = "修改客户表接口")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "修改客户表信息", response = Object.class)})
+    public Result update(@ApiParam(value = "客户信息", required = true) @RequestBody(required = true) SysCustom sysCustom) {
+        sysCustomService.update(sysCustom);
+        return ResultUtil.ok();
+    }
+    
+    @ApiOperation(value = "删除客户表接口")
+    @RequestMapping(value = "/delete", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "删除客户表信息", response = Object.class)})
+    public Result delete(@ApiParam(value = "客户id", required = true) @RequestParam(required = true) long id) {
+        sysCustomService.delete(id);
+        return ResultUtil.ok();
+    }
+
+    /**
+     * 获取单个客户
+     * @param id
+     * @return
+     */
+
+    @ApiOperation(value = "获取单个客户")
+    @RequestMapping(value = "/get", method = RequestMethod.GET)
+    @ApiResponses({@ApiResponse(code = 200, message = "获取单个客户", response = SysCustom.class)})
+    public Result detail(@ApiParam(value = "客户id", required = true) @RequestParam(required = true) long id) {
+        SysCustom sysCustom = sysCustomService.getById(id);
+        return ResultUtil.ok(sysCustom);
+    }
+
+
+    @ApiOperation(value = "客户表导入")
+    @RequestMapping(value = "/import", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
+    public Result importCustom(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file) throws Exception {
+        Map<String, Object> map = tbTaskService.saveTask(file, TaskTypeEnum.CUSTOM_IMPORT);
+        asyncSysCustomImportService.importTask(map);
+        TBTask tbTask = (TBTask) map.get(SystemConstant.TASK);
+        return ResultUtil.ok(tbTask.getId());
+    }
+}

+ 117 - 11
sop-server/src/main/java/com/qmth/sop/server/api/SysDeviceController.java

@@ -1,20 +1,126 @@
 package com.qmth.sop.server.api;
 
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.segments.MergeSegments;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+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.entity.SysDevice;
+import com.qmth.sop.business.entity.TFCustomFlow;
+import com.qmth.sop.business.service.SysDeviceService;
+import com.qmth.sop.common.contant.SystemConstant;
+import com.qmth.sop.common.util.Result;
+import com.qmth.sop.common.util.ResultUtil;
+import io.swagger.annotations.*;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
 
 /**
- * <p>
- * 设备配置表 前端控制器
- * </p>
- *
- * @author wangliang
- * @since 2023-08-01
+ * 设备配置表 控制器.
+ * 
+ * @author: shudonghui
+ * @date: 2023-08-02 14:37:23
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
+@Api(tags = "设备配置表 Controller")
 @RestController
-@RequestMapping("/sys-device")
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX+SystemConstant.PREFIX_URL_DEVICE)
+@Validated
 public class SysDeviceController {
 
-}
+
+    @Resource
+    SysDeviceService sysDeviceService;
+
+   
+    @ApiOperation(value = "设备配置表查询接口")
+    @RequestMapping(value = "/query", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "设备配置表列表信息", response = SysDevice.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);
+
+        return ResultUtil.ok(resultIPage);
+    }
+
+   
+    @ApiOperation(value = "新增设备配置表接口")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "新增设备配置表信息", response = Object.class)})
+    public Result add(@ApiParam(value = "设备配置表信息", required = true) @RequestBody(required = true) SysDevice sysDevice) {
+        sysDeviceService.add(sysDevice);
+        return ResultUtil.ok();
+    }
+
+
+   
+    @ApiOperation(value = "修改设备配置表接口")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "修改设备配置表信息", response = Object.class)})
+    public Result update(@ApiParam(value = "设备配置表信息", required = true) @RequestBody(required = true) SysDevice sysDevice) {
+        sysDeviceService.update(sysDevice);
+        return ResultUtil.ok();
+    }
+
+   
+    @ApiOperation(value = "删除设备配置表接口")
+    @RequestMapping(value = "/delete", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "删除设备配置表信息", response = Object.class)})
+    public Result delete(@ApiParam(value = "设备配置表信息", required = true) @RequestParam(required = true) long id) {
+        sysDeviceService.delete(id);
+        return ResultUtil.ok();
+    }
+
+    /*
+     * 设备配置表列表
+     */
+   
+    @ApiOperation(value = "设备配置表列表接口")
+    @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(new QueryWrapper<SysDevice>().lambda().eq(SysDevice::getEnable, enable)));
+    }
+
+    /**
+     * 停用设备配置
+     */
+    @ApiOperation(value = "停用设备配置接口")
+    @RequestMapping(value = "/disable", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "停用设备配置", response = Object.class)})
+    public Result disable(@ApiParam(value = "设备配置表信息", required = true) @RequestParam(required = true) long id) {
+        sysDeviceService.disable(id);
+        return ResultUtil.ok();
+    }
+    /**
+     * 获取单个
+     * @param id
+     * @return
+     */
+
+    @ApiOperation(value = "获取单个设备配置接口")
+    @RequestMapping(value = "/get", method = RequestMethod.GET)
+    @ApiResponses({@ApiResponse(code = 200, message = "获取单个设备配置", response = SysDevice.class)})
+    public Result get(@ApiParam(value = "设备配置表id", required = true) @RequestParam(required = true) long id) {
+        return ResultUtil.ok(sysDeviceService.getById(id));
+    }
+
+
+
+
+
+
+
+}

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

@@ -1,20 +1,114 @@
 package com.qmth.sop.server.api;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+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.SysDingGroupResult;
+import com.qmth.sop.business.entity.SysDevice;
+import com.qmth.sop.business.entity.SysDingGroup;
+import com.qmth.sop.business.service.SysDingGroupService;
+import com.qmth.sop.common.contant.SystemConstant;
+import com.qmth.sop.common.util.Result;
+import com.qmth.sop.common.util.ResultUtil;
+import io.swagger.annotations.*;
+import org.springframework.util.CollectionUtils; 
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import java.util.List;
+import java.util.Objects;
 
 /**
- * <p>
- * 考勤组表 前端控制器
- * </p>
- *
- * @author wangliang
- * @since 2023-08-01
+ * 考勤组表 控制器.
+ * 
+ * @author: shudonghui
+ * @date: 2023-08-02 14:37:24
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
+@Api(tags = "考勤组表 Controller")
 @RestController
-@RequestMapping("/sys-ding-group")
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX+SystemConstant.PREFIX_URL_DING_GROUP)
+@Validated
 public class SysDingGroupController {
 
-}
+
+    @Resource
+    SysDingGroupService sysDingGroupService;
+
+   
+    @ApiOperation(value = "考勤组表查询接口")
+    @RequestMapping(value = "/query", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "考勤组表列表信息", response = SysDingGroupResult.class)})
+    public Result query(
+                @ApiParam(value = "查询条件", required = false) @RequestParam(required = false) String query,
+                @ApiParam(value = "服务单元id", required = false) @RequestParam(required = false) long serviceId,
+                @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<SysDingGroupResult> resultIPage = sysDingGroupService.query(new Page<>(pageNumber, pageSize),query,serviceId);
+
+        return ResultUtil.ok(resultIPage);
+    }
+
+   
+    @ApiOperation(value = "新增考勤组表接口")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "新增考勤组表信息", response = Object.class)})
+    public Result add(@ApiParam(value = "考勤组表信息", required = true) @RequestBody(required = true) SysDingGroup sysDingGroup) {
+        sysDingGroupService.add(sysDingGroup);
+        return ResultUtil.ok();
+    }
+
+
+   
+    @ApiOperation(value = "修改考勤组表接口")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "修改考勤组表信息", response = Object.class)})
+    public Result update(@ApiParam(value = "考勤组表信息", required = true) @RequestBody(required = true) SysDingGroup sysDingGroup) {
+        sysDingGroupService.update(sysDingGroup);
+        return ResultUtil.ok();
+    }
+
+
+   
+    @ApiOperation(value = "删除考勤组表接口")
+    @RequestMapping(value = "/delete", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "删除考勤组表信息", response = Object.class)})
+    public Result delete(@ApiParam(value = "考勤组表信息", required = true) @RequestParam(required = true) long id) {
+        sysDingGroupService.delete(id);
+        return ResultUtil.ok();
+    }
+
+    /*列表
+
+     */
+   
+    @ApiOperation(value = "考勤组表列表接口")
+    @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(new QueryWrapper<SysDingGroup>().lambda().eq(SysDingGroup::getEnable, enable)));
+    }
+    /**
+     * 获取单个
+     * @param id
+     * @return
+     */
+
+    @ApiOperation(value = "获取单个考勤组表信息")
+    @RequestMapping(value = "/get", method = RequestMethod.GET)
+    @ApiResponses({@ApiResponse(code = 200, message = "考勤组表信息", response = SysDingGroup.class)})
+    public Result get(@ApiParam(value = "id", required = true) @RequestParam(value = "id") String id) {
+        return ResultUtil.ok(sysDingGroupService.getById(id));
+    }
+
+
+}

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

@@ -1,20 +1,116 @@
 package com.qmth.sop.server.api;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+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.SysLevelResult;
+import com.qmth.sop.business.entity.SysDingGroup;
+import com.qmth.sop.business.entity.SysLevel;
+import com.qmth.sop.business.service.SysLevelService;
+import com.qmth.sop.common.contant.SystemConstant;
+import com.qmth.sop.common.util.Result;
+import com.qmth.sop.common.util.ResultUtil;
+import io.swagger.annotations.*;
+import org.springframework.util.CollectionUtils;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import java.util.List;
+import java.util.Objects;
 
 /**
- * <p>
- * 档位表 前端控制器
- * </p>
- *
- * @author wangliang
- * @since 2023-08-01
+ * 档位表 控制器.
+ * 
+ * @author: shudonghui
+ * @date: 2023-08-02 14:37:24
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
+@Api(tags = "档位表 Controller")
 @RestController
-@RequestMapping("/sys-level")
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX+SystemConstant.PREFIX_URL_LEVEL)
+@Validated
 public class SysLevelController {
 
-}
+
+    @Resource
+    SysLevelService sysLevelService;
+
+   
+    @ApiOperation(value = "档位表查询接口")
+    @RequestMapping(value = "/query", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "档位表列表信息", response = SysLevelResult.class)})
+    public Result 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<SysLevelResult> resultIPage = sysLevelService.query(new Page<>(pageNumber, pageSize));
+
+        return ResultUtil.ok(resultIPage);
+    }
+
+   
+    @ApiOperation(value = "新增档位表接口")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "新增档位表信息", response = Object.class)})
+    public Result add(@ApiParam(value = "档位表信息", required = true) @RequestBody(required = true) SysLevel sysLevel) {
+        sysLevelService.add(sysLevel);
+        return ResultUtil.ok();
+    }
+
+   
+    @ApiOperation(value = "修改档位表接口")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "修改档位表信息", response = Object.class)})
+    public Result update(@ApiParam(value = "档位表信息", required = true) @RequestBody(required = true) SysLevel sysLevel) {
+        sysLevelService.update(sysLevel);
+        return ResultUtil.ok();
+    }
+
+   
+    @ApiOperation(value = "删除档位表接口")
+    @RequestMapping(value = "/delete", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "删除档位表信息", response = Object.class)})
+    public Result delete(@ApiParam(value = "档位表信息", required = true) @RequestParam(required = true) long id) {
+        sysLevelService.delete(id);
+        return ResultUtil.ok();
+    }
+
+    /**
+     * 获取档位表列表
+     * @return
+     */
+   
+    @ApiOperation(value = "获取档位表列表接口")
+    @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(new QueryWrapper<SysLevel>().lambda().eq(SysLevel::getEnable, enable)));
+    }
+
+    /**
+     * 获取单个
+     * @param id
+     * @return
+     */
+
+    @ApiOperation(value = "获取单个档位表接口")
+    @RequestMapping(value = "/get", method = RequestMethod.GET)
+    @ApiResponses({@ApiResponse(code = 200, message = "档位表", response = SysLevel.class)})
+    public Result get(@ApiParam(value = "档位表id", required = true) @RequestParam String id) {
+        return ResultUtil.ok(sysLevelService.getById(id));
+    }
+
+
+
+
+
+
+}

+ 106 - 11
sop-server/src/main/java/com/qmth/sop/server/api/SysSupplierController.java

@@ -1,20 +1,115 @@
 package com.qmth.sop.server.api;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+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.entity.SysLevel;
+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.util.Result;
+import com.qmth.sop.common.util.ResultUtil;
+import io.swagger.annotations.*;
+import org.springframework.util.CollectionUtils; 
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import java.util.List;
+import java.util.Objects;
 
 /**
- * <p>
- * 供应商表 前端控制器
- * </p>
- *
- * @author wangliang
- * @since 2023-08-01
+ * 供应商表 控制器.
+ * 
+ * @author: shudonghui
+ * @date: 2023-08-02 14:18:39
+ * @version: 1.0
+ * @email: shudonghui@qmth.com.cn
+ * @Company: www.qmth.com.cn
  */
+@Api(tags = "供应商表 Controller")
 @RestController
-@RequestMapping("/sys-supplier")
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX+ SystemConstant.PREFIX_URL_SUPPLIER)
+@Validated
 public class SysSupplierController {
 
-}
+
+    @Resource
+    SysSupplierService sysSupplierService;
+
+    @ApiOperation(value = "供应商表查询接口")
+    @RequestMapping(value = "/query", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "供应商表列表信息", response = SysSupplier.class)})
+    public Result 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<SysSupplier> resultIPage = sysSupplierService.query(new Page<>(pageNumber, pageSize));
+
+        return ResultUtil.ok(resultIPage);
+    }
+    @ApiOperation(value = "新增供应商表接口")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "新增供应商表信息", response = Object.class)})
+    public Result add(@ApiParam(value = "供应商表信息", required = true) @RequestBody(required = true) SysSupplier sysSupplier) {
+        sysSupplierService.add(sysSupplier);
+        return ResultUtil.ok();
+    }
+
+    @ApiOperation(value = "修改供应商表接口")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "修改供应商表信息", response = Object.class)})
+    public Result update(@ApiParam(value = "供应商表信息", required = true) @RequestBody(required = true) SysSupplier sysSupplier) {
+        sysSupplierService.update(sysSupplier);
+        return ResultUtil.ok();
+    }
+
+//    @ApiOperation(value = "删除供应商表接口")
+//    @RequestMapping(value = "/delete", method = RequestMethod.POST)
+//    @ApiResponses({@ApiResponse(code = 200, message = "删除供应商表信息", response = EditResult.class)})
+//    public Result delete(@ApiParam(value = "供应商表信息", required = true) @RequestParam(required = true) SysSupplier sysSupplier) {
+//        sysSupplierService.delete(sysSupplier.getId());
+//        return ResultUtil.ok(new EditResult(sysSupplier.getId()));
+//    }
+    /*
+    *启用禁用
+    */
+    @ApiOperation(value = "启用禁用供应商表接口")
+    @RequestMapping(value = "/enable", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "启用禁用供应商表信息", response = Object.class)})
+    public Result enable(@ApiParam(value = "供应商表信息", required = true) @RequestParam(required = true) long id) {
+        sysSupplierService.enable(id);
+        return ResultUtil.ok();
+    }
+
+    /*
+    * 查询供应商表信息
+    */
+    @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(new QueryWrapper<SysSupplier>().lambda().eq(SysSupplier::getEnable, enable)));
+    }
+
+    /**
+     * 获取单个
+     * @param id
+     * @return
+     */
+
+    @ApiOperation(value = "获取单个供应商表信息接口")
+    @RequestMapping(value = "/get", method = RequestMethod.GET)
+    @ApiResponses({@ApiResponse(code = 200, message = "供应商表信息", response = SysSupplier.class)})
+    public Result info(@ApiParam(value = "供应商表id", required = true) @RequestParam String id) {
+        return ResultUtil.ok(sysSupplierService.getById(id));
+    }
+
+
+
+}