瀏覽代碼

feat:扫码出入库功能定制接口实现

hmc 1 年之前
父節點
當前提交
77c1efcc77
共有 31 個文件被更改,包括 3566 次插入13 次删除
  1. 1 0
      pom.xml
  2. 6 0
      zkqy-admin/pom.xml
  3. 33 2
      zkqy-admin/src/main/java/com/zkqy/web/controller/system/SysLoginController.java
  4. 53 0
      zkqy-custom-business/pom.xml
  5. 113 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/InboundRecordsController.java
  6. 231 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/MaterialInventoryController.java
  7. 113 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/MaterielController.java
  8. 108 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/OutboundRecordsController.java
  9. 377 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/InboundRecords.java
  10. 209 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/MaterialInventory.java
  11. 251 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/Materiel.java
  12. 335 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/OutboundRecords.java
  13. 62 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/MaterialInventoryVo.java
  14. 71 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/InboundRecordsMapper.java
  15. 73 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/MaterialInventoryMapper.java
  16. 71 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/MaterielMapper.java
  17. 72 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/OutboundRecordsMapper.java
  18. 61 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IInboundRecordsService.java
  19. 71 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IMaterialInventoryService.java
  20. 61 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IMaterielService.java
  21. 61 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IOutboundRecordsService.java
  22. 90 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/InboundRecordsServiceImpl.java
  23. 111 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/MaterialInventoryServiceImpl.java
  24. 96 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/MaterielServiceImpl.java
  25. 96 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/OutboundRecordsServiceImpl.java
  26. 193 0
      zkqy-custom-business/src/main/resources/mapper/InboundRecordsMapper.xml
  27. 205 0
      zkqy-custom-business/src/main/resources/mapper/MaterialInventoryMapper.xml
  28. 149 0
      zkqy-custom-business/src/main/resources/mapper/MaterielMapper.xml
  29. 174 0
      zkqy-custom-business/src/main/resources/mapper/OutboundRecordsMapper.xml
  30. 5 3
      zkqy-framework/src/main/java/com/zkqy/framework/web/service/SysLoginService.java
  31. 14 8
      zkqy-ui/src/views/orderMange/purchase/index.vue

+ 1 - 0
pom.xml

@@ -193,6 +193,7 @@
         <module>zkqy-common</module>
         <module>zkqy-business</module>
         <module>zkqy-process-execution</module>
+        <module>zkqy-custom-business</module>
     </modules>
     <packaging>pom</packaging>
     <dependencies>

+ 6 - 0
zkqy-admin/pom.xml

@@ -62,6 +62,12 @@
             <artifactId>zkqy-business</artifactId>
             <version>3.8.5</version>
         </dependency>
+        <!--业务模块-->
+        <dependency>
+            <groupId>com.zkqy</groupId>
+            <artifactId>zkqy-custom-business</artifactId>
+            <version>3.8.5</version>
+        </dependency>
         <!--谷歌的JSON转换工具GSON-->
         <dependency>
             <groupId>com.google.code.gson</groupId>

+ 33 - 2
zkqy-admin/src/main/java/com/zkqy/web/controller/system/SysLoginController.java

@@ -96,7 +96,7 @@ public class SysLoginController {
         }
         // 生成令牌
         String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
-                loginBody.getUuid());
+                loginBody.getUuid(),true);
         if (tokenService.getLoginUserIsAdminByToken(token)) {
             return AjaxResult.error("用户不存在!");
         }
@@ -109,6 +109,37 @@ public class SysLoginController {
         return ajax;
     }
 
+
+    /**
+     * 登录方法
+     *
+     * @param loginBody 登录信息
+     * @return 结果
+     */
+    @PostMapping("/uniappLogin")
+    public AjaxResult uniappLogin(@RequestBody LoginBody loginBody) {
+        //校验租户状态?生成token
+        AjaxResult ajax = AjaxResult.success();
+        //校验不能是admin
+        if (loginBody.getUsername().equals("admin")) {
+            return AjaxResult.error("未有此用户信息");
+        }
+        // 生成令牌
+        String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
+                loginBody.getUuid(),false);
+        if (tokenService.getLoginUserIsAdminByToken(token)) {
+            return AjaxResult.error("用户不存在!");
+        }
+        //检查租户过期时间
+        String checkTenantExpirationTimeMsg = loginService.checkTenantExpirationTime(loginBody.getUsername());
+        if (!checkTenantExpirationTimeMsg.isEmpty()) {
+            return AjaxResult.error(checkTenantExpirationTimeMsg);
+        }
+        ajax.put(Constants.TOKEN, token);
+        return ajax;
+    }
+
+
     /**
      * 登录方法
      *
@@ -128,7 +159,7 @@ public class SysLoginController {
         }
         // 生成令牌
         String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
-                loginBody.getUuid());
+                loginBody.getUuid(),true);
         //检查租户过期时间
         String checkTenantExpirationTimeMsg = loginService.checkTenantExpirationTime(loginBody.getUsername());
         if (!checkTenantExpirationTimeMsg.isEmpty()) {

+ 53 - 0
zkqy-custom-business/pom.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>zkqy</artifactId>
+        <groupId>com.zkqy</groupId>
+        <version>3.8.5</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>zkqy-custom-business</artifactId>
+    <name>zkqy-custom-business</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.zkqy</groupId>
+            <artifactId>zkqy-framework</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+            <version>3.3.2</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>2.10.1</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.zkqy</groupId>
+            <artifactId>zkqy-process-execution</artifactId>
+            <version>3.8.5</version>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-annotations</artifactId>
+            <version>1.6.2</version>
+            <scope>compile</scope>
+        </dependency>
+
+    </dependencies>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+    </properties>
+</project>

+ 113 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/InboundRecordsController.java

@@ -0,0 +1,113 @@
+package com.zkqy.business.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+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 com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.business.domain.InboundRecords;
+import com.zkqy.business.service.IInboundRecordsService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 入库记录Controller
+ *
+ * @author zkqy
+ * @date 2024-03-07
+ */
+@RestController
+@RequestMapping("/system/records")
+@Api(value = "/system/records", description = "入库记录-接口")
+public class InboundRecordsController extends BaseController
+{
+    @Autowired
+    private IInboundRecordsService inboundRecordsService;
+
+    /**
+     * 查询入库记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:records:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询入库记录列表")
+    public TableDataInfo list(InboundRecords inboundRecords)
+    {
+        startPage();
+        List<InboundRecords> list = inboundRecordsService.selectInboundRecordsList(inboundRecords);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出入库记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:records:export')")
+    @Log(title = "入库记录", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出入库记录列表")
+    public void export(HttpServletResponse response, InboundRecords inboundRecords)
+    {
+        List<InboundRecords> list = inboundRecordsService.selectInboundRecordsList(inboundRecords);
+        ExcelUtil<InboundRecords> util = new ExcelUtil<InboundRecords>(InboundRecords.class);
+        util.exportExcel(response, list, "入库记录数据");
+    }
+
+    /**
+     * 获取入库记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:records:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取入库记录详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(inboundRecordsService.selectInboundRecordsById(id));
+    }
+
+    /**
+     * 新增入库记录
+     */
+    @PreAuthorize("@ss.hasPermi('system:records:add')")
+    @Log(title = "入库记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增入库记录")
+    public AjaxResult add(@RequestBody InboundRecords inboundRecords)
+    {
+        return toAjax(inboundRecordsService.insertInboundRecords(inboundRecords));
+    }
+
+    /**
+     * 修改入库记录
+     */
+    @PreAuthorize("@ss.hasPermi('system:records:edit')")
+    @Log(title = "入库记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改入库记录")
+    public AjaxResult edit(@RequestBody InboundRecords inboundRecords)
+    {
+        return toAjax(inboundRecordsService.updateInboundRecords(inboundRecords));
+    }
+
+    /**
+     * 删除入库记录
+     */
+    @PreAuthorize("@ss.hasPermi('system:records:remove')")
+    @Log(title = "入库记录", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除入库记录")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(inboundRecordsService.deleteInboundRecordsByIds(ids));
+    }
+}

+ 231 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/MaterialInventoryController.java

@@ -0,0 +1,231 @@
+package com.zkqy.business.controller;
+
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.business.domain.InboundRecords;
+import com.zkqy.business.domain.Materiel;
+import com.zkqy.business.domain.OutboundRecords;
+import com.zkqy.business.domain.vo.MaterialInventoryVo;
+import com.zkqy.business.mapper.InboundRecordsMapper;
+import com.zkqy.business.mapper.MaterielMapper;
+import com.zkqy.business.mapper.OutboundRecordsMapper;
+import com.zkqy.common.utils.SecurityUtils;
+import com.zkqy.system.mapper.SysDictDataMapper;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+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 com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.business.domain.MaterialInventory;
+import com.zkqy.business.service.IMaterialInventoryService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 物料库存Controller
+ *
+ * @author zkqy
+ * @date 2024-03-07
+ */
+@RestController
+@RequestMapping("/system/inventory")
+@Api(value = "/system/inventory", description = "物料库存-接口")
+public class MaterialInventoryController extends BaseController
+{
+    @Autowired
+    private IMaterialInventoryService materialInventoryService;
+    @Autowired
+    private InboundRecordsMapper inboundRecordsMapper;
+    @Autowired
+    private OutboundRecordsMapper outboundRecordsMapper;
+    @Autowired
+    private MaterielMapper materielMapper;
+
+
+
+    /**
+     * 扫码入库
+     */
+    @PreAuthorize("@ss.hasPermi('system:inventory:add')")
+    @Log(title = "物料库存", businessType = BusinessType.INSERT)
+    @PostMapping("/inventory/insertMaterialInventory")
+    @ApiOperation(value = "新增物料库存")
+    public AjaxResult insertMaterialInventory(@RequestBody MaterialInventoryVo materialInventoryVo)
+    {
+        //1、禁止重复入库
+        InboundRecords inboundRecords = inboundRecordsMapper.selectInboundRecordsByQtCodeNumber(materialInventoryVo.getQtCodeNumber());
+        if(inboundRecords==null){
+          return  AjaxResult.success("不可以重复扫码");
+        }
+        //2、判断是第一次入库还是第二次入库这个同类商品(这是一个连表语句)
+        MaterialInventory materialInventory
+                = materialInventoryService.selectMaterialInventoryByMaterialCodeAndSpecifications(materialInventoryVo.getMaterialCode(), materialInventoryVo.getSpecifications());
+        int count=0;
+        if(materialInventory!=null){ //证明已经入库过相同的产品了---库存叠加操作
+            String quantityOld = materialInventory.getQuantity();
+            String quantity = materialInventoryVo.getQuantity();
+            Integer newQuantity=Integer.parseInt(quantityOld)+Integer.parseInt(quantity);
+            materialInventory.setQuantity(String.valueOf(newQuantity));
+            count = materialInventoryService.updateMaterialInventory(materialInventory);
+        }else{ //第一次入库走插入操作) ()
+            MaterialInventory materialInventoryObj=new MaterialInventory();
+            materialInventoryObj.setStockNumber(String.valueOf(new Date().getTime()));//库存编号
+            materialInventoryObj.setWarehouseEntryNumber(UUID.randomUUID().toString());//入库单编号
+            materialInventoryObj.setMaterialCode(materialInventoryVo.getMaterialCode());//物料编号
+            materialInventoryObj.setQuantity(materialInventoryObj.getQuantity());//数量
+            count = materialInventoryService.insertMaterialInventory(materialInventoryObj);
+        }
+        if(count>0){
+            InboundRecords inboundRecords1=new InboundRecords();
+            inboundRecords1.setInboundTime(new Date());//入库时间
+            //物料名称需要根据物料编码查询下
+            Materiel materiel = materielMapper.selectMaterielByMaterielCode(materialInventoryVo.getMaterialCode());
+            inboundRecords1.setInboundAterialsName(materiel.getMaterielName());//物料名称
+            inboundRecords1.setSpecifications(materialInventoryVo.getSpecifications());//规格代号
+            inboundRecords1.setInboundUnit(materialInventoryVo.getInboundUnit());//单位
+            inboundRecords1.setInboundQuantity(materialInventoryVo.getQuantity());//入库数量
+            inboundRecords1.setInboundLeader(SecurityUtils.getUsername());//仓管员
+            inboundRecords1.setCreateById(SecurityUtils.getUserId());//创建人
+            inboundRecords1.setCreateTime(new Date());//创建时间
+            inboundRecordsMapper.insertInboundRecords(inboundRecords1); //插入入库日志信息
+            return  AjaxResult.success("入库成功");
+        }
+        return AjaxResult.success("入库失败");
+    }
+
+
+    /**
+     * 扫码出库
+     */
+    @PreAuthorize("@ss.hasPermi('system:inventory:add')")
+    @Log(title = "物料库存", businessType = BusinessType.INSERT)
+    @PostMapping("/inventory/deliveryFromStorage")
+    @ApiOperation(value = "新增物料库存")
+    public AjaxResult deliveryFromStorage(@RequestBody MaterialInventoryVo materialInventoryVo)
+    {
+        //1、禁止重复入库
+        InboundRecords inboundRecords = inboundRecordsMapper.selectInboundRecordsByQtCodeNumber(materialInventoryVo.getQtCodeNumber());
+        if(inboundRecords==null){
+            return  AjaxResult.success("此货品还没有入库,不能出库");
+        }
+        //2、是否重复入库
+        OutboundRecords outboundRecords = outboundRecordsMapper.selectOutboundRecordsByQtCodeNumber(materialInventoryVo.getQtCodeNumber());
+        if(outboundRecords==null){
+            return  AjaxResult.success("此货品不能重复出库");
+        }
+        //3、根据物料编码跟规则查询库存信息
+        MaterialInventory materialInventory
+                = materialInventoryService.selectMaterialInventoryByMaterialCodeAndSpecifications(materialInventoryVo.getMaterialCode(), materialInventoryVo.getSpecifications());
+        //4、出库多少减去这个数量
+        String quantityOld = materialInventory.getQuantity();
+        String quantity = materialInventoryVo.getQuantity();
+        Integer newQuantity=Integer.parseInt(quantityOld)-Integer.parseInt(quantity);
+        materialInventory.setQuantity(String.valueOf(newQuantity));
+        int count = materialInventoryService.updateMaterialInventory(materialInventory);
+        if(count>0){
+            OutboundRecords outboundRecords1=new OutboundRecords();
+            outboundRecords1.setOutboundTime(new Date());//出库时间
+            //物料名称需要根据物料编码查询下
+            Materiel materiel = materielMapper.selectMaterielByMaterielCode(materialInventoryVo.getMaterialCode());
+            outboundRecords1.setOutboundAterialsName(materiel.getMaterielName());//物料名称
+            outboundRecords1.setSpecifications(materialInventoryVo.getSpecifications());//规格代号
+            outboundRecords1.setOutboundUnit(materialInventoryVo.getInboundUnit());//单位
+            outboundRecords1.setOutboundQuantity(materialInventoryVo.getQuantity());//出库数量
+            outboundRecords1.setOutboundLeader(SecurityUtils.getUsername());//仓管员
+            outboundRecords1.setCreateById(SecurityUtils.getUserId());//创建人
+            outboundRecords1.setCreateTime(new Date());//创建时间
+            outboundRecordsMapper.insertOutboundRecords(outboundRecords1); //插出库库日志信息
+            return  AjaxResult.success("出库成功");
+        }
+        return AjaxResult.success("出库失败");
+    }
+
+    /**
+     * 新增物料库存
+     */
+    @PreAuthorize("@ss.hasPermi('system:inventory:add')")
+    @Log(title = "物料库存", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增物料库存")
+    public AjaxResult add(@RequestBody MaterialInventory materialInventory)
+    {
+        return toAjax(materialInventoryService.insertMaterialInventory(materialInventory));
+    }
+
+    /**
+     * 查询物料库存列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:inventory:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询物料库存列表")
+    public TableDataInfo list(MaterialInventory materialInventory)
+    {
+        startPage();
+        List<MaterialInventory> list = materialInventoryService.selectMaterialInventoryList(materialInventory);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出物料库存列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:inventory:export')")
+    @Log(title = "物料库存", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出物料库存列表")
+    public void export(HttpServletResponse response, MaterialInventory materialInventory)
+    {
+        List<MaterialInventory> list = materialInventoryService.selectMaterialInventoryList(materialInventory);
+        ExcelUtil<MaterialInventory> util = new ExcelUtil<MaterialInventory>(MaterialInventory.class);
+        util.exportExcel(response, list, "物料库存数据");
+    }
+
+    /**
+     * 获取物料库存详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:inventory:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取物料库存详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(materialInventoryService.selectMaterialInventoryById(id));
+    }
+
+
+    /**
+     * 修改物料库存
+     */
+    @PreAuthorize("@ss.hasPermi('system:inventory:edit')")
+    @Log(title = "物料库存", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改物料库存")
+    public AjaxResult edit(@RequestBody MaterialInventory materialInventory)
+    {
+        return toAjax(materialInventoryService.updateMaterialInventory(materialInventory));
+    }
+
+    /**
+     * 删除物料库存
+     */
+    @PreAuthorize("@ss.hasPermi('system:inventory:remove')")
+    @Log(title = "物料库存", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除物料库存")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(materialInventoryService.deleteMaterialInventoryByIds(ids));
+    }
+}

+ 113 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/MaterielController.java

@@ -0,0 +1,113 @@
+package com.zkqy.business.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+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 com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.business.domain.Materiel;
+import com.zkqy.business.service.IMaterielService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 物料信息Controller
+ *
+ * @author zkqy
+ * @date 2024-03-08
+ */
+@RestController
+@RequestMapping("/system/materiel")
+@Api(value = "/system/materiel", description = "物料信息-接口")
+public class MaterielController extends BaseController
+{
+    @Autowired
+    private IMaterielService materielService;
+
+    /**
+     * 查询物料信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:materiel:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询物料信息列表")
+    public TableDataInfo list(Materiel materiel)
+    {
+        startPage();
+        List<Materiel> list = materielService.selectMaterielList(materiel);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出物料信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:materiel:export')")
+    @Log(title = "物料信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出物料信息列表")
+    public void export(HttpServletResponse response, Materiel materiel)
+    {
+        List<Materiel> list = materielService.selectMaterielList(materiel);
+        ExcelUtil<Materiel> util = new ExcelUtil<Materiel>(Materiel.class);
+        util.exportExcel(response, list, "物料信息数据");
+    }
+
+    /**
+     * 获取物料信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:materiel:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取物料信息详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(materielService.selectMaterielById(id));
+    }
+
+    /**
+     * 新增物料信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:materiel:add')")
+    @Log(title = "物料信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增物料信息")
+    public AjaxResult add(@RequestBody Materiel materiel)
+    {
+        return toAjax(materielService.insertMateriel(materiel));
+    }
+
+    /**
+     * 修改物料信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:materiel:edit')")
+    @Log(title = "物料信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改物料信息")
+    public AjaxResult edit(@RequestBody Materiel materiel)
+    {
+        return toAjax(materielService.updateMateriel(materiel));
+    }
+
+    /**
+     * 删除物料信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:materiel:remove')")
+    @Log(title = "物料信息", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除物料信息")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(materielService.deleteMaterielByIds(ids));
+    }
+}

+ 108 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/OutboundRecordsController.java

@@ -0,0 +1,108 @@
+package com.zkqy.business.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+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 com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.business.domain.OutboundRecords;
+import com.zkqy.business.service.IOutboundRecordsService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 出库记录Controller
+ *
+ * @author zkqy
+ * @date 2024-03-08
+ */
+@RestController
+@RequestMapping("/system/records")
+@Api(value = "/system/records", description = "出库记录-接口")
+public class OutboundRecordsController extends BaseController {
+
+    @Autowired
+    private IOutboundRecordsService outboundRecordsService;
+
+    /**
+     * 查询出库记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:records:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询出库记录列表")
+    public TableDataInfo list(OutboundRecords outboundRecords) {
+        startPage();
+        List<OutboundRecords> list = outboundRecordsService.selectOutboundRecordsList(outboundRecords);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出出库记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:records:export')")
+    @Log(title = "出库记录", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出出库记录列表")
+    public void export(HttpServletResponse response, OutboundRecords outboundRecords) {
+        List<OutboundRecords> list = outboundRecordsService.selectOutboundRecordsList(outboundRecords);
+        ExcelUtil<OutboundRecords> util = new ExcelUtil<OutboundRecords>(OutboundRecords.class);
+        util.exportExcel(response, list, "出库记录数据");
+    }
+
+    /**
+     * 获取出库记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:records:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取出库记录详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(outboundRecordsService.selectOutboundRecordsById(id));
+    }
+
+    /**
+     * 新增出库记录
+     */
+    @PreAuthorize("@ss.hasPermi('system:records:add')")
+    @Log(title = "出库记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增出库记录")
+    public AjaxResult add(@RequestBody OutboundRecords outboundRecords) {
+        return toAjax(outboundRecordsService.insertOutboundRecords(outboundRecords));
+    }
+
+    /**
+     * 修改出库记录
+     */
+    @PreAuthorize("@ss.hasPermi('system:records:edit')")
+    @Log(title = "出库记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改出库记录")
+    public AjaxResult edit(@RequestBody OutboundRecords outboundRecords) {
+        return toAjax(outboundRecordsService.updateOutboundRecords(outboundRecords));
+    }
+
+    /**
+     * 删除出库记录
+     */
+    @PreAuthorize("@ss.hasPermi('system:records:remove')")
+    @Log(title = "出库记录", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除出库记录")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(outboundRecordsService.deleteOutboundRecordsByIds(ids));
+    }
+}

+ 377 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/InboundRecords.java

@@ -0,0 +1,377 @@
+package com.zkqy.business.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zkqy.common.annotation.Excel;
+
+/**
+ * 入库记录对象 inbound_records
+ * 
+ * @author zkqy
+ * @date 2024-03-07
+ */
+public class InboundRecords extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 单位名称 */
+    @Excel(name = "单位名称")
+    private String inboundUnitName;
+
+    /** 入库类别(采购/生产) */
+    @Excel(name = "入库类别", readConverterExp = "采=购/生产")
+    private String inboundType;
+
+    /** 入库时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date inboundTime;
+
+    /** 入库物资名称 */
+    @Excel(name = "入库物资名称")
+    private String inboundAterialsName;
+
+    /** 规格及代号 */
+    @Excel(name = "规格及代号")
+    private String specifications;
+
+    /** 单位 */
+    @Excel(name = "单位")
+    private String inboundUnit;
+
+    /** 入库数量/重量 */
+    @Excel(name = "入库数量/重量")
+    private String inboundQuantity;
+
+    /** 入库单价 */
+    @Excel(name = "入库单价")
+    private String inboundUnitPrice;
+
+    /** 入库金额 */
+    @Excel(name = "入库金额")
+    private String inboundAmounts;
+
+    /** 入库备注 */
+    @Excel(name = "入库备注")
+    private String inboundNotes;
+
+    /** 用途 */
+    @Excel(name = "用途")
+    private String inboundUsage;
+
+    /** 入库批准人 */
+    @Excel(name = "入库批准人")
+    private String inboundApprove;
+
+    /** 交料人 */
+    @Excel(name = "交料人")
+    private String inboundPresenter;
+
+    /** 仓管员 */
+    @Excel(name = "仓管员")
+    private String inboundLeader;
+
+    /** 物料id */
+    @Excel(name = "物料id")
+    private String materielId;
+
+    /** 采购单号 */
+    @Excel(name = "采购单号")
+    private String serialNumber;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 数据条审批状态(默认字段 0:已提交、1:已通过、2:不通过、4:驳回、5:审批中) */
+    @Excel(name = "数据条审批状态", readConverterExp = "默=认字段,0=:已提交、1:已通过、2:不通过、4:驳回、5:审批中")
+    private String dataApprovalStatus;
+
+    /** 流程编号 */
+    @Excel(name = "流程编号")
+    private String processKey;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    @Excel(name = "二维码编码")
+    private String qtCodeNumber;
+
+    public String getQtCodeNumber() {
+        return qtCodeNumber;
+    }
+
+    public void setQtCodeNumber(String qtCodeNumber) {
+        this.qtCodeNumber = qtCodeNumber;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setInboundUnitName(String inboundUnitName) 
+    {
+        this.inboundUnitName = inboundUnitName;
+    }
+
+    public String getInboundUnitName() 
+    {
+        return inboundUnitName;
+    }
+    public void setInboundType(String inboundType) 
+    {
+        this.inboundType = inboundType;
+    }
+
+    public String getInboundType() 
+    {
+        return inboundType;
+    }
+    public void setInboundTime(Date inboundTime) 
+    {
+        this.inboundTime = inboundTime;
+    }
+
+    public Date getInboundTime() 
+    {
+        return inboundTime;
+    }
+    public void setInboundAterialsName(String inboundAterialsName) 
+    {
+        this.inboundAterialsName = inboundAterialsName;
+    }
+
+    public String getInboundAterialsName() 
+    {
+        return inboundAterialsName;
+    }
+    public void setSpecifications(String specifications) 
+    {
+        this.specifications = specifications;
+    }
+
+    public String getSpecifications() 
+    {
+        return specifications;
+    }
+    public void setInboundUnit(String inboundUnit) 
+    {
+        this.inboundUnit = inboundUnit;
+    }
+
+    public String getInboundUnit() 
+    {
+        return inboundUnit;
+    }
+    public void setInboundQuantity(String inboundQuantity) 
+    {
+        this.inboundQuantity = inboundQuantity;
+    }
+
+    public String getInboundQuantity() 
+    {
+        return inboundQuantity;
+    }
+    public void setInboundUnitPrice(String inboundUnitPrice) 
+    {
+        this.inboundUnitPrice = inboundUnitPrice;
+    }
+
+    public String getInboundUnitPrice() 
+    {
+        return inboundUnitPrice;
+    }
+    public void setInboundAmounts(String inboundAmounts) 
+    {
+        this.inboundAmounts = inboundAmounts;
+    }
+
+    public String getInboundAmounts() 
+    {
+        return inboundAmounts;
+    }
+    public void setInboundNotes(String inboundNotes) 
+    {
+        this.inboundNotes = inboundNotes;
+    }
+
+    public String getInboundNotes() 
+    {
+        return inboundNotes;
+    }
+    public void setInboundUsage(String inboundUsage) 
+    {
+        this.inboundUsage = inboundUsage;
+    }
+
+    public String getInboundUsage() 
+    {
+        return inboundUsage;
+    }
+    public void setInboundApprove(String inboundApprove) 
+    {
+        this.inboundApprove = inboundApprove;
+    }
+
+    public String getInboundApprove() 
+    {
+        return inboundApprove;
+    }
+    public void setInboundPresenter(String inboundPresenter) 
+    {
+        this.inboundPresenter = inboundPresenter;
+    }
+
+    public String getInboundPresenter() 
+    {
+        return inboundPresenter;
+    }
+    public void setInboundLeader(String inboundLeader) 
+    {
+        this.inboundLeader = inboundLeader;
+    }
+
+    public String getInboundLeader() 
+    {
+        return inboundLeader;
+    }
+    public void setMaterielId(String materielId) 
+    {
+        this.materielId = materielId;
+    }
+
+    public String getMaterielId() 
+    {
+        return materielId;
+    }
+    public void setSerialNumber(String serialNumber) 
+    {
+        this.serialNumber = serialNumber;
+    }
+
+    public String getSerialNumber() 
+    {
+        return serialNumber;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setDataApprovalStatus(String dataApprovalStatus) 
+    {
+        this.dataApprovalStatus = dataApprovalStatus;
+    }
+
+    public String getDataApprovalStatus() 
+    {
+        return dataApprovalStatus;
+    }
+    public void setProcessKey(String processKey) 
+    {
+        this.processKey = processKey;
+    }
+
+    public String getProcessKey() 
+    {
+        return processKey;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("inboundUnitName", getInboundUnitName())
+            .append("inboundType", getInboundType())
+            .append("inboundTime", getInboundTime())
+            .append("inboundAterialsName", getInboundAterialsName())
+            .append("specifications", getSpecifications())
+            .append("inboundUnit", getInboundUnit())
+            .append("inboundQuantity", getInboundQuantity())
+            .append("inboundUnitPrice", getInboundUnitPrice())
+            .append("inboundAmounts", getInboundAmounts())
+            .append("inboundNotes", getInboundNotes())
+            .append("inboundUsage", getInboundUsage())
+            .append("inboundApprove", getInboundApprove())
+            .append("inboundPresenter", getInboundPresenter())
+            .append("inboundLeader", getInboundLeader())
+            .append("materielId", getMaterielId())
+            .append("serialNumber", getSerialNumber())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("dataApprovalStatus", getDataApprovalStatus())
+            .append("processKey", getProcessKey())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .toString();
+    }
+}

+ 209 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/MaterialInventory.java

@@ -0,0 +1,209 @@
+package com.zkqy.business.domain;
+
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zkqy.common.annotation.Excel;
+
+/**
+ * 物料库存对象 material_inventory
+ * 
+ * @author zkqy
+ * @date 2024-03-07
+ */
+public class MaterialInventory extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    private Long id;
+
+    /** 库存编号 */
+    @Excel(name = "库存编号")
+    private String stockNumber;
+
+    /** 入库单编号 */
+    @Excel(name = "入库单编号")
+    private String warehouseEntryNumber;
+
+    /** 物料编码 */
+    @Excel(name = "物料编码")
+    private String materialCode;
+
+    /** 所属部门 */
+    @Excel(name = "所属部门")
+    private Long subordinateUnit;
+
+    /** 重量/数量 */
+    @Excel(name = "重量/数量")
+    private String quantity;
+
+    /** 仓库编号 */
+    @Excel(name = "仓库编号")
+    private String warehouseNo;
+
+    /** 区域编号 */
+    @Excel(name = "区域编号")
+    private String regionNo;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setStockNumber(String stockNumber) 
+    {
+        this.stockNumber = stockNumber;
+    }
+
+    public String getStockNumber() 
+    {
+        return stockNumber;
+    }
+    public void setWarehouseEntryNumber(String warehouseEntryNumber) 
+    {
+        this.warehouseEntryNumber = warehouseEntryNumber;
+    }
+
+    public String getWarehouseEntryNumber() 
+    {
+        return warehouseEntryNumber;
+    }
+    public void setMaterialCode(String materialCode) 
+    {
+        this.materialCode = materialCode;
+    }
+
+    public String getMaterialCode() 
+    {
+        return materialCode;
+    }
+    public void setSubordinateUnit(Long subordinateUnit) 
+    {
+        this.subordinateUnit = subordinateUnit;
+    }
+
+    public Long getSubordinateUnit() 
+    {
+        return subordinateUnit;
+    }
+    public void setQuantity(String quantity)
+    {
+        this.quantity = quantity;
+    }
+
+    public String getQuantity()
+    {
+        return quantity;
+    }
+    public void setWarehouseNo(String warehouseNo) 
+    {
+        this.warehouseNo = warehouseNo;
+    }
+
+    public String getWarehouseNo() 
+    {
+        return warehouseNo;
+    }
+    public void setRegionNo(String regionNo) 
+    {
+        this.regionNo = regionNo;
+    }
+
+    public String getRegionNo() 
+    {
+        return regionNo;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("stockNumber", getStockNumber())
+            .append("warehouseEntryNumber", getWarehouseEntryNumber())
+            .append("materialCode", getMaterialCode())
+            .append("subordinateUnit", getSubordinateUnit())
+            .append("quantity", getQuantity())
+            .append("warehouseNo", getWarehouseNo())
+            .append("regionNo", getRegionNo())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .toString();
+    }
+}

+ 251 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/Materiel.java

@@ -0,0 +1,251 @@
+package com.zkqy.business.domain;
+
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zkqy.common.annotation.Excel;
+
+/**
+ * 物料信息对象 materiel
+ * 
+ * @author zkqy
+ * @date 2024-03-08
+ */
+public class Materiel extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    private Long id;
+
+    /** 物料编码 */
+    @Excel(name = "物料编码")
+    private String materielCode;
+
+    /** 物料名称 */
+    @Excel(name = "物料名称")
+    private String materielName;
+
+    /** 物料别名 */
+    @Excel(name = "物料别名")
+    private String materielAsname;
+
+    /** 所属部门(暂未使用) */
+    @Excel(name = "所属部门", readConverterExp = "暂=未使用")
+    private Long subordinateDepartmen;
+
+    /** 物料种类 */
+    @Excel(name = "物料种类")
+    private String materielSpecies;
+
+    /** 物料用途 */
+    @Excel(name = "物料用途")
+    private String materielUse;
+
+    /** 物料单位 */
+    @Excel(name = "物料单位")
+    private String units;
+
+    /** 规格 */
+    @Excel(name = "规格")
+    private String specificationModel;
+
+    /** 状态(是否启用) */
+    @Excel(name = "状态", readConverterExp = "是=否启用")
+    private String status;
+
+    /** 数据条审批状态(默认字段 0:未提交 1:已提交 2:已撤销 3:已通过)暂未使用 */
+    @Excel(name = "数据条审批状态", readConverterExp = "默=认字段,0=:未提交,1=:已提交,2=:已撤销,3=:已通过")
+    private String dataApprovalStatus;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setMaterielCode(String materielCode) 
+    {
+        this.materielCode = materielCode;
+    }
+
+    public String getMaterielCode() 
+    {
+        return materielCode;
+    }
+    public void setMaterielName(String materielName) 
+    {
+        this.materielName = materielName;
+    }
+
+    public String getMaterielName() 
+    {
+        return materielName;
+    }
+    public void setMaterielAsname(String materielAsname) 
+    {
+        this.materielAsname = materielAsname;
+    }
+
+    public String getMaterielAsname() 
+    {
+        return materielAsname;
+    }
+    public void setSubordinateDepartmen(Long subordinateDepartmen) 
+    {
+        this.subordinateDepartmen = subordinateDepartmen;
+    }
+
+    public Long getSubordinateDepartmen() 
+    {
+        return subordinateDepartmen;
+    }
+    public void setMaterielSpecies(String materielSpecies) 
+    {
+        this.materielSpecies = materielSpecies;
+    }
+
+    public String getMaterielSpecies() 
+    {
+        return materielSpecies;
+    }
+    public void setMaterielUse(String materielUse) 
+    {
+        this.materielUse = materielUse;
+    }
+
+    public String getMaterielUse() 
+    {
+        return materielUse;
+    }
+    public void setUnits(String units) 
+    {
+        this.units = units;
+    }
+
+    public String getUnits() 
+    {
+        return units;
+    }
+    public void setSpecificationModel(String specificationModel) 
+    {
+        this.specificationModel = specificationModel;
+    }
+
+    public String getSpecificationModel() 
+    {
+        return specificationModel;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+    public void setDataApprovalStatus(String dataApprovalStatus) 
+    {
+        this.dataApprovalStatus = dataApprovalStatus;
+    }
+
+    public String getDataApprovalStatus() 
+    {
+        return dataApprovalStatus;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("materielCode", getMaterielCode())
+            .append("materielName", getMaterielName())
+            .append("materielAsname", getMaterielAsname())
+            .append("subordinateDepartmen", getSubordinateDepartmen())
+            .append("materielSpecies", getMaterielSpecies())
+            .append("materielUse", getMaterielUse())
+            .append("units", getUnits())
+            .append("specificationModel", getSpecificationModel())
+            .append("status", getStatus())
+            .append("dataApprovalStatus", getDataApprovalStatus())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .toString();
+    }
+}

+ 335 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/OutboundRecords.java

@@ -0,0 +1,335 @@
+package com.zkqy.business.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zkqy.common.annotation.Excel;
+
+/**
+ * 出库记录对象 outbound_records
+ * 
+ * @author zkqy
+ * @date 2024-03-08
+ */
+public class OutboundRecords extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 出库编号 */
+    @Excel(name = "出库编号")
+    private String outboundNo;
+
+    /** 单位名称 */
+    @Excel(name = "单位名称")
+    private String outboundUnitName;
+
+    /** 出库类别 */
+    @Excel(name = "出库类别")
+    private String outboundType;
+
+    /** 出库时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date outboundTime;
+
+    /** 出库物资名称 */
+    @Excel(name = "出库物资名称")
+    private String outboundAterialsName;
+
+    /** 规格 */
+    @Excel(name = "规格")
+    private String specifications;
+
+    /** 单位 */
+    @Excel(name = "单位")
+    private String outboundUnit;
+
+    /** 出库数量/重量 */
+    @Excel(name = "出库数量/重量")
+    private String outboundQuantity;
+
+    /** 出库单价 */
+    @Excel(name = "出库单价")
+    private String outboundUnitPrice;
+
+    /** 出库金额 */
+    @Excel(name = "出库金额")
+    private String outboundAmounts;
+
+    /** 出库备注 */
+    @Excel(name = "出库备注")
+    private String outboundNotes;
+
+    /** 出库主管 */
+    @Excel(name = "出库主管")
+    private String outboundLeader;
+
+    /** 出库仓库编号 */
+    @Excel(name = "出库仓库编号")
+    private String warehouseNo;
+
+    /** 记账 */
+    @Excel(name = "记账")
+    private String accounting;
+
+    /** 经手人 */
+    @Excel(name = "经手人")
+    private String handledBy;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    @Excel(name = "二维码编码")
+    private String qtCodeNumber;
+
+    public String getQtCodeNumber() {
+        return qtCodeNumber;
+    }
+
+    public void setQtCodeNumber(String qtCodeNumber) {
+        this.qtCodeNumber = qtCodeNumber;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setOutboundNo(String outboundNo) 
+    {
+        this.outboundNo = outboundNo;
+    }
+
+    public String getOutboundNo() 
+    {
+        return outboundNo;
+    }
+    public void setOutboundUnitName(String outboundUnitName) 
+    {
+        this.outboundUnitName = outboundUnitName;
+    }
+
+    public String getOutboundUnitName() 
+    {
+        return outboundUnitName;
+    }
+    public void setOutboundType(String outboundType) 
+    {
+        this.outboundType = outboundType;
+    }
+
+    public String getOutboundType() 
+    {
+        return outboundType;
+    }
+    public void setOutboundTime(Date outboundTime) 
+    {
+        this.outboundTime = outboundTime;
+    }
+
+    public Date getOutboundTime() 
+    {
+        return outboundTime;
+    }
+    public void setOutboundAterialsName(String outboundAterialsName) 
+    {
+        this.outboundAterialsName = outboundAterialsName;
+    }
+
+    public String getOutboundAterialsName() 
+    {
+        return outboundAterialsName;
+    }
+    public void setSpecifications(String specifications) 
+    {
+        this.specifications = specifications;
+    }
+
+    public String getSpecifications() 
+    {
+        return specifications;
+    }
+    public void setOutboundUnit(String outboundUnit) 
+    {
+        this.outboundUnit = outboundUnit;
+    }
+
+    public String getOutboundUnit() 
+    {
+        return outboundUnit;
+    }
+    public void setOutboundQuantity(String outboundQuantity) 
+    {
+        this.outboundQuantity = outboundQuantity;
+    }
+
+    public String getOutboundQuantity() 
+    {
+        return outboundQuantity;
+    }
+    public void setOutboundUnitPrice(String outboundUnitPrice) 
+    {
+        this.outboundUnitPrice = outboundUnitPrice;
+    }
+
+    public String getOutboundUnitPrice() 
+    {
+        return outboundUnitPrice;
+    }
+    public void setOutboundAmounts(String outboundAmounts) 
+    {
+        this.outboundAmounts = outboundAmounts;
+    }
+
+    public String getOutboundAmounts() 
+    {
+        return outboundAmounts;
+    }
+    public void setOutboundNotes(String outboundNotes) 
+    {
+        this.outboundNotes = outboundNotes;
+    }
+
+    public String getOutboundNotes() 
+    {
+        return outboundNotes;
+    }
+    public void setOutboundLeader(String outboundLeader) 
+    {
+        this.outboundLeader = outboundLeader;
+    }
+
+    public String getOutboundLeader() 
+    {
+        return outboundLeader;
+    }
+    public void setWarehouseNo(String warehouseNo) 
+    {
+        this.warehouseNo = warehouseNo;
+    }
+
+    public String getWarehouseNo() 
+    {
+        return warehouseNo;
+    }
+    public void setAccounting(String accounting) 
+    {
+        this.accounting = accounting;
+    }
+
+    public String getAccounting() 
+    {
+        return accounting;
+    }
+    public void setHandledBy(String handledBy) 
+    {
+        this.handledBy = handledBy;
+    }
+
+    public String getHandledBy() 
+    {
+        return handledBy;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("outboundNo", getOutboundNo())
+            .append("outboundUnitName", getOutboundUnitName())
+            .append("outboundType", getOutboundType())
+            .append("outboundTime", getOutboundTime())
+            .append("outboundAterialsName", getOutboundAterialsName())
+            .append("specifications", getSpecifications())
+            .append("outboundUnit", getOutboundUnit())
+            .append("outboundQuantity", getOutboundQuantity())
+            .append("outboundUnitPrice", getOutboundUnitPrice())
+            .append("outboundAmounts", getOutboundAmounts())
+            .append("outboundNotes", getOutboundNotes())
+            .append("outboundLeader", getOutboundLeader())
+            .append("warehouseNo", getWarehouseNo())
+            .append("accounting", getAccounting())
+            .append("handledBy", getHandledBy())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .toString();
+    }
+}

+ 62 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/MaterialInventoryVo.java

@@ -0,0 +1,62 @@
+package com.zkqy.business.domain.vo;
+
+import com.zkqy.business.domain.MaterialInventory;
+
+/**
+ * 物料库存对象 material_inventory
+ *
+ * @author zkqy
+ * @date 2024-03-07
+ */
+public class MaterialInventoryVo extends MaterialInventory {
+    //销售单编号
+    private String serialNumber;
+    //物料名称
+    private String materielName;
+    //二维码唯一编码
+    private String qtCodeNumber;
+    //单位
+    private String inboundUnit;
+    //规格
+    private String specifications;
+
+    public String getSerialNumber() {
+        return serialNumber;
+    }
+
+    public void setSerialNumber(String serialNumber) {
+        this.serialNumber = serialNumber;
+    }
+
+    public String getMaterielName() {
+        return materielName;
+    }
+
+    public void setMaterielName(String materielName) {
+        this.materielName = materielName;
+    }
+
+    public String getQtCodeNumber() {
+        return qtCodeNumber;
+    }
+
+    public void setQtCodeNumber(String qtCodeNumber) {
+        this.qtCodeNumber = qtCodeNumber;
+    }
+
+    public String getInboundUnit() {
+        return inboundUnit;
+    }
+
+    public void setInboundUnit(String inboundUnit) {
+        this.inboundUnit = inboundUnit;
+    }
+
+    public String getSpecifications() {
+        return specifications;
+    }
+
+    public void setSpecifications(String specifications) {
+        this.specifications = specifications;
+    }
+}

+ 71 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/InboundRecordsMapper.java

@@ -0,0 +1,71 @@
+package com.zkqy.business.mapper;
+
+import java.util.List;
+import com.zkqy.business.domain.InboundRecords;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 入库记录Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-03-07
+ */
+@Mapper
+public interface InboundRecordsMapper 
+{
+    /**
+     * 查询入库记录
+     * 
+     * @param id 入库记录主键
+     * @return 入库记录
+     */
+    public InboundRecords selectInboundRecordsById(Long id);
+
+    /**
+     * 查询入库记录
+     *
+     * @param qtCodeNumber 二维码编码
+     * @return 入库记录
+     */
+    public InboundRecords selectInboundRecordsByQtCodeNumber(String qtCodeNumber);
+
+    /**
+     * 查询入库记录列表
+     * 
+     * @param inboundRecords 入库记录
+     * @return 入库记录集合
+     */
+    public List<InboundRecords> selectInboundRecordsList(InboundRecords inboundRecords);
+
+    /**
+     * 新增入库记录
+     * 
+     * @param inboundRecords 入库记录
+     * @return 结果
+     */
+    public int insertInboundRecords(InboundRecords inboundRecords);
+
+    /**
+     * 修改入库记录
+     * 
+     * @param inboundRecords 入库记录
+     * @return 结果
+     */
+    public int updateInboundRecords(InboundRecords inboundRecords);
+
+    /**
+     * 删除入库记录
+     * 
+     * @param id 入库记录主键
+     * @return 结果
+     */
+    public int deleteInboundRecordsById(Long id);
+
+    /**
+     * 批量删除入库记录
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteInboundRecordsByIds(Long[] ids);
+}

+ 73 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/MaterialInventoryMapper.java

@@ -0,0 +1,73 @@
+package com.zkqy.business.mapper;
+
+import java.util.List;
+import com.zkqy.business.domain.MaterialInventory;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 物料库存Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-03-07
+ */
+@Mapper
+public interface MaterialInventoryMapper 
+{
+    /**
+     * 查询物料库存
+     * 
+     * @param id 物料库存主键
+     * @return 物料库存
+     */
+    public MaterialInventory selectMaterialInventoryById(Long id);
+
+    /**
+     * 连表查询物料库存和物料信息
+     * @param materialCode 物料编码
+     * @param specifications 规格
+     * @return
+     */
+    public MaterialInventory selectMaterialInventoryByMaterialCodeAndSpecifications(@Param("materialCode")   String materialCode,
+                                                                                    @Param("specifications") String specifications);
+
+    /**
+     * 查询物料库存列表
+     * 
+     * @param materialInventory 物料库存
+     * @return 物料库存集合
+     */
+    public List<MaterialInventory> selectMaterialInventoryList(MaterialInventory materialInventory);
+
+    /**
+     * 新增物料库存
+     * 
+     * @param materialInventory 物料库存
+     * @return 结果
+     */
+    public int insertMaterialInventory(MaterialInventory materialInventory);
+
+    /**
+     * 修改物料库存
+     * 
+     * @param materialInventory 物料库存
+     * @return 结果
+     */
+    public int updateMaterialInventory(MaterialInventory materialInventory);
+
+    /**
+     * 删除物料库存
+     * 
+     * @param id 物料库存主键
+     * @return 结果
+     */
+    public int deleteMaterialInventoryById(Long id);
+
+    /**
+     * 批量删除物料库存
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteMaterialInventoryByIds(Long[] ids);
+}

+ 71 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/MaterielMapper.java

@@ -0,0 +1,71 @@
+package com.zkqy.business.mapper;
+
+import java.util.List;
+import com.zkqy.business.domain.Materiel;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 物料信息Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-03-08
+ */
+@Mapper
+public interface MaterielMapper 
+{
+    /**
+     * 查询物料信息
+     * 
+     * @param id 物料信息主键
+     * @return 物料信息
+     */
+    public Materiel selectMaterielById(Long id);
+
+    /**
+     * 查询物料信息
+     *
+     * @param materielCode 物料编码
+     * @return 物料信息
+     */
+    public Materiel selectMaterielByMaterielCode(String materielCode);
+
+    /**
+     * 查询物料信息列表
+     * 
+     * @param materiel 物料信息
+     * @return 物料信息集合
+     */
+    public List<Materiel> selectMaterielList(Materiel materiel);
+
+    /**
+     * 新增物料信息
+     * 
+     * @param materiel 物料信息
+     * @return 结果
+     */
+    public int insertMateriel(Materiel materiel);
+
+    /**
+     * 修改物料信息
+     * 
+     * @param materiel 物料信息
+     * @return 结果
+     */
+    public int updateMateriel(Materiel materiel);
+
+    /**
+     * 删除物料信息
+     * 
+     * @param id 物料信息主键
+     * @return 结果
+     */
+    public int deleteMaterielById(Long id);
+
+    /**
+     * 批量删除物料信息
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteMaterielByIds(Long[] ids);
+}

+ 72 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/OutboundRecordsMapper.java

@@ -0,0 +1,72 @@
+package com.zkqy.business.mapper;
+
+import java.util.List;
+import com.zkqy.business.domain.OutboundRecords;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 出库记录Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-03-08
+ */
+@Mapper
+public interface OutboundRecordsMapper 
+{
+    /**
+     * 查询出库记录
+     * 
+     * @param id 出库记录主键
+     * @return 出库记录
+     */
+    public OutboundRecords selectOutboundRecordsById(Long id);
+
+
+    /**
+     * 二维码出库编码
+     *
+     * @param qtCodeNumber 出库记录主键
+     * @return 出库记录
+     */
+    public OutboundRecords selectOutboundRecordsByQtCodeNumber(String qtCodeNumber);
+
+    /**
+     * 查询出库记录列表
+     * 
+     * @param outboundRecords 出库记录
+     * @return 出库记录集合
+     */
+    public List<OutboundRecords> selectOutboundRecordsList(OutboundRecords outboundRecords);
+
+    /**
+     * 新增出库记录
+     * 
+     * @param outboundRecords 出库记录
+     * @return 结果
+     */
+    public int insertOutboundRecords(OutboundRecords outboundRecords);
+
+    /**
+     * 修改出库记录
+     * 
+     * @param outboundRecords 出库记录
+     * @return 结果
+     */
+    public int updateOutboundRecords(OutboundRecords outboundRecords);
+
+    /**
+     * 删除出库记录
+     * 
+     * @param id 出库记录主键
+     * @return 结果
+     */
+    public int deleteOutboundRecordsById(Long id);
+
+    /**
+     * 批量删除出库记录
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteOutboundRecordsByIds(Long[] ids);
+}

+ 61 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/IInboundRecordsService.java

@@ -0,0 +1,61 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.InboundRecords;
+
+/**
+ * 入库记录Service接口
+ * 
+ * @author zkqy
+ * @date 2024-03-07
+ */
+public interface IInboundRecordsService 
+{
+    /**
+     * 查询入库记录
+     * 
+     * @param id 入库记录主键
+     * @return 入库记录
+     */
+    public InboundRecords selectInboundRecordsById(Long id);
+
+    /**
+     * 查询入库记录列表
+     * 
+     * @param inboundRecords 入库记录
+     * @return 入库记录集合
+     */
+    public List<InboundRecords> selectInboundRecordsList(InboundRecords inboundRecords);
+
+    /**
+     * 新增入库记录
+     * 
+     * @param inboundRecords 入库记录
+     * @return 结果
+     */
+    public int insertInboundRecords(InboundRecords inboundRecords);
+
+    /**
+     * 修改入库记录
+     * 
+     * @param inboundRecords 入库记录
+     * @return 结果
+     */
+    public int updateInboundRecords(InboundRecords inboundRecords);
+
+    /**
+     * 批量删除入库记录
+     * 
+     * @param ids 需要删除的入库记录主键集合
+     * @return 结果
+     */
+    public int deleteInboundRecordsByIds(Long[] ids);
+
+    /**
+     * 删除入库记录信息
+     * 
+     * @param id 入库记录主键
+     * @return 结果
+     */
+    public int deleteInboundRecordsById(Long id);
+}

+ 71 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/IMaterialInventoryService.java

@@ -0,0 +1,71 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.MaterialInventory;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 物料库存Service接口
+ * 
+ * @author zkqy
+ * @date 2024-03-07
+ */
+public interface IMaterialInventoryService 
+{
+    /**
+     * 查询物料库存
+     * 
+     * @param id 物料库存主键
+     * @return 物料库存
+     */
+    public MaterialInventory selectMaterialInventoryById(Long id);
+
+    /**
+     * 查询物料库存列表
+     * 
+     * @param materialInventory 物料库存
+     * @return 物料库存集合
+     */
+    public List<MaterialInventory> selectMaterialInventoryList(MaterialInventory materialInventory);
+
+    /**
+     * 新增物料库存
+     * 
+     * @param materialInventory 物料库存
+     * @return 结果
+     */
+    public int insertMaterialInventory(MaterialInventory materialInventory);
+
+    /**
+     * 修改物料库存
+     * 
+     * @param materialInventory 物料库存
+     * @return 结果
+     */
+    public int updateMaterialInventory(MaterialInventory materialInventory);
+
+    /**
+     * 批量删除物料库存
+     * 
+     * @param ids 需要删除的物料库存主键集合
+     * @return 结果
+     */
+    public int deleteMaterialInventoryByIds(Long[] ids);
+
+    /**
+     * 删除物料库存信息
+     * 
+     * @param id 物料库存主键
+     * @return 结果
+     */
+    public int deleteMaterialInventoryById(Long id);
+
+    /**
+     * 根据物料编码和规格进行查询
+     * @param materialCode
+     * @param specifications
+     * @return
+     */
+    public MaterialInventory selectMaterialInventoryByMaterialCodeAndSpecifications(String materialCode,String specifications);
+
+}

+ 61 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/IMaterielService.java

@@ -0,0 +1,61 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.Materiel;
+
+/**
+ * 物料信息Service接口
+ * 
+ * @author zkqy
+ * @date 2024-03-08
+ */
+public interface IMaterielService 
+{
+    /**
+     * 查询物料信息
+     * 
+     * @param id 物料信息主键
+     * @return 物料信息
+     */
+    public Materiel selectMaterielById(Long id);
+
+    /**
+     * 查询物料信息列表
+     * 
+     * @param materiel 物料信息
+     * @return 物料信息集合
+     */
+    public List<Materiel> selectMaterielList(Materiel materiel);
+
+    /**
+     * 新增物料信息
+     * 
+     * @param materiel 物料信息
+     * @return 结果
+     */
+    public int insertMateriel(Materiel materiel);
+
+    /**
+     * 修改物料信息
+     * 
+     * @param materiel 物料信息
+     * @return 结果
+     */
+    public int updateMateriel(Materiel materiel);
+
+    /**
+     * 批量删除物料信息
+     * 
+     * @param ids 需要删除的物料信息主键集合
+     * @return 结果
+     */
+    public int deleteMaterielByIds(Long[] ids);
+
+    /**
+     * 删除物料信息信息
+     * 
+     * @param id 物料信息主键
+     * @return 结果
+     */
+    public int deleteMaterielById(Long id);
+}

+ 61 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/IOutboundRecordsService.java

@@ -0,0 +1,61 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.OutboundRecords;
+
+/**
+ * 出库记录Service接口
+ * 
+ * @author zkqy
+ * @date 2024-03-08
+ */
+public interface IOutboundRecordsService 
+{
+    /**
+     * 查询出库记录
+     * 
+     * @param id 出库记录主键
+     * @return 出库记录
+     */
+    public OutboundRecords selectOutboundRecordsById(Long id);
+
+    /**
+     * 查询出库记录列表
+     * 
+     * @param outboundRecords 出库记录
+     * @return 出库记录集合
+     */
+    public List<OutboundRecords> selectOutboundRecordsList(OutboundRecords outboundRecords);
+
+    /**
+     * 新增出库记录
+     * 
+     * @param outboundRecords 出库记录
+     * @return 结果
+     */
+    public int insertOutboundRecords(OutboundRecords outboundRecords);
+
+    /**
+     * 修改出库记录
+     * 
+     * @param outboundRecords 出库记录
+     * @return 结果
+     */
+    public int updateOutboundRecords(OutboundRecords outboundRecords);
+
+    /**
+     * 批量删除出库记录
+     * 
+     * @param ids 需要删除的出库记录主键集合
+     * @return 结果
+     */
+    public int deleteOutboundRecordsByIds(Long[] ids);
+
+    /**
+     * 删除出库记录信息
+     * 
+     * @param id 出库记录主键
+     * @return 结果
+     */
+    public int deleteOutboundRecordsById(Long id);
+}

+ 90 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/InboundRecordsServiceImpl.java

@@ -0,0 +1,90 @@
+package com.zkqy.business.service.impl;
+
+import java.util.List;
+
+import com.zkqy.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.business.mapper.InboundRecordsMapper;
+import com.zkqy.business.domain.InboundRecords;
+import com.zkqy.business.service.IInboundRecordsService;
+
+/**
+ * 入库记录Service业务层处理
+ *
+ * @author zkqy
+ * @date 2024-03-07
+ */
+@Service
+public class InboundRecordsServiceImpl implements IInboundRecordsService {
+    @Autowired
+    private InboundRecordsMapper inboundRecordsMapper;
+
+    /**
+     * 查询入库记录
+     *
+     * @param id 入库记录主键
+     * @return 入库记录
+     */
+    @Override
+    public InboundRecords selectInboundRecordsById(Long id) {
+        return inboundRecordsMapper.selectInboundRecordsById(id);
+    }
+
+    /**
+     * 查询入库记录列表
+     *
+     * @param inboundRecords 入库记录
+     * @return 入库记录
+     */
+    @Override
+    public List<InboundRecords> selectInboundRecordsList(InboundRecords inboundRecords) {
+        return inboundRecordsMapper.selectInboundRecordsList(inboundRecords);
+    }
+
+    /**
+     * 新增入库记录
+     *
+     * @param inboundRecords 入库记录
+     * @return 结果
+     */
+    @Override
+    public int insertInboundRecords(InboundRecords inboundRecords) {
+        inboundRecords.setCreateTime(DateUtils.getNowDate());
+        return inboundRecordsMapper.insertInboundRecords(inboundRecords);
+    }
+
+    /**
+     * 修改入库记录
+     *
+     * @param inboundRecords 入库记录
+     * @return 结果
+     */
+    @Override
+    public int updateInboundRecords(InboundRecords inboundRecords) {
+        inboundRecords.setUpdateTime(DateUtils.getNowDate());
+        return inboundRecordsMapper.updateInboundRecords(inboundRecords);
+    }
+
+    /**
+     * 批量删除入库记录
+     *
+     * @param ids 需要删除的入库记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteInboundRecordsByIds(Long[] ids) {
+        return inboundRecordsMapper.deleteInboundRecordsByIds(ids);
+    }
+
+    /**
+     * 删除入库记录信息
+     *
+     * @param id 入库记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteInboundRecordsById(Long id) {
+        return inboundRecordsMapper.deleteInboundRecordsById(id);
+    }
+}

+ 111 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/MaterialInventoryServiceImpl.java

@@ -0,0 +1,111 @@
+package com.zkqy.business.service.impl;
+
+import java.util.List;
+
+import com.zkqy.business.mapper.InboundRecordsMapper;
+import com.zkqy.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.business.mapper.MaterialInventoryMapper;
+import com.zkqy.business.domain.MaterialInventory;
+import com.zkqy.business.service.IMaterialInventoryService;
+
+/**
+ * 物料库存Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-03-07
+ */
+@Service
+public class MaterialInventoryServiceImpl implements IMaterialInventoryService 
+{
+    @Autowired
+    private MaterialInventoryMapper materialInventoryMapper;
+    @Autowired
+    private InboundRecordsMapper inboundRecordsMapper;
+    /**
+     * 查询物料库存
+     * 
+     * @param id 物料库存主键
+     * @return 物料库存
+     */
+    @Override
+    public MaterialInventory selectMaterialInventoryById(Long id)
+    {
+        return materialInventoryMapper.selectMaterialInventoryById(id);
+    }
+
+    /**
+     * 查询物料库存列表
+     * 
+     * @param materialInventory 物料库存
+     * @return 物料库存
+     */
+    @Override
+    public List<MaterialInventory> selectMaterialInventoryList(MaterialInventory materialInventory)
+    {
+        return materialInventoryMapper.selectMaterialInventoryList(materialInventory);
+    }
+
+    /**
+     * 新增物料库存
+     * 
+     * @param materialInventory 物料库存
+     * @return 结果
+     */
+    @Override
+    public int insertMaterialInventory(MaterialInventory materialInventory)
+    {
+        materialInventory.setCreateTime(DateUtils.getNowDate());
+        //查询二维码是否被使用过了
+        return materialInventoryMapper.insertMaterialInventory(materialInventory);
+    }
+
+    /**
+     * 修改物料库存
+     * 
+     * @param materialInventory 物料库存
+     * @return 结果
+     */
+    @Override
+    public int updateMaterialInventory(MaterialInventory materialInventory)
+    {
+        materialInventory.setUpdateTime(DateUtils.getNowDate());
+        return materialInventoryMapper.updateMaterialInventory(materialInventory);
+    }
+
+    /**
+     * 批量删除物料库存
+     * 
+     * @param ids 需要删除的物料库存主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMaterialInventoryByIds(Long[] ids)
+    {
+        return materialInventoryMapper.deleteMaterialInventoryByIds(ids);
+    }
+
+    /**
+     * 删除物料库存信息
+     * 
+     * @param id 物料库存主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMaterialInventoryById(Long id)
+    {
+        return materialInventoryMapper.deleteMaterialInventoryById(id);
+    }
+
+    /**
+     * 根据物料编码和规格进行查询
+     * @param materialCode
+     * @param specifications
+     * @return
+     */
+    @Override
+    public MaterialInventory selectMaterialInventoryByMaterialCodeAndSpecifications(String materialCode, String specifications) {
+        return materialInventoryMapper.selectMaterialInventoryByMaterialCodeAndSpecifications(materialCode,specifications);
+    }
+}

+ 96 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/MaterielServiceImpl.java

@@ -0,0 +1,96 @@
+package com.zkqy.business.service.impl;
+
+import java.util.List;
+import com.zkqy.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.business.mapper.MaterielMapper;
+import com.zkqy.business.domain.Materiel;
+import com.zkqy.business.service.IMaterielService;
+
+/**
+ * 物料信息Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-03-08
+ */
+@Service
+public class MaterielServiceImpl implements IMaterielService 
+{
+    @Autowired
+    private MaterielMapper materielMapper;
+
+    /**
+     * 查询物料信息
+     * 
+     * @param id 物料信息主键
+     * @return 物料信息
+     */
+    @Override
+    public Materiel selectMaterielById(Long id)
+    {
+        return materielMapper.selectMaterielById(id);
+    }
+
+    /**
+     * 查询物料信息列表
+     * 
+     * @param materiel 物料信息
+     * @return 物料信息
+     */
+    @Override
+    public List<Materiel> selectMaterielList(Materiel materiel)
+    {
+        return materielMapper.selectMaterielList(materiel);
+    }
+
+    /**
+     * 新增物料信息
+     * 
+     * @param materiel 物料信息
+     * @return 结果
+     */
+    @Override
+    public int insertMateriel(Materiel materiel)
+    {
+        materiel.setCreateTime(DateUtils.getNowDate());
+        return materielMapper.insertMateriel(materiel);
+    }
+
+    /**
+     * 修改物料信息
+     * 
+     * @param materiel 物料信息
+     * @return 结果
+     */
+    @Override
+    public int updateMateriel(Materiel materiel)
+    {
+        materiel.setUpdateTime(DateUtils.getNowDate());
+        return materielMapper.updateMateriel(materiel);
+    }
+
+    /**
+     * 批量删除物料信息
+     * 
+     * @param ids 需要删除的物料信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMaterielByIds(Long[] ids)
+    {
+        return materielMapper.deleteMaterielByIds(ids);
+    }
+
+    /**
+     * 删除物料信息信息
+     * 
+     * @param id 物料信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMaterielById(Long id)
+    {
+        return materielMapper.deleteMaterielById(id);
+    }
+}

+ 96 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/OutboundRecordsServiceImpl.java

@@ -0,0 +1,96 @@
+package com.zkqy.business.service.impl;
+
+import java.util.List;
+import com.zkqy.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.business.mapper.OutboundRecordsMapper;
+import com.zkqy.business.domain.OutboundRecords;
+import com.zkqy.business.service.IOutboundRecordsService;
+
+/**
+ * 出库记录Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-03-08
+ */
+@Service
+public class OutboundRecordsServiceImpl implements IOutboundRecordsService 
+{
+    @Autowired
+    private OutboundRecordsMapper outboundRecordsMapper;
+
+    /**
+     * 查询出库记录
+     * 
+     * @param id 出库记录主键
+     * @return 出库记录
+     */
+    @Override
+    public OutboundRecords selectOutboundRecordsById(Long id)
+    {
+        return outboundRecordsMapper.selectOutboundRecordsById(id);
+    }
+
+    /**
+     * 查询出库记录列表
+     * 
+     * @param outboundRecords 出库记录
+     * @return 出库记录
+     */
+    @Override
+    public List<OutboundRecords> selectOutboundRecordsList(OutboundRecords outboundRecords)
+    {
+        return outboundRecordsMapper.selectOutboundRecordsList(outboundRecords);
+    }
+
+    /**
+     * 新增出库记录
+     * 
+     * @param outboundRecords 出库记录
+     * @return 结果
+     */
+    @Override
+    public int insertOutboundRecords(OutboundRecords outboundRecords)
+    {
+        outboundRecords.setCreateTime(DateUtils.getNowDate());
+        return outboundRecordsMapper.insertOutboundRecords(outboundRecords);
+    }
+
+    /**
+     * 修改出库记录
+     * 
+     * @param outboundRecords 出库记录
+     * @return 结果
+     */
+    @Override
+    public int updateOutboundRecords(OutboundRecords outboundRecords)
+    {
+        outboundRecords.setUpdateTime(DateUtils.getNowDate());
+        return outboundRecordsMapper.updateOutboundRecords(outboundRecords);
+    }
+
+    /**
+     * 批量删除出库记录
+     * 
+     * @param ids 需要删除的出库记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteOutboundRecordsByIds(Long[] ids)
+    {
+        return outboundRecordsMapper.deleteOutboundRecordsByIds(ids);
+    }
+
+    /**
+     * 删除出库记录信息
+     * 
+     * @param id 出库记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteOutboundRecordsById(Long id)
+    {
+        return outboundRecordsMapper.deleteOutboundRecordsById(id);
+    }
+}

+ 193 - 0
zkqy-custom-business/src/main/resources/mapper/InboundRecordsMapper.xml

@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.zkqy.business.mapper.InboundRecordsMapper">
+    
+    <resultMap type="com.zkqy.business.domain.InboundRecords" id="InboundRecordsResult">
+        <result property="id"    column="id"    />
+        <result property="inboundUnitName"    column="inbound_unit_name"    />
+        <result property="inboundType"    column="inbound_type"    />
+        <result property="inboundTime"    column="inbound_time"    />
+        <result property="inboundAterialsName"    column="inbound_aterials_name"    />
+        <result property="specifications"    column="specifications"    />
+        <result property="inboundUnit"    column="inbound_unit"    />
+        <result property="inboundQuantity"    column="inbound_quantity"    />
+        <result property="inboundUnitPrice"    column="inbound_unit_price"    />
+        <result property="inboundAmounts"    column="inbound_amounts"    />
+        <result property="inboundNotes"    column="inbound_notes"    />
+        <result property="inboundUsage"    column="inbound_usage"    />
+        <result property="inboundApprove"    column="inbound_approve"    />
+        <result property="inboundPresenter"    column="inbound_presenter"    />
+        <result property="inboundLeader"    column="inbound_leader"    />
+        <result property="materielId"    column="materiel_id"    />
+        <result property="serialNumber"    column="serialNumber"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="dataApprovalStatus"    column="data_approval_status"    />
+        <result property="processKey"    column="process_key"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+    </resultMap>
+
+    <sql id="selectInboundRecordsVo">
+        select id, inbound_unit_name, inbound_type, inbound_time, inbound_aterials_name,
+               specifications, inbound_unit, inbound_quantity, inbound_unit_price, inbound_amounts,
+               inbound_notes, inbound_usage, inbound_approve, inbound_presenter, inbound_leader, materiel_id,
+               serialNumber, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time,
+               del_flag, data_approval_status, process_key, task_process_key, task_node_key from {DBNAME}.inbound_records
+    </sql>
+
+    <select id="selectInboundRecordsList" parameterType="com.zkqy.business.domain.InboundRecords" resultMap="InboundRecordsResult">
+        <include refid="selectInboundRecordsVo"/>
+        <where>  
+            <if test="inboundUnitName != null  and inboundUnitName != ''"> and inbound_unit_name like concat('%', #{inboundUnitName}, '%')</if>
+            <if test="inboundType != null  and inboundType != ''"> and inbound_type = #{inboundType}</if>
+            <if test="inboundTime != null "> and inbound_time = #{inboundTime}</if>
+            <if test="inboundAterialsName != null  and inboundAterialsName != ''"> and inbound_aterials_name like concat('%', #{inboundAterialsName}, '%')</if>
+            <if test="specifications != null  and specifications != ''"> and specifications = #{specifications}</if>
+            <if test="inboundUnit != null  and inboundUnit != ''"> and inbound_unit = #{inboundUnit}</if>
+            <if test="inboundQuantity != null  and inboundQuantity != ''"> and inbound_quantity = #{inboundQuantity}</if>
+            <if test="inboundUnitPrice != null  and inboundUnitPrice != ''"> and inbound_unit_price = #{inboundUnitPrice}</if>
+            <if test="inboundAmounts != null  and inboundAmounts != ''"> and inbound_amounts = #{inboundAmounts}</if>
+            <if test="inboundNotes != null  and inboundNotes != ''"> and inbound_notes = #{inboundNotes}</if>
+            <if test="inboundUsage != null  and inboundUsage != ''"> and inbound_usage = #{inboundUsage}</if>
+            <if test="inboundApprove != null  and inboundApprove != ''"> and inbound_approve = #{inboundApprove}</if>
+            <if test="inboundPresenter != null  and inboundPresenter != ''"> and inbound_presenter = #{inboundPresenter}</if>
+            <if test="inboundLeader != null  and inboundLeader != ''"> and inbound_leader = #{inboundLeader}</if>
+            <if test="materielId != null  and materielId != ''"> and materiel_id = #{materielId}</if>
+            <if test="serialNumber != null  and serialNumber != ''"> and serialNumber = #{serialNumber}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="dataApprovalStatus != null  and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
+            <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</if>
+            <if test="taskProcessKey != null  and taskProcessKey != ''"> and task_process_key = #{taskProcessKey}</if>
+            <if test="taskNodeKey != null  and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
+        </where>
+    </select>
+    
+    <select id="selectInboundRecordsById" parameterType="Long" resultMap="InboundRecordsResult">
+        <include refid="selectInboundRecordsVo"/>
+        where id = #{id}
+    </select>
+    <select id="selectInboundRecordsByQtCodeNumber" resultType="com.zkqy.business.domain.InboundRecords">
+        <include refid="selectInboundRecordsVo"/>
+        where qtCodeNumber = #{qtCodeNumber}
+    </select>
+
+    <insert id="insertInboundRecords" parameterType="com.zkqy.business.domain.InboundRecords" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.inbound_records
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="inboundUnitName != null">inbound_unit_name,</if>
+            <if test="inboundType != null">inbound_type,</if>
+            <if test="inboundTime != null">inbound_time,</if>
+            <if test="inboundAterialsName != null">inbound_aterials_name,</if>
+            <if test="specifications != null">specifications,</if>
+            <if test="inboundUnit != null">inbound_unit,</if>
+            <if test="inboundQuantity != null">inbound_quantity,</if>
+            <if test="inboundUnitPrice != null">inbound_unit_price,</if>
+            <if test="inboundAmounts != null">inbound_amounts,</if>
+            <if test="inboundNotes != null">inbound_notes,</if>
+            <if test="inboundUsage != null">inbound_usage,</if>
+            <if test="inboundApprove != null">inbound_approve,</if>
+            <if test="inboundPresenter != null">inbound_presenter,</if>
+            <if test="inboundLeader != null">inbound_leader,</if>
+            <if test="materielId != null">materiel_id,</if>
+            <if test="serialNumber != null">serialNumber,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="dataApprovalStatus != null">data_approval_status,</if>
+            <if test="processKey != null">process_key,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="inboundUnitName != null">#{inboundUnitName},</if>
+            <if test="inboundType != null">#{inboundType},</if>
+            <if test="inboundTime != null">#{inboundTime},</if>
+            <if test="inboundAterialsName != null">#{inboundAterialsName},</if>
+            <if test="specifications != null">#{specifications},</if>
+            <if test="inboundUnit != null">#{inboundUnit},</if>
+            <if test="inboundQuantity != null">#{inboundQuantity},</if>
+            <if test="inboundUnitPrice != null">#{inboundUnitPrice},</if>
+            <if test="inboundAmounts != null">#{inboundAmounts},</if>
+            <if test="inboundNotes != null">#{inboundNotes},</if>
+            <if test="inboundUsage != null">#{inboundUsage},</if>
+            <if test="inboundApprove != null">#{inboundApprove},</if>
+            <if test="inboundPresenter != null">#{inboundPresenter},</if>
+            <if test="inboundLeader != null">#{inboundLeader},</if>
+            <if test="materielId != null">#{materielId},</if>
+            <if test="serialNumber != null">#{serialNumber},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
+            <if test="processKey != null">#{processKey},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+         </trim>
+    </insert>
+
+    <update id="updateInboundRecords" parameterType="com.zkqy.business.domain.InboundRecords">
+        update {DBNAME}.inbound_records
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="inboundUnitName != null">inbound_unit_name = #{inboundUnitName},</if>
+            <if test="inboundType != null">inbound_type = #{inboundType},</if>
+            <if test="inboundTime != null">inbound_time = #{inboundTime},</if>
+            <if test="inboundAterialsName != null">inbound_aterials_name = #{inboundAterialsName},</if>
+            <if test="specifications != null">specifications = #{specifications},</if>
+            <if test="inboundUnit != null">inbound_unit = #{inboundUnit},</if>
+            <if test="inboundQuantity != null">inbound_quantity = #{inboundQuantity},</if>
+            <if test="inboundUnitPrice != null">inbound_unit_price = #{inboundUnitPrice},</if>
+            <if test="inboundAmounts != null">inbound_amounts = #{inboundAmounts},</if>
+            <if test="inboundNotes != null">inbound_notes = #{inboundNotes},</if>
+            <if test="inboundUsage != null">inbound_usage = #{inboundUsage},</if>
+            <if test="inboundApprove != null">inbound_approve = #{inboundApprove},</if>
+            <if test="inboundPresenter != null">inbound_presenter = #{inboundPresenter},</if>
+            <if test="inboundLeader != null">inbound_leader = #{inboundLeader},</if>
+            <if test="materielId != null">materiel_id = #{materielId},</if>
+            <if test="serialNumber != null">serialNumber = #{serialNumber},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteInboundRecordsById" parameterType="Long">
+        delete from {DBNAME}.inbound_records where id = #{id}
+    </delete>
+
+    <delete id="deleteInboundRecordsByIds" parameterType="String">
+        delete from {DBNAME}.inbound_records where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 205 - 0
zkqy-custom-business/src/main/resources/mapper/MaterialInventoryMapper.xml

@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.zkqy.business.mapper.MaterialInventoryMapper">
+
+    <resultMap type="com.zkqy.business.domain.MaterialInventory" id="MaterialInventoryResult">
+        <result property="id" column="id"/>
+        <result property="stockNumber" column="stock_number"/>
+        <result property="warehouseEntryNumber" column="warehouse_entry_number"/>
+        <result property="materialCode" column="material_code"/>
+        <result property="subordinateUnit" column="subordinate_unit"/>
+        <result property="quantity" column="quantity"/>
+        <result property="warehouseNo" column="warehouse_no"/>
+        <result property="regionNo" column="region_no"/>
+        <result property="remark" column="remark"/>
+        <result property="createById" column="create_by_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateById" column="update_by_id"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="taskProcessKey" column="task_process_key"/>
+        <result property="taskNodeKey" column="task_node_key"/>
+    </resultMap>
+
+    <resultMap type="com.zkqy.business.domain.vo.MaterialInventoryVo" id="MaterialInventoryResultTwo">
+        <result property="id" column="id"/>
+        <result property="stockNumber" column="stock_number"/>
+        <result property="warehouseEntryNumber" column="warehouse_entry_number"/>
+        <result property="materialCode" column="material_code"/>
+        <result property="subordinateUnit" column="subordinate_unit"/>
+        <result property="quantity" column="quantity"/>
+        <result property="warehouseNo" column="warehouse_no"/>
+        <result property="regionNo" column="region_no"/>
+        <result property="remark" column="remark"/>
+        <result property="createById" column="create_by_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateById" column="update_by_id"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="taskProcessKey" column="task_process_key"/>
+        <result property="taskNodeKey" column="task_node_key"/>
+        <result property="materielName" column="materiel_name"/>
+    </resultMap>
+
+    <sql id="selectMaterialInventoryVo">
+        select id,
+               stock_number,
+               warehouse_entry_number,
+               material_code,
+               subordinate_unit,
+               quantity,
+               warehouse_no,
+               region_no,
+               remark,
+               create_by_id,
+               create_by,
+               create_time,
+               update_by_id,
+               update_by,
+               update_time,
+               del_flag,
+               task_process_key,
+               task_node_key
+        from {DBNAME}.material_inventory
+    </sql>
+
+    <select id="selectMaterialInventoryList" parameterType="com.zkqy.business.domain.MaterialInventory"
+            resultMap="MaterialInventoryResult">
+        <include refid="selectMaterialInventoryVo"/>
+        <where>
+            <if test="stockNumber != null  and stockNumber != ''">and stock_number = #{stockNumber}</if>
+            <if test="warehouseEntryNumber != null  and warehouseEntryNumber != ''">and warehouse_entry_number =
+                #{warehouseEntryNumber}
+            </if>
+            <if test="materialCode != null  and materialCode != ''">and material_code = #{materialCode}</if>
+            <if test="subordinateUnit != null ">and subordinate_unit = #{subordinateUnit}</if>
+            <if test="quantity != null ">and quantity = #{quantity}</if>
+            <if test="warehouseNo != null  and warehouseNo != ''">and warehouse_no = #{warehouseNo}</if>
+            <if test="regionNo != null  and regionNo != ''">and region_no = #{regionNo}</if>
+            <if test="createById != null ">and create_by_id = #{createById}</if>
+            <if test="updateById != null ">and update_by_id = #{updateById}</if>
+            <if test="taskProcessKey != null  and taskProcessKey != ''">and task_process_key = #{taskProcessKey}</if>
+            <if test="taskNodeKey != null  and taskNodeKey != ''">and task_node_key = #{taskNodeKey}</if>
+        </where>
+    </select>
+
+
+    <select id="selectMaterialInventoryById" parameterType="Long" resultMap="MaterialInventoryResult">
+        <include refid="selectMaterialInventoryVo"/>
+        where id = #{id}
+    </select>
+
+    <select id="selectMaterialInventoryByMaterialCodeAndSpecifications"
+            resultMap="MaterialInventoryResultTwo">
+        select mi.id                     as id,
+               mi.stock_number           as stock_number,
+               mi.warehouse_entry_number as warehouse_entry_number,
+               mi.material_code          as material_code,
+               mi.subordinate_unit       as subordinate_unit,
+               mi.quantity               as quantity,
+               mi.warehouse_no           as warehouse_no,
+               mi.region_no              as region_no,
+               mi.remark                 as remark,
+               mi.create_by_id           as create_by_id,
+               mi.create_by              as create_by,
+               mi.create_time            as create_time,
+               mi.update_by_id           as update_by_id,
+               mi.update_by              as update_by,
+               mi.update_time            as update_time,
+               mi.del_flag               as del_flag,
+               mi.task_process_key       as task_process_key,
+               mi.task_node_key          as task_node_key
+        from {DBNAME}.material_inventory as mi
+               left join
+               material as m
+        on (m.materiel_code=mi.code)
+        where m.materiel_code=#{materialCode}
+          and m.specification_model=#{specifications}
+    </select>
+
+    <insert id="insertMaterialInventory" parameterType="com.zkqy.business.domain.MaterialInventory"
+            useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.material_inventory
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="stockNumber != null">stock_number,</if>
+            <if test="warehouseEntryNumber != null">warehouse_entry_number,</if>
+            <if test="materialCode != null">material_code,</if>
+            <if test="subordinateUnit != null">subordinate_unit,</if>
+            <if test="quantity != null">quantity,</if>
+            <if test="warehouseNo != null">warehouse_no,</if>
+            <if test="regionNo != null">region_no,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="stockNumber != null">#{stockNumber},</if>
+            <if test="warehouseEntryNumber != null">#{warehouseEntryNumber},</if>
+            <if test="materialCode != null">#{materialCode},</if>
+            <if test="subordinateUnit != null">#{subordinateUnit},</if>
+            <if test="quantity != null">#{quantity},</if>
+            <if test="warehouseNo != null">#{warehouseNo},</if>
+            <if test="regionNo != null">#{regionNo},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+        </trim>
+    </insert>
+
+    <update id="updateMaterialInventory" parameterType="com.zkqy.business.domain.MaterialInventory">
+        update {DBNAME}.material_inventory
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="stockNumber != null">stock_number = #{stockNumber},</if>
+            <if test="warehouseEntryNumber != null">warehouse_entry_number = #{warehouseEntryNumber},</if>
+            <if test="materialCode != null">material_code = #{materialCode},</if>
+            <if test="subordinateUnit != null">subordinate_unit = #{subordinateUnit},</if>
+            <if test="quantity != null">quantity = #{quantity},</if>
+            <if test="warehouseNo != null">warehouse_no = #{warehouseNo},</if>
+            <if test="regionNo != null">region_no = #{regionNo},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteMaterialInventoryById" parameterType="Long">
+        delete
+        from {DBNAME}.material_inventory
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteMaterialInventoryByIds" parameterType="String">
+        delete from {DBNAME}.material_inventory where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 149 - 0
zkqy-custom-business/src/main/resources/mapper/MaterielMapper.xml

@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.zkqy.business.mapper.MaterielMapper">
+    
+    <resultMap type="com.zkqy.business.domain.Materiel" id="MaterielResult">
+        <result property="id"    column="id"    />
+        <result property="materielCode"    column="materiel_code"    />
+        <result property="materielName"    column="materiel_name"    />
+        <result property="materielAsname"    column="materiel_asname"    />
+        <result property="subordinateDepartmen"    column="subordinate_departmen"    />
+        <result property="materielSpecies"    column="materiel_species"    />
+        <result property="materielUse"    column="materiel_use"    />
+        <result property="units"    column="units"    />
+        <result property="specificationModel"    column="specification_model"    />
+        <result property="status"    column="status"    />
+        <result property="dataApprovalStatus"    column="data_approval_status"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+    </resultMap>
+
+    <sql id="selectMaterielVo">
+        select id, materiel_code, materiel_name, materiel_asname, subordinate_departmen, materiel_species, materiel_use, units, specification_model, status, data_approval_status, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, task_process_key, task_node_key from materiel
+    </sql>
+
+    <select id="selectMaterielList" parameterType="com.zkqy.business.domain.Materiel" resultMap="MaterielResult">
+        <include refid="selectMaterielVo"/>
+        <where>  
+            <if test="materielCode != null  and materielCode != ''"> and materiel_code = #{materielCode}</if>
+            <if test="materielName != null  and materielName != ''"> and materiel_name like concat('%', #{materielName}, '%')</if>
+            <if test="materielAsname != null  and materielAsname != ''"> and materiel_asname like concat('%', #{materielAsname}, '%')</if>
+            <if test="subordinateDepartmen != null "> and subordinate_departmen = #{subordinateDepartmen}</if>
+            <if test="materielSpecies != null  and materielSpecies != ''"> and materiel_species = #{materielSpecies}</if>
+            <if test="materielUse != null  and materielUse != ''"> and materiel_use = #{materielUse}</if>
+            <if test="units != null  and units != ''"> and units = #{units}</if>
+            <if test="specificationModel != null  and specificationModel != ''"> and specification_model = #{specificationModel}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="dataApprovalStatus != null  and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="taskProcessKey != null  and taskProcessKey != ''"> and task_process_key = #{taskProcessKey}</if>
+            <if test="taskNodeKey != null  and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
+        </where>
+    </select>
+    
+    <select id="selectMaterielById" parameterType="Long" resultMap="MaterielResult">
+        <include refid="selectMaterielVo"/>
+        where id = #{id}
+    </select>
+    <select id="selectMaterielByMaterielCode" resultType="com.zkqy.business.domain.Materiel">
+        <include refid="selectMaterielVo"/>
+        where materiel_code = #{materielCode}
+    </select>
+
+    <insert id="insertMateriel" parameterType="com.zkqy.business.domain.Materiel" useGeneratedKeys="true" keyProperty="id">
+        insert into materiel
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="materielCode != null">materiel_code,</if>
+            <if test="materielName != null">materiel_name,</if>
+            <if test="materielAsname != null">materiel_asname,</if>
+            <if test="subordinateDepartmen != null">subordinate_departmen,</if>
+            <if test="materielSpecies != null">materiel_species,</if>
+            <if test="materielUse != null">materiel_use,</if>
+            <if test="units != null">units,</if>
+            <if test="specificationModel != null">specification_model,</if>
+            <if test="status != null">status,</if>
+            <if test="dataApprovalStatus != null">data_approval_status,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="materielCode != null">#{materielCode},</if>
+            <if test="materielName != null">#{materielName},</if>
+            <if test="materielAsname != null">#{materielAsname},</if>
+            <if test="subordinateDepartmen != null">#{subordinateDepartmen},</if>
+            <if test="materielSpecies != null">#{materielSpecies},</if>
+            <if test="materielUse != null">#{materielUse},</if>
+            <if test="units != null">#{units},</if>
+            <if test="specificationModel != null">#{specificationModel},</if>
+            <if test="status != null">#{status},</if>
+            <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+         </trim>
+    </insert>
+
+    <update id="updateMateriel" parameterType="com.zkqy.business.domain.Materiel">
+        update materiel
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="materielCode != null">materiel_code = #{materielCode},</if>
+            <if test="materielName != null">materiel_name = #{materielName},</if>
+            <if test="materielAsname != null">materiel_asname = #{materielAsname},</if>
+            <if test="subordinateDepartmen != null">subordinate_departmen = #{subordinateDepartmen},</if>
+            <if test="materielSpecies != null">materiel_species = #{materielSpecies},</if>
+            <if test="materielUse != null">materiel_use = #{materielUse},</if>
+            <if test="units != null">units = #{units},</if>
+            <if test="specificationModel != null">specification_model = #{specificationModel},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteMaterielById" parameterType="Long">
+        delete from materiel where id = #{id}
+    </delete>
+
+    <delete id="deleteMaterielByIds" parameterType="String">
+        delete from materiel where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 174 - 0
zkqy-custom-business/src/main/resources/mapper/OutboundRecordsMapper.xml

@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.zkqy.business.mapper.OutboundRecordsMapper">
+    
+    <resultMap type="com.zkqy.business.domain.OutboundRecords" id="OutboundRecordsResult">
+        <result property="id"    column="id"    />
+        <result property="outboundNo"    column="outbound_no"    />
+        <result property="outboundUnitName"    column="outbound_unit_name"    />
+        <result property="outboundType"    column="outbound_type"    />
+        <result property="outboundTime"    column="outbound_time"    />
+        <result property="outboundAterialsName"    column="outbound_aterials_name"    />
+        <result property="specifications"    column="specifications"    />
+        <result property="outboundUnit"    column="outbound_unit"    />
+        <result property="outboundQuantity"    column="outbound_quantity"    />
+        <result property="outboundUnitPrice"    column="outbound_unit_price"    />
+        <result property="outboundAmounts"    column="outbound_amounts"    />
+        <result property="outboundNotes"    column="outbound_notes"    />
+        <result property="outboundLeader"    column="outbound_leader"    />
+        <result property="warehouseNo"    column="warehouse_no"    />
+        <result property="accounting"    column="accounting"    />
+        <result property="handledBy"    column="handled_by"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+    </resultMap>
+
+    <sql id="selectOutboundRecordsVo">
+        select id, outbound_no, outbound_unit_name, outbound_type, outbound_time, outbound_aterials_name, specifications, outbound_unit, outbound_quantity, outbound_unit_price, outbound_amounts, outbound_notes, outbound_leader, warehouse_no, accounting, handled_by, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, task_process_key, task_node_key from outbound_records
+    </sql>
+
+    <select id="selectOutboundRecordsList" parameterType="com.zkqy.business.domain.OutboundRecords" resultMap="OutboundRecordsResult">
+        <include refid="selectOutboundRecordsVo"/>
+        <where>  
+            <if test="outboundNo != null  and outboundNo != ''"> and outbound_no = #{outboundNo}</if>
+            <if test="outboundUnitName != null  and outboundUnitName != ''"> and outbound_unit_name like concat('%', #{outboundUnitName}, '%')</if>
+            <if test="outboundType != null  and outboundType != ''"> and outbound_type = #{outboundType}</if>
+            <if test="outboundTime != null "> and outbound_time = #{outboundTime}</if>
+            <if test="outboundAterialsName != null  and outboundAterialsName != ''"> and outbound_aterials_name like concat('%', #{outboundAterialsName}, '%')</if>
+            <if test="specifications != null  and specifications != ''"> and specifications = #{specifications}</if>
+            <if test="outboundUnit != null  and outboundUnit != ''"> and outbound_unit = #{outboundUnit}</if>
+            <if test="outboundQuantity != null  and outboundQuantity != ''"> and outbound_quantity = #{outboundQuantity}</if>
+            <if test="outboundUnitPrice != null  and outboundUnitPrice != ''"> and outbound_unit_price = #{outboundUnitPrice}</if>
+            <if test="outboundAmounts != null  and outboundAmounts != ''"> and outbound_amounts = #{outboundAmounts}</if>
+            <if test="outboundNotes != null  and outboundNotes != ''"> and outbound_notes = #{outboundNotes}</if>
+            <if test="outboundLeader != null  and outboundLeader != ''"> and outbound_leader = #{outboundLeader}</if>
+            <if test="warehouseNo != null  and warehouseNo != ''"> and warehouse_no = #{warehouseNo}</if>
+            <if test="accounting != null  and accounting != ''"> and accounting = #{accounting}</if>
+            <if test="handledBy != null  and handledBy != ''"> and handled_by = #{handledBy}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="taskProcessKey != null  and taskProcessKey != ''"> and task_process_key = #{taskProcessKey}</if>
+            <if test="taskNodeKey != null  and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
+        </where>
+    </select>
+    
+    <select id="selectOutboundRecordsById" parameterType="Long" resultMap="OutboundRecordsResult">
+        <include refid="selectOutboundRecordsVo"/>
+        where id = #{id}
+    </select>
+    <select id="selectOutboundRecordsByQtCodeNumber" resultType="com.zkqy.business.domain.OutboundRecords">
+        <include refid="selectOutboundRecordsVo"/>
+        where qtCodeNumber = #{qtCodeNumber}
+    </select>
+
+    <insert id="insertOutboundRecords" parameterType="com.zkqy.business.domain.OutboundRecords" useGeneratedKeys="true" keyProperty="id">
+        insert into outbound_records
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="outboundNo != null">outbound_no,</if>
+            <if test="outboundUnitName != null">outbound_unit_name,</if>
+            <if test="outboundType != null">outbound_type,</if>
+            <if test="outboundTime != null">outbound_time,</if>
+            <if test="outboundAterialsName != null">outbound_aterials_name,</if>
+            <if test="specifications != null">specifications,</if>
+            <if test="outboundUnit != null">outbound_unit,</if>
+            <if test="outboundQuantity != null">outbound_quantity,</if>
+            <if test="outboundUnitPrice != null">outbound_unit_price,</if>
+            <if test="outboundAmounts != null">outbound_amounts,</if>
+            <if test="outboundNotes != null">outbound_notes,</if>
+            <if test="outboundLeader != null">outbound_leader,</if>
+            <if test="warehouseNo != null">warehouse_no,</if>
+            <if test="accounting != null">accounting,</if>
+            <if test="handledBy != null">handled_by,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="outboundNo != null">#{outboundNo},</if>
+            <if test="outboundUnitName != null">#{outboundUnitName},</if>
+            <if test="outboundType != null">#{outboundType},</if>
+            <if test="outboundTime != null">#{outboundTime},</if>
+            <if test="outboundAterialsName != null">#{outboundAterialsName},</if>
+            <if test="specifications != null">#{specifications},</if>
+            <if test="outboundUnit != null">#{outboundUnit},</if>
+            <if test="outboundQuantity != null">#{outboundQuantity},</if>
+            <if test="outboundUnitPrice != null">#{outboundUnitPrice},</if>
+            <if test="outboundAmounts != null">#{outboundAmounts},</if>
+            <if test="outboundNotes != null">#{outboundNotes},</if>
+            <if test="outboundLeader != null">#{outboundLeader},</if>
+            <if test="warehouseNo != null">#{warehouseNo},</if>
+            <if test="accounting != null">#{accounting},</if>
+            <if test="handledBy != null">#{handledBy},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+         </trim>
+    </insert>
+
+    <update id="updateOutboundRecords" parameterType="com.zkqy.business.domain.OutboundRecords">
+        update outbound_records
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="outboundNo != null">outbound_no = #{outboundNo},</if>
+            <if test="outboundUnitName != null">outbound_unit_name = #{outboundUnitName},</if>
+            <if test="outboundType != null">outbound_type = #{outboundType},</if>
+            <if test="outboundTime != null">outbound_time = #{outboundTime},</if>
+            <if test="outboundAterialsName != null">outbound_aterials_name = #{outboundAterialsName},</if>
+            <if test="specifications != null">specifications = #{specifications},</if>
+            <if test="outboundUnit != null">outbound_unit = #{outboundUnit},</if>
+            <if test="outboundQuantity != null">outbound_quantity = #{outboundQuantity},</if>
+            <if test="outboundUnitPrice != null">outbound_unit_price = #{outboundUnitPrice},</if>
+            <if test="outboundAmounts != null">outbound_amounts = #{outboundAmounts},</if>
+            <if test="outboundNotes != null">outbound_notes = #{outboundNotes},</if>
+            <if test="outboundLeader != null">outbound_leader = #{outboundLeader},</if>
+            <if test="warehouseNo != null">warehouse_no = #{warehouseNo},</if>
+            <if test="accounting != null">accounting = #{accounting},</if>
+            <if test="handledBy != null">handled_by = #{handledBy},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteOutboundRecordsById" parameterType="Long">
+        delete from outbound_records where id = #{id}
+    </delete>
+
+    <delete id="deleteOutboundRecordsByIds" parameterType="String">
+        delete from outbound_records where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 5 - 3
zkqy-framework/src/main/java/com/zkqy/framework/web/service/SysLoginService.java

@@ -72,9 +72,11 @@ public class SysLoginService {
      * @param uuid     唯一标识
      * @return 结果
      */
-    public String login(String username, String password, String code, String uuid) {
-        //验证码校验
-        validateCaptcha(username, code, uuid);
+    public String login(String username, String password, String code, String uuid,Boolean isValidateCaptcha) {
+       if(isValidateCaptcha){
+           //验证码校验
+           validateCaptcha(username, code, uuid);
+       }
         //登录前置校验
         loginPreCheck(username, password);
 

+ 14 - 8
zkqy-ui/src/views/orderMange/purchase/index.vue

@@ -508,7 +508,10 @@ export default {
   methods: {
     // 打印
     async toPrint() {
-      let { purchaseMaterielId, purchaseSerialNumber } = this.printRow;
+      //
+      console.log(this.printRow)
+      //母粒编号 采购单编号  单位
+      let { purchaseMaterielId, purchaseSerialNumber,purchaseUnits,purchaseQuantity,purchaseSpecification } = this.printRow;
       let printData = {};
       let payLoad = {
         isEnablePaging: false,
@@ -525,9 +528,10 @@ export default {
         let data = res.rows[0]?.resultMap;
         printData.serialNumber = purchaseSerialNumber;
         printData.materielId = purchaseMaterielId;
-        printData.materielName = data?.materielName;
-        printData.units = data?.units;
-        printData.specificationModel = data?.specificationModel;
+        // printData.materielName = data?.materielName;//母粒名称
+        printData.units = purchaseUnits;
+        printData.specificationModel = purchaseSpecification;
+        printData.quantity=purchaseQuantity
         // printData.dictLabel = labelRes.msg;
       }
       this.$refs.printFormRef.validate((valid) => {
@@ -541,13 +545,15 @@ export default {
                 "@" +
                 printData.materielId +
                 "@" +
-                printData.materielName +
-                "@" +
                 printData.units +
                 "@" +
+                printData.quantity +
+                "@" +
                 printData.specificationModel +
                 "@" +
-                (i + 1),
+                (i + 1)+
+                "@"+
+                new Date().getTime(),
               showMsg: [
                 {
                   label: "编号",
@@ -1930,7 +1936,7 @@ export default {
           this.handleDelete(row, btnData);
           break;
         case "print":
-          this.printHandler(1, scope.row);
+          this.printHandler(1, row);
           break;
         default:
           break;