guoyujia 2 сар өмнө
parent
commit
9fbc89def8
21 өөрчлөгдсөн 636 нэмэгдсэн , 91 устгасан
  1. 174 0
      src/main/java/cn/ezhizao/project/business/controller/BizCompanyController.java
  2. 93 0
      src/main/java/cn/ezhizao/project/business/controller/BizSupplierController.java
  3. 44 33
      src/main/java/cn/ezhizao/project/business/controller/SysDeptController.java
  4. 57 13
      src/main/java/cn/ezhizao/project/business/controller/SysUserController.java
  5. 59 0
      src/main/java/cn/ezhizao/project/business/domain/BizCompany.java
  6. 4 0
      src/main/java/cn/ezhizao/project/business/domain/BizSupplier.java
  7. 9 23
      src/main/java/cn/ezhizao/project/business/domain/SysDept.java
  8. 29 0
      src/main/java/cn/ezhizao/project/business/mapper/BizCompanyMapper.java
  9. 2 0
      src/main/java/cn/ezhizao/project/business/mapper/BizSupplierMapper.java
  10. 30 0
      src/main/java/cn/ezhizao/project/business/service/IBizCompanyService.java
  11. 1 0
      src/main/java/cn/ezhizao/project/business/service/IBizSupplierService.java
  12. 43 0
      src/main/java/cn/ezhizao/project/business/service/impl/BizCompanyServiceImpl.java
  13. 4 0
      src/main/java/cn/ezhizao/project/business/service/impl/BizSupplierServiceImpl.java
  14. 1 0
      src/main/java/cn/ezhizao/project/system/domain/SysUser.java
  15. 14 14
      src/main/java/cn/ezhizao/project/tool/swagger/TestController.java
  16. 1 1
      src/main/java/cn/ezhizao/project/tool/swagger/controller/SwaggerToWordController.java
  17. 7 7
      src/main/java/cn/ezhizao/project/tool/swagger/util/WordGenerator.java
  18. 35 0
      src/main/resources/mybatis/business/BizCompanyMapper.xml
  19. 24 0
      src/main/resources/mybatis/business/BizSupplierMapper.xml
  20. 3 0
      src/main/resources/mybatis/business/SysDeptMapper.xml
  21. 2 0
      src/main/resources/mybatis/system/SysUserMapper.xml

+ 174 - 0
src/main/java/cn/ezhizao/project/business/controller/BizCompanyController.java

@@ -0,0 +1,174 @@
+package cn.ezhizao.project.business.controller;
+
+import java.util.List;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
+import cn.ezhizao.framework.web.controller.BaseController;
+import cn.ezhizao.framework.web.domain.AjaxResult;
+import cn.ezhizao.framework.web.page.TableDataInfo;
+import cn.ezhizao.project.business.domain.BizTenant;
+import cn.ezhizao.project.business.service.IBizTenantService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import cn.ezhizao.project.business.domain.BizCompany;
+import cn.ezhizao.project.business.service.IBizCompanyService;
+
+/**
+ * 客户名称Controller
+ *
+ * @author ezhizao
+ * @date 2025-04-09
+ */
+@Api("公司管理")
+@RestController
+@RequestMapping("/business/company")
+public class BizCompanyController extends BaseController
+{
+    @Resource
+    private IBizCompanyService bizCompanyService;
+    @Resource
+    private IBizTenantService bizTenantService;
+
+    /**
+     * 查询客户名称列表
+     */
+//        @ApiOperation("获取公司详细")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "companyCode", value = "公司编码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "companyName", value = "公司名称",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "companyAlias", value = "公司别名", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "tenantId", value = "租户ID",  dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "mnemonicCode", value = "助记码",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "salemanCode", value = "业务员编码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//    })
+    @PreAuthorize("@ss.hasPermi('business:company:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BizCompany bizCompany) throws NoSuchFieldException, IllegalAccessException
+    {
+        startPage();
+        List<BizCompany> list = bizCompanyService.getList(bizCompany);
+        return getDataTable(list);
+    }
+
+
+    /**
+     * 获取客户名称详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:company:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(bizCompanyService.getById(id));
+    }
+
+    /**
+     * 新增客户名称
+     */
+//        @ApiOperation("新增公司")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "tenantId", value = "租户ID", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "companyCode", value = "公司编码", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "companyName", value = "公司名称", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "companyAlias", value = "公司别名", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "mnemonicCode", value = "助记码",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "salemanCode", value = "业务员编码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//    })
+    @PreAuthorize("@ss.hasPermi('business:company:add')")
+    @Log(title = "客户名称", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BizCompany bizCompany) throws NoSuchFieldException, IllegalAccessException
+    {
+        //tenant_id,companyCode,company_alias不能为空
+        if(bizCompany.getTenantId() == null || bizCompany.getCompanyCode() == null || bizCompany.getCompanyCode() == "" || bizCompany.getCompanyAlias() == null || bizCompany.getCompanyAlias() ==""|| bizCompany.getCompanyName() == null || bizCompany.getCompanyName() ==""){
+            return error("新增客户失败,必填项:厂别,公司编码,公司名称,公司别名不能为空");
+        }
+        //判断厂别是否存在
+        List<BizTenant> tenantList = bizTenantService.query().eq("id", bizCompany.getTenantId()).list();
+        if(tenantList.isEmpty()){
+            return error("新增客户失败,厂别不存在");
+        }
+        //判断相同厂别不能有重复的公司编码
+        List<BizCompany> companyList = bizCompanyService.query().eq("tenant_id", bizCompany.getTenantId()).eq("company_code", bizCompany.getCompanyCode()).list();
+        if(!companyList.isEmpty()){
+            return error("新增客户失败,相同厂别不能有重复的公司编码");
+        }
+        return toAjax(bizCompanyService.save(bizCompany));
+    }
+
+    /**
+     * 修改客户名称
+     */
+//        @ApiOperation("修改公司")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "id", value = "公司ID", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "tenantId", value = "厂别ID",  dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "companyCode", value = "公司编码",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "companyName", value = "公司名称",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "companyName", value = "公司别名",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "mnemonicCode", value = "助记码",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "salemanCode", value = "业务员编码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//    })
+    @PreAuthorize("@ss.hasPermi('business:company:edit')")
+    @Log(title = "客户名称", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BizCompany bizCompany) throws NoSuchFieldException, IllegalAccessException
+    {
+        if(bizCompany.getId() == null){
+            return error("修改客户失败,id不能为空");
+        }
+        if(bizCompany.getCompanyCode() == "" ||bizCompany.getCompanyAlias() ==""|| bizCompany.getCompanyName() ==""){
+            return error("修改客户失败,公司编码,公司名称,公司别名不能为空");
+        }
+        //判断厂别是否存在
+        if(bizCompany.getTenantId() != null) {
+            List<BizTenant> tenantList = bizTenantService.query().eq("id", bizCompany.getTenantId()).list();
+            if (tenantList.isEmpty()) {
+                return error("修改客户失败,厂别不存在");
+            }
+           if(bizCompany.getCompanyCode() !=null){
+               List<BizCompany> companyList = bizCompanyService.query().eq("tenant_id", bizCompany.getTenantId()).eq("company_code", bizCompany.getCompanyCode()).ne("id", bizCompany.getId()).list();
+               if(!companyList.isEmpty()){
+                   return error("修改客户失败,相同厂别不能有重复的公司编码");
+               }
+           }
+        }
+        BizCompany oldCompany = bizCompanyService.getById(bizCompany.getId());
+        //判断相同厂别不能有重复的公司编码
+        if(bizCompany.getCompanyCode() !=null){
+            List<BizCompany> companyList = bizCompanyService.query().eq("tenant_id", oldCompany.getTenantId()).eq("company_code", bizCompany.getCompanyCode()).ne("id", bizCompany.getId()).list();
+            if(!companyList.isEmpty()){
+                return error("修改客户失败,相同厂别不能有重复的公司编码");
+            }
+        }
+        return toAjax(bizCompanyService.updateById(bizCompany));
+    }
+
+    /**
+     * 删除客户名称
+     */
+//        @ApiOperation("删除公司")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "id", value = "公司ID", required = true, dataType = "List<Long>", paramType = "path", dataTypeClass = List.class)
+//    })
+    @PreAuthorize("@ss.hasPermi('business:company:remove')")
+    @Log(title = "客户名称", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable List<Long> ids)
+    {
+        return toAjax(bizCompanyService.removeBatchByIds(ids));
+    }
+}

+ 93 - 0
src/main/java/cn/ezhizao/project/business/controller/BizSupplierController.java

@@ -0,0 +1,93 @@
+package cn.ezhizao.project.business.controller;
+
+import java.util.List;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
+import cn.ezhizao.framework.web.controller.BaseController;
+import cn.ezhizao.framework.web.domain.AjaxResult;
+import cn.ezhizao.framework.web.page.TableDataInfo;
+import cn.ezhizao.project.business.domain.BizSupplier;
+import cn.ezhizao.project.business.service.IBizSupplierService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 外协厂信息Controller
+ *
+ * @author ezhizao
+ * @date 2025-04-10
+ */
+@Api("供应商管理")
+@RestController
+@RequestMapping("/business/supplier")
+public class BizSupplierController extends BaseController
+{
+    @Resource
+    private IBizSupplierService bizSupplierService;
+
+    /**
+     * 查询外协厂信息列表
+     */
+            @ApiOperation("获取供应商详细")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "code", value = "供应商编码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "name", value = "供应商名称",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "mnemonicCode", value = "供应商助记码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+   })
+    @PreAuthorize("@ss.hasPermi('business:supplier:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BizSupplier bizSupplier) throws NoSuchFieldException, IllegalAccessException
+    {
+        startPage();
+        List<BizSupplier> list = bizSupplierService.getList(bizSupplier);
+        return getDataTable(list);
+    }
+
+    /**
+     * 新增外协厂信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:supplier:add')")
+    @Log(title = "外协厂信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BizSupplier bizSupplier) throws NoSuchFieldException, IllegalAccessException
+    {
+        return toAjax(bizSupplierService.save(bizSupplier));
+    }
+
+    /**
+     * 修改外协厂信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:supplier:edit')")
+    @Log(title = "外协厂信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BizSupplier bizSupplier) throws NoSuchFieldException, IllegalAccessException
+    {
+        return toAjax(bizSupplierService.updateById(bizSupplier));
+    }
+
+    /**
+     * 删除外协厂信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:supplier:remove')")
+    @Log(title = "外协厂信息", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable List<Long> ids)
+    {
+        return toAjax(bizSupplierService.removeBatchByIds(ids));
+    }
+}

+ 44 - 33
src/main/java/cn/ezhizao/project/business/controller/SysDeptController.java

@@ -16,6 +16,10 @@ import cn.ezhizao.framework.web.page.TableDataInfo;
 import cn.ezhizao.project.business.domain.*;
 import cn.ezhizao.project.business.mapper.BizTurnoverMapper;
 import cn.ezhizao.project.business.service.*;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -32,6 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
  * @author ezhizao
  * @date 2025-04-08
  */
+//@Api("部门管理")
 @RestController
 @RequestMapping("/business/dept")
 public class SysDeptController extends BaseController
@@ -52,48 +57,42 @@ public class SysDeptController extends BaseController
     /**
      * 查询部门列表
      */
+//    @ApiOperation("获取部门详细")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "deptName", value = "部门名称", required = false, dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "deptCode", value = "部门编码", required = false, dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "deptId", value = "部门ID", required = false, dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "tenantId", value = "厂别ID", required = false, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
+//    })
     @PreAuthorize("@ss.hasPermi('business:dept:list')")
     @GetMapping("/list")
     public TableDataInfo list(SysDept sysDept) throws NoSuchFieldException, IllegalAccessException
     {
-        startPage();
         List<SysDept> list = sysDeptService.getList(sysDept);
         return getDataTable(list);
     }
-
-    /**
-     * 导出部门列表
-     */
-    @PreAuthorize("@ss.hasPermi('business:dept:export')")
-    @Log(title = "部门", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, SysDept sysDept) throws NoSuchFieldException, IllegalAccessException
-    {
-        List<SysDept> list = sysDeptService.getList(sysDept);
-        ExcelUtil<SysDept> util = new ExcelUtil<SysDept>(SysDept.class);
-        util.exportExcel(response, list, "部门数据");
-    }
-
-    /**
-     * 获取部门详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('business:dept:query')")
-    @GetMapping(value = "/{deptId}")
-    public AjaxResult getInfo(@PathVariable("deptId") Long deptId)
-    {
-        return success(sysDeptService.getById(deptId));
-    }
-
     /**
      * 新增部门
      */
+//    @ApiOperation("新增部门")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "deptName", value = "部门名称", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "deptCode", value = "部门编码", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "tenantId", value = "厂别ID", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "isOutsourcing", value = "是否外协",  dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+//            @ApiImplicitParam(name = "supplierId", value = "外协商ID",  dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "isWorkSection", value = "是否为工段",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "equimentFlag", value = "是否一机多批",  dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+//            @ApiImplicitParam(name = "isSortPackaging", value = "是否分选",  dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+//            @ApiImplicitParam(name = "parentId", value = "父类ID",  dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+//    })
     @PreAuthorize("@ss.hasPermi('business:dept:add')")
     @Log(title = "部门", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody SysDept sysDept) throws NoSuchFieldException, IllegalAccessException
     {
         //判断必填项
-        if(sysDept.getTenantId() ==null ||sysDept.getDeptName() ==null||sysDept.getDeptCode() ==null) {
+        if(sysDept.getTenantId() ==null ||sysDept.getDeptName() ==null || sysDept.getDeptName() ==""||sysDept.getDeptCode() ==null || sysDept.getDeptCode() =="") {
            return error("新增部门失败,请求必填项:厂别、部门名称、部门编码不能为空");
         }
         if((sysDept.getIsOutsourcing() !=null && sysDept.getIsOutsourcing() ==1) && sysDept.getSupplierId() ==null) {
@@ -106,7 +105,7 @@ public class SysDeptController extends BaseController
         if(sysDept.getIsOutsourcing() !=null && !(sysDept.getIsOutsourcing() ==0 || sysDept.getIsOutsourcing() ==1)){
             return error("新增部门失败,是否外协只能是0或1");
         }
-        if(sysDept.getIsWorkSection() !=null && !(sysDept.getIsWorkSection().equals("0") || sysDept.getIsWorkSection().equals("1"))){
+        if(sysDept.getIsWorkSection() !=null &&sysDept.getIsWorkSection() !="" && !(sysDept.getIsWorkSection().equals("0") || sysDept.getIsWorkSection().equals("1"))){
             return error("新增部门失败,是否为工段只能是0或1");
         }
         if(sysDept.getEquimentFlag() !=null && !(sysDept.getEquimentFlag() ==0 || sysDept.getEquimentFlag() ==1)){
@@ -162,6 +161,19 @@ public class SysDeptController extends BaseController
     /**
      * 修改部门
      */
+//    @ApiOperation("修改部门")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "deptId", value = "部门ID", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "deptName", value = "部门名称",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "deptCode", value = "部门编码",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "tenantId", value = "厂别ID",  dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "isOutsourcing", value = "是否外协",  dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+//            @ApiImplicitParam(name = "supplierId", value = "外协商ID",  dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "isWorkSection", value = "是否为工段",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "equimentFlag", value = "是否一机多批",  dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+//            @ApiImplicitParam(name = "isSortPackaging", value = "是否分选",  dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+//            @ApiImplicitParam(name = "parentId", value = "父类ID",  dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+//    })
     @PreAuthorize("@ss.hasPermi('business:dept:edit')")
     @Log(title = "部门", businessType = BusinessType.UPDATE)
     @PutMapping
@@ -181,7 +193,7 @@ public class SysDeptController extends BaseController
         if(sysDept.getIsOutsourcing() !=null && !(sysDept.getIsOutsourcing() ==0 || sysDept.getIsOutsourcing() ==1)){
             return error("修改部门失败,是否外协只能是0或1");
         }
-        if(sysDept.getIsWorkSection() !=null && !(sysDept.getIsWorkSection().equals("0") || sysDept.getIsWorkSection().equals("1"))){
+        if(sysDept.getIsWorkSection() !=null && sysDept.getIsWorkSection() !="" && !(sysDept.getIsWorkSection().equals("0") || sysDept.getIsWorkSection().equals("1"))){
             return error("修改部门失败,是否为工段只能是0或1");
         }
         if(sysDept.getEquimentFlag() !=null && !(sysDept.getEquimentFlag() ==0 || sysDept.getEquimentFlag() ==1)){
@@ -230,6 +242,10 @@ public class SysDeptController extends BaseController
     /**
      * 删除部门
      */
+//    @ApiOperation("删除部门")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "deptId", value = "部门ID", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
+//    })
     @PreAuthorize("@ss.hasPermi('business:dept:remove')")
     @Log(title = "部门", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{deptId}")
@@ -248,11 +264,6 @@ public class SysDeptController extends BaseController
         {
             return warn("存在下级部门,不允许删除");
         }
-        if (sysDeptService.checkDeptExistUser(deptId))
-        {
-            return warn("部门存在用户,不允许删除");
-        }
-        sysDeptService.checkDeptDataScope(deptId);
         return toAjax(sysDeptService.deleteDeptById(deptId));
     }
 }

+ 57 - 13
src/main/java/cn/ezhizao/project/business/controller/SysUserController.java

@@ -18,6 +18,10 @@ import cn.ezhizao.project.business.service.IBizTenantService;
 import cn.ezhizao.project.system.domain.SysUser;
 import cn.ezhizao.project.system.service.ISysUserService;
 import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -34,6 +38,7 @@ import org.springframework.web.bind.annotation.RestController;
  * @author ezhizao
  * @date 2025-04-09
  */
+@Api("员工管理")
 @RestController
 @RequestMapping("/business/user")
 public class SysUserController extends BaseController
@@ -46,17 +51,24 @@ public class SysUserController extends BaseController
     /**
      * 查询用户信息列表
      */
+//            @ApiOperation("获取员工详细")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "tenantId", value = "厂别ID", dataType = "Long", paramType = "path", dataTypeClass = Integer.class),
+//            @ApiImplicitParam(name = "userName", value = "用户编码",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "nickName", value = "用户姓名", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "status", value = "账号状态",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//    })
     @PreAuthorize("@ss.hasPermi('business:user:list')")
     @GetMapping("/list")
     public TableDataInfo list(SysUser sysUser) throws NoSuchFieldException, IllegalAccessException
     {
         startPage();
-        if(sysUser.getTenantId() == null){
-            TableDataInfo error = new TableDataInfo();
-            error.setCode(500);
-            error.setMsg("查询失败,厂别不能为空");
-            return error;
-        }
+//        if(sysUser.getTenantId() == null){
+//            TableDataInfo error = new TableDataInfo();
+//            error.setCode(500);
+//            error.setMsg("查询失败,厂别不能为空");
+//            return error;
+//        }
         List<SysUser> list = sysUserService.selectEmployeeList(sysUser);
         return getDataTable(list);
     }
@@ -65,23 +77,35 @@ public class SysUserController extends BaseController
     /**
      * 新增用户信息
      */
+//            @ApiOperation("新增用户")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "userName", value = "用户编码", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "nickName", value = "用户姓名", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "password", value = "密码", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "usageCompanyId", value = "使用单位ID", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "contractCompanyId", value = "合同单位ID", required = true,  dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "sex", value = "用户性别", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "status", value = "账号状态", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "email", value = "用户邮箱", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "phoneNumber", value = "用户电话", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//    })
     @PreAuthorize("@ss.hasPermi('business:user:add')")
     @Log(title = "用户信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody SysUser sysUser) throws NoSuchFieldException, IllegalAccessException
     {
-        if(sysUser.getUserName() == null||sysUser.getNickName() == null || sysUser.getUsageCompanyId() == null
-                ||sysUser.getContractCompanyId() == null ||sysUser.getPassword()==null ){
+        if(sysUser.getUserName() == null || sysUser.getUserName() == ""||sysUser.getNickName() == null || sysUser.getNickName() == "" || sysUser.getUsageCompanyId() == null
+                ||sysUser.getContractCompanyId() == null ||sysUser.getPassword()==null||sysUser.getPassword()=="" ){
             return error("新增用户失败,员工姓名,员工编码,合同单位,使用单位,登录密码必填项不能为空");
         }
         //判断员工状态,用户性别的值
-        if(sysUser.getSex() !=null && (!sysUser.getSex().equals("男") && !sysUser.getSex().equals("女"))){
+        if(sysUser.getSex() !=null && sysUser.getSex() !="" && (!sysUser.getSex().equals("男") && !sysUser.getSex().equals("女"))){
             return error("新增用户失败,用户性别的值只能为男或女");
         }
-        if(sysUser.getSex() == null){
+        if(sysUser.getSex() == null || sysUser.getSex() == ""){
             sysUser.setSex("男");
         }
-        if(sysUser.getStatus() !=null && (!sysUser.getStatus().equals("0") && !sysUser.getStatus().equals("1"))){
+        if(sysUser.getStatus() !=null && sysUser.getStatus() != "" && (!sysUser.getStatus().equals("0") && !sysUser.getStatus().equals("1"))){
             return error("新增用户失败,员工状态的值只能为0或1");
         }
 
@@ -115,6 +139,19 @@ public class SysUserController extends BaseController
     /**
      * 修改用户信息
      */
+//    @ApiOperation("新增用户")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "userName", value = "用户编码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "nickName", value = "用户姓名",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "password", value = "密码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "usageCompanyId", value = "使用单位ID",  dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "contractCompanyId", value = "合同单位ID",  dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "sex", value = "用户性别", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "status", value = "账号状态", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "email", value = "用户邮箱", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "phoneNumber", value = "用户电话", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//    })
     @PreAuthorize("@ss.hasPermi('business:user:edit')")
     @Log(title = "用户信息", businessType = BusinessType.UPDATE)
     @PutMapping
@@ -123,13 +160,16 @@ public class SysUserController extends BaseController
         if(sysUser.getUserId() == null){
             return error("修改用户失败,用户ID不能为空");
         }
+        if(sysUser.getUserName() == ""|| sysUser.getNickName() == "" ||sysUser.getPassword()=="" ){
+            return error("修改用户失败,员工姓名,员工编码,登录密码不能为空");
+        }
         sysUserService.checkUserAllowed(sysUser);
         sysUserService.checkUserDataScope(sysUser.getUserId());
         //判断员工状态,用户性别的值
-        if(sysUser.getSex() !=null && (!sysUser.getSex().equals("男") && !sysUser.getSex().equals("女"))){
+        if(sysUser.getSex() !=null &&sysUser.getSex() !="" && (!sysUser.getSex().equals("男") && !sysUser.getSex().equals("女"))){
             return error("修改用户失败,用户性别的值只能为男或女");
         }
-        if(sysUser.getStatus() !=null && (!sysUser.getStatus().equals("0") && !sysUser.getStatus().equals("1"))){
+        if(sysUser.getStatus() !=null &&sysUser.getStatus() !="" && (!sysUser.getStatus().equals("0") && !sysUser.getStatus().equals("1"))){
             return error("修改用户失败,员工状态的值只能为0或1");
         }
         if(sysUser.getUsageCompanyId() != null){
@@ -164,6 +204,10 @@ public class SysUserController extends BaseController
     /**
      * 删除用户信息
      */
+//            @ApiOperation("删除用户")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "List<Long>", paramType = "path", dataTypeClass = List.class)
+//    })
     @PreAuthorize("@ss.hasPermi('business:user:remove')")
     @Log(title = "用户信息", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{userIds}")

+ 59 - 0
src/main/java/cn/ezhizao/project/business/domain/BizCompany.java

@@ -0,0 +1,59 @@
+package cn.ezhizao.project.business.domain;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 客户名称对象 biz_company
+ *
+ * @author ezhizao
+ * @date 2025-04-09
+ */
+@Data
+@TableName(value = "biz_company")
+public class BizCompany extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 租户id */
+    @ApiModelProperty(value = "租户ID")
+    private Long tenantId;
+
+    /** 公司编码 */
+    @Excel(name = "公司编码")
+    @ApiModelProperty(value = "公司编码")
+    private String companyCode;
+
+    /** 公司名称 */
+    @Excel(name = "公司名称")
+    @ApiModelProperty(value = "公司名称")
+    private String companyName;
+
+    /** 公司别名 */
+    @Excel(name = "公司别名")
+    @ApiModelProperty(value = "公司别名")
+    private String companyAlias;
+
+    /** 助记码 */
+    @Excel(name = "助记码")
+    @ApiModelProperty(value = "助记码")
+    private String mnemonicCode;
+
+    /** 地区 */
+    @Excel(name = "地区")
+    @ApiModelProperty(value = "地区")
+    private String region;
+
+    /** 业务员id(对应sys_user的id) */
+    @ApiModelProperty(value = "地区")
+    private Long salemanId;
+
+    /** 业务员编码(对应sys_user的user_name) */
+    @Excel(name = "业务员编码", readConverterExp = "对=应sys_user的user_name")
+    @ApiModelProperty(value = "业务员编码")
+    private String salemanCode;
+
+}

+ 4 - 0
src/main/java/cn/ezhizao/project/business/domain/BizSupplier.java

@@ -63,4 +63,8 @@ public class BizSupplier extends BaseEntity {
     private BigDecimal freightPrice;
     @ApiModelProperty("内部外协")
     private Integer isInnerOutsource;
+    @TableField(exist = false)
+    private String contactName;
+    @TableField(exist = false)
+    private String contactPhoneNumber;
 }

+ 9 - 23
src/main/java/cn/ezhizao/project/business/domain/SysDept.java

@@ -20,57 +20,52 @@ public class SysDept extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 部门id */
-    @ApiModelProperty(value = "${comment}")
+    @ApiModelProperty(value = "工段Id")
     private Long deptId;
 
     /** 是否为企业 0 部门 1 企业 */
     @Excel(name = "是否为企业 0 部门 1 企业")
-    @ApiModelProperty(value = "是否为企业 0 部门 1 企业")
     private Integer type;
 
     /** 是否为工段(0:否,1:是)默认0 */
     @Excel(name = "是否为工段", readConverterExp = "0=:否,1:是")
-    @ApiModelProperty(value = "是否为工段")
+    @ApiModelProperty(value = "是否为工段(0:否,1:是)")
     private String isWorkSection;
 
     /** 是否分选(0:否,1:是 */
     @Excel(name = "是否分选(0:否,1:是")
-    @ApiModelProperty(value = "是否分选(0:否,1:是")
+    @ApiModelProperty(value = "是否分选(0:否,1:是)")
     private Integer isSortPackaging;
 
     /** 是否自动分配计划到每个资源组
 0: 否 1: 是 */
     @Excel(name = "是否自动分配计划到每个资源组 0: 否 1: 是")
-    @ApiModelProperty(value = "是否自动分配计划到每个资源组 0: 否 1: 是")
     private Integer autoAllocation;
 
     /** 开始报工前是否自动解绑载具
 0: 否 1: 是 */
-    @Excel(name = "开始报工前是否自动解绑载具 0: 否 1: 是")
-    @ApiModelProperty(value = "开始报工前是否自动解绑载具 0: 否 1: 是")
+    @Excel(name = "开始报工前是否自动解绑载具(0:否,1:是)")
     private Integer autoUnbind;
 
     /** 是否一机多批
 0: 不是  1: 是    */
     @Excel(name = "是否一机多批 0: 不是  1: 是   ")
-    @ApiModelProperty(value = "是否一机多批 0: 不是  1: 是   ")
+    @ApiModelProperty(value = "是否一机多批(0:否,1:是)")
     private Integer equimentFlag;
 
     /** 租户id */
-    @ApiModelProperty(value = "是否一机多批 0: 不是  1: 是   ")
+    @ApiModelProperty(value = "厂别id")
     private Long tenantId;
 
     /** 父部门id */
-    @ApiModelProperty(value = "是否一机多批 0: 不是  1: 是   ")
+    @ApiModelProperty(value = "父级Id")
     private Long parentId;
 
     /** 父部门id */
-    @ApiModelProperty(value = "是否一机多批 0: 不是  1: 是   ")
     private Long workshopId;
 
     /** 祖级列表 */
     @Excel(name = "祖级列表")
-    @ApiModelProperty(value = "祖级列表")
     private String ancestors;
 
     /** 部门名称 */
@@ -85,55 +80,46 @@ public class SysDept extends BaseEntity
 
     /** 部门key值(助记码) */
     @Excel(name = "部门key值", readConverterExp = "助=记码")
-    @ApiModelProperty(value = "部门key值")
     private String deptKey;
 
     /** 显示顺序 */
     @Excel(name = "显示顺序")
-    @ApiModelProperty(value = "显示顺序")
     private Long orderNum;
 
     /** 负责人 */
     @Excel(name = "负责人")
-    @ApiModelProperty(value = "负责人")
     private String manager;
 
     /** 联系电话 */
     @Excel(name = "联系电话")
-    @ApiModelProperty(value = "联系电话")
     private String phone;
 
     /** 邮箱 */
     @Excel(name = "邮箱")
-    @ApiModelProperty(value = "邮箱")
     private String email;
 
     /** 部门状态(0正常 1停用) */
     @Excel(name = "部门状态", readConverterExp = "0=正常,1=停用")
-    @ApiModelProperty(value = "部门状态")
     private String status;
 
     /** 删除标志(0代表存在 2代表删除) */
-    @ApiModelProperty(value = "部门状态")
     private String delFlag;
 
     /** 是否可以快速报工 */
     @Excel(name = "是否可以快速报工")
-    @ApiModelProperty(value = "是否可以快速报工")
     private Integer hasQuick;
 
     /** 是否集中周转工段(1:是 */
     @Excel(name = "是否集中周转工段", readConverterExp = "是否集中周转工段(1:是")
-    @ApiModelProperty(value = "是否集中周转工段")
     private Integer isCentralizedTurnover;
 
     /** 外协商id */
-    @ApiModelProperty(value = "是否集中周转工段")
+    @ApiModelProperty(value = "外协商Id")
     private Long supplierId;
 
     /** 是否发往外协(0:否;1:是 */
     @Excel(name = "是否发往外协(0:否;1:是")
-    @ApiModelProperty(value = "是否发往外协(0:否;1:是")
+    @ApiModelProperty(value = "是否发往外协(0:否,1:是)")
     private Integer isOutsourcing;
     @TableField(exist = false)
     private Integer isInnerOutsource;

+ 29 - 0
src/main/java/cn/ezhizao/project/business/mapper/BizCompanyMapper.java

@@ -0,0 +1,29 @@
+package cn.ezhizao.project.business.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import cn.ezhizao.project.business.domain.BizCompany;
+
+/**
+ * 客户名称Mapper接口
+ *
+ * @author ezhizao
+ * @date 2025-04-09
+ */
+public interface BizCompanyMapper extends BaseMapper<BizCompany>
+{
+    /**
+     * 查询客户名称列表
+     *
+     * @param bizCompany 客户名称
+     * @return 客户名称集合
+     */
+    public List<BizCompany> getList(BizCompany bizCompany);
+
+    /**
+     * 物理删除
+     * @param bizCompany
+     * @return 删除结果
+    */
+    public int physicalDelete(BizCompany bizCompany);
+}

+ 2 - 0
src/main/java/cn/ezhizao/project/business/mapper/BizSupplierMapper.java

@@ -23,4 +23,6 @@ public interface BizSupplierMapper extends BaseMapper<BizSupplier> {
     public int physicalDelete(BizSupplier bizSupplier);
 
     public List<BizSupplier> getListByDept(SysDept data);
+
+    public List<BizSupplier> getList(cn.ezhizao.project.business.domain.BizSupplier data);
 }

+ 30 - 0
src/main/java/cn/ezhizao/project/business/service/IBizCompanyService.java

@@ -0,0 +1,30 @@
+package cn.ezhizao.project.business.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import cn.ezhizao.project.business.domain.BizCompany;
+
+/**
+ * 客户名称Service接口
+ *
+ * @author ezhizao
+ * @date 2025-04-09
+ */
+public interface IBizCompanyService extends IService<BizCompany>
+{
+    /**
+     * 查询客户名称列表
+     *
+     * @param bizCompany 客户名称
+     * @return 客户名称集合
+     */
+    public List<BizCompany> getList(BizCompany bizCompany);
+
+    /**
+     * 物理删除
+     * @param bizCompany
+     * @return 删除结果
+     */
+    public int physicalDelete(BizCompany bizCompany);
+
+}

+ 1 - 0
src/main/java/cn/ezhizao/project/business/service/IBizSupplierService.java

@@ -14,6 +14,7 @@ import java.util.List;
  * date    2024-04-24
  */
 public interface IBizSupplierService extends IService<BizSupplier> {
+    List<BizSupplier> getList(BizSupplier data);
 
     /**
      * 物理删除

+ 43 - 0
src/main/java/cn/ezhizao/project/business/service/impl/BizCompanyServiceImpl.java

@@ -0,0 +1,43 @@
+package cn.ezhizao.project.business.service.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import cn.ezhizao.project.business.mapper.BizCompanyMapper;
+import cn.ezhizao.project.business.domain.BizCompany;
+import cn.ezhizao.project.business.service.IBizCompanyService;
+
+/**
+ * 客户名称Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2025-04-09
+ */
+@Service
+public class BizCompanyServiceImpl  extends ServiceImpl<BizCompanyMapper, BizCompany> implements IBizCompanyService
+{
+    @Resource
+    private BizCompanyMapper bizCompanyMapper;
+
+    /**
+     * 查询客户名称列表
+     *
+     * @param bizCompany 客户名称
+     * @return 客户名称
+     */
+    @Override
+    public List<BizCompany> getList(BizCompany bizCompany)
+    {
+        return bizCompanyMapper.getList(bizCompany);
+    }
+
+    /**
+     * 物理删除
+     * @param bizCompany
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizCompany bizCompany){ return bizCompanyMapper.physicalDelete(bizCompany); };
+
+}

+ 4 - 0
src/main/java/cn/ezhizao/project/business/service/impl/BizSupplierServiceImpl.java

@@ -21,6 +21,10 @@ public class BizSupplierServiceImpl extends ServiceImpl<BizSupplierMapper, BizSu
     @Resource
     private BizSupplierMapper bizSupplierMapper;
 
+    @Override
+    public List<BizSupplier> getList(BizSupplier data) {
+        return bizSupplierMapper.getList(data);
+    }
     /**
      * 物理删除
      *

+ 1 - 0
src/main/java/cn/ezhizao/project/system/domain/SysUser.java

@@ -142,6 +142,7 @@ public class SysUser extends BaseEntity {
     private String deptName;
     private Long usageCompanyId;
     private String usageCompanyName;
+
     @TableField(exist = false)
     private List<Long> hasAddIds;
 

+ 14 - 14
src/main/java/cn/ezhizao/project/tool/swagger/TestController.java

@@ -16,7 +16,7 @@ import java.util.Map;
  *
  * @author ruoyi
  */
-@Api("用户信息管理")
+//@Api("用户信息管理")
 @RestController
 @RequestMapping("/test/user")
 public class TestController extends BaseController
@@ -27,7 +27,7 @@ public class TestController extends BaseController
         users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
     }
 
-    @ApiOperation("获取用户列表")
+//    @ApiOperation("获取用户列表")
     @GetMapping("/list")
     public R<List<UserEntity>> userList()
     {
@@ -35,8 +35,8 @@ public class TestController extends BaseController
         return R.ok(userList);
     }
 
-    @ApiOperation("获取用户详细")
-    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
+//    @ApiOperation("获取用户详细")
+//    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
     @GetMapping("/{userId}")
     public R<UserEntity> getUser(@PathVariable Integer userId)
     {
@@ -50,13 +50,13 @@ public class TestController extends BaseController
         }
     }
 
-    @ApiOperation("新增用户")
-    @ApiImplicitParams({
-        @ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class),
-        @ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class),
-        @ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class),
-        @ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class)
-    })
+//    @ApiOperation("新增用户")
+//    @ApiImplicitParams({
+//        @ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class),
+//        @ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class),
+//        @ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class),
+//        @ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class)
+//    })
     @PostMapping("/save")
     public R<String> save(UserEntity user)
     {
@@ -68,7 +68,7 @@ public class TestController extends BaseController
         return R.ok();
     }
 
-    @ApiOperation("更新用户")
+//    @ApiOperation("更新用户")
     @PutMapping("/update")
     public R<String> update(@RequestBody UserEntity user)
     {
@@ -85,8 +85,8 @@ public class TestController extends BaseController
         return R.ok();
     }
 
-    @ApiOperation("删除用户信息")
-    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
+//    @ApiOperation("删除用户信息")
+//    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
     @DeleteMapping("/{userId}")
     public R<String> delete(@PathVariable Integer userId)
     {

+ 1 - 1
src/main/java/cn/ezhizao/project/tool/swagger/controller/SwaggerToWordController.java

@@ -23,7 +23,7 @@ public class SwaggerToWordController {
     WordGenerator wordGenerator;
     @GetMapping("/getInterfaceDoc")
     public void getInterfaceDoc() {
-        String projectPath = "http://192.168.31.126:8083/business/dept/list";// 根据实际Swagger地址修改
+        String projectPath = "http://192.168.31.126:8083";// 根据实际Swagger地址修改
         String resp = HttpUtil.get(projectPath + "/swagger-resources");
         JSONArray groupJsonArray = JSONArray.parseArray(resp);
         ArrayList<String> groupNames = new ArrayList<>();

+ 7 - 7
src/main/java/cn/ezhizao/project/tool/swagger/util/WordGenerator.java

@@ -34,7 +34,7 @@ public class WordGenerator {
 //        }
 
         // 保存文档
-        try (FileOutputStream fileOutputStream = new FileOutputStream("F:/数据导入/后台API接口文档.docx")) {
+        try (FileOutputStream fileOutputStream = new FileOutputStream("D:/数据导入/后台API接口文档.docx")) {
             document.write(fileOutputStream);
             System.out.println("接口文档生成成功!");
 
@@ -71,9 +71,9 @@ public class WordGenerator {
             setCellText(xwpfTable.getRow(4).getCell(0), "请求参数", true);
             setCellText(xwpfTable.getRow(4).getCell(1), "参数名", true);
             setCellText(xwpfTable.getRow(4).getCell(2), "数据类型", true);
-            setCellText(xwpfTable.getRow(4).getCell(3), "参数类型", true);
-            setCellText(xwpfTable.getRow(4).getCell(4), "是否必填", true);
-            setCellText(xwpfTable.getRow(4).getCell(5), "说明", true);
+//            setCellText(xwpfTable.getRow(4).getCell(3), "参数类型", true);
+            setCellText(xwpfTable.getRow(4).getCell(3), "是否必填", true);
+            setCellText(xwpfTable.getRow(4).getCell(4), "说明", true);
 
             // 填充表格内容
             mergeCellsHorizontal(xwpfTable.getRow(1), 1, 5);
@@ -94,9 +94,9 @@ public class WordGenerator {
                 setCellText(row.getCell(0), request.getDescription());
                 setCellText(row.getCell(1), request.getName());
                 setCellText(row.getCell(2), request.getType());
-                setCellText(row.getCell(3), request.getParamType());
-                setCellText(row.getCell(4), request.getRequire() ? "是" : "否");
-                setCellText(row.getCell(5), request.getRemark());
+//                setCellText(row.getCell(3), request.getParamType());
+                setCellText(row.getCell(3), request.getRequire() ? "是" : "否");
+                setCellText(row.getCell(4), request.getRemark());
             }
             // 返回
             XWPFTableRow respRow = xwpfTable.createRow();

+ 35 - 0
src/main/resources/mybatis/business/BizCompanyMapper.xml

@@ -0,0 +1,35 @@
+<?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="cn.ezhizao.project.business.mapper.BizCompanyMapper">
+
+    <resultMap type="cn.ezhizao.project.business.domain.BizCompany" id="BizCompanyResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizCompany" resultMap="BizCompanyResult">
+        SELECT * FROM biz_company
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0
+            <if test="companyCode != null  and companyCode != ''"> AND company_code = #{companyCode}</if>
+            <if test="tenantId != null"> AND tenant_id = #{tenantId}</if>
+            <if test="companyName != null  and companyName != ''"> AND company_name like concat('%', #{companyName}, '%')</if>
+            <if test="companyAlias != null  and companyAlias != ''"> AND company_alias = #{companyAlias}</if>
+            <if test="mnemonicCode != null  and mnemonicCode != ''"> AND mnemonic_code = #{mnemonicCode}</if>
+            <if test="region != null  and region != ''"> AND region = #{region}</if>
+            <if test="salemanCode != null  and salemanCode != ''"> AND saleman_code = #{salemanCode}</if>
+        </trim>
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_company
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>

+ 24 - 0
src/main/resources/mybatis/business/BizSupplierMapper.xml

@@ -7,6 +7,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="cn.ezhizao.project.business.domain.BizSupplier" id="BizSupplierResult">
         <id column="id" property="id"/>
     </resultMap>
+    <select id="getList" resultMap="BizSupplierResult" parameterType="cn.ezhizao.project.business.domain.BizSupplier">
+        SELECT t1.*,
+        ( SELECT biz_supplier_contacts.name
+        FROM biz_supplier_contacts
+        WHERE t1.id = biz_supplier_contacts.supplier_id
+        AND biz_supplier_contacts.is_default = 1
+        AND biz_supplier_contacts.deleted = 0
+        LIMIT 1
+        ) AS contact_name,
+        ( SELECT biz_supplier_contacts.phone_number
+        FROM biz_supplier_contacts
+        WHERE t1.id = biz_supplier_contacts.supplier_id
+        AND biz_supplier_contacts.is_default = 1
+        AND biz_supplier_contacts.deleted = 0
+        LIMIT 1
+        ) AS contact_phone_number
+        FROM biz_supplier t1
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            t1.deleted = 0
+            <if test="name != null and name != ''"> AND t1.name LIKE CONCAT('%', #{name}, '%')</if>
+            <if test="mnemonicCode != null and mnemonicCode != ''"> AND t1.mnemonic_code LIKE CONCAT('%', #{mnemonicCode}, '%')</if>
+            <if test="code != null and code != ''"> AND t1.code LIKE CONCAT('%', #{code}, '%')</if>
+        </trim>
+    </select>
     <select id="getListByDept" resultMap="BizSupplierResult">
         select * from biz_supplier
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">

+ 3 - 0
src/main/resources/mybatis/business/SysDeptMapper.xml

@@ -16,6 +16,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="type != null "> AND type = #{type}</if>
             <if test="isWorkSection != null  and isWorkSection != ''"> AND is_work_section = #{isWorkSection}</if>
             <if test="isSortPackaging != null "> AND is_sort_packaging = #{isSortPackaging}</if>
+            <if test="tenantId != null and tenantId != 0">
+                AND d.tenant_id = #{tenantId}
+            </if>
             <if test="autoAllocation != null "> AND auto_allocation = #{autoAllocation}</if>
             <if test="autoUnbind != null "> AND auto_unbind = #{autoUnbind}</if>
             <if test="equimentFlag != null "> AND equiment_flag = #{equimentFlag}</if>

+ 2 - 0
src/main/resources/mybatis/system/SysUserMapper.xml

@@ -13,6 +13,8 @@
 		<result property="nickName"     column="nick_name"    />
 		<result property="contractCompanyName"  column="contract_company_name" />
 		<result property="contractCompanyId"  column="contract_company_id" />
+		<result property="usageCompanyName"  column="usage_company_name" />
+		<result property="usageCompanyId"  column="usage_company_id" />
 		<result property="email"        column="email"        />
 		<result property="phoneNumber"  column="phone_number"  />
 		<result property="sex"          column="sex"          />