Ver código fonte

收款登记、收款登记审核、应收明细、待办明细审核、发票登记、其他收款、其他收款审批功能接口

xuezizhuo 11 meses atrás
pai
commit
c0a0d20847
52 arquivos alterados com 5925 adições e 85 exclusões
  1. 113 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/CustomerSettlementUnitController.java
  2. 115 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/FinishedProductInvoiceController.java
  3. 113 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/ProductOutboundRecordBatchController.java
  4. 158 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/SaleAccountsReceivableDetailController.java
  5. 15 1
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/SaleOrderController.java
  6. 123 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/SaleOtherCollectionController.java
  7. 127 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/SaleRegistrationCollectionController.java
  8. 34 25
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/Customer.java
  9. 123 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/CustomerSettlementUnit.java
  10. 226 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/FinishedProductInvoice.java
  11. 121 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/ProductOutboundRecordBatch.java
  12. 590 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/SaleAccountsReceivableDetail.java
  13. 307 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/SaleOtherCollection.java
  14. 215 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/SaleRegistrationCollection.java
  15. 260 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/FinishedProductInvoiceVo.java
  16. 78 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/SaleProductsVo.java
  17. 216 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/SaleRegistrationCollectionVo.java
  18. 61 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/CustomerSettlementUnitMapper.java
  19. 79 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/FinishedProductInvoiceMapper.java
  20. 73 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductOutboundRecordBatchMapper.java
  21. 6 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductOutboundRecordMapper.java
  22. 78 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/SaleAccountsReceivableDetailMapper.java
  23. 20 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/SaleOrderMapper.java
  24. 61 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/SaleOtherCollectionMapper.java
  25. 69 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/SaleRegistrationCollectionMapper.java
  26. 61 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/ICustomerSettlementUnitService.java
  27. 71 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IFinishedProductInvoiceService.java
  28. 61 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IProductOutboundRecordBatchService.java
  29. 90 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/ISaleAccountsReceivableDetailService.java
  30. 11 3
      zkqy-custom-business/src/main/java/com/zkqy/business/service/ISaleOrderService.java
  31. 68 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/ISaleOtherCollectionService.java
  32. 75 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/ISaleRegistrationCollectionService.java
  33. 101 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/CustomerSettlementUnitServiceImpl.java
  34. 103 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/FinishedProductInvoiceServiceImpl.java
  35. 15 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductInventoryServiceImpl.java
  36. 1 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductInvoiceServiceImpl.java
  37. 95 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductOutboundRecordBatchServiceImpl.java
  38. 250 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleAccountsReceivableDetailServiceImpl.java
  39. 87 8
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleOrderServiceImpl.java
  40. 157 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleOtherCollectionServiceImpl.java
  41. 166 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleRegistrationCollectionServiceImpl.java
  42. 7 1
      zkqy-custom-business/src/main/resources/mapper/business/CustomerMapper.xml
  43. 87 0
      zkqy-custom-business/src/main/resources/mapper/business/CustomerSettlementUnitMapper.xml
  44. 216 0
      zkqy-custom-business/src/main/resources/mapper/business/FinishedProductInvoiceMapper.xml
  45. 122 0
      zkqy-custom-business/src/main/resources/mapper/business/ProductOutboundRecordBatchMapper.xml
  46. 16 2
      zkqy-custom-business/src/main/resources/mapper/business/ProductOutboundRecordMapper.xml
  47. 311 0
      zkqy-custom-business/src/main/resources/mapper/business/SaleAccountsReceivableDetailMapper.xml
  48. 46 0
      zkqy-custom-business/src/main/resources/mapper/business/SaleOrderMapper.xml
  49. 150 0
      zkqy-custom-business/src/main/resources/mapper/business/SaleOtherCollectionMapper.xml
  50. 131 0
      zkqy-custom-business/src/main/resources/mapper/business/SaleRegistrationCollectionMapper.xml
  51. 40 40
      zkqy-ui/src/views/orderMange/order/processingOrder.vue
  52. 6 5
      zkqy-ui/src/views/orderMange/retailMange/index.vue

+ 113 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/CustomerSettlementUnitController.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.CustomerSettlementUnit;
+import com.zkqy.business.service.ICustomerSettlementUnitService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 客户结算单位Controller
+ *
+ * @author zkqy
+ * @date 2024-06-27
+ */
+@RestController
+@RequestMapping("/system/CustomerSettlementUnit")
+@Api(value = "/system/CustomerSettlementUnit", description = "客户结算单位-接口")
+public class CustomerSettlementUnitController extends BaseController
+{
+    @Autowired
+    private ICustomerSettlementUnitService customerSettlementUnitService;
+
+    /**
+     * 查询客户结算单位列表
+     */
+    //@PreAuthorize("@ss.hasPermi('system:CustomerSettlementUnit:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询客户结算单位列表")
+    public TableDataInfo list(CustomerSettlementUnit customerSettlementUnit)
+    {
+        startPage();
+        List<CustomerSettlementUnit> list = customerSettlementUnitService.selectCustomerSettlementUnitList(customerSettlementUnit);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出客户结算单位列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:CustomerSettlementUnit:export')")
+    @Log(title = "客户结算单位", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出客户结算单位列表")
+    public void export(HttpServletResponse response, CustomerSettlementUnit customerSettlementUnit)
+    {
+        List<CustomerSettlementUnit> list = customerSettlementUnitService.selectCustomerSettlementUnitList(customerSettlementUnit);
+        ExcelUtil<CustomerSettlementUnit> util = new ExcelUtil<CustomerSettlementUnit>(CustomerSettlementUnit.class);
+        util.exportExcel(response, list, "客户结算单位数据");
+    }
+
+    /**
+     * 获取客户结算单位详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:CustomerSettlementUnit:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取客户结算单位详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(customerSettlementUnitService.selectCustomerSettlementUnitById(id));
+    }
+
+    /**
+     * 新增客户结算单位
+     */
+    @PreAuthorize("@ss.hasPermi('system:CustomerSettlementUnit:add')")
+    @Log(title = "客户结算单位", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增客户结算单位")
+    public AjaxResult add(@RequestBody CustomerSettlementUnit customerSettlementUnit)
+    {
+        return toAjax(customerSettlementUnitService.insertCustomerSettlementUnit(customerSettlementUnit));
+    }
+
+    /**
+     * 修改客户结算单位
+     */
+    @PreAuthorize("@ss.hasPermi('system:CustomerSettlementUnit:edit')")
+    @Log(title = "客户结算单位", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改客户结算单位")
+    public AjaxResult edit(@RequestBody CustomerSettlementUnit customerSettlementUnit)
+    {
+        return toAjax(customerSettlementUnitService.updateCustomerSettlementUnit(customerSettlementUnit));
+    }
+
+    /**
+     * 删除客户结算单位
+     */
+    @PreAuthorize("@ss.hasPermi('system:CustomerSettlementUnit:remove')")
+    @Log(title = "客户结算单位", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除客户结算单位")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(customerSettlementUnitService.deleteCustomerSettlementUnitByIds(ids));
+    }
+}

+ 115 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/FinishedProductInvoiceController.java

@@ -0,0 +1,115 @@
+package com.zkqy.business.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.business.domain.vo.FinishedProductInvoiceVo;
+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.FinishedProductInvoice;
+import com.zkqy.business.service.IFinishedProductInvoiceService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 成品发票Controller
+ *
+ * @author zkqy
+ * @date 2024-07-01
+ */
+@RestController
+@RequestMapping("/system/FinishedProductInvoice")
+@Api(value = "/system/FinishedProductInvoice", description = "成品发票-接口")
+public class FinishedProductInvoiceController extends BaseController
+{
+    @Autowired
+    private IFinishedProductInvoiceService finishedProductInvoiceService;
+
+/**
+ * 查询成品发票列表
+ */
+//@PreAuthorize("@ss.hasPermi('system:FinishedProductInvoice:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询成品发票列表")
+    public TableDataInfo list(FinishedProductInvoice finishedProductInvoice)
+    {
+        startPage();
+        List<FinishedProductInvoiceVo> list = finishedProductInvoiceService.selectFinishedProductInvoiceList1(finishedProductInvoice);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出成品发票列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:FinishedProductInvoice:export')")
+    @Log(title = "成品发票", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出成品发票列表")
+    public void export(HttpServletResponse response, FinishedProductInvoice finishedProductInvoice)
+    {
+        List<FinishedProductInvoice> list = finishedProductInvoiceService.selectFinishedProductInvoiceList(finishedProductInvoice);
+        ExcelUtil<FinishedProductInvoice> util = new ExcelUtil<FinishedProductInvoice>(FinishedProductInvoice.class);
+        util.exportExcel(response, list, "成品发票数据");
+    }
+
+    /**
+     * 获取成品发票详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:FinishedProductInvoice:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取成品发票详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(finishedProductInvoiceService.selectFinishedProductInvoiceById(id));
+    }
+
+    /**
+     * 新增成品发票
+     */
+    @PreAuthorize("@ss.hasPermi('system:FinishedProductInvoice:add')")
+    @Log(title = "成品发票", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增成品发票")
+    public AjaxResult add(@RequestBody FinishedProductInvoice finishedProductInvoice)
+    {
+        return toAjax(finishedProductInvoiceService.insertFinishedProductInvoice(finishedProductInvoice));
+    }
+
+    /**
+     * 修改成品发票
+     */
+    @PreAuthorize("@ss.hasPermi('system:FinishedProductInvoice:edit')")
+    @Log(title = "成品发票", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改成品发票")
+    public AjaxResult edit(@RequestBody FinishedProductInvoice finishedProductInvoice)
+    {
+        return toAjax(finishedProductInvoiceService.updateFinishedProductInvoice(finishedProductInvoice));
+    }
+
+    /**
+     * 删除成品发票
+     */
+    @PreAuthorize("@ss.hasPermi('system:FinishedProductInvoice:remove')")
+    @Log(title = "成品发票", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除成品发票")
+    public AjaxResult remove(@PathVariable List<Long> ids)
+    {
+        return toAjax(finishedProductInvoiceService.deleteFinishedProductInvoiceByIds(ids));
+    }
+}

+ 113 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/ProductOutboundRecordBatchController.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.ProductOutboundRecordBatch;
+import com.zkqy.business.service.IProductOutboundRecordBatchService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 成品出库记录批次Controller
+ *
+ * @author zkqy
+ * @date 2024-06-28
+ */
+@RestController
+@RequestMapping("/system/ProductOutboundRecordBatch")
+@Api(value = "/system/ProductOutboundRecordBatch", description = "成品出库记录批次-接口")
+public class ProductOutboundRecordBatchController extends BaseController
+{
+    @Autowired
+    private IProductOutboundRecordBatchService productOutboundRecordBatchService;
+
+/**
+ * 查询成品出库记录批次列表
+ */
+//@PreAuthorize("@ss.hasPermi('system:ProductOutboundRecordBatch:list')")
+@GetMapping("/list")
+@ApiOperation(value = "查询成品出库记录批次列表")
+    public TableDataInfo list(ProductOutboundRecordBatch productOutboundRecordBatch)
+    {
+        startPage();
+        List<ProductOutboundRecordBatch> list = productOutboundRecordBatchService.selectProductOutboundRecordBatchList(productOutboundRecordBatch);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出成品出库记录批次列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:ProductOutboundRecordBatch:export')")
+    @Log(title = "成品出库记录批次", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出成品出库记录批次列表")
+    public void export(HttpServletResponse response, ProductOutboundRecordBatch productOutboundRecordBatch)
+    {
+        List<ProductOutboundRecordBatch> list = productOutboundRecordBatchService.selectProductOutboundRecordBatchList(productOutboundRecordBatch);
+        ExcelUtil<ProductOutboundRecordBatch> util = new ExcelUtil<ProductOutboundRecordBatch>(ProductOutboundRecordBatch.class);
+        util.exportExcel(response, list, "成品出库记录批次数据");
+    }
+
+    /**
+     * 获取成品出库记录批次详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:ProductOutboundRecordBatch:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取成品出库记录批次详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(productOutboundRecordBatchService.selectProductOutboundRecordBatchById(id));
+    }
+
+    /**
+     * 新增成品出库记录批次
+     */
+    @PreAuthorize("@ss.hasPermi('system:ProductOutboundRecordBatch:add')")
+    @Log(title = "成品出库记录批次", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增成品出库记录批次")
+    public AjaxResult add(@RequestBody ProductOutboundRecordBatch productOutboundRecordBatch)
+    {
+        return toAjax(productOutboundRecordBatchService.insertProductOutboundRecordBatch(productOutboundRecordBatch));
+    }
+
+    /**
+     * 修改成品出库记录批次
+     */
+    @PreAuthorize("@ss.hasPermi('system:ProductOutboundRecordBatch:edit')")
+    @Log(title = "成品出库记录批次", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改成品出库记录批次")
+    public AjaxResult edit(@RequestBody ProductOutboundRecordBatch productOutboundRecordBatch)
+    {
+        return toAjax(productOutboundRecordBatchService.updateProductOutboundRecordBatch(productOutboundRecordBatch));
+    }
+
+    /**
+     * 删除成品出库记录批次
+     */
+    @PreAuthorize("@ss.hasPermi('system:ProductOutboundRecordBatch:remove')")
+    @Log(title = "成品出库记录批次", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除成品出库记录批次")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(productOutboundRecordBatchService.deleteProductOutboundRecordBatchByIds(ids));
+    }
+}

+ 158 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/SaleAccountsReceivableDetailController.java

@@ -0,0 +1,158 @@
+package com.zkqy.business.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.business.domain.vo.FinishedProductInvoiceVo;
+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.SaleAccountsReceivableDetail;
+import com.zkqy.business.service.ISaleAccountsReceivableDetailService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 应收帐明细Controller
+ *
+ * @author zkqy
+ * @date 2024-06-27
+ */
+@RestController
+@RequestMapping("/system/SaleAccountsReceivableDetail")
+@Api(value = "/system/SaleAccountsReceivableDetail", description = "应收帐明细-接口")
+public class SaleAccountsReceivableDetailController extends BaseController
+{
+    @Autowired
+    private ISaleAccountsReceivableDetailService saleAccountsReceivableDetailService;
+
+    /**
+     * 查询应收帐明细列表
+     */
+    //@PreAuthorize("@ss.hasPermi('system:SaleAccountsReceivableDetail:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询应收帐明细列表")
+    public TableDataInfo list(SaleAccountsReceivableDetail saleAccountsReceivableDetail)
+    {
+        startPage();
+        List<SaleAccountsReceivableDetail> list = saleAccountsReceivableDetailService.selectSaleAccountsReceivableDetailList(saleAccountsReceivableDetail);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出应收帐明细列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleAccountsReceivableDetail:export')")
+    @Log(title = "应收帐明细", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出应收帐明细列表")
+    public void export(HttpServletResponse response, SaleAccountsReceivableDetail saleAccountsReceivableDetail)
+    {
+        List<SaleAccountsReceivableDetail> list = saleAccountsReceivableDetailService.selectSaleAccountsReceivableDetailList(saleAccountsReceivableDetail);
+        ExcelUtil<SaleAccountsReceivableDetail> util = new ExcelUtil<SaleAccountsReceivableDetail>(SaleAccountsReceivableDetail.class);
+        util.exportExcel(response, list, "应收帐明细数据");
+    }
+
+    /**
+     * 获取应收帐明细详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleAccountsReceivableDetail:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取应收帐明细详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(saleAccountsReceivableDetailService.selectSaleAccountsReceivableDetailById(id));
+    }
+
+    /**
+     * 新增应收帐明细
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleAccountsReceivableDetail:add')")
+    @Log(title = "应收帐明细", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增应收帐明细")
+    public AjaxResult add(@RequestBody SaleAccountsReceivableDetail saleAccountsReceivableDetail)
+    {
+        return toAjax(saleAccountsReceivableDetailService.insertSaleAccountsReceivableDetail(saleAccountsReceivableDetail));
+    }
+
+    /**
+     * 修改应收帐明细
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleAccountsReceivableDetail:edit')")
+    @Log(title = "应收帐明细", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改应收帐明细")
+    public AjaxResult edit(@RequestBody SaleAccountsReceivableDetail saleAccountsReceivableDetail)
+    {
+        return toAjax(saleAccountsReceivableDetailService.updateSaleAccountsReceivableDetail(saleAccountsReceivableDetail));
+    }
+
+    /**
+     * 删除应收帐明细
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleAccountsReceivableDetail:remove')")
+    @Log(title = "应收帐明细", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除应收帐明细")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(saleAccountsReceivableDetailService.deleteSaleAccountsReceivableDetailByIds(ids));
+    }
+
+    /**
+     * 回单接口
+     */
+    @PutMapping("/returnReceipt")
+    public AjaxResult returnReceipt(@RequestBody List<SaleAccountsReceivableDetail> saleAccountsReceivableDetailList){
+        return toAjax(saleAccountsReceivableDetailService.returnReceipt(saleAccountsReceivableDetailList));
+    }
+
+    /**
+     * 待办应收帐明细修改接口
+     */
+    @PutMapping("/editAccountsReceivableDetail")
+    public AjaxResult editAccountsReceivableDetail(@RequestBody SaleAccountsReceivableDetail saleAccountsReceivableDetail){
+        return toAjax(saleAccountsReceivableDetailService.editAccountsReceivableDetail(saleAccountsReceivableDetail));
+    }
+
+    /**
+     * 应收明细审核通过接口
+     */
+    @PostMapping("/reviewApproved")
+    public AjaxResult reviewApproved(@RequestBody SaleAccountsReceivableDetail saleAccountsReceivableDetail){
+        return toAjax(saleAccountsReceivableDetailService.reviewApproved(saleAccountsReceivableDetail));
+    }
+
+    /**
+     * 开票接口
+     */
+    @PostMapping("/billing")
+    public AjaxResult billing(@RequestBody FinishedProductInvoiceVo vo){
+        return toAjax(saleAccountsReceivableDetailService.billing(vo));
+    }
+
+    /**
+     * 取消开票
+     */
+    @PostMapping("/cancelBilling")
+    public AjaxResult cancelBilling(@RequestBody FinishedProductInvoiceVo vo){
+        return toAjax(saleAccountsReceivableDetailService.cancelBilling(vo));
+    }
+
+
+
+}

+ 15 - 1
zkqy-custom-business/src/main/java/com/zkqy/business/controller/SaleOrderController.java

@@ -7,6 +7,7 @@ import java.util.Map;
 import javax.servlet.http.HttpServletResponse;
 
 import com.zkqy.business.domain.ProductInvoice;
+import com.zkqy.business.domain.SaleAccountsReceivableDetail;
 import com.zkqy.business.domain.SaleProducts;
 import com.zkqy.business.domain.vo.SaleOrderVO;
 import com.zkqy.business.domain.vo.SaleProductsVo;
@@ -266,8 +267,21 @@ public class SaleOrderController extends BaseController {
         return toAjax(saleOrderService.submitOutsourceOrder(id));
     }
 
+    /**
+     * 打印出库单列表
+     */
+    @GetMapping("/printOutsourceOrderList")
+    public AjaxResult printOutsourceOrderList(@RequestParam String saleNo){
+        return AjaxResult.success(saleOrderService.printOutsourceOrderList(saleNo));
+    }
 
-
+    /**
+     * 销售出库单打印接口
+     */
+    @PostMapping("/printOutsourceOrder")
+    public AjaxResult printOutsourceOrder(@RequestBody List<SaleAccountsReceivableDetail> saleAccountsReceivableDetailList){
+        return toAjax(saleOrderService.printOutsourceOrder(saleAccountsReceivableDetailList));
+    }
 
 
 

+ 123 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/SaleOtherCollectionController.java

@@ -0,0 +1,123 @@
+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.SaleOtherCollection;
+import com.zkqy.business.service.ISaleOtherCollectionService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 其他收款Controller
+ *
+ * @author zkqy
+ * @date 2024-07-03
+ */
+@RestController
+@RequestMapping("/system/SaleOtherCollection")
+@Api(value = "/system/SaleOtherCollection", description = "其他收款-接口")
+public class SaleOtherCollectionController extends BaseController
+{
+    @Autowired
+    private ISaleOtherCollectionService saleOtherCollectionService;
+
+/**
+ * 查询其他收款列表
+ */
+//@PreAuthorize("@ss.hasPermi('system:SaleOtherCollection:list')")
+@GetMapping("/list")
+@ApiOperation(value = "查询其他收款列表")
+    public TableDataInfo list(SaleOtherCollection saleOtherCollection)
+    {
+        startPage();
+        List<SaleOtherCollection> list = saleOtherCollectionService.selectSaleOtherCollectionList(saleOtherCollection);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出其他收款列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleOtherCollection:export')")
+    @Log(title = "其他收款", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出其他收款列表")
+    public void export(HttpServletResponse response, SaleOtherCollection saleOtherCollection)
+    {
+        List<SaleOtherCollection> list = saleOtherCollectionService.selectSaleOtherCollectionList(saleOtherCollection);
+        ExcelUtil<SaleOtherCollection> util = new ExcelUtil<SaleOtherCollection>(SaleOtherCollection.class);
+        util.exportExcel(response, list, "其他收款数据");
+    }
+
+    /**
+     * 获取其他收款详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleOtherCollection:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取其他收款详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(saleOtherCollectionService.selectSaleOtherCollectionById(id));
+    }
+
+    /**
+     * 新增其他收款
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleOtherCollection:add')")
+    @Log(title = "其他收款", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增其他收款")
+    public AjaxResult add(@RequestBody SaleOtherCollection saleOtherCollection)
+    {
+        return toAjax(saleOtherCollectionService.insertSaleOtherCollection(saleOtherCollection));
+    }
+
+    /**
+     * 修改其他收款
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleOtherCollection:edit')")
+    @Log(title = "其他收款", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改其他收款")
+    public AjaxResult edit(@RequestBody SaleOtherCollection saleOtherCollection)
+    {
+        return toAjax(saleOtherCollectionService.updateSaleOtherCollection(saleOtherCollection));
+    }
+
+    /**
+     * 删除其他收款
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleOtherCollection:remove')")
+    @Log(title = "其他收款", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除其他收款")
+    public AjaxResult remove(@PathVariable List<Long> ids)
+    {
+        return toAjax(saleOtherCollectionService.deleteSaleOtherCollectionByIds(ids));
+    }
+
+    /**
+     * 审核
+     */
+    @PostMapping("/audit")
+    public AjaxResult audit(@RequestBody SaleOtherCollection saleOtherCollection)
+    {
+        return toAjax(saleOtherCollectionService.audit(saleOtherCollection));
+    }
+
+}

+ 127 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/SaleRegistrationCollectionController.java

@@ -0,0 +1,127 @@
+package com.zkqy.business.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.business.domain.vo.SaleRegistrationCollectionVo;
+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.SaleRegistrationCollection;
+import com.zkqy.business.service.ISaleRegistrationCollectionService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 收款登记Controller
+ *
+ * @author zkqy
+ * @date 2024-06-27
+ */
+@RestController
+@RequestMapping("/system/SaleRegistrationCollection")
+@Api(value = "/system/SaleRegistrationCollection", description = "收款登记-接口")
+public class SaleRegistrationCollectionController extends BaseController
+{
+    @Autowired
+    private ISaleRegistrationCollectionService saleRegistrationCollectionService;
+
+    /**
+     * 查询收款登记列表
+     */
+    //@PreAuthorize("@ss.hasPermi('system:SaleRegistrationCollection:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询收款登记列表")
+    public TableDataInfo list(SaleRegistrationCollection saleRegistrationCollection)
+    {
+        startPage();
+        List<SaleRegistrationCollectionVo> list = saleRegistrationCollectionService.selectRegistrationCollectionList(saleRegistrationCollection);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出收款登记列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleRegistrationCollection:export')")
+    @Log(title = "收款登记", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出收款登记列表")
+    public void export(HttpServletResponse response, SaleRegistrationCollection saleRegistrationCollection)
+    {
+        List<SaleRegistrationCollection> list = saleRegistrationCollectionService.selectSaleRegistrationCollectionList(saleRegistrationCollection);
+        ExcelUtil<SaleRegistrationCollection> util = new ExcelUtil<SaleRegistrationCollection>(SaleRegistrationCollection.class);
+        util.exportExcel(response, list, "收款登记数据");
+    }
+
+    /**
+     * 获取收款登记详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleRegistrationCollection:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取收款登记详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(saleRegistrationCollectionService.selectSaleRegistrationCollectionById(id));
+    }
+
+    /**
+     * 新增收款登记
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleRegistrationCollection:add')")
+    @Log(title = "收款登记", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增收款登记")
+    public AjaxResult add(@RequestBody SaleRegistrationCollection saleRegistrationCollection)
+    {
+        return toAjax(saleRegistrationCollectionService.insertSaleRegistrationCollection(saleRegistrationCollection));
+    }
+
+    /**
+     * 修改收款登记
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleRegistrationCollection:edit')")
+    @Log(title = "收款登记", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改收款登记")
+    public AjaxResult edit(@RequestBody SaleRegistrationCollection saleRegistrationCollection)
+    {
+        return toAjax(saleRegistrationCollectionService.updateSaleRegistrationCollection(saleRegistrationCollection));
+    }
+
+    /**
+     * 删除收款登记
+     */
+    @PreAuthorize("@ss.hasPermi('system:SaleRegistrationCollection:remove')")
+    @Log(title = "收款登记", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除收款登记")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(saleRegistrationCollectionService.deleteSaleRegistrationCollectionByIds(ids));
+    }
+
+    /**
+     * 审核通过接口
+     */
+    @PostMapping("/audit")
+    public AjaxResult audit(@RequestBody SaleRegistrationCollection saleRegistrationCollection){
+        return toAjax(saleRegistrationCollectionService.audit(saleRegistrationCollection));
+    }
+
+
+
+
+}

+ 34 - 25
zkqy-custom-business/src/main/java/com/zkqy/business/domain/Customer.java

@@ -86,6 +86,17 @@ public class Customer extends BaseEntity
     /** 累计欠款 */
     private Double amounts;
 
+    /** 累计欠款 */
+    private Double amount;
+
+    public Double getAmount() {
+        return amount;
+    }
+
+    public void setAmount(Double amount) {
+        this.amount = amount;
+    }
+
     public Double getAmounts() {
         return amounts;
     }
@@ -267,30 +278,28 @@ public class Customer extends BaseEntity
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("customNo", getCustomNo())
-            .append("customName", getCustomName())
-            .append("customPhoneNumber", getCustomPhoneNumber())
-            .append("customLandine", getCustomLandine())
-            .append("customMail", getCustomMail())
-            .append("customType", getCustomType())
-            .append("customGrade", getCustomGrade())
-            .append("customAddress", getCustomAddress())
-            .append("customCountryType", getCustomCountryType())
-            .append("customDistrict", getCustomDistrict())
-            .append("salesman", getSalesman())
-            .append("contactPerson", getContactPerson())
-            .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();
+        return "Customer{" +
+                "id=" + id +
+                ", customNo='" + customNo + '\'' +
+                ", customName='" + customName + '\'' +
+                ", customPhoneNumber='" + customPhoneNumber + '\'' +
+                ", customLandine='" + customLandine + '\'' +
+                ", customMail='" + customMail + '\'' +
+                ", customType='" + customType + '\'' +
+                ", customGrade='" + customGrade + '\'' +
+                ", customAddress='" + customAddress + '\'' +
+                ", customCountryType='" + customCountryType + '\'' +
+                ", customDistrict='" + customDistrict + '\'' +
+                ", salesman='" + salesman + '\'' +
+                ", contactPerson='" + contactPerson + '\'' +
+                ", createById=" + createById +
+                ", updateById=" + updateById +
+                ", delFlag='" + delFlag + '\'' +
+                ", taskProcessKey='" + taskProcessKey + '\'' +
+                ", taskNodeKey='" + taskNodeKey + '\'' +
+                ", queryParam='" + queryParam + '\'' +
+                ", amounts=" + amounts +
+                ", amount=" + amount +
+                '}';
     }
 }

+ 123 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/CustomerSettlementUnit.java

@@ -0,0 +1,123 @@
+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;
+
+/**
+ * 客户结算单位对象 customer_settlement_unit
+ * 
+ * @author zkqy
+ * @date 2024-06-27
+ */
+public class CustomerSettlementUnit extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    private Long id;
+
+    /** 客户编号 */
+    @Excel(name = "客户编号")
+    private Long customerId;
+
+    /** 客户名称 */
+    @Excel(name = "客户名称")
+    private String customerName;
+
+    /** 客户地区 */
+    @Excel(name = "客户地区")
+    private String customerRegion;
+
+    /** 创建者ID */
+    private Long createById;
+
+    /** 更新者ID */
+    private Long updateById;
+
+    /** 删除标志(0:否;2:是) */
+    private String delFlag;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setCustomerId(Long customerId) 
+    {
+        this.customerId = customerId;
+    }
+
+    public Long getCustomerId() 
+    {
+        return customerId;
+    }
+    public void setCustomerName(String customerName) 
+    {
+        this.customerName = customerName;
+    }
+
+    public String getCustomerName() 
+    {
+        return customerName;
+    }
+    public void setCustomerRegion(String customerRegion) 
+    {
+        this.customerRegion = customerRegion;
+    }
+
+    public String getCustomerRegion() 
+    {
+        return customerRegion;
+    }
+    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;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("customerId", getCustomerId())
+            .append("customerName", getCustomerName())
+            .append("customerRegion", getCustomerRegion())
+            .append("remark", getRemark())
+            .append("createBy", getCreateBy())
+            .append("createById", getCreateById())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateById", getUpdateById())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .toString();
+    }
+}

+ 226 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/FinishedProductInvoice.java

@@ -0,0 +1,226 @@
+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;
+
+/**
+ * 成品发票对象 finished_product_invoice
+ * 
+ * @author zkqy
+ * @date 2024-07-01
+ */
+public class FinishedProductInvoice extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    private Long id;
+
+    /** 发票日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "发票日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date invoiceDate;
+
+    /** 客户编号 */
+    @Excel(name = "客户编号")
+    private Long customerId;
+
+    /** 结算单位 */
+    @Excel(name = "结算单位")
+    private Long settlementUnitId;
+
+    /** 发票号 */
+    @Excel(name = "发票号")
+    private String invoiceNumber;
+
+    /** 发票类型 */
+    @Excel(name = "发票类型")
+    private String invoiceType;
+
+    /** 开票金额 */
+    @Excel(name = "开票金额")
+    private Long billingAmount;
+
+    /** 经手人 */
+    @Excel(name = "经手人")
+    private String personInCharge;
+
+    /** 应收明细编号 */
+    private Long accountsReceivableDetailId;
+
+    /** 开票标志(0:否;1:是) */
+    private String billingFlag;
+
+    /** 创建者ID */
+    private Long createById;
+
+    /** 更新者ID */
+    private Long updateById;
+
+    /** 删除标志(0:否;2:是) */
+    private String delFlag;
+
+    //开始时间
+    private Date startTime;
+
+    // 结束时间
+    private Date endTime;
+
+    public String getBillingFlag() {
+        return billingFlag;
+    }
+
+    public void setBillingFlag(String billingFlag) {
+        this.billingFlag = billingFlag;
+    }
+
+    public Long getAccountsReceivableDetailId() {
+        return accountsReceivableDetailId;
+    }
+
+    public void setAccountsReceivableDetailId(Long accountsReceivableDetailId) {
+        this.accountsReceivableDetailId = accountsReceivableDetailId;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setInvoiceDate(Date invoiceDate) 
+    {
+        this.invoiceDate = invoiceDate;
+    }
+
+    public Date getInvoiceDate() 
+    {
+        return invoiceDate;
+    }
+    public void setCustomerId(Long customerId) 
+    {
+        this.customerId = customerId;
+    }
+
+    public Long getCustomerId() 
+    {
+        return customerId;
+    }
+    public void setSettlementUnitId(Long settlementUnitId) 
+    {
+        this.settlementUnitId = settlementUnitId;
+    }
+
+    public Long getSettlementUnitId() 
+    {
+        return settlementUnitId;
+    }
+    public void setInvoiceNumber(String invoiceNumber) 
+    {
+        this.invoiceNumber = invoiceNumber;
+    }
+
+    public String getInvoiceNumber() 
+    {
+        return invoiceNumber;
+    }
+    public void setInvoiceType(String invoiceType) 
+    {
+        this.invoiceType = invoiceType;
+    }
+
+    public String getInvoiceType() 
+    {
+        return invoiceType;
+    }
+    public void setBillingAmount(Long billingAmount) 
+    {
+        this.billingAmount = billingAmount;
+    }
+
+    public Long getBillingAmount() 
+    {
+        return billingAmount;
+    }
+    public void setPersonInCharge(String personInCharge) 
+    {
+        this.personInCharge = personInCharge;
+    }
+
+    public String getPersonInCharge() 
+    {
+        return personInCharge;
+    }
+    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;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("invoiceDate", getInvoiceDate())
+            .append("customerId", getCustomerId())
+            .append("settlementUnitId", getSettlementUnitId())
+            .append("invoiceNumber", getInvoiceNumber())
+            .append("invoiceType", getInvoiceType())
+            .append("billingAmount", getBillingAmount())
+            .append("personInCharge", getPersonInCharge())
+            .append("remark", getRemark())
+            .append("createBy", getCreateBy())
+            .append("createById", getCreateById())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateById", getUpdateById())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .toString();
+    }
+}

+ 121 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/ProductOutboundRecordBatch.java

@@ -0,0 +1,121 @@
+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;
+
+/**
+ * 成品出库记录批次对象 product_outbound_record_batch
+ * 
+ * @author zkqy
+ * @date 2024-06-28
+ */
+public class ProductOutboundRecordBatch extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 销售单号 */
+    @Excel(name = "销售单号")
+    private String saleNo;
+
+    /** 通知单号 */
+    @Excel(name = "通知单号")
+    private String noticeNumber;
+
+    /** 出库记录编号 */
+    @Excel(name = "出库记录编号")
+    private Long outboundRecordId;
+
+    /** 批次数 */
+    @Excel(name = "批次数")
+    private Long batchNumber;
+
+    /** 创建者ID */
+    private Long createById;
+
+    /** 删除标志(0:否;2:是) */
+    private String delFlag;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setSaleNo(String saleNo) 
+    {
+        this.saleNo = saleNo;
+    }
+
+    public String getSaleNo() 
+    {
+        return saleNo;
+    }
+    public void setNoticeNumber(String noticeNumber) 
+    {
+        this.noticeNumber = noticeNumber;
+    }
+
+    public String getNoticeNumber() 
+    {
+        return noticeNumber;
+    }
+    public void setOutboundRecordId(Long outboundRecordId) 
+    {
+        this.outboundRecordId = outboundRecordId;
+    }
+
+    public Long getOutboundRecordId() 
+    {
+        return outboundRecordId;
+    }
+    public void setBatchNumber(Long batchNumber) 
+    {
+        this.batchNumber = batchNumber;
+    }
+
+    public Long getBatchNumber() 
+    {
+        return batchNumber;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("saleNo", getSaleNo())
+            .append("noticeNumber", getNoticeNumber())
+            .append("outboundRecordId", getOutboundRecordId())
+            .append("batchNumber", getBatchNumber())
+            .append("createBy", getCreateBy())
+            .append("createById", getCreateById())
+            .append("createTime", getCreateTime())
+            .append("delFlag", getDelFlag())
+            .toString();
+    }
+}

+ 590 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/SaleAccountsReceivableDetail.java

@@ -0,0 +1,590 @@
+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;
+
+/**
+ * 应收帐明细对象 sale_accounts_receivable_detail
+ * 
+ * @author zkqy
+ * @date 2024-06-27
+ */
+public class SaleAccountsReceivableDetail extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    private Long id;
+
+    /** 账务类型 */
+    @Excel(name = "账务类型")
+    private String accountingType;
+
+    /** 客户编号 */
+    @Excel(name = "客户编号")
+    private Long customerId;
+
+    //客户名称
+    private String customName;
+
+    /** 应收帐日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "应收帐日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date accountsReceivableDate;
+
+    /** 销售单号 */
+    @Excel(name = "销售单号")
+    private String saleNo;
+
+    /** 销售产品编号 */
+    @Excel(name = "销售产品编号")
+    private String saleProductNo;
+
+    /** 收款登记编号 */
+    private Long registrationCollectionId;
+
+    /** 产品编号 */
+    @Excel(name = "产品编号")
+    private Long productId;
+
+    /** 产品名称 */
+    @Excel(name = "产品名称")
+    private String productName;
+
+    /** 产品规格 */
+    @Excel(name = "产品规格")
+    private String productSpecifications;
+
+    /** 产品等级 */
+    @Excel(name = "产品等级")
+    private String productLevel;
+
+    /** 产品颜色 */
+    @Excel(name = "产品颜色")
+    private String productColour;
+
+    /** 批号 */
+    @Excel(name = "批号")
+    private String lotNumber;
+
+    /** 箱数 */
+    @Excel(name = "箱数")
+    private Long boxNum;
+
+    /** 重量 */
+    @Excel(name = "重量")
+    private Double weight;
+
+    /** 产品单价 */
+    @Excel(name = "产品单价")
+    private Double productPrice;
+
+    /** 应收金额 */
+    @Excel(name = "应收金额")
+    private Double amountReceivable;
+
+    /** 已收金额 */
+    @Excel(name = "已收金额")
+    private Double receivedAmount;
+
+    /** 金额 */
+    @Excel(name = "金额")
+    private Double amounts;
+
+    /** 付款方式 */
+    @Excel(name = "付款方式")
+    private String paymentMethod;
+
+    /** 开票类型 */
+    @Excel(name = "开票类型")
+    private String billingType;
+
+    /** 应收帐备注 */
+    @Excel(name = "应收帐备注")
+    private String accountsReceivableRemark;
+
+    /** 结算单位 */
+    @Excel(name = "结算单位")
+    private Long settlementUnit;
+
+    //结算单位名称
+    private String settlementUnitName;
+
+    /** 回单 */
+    @Excel(name = "回单")
+    private String returnReceipt;
+
+    /** 回单日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "回单日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date returnReceiptDate;
+
+    /** 回单备注 */
+    @Excel(name = "回单备注")
+    private String returnReceiptRemark;
+
+    /** 通知单号 */
+    @Excel(name = "通知单号")
+    private String noticeNumber;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    private String status;
+
+    /** 备用列1 */
+    @Excel(name = "备用列1")
+    private String spare1;
+
+    /** 备用列2 */
+    @Excel(name = "备用列2")
+    private String spare2;
+
+    /** 备用列3 */
+    @Excel(name = "备用列3")
+    private String spare3;
+
+    /** 创建者ID */
+    private Long createById;
+
+    /** 更新者ID */
+    private Long updateById;
+
+    /** 删除标志(0:否;2:是) */
+    private String delFlag;
+
+    /** 开票标志(0:否;1:是) */
+    private String billingFlag;
+
+    /** 开始时间 */
+    private String startTime;
+
+    /** 结束时间 */
+    private String endTime;
+
+    // 发票登记编号
+    private Long finishedProductInvoiceId;
+
+    /** 发票号 */
+    private String invoiceNumber;
+
+    /** 发票类型 */
+    private String invoiceType;
+
+    public Long getFinishedProductInvoiceId() {
+        return finishedProductInvoiceId;
+    }
+
+    public void setFinishedProductInvoiceId(Long finishedProductInvoiceId) {
+        this.finishedProductInvoiceId = finishedProductInvoiceId;
+    }
+
+    public String getInvoiceNumber() {
+        return invoiceNumber;
+    }
+
+    public void setInvoiceNumber(String invoiceNumber) {
+        this.invoiceNumber = invoiceNumber;
+    }
+
+    public String getInvoiceType() {
+        return invoiceType;
+    }
+
+    public void setInvoiceType(String invoiceType) {
+        this.invoiceType = invoiceType;
+    }
+
+    public String getBillingFlag() {
+        return billingFlag;
+    }
+
+    public void setBillingFlag(String billingFlag) {
+        this.billingFlag = billingFlag;
+    }
+
+    public String getSettlementUnitName() {
+        return settlementUnitName;
+    }
+
+    public void setSettlementUnitName(String settlementUnitName) {
+        this.settlementUnitName = settlementUnitName;
+    }
+
+    public String getCustomName() {
+        return customName;
+    }
+
+    public void setCustomName(String customName) {
+        this.customName = customName;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public Long getRegistrationCollectionId() {
+        return registrationCollectionId;
+    }
+
+    public void setRegistrationCollectionId(Long registrationCollectionId) {
+        this.registrationCollectionId = registrationCollectionId;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setAccountingType(String accountingType) 
+    {
+        this.accountingType = accountingType;
+    }
+
+    public String getAccountingType() 
+    {
+        return accountingType;
+    }
+    public void setCustomerId(Long customerId) 
+    {
+        this.customerId = customerId;
+    }
+
+    public Long getCustomerId() 
+    {
+        return customerId;
+    }
+    public void setAccountsReceivableDate(Date accountsReceivableDate) 
+    {
+        this.accountsReceivableDate = accountsReceivableDate;
+    }
+
+    public Date getAccountsReceivableDate() 
+    {
+        return accountsReceivableDate;
+    }
+    public void setSaleNo(String saleNo) 
+    {
+        this.saleNo = saleNo;
+    }
+
+    public String getSaleNo() 
+    {
+        return saleNo;
+    }
+    public void setSaleProductNo(String saleProductNo) 
+    {
+        this.saleProductNo = saleProductNo;
+    }
+
+    public String getSaleProductNo() 
+    {
+        return saleProductNo;
+    }
+    public void setProductId(Long productId) 
+    {
+        this.productId = productId;
+    }
+
+    public Long getProductId() 
+    {
+        return productId;
+    }
+    public void setProductName(String productName) 
+    {
+        this.productName = productName;
+    }
+
+    public String getProductName() 
+    {
+        return productName;
+    }
+    public void setProductSpecifications(String productSpecifications) 
+    {
+        this.productSpecifications = productSpecifications;
+    }
+
+    public String getProductSpecifications() 
+    {
+        return productSpecifications;
+    }
+    public void setProductLevel(String productLevel) 
+    {
+        this.productLevel = productLevel;
+    }
+
+    public String getProductLevel() 
+    {
+        return productLevel;
+    }
+    public void setProductColour(String productColour) 
+    {
+        this.productColour = productColour;
+    }
+
+    public String getProductColour() 
+    {
+        return productColour;
+    }
+    public void setLotNumber(String lotNumber) 
+    {
+        this.lotNumber = lotNumber;
+    }
+
+    public String getLotNumber() 
+    {
+        return lotNumber;
+    }
+    public void setBoxNum(Long boxNum) 
+    {
+        this.boxNum = boxNum;
+    }
+
+    public Long getBoxNum() 
+    {
+        return boxNum;
+    }
+    public void setWeight(Double weight)
+    {
+        this.weight = weight;
+    }
+
+    public Double getWeight()
+    {
+        return weight;
+    }
+    public void setProductPrice(Double productPrice)
+    {
+        this.productPrice = productPrice;
+    }
+
+    public Double getProductPrice()
+    {
+        return productPrice;
+    }
+    public void setAmountReceivable(Double amountReceivable)
+    {
+        this.amountReceivable = amountReceivable;
+    }
+
+    public Double getAmountReceivable()
+    {
+        return amountReceivable;
+    }
+    public void setReceivedAmount(Double receivedAmount)
+    {
+        this.receivedAmount = receivedAmount;
+    }
+
+    public Double getReceivedAmount()
+    {
+        return receivedAmount;
+    }
+    public void setAmounts(Double amounts)
+    {
+        this.amounts = amounts;
+    }
+
+    public Double getAmounts()
+    {
+        return amounts;
+    }
+    public void setPaymentMethod(String paymentMethod) 
+    {
+        this.paymentMethod = paymentMethod;
+    }
+
+    public String getPaymentMethod() 
+    {
+        return paymentMethod;
+    }
+    public void setBillingType(String billingType) 
+    {
+        this.billingType = billingType;
+    }
+
+    public String getBillingType() 
+    {
+        return billingType;
+    }
+    public void setAccountsReceivableRemark(String accountsReceivableRemark) 
+    {
+        this.accountsReceivableRemark = accountsReceivableRemark;
+    }
+
+    public String getAccountsReceivableRemark() 
+    {
+        return accountsReceivableRemark;
+    }
+    public void setSettlementUnit(Long settlementUnit)
+    {
+        this.settlementUnit = settlementUnit;
+    }
+
+    public Long getSettlementUnit()
+    {
+        return settlementUnit;
+    }
+    public void setReturnReceipt(String returnReceipt) 
+    {
+        this.returnReceipt = returnReceipt;
+    }
+
+    public String getReturnReceipt() 
+    {
+        return returnReceipt;
+    }
+    public void setReturnReceiptDate(Date returnReceiptDate) 
+    {
+        this.returnReceiptDate = returnReceiptDate;
+    }
+
+    public Date getReturnReceiptDate() 
+    {
+        return returnReceiptDate;
+    }
+    public void setReturnReceiptRemark(String returnReceiptRemark) 
+    {
+        this.returnReceiptRemark = returnReceiptRemark;
+    }
+
+    public String getReturnReceiptRemark() 
+    {
+        return returnReceiptRemark;
+    }
+    public void setNoticeNumber(String noticeNumber) 
+    {
+        this.noticeNumber = noticeNumber;
+    }
+
+    public String getNoticeNumber() 
+    {
+        return noticeNumber;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+    public void setSpare1(String spare1) 
+    {
+        this.spare1 = spare1;
+    }
+
+    public String getSpare1() 
+    {
+        return spare1;
+    }
+    public void setSpare2(String spare2) 
+    {
+        this.spare2 = spare2;
+    }
+
+    public String getSpare2() 
+    {
+        return spare2;
+    }
+    public void setSpare3(String spare3) 
+    {
+        this.spare3 = spare3;
+    }
+
+    public String getSpare3() 
+    {
+        return spare3;
+    }
+    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;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("accountingType", getAccountingType())
+            .append("customerId", getCustomerId())
+            .append("accountsReceivableDate", getAccountsReceivableDate())
+            .append("saleNo", getSaleNo())
+            .append("saleProductNo", getSaleProductNo())
+            .append("productId", getProductId())
+            .append("productName", getProductName())
+            .append("productSpecifications", getProductSpecifications())
+            .append("productLevel", getProductLevel())
+            .append("productColour", getProductColour())
+            .append("lotNumber", getLotNumber())
+            .append("boxNum", getBoxNum())
+            .append("weight", getWeight())
+            .append("productPrice", getProductPrice())
+            .append("amountReceivable", getAmountReceivable())
+            .append("receivedAmount", getReceivedAmount())
+            .append("amounts", getAmounts())
+            .append("paymentMethod", getPaymentMethod())
+            .append("billingType", getBillingType())
+            .append("accountsReceivableRemark", getAccountsReceivableRemark())
+            .append("settlementUnit", getSettlementUnit())
+            .append("returnReceipt", getReturnReceipt())
+            .append("returnReceiptDate", getReturnReceiptDate())
+            .append("returnReceiptRemark", getReturnReceiptRemark())
+            .append("noticeNumber", getNoticeNumber())
+            .append("status", getStatus())
+            .append("spare1", getSpare1())
+            .append("spare2", getSpare2())
+            .append("spare3", getSpare3())
+            .append("remark", getRemark())
+            .append("createBy", getCreateBy())
+            .append("createById", getCreateById())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateById", getUpdateById())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .toString();
+    }
+}

+ 307 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/SaleOtherCollection.java

@@ -0,0 +1,307 @@
+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;
+
+/**
+ * 其他收款对象 sale_other_collection
+ * 
+ * @author zkqy
+ * @date 2024-07-03
+ */
+public class SaleOtherCollection extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    private Long id;
+
+    /** 流水号 */
+    @Excel(name = "流水号")
+    private String serialNumber;
+
+    /** 其他收款日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "其他收款日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date otherCollectionDate;
+
+    /** 客户编号 */
+    @Excel(name = "客户编号")
+    private Long customerId;
+
+    /** 经办人编号 */
+    @Excel(name = "经办人编号")
+    private Long personInChargeId;
+
+    /** 付款方式 */
+    @Excel(name = "付款方式")
+    private String paymentMethod;
+
+    /** 出门证号 */
+    @Excel(name = "出门证号")
+    private String travelCertificateNumber;
+
+    /** 部门编号 */
+    @Excel(name = "部门编号")
+    private Long deptId;
+
+    /** 收款明细 */
+    @Excel(name = "收款明细")
+    private String collectionDetails;
+
+    /** 应收项目 */
+    @Excel(name = "应收项目")
+    private String itemReceivable;
+
+    /** 结算单位 */
+    private Long settlementUnitId;
+
+    /** 金额 */
+    @Excel(name = "金额")
+    private Double amount;
+
+    /** 审核人 */
+    private String auditor;
+
+    /** 记账标志(0:否;1:是) */
+    @Excel(name = "记账标志", readConverterExp = "0=:否;1:是")
+    private String bookkeepingFlag;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    private String status;
+
+    /** 创建者ID */
+    private Long createById;
+
+    /** 更新者ID */
+    private Long updateById;
+
+    /** 删除标志(0:否;2:是) */
+    private String delFlag;
+
+    //开始时间
+    private Date startTime;
+
+    // 结束时间
+    private Date endTime;
+
+    //结算单位
+    private String settlementUnitName;
+
+    public String getSettlementUnitName() {
+        return settlementUnitName;
+    }
+
+    public void setSettlementUnitName(String settlementUnitName) {
+        this.settlementUnitName = settlementUnitName;
+    }
+
+    public Long getSettlementUnitId() {
+        return settlementUnitId;
+    }
+
+    public void setSettlementUnitId(Long settlementUnitId) {
+        this.settlementUnitId = settlementUnitId;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getAuditor() {
+        return auditor;
+    }
+
+    public void setAuditor(String auditor) {
+        this.auditor = auditor;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setSerialNumber(String serialNumber) 
+    {
+        this.serialNumber = serialNumber;
+    }
+
+    public String getSerialNumber() 
+    {
+        return serialNumber;
+    }
+    public void setOtherCollectionDate(Date otherCollectionDate) 
+    {
+        this.otherCollectionDate = otherCollectionDate;
+    }
+
+    public Date getOtherCollectionDate() 
+    {
+        return otherCollectionDate;
+    }
+    public void setCustomerId(Long customerId) 
+    {
+        this.customerId = customerId;
+    }
+
+    public Long getCustomerId() 
+    {
+        return customerId;
+    }
+    public void setPersonInChargeId(Long personInChargeId) 
+    {
+        this.personInChargeId = personInChargeId;
+    }
+
+    public Long getPersonInChargeId() 
+    {
+        return personInChargeId;
+    }
+    public void setPaymentMethod(String paymentMethod) 
+    {
+        this.paymentMethod = paymentMethod;
+    }
+
+    public String getPaymentMethod() 
+    {
+        return paymentMethod;
+    }
+    public void setTravelCertificateNumber(String travelCertificateNumber) 
+    {
+        this.travelCertificateNumber = travelCertificateNumber;
+    }
+
+    public String getTravelCertificateNumber() 
+    {
+        return travelCertificateNumber;
+    }
+    public void setDeptId(Long deptId) 
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId() 
+    {
+        return deptId;
+    }
+    public void setCollectionDetails(String collectionDetails) 
+    {
+        this.collectionDetails = collectionDetails;
+    }
+
+    public String getCollectionDetails() 
+    {
+        return collectionDetails;
+    }
+    public void setItemReceivable(String itemReceivable) 
+    {
+        this.itemReceivable = itemReceivable;
+    }
+
+    public String getItemReceivable() 
+    {
+        return itemReceivable;
+    }
+    public void setAmount(Double amount)
+    {
+        this.amount = amount;
+    }
+
+    public Double getAmount()
+    {
+        return amount;
+    }
+    public void setBookkeepingFlag(String bookkeepingFlag) 
+    {
+        this.bookkeepingFlag = bookkeepingFlag;
+    }
+
+    public String getBookkeepingFlag() 
+    {
+        return bookkeepingFlag;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+    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;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("serialNumber", getSerialNumber())
+            .append("otherCollectionDate", getOtherCollectionDate())
+            .append("customerId", getCustomerId())
+            .append("personInChargeId", getPersonInChargeId())
+            .append("paymentMethod", getPaymentMethod())
+            .append("travelCertificateNumber", getTravelCertificateNumber())
+            .append("deptId", getDeptId())
+            .append("collectionDetails", getCollectionDetails())
+            .append("itemReceivable", getItemReceivable())
+            .append("amount", getAmount())
+            .append("bookkeepingFlag", getBookkeepingFlag())
+            .append("status", getStatus())
+            .append("remark", getRemark())
+            .append("createBy", getCreateBy())
+            .append("createById", getCreateById())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateById", getUpdateById())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .toString();
+    }
+}

+ 215 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/SaleRegistrationCollection.java

@@ -0,0 +1,215 @@
+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;
+
+/**
+ * 收款登记对象 sale_registration_collection
+ * 
+ * @author zkqy
+ * @date 2024-06-27
+ */
+public class SaleRegistrationCollection extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    private Long id;
+
+    /** 客户编号 */
+    @Excel(name = "客户编号")
+    private Long customerId;
+
+    /** 付款方式 */
+    @Excel(name = "付款方式")
+    private String paymentMethod;
+
+    /** 金额 */
+    @Excel(name = "金额")
+    private Double amounts;
+
+    /** 收款类型 */
+    @Excel(name = "收款类型")
+    private String collectionMoneyType;
+
+    /** 收款日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "收款日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date collectionMoneyDate;
+
+    /** 结算单位 */
+    @Excel(name = "结算单位")
+    private Long settlementUnitId;
+
+    /** 记账标志(0:否;1:是) */
+    @Excel(name = "记账标志", readConverterExp = "0=:否;1:是")
+    private String bookkeepingFlag;
+
+    /** 状态 */
+    private String status;
+
+    /** 创建者ID */
+    private Long createById;
+
+    /** 更新者ID */
+    private Long updateById;
+
+    /** 删除标志(0:否;2:是) */
+    private String delFlag;
+
+    //开始时间
+    private Date startTime;
+
+    // 结束时间
+    private Date endTime;
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setCustomerId(Long customerId) 
+    {
+        this.customerId = customerId;
+    }
+
+    public Long getCustomerId() 
+    {
+        return customerId;
+    }
+    public void setPaymentMethod(String paymentMethod) 
+    {
+        this.paymentMethod = paymentMethod;
+    }
+
+    public String getPaymentMethod() 
+    {
+        return paymentMethod;
+    }
+    public void setAmounts(Double amounts)
+    {
+        this.amounts = amounts;
+    }
+
+    public Double getAmounts()
+    {
+        return amounts;
+    }
+    public void setCollectionMoneyType(String collectionMoneyType) 
+    {
+        this.collectionMoneyType = collectionMoneyType;
+    }
+
+    public String getCollectionMoneyType() 
+    {
+        return collectionMoneyType;
+    }
+    public void setCollectionMoneyDate(Date collectionMoneyDate) 
+    {
+        this.collectionMoneyDate = collectionMoneyDate;
+    }
+
+    public Date getCollectionMoneyDate() 
+    {
+        return collectionMoneyDate;
+    }
+    public void setSettlementUnitId(Long settlementUnitId) 
+    {
+        this.settlementUnitId = settlementUnitId;
+    }
+
+    public Long getSettlementUnitId() 
+    {
+        return settlementUnitId;
+    }
+    public void setBookkeepingFlag(String bookkeepingFlag) 
+    {
+        this.bookkeepingFlag = bookkeepingFlag;
+    }
+
+    public String getBookkeepingFlag() 
+    {
+        return bookkeepingFlag;
+    }
+    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;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("customerId", getCustomerId())
+            .append("paymentMethod", getPaymentMethod())
+            .append("amounts", getAmounts())
+            .append("collectionMoneyType", getCollectionMoneyType())
+            .append("collectionMoneyDate", getCollectionMoneyDate())
+            .append("settlementUnitId", getSettlementUnitId())
+            .append("remark", getRemark())
+            .append("bookkeepingFlag", getBookkeepingFlag())
+            .append("createBy", getCreateBy())
+            .append("createById", getCreateById())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateById", getUpdateById())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .toString();
+    }
+}

+ 260 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/FinishedProductInvoiceVo.java

@@ -0,0 +1,260 @@
+package com.zkqy.business.domain.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zkqy.common.annotation.Excel;
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+/**
+ * 成品发票对象 finished_product_invoice
+ * 
+ * @author zkqy
+ * @date 2024-07-01
+ */
+public class FinishedProductInvoiceVo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    private Long id;
+
+    /** 发票日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "发票日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date invoiceDate;
+
+    /** 客户编号 */
+    @Excel(name = "客户编号")
+    private Long customerId;
+
+    /** 结算单位 */
+    @Excel(name = "结算单位")
+    private Long settlementUnitId;
+
+    /** 发票号 */
+    @Excel(name = "发票号")
+    private String invoiceNumber;
+
+    /** 发票类型 */
+    @Excel(name = "发票类型")
+    private String invoiceType;
+
+    /** 开票金额 */
+    @Excel(name = "开票金额")
+    private Long billingAmount;
+
+    /** 经手人 */
+    @Excel(name = "经手人")
+    private String personInCharge;
+
+    /** 应收明细编号 */
+    private Long accountsReceivableDetailId;
+
+    /** 创建者ID */
+    private Long createById;
+
+    /** 更新者ID */
+    private Long updateById;
+
+    /** 删除标志(0:否;2:是) */
+    private String delFlag;
+
+    /** 开票标志(0:否;1:是) */
+    private String billingFlag;
+
+    //开始时间
+    private Date startTime;
+
+    // 结束时间
+    private Date endTime;
+
+    // 客户名称
+    private String customName;
+
+    // 结算单位
+    private String settlementUnit;
+
+    // 客户编码
+    private String customNo;
+
+    public String getBillingFlag() {
+        return billingFlag;
+    }
+
+    public void setBillingFlag(String billingFlag) {
+        this.billingFlag = billingFlag;
+    }
+
+    public Long getAccountsReceivableDetailId() {
+        return accountsReceivableDetailId;
+    }
+
+    public void setAccountsReceivableDetailId(Long accountsReceivableDetailId) {
+        this.accountsReceivableDetailId = accountsReceivableDetailId;
+    }
+
+    public String getCustomName() {
+        return customName;
+    }
+
+    public void setCustomName(String customName) {
+        this.customName = customName;
+    }
+
+    public String getSettlementUnit() {
+        return settlementUnit;
+    }
+
+    public void setSettlementUnit(String settlementUnit) {
+        this.settlementUnit = settlementUnit;
+    }
+
+    public String getCustomNo() {
+        return customNo;
+    }
+
+    public void setCustomNo(String customNo) {
+        this.customNo = customNo;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setInvoiceDate(Date invoiceDate) 
+    {
+        this.invoiceDate = invoiceDate;
+    }
+
+    public Date getInvoiceDate() 
+    {
+        return invoiceDate;
+    }
+    public void setCustomerId(Long customerId) 
+    {
+        this.customerId = customerId;
+    }
+
+    public Long getCustomerId() 
+    {
+        return customerId;
+    }
+    public void setSettlementUnitId(Long settlementUnitId) 
+    {
+        this.settlementUnitId = settlementUnitId;
+    }
+
+    public Long getSettlementUnitId() 
+    {
+        return settlementUnitId;
+    }
+    public void setInvoiceNumber(String invoiceNumber) 
+    {
+        this.invoiceNumber = invoiceNumber;
+    }
+
+    public String getInvoiceNumber() 
+    {
+        return invoiceNumber;
+    }
+    public void setInvoiceType(String invoiceType) 
+    {
+        this.invoiceType = invoiceType;
+    }
+
+    public String getInvoiceType() 
+    {
+        return invoiceType;
+    }
+    public void setBillingAmount(Long billingAmount) 
+    {
+        this.billingAmount = billingAmount;
+    }
+
+    public Long getBillingAmount() 
+    {
+        return billingAmount;
+    }
+    public void setPersonInCharge(String personInCharge) 
+    {
+        this.personInCharge = personInCharge;
+    }
+
+    public String getPersonInCharge() 
+    {
+        return personInCharge;
+    }
+    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;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("invoiceDate", getInvoiceDate())
+            .append("customerId", getCustomerId())
+            .append("settlementUnitId", getSettlementUnitId())
+            .append("invoiceNumber", getInvoiceNumber())
+            .append("invoiceType", getInvoiceType())
+            .append("billingAmount", getBillingAmount())
+            .append("personInCharge", getPersonInCharge())
+            .append("remark", getRemark())
+            .append("createBy", getCreateBy())
+            .append("createById", getCreateById())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateById", getUpdateById())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .toString();
+    }
+}

+ 78 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/SaleProductsVo.java

@@ -22,6 +22,9 @@ public class SaleProductsVo extends SaleProducts {
     /** 批号 */
     private String lotNumber;
 
+    /** 产品箱数 */
+    private Long boxNum;
+
     /** 产品数量 */
     private Double productNumber;
 
@@ -31,6 +34,81 @@ public class SaleProductsVo extends SaleProducts {
     /** 产品金额 */
     private String productAmounts;
 
+    /** 产品编号 */
+    private Long productId;
+
+    /** 产品色号 */
+    private String productColour;
+
+    /** 通知单号 */
+    private String noticeNumber;
+
+    /** 产品等级 */
+    private String productLevel;
+
+    /** 产品编号 */
+    private String productNo;
+
+    /** 销售单号 */
+    private String saleNo;
+
+    @Override
+    public String getProductNo() {
+        return productNo;
+    }
+
+    @Override
+    public void setProductNo(String productNo) {
+        this.productNo = productNo;
+    }
+
+    public String getSaleNo() {
+        return saleNo;
+    }
+
+    public void setSaleNo(String saleNo) {
+        this.saleNo = saleNo;
+    }
+
+    public Long getBoxNum() {
+        return boxNum;
+    }
+
+    public void setBoxNum(Long boxNum) {
+        this.boxNum = boxNum;
+    }
+
+    public String getProductLevel() {
+        return productLevel;
+    }
+
+    public void setProductLevel(String productLevel) {
+        this.productLevel = productLevel;
+    }
+
+    public Long getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Long productId) {
+        this.productId = productId;
+    }
+
+    public String getProductColour() {
+        return productColour;
+    }
+
+    public void setProductColour(String productColour) {
+        this.productColour = productColour;
+    }
+
+    public String getNoticeNumber() {
+        return noticeNumber;
+    }
+
+    public void setNoticeNumber(String noticeNumber) {
+        this.noticeNumber = noticeNumber;
+    }
 
     public String getProductSpecifications() {
         return productSpecifications;

+ 216 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/SaleRegistrationCollectionVo.java

@@ -0,0 +1,216 @@
+package com.zkqy.business.domain.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zkqy.common.annotation.Excel;
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+public class SaleRegistrationCollectionVo extends BaseEntity {
+
+    /** 编号 */
+    private Long id;
+
+    /** 客户编号 */
+    @Excel(name = "客户编号")
+    private Long customerId;
+
+    /** 付款方式 */
+    @Excel(name = "付款方式")
+    private String paymentMethod;
+
+    /** 金额 */
+    @Excel(name = "金额")
+    private Long amounts;
+
+    /** 收款类型 */
+    @Excel(name = "收款类型")
+    private String collectionMoneyType;
+
+    /** 收款日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "收款日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date collectionMoneyDate;
+
+    /** 结算单位 */
+    @Excel(name = "结算单位")
+    private Long settlementUnitId;
+
+    /** 记账标志(0:否;1:是) */
+    @Excel(name = "记账标志", readConverterExp = "0=:否;1:是")
+    private String bookkeepingFlag;
+
+    /** 状态 */
+    private String status;
+
+    /** 创建者ID */
+    private Long createById;
+
+    /** 更新者ID */
+    private Long updateById;
+
+    /** 删除标志(0:否;2:是) */
+    private String delFlag;
+
+    // 客户名称
+    private String customName;
+
+    // 结算单位
+    private String settlementUnit;
+
+    // 客户编码
+    private String customNo;
+
+    public String getCustomNo() {
+        return customNo;
+    }
+
+    public void setCustomNo(String customNo) {
+        this.customNo = customNo;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setCustomerId(Long customerId)
+    {
+        this.customerId = customerId;
+    }
+
+    public Long getCustomerId()
+    {
+        return customerId;
+    }
+    public void setPaymentMethod(String paymentMethod)
+    {
+        this.paymentMethod = paymentMethod;
+    }
+
+    public String getPaymentMethod()
+    {
+        return paymentMethod;
+    }
+    public void setAmounts(Long amounts)
+    {
+        this.amounts = amounts;
+    }
+
+    public Long getAmounts()
+    {
+        return amounts;
+    }
+    public void setCollectionMoneyType(String collectionMoneyType)
+    {
+        this.collectionMoneyType = collectionMoneyType;
+    }
+
+    public String getCollectionMoneyType()
+    {
+        return collectionMoneyType;
+    }
+    public void setCollectionMoneyDate(Date collectionMoneyDate)
+    {
+        this.collectionMoneyDate = collectionMoneyDate;
+    }
+
+    public Date getCollectionMoneyDate()
+    {
+        return collectionMoneyDate;
+    }
+    public void setSettlementUnitId(Long settlementUnitId)
+    {
+        this.settlementUnitId = settlementUnitId;
+    }
+
+    public Long getSettlementUnitId()
+    {
+        return settlementUnitId;
+    }
+    public void setBookkeepingFlag(String bookkeepingFlag)
+    {
+        this.bookkeepingFlag = bookkeepingFlag;
+    }
+
+    public String getBookkeepingFlag()
+    {
+        return bookkeepingFlag;
+    }
+    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 String getCustomName() {
+        return customName;
+    }
+
+    public void setCustomName(String customerName) {
+        this.customName = customerName;
+    }
+
+    public String getSettlementUnit() {
+        return settlementUnit;
+    }
+
+    public void setSettlementUnit(String settlementUnit) {
+        this.settlementUnit = settlementUnit;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    @Override
+    public String toString() {
+        return "SaleRegistrationCollectionVo{" +
+                "id=" + id +
+                ", customerId=" + customerId +
+                ", paymentMethod='" + paymentMethod + '\'' +
+                ", amounts=" + amounts +
+                ", collectionMoneyType='" + collectionMoneyType + '\'' +
+                ", collectionMoneyDate=" + collectionMoneyDate +
+                ", settlementUnitId=" + settlementUnitId +
+                ", bookkeepingFlag='" + bookkeepingFlag + '\'' +
+                ", createById=" + createById +
+                ", updateById=" + updateById +
+                ", delFlag='" + delFlag + '\'' +
+                ", customerName='" + customName + '\'' +
+                ", settlementUnit='" + settlementUnit + '\'' +
+                '}';
+    }
+}

+ 61 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/CustomerSettlementUnitMapper.java

@@ -0,0 +1,61 @@
+package com.zkqy.business.mapper;
+
+import java.util.List;
+import com.zkqy.business.domain.CustomerSettlementUnit;
+
+/**
+ * 客户结算单位Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-06-27
+ */
+public interface CustomerSettlementUnitMapper 
+{
+    /**
+     * 查询客户结算单位
+     * 
+     * @param id 客户结算单位主键
+     * @return 客户结算单位
+     */
+    public CustomerSettlementUnit selectCustomerSettlementUnitById(Long id);
+
+    /**
+     * 查询客户结算单位列表
+     * 
+     * @param customerSettlementUnit 客户结算单位
+     * @return 客户结算单位集合
+     */
+    public List<CustomerSettlementUnit> selectCustomerSettlementUnitList(CustomerSettlementUnit customerSettlementUnit);
+
+    /**
+     * 新增客户结算单位
+     * 
+     * @param customerSettlementUnit 客户结算单位
+     * @return 结果
+     */
+    public int insertCustomerSettlementUnit(CustomerSettlementUnit customerSettlementUnit);
+
+    /**
+     * 修改客户结算单位
+     * 
+     * @param customerSettlementUnit 客户结算单位
+     * @return 结果
+     */
+    public int updateCustomerSettlementUnit(CustomerSettlementUnit customerSettlementUnit);
+
+    /**
+     * 删除客户结算单位
+     * 
+     * @param id 客户结算单位主键
+     * @return 结果
+     */
+    public int deleteCustomerSettlementUnitById(Long id);
+
+    /**
+     * 批量删除客户结算单位
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCustomerSettlementUnitByIds(Long[] ids);
+}

+ 79 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/FinishedProductInvoiceMapper.java

@@ -0,0 +1,79 @@
+package com.zkqy.business.mapper;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import com.zkqy.business.domain.FinishedProductInvoice;
+import com.zkqy.business.domain.vo.FinishedProductInvoiceVo;
+
+/**
+ * 成品发票Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-07-01
+ */
+public interface FinishedProductInvoiceMapper 
+{
+    /**
+     * 查询成品发票
+     * 
+     * @param id 成品发票主键
+     * @return 成品发票
+     */
+    public FinishedProductInvoice selectFinishedProductInvoiceById(Long id);
+
+    /**
+     * 查询成品发票列表
+     * 
+     * @param finishedProductInvoice 成品发票
+     * @return 成品发票集合
+     */
+    public List<FinishedProductInvoice> selectFinishedProductInvoiceList(FinishedProductInvoice finishedProductInvoice);
+
+    /**
+     * 新增成品发票
+     * 
+     * @param finishedProductInvoice 成品发票
+     * @return 结果
+     */
+    public int insertFinishedProductInvoice(FinishedProductInvoice finishedProductInvoice);
+
+    /**
+     * 修改成品发票
+     * 
+     * @param finishedProductInvoice 成品发票
+     * @return 结果
+     */
+    public int updateFinishedProductInvoice(FinishedProductInvoice finishedProductInvoice);
+
+    /**
+     * 删除成品发票
+     * 
+     * @param id 成品发票主键
+     * @return 结果
+     */
+    public int deleteFinishedProductInvoiceById(Long id);
+
+    /**
+     * 批量删除成品发票
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteFinishedProductInvoiceByIds(List<Long> ids);
+
+    /**
+     * 查询成品发票列表
+     */
+    List<FinishedProductInvoiceVo> selectFinishedProductInvoiceList1(FinishedProductInvoice finishedProductInvoice);
+
+    /**
+     * 查询发票结算明细列表
+     * @param qcDate
+     * @return
+     */
+    List<Map<String,Object>> selectBillingDetails(Date qcDate);
+
+
+}

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

@@ -0,0 +1,73 @@
+package com.zkqy.business.mapper;
+
+import java.util.List;
+import com.zkqy.business.domain.ProductOutboundRecordBatch;
+
+/**
+ * 成品出库记录批次Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-06-28
+ */
+public interface ProductOutboundRecordBatchMapper 
+{
+    /**
+     * 查询成品出库记录批次
+     * 
+     * @param id 成品出库记录批次主键
+     * @return 成品出库记录批次
+     */
+    public ProductOutboundRecordBatch selectProductOutboundRecordBatchById(Long id);
+
+    /**
+     * 查询成品出库记录批次列表
+     * 
+     * @param productOutboundRecordBatch 成品出库记录批次
+     * @return 成品出库记录批次集合
+     */
+    public List<ProductOutboundRecordBatch> selectProductOutboundRecordBatchList(ProductOutboundRecordBatch productOutboundRecordBatch);
+
+    /**
+     * 新增成品出库记录批次
+     * 
+     * @param productOutboundRecordBatch 成品出库记录批次
+     * @return 结果
+     */
+    public int insertProductOutboundRecordBatch(ProductOutboundRecordBatch productOutboundRecordBatch);
+
+    /**
+     * 修改成品出库记录批次
+     * 
+     * @param productOutboundRecordBatch 成品出库记录批次
+     * @return 结果
+     */
+    public int updateProductOutboundRecordBatch(ProductOutboundRecordBatch productOutboundRecordBatch);
+
+    /**
+     * 删除成品出库记录批次
+     * 
+     * @param id 成品出库记录批次主键
+     * @return 结果
+     */
+    public int deleteProductOutboundRecordBatchById(Long id);
+
+    /**
+     * 批量删除成品出库记录批次
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteProductOutboundRecordBatchByIds(Long[] ids);
+
+    /**
+     * 根据通知单查询发货批次
+     */
+    Long selectBatchNumberByNoticeNumber(String noticeNumber);
+
+    /**
+     * 批量新增成品出库记录批次
+     *
+     * @return 结果
+     */
+    int batchInsertProductOutboundRecordBatch(List<ProductOutboundRecordBatch> productOutboundRecordBatchList);
+}

+ 6 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductOutboundRecordMapper.java

@@ -113,4 +113,10 @@ public interface ProductOutboundRecordMapper
      * @return 结果
      */
     public int deleteProductOutboundRecordByUUID(String qrCodeId);
+
+    /**
+     * 查询当前批次出库记录编号
+     */
+    List<Long> selectOutboundRecordNo(String noticeNumber);
+
 }

+ 78 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/SaleAccountsReceivableDetailMapper.java

@@ -0,0 +1,78 @@
+package com.zkqy.business.mapper;
+
+import java.util.List;
+import com.zkqy.business.domain.SaleAccountsReceivableDetail;
+
+/**
+ * 应收帐明细Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-06-27
+ */
+public interface SaleAccountsReceivableDetailMapper 
+{
+    /**
+     * 查询应收帐明细
+     * 
+     * @param id 应收帐明细主键
+     * @return 应收帐明细
+     */
+    public SaleAccountsReceivableDetail selectSaleAccountsReceivableDetailById(Long id);
+
+    /**
+     * 查询应收帐明细列表
+     * 
+     * @param saleAccountsReceivableDetail 应收帐明细
+     * @return 应收帐明细集合
+     */
+    public List<SaleAccountsReceivableDetail> selectSaleAccountsReceivableDetailList(SaleAccountsReceivableDetail saleAccountsReceivableDetail);
+
+    /**
+     * 新增应收帐明细
+     * 
+     * @param saleAccountsReceivableDetail 应收帐明细
+     * @return 结果
+     */
+    public int insertSaleAccountsReceivableDetail(SaleAccountsReceivableDetail saleAccountsReceivableDetail);
+
+    /**
+     * 修改应收帐明细
+     * 
+     * @param saleAccountsReceivableDetail 应收帐明细
+     * @return 结果
+     */
+    public int updateSaleAccountsReceivableDetail(SaleAccountsReceivableDetail saleAccountsReceivableDetail);
+
+    /**
+     * 删除应收帐明细
+     * 
+     * @param id 应收帐明细主键
+     * @return 结果
+     */
+    public int deleteSaleAccountsReceivableDetailById(Long id);
+
+    /**
+     * 批量删除应收帐明细
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSaleAccountsReceivableDetailByIds(Long[] ids);
+
+    /**
+     * 批量新增应收帐明细
+     *
+     * @param saleAccountsReceivableDetail 应收帐明细
+     * @return 结果
+     */
+    int batchInsertSaleAccountsReceivableDetail(List<SaleAccountsReceivableDetail> saleAccountsReceivableDetail);
+
+    /**
+     * 查询应收帐明细
+     *
+     * @param saleAccountsReceivableDetail 应收帐明细
+     * @return 应收帐明细集合
+     */
+    List<SaleAccountsReceivableDetail> selectAccountsReceivableDetailList(SaleAccountsReceivableDetail saleAccountsReceivableDetail);
+
+}

+ 20 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/SaleOrderMapper.java

@@ -6,6 +6,7 @@ import java.util.Objects;
 
 import com.zkqy.business.domain.SaleOrder;
 import com.zkqy.business.domain.vo.SaleOrderVO;
+import com.zkqy.business.domain.vo.SaleProductsVo;
 import org.apache.ibatis.annotations.MapKey;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -130,6 +131,25 @@ public interface SaleOrderMapper {
      */
     int deleteSaleOrderBySaleNo(List<String> saleNos);
 
+    /**
+     * 查询打印出库单列表
+     */
+    List<SaleProductsVo> printOutsourceOrderList(@Param("noticeNumber") String noticeNumber,@Param("saleNo") String saleNo);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
     /**

+ 61 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/SaleOtherCollectionMapper.java

@@ -0,0 +1,61 @@
+package com.zkqy.business.mapper;
+
+import java.util.List;
+import com.zkqy.business.domain.SaleOtherCollection;
+
+/**
+ * 其他收款Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-07-03
+ */
+public interface SaleOtherCollectionMapper 
+{
+    /**
+     * 查询其他收款
+     * 
+     * @param id 其他收款主键
+     * @return 其他收款
+     */
+    public SaleOtherCollection selectSaleOtherCollectionById(Long id);
+
+    /**
+     * 查询其他收款列表
+     * 
+     * @param saleOtherCollection 其他收款
+     * @return 其他收款集合
+     */
+    public List<SaleOtherCollection> selectSaleOtherCollectionList(SaleOtherCollection saleOtherCollection);
+
+    /**
+     * 新增其他收款
+     * 
+     * @param saleOtherCollection 其他收款
+     * @return 结果
+     */
+    public int insertSaleOtherCollection(SaleOtherCollection saleOtherCollection);
+
+    /**
+     * 修改其他收款
+     * 
+     * @param saleOtherCollection 其他收款
+     * @return 结果
+     */
+    public int updateSaleOtherCollection(SaleOtherCollection saleOtherCollection);
+
+    /**
+     * 删除其他收款
+     * 
+     * @param id 其他收款主键
+     * @return 结果
+     */
+    public int deleteSaleOtherCollectionById(Long id);
+
+    /**
+     * 批量删除其他收款
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSaleOtherCollectionByIds(List<Long> ids);
+}

+ 69 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/SaleRegistrationCollectionMapper.java

@@ -0,0 +1,69 @@
+package com.zkqy.business.mapper;
+
+import java.util.List;
+import com.zkqy.business.domain.SaleRegistrationCollection;
+import com.zkqy.business.domain.vo.SaleRegistrationCollectionVo;
+
+/**
+ * 收款登记Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-06-27
+ */
+public interface SaleRegistrationCollectionMapper 
+{
+    /**
+     * 查询收款登记
+     * 
+     * @param id 收款登记主键
+     * @return 收款登记
+     */
+    public SaleRegistrationCollection selectSaleRegistrationCollectionById(Long id);
+
+    /**
+     * 查询收款登记列表
+     * 
+     * @param saleRegistrationCollection 收款登记
+     * @return 收款登记集合
+     */
+    public List<SaleRegistrationCollection> selectSaleRegistrationCollectionList(SaleRegistrationCollection saleRegistrationCollection);
+
+    /**
+     * 新增收款登记
+     * 
+     * @param saleRegistrationCollection 收款登记
+     * @return 结果
+     */
+    public int insertSaleRegistrationCollection(SaleRegistrationCollection saleRegistrationCollection);
+
+    /**
+     * 修改收款登记
+     * 
+     * @param saleRegistrationCollection 收款登记
+     * @return 结果
+     */
+    public int updateSaleRegistrationCollection(SaleRegistrationCollection saleRegistrationCollection);
+
+    /**
+     * 删除收款登记
+     * 
+     * @param id 收款登记主键
+     * @return 结果
+     */
+    public int deleteSaleRegistrationCollectionById(Long id);
+
+    /**
+     * 批量删除收款登记
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSaleRegistrationCollectionByIds(Long[] ids);
+
+    /**
+     * 查询收款登记列表
+     */
+    List<SaleRegistrationCollectionVo> selectRegistrationCollectionList(SaleRegistrationCollection saleRegistrationCollection);
+
+
+}

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

@@ -0,0 +1,61 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.CustomerSettlementUnit;
+
+/**
+ * 客户结算单位Service接口
+ * 
+ * @author zkqy
+ * @date 2024-06-27
+ */
+public interface ICustomerSettlementUnitService 
+{
+    /**
+     * 查询客户结算单位
+     * 
+     * @param id 客户结算单位主键
+     * @return 客户结算单位
+     */
+    public CustomerSettlementUnit selectCustomerSettlementUnitById(Long id);
+
+    /**
+     * 查询客户结算单位列表
+     * 
+     * @param customerSettlementUnit 客户结算单位
+     * @return 客户结算单位集合
+     */
+    public List<CustomerSettlementUnit> selectCustomerSettlementUnitList(CustomerSettlementUnit customerSettlementUnit);
+
+    /**
+     * 新增客户结算单位
+     * 
+     * @param customerSettlementUnit 客户结算单位
+     * @return 结果
+     */
+    public int insertCustomerSettlementUnit(CustomerSettlementUnit customerSettlementUnit);
+
+    /**
+     * 修改客户结算单位
+     * 
+     * @param customerSettlementUnit 客户结算单位
+     * @return 结果
+     */
+    public int updateCustomerSettlementUnit(CustomerSettlementUnit customerSettlementUnit);
+
+    /**
+     * 批量删除客户结算单位
+     * 
+     * @param ids 需要删除的客户结算单位主键集合
+     * @return 结果
+     */
+    public int deleteCustomerSettlementUnitByIds(Long[] ids);
+
+    /**
+     * 删除客户结算单位信息
+     * 
+     * @param id 客户结算单位主键
+     * @return 结果
+     */
+    public int deleteCustomerSettlementUnitById(Long id);
+}

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

@@ -0,0 +1,71 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.FinishedProductInvoice;
+import com.zkqy.business.domain.vo.FinishedProductInvoiceVo;
+
+/**
+ * 成品发票Service接口
+ * 
+ * @author zkqy
+ * @date 2024-07-01
+ */
+public interface IFinishedProductInvoiceService 
+{
+    /**
+     * 查询成品发票
+     * 
+     * @param id 成品发票主键
+     * @return 成品发票
+     */
+    public FinishedProductInvoice selectFinishedProductInvoiceById(Long id);
+
+    /**
+     * 查询成品发票列表
+     * 
+     * @param finishedProductInvoice 成品发票
+     * @return 成品发票集合
+     */
+    public List<FinishedProductInvoice> selectFinishedProductInvoiceList(FinishedProductInvoice finishedProductInvoice);
+
+    /**
+     * 新增成品发票
+     * 
+     * @param finishedProductInvoice 成品发票
+     * @return 结果
+     */
+    public int insertFinishedProductInvoice(FinishedProductInvoice finishedProductInvoice);
+
+    /**
+     * 修改成品发票
+     * 
+     * @param finishedProductInvoice 成品发票
+     * @return 结果
+     */
+    public int updateFinishedProductInvoice(FinishedProductInvoice finishedProductInvoice);
+
+    /**
+     * 批量删除成品发票
+     * 
+     * @param ids 需要删除的成品发票主键集合
+     * @return 结果
+     */
+    public int deleteFinishedProductInvoiceByIds(List<Long> ids);
+
+    /**
+     * 删除成品发票信息
+     * 
+     * @param id 成品发票主键
+     * @return 结果
+     */
+    public int deleteFinishedProductInvoiceById(Long id);
+
+    /**
+     * 查询成品发票列表
+     *
+     * @param finishedProductInvoice 成品发票
+     * @return 成品发票集合
+     */
+    public List<FinishedProductInvoiceVo> selectFinishedProductInvoiceList1(FinishedProductInvoice finishedProductInvoice);
+
+}

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

@@ -0,0 +1,61 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.ProductOutboundRecordBatch;
+
+/**
+ * 成品出库记录批次Service接口
+ * 
+ * @author zkqy
+ * @date 2024-06-28
+ */
+public interface IProductOutboundRecordBatchService 
+{
+    /**
+     * 查询成品出库记录批次
+     * 
+     * @param id 成品出库记录批次主键
+     * @return 成品出库记录批次
+     */
+    public ProductOutboundRecordBatch selectProductOutboundRecordBatchById(Long id);
+
+    /**
+     * 查询成品出库记录批次列表
+     * 
+     * @param productOutboundRecordBatch 成品出库记录批次
+     * @return 成品出库记录批次集合
+     */
+    public List<ProductOutboundRecordBatch> selectProductOutboundRecordBatchList(ProductOutboundRecordBatch productOutboundRecordBatch);
+
+    /**
+     * 新增成品出库记录批次
+     * 
+     * @param productOutboundRecordBatch 成品出库记录批次
+     * @return 结果
+     */
+    public int insertProductOutboundRecordBatch(ProductOutboundRecordBatch productOutboundRecordBatch);
+
+    /**
+     * 修改成品出库记录批次
+     * 
+     * @param productOutboundRecordBatch 成品出库记录批次
+     * @return 结果
+     */
+    public int updateProductOutboundRecordBatch(ProductOutboundRecordBatch productOutboundRecordBatch);
+
+    /**
+     * 批量删除成品出库记录批次
+     * 
+     * @param ids 需要删除的成品出库记录批次主键集合
+     * @return 结果
+     */
+    public int deleteProductOutboundRecordBatchByIds(Long[] ids);
+
+    /**
+     * 删除成品出库记录批次信息
+     * 
+     * @param id 成品出库记录批次主键
+     * @return 结果
+     */
+    public int deleteProductOutboundRecordBatchById(Long id);
+}

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

@@ -0,0 +1,90 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.SaleAccountsReceivableDetail;
+import com.zkqy.business.domain.vo.FinishedProductInvoiceVo;
+
+/**
+ * 应收帐明细Service接口
+ * 
+ * @author zkqy
+ * @date 2024-06-27
+ */
+public interface ISaleAccountsReceivableDetailService 
+{
+    /**
+     * 查询应收帐明细
+     * 
+     * @param id 应收帐明细主键
+     * @return 应收帐明细
+     */
+    public SaleAccountsReceivableDetail selectSaleAccountsReceivableDetailById(Long id);
+
+    /**
+     * 查询应收帐明细列表
+     * 
+     * @param saleAccountsReceivableDetail 应收帐明细
+     * @return 应收帐明细集合
+     */
+    public List<SaleAccountsReceivableDetail> selectSaleAccountsReceivableDetailList(SaleAccountsReceivableDetail saleAccountsReceivableDetail);
+
+    /**
+     * 新增应收帐明细
+     * 
+     * @param saleAccountsReceivableDetail 应收帐明细
+     * @return 结果
+     */
+    public int insertSaleAccountsReceivableDetail(SaleAccountsReceivableDetail saleAccountsReceivableDetail);
+
+    /**
+     * 修改应收帐明细
+     * 
+     * @param saleAccountsReceivableDetail 应收帐明细
+     * @return 结果
+     */
+    public int updateSaleAccountsReceivableDetail(SaleAccountsReceivableDetail saleAccountsReceivableDetail);
+
+    /**
+     * 批量删除应收帐明细
+     * 
+     * @param ids 需要删除的应收帐明细主键集合
+     * @return 结果
+     */
+    public int deleteSaleAccountsReceivableDetailByIds(Long[] ids);
+
+    /**
+     * 删除应收帐明细信息
+     * 
+     * @param id 应收帐明细主键
+     * @return 结果
+     */
+    public int deleteSaleAccountsReceivableDetailById(Long id);
+
+    /**
+     * 回单
+     */
+    int returnReceipt(List<SaleAccountsReceivableDetail> saleAccountsReceivableDetailList);
+
+    /**
+     * 待办应收帐明细修改
+     */
+    int editAccountsReceivableDetail(SaleAccountsReceivableDetail saleAccountsReceivableDetail);
+
+    /**
+     * 应收明细审核通过接口
+     * @param saleAccountsReceivableDetail
+     * @return
+     */
+    int reviewApproved(SaleAccountsReceivableDetail saleAccountsReceivableDetail);
+
+    /**
+     * 开票
+     */
+    int billing(FinishedProductInvoiceVo vo);
+
+    /**
+     * 取消开票
+     */
+    int cancelBilling(FinishedProductInvoiceVo vo);
+
+}

+ 11 - 3
zkqy-custom-business/src/main/java/com/zkqy/business/service/ISaleOrderService.java

@@ -4,8 +4,11 @@ import java.util.List;
 import java.util.Map;
 
 import com.zkqy.business.domain.ProductInvoice;
+import com.zkqy.business.domain.SaleAccountsReceivableDetail;
 import com.zkqy.business.domain.SaleOrder;
 import com.zkqy.business.domain.vo.SaleOrderVO;
+import com.zkqy.business.domain.vo.SaleProductsVo;
+import org.springframework.web.bind.annotation.RequestBody;
 
 /**
  * 销售订单Service接口
@@ -154,10 +157,15 @@ public interface ISaleOrderService {
      */
     int submitOutsourceOrder(Long id);
 
+    /**
+     * 打印出库单列表
+     */
+    List<SaleProductsVo> printOutsourceOrderList(String saleNo);
 
-
-
-
+    /**
+     * 销售出库单打印接口
+     */
+    int printOutsourceOrder(List<SaleAccountsReceivableDetail> saleAccountsReceivableDetailList);
 
 
 

+ 68 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/ISaleOtherCollectionService.java

@@ -0,0 +1,68 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.SaleOtherCollection;
+
+/**
+ * 其他收款Service接口
+ * 
+ * @author zkqy
+ * @date 2024-07-03
+ */
+public interface ISaleOtherCollectionService 
+{
+    /**
+     * 查询其他收款
+     * 
+     * @param id 其他收款主键
+     * @return 其他收款
+     */
+    public SaleOtherCollection selectSaleOtherCollectionById(Long id);
+
+    /**
+     * 查询其他收款列表
+     * 
+     * @param saleOtherCollection 其他收款
+     * @return 其他收款集合
+     */
+    public List<SaleOtherCollection> selectSaleOtherCollectionList(SaleOtherCollection saleOtherCollection);
+
+    /**
+     * 新增其他收款
+     * 
+     * @param saleOtherCollection 其他收款
+     * @return 结果
+     */
+    public int insertSaleOtherCollection(SaleOtherCollection saleOtherCollection);
+
+    /**
+     * 修改其他收款
+     * 
+     * @param saleOtherCollection 其他收款
+     * @return 结果
+     */
+    public int updateSaleOtherCollection(SaleOtherCollection saleOtherCollection);
+
+    /**
+     * 批量删除其他收款
+     * 
+     * @param ids 需要删除的其他收款主键集合
+     * @return 结果
+     */
+    public int deleteSaleOtherCollectionByIds(List<Long> ids);
+
+    /**
+     * 删除其他收款信息
+     * 
+     * @param id 其他收款主键
+     * @return 结果
+     */
+    public int deleteSaleOtherCollectionById(Long id);
+
+    /**
+     * 审核
+     * @param saleOtherCollection
+     * @return
+     */
+    int audit(SaleOtherCollection saleOtherCollection);
+}

+ 75 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/ISaleRegistrationCollectionService.java

@@ -0,0 +1,75 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.SaleRegistrationCollection;
+import com.zkqy.business.domain.vo.SaleRegistrationCollectionVo;
+
+/**
+ * 收款登记Service接口
+ * 
+ * @author zkqy
+ * @date 2024-06-27
+ */
+public interface ISaleRegistrationCollectionService 
+{
+    /**
+     * 查询收款登记
+     * 
+     * @param id 收款登记主键
+     * @return 收款登记
+     */
+    public SaleRegistrationCollection selectSaleRegistrationCollectionById(Long id);
+
+    /**
+     * 查询收款登记列表
+     * 
+     * @param saleRegistrationCollection 收款登记
+     * @return 收款登记集合
+     */
+    public List<SaleRegistrationCollection> selectSaleRegistrationCollectionList(SaleRegistrationCollection saleRegistrationCollection);
+
+    /**
+     * 新增收款登记
+     * 
+     * @param saleRegistrationCollection 收款登记
+     * @return 结果
+     */
+    public int insertSaleRegistrationCollection(SaleRegistrationCollection saleRegistrationCollection);
+
+    /**
+     * 修改收款登记
+     * 
+     * @param saleRegistrationCollection 收款登记
+     * @return 结果
+     */
+    public int updateSaleRegistrationCollection(SaleRegistrationCollection saleRegistrationCollection);
+
+    /**
+     * 批量删除收款登记
+     * 
+     * @param ids 需要删除的收款登记主键集合
+     * @return 结果
+     */
+    public int deleteSaleRegistrationCollectionByIds(Long[] ids);
+
+    /**
+     * 删除收款登记信息
+     * 
+     * @param id 收款登记主键
+     * @return 结果
+     */
+    public int deleteSaleRegistrationCollectionById(Long id);
+
+    /**
+     * 查询收款登记列表
+     */
+    List<SaleRegistrationCollectionVo> selectRegistrationCollectionList(SaleRegistrationCollection saleRegistrationCollection);
+
+    /**
+     * 审核接口
+     * @param saleRegistrationCollection
+     * @return
+     */
+    int audit(SaleRegistrationCollection saleRegistrationCollection);
+
+}

+ 101 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/CustomerSettlementUnitServiceImpl.java

@@ -0,0 +1,101 @@
+package com.zkqy.business.service.impl;
+
+import java.util.List;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.business.mapper.CustomerSettlementUnitMapper;
+import com.zkqy.business.domain.CustomerSettlementUnit;
+import com.zkqy.business.service.ICustomerSettlementUnitService;
+
+/**
+ * 客户结算单位Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-06-27
+ */
+@Service
+public class CustomerSettlementUnitServiceImpl implements ICustomerSettlementUnitService 
+{
+    @Autowired
+    private CustomerSettlementUnitMapper customerSettlementUnitMapper;
+
+    /**
+     * 查询客户结算单位
+     * 
+     * @param id 客户结算单位主键
+     * @return 客户结算单位
+     */
+    @Override
+    public CustomerSettlementUnit selectCustomerSettlementUnitById(Long id)
+    {
+        return customerSettlementUnitMapper.selectCustomerSettlementUnitById(id);
+    }
+
+    /**
+     * 查询客户结算单位列表
+     * 
+     * @param customerSettlementUnit 客户结算单位
+     * @return 客户结算单位
+     */
+    @Override
+    public List<CustomerSettlementUnit> selectCustomerSettlementUnitList(CustomerSettlementUnit customerSettlementUnit)
+    {
+        return customerSettlementUnitMapper.selectCustomerSettlementUnitList(customerSettlementUnit);
+    }
+
+    /**
+     * 新增客户结算单位
+     * 
+     * @param customerSettlementUnit 客户结算单位
+     * @return 结果
+     */
+    @Override
+    public int insertCustomerSettlementUnit(CustomerSettlementUnit customerSettlementUnit)
+    {
+        customerSettlementUnit.setCreateTime(DateUtils.getNowDate());
+        customerSettlementUnit.setCreateBy(SecurityUtils.getUsername());
+        customerSettlementUnit.setCreateById(SecurityUtils.getUserId());
+        return customerSettlementUnitMapper.insertCustomerSettlementUnit(customerSettlementUnit);
+    }
+
+    /**
+     * 修改客户结算单位
+     * 
+     * @param customerSettlementUnit 客户结算单位
+     * @return 结果
+     */
+    @Override
+    public int updateCustomerSettlementUnit(CustomerSettlementUnit customerSettlementUnit)
+    {
+        customerSettlementUnit.setUpdateTime(DateUtils.getNowDate());
+        customerSettlementUnit.setUpdateBy(SecurityUtils.getUsername());
+        customerSettlementUnit.setUpdateById(SecurityUtils.getUserId());
+        return customerSettlementUnitMapper.updateCustomerSettlementUnit(customerSettlementUnit);
+    }
+
+    /**
+     * 批量删除客户结算单位
+     * 
+     * @param ids 需要删除的客户结算单位主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerSettlementUnitByIds(Long[] ids)
+    {
+        return customerSettlementUnitMapper.deleteCustomerSettlementUnitByIds(ids);
+    }
+
+    /**
+     * 删除客户结算单位信息
+     * 
+     * @param id 客户结算单位主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerSettlementUnitById(Long id)
+    {
+        return customerSettlementUnitMapper.deleteCustomerSettlementUnitById(id);
+    }
+}

+ 103 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/FinishedProductInvoiceServiceImpl.java

@@ -0,0 +1,103 @@
+package com.zkqy.business.service.impl;
+
+import java.util.List;
+
+import com.zkqy.business.domain.vo.FinishedProductInvoiceVo;
+import com.zkqy.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.business.mapper.FinishedProductInvoiceMapper;
+import com.zkqy.business.domain.FinishedProductInvoice;
+import com.zkqy.business.service.IFinishedProductInvoiceService;
+
+/**
+ * 成品发票Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-07-01
+ */
+@Service
+public class FinishedProductInvoiceServiceImpl implements IFinishedProductInvoiceService 
+{
+    @Autowired
+    private FinishedProductInvoiceMapper finishedProductInvoiceMapper;
+
+    /**
+     * 查询成品发票
+     * 
+     * @param id 成品发票主键
+     * @return 成品发票
+     */
+    @Override
+    public FinishedProductInvoice selectFinishedProductInvoiceById(Long id)
+    {
+        return finishedProductInvoiceMapper.selectFinishedProductInvoiceById(id);
+    }
+
+    /**
+     * 查询成品发票列表
+     * 
+     * @param finishedProductInvoice 成品发票
+     * @return 成品发票
+     */
+    @Override
+    public List<FinishedProductInvoice> selectFinishedProductInvoiceList(FinishedProductInvoice finishedProductInvoice)
+    {
+        return finishedProductInvoiceMapper.selectFinishedProductInvoiceList(finishedProductInvoice);
+    }
+
+    /**
+     * 新增成品发票
+     * 
+     * @param finishedProductInvoice 成品发票
+     * @return 结果
+     */
+    @Override
+    public int insertFinishedProductInvoice(FinishedProductInvoice finishedProductInvoice)
+    {
+        finishedProductInvoice.setCreateTime(DateUtils.getNowDate());
+        return finishedProductInvoiceMapper.insertFinishedProductInvoice(finishedProductInvoice);
+    }
+
+    /**
+     * 修改成品发票
+     * 
+     * @param finishedProductInvoice 成品发票
+     * @return 结果
+     */
+    @Override
+    public int updateFinishedProductInvoice(FinishedProductInvoice finishedProductInvoice)
+    {
+        finishedProductInvoice.setUpdateTime(DateUtils.getNowDate());
+        return finishedProductInvoiceMapper.updateFinishedProductInvoice(finishedProductInvoice);
+    }
+
+    /**
+     * 批量删除成品发票
+     * 
+     * @param ids 需要删除的成品发票主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFinishedProductInvoiceByIds(List<Long> ids)
+    {
+        return finishedProductInvoiceMapper.deleteFinishedProductInvoiceByIds(ids);
+    }
+
+    /**
+     * 删除成品发票信息
+     * 
+     * @param id 成品发票主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFinishedProductInvoiceById(Long id)
+    {
+        return finishedProductInvoiceMapper.deleteFinishedProductInvoiceById(id);
+    }
+
+    @Override
+    public List<FinishedProductInvoiceVo> selectFinishedProductInvoiceList1(FinishedProductInvoice finishedProductInvoice) {
+        return finishedProductInvoiceMapper.selectFinishedProductInvoiceList1(finishedProductInvoice);
+    }
+}

+ 15 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductInventoryServiceImpl.java

@@ -262,9 +262,24 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
         productHandsetOutboundRecord.setNoticeNumber(productInvoice.getNoticeNumber());
         List<ProductHandsetOutboundRecord> productHandsetOutboundRecords =
                 productHandsetOutboundRecordMapper.selectProductHandsetOutboundRecordList(productHandsetOutboundRecord);
+
+        //根据通知单查询已出库的货品
+        ProductOutboundRecord productOutboundRecord1 = new ProductOutboundRecord();
+        productOutboundRecord1.setNoticeNumber(productInvoice.getNoticeNumber());
+        List<ProductOutboundRecord> productOutboundRecords = productOutboundRecordMapper.selectProductOutboundRecordList(productOutboundRecord1);
+
+
+
         // 循环插入出库记录
         for (ProductHandsetOutboundRecord productHandsetOutboundRecord1 : productHandsetOutboundRecords) {
 
+
+            boolean exists = productOutboundRecords.stream()
+                    .anyMatch(record -> record.getQrCodeId().equals(productHandsetOutboundRecord1.getQrCodeId()));
+            if (exists) {
+                continue;
+            }
+
             ProductOutboundRecord productOutboundRecord = new ProductOutboundRecord();
             BeanUtils.copyProperties(productHandsetOutboundRecord1, productOutboundRecord);
             productOutboundRecord.setWarehousingTime(productInvoice.getDeliveryDate());

+ 1 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductInvoiceServiceImpl.java

@@ -161,6 +161,7 @@ public class ProductInvoiceServiceImpl implements IProductInvoiceService {
             }
 
             vo.setSaleProductInfoList(saleProductInfoList1);
+            //库存箱数和重量
             if (saleProductInfoList1.size() > 0) {
                 ProductInventory productInventory1 = new ProductInventory();
                 productInventory1.setProductId(saleProductInfoList1.get(0).getProductId());

+ 95 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductOutboundRecordBatchServiceImpl.java

@@ -0,0 +1,95 @@
+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.ProductOutboundRecordBatchMapper;
+import com.zkqy.business.domain.ProductOutboundRecordBatch;
+import com.zkqy.business.service.IProductOutboundRecordBatchService;
+
+/**
+ * 成品出库记录批次Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-06-28
+ */
+@Service
+public class ProductOutboundRecordBatchServiceImpl implements IProductOutboundRecordBatchService 
+{
+    @Autowired
+    private ProductOutboundRecordBatchMapper productOutboundRecordBatchMapper;
+
+    /**
+     * 查询成品出库记录批次
+     * 
+     * @param id 成品出库记录批次主键
+     * @return 成品出库记录批次
+     */
+    @Override
+    public ProductOutboundRecordBatch selectProductOutboundRecordBatchById(Long id)
+    {
+        return productOutboundRecordBatchMapper.selectProductOutboundRecordBatchById(id);
+    }
+
+    /**
+     * 查询成品出库记录批次列表
+     * 
+     * @param productOutboundRecordBatch 成品出库记录批次
+     * @return 成品出库记录批次
+     */
+    @Override
+    public List<ProductOutboundRecordBatch> selectProductOutboundRecordBatchList(ProductOutboundRecordBatch productOutboundRecordBatch)
+    {
+        return productOutboundRecordBatchMapper.selectProductOutboundRecordBatchList(productOutboundRecordBatch);
+    }
+
+    /**
+     * 新增成品出库记录批次
+     * 
+     * @param productOutboundRecordBatch 成品出库记录批次
+     * @return 结果
+     */
+    @Override
+    public int insertProductOutboundRecordBatch(ProductOutboundRecordBatch productOutboundRecordBatch)
+    {
+        productOutboundRecordBatch.setCreateTime(DateUtils.getNowDate());
+        return productOutboundRecordBatchMapper.insertProductOutboundRecordBatch(productOutboundRecordBatch);
+    }
+
+    /**
+     * 修改成品出库记录批次
+     * 
+     * @param productOutboundRecordBatch 成品出库记录批次
+     * @return 结果
+     */
+    @Override
+    public int updateProductOutboundRecordBatch(ProductOutboundRecordBatch productOutboundRecordBatch)
+    {
+        return productOutboundRecordBatchMapper.updateProductOutboundRecordBatch(productOutboundRecordBatch);
+    }
+
+    /**
+     * 批量删除成品出库记录批次
+     * 
+     * @param ids 需要删除的成品出库记录批次主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductOutboundRecordBatchByIds(Long[] ids)
+    {
+        return productOutboundRecordBatchMapper.deleteProductOutboundRecordBatchByIds(ids);
+    }
+
+    /**
+     * 删除成品出库记录批次信息
+     * 
+     * @param id 成品出库记录批次主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductOutboundRecordBatchById(Long id)
+    {
+        return productOutboundRecordBatchMapper.deleteProductOutboundRecordBatchById(id);
+    }
+}

+ 250 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleAccountsReceivableDetailServiceImpl.java

@@ -0,0 +1,250 @@
+package com.zkqy.business.service.impl;
+
+import java.text.DecimalFormat;
+import java.util.List;
+
+import com.zkqy.business.domain.Customer;
+import com.zkqy.business.domain.FinishedProductInvoice;
+import com.zkqy.business.domain.SaleOrder;
+import com.zkqy.business.domain.vo.FinishedProductInvoiceVo;
+import com.zkqy.business.mapper.CustomerMapper;
+import com.zkqy.business.mapper.FinishedProductInvoiceMapper;
+import com.zkqy.business.mapper.SaleOrderMapper;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.SecurityUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.business.mapper.SaleAccountsReceivableDetailMapper;
+import com.zkqy.business.domain.SaleAccountsReceivableDetail;
+import com.zkqy.business.service.ISaleAccountsReceivableDetailService;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 应收帐明细Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-06-27
+ */
+@Service
+public class SaleAccountsReceivableDetailServiceImpl implements ISaleAccountsReceivableDetailService 
+{
+    @Autowired
+    private SaleAccountsReceivableDetailMapper saleAccountsReceivableDetailMapper;
+
+    @Autowired
+    private CustomerMapper customerMapper;
+
+    @Autowired
+    private SaleOrderMapper saleOrderMapper;
+
+    @Autowired
+    private FinishedProductInvoiceMapper finishedProductInvoiceMapper;
+
+    /**
+     * 查询应收帐明细
+     * 
+     * @param id 应收帐明细主键
+     * @return 应收帐明细
+     */
+    @Override
+    public SaleAccountsReceivableDetail selectSaleAccountsReceivableDetailById(Long id)
+    {
+        return saleAccountsReceivableDetailMapper.selectSaleAccountsReceivableDetailById(id);
+    }
+
+    /**
+     * 查询应收帐明细列表
+     * 
+     * @param saleAccountsReceivableDetail 应收帐明细
+     * @return 应收帐明细
+     */
+    @Override
+    public List<SaleAccountsReceivableDetail> selectSaleAccountsReceivableDetailList(SaleAccountsReceivableDetail saleAccountsReceivableDetail)
+    {
+        return saleAccountsReceivableDetailMapper.selectSaleAccountsReceivableDetailList(saleAccountsReceivableDetail);
+    }
+
+    /**
+     * 新增应收帐明细
+     * 
+     * @param saleAccountsReceivableDetail 应收帐明细
+     * @return 结果
+     */
+    @Override
+    public int insertSaleAccountsReceivableDetail(SaleAccountsReceivableDetail saleAccountsReceivableDetail)
+    {
+        saleAccountsReceivableDetail.setCreateTime(DateUtils.getNowDate());
+        return saleAccountsReceivableDetailMapper.insertSaleAccountsReceivableDetail(saleAccountsReceivableDetail);
+    }
+
+    /**
+     * 修改应收帐明细
+     * 
+     * @param saleAccountsReceivableDetail 应收帐明细
+     * @return 结果
+     */
+    @Override
+    public int updateSaleAccountsReceivableDetail(SaleAccountsReceivableDetail saleAccountsReceivableDetail)
+    {
+        saleAccountsReceivableDetail.setUpdateTime(DateUtils.getNowDate());
+        saleAccountsReceivableDetail.setUpdateById(SecurityUtils.getUserId());
+        saleAccountsReceivableDetail.setUpdateBy(SecurityUtils.getUsername());
+        return saleAccountsReceivableDetailMapper.updateSaleAccountsReceivableDetail(saleAccountsReceivableDetail);
+    }
+
+    /**
+     * 批量删除应收帐明细
+     * 
+     * @param ids 需要删除的应收帐明细主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSaleAccountsReceivableDetailByIds(Long[] ids)
+    {
+        return saleAccountsReceivableDetailMapper.deleteSaleAccountsReceivableDetailByIds(ids);
+    }
+
+    /**
+     * 删除应收帐明细信息
+     * 
+     * @param id 应收帐明细主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSaleAccountsReceivableDetailById(Long id)
+    {
+        return saleAccountsReceivableDetailMapper.deleteSaleAccountsReceivableDetailById(id);
+    }
+
+    @Override
+    @Transactional
+    public int returnReceipt(List<SaleAccountsReceivableDetail> saleAccountsReceivableDetailList) {
+        int rows = 0;
+        for (SaleAccountsReceivableDetail saleAccountsReceivableDetail : saleAccountsReceivableDetailList){
+            rows += saleAccountsReceivableDetailMapper.updateSaleAccountsReceivableDetail(saleAccountsReceivableDetail);
+        }
+        return rows;
+    }
+
+    @Override
+    @Transactional
+    public int editAccountsReceivableDetail(SaleAccountsReceivableDetail saleAccountsReceivableDetail) {
+        // 修改当前备注、单价、金额等信息
+        saleAccountsReceivableDetailMapper.updateSaleAccountsReceivableDetail(saleAccountsReceivableDetail);
+
+        //查询该客户所有待审批的应收帐明细
+        SaleAccountsReceivableDetail saleAccountsReceivableDetail1 = new SaleAccountsReceivableDetail();
+        saleAccountsReceivableDetail1.setCustomerId(saleAccountsReceivableDetail.getCustomerId());
+        saleAccountsReceivableDetail1.setStatus("1");
+        List<SaleAccountsReceivableDetail> list = saleAccountsReceivableDetailMapper.selectAccountsReceivableDetailList(saleAccountsReceivableDetail1);
+
+        // 重新计算该客户当前审批明细余额
+        //根据销售单号查询销售单详情
+        SaleOrder saleOrder = saleOrderMapper.selectSaleOrderBySaleNo(saleAccountsReceivableDetail.getSaleNo());
+        //根据客户编号查询客户信息和余额
+        Customer customer = customerMapper.selectCustomerByCustomerNo(saleOrder.getSaleCustomNo());
+        //客户余额
+        Double amount = customer.getAmount();
+        for (SaleAccountsReceivableDetail detail : list){
+            //减后余额
+            Double subtractAmount = amount - detail.getAmountReceivable();
+            amount -= detail.getAmountReceivable();
+            detail.setAmounts(handlingWeight(subtractAmount));
+            saleAccountsReceivableDetailMapper.updateSaleAccountsReceivableDetail(detail);
+        }
+
+        return 1;
+    }
+
+    @Override
+    @Transactional
+    public int reviewApproved(SaleAccountsReceivableDetail saleAccountsReceivableDetail) {
+
+        //根据销售单号查询销售单详情
+        SaleOrder saleOrder = saleOrderMapper.selectSaleOrderBySaleNo(saleAccountsReceivableDetail.getSaleNo());
+        //根据客户编号查询客户信息和余额
+        Customer customer = customerMapper.selectCustomerByCustomerNo(saleOrder.getSaleCustomNo());
+        //客户余额
+        Double amount = customer.getAmount();
+        //加后余额
+        Double subtractAmount = amount + saleAccountsReceivableDetail.getAmountReceivable();
+        saleAccountsReceivableDetail.setAmounts(handlingWeight(subtractAmount));
+        saleAccountsReceivableDetailMapper.updateSaleAccountsReceivableDetail(saleAccountsReceivableDetail);
+
+        //删除原来数据在新增
+        saleAccountsReceivableDetailMapper.deleteSaleAccountsReceivableDetailById(saleAccountsReceivableDetail.getId());
+        SaleAccountsReceivableDetail saleAccountsReceivableDetail2 = saleAccountsReceivableDetailMapper.selectSaleAccountsReceivableDetailById(saleAccountsReceivableDetail.getId());
+        saleAccountsReceivableDetailMapper.insertSaleAccountsReceivableDetail(saleAccountsReceivableDetail2);
+
+
+        //修改客户余额
+        Customer customer1 = new Customer();
+        customer1.setId(customer.getId());
+        customer1.setAmount(handlingWeight(subtractAmount));
+        customerMapper.updateCustomer(customer1);
+
+        //重新计算待办明细审核金额
+
+        //查询该客户所有待审批的应收帐明细
+        SaleAccountsReceivableDetail saleAccountsReceivableDetail1 = new SaleAccountsReceivableDetail();
+        saleAccountsReceivableDetail1.setCustomerId(customer.getId());
+        saleAccountsReceivableDetail1.setStatus("1");
+        List<SaleAccountsReceivableDetail> list = saleAccountsReceivableDetailMapper.selectAccountsReceivableDetailList(saleAccountsReceivableDetail1);
+        // 重新计算该客户当前审批明细余额
+
+        //根据销售单号查询销售单详情
+        SaleOrder saleOrder1 = saleOrderMapper.selectSaleOrderBySaleNo(saleAccountsReceivableDetail.getSaleNo());
+        //根据客户编号查询客户信息和余额
+        Customer customer2 = customerMapper.selectCustomerByCustomerNo(saleOrder1.getSaleCustomNo());
+        //客户余额
+        Double amount1 = customer2.getAmount();
+        for (SaleAccountsReceivableDetail detail : list){
+            //减后余额
+            Double subtractAmount1 = amount1 + detail.getAmountReceivable();
+            amount1 += detail.getAmountReceivable();
+            detail.setAmounts(handlingWeight(subtractAmount1));
+            saleAccountsReceivableDetailMapper.updateSaleAccountsReceivableDetail(detail);
+        }
+
+        return 1;
+
+    }
+
+    @Transactional
+    @Override
+    public int billing(FinishedProductInvoiceVo vo) {
+        // 添加发票
+        FinishedProductInvoice finishedProductInvoice = new FinishedProductInvoice();
+        BeanUtils.copyProperties(vo, finishedProductInvoice);
+        finishedProductInvoice.setCreateBy(SecurityUtils.getUsername());
+        finishedProductInvoice.setCreateById(SecurityUtils.getUserId());
+        finishedProductInvoice.setCreateTime(DateUtils.getNowDate());
+        finishedProductInvoiceMapper.insertFinishedProductInvoice(finishedProductInvoice);
+        // 修改发票明细
+        SaleAccountsReceivableDetail saleAccountsReceivableDetail = new SaleAccountsReceivableDetail();
+        saleAccountsReceivableDetail.setId(vo.getAccountsReceivableDetailId());
+        saleAccountsReceivableDetail.setBillingFlag(vo.getBillingFlag());
+        return saleAccountsReceivableDetailMapper.updateSaleAccountsReceivableDetail(saleAccountsReceivableDetail);
+    }
+
+    @Transactional
+    @Override
+    public int cancelBilling(FinishedProductInvoiceVo vo) {
+        //删除发票
+        finishedProductInvoiceMapper.deleteFinishedProductInvoiceById(vo.getId());
+        //修改应收明细开票标志
+        SaleAccountsReceivableDetail saleAccountsReceivableDetail = new SaleAccountsReceivableDetail();
+        saleAccountsReceivableDetail.setId(vo.getAccountsReceivableDetailId());
+        saleAccountsReceivableDetail.setBillingFlag(vo.getBillingFlag());
+        return saleAccountsReceivableDetailMapper.updateSaleAccountsReceivableDetail(saleAccountsReceivableDetail);
+    }
+
+
+    //保留两位小数
+    public Double handlingWeight(Double weight) {
+        DecimalFormat df = new DecimalFormat("0.00");
+        return Double.parseDouble(df.format(weight));
+    }
+
+}

+ 87 - 8
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleOrderServiceImpl.java

@@ -3,13 +3,10 @@ package com.zkqy.business.service.impl;
 import java.text.DecimalFormat;
 import java.util.*;
 
-import com.zkqy.business.domain.ProductInvoice;
-import com.zkqy.business.domain.SaleCraft;
-import com.zkqy.business.domain.SaleProducts;
+import com.zkqy.business.domain.*;
 import com.zkqy.business.domain.vo.SaleOrderVO;
-import com.zkqy.business.mapper.ProductInvoiceMapper;
-import com.zkqy.business.mapper.SaleCraftMapper;
-import com.zkqy.business.mapper.SaleProductsMapper;
+import com.zkqy.business.domain.vo.SaleProductsVo;
+import com.zkqy.business.mapper.*;
 import com.zkqy.common.core.domain.entity.SysRole;
 import com.zkqy.common.core.domain.entity.SysUser;
 import com.zkqy.common.utils.DateUtils;
@@ -18,8 +15,6 @@ import com.zkqy.common.utils.bean.BeanUtils;
 import com.zkqy.system.service.ISysUserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.zkqy.business.mapper.SaleOrderMapper;
-import com.zkqy.business.domain.SaleOrder;
 import com.zkqy.business.service.ISaleOrderService;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -46,6 +41,18 @@ public class SaleOrderServiceImpl implements ISaleOrderService {
     @Autowired
     private ISysUserService iSysUserService;
 
+    @Autowired
+    private CustomerMapper customerMapper;
+
+    @Autowired
+    private SaleAccountsReceivableDetailMapper saleAccountsReceivableDetailMapper;
+
+    @Autowired
+    private ProductOutboundRecordMapper productOutboundRecordMapper;
+
+    @Autowired
+    private ProductOutboundRecordBatchMapper productOutboundRecordBatchMapper;
+
     /**
      * 查询销售订单
      *
@@ -433,6 +440,78 @@ public class SaleOrderServiceImpl implements ISaleOrderService {
         return saleOrderMapper.updateSaleOrder(saleOrder);
     }
 
+    @Override
+    public List<SaleProductsVo> printOutsourceOrderList(String saleNo) {
+        //根据销售编号获取通知单信息
+        ProductInvoice productInvoice = productInvoiceMapper.selectProductInvoiceBySaleOrderNo(saleNo);
+        if(productInvoice == null){
+            return new ArrayList<>();
+        }
+        //获取最后一个批次出库的产品
+        List<SaleProductsVo> saleProductsVos = saleOrderMapper.printOutsourceOrderList(productInvoice.getNoticeNumber(),saleNo);
+        return saleProductsVos;
+    }
+
+    @Override
+    @Transactional
+    public int printOutsourceOrder(List<SaleAccountsReceivableDetail> saleAccountsReceivableDetailList) {
+
+        //根据销售单号查询销售单详情
+        SaleOrder saleOrder = saleOrderMapper.selectSaleOrderBySaleNo(saleAccountsReceivableDetailList.get(0).getSaleNo());
+        //根据客户编号查询客户信息和余额
+        Customer customer = customerMapper.selectCustomerByCustomerNo(saleOrder.getSaleCustomNo());
+        //客户余额
+        Double amount = customer.getAmount();
+
+        for (SaleAccountsReceivableDetail saleAccountsReceivableDetail : saleAccountsReceivableDetailList){
+            saleAccountsReceivableDetail.setCustomerId(customer.getId());
+            //加后余额
+            Double subtractAmount = amount + saleAccountsReceivableDetail.getAmountReceivable();
+            amount += saleAccountsReceivableDetail.getAmountReceivable();
+            saleAccountsReceivableDetail.setAmounts(handlingWeight(subtractAmount));
+            saleAccountsReceivableDetail.setCreateBy(SecurityUtils.getUsername());
+            saleAccountsReceivableDetail.setCreateById(SecurityUtils.getUserId());
+            saleAccountsReceivableDetail.setCreateTime(DateUtils.getNowDate());
+        }
+        if (saleAccountsReceivableDetailList.size() > 0 ){
+            saleAccountsReceivableDetailMapper.batchInsertSaleAccountsReceivableDetail(saleAccountsReceivableDetailList);
+        }
+        // 记录已发货品信息
+        List<Long> list = productOutboundRecordMapper.selectOutboundRecordNo(saleAccountsReceivableDetailList.get(0).getNoticeNumber());
+        if(list.size() > 0){
+            List<ProductOutboundRecordBatch> productOutboundRecordBatchList = new ArrayList<>();
+            // 查询当前批次出库记录
+            Long batchNumber = productOutboundRecordBatchMapper.selectBatchNumberByNoticeNumber(saleAccountsReceivableDetailList.get(0).getNoticeNumber());
+            for (Long id : list){
+                ProductOutboundRecordBatch productOutboundRecordBatch = new ProductOutboundRecordBatch();
+                productOutboundRecordBatch.setBatchNumber(batchNumber);
+                productOutboundRecordBatch.setOutboundRecordId(id);
+                productOutboundRecordBatch.setNoticeNumber(saleAccountsReceivableDetailList.get(0).getNoticeNumber());
+                productOutboundRecordBatch.setCreateBy(SecurityUtils.getUsername());
+                productOutboundRecordBatch.setCreateById(SecurityUtils.getUserId());
+                productOutboundRecordBatch.setCreateTime(DateUtils.getNowDate());
+                productOutboundRecordBatchList.add(productOutboundRecordBatch);
+            }
+            //新增批次出库记录
+            productOutboundRecordBatchMapper.batchInsertProductOutboundRecordBatch(productOutboundRecordBatchList);
+        }
+        //修改客户余额
+//        customer.setAmount(handlingWeight(amount));
+//        return customerMapper.updateCustomer(customer);
+        return 1;
+    }
+
+
+
+
+
+
+
+
+
+
+
+
 
     @Override
     public List<Map<String, Object>> saleOrderTop10List() {

+ 157 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleOtherCollectionServiceImpl.java

@@ -0,0 +1,157 @@
+package com.zkqy.business.service.impl;
+
+import java.text.DecimalFormat;
+import java.util.List;
+
+import com.zkqy.business.domain.Customer;
+import com.zkqy.business.domain.SaleAccountsReceivableDetail;
+import com.zkqy.business.mapper.CustomerMapper;
+import com.zkqy.business.mapper.SaleAccountsReceivableDetailMapper;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.business.mapper.SaleOtherCollectionMapper;
+import com.zkqy.business.domain.SaleOtherCollection;
+import com.zkqy.business.service.ISaleOtherCollectionService;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 其他收款Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-07-03
+ */
+@Service
+public class SaleOtherCollectionServiceImpl implements ISaleOtherCollectionService 
+{
+    @Autowired
+    private SaleOtherCollectionMapper saleOtherCollectionMapper;
+
+    @Autowired
+    private CustomerMapper customerMapper;
+
+    @Autowired
+    private SaleAccountsReceivableDetailMapper saleAccountsReceivableDetailMapper;
+
+    /**
+     * 查询其他收款
+     * 
+     * @param id 其他收款主键
+     * @return 其他收款
+     */
+    @Override
+    public SaleOtherCollection selectSaleOtherCollectionById(Long id)
+    {
+        return saleOtherCollectionMapper.selectSaleOtherCollectionById(id);
+    }
+
+    /**
+     * 查询其他收款列表
+     * 
+     * @param saleOtherCollection 其他收款
+     * @return 其他收款
+     */
+    @Override
+    public List<SaleOtherCollection> selectSaleOtherCollectionList(SaleOtherCollection saleOtherCollection)
+    {
+        return saleOtherCollectionMapper.selectSaleOtherCollectionList(saleOtherCollection);
+    }
+
+    /**
+     * 新增其他收款
+     * 
+     * @param saleOtherCollection 其他收款
+     * @return 结果
+     */
+    @Override
+    public int insertSaleOtherCollection(SaleOtherCollection saleOtherCollection)
+    {
+        saleOtherCollection.setCreateTime(DateUtils.getNowDate());
+        saleOtherCollection.setCreateById(SecurityUtils.getUserId());
+        saleOtherCollection.setCreateBy(SecurityUtils.getUsername());
+        return saleOtherCollectionMapper.insertSaleOtherCollection(saleOtherCollection);
+    }
+
+    /**
+     * 修改其他收款
+     * 
+     * @param saleOtherCollection 其他收款
+     * @return 结果
+     */
+    @Override
+    public int updateSaleOtherCollection(SaleOtherCollection saleOtherCollection)
+    {
+        saleOtherCollection.setUpdateTime(DateUtils.getNowDate());
+        saleOtherCollection.setUpdateById(SecurityUtils.getUserId());
+        saleOtherCollection.setUpdateBy(SecurityUtils.getUsername());
+        return saleOtherCollectionMapper.updateSaleOtherCollection(saleOtherCollection);
+    }
+
+    /**
+     * 批量删除其他收款
+     * 
+     * @param ids 需要删除的其他收款主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSaleOtherCollectionByIds(List<Long> ids)
+    {
+        return saleOtherCollectionMapper.deleteSaleOtherCollectionByIds(ids);
+    }
+
+    /**
+     * 删除其他收款信息
+     * 
+     * @param id 其他收款主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSaleOtherCollectionById(Long id)
+    {
+        return saleOtherCollectionMapper.deleteSaleOtherCollectionById(id);
+    }
+
+    @Override
+    @Transactional
+    public int audit(SaleOtherCollection saleOtherCollection) {
+        //修改其他收款状态、已记账标志
+        saleOtherCollection.setBookkeepingFlag("1");//已记账
+        saleOtherCollectionMapper.updateSaleOtherCollection(saleOtherCollection);
+
+        //修改客户余额
+        //根据客户编号查询客户信息和余额
+        Customer customer = customerMapper.selectCustomerById(saleOtherCollection.getCustomerId());
+        //客户余额
+        Double amount = customer.getAmount();
+        //减后余额
+        Double subtractAmount = amount - saleOtherCollection.getAmount();
+        customer.setAmount(handlingWeight(subtractAmount));
+        customerMapper.updateCustomer(customer);
+
+        //添加应收明细
+        SaleAccountsReceivableDetail saleAccountsReceivableDetail = new SaleAccountsReceivableDetail();
+        saleAccountsReceivableDetail.setAccountingType("3");// 账务类型:其他收款
+        saleAccountsReceivableDetail.setCustomerId(saleOtherCollection.getCustomerId());// 客户名称
+        saleAccountsReceivableDetail.setAccountsReceivableDate(saleOtherCollection.getOtherCollectionDate()); // 日期
+        saleAccountsReceivableDetail.setBoxNum(0L); // 箱数
+        saleAccountsReceivableDetail.setWeight(0.00);//重量
+        saleAccountsReceivableDetail.setProductPrice(0.00);//单价
+        saleAccountsReceivableDetail.setAmountReceivable(0.00);//应收金额
+        saleAccountsReceivableDetail.setReceivedAmount(saleOtherCollection.getAmount());//已收金额
+        saleAccountsReceivableDetail.setAmounts(handlingWeight(subtractAmount));//余额
+        saleAccountsReceivableDetail.setPaymentMethod(saleOtherCollection.getPaymentMethod());//付款方式
+        saleAccountsReceivableDetail.setBillingType("1");//开票类型
+        saleAccountsReceivableDetail.setAccountsReceivableRemark(saleOtherCollection.getCollectionDetails());//备注
+        saleAccountsReceivableDetail.setStatus("2");
+        saleAccountsReceivableDetail.setReturnReceipt("0");
+        saleAccountsReceivableDetail.setSettlementUnit(saleOtherCollection.getSettlementUnitId());
+        return saleAccountsReceivableDetailMapper.insertSaleAccountsReceivableDetail(saleAccountsReceivableDetail);
+    }
+
+    //保留两位小数
+    public Double handlingWeight(Double weight) {
+        DecimalFormat df = new DecimalFormat("0.00");
+        return Double.parseDouble(df.format(weight));
+    }
+}

+ 166 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleRegistrationCollectionServiceImpl.java

@@ -0,0 +1,166 @@
+package com.zkqy.business.service.impl;
+
+import java.text.DecimalFormat;
+import java.util.List;
+
+import com.zkqy.business.domain.Customer;
+import com.zkqy.business.domain.SaleAccountsReceivableDetail;
+import com.zkqy.business.domain.vo.SaleRegistrationCollectionVo;
+import com.zkqy.business.mapper.CustomerMapper;
+import com.zkqy.business.mapper.SaleAccountsReceivableDetailMapper;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.business.mapper.SaleRegistrationCollectionMapper;
+import com.zkqy.business.domain.SaleRegistrationCollection;
+import com.zkqy.business.service.ISaleRegistrationCollectionService;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 收款登记Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-06-27
+ */
+@Service
+public class SaleRegistrationCollectionServiceImpl implements ISaleRegistrationCollectionService 
+{
+    @Autowired
+    private SaleRegistrationCollectionMapper saleRegistrationCollectionMapper;
+
+    @Autowired
+    private CustomerMapper customerMapper;
+
+    @Autowired
+    private SaleAccountsReceivableDetailMapper saleAccountsReceivableDetailMapper;
+
+    /**
+     * 查询收款登记
+     * 
+     * @param id 收款登记主键
+     * @return 收款登记
+     */
+    @Override
+    public SaleRegistrationCollection selectSaleRegistrationCollectionById(Long id)
+    {
+        return saleRegistrationCollectionMapper.selectSaleRegistrationCollectionById(id);
+    }
+
+    /**
+     * 查询收款登记列表
+     * 
+     * @param saleRegistrationCollection 收款登记
+     * @return 收款登记
+     */
+    @Override
+    public List<SaleRegistrationCollection> selectSaleRegistrationCollectionList(SaleRegistrationCollection saleRegistrationCollection)
+    {
+        return saleRegistrationCollectionMapper.selectSaleRegistrationCollectionList(saleRegistrationCollection);
+    }
+
+    /**
+     * 新增收款登记
+     * 
+     * @param saleRegistrationCollection 收款登记
+     * @return 结果
+     */
+    @Override
+    public int insertSaleRegistrationCollection(SaleRegistrationCollection saleRegistrationCollection)
+    {
+        saleRegistrationCollection.setCreateTime(DateUtils.getNowDate());
+        saleRegistrationCollection.setCreateBy(SecurityUtils.getUsername());
+        saleRegistrationCollection.setCreateById(SecurityUtils.getUserId());
+        return saleRegistrationCollectionMapper.insertSaleRegistrationCollection(saleRegistrationCollection);
+    }
+
+    /**
+     * 修改收款登记
+     * 
+     * @param saleRegistrationCollection 收款登记
+     * @return 结果
+     */
+    @Override
+    public int updateSaleRegistrationCollection(SaleRegistrationCollection saleRegistrationCollection)
+    {
+        saleRegistrationCollection.setUpdateTime(DateUtils.getNowDate());
+        saleRegistrationCollection.setUpdateBy(SecurityUtils.getUsername());
+        saleRegistrationCollection.setUpdateById(SecurityUtils.getUserId());
+        return saleRegistrationCollectionMapper.updateSaleRegistrationCollection(saleRegistrationCollection);
+    }
+
+    /**
+     * 批量删除收款登记
+     * 
+     * @param ids 需要删除的收款登记主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSaleRegistrationCollectionByIds(Long[] ids)
+    {
+        return saleRegistrationCollectionMapper.deleteSaleRegistrationCollectionByIds(ids);
+    }
+
+    /**
+     * 删除收款登记信息
+     * 
+     * @param id 收款登记主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSaleRegistrationCollectionById(Long id)
+    {
+        return saleRegistrationCollectionMapper.deleteSaleRegistrationCollectionById(id);
+    }
+
+    @Override
+    public List<SaleRegistrationCollectionVo> selectRegistrationCollectionList(SaleRegistrationCollection saleRegistrationCollection) {
+        return saleRegistrationCollectionMapper.selectRegistrationCollectionList(saleRegistrationCollection);
+    }
+
+    @Override
+    @Transactional
+    public int audit(SaleRegistrationCollection saleRegistrationCollection) {
+
+        //修改收款登记状态、已记账标志
+        saleRegistrationCollection.setBookkeepingFlag("1");//已记账
+        saleRegistrationCollectionMapper.updateSaleRegistrationCollection(saleRegistrationCollection);
+
+        //修改客户余额
+        //根据客户编号查询客户信息和余额
+        Customer customer = customerMapper.selectCustomerById(saleRegistrationCollection.getCustomerId());
+        //客户余额
+        Double amount = customer.getAmount();
+        //减后余额
+        Double addedBalance = amount - saleRegistrationCollection.getAmounts();
+        customer.setAmount(handlingWeight(addedBalance));
+        customerMapper.updateCustomer(customer);
+
+        // 添加应收明细
+        SaleAccountsReceivableDetail saleAccountsReceivableDetail = new SaleAccountsReceivableDetail();
+        saleAccountsReceivableDetail.setAccountingType("2");// 账务类型
+        saleAccountsReceivableDetail.setCustomerId(saleRegistrationCollection.getCustomerId());// 客户名称
+        saleAccountsReceivableDetail.setAccountsReceivableDate(saleRegistrationCollection.getCollectionMoneyDate()); // 日期
+        saleAccountsReceivableDetail.setBoxNum(0L); // 箱数
+        saleAccountsReceivableDetail.setWeight(0.00);//重量
+        saleAccountsReceivableDetail.setProductPrice(0.00);//单价
+        saleAccountsReceivableDetail.setAmountReceivable(0.00);//应收金额
+        saleAccountsReceivableDetail.setReceivedAmount(saleRegistrationCollection.getAmounts());//已收金额
+        saleAccountsReceivableDetail.setAmounts(handlingWeight(addedBalance));//余额
+        saleAccountsReceivableDetail.setPaymentMethod(saleRegistrationCollection.getPaymentMethod());//付款方式
+        saleAccountsReceivableDetail.setBillingType("1");//开票类型
+        saleAccountsReceivableDetail.setAccountsReceivableRemark(saleRegistrationCollection.getRemark());//备注
+        saleAccountsReceivableDetail.setStatus("2");
+        saleAccountsReceivableDetail.setSettlementUnit(saleRegistrationCollection.getSettlementUnitId());//结算单位
+        saleAccountsReceivableDetail.setReturnReceipt("0");
+        return saleAccountsReceivableDetailMapper.insertSaleAccountsReceivableDetail(saleAccountsReceivableDetail);
+    }
+
+
+    //保留两位小数
+    public Double handlingWeight(Double weight) {
+        DecimalFormat df = new DecimalFormat("0.00");
+        return Double.parseDouble(df.format(weight));
+    }
+
+}

+ 7 - 1
zkqy-custom-business/src/main/resources/mapper/business/CustomerMapper.xml

@@ -29,10 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="taskProcessKey"    column="task_process_key"    />
         <result property="taskNodeKey"    column="task_node_key"    />
         <result property="amounts" column="amounts"/>
+        <result property="amount" column="amount"/>
     </resultMap>
 
     <sql id="selectCustomerVo">
-        select id, custom_no, custom_name, custom_phone_number, custom_landine, custom_mail, custom_type, custom_grade, custom_address, custom_country_type, custom_district, salesman, contact_person, 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}.customer
+        select id, custom_no, custom_name, custom_phone_number, custom_landine, custom_mail, custom_type, custom_grade, custom_address, custom_country_type, custom_district, salesman, contact_person, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, task_process_key, task_node_key,amount from {DBNAME}.customer
     </sql>
 
     <select id="selectCustomerList" parameterType="com.zkqy.business.domain.Customer" resultMap="CustomerResult">
@@ -78,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time,</if>
             <if test="taskProcessKey != null">task_process_key,</if>
             <if test="taskNodeKey != null">task_node_key,</if>
+            amount,
             del_flag
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -99,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">#{createTime},</if>
             <if test="taskProcessKey != null">#{taskProcessKey},</if>
             <if test="taskNodeKey != null">#{taskNodeKey},</if>
+            0,
             '0'
          </trim>
     </insert>
@@ -124,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
             <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+            <if test="amount != null">amount = #{amount},</if>
         </trim>
         where id = #{id}
     </update>
@@ -221,6 +225,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         create_by_id,
         create_by,
         create_time,
+        amount,
         del_flag
         ) VALUES
         <foreach collection="list" item="item" index="index" separator=",">
@@ -241,6 +246,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{item.createById},
             #{item.createBy},
             #{item.createTime},
+            0,
             '0'
             )
         </foreach>

+ 87 - 0
zkqy-custom-business/src/main/resources/mapper/business/CustomerSettlementUnitMapper.xml

@@ -0,0 +1,87 @@
+<?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.CustomerSettlementUnitMapper">
+    
+    <resultMap type="com.zkqy.business.domain.CustomerSettlementUnit" id="CustomerSettlementUnitResult">
+        <result property="id"    column="id"    />
+        <result property="customerId"    column="customer_id"    />
+        <result property="customerName"    column="customer_name"    />
+        <result property="customerRegion"    column="customer_region"    />
+        <result property="remark"    column="remark"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+    </resultMap>
+
+    <sql id="selectCustomerSettlementUnitVo">
+        select id, customer_id, customer_name, customer_region, remark, create_by, create_by_id, create_time, update_by, update_by_id, update_time, del_flag from {DBNAME}.customer_settlement_unit
+    </sql>
+
+    <select id="selectCustomerSettlementUnitList" parameterType="com.zkqy.business.domain.CustomerSettlementUnit" resultMap="CustomerSettlementUnitResult">
+        <include refid="selectCustomerSettlementUnitVo"/>
+        where del_flag = '0'
+            <if test="customerId != null "> and customer_id = #{customerId}</if>
+            <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
+            <if test="customerRegion != null  and customerRegion != ''"> and customer_region = #{customerRegion}</if>
+    </select>
+    
+    <select id="selectCustomerSettlementUnitById" parameterType="Long" resultMap="CustomerSettlementUnitResult">
+        <include refid="selectCustomerSettlementUnitVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertCustomerSettlementUnit" parameterType="com.zkqy.business.domain.CustomerSettlementUnit" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.customer_settlement_unit
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="customerId != null">customer_id,</if>
+            <if test="customerName != null">customer_name,</if>
+            <if test="customerRegion != null">customer_region,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createTime != null">create_time,</if>
+            del_flag
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="customerId != null">#{customerId},</if>
+            <if test="customerName != null">#{customerName},</if>
+            <if test="customerRegion != null">#{customerRegion},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createTime != null">#{createTime},</if>
+            '0'
+         </trim>
+    </insert>
+
+    <update id="updateCustomerSettlementUnit" parameterType="com.zkqy.business.domain.CustomerSettlementUnit">
+        update {DBNAME}.customer_settlement_unit
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="customerId != null">customer_id = #{customerId},</if>
+            <if test="customerName != null">customer_name = #{customerName},</if>
+            <if test="customerRegion != null">customer_region = #{customerRegion},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCustomerSettlementUnitById" parameterType="Long">
+        delete from customer_settlement_unit where id = #{id}
+    </delete>
+
+    <delete id="deleteCustomerSettlementUnitByIds" parameterType="String">
+        update {DBNAME}.customer_settlement_unit set del_flag = '2' where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 216 - 0
zkqy-custom-business/src/main/resources/mapper/business/FinishedProductInvoiceMapper.xml

@@ -0,0 +1,216 @@
+<?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.FinishedProductInvoiceMapper">
+    
+    <resultMap type="com.zkqy.business.domain.FinishedProductInvoice" id="FinishedProductInvoiceResult">
+        <result property="id"    column="id"    />
+        <result property="invoiceDate"    column="invoice_date"    />
+        <result property="customerId"    column="customer_id"    />
+        <result property="settlementUnitId"    column="settlement_unit_id"    />
+        <result property="invoiceNumber"    column="invoice_number"    />
+        <result property="invoiceType"    column="invoice_type"    />
+        <result property="billingAmount"    column="billing_amount"    />
+        <result property="personInCharge"    column="person_in_charge"    />
+        <result property="accountsReceivableDetailId" column="accounts_receivable_detail_id"/>
+        <result property="remark"    column="remark"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+    </resultMap>
+
+    <sql id="selectFinishedProductInvoiceVo">
+        select id, invoice_date, customer_id, settlement_unit_id, invoice_number, invoice_type, billing_amount, person_in_charge,accounts_receivable_detail_id, remark, create_by, create_by_id, create_time, update_by, update_by_id, update_time, del_flag from {DBNAME}.finished_product_invoice
+    </sql>
+
+    <select id="selectFinishedProductInvoiceList" parameterType="com.zkqy.business.domain.FinishedProductInvoice" resultMap="FinishedProductInvoiceResult">
+        <include refid="selectFinishedProductInvoiceVo"/>
+        <where>  
+            <if test="invoiceDate != null "> and invoice_date = #{invoiceDate}</if>
+            <if test="customerId != null "> and customer_id = #{customerId}</if>
+            <if test="settlementUnitId != null "> and settlement_unit_id = #{settlementUnitId}</if>
+            <if test="invoiceNumber != null  and invoiceNumber != ''"> and invoice_number = #{invoiceNumber}</if>
+            <if test="invoiceType != null  and invoiceType != ''"> and invoice_type = #{invoiceType}</if>
+            <if test="billingAmount != null "> and billing_amount = #{billingAmount}</if>
+            <if test="personInCharge != null  and personInCharge != ''"> and person_in_charge = #{personInCharge}</if>
+            <if test="startTime != null and endTime != null">and invoice_date BETWEEN #{startTime} AND #{endTime}</if>
+        </where>
+    </select>
+    
+    <select id="selectFinishedProductInvoiceById" parameterType="Long" resultMap="FinishedProductInvoiceResult">
+        <include refid="selectFinishedProductInvoiceVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertFinishedProductInvoice" parameterType="com.zkqy.business.domain.FinishedProductInvoice" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.finished_product_invoice
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="invoiceDate != null">invoice_date,</if>
+            <if test="customerId != null">customer_id,</if>
+            <if test="settlementUnitId != null">settlement_unit_id,</if>
+            <if test="invoiceNumber != null">invoice_number,</if>
+            <if test="invoiceType != null">invoice_type,</if>
+            <if test="billingAmount != null">billing_amount,</if>
+            <if test="personInCharge != null">person_in_charge,</if>
+            <if test="accountsReceivableDetailId != null">accounts_receivable_detail_id,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createTime != null">create_time,</if>
+            del_flag,
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="invoiceDate != null">#{invoiceDate},</if>
+            <if test="customerId != null">#{customerId},</if>
+            <if test="settlementUnitId != null">#{settlementUnitId},</if>
+            <if test="invoiceNumber != null">#{invoiceNumber},</if>
+            <if test="invoiceType != null">#{invoiceType},</if>
+            <if test="billingAmount != null">#{billingAmount},</if>
+            <if test="personInCharge != null">#{personInCharge},</if>
+            <if test="accountsReceivableDetailId != null">#{accountsReceivableDetailId},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createTime != null">#{createTime},</if>
+            '0'
+         </trim>
+    </insert>
+
+    <update id="updateFinishedProductInvoice" parameterType="com.zkqy.business.domain.FinishedProductInvoice">
+        update {DBNAME}.finished_product_invoice
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="invoiceDate != null">invoice_date = #{invoiceDate},</if>
+            <if test="customerId != null">customer_id = #{customerId},</if>
+            <if test="settlementUnitId != null">settlement_unit_id = #{settlementUnitId},</if>
+            <if test="invoiceNumber != null">invoice_number = #{invoiceNumber},</if>
+            <if test="invoiceType != null">invoice_type = #{invoiceType},</if>
+            <if test="billingAmount != null">billing_amount = #{billingAmount},</if>
+            <if test="personInCharge != null">person_in_charge = #{personInCharge},</if>
+            <if test="accountsReceivableDetailId != null">accounts_receivable_detail_id = #{accountsReceivableDetailId},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteFinishedProductInvoiceById" parameterType="long">
+        update {DBNAME}.finished_product_invoice set del_flag = '2' where id = #{id}
+    </delete>
+
+    <delete id="deleteFinishedProductInvoiceByIds" parameterType="long">
+        update {DBNAME}.finished_product_invoice set del_flag = '2' where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="selectFinishedProductInvoiceList1" resultType="com.zkqy.business.domain.vo.FinishedProductInvoiceVo">
+        SELECT
+            src.*,
+            c.custom_name,
+            c.custom_no,
+            csu.customer_name as settlementUnit
+        FROM
+            {DBNAME}.finished_product_invoice src
+                LEFT JOIN {DBNAME}.customer c ON src.customer_id = c.id
+            left join {DBNAME}.customer_settlement_unit csu on src.settlement_unit_id = csu.id
+        where src.del_flag = '0'
+        <if test="customerId != null "> and customer_id = #{customerId}</if>
+        <if test="settlementUnitId != null "> and settlement_unit_id = #{settlementUnitId}</if>
+        <if test="invoiceNumber != null  and invoiceNumber != ''"> and invoice_number = #{invoiceNumber}</if>
+        <if test="startTime != null and endTime != null">and invoice_date BETWEEN #{startTime} AND #{endTime}</if>
+    </select>
+
+    <select id="selectBillingDetails">
+        SELECT
+        c.id,
+        c.custom_no,
+        c.custom_name,
+        COALESCE(qc.qcys, 0) AS qcys,
+        COALESCE(qkp.qckp, 0) AS qckp,
+        COALESCE(sq.sqys, 0) AS sqys,
+        COALESCE(skp.sqkp, 0) AS sqkp,
+        COALESCE(bq.bqys, 0) AS bqys,
+        COALESCE(bkp.bqkp, 0) AS bqkp,
+        COALESCE(bqs.bqys, 0) AS bqys_received,
+        COALESCE(qm.qmys, 0) AS qmys,
+        COALESCE(qmk.qmkp, 0) AS qmkp
+        FROM
+        customer c
+        LEFT JOIN (
+        SELECT customer_id, TRUNCATE(SUM(amount_receivable), 2) AS qcys
+        FROM sale_accounts_receivable_detail
+        WHERE del_flag = '0' AND `status` = '2' AND accounts_receivable_date &lt;'2024-1-1'
+        GROUP BY customer_id
+        ) qc ON c.id = qc.customer_id
+        LEFT JOIN (
+        SELECT customer_id, TRUNCATE(SUM(billing_amount), 2) AS qckp
+        FROM finished_product_invoice
+        WHERE del_flag = '0' AND invoice_date &lt;'2024-1-1'
+        GROUP BY customer_id
+        ) qkp ON c.id = qkp.customer_id
+        LEFT JOIN (
+        SELECT customer_id, TRUNCATE(SUM(amount_receivable), 2) AS sqys
+        FROM sale_accounts_receivable_detail
+        WHERE del_flag = '0' AND `status` = '2'
+        AND YEAR(accounts_receivable_date) = YEAR(CURDATE() - INTERVAL 1 MONTH)
+        AND MONTH(accounts_receivable_date) = MONTH(CURDATE() - INTERVAL 1 MONTH)
+        GROUP BY customer_id
+        ) sq ON c.id = sq.customer_id
+        LEFT JOIN (
+        SELECT customer_id, TRUNCATE(SUM(billing_amount), 2) AS sqkp
+        FROM finished_product_invoice
+        WHERE del_flag = '0'
+        AND YEAR(invoice_date) = YEAR(CURDATE() - INTERVAL 1 MONTH)
+        AND MONTH(invoice_date) = MONTH(CURDATE() - INTERVAL 1 MONTH)
+        GROUP BY customer_id
+        ) skp ON c.id = skp.customer_id
+        LEFT JOIN (
+        SELECT customer_id, TRUNCATE(SUM(amount_receivable), 2) AS bqys
+        FROM sale_accounts_receivable_detail
+        WHERE del_flag = '0' AND `status` = '2'
+        AND YEAR(accounts_receivable_date) = YEAR(CURDATE())
+        AND MONTH(accounts_receivable_date) = MONTH(CURDATE())
+        GROUP BY customer_id
+        ) bq ON c.id = bq.customer_id
+        LEFT JOIN (
+        SELECT customer_id, TRUNCATE(SUM(billing_amount), 2) AS bqkp
+        FROM finished_product_invoice
+        WHERE del_flag = '0'
+        AND YEAR(invoice_date) = YEAR(CURDATE())
+        AND MONTH(invoice_date) = MONTH(CURDATE())
+        GROUP BY customer_id
+        ) bkp ON c.id = bkp.customer_id
+        LEFT JOIN (
+        SELECT customer_id, TRUNCATE(SUM(received_amount), 2) AS bqys
+        FROM sale_accounts_receivable_detail
+        WHERE del_flag = '0' AND `status` = '2'
+        AND YEAR(accounts_receivable_date) = YEAR(CURDATE())
+        AND MONTH(accounts_receivable_date) = MONTH(CURDATE())
+        GROUP BY customer_id
+        ) bqs ON c.id = bqs.customer_id
+        LEFT JOIN (
+        SELECT customer_id, TRUNCATE(SUM(amount_receivable), 2) AS qmys
+        FROM sale_accounts_receivable_detail
+        WHERE del_flag = '0' AND `status` = '2'
+        AND accounts_receivable_date &lt;= CURDATE()
+        GROUP BY customer_id
+        ) qm ON c.id = qm.customer_id
+        LEFT JOIN (
+        SELECT customer_id, TRUNCATE(SUM(billing_amount), 2) AS qmkp
+        FROM finished_product_invoice
+        WHERE del_flag = '0'
+        AND invoice_date &lt;= CURDATE()
+        GROUP BY customer_id
+        ) qmk ON c.id = qmk.customer_id;
+
+    </select>
+
+</mapper>

+ 122 - 0
zkqy-custom-business/src/main/resources/mapper/business/ProductOutboundRecordBatchMapper.xml

@@ -0,0 +1,122 @@
+<?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.ProductOutboundRecordBatchMapper">
+    
+    <resultMap type="com.zkqy.business.domain.ProductOutboundRecordBatch" id="ProductOutboundRecordBatchResult">
+        <result property="id"    column="id"    />
+        <result property="saleNo"    column="sale_no"    />
+        <result property="noticeNumber"    column="notice_number"    />
+        <result property="outboundRecordId"    column="outbound_record_id"    />
+        <result property="batchNumber"    column="batch_number"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="delFlag"    column="del_flag"    />
+    </resultMap>
+
+    <sql id="selectProductOutboundRecordBatchVo">
+        select id, sale_no, notice_number, outbound_record_id, batch_number, create_by, create_by_id, create_time, del_flag from {DBNAME}.product_outbound_record_batch
+    </sql>
+
+    <select id="selectProductOutboundRecordBatchList" parameterType="com.zkqy.business.domain.ProductOutboundRecordBatch" resultMap="ProductOutboundRecordBatchResult">
+        <include refid="selectProductOutboundRecordBatchVo"/>
+        <where>  
+            <if test="saleNo != null  and saleNo != ''"> and sale_no = #{saleNo}</if>
+            <if test="noticeNumber != null  and noticeNumber != ''"> and notice_number = #{noticeNumber}</if>
+            <if test="outboundRecordId != null "> and outbound_record_id = #{outboundRecordId}</if>
+            <if test="batchNumber != null "> and batch_number = #{batchNumber}</if>
+        </where>
+    </select>
+    
+    <select id="selectProductOutboundRecordBatchById" parameterType="Long" resultMap="ProductOutboundRecordBatchResult">
+        <include refid="selectProductOutboundRecordBatchVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertProductOutboundRecordBatch" parameterType="com.zkqy.business.domain.ProductOutboundRecordBatch" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.product_outbound_record_batch
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="saleNo != null">sale_no,</if>
+            <if test="noticeNumber != null">notice_number,</if>
+            <if test="outboundRecordId != null">outbound_record_id,</if>
+            <if test="batchNumber != null">batch_number,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createTime != null">create_time,</if>
+            del_flag
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="saleNo != null">#{saleNo},</if>
+            <if test="noticeNumber != null">#{noticeNumber},</if>
+            <if test="outboundRecordId != null">#{outboundRecordId},</if>
+            <if test="batchNumber != null">#{batchNumber},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createTime != null">#{createTime},</if>
+            '0'
+         </trim>
+    </insert>
+
+    <update id="updateProductOutboundRecordBatch" parameterType="com.zkqy.business.domain.ProductOutboundRecordBatch">
+        update {DBNAME}.product_outbound_record_batch
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="saleNo != null">sale_no = #{saleNo},</if>
+            <if test="noticeNumber != null">notice_number = #{noticeNumber},</if>
+            <if test="outboundRecordId != null">outbound_record_id = #{outboundRecordId},</if>
+            <if test="batchNumber != null">batch_number = #{batchNumber},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteProductOutboundRecordBatchById" parameterType="Long">
+        delete from product_outbound_record_batch where id = #{id}
+    </delete>
+
+    <delete id="deleteProductOutboundRecordBatchByIds" parameterType="String">
+        update {DBNAME}.product_outbound_record_batch set del_flag = '2' where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="selectBatchNumberByNoticeNumber" resultType="long">
+        SELECT
+            IFNULL( MAX( batch_number ), 0 ) + 1
+        FROM
+            {DBNAME}.product_outbound_record_batch
+        WHERE
+            notice_number = #{noticeNumber}
+    </select>
+
+    <insert id="batchInsertProductOutboundRecordBatch">
+        INSERT INTO {DBNAME}.product_outbound_record_batch (
+            sale_no,
+            notice_number,
+            outbound_record_id,
+            batch_number,
+            create_by,
+            create_by_id,
+            create_time,
+            del_flag
+        ) VALUES
+        <foreach collection="list" item="item" separator=",">
+            (
+            #{item.saleNo},
+            #{item.noticeNumber},
+            #{item.outboundRecordId},
+            #{item.batchNumber},
+            #{item.createBy},
+            #{item.createById},
+            #{item.createTime},
+            '0'
+            )
+        </foreach>
+    </insert>
+
+</mapper>

+ 16 - 2
zkqy-custom-business/src/main/resources/mapper/business/ProductOutboundRecordMapper.xml

@@ -133,7 +133,7 @@
     <select id="selectProductOutboundRecordList" parameterType="com.zkqy.business.domain.ProductOutboundRecord"
             resultMap="ProductOutboundRecordResult">
         <include refid="selectProductOutboundRecordVo"/>
-        <where>
+        where del_flag = '0'
             <if test="qrCode != null  and qrCode != ''">and qr_code = #{qrCode}</if>
             <if test="qrCodeId != null  and qrCodeId != ''">and qr_code_id = #{qrCodeId}</if>
             <if test="lotNum != null  and lotNum != ''">and lot_num = #{lotNum}</if>
@@ -161,7 +161,7 @@
             <if test="warehousingTime != null ">and warehousing_time = #{warehousingTime}</if>
             <if test="depositor != null  and depositor != ''">and depositor = #{depositor}</if>
             <if test="warehouseId != null ">and warehouse_id = #{warehouseId}</if>
-        </where>
+            <if test="noticeNumber != null">and notice_number = #{noticeNumber}</if>
     </select>
 
     <select id="selectProductOutboundRecordById" parameterType="Long" resultMap="ProductOutboundRecordResult">
@@ -391,4 +391,18 @@
         group by r.product_id,r.product_colour,r.levels,r.lot_num
     </select>
 
+    <select id="selectOutboundRecordNo" resultType="long">
+        SELECT
+            por.id
+        FROM
+            {DBNAME}.product_outbound_record por
+                left join {DBNAME}.production p on p.id = por.product_id
+                LEFT JOIN {DBNAME}.product_invoice pi ON por.notice_number = pi.notice_number
+        WHERE
+            por.del_flag = '0'
+          AND pi.notice_number = #{noticeNumber}
+          and por.id not in
+              (select outbound_record_id from {DBNAME}.product_outbound_record_batch where del_flag = '0' and notice_number = #{noticeNumber})
+    </select>
+
 </mapper>

+ 311 - 0
zkqy-custom-business/src/main/resources/mapper/business/SaleAccountsReceivableDetailMapper.xml

@@ -0,0 +1,311 @@
+<?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.SaleAccountsReceivableDetailMapper">
+    
+    <resultMap type="com.zkqy.business.domain.SaleAccountsReceivableDetail" id="SaleAccountsReceivableDetailResult">
+        <result property="id"    column="id"    />
+        <result property="accountingType"    column="accounting_type"    />
+        <result property="customerId"    column="customer_id"    />
+        <result property="customName" column="custom_name"/>
+        <result property="accountsReceivableDate"    column="accounts_receivable_date"    />
+        <result property="saleNo"    column="sale_no"    />
+        <result property="saleProductNo"    column="sale_product_no"    />
+        <result property="registrationCollectionId" column="registration_collection_id"/>
+        <result property="productId"    column="product_id"    />
+        <result property="productName"    column="product_name"    />
+        <result property="productSpecifications"    column="product_specifications"    />
+        <result property="productLevel"    column="product_level"    />
+        <result property="productColour"    column="product_colour"    />
+        <result property="lotNumber"    column="lot_number"    />
+        <result property="boxNum"    column="box_num"    />
+        <result property="weight"    column="weight"    />
+        <result property="productPrice"    column="product_price"    />
+        <result property="amountReceivable"    column="amount_receivable"    />
+        <result property="receivedAmount"    column="received_amount"    />
+        <result property="amounts"    column="amounts"    />
+        <result property="paymentMethod"    column="payment_method"    />
+        <result property="billingType"    column="billing_type"    />
+        <result property="accountsReceivableRemark"    column="accounts_receivable_remark"    />
+        <result property="settlementUnit"    column="settlement_unit"    />
+        <result property="returnReceipt"    column="return_receipt"    />
+        <result property="returnReceiptDate"    column="return_receipt_date"    />
+        <result property="returnReceiptRemark"    column="return_receipt_remark"    />
+        <result property="noticeNumber"    column="notice_number"    />
+        <result property="status"    column="status"    />
+        <result property="spare1"    column="spare1"    />
+        <result property="spare2"    column="spare2"    />
+        <result property="spare3"    column="spare3"    />
+        <result property="remark"    column="remark"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="billingFlag" column="billing_flag"/>
+    </resultMap>
+
+    <sql id="selectSaleAccountsReceivableDetailVo">
+        select id, accounting_type, customer_id, accounts_receivable_date, sale_no, sale_product_no, registration_collection_id,product_id, product_name, product_specifications, product_level, product_colour, lot_number, box_num, weight, product_price, amount_receivable, received_amount, amounts, payment_method, billing_type, accounts_receivable_remark, settlement_unit, return_receipt, return_receipt_date, return_receipt_remark, notice_number, status, spare1, spare2, spare3, remark, create_by, create_by_id, create_time, update_by, update_by_id, update_time, del_flag, billing_flag from {DBNAME}.sale_accounts_receivable_detail
+    </sql>
+
+    <select id="selectSaleAccountsReceivableDetailList" parameterType="com.zkqy.business.domain.SaleAccountsReceivableDetail" resultMap="SaleAccountsReceivableDetailResult">
+        SELECT
+            sard.*,
+            c.custom_name,
+            csu.customer_name as settlementUnitName,
+            fpi.id as finishedProductInvoiceId,
+            fpi.invoice_number as invoiceNumber,
+            fpi.invoice_type as invoiceType
+        FROM
+        {DBNAME}.sale_accounts_receivable_detail sard
+        LEFT JOIN {DBNAME}.customer c ON sard.customer_id = c.id
+        left join {DBNAME}.customer_settlement_unit csu on csu.id = sard.settlement_unit
+        left join {DBNAME}.finished_product_invoice fpi on sard.id = fpi.accounts_receivable_detail_id and fpi.del_flag = '0'
+        WHERE
+        sard.del_flag = '0'
+        <if test="accountingType != null  and accountingType != ''"> and sard.accounting_type = #{accountingType}</if>
+        <if test="customerId != null "> and sard.customer_id = #{customerId}</if>
+        <if test="startTime != null and endTime != null "> and sard.accounts_receivable_date between #{startTime} and #{endTime}</if>
+        <if test="billingType != null  and billingType != ''"> and sard.billing_type = #{billingType}</if>
+        <if test="accountsReceivableRemark != null  and accountsReceivableRemark != ''"> and sard.accounts_receivable_remark like concat('%', #{accountsReceivableRemark}, '%')</if>
+        <if test="returnReceipt != null  and returnReceipt != ''"> and sard.return_receipt = #{returnReceipt}</if>
+        <if test="status != null and status != ''">and sard.status in ( #{status} )</if>
+    </select>
+    
+    <select id="selectSaleAccountsReceivableDetailById" parameterType="Long" resultMap="SaleAccountsReceivableDetailResult">
+        <include refid="selectSaleAccountsReceivableDetailVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertSaleAccountsReceivableDetail" parameterType="com.zkqy.business.domain.SaleAccountsReceivableDetail" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.sale_accounts_receivable_detail
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="accountingType != null">accounting_type,</if>
+            <if test="customerId != null">customer_id,</if>
+            <if test="accountsReceivableDate != null">accounts_receivable_date,</if>
+            <if test="saleNo != null">sale_no,</if>
+            <if test="saleProductNo != null">sale_product_no,</if>
+            <if test="registrationCollectionId != null">registration_collection_id,</if>
+            <if test="productId != null">product_id,</if>
+            <if test="productName != null">product_name,</if>
+            <if test="productSpecifications != null">product_specifications,</if>
+            <if test="productLevel != null">product_level,</if>
+            <if test="productColour != null">product_colour,</if>
+            <if test="lotNumber != null">lot_number,</if>
+            <if test="boxNum != null">box_num,</if>
+            <if test="weight != null">weight,</if>
+            <if test="productPrice != null">product_price,</if>
+            <if test="amountReceivable != null">amount_receivable,</if>
+            <if test="receivedAmount != null">received_amount,</if>
+            <if test="amounts != null">amounts,</if>
+            <if test="paymentMethod != null">payment_method,</if>
+            <if test="billingType != null">billing_type,</if>
+            <if test="accountsReceivableRemark != null">accounts_receivable_remark,</if>
+            <if test="settlementUnit != null">settlement_unit,</if>
+            <if test="returnReceipt != null">return_receipt,</if>
+            <if test="returnReceiptDate != null">return_receipt_date,</if>
+            <if test="returnReceiptRemark != null">return_receipt_remark,</if>
+            <if test="noticeNumber != null">notice_number,</if>
+            <if test="status != null">status,</if>
+            <if test="spare1 != null">spare1,</if>
+            <if test="spare2 != null">spare2,</if>
+            <if test="spare3 != null">spare3,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createTime != null">create_time,</if>
+            del_flag,
+            billing_flag
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="accountingType != null">#{accountingType},</if>
+            <if test="customerId != null">#{customerId},</if>
+            <if test="accountsReceivableDate != null">#{accountsReceivableDate},</if>
+            <if test="saleNo != null">#{saleNo},</if>
+            <if test="saleProductNo != null">#{saleProductNo},</if>
+            <if test="registrationCollectionId != null">#{registrationCollectionId},</if>
+            <if test="productId != null">#{productId},</if>
+            <if test="productName != null">#{productName},</if>
+            <if test="productSpecifications != null">#{productSpecifications},</if>
+            <if test="productLevel != null">#{productLevel},</if>
+            <if test="productColour != null">#{productColour},</if>
+            <if test="lotNumber != null">#{lotNumber},</if>
+            <if test="boxNum != null">#{boxNum},</if>
+            <if test="weight != null">#{weight},</if>
+            <if test="productPrice != null">#{productPrice},</if>
+            <if test="amountReceivable != null">#{amountReceivable},</if>
+            <if test="receivedAmount != null">#{receivedAmount},</if>
+            <if test="amounts != null">#{amounts},</if>
+            <if test="paymentMethod != null">#{paymentMethod},</if>
+            <if test="billingType != null">#{billingType},</if>
+            <if test="accountsReceivableRemark != null">#{accountsReceivableRemark},</if>
+            <if test="settlementUnit != null">#{settlementUnit},</if>
+            <if test="returnReceipt != null">#{returnReceipt},</if>
+            <if test="returnReceiptDate != null">#{returnReceiptDate},</if>
+            <if test="returnReceiptRemark != null">#{returnReceiptRemark},</if>
+            <if test="noticeNumber != null">#{noticeNumber},</if>
+            <if test="status != null">#{status},</if>
+            <if test="spare1 != null">#{spare1},</if>
+            <if test="spare2 != null">#{spare2},</if>
+            <if test="spare3 != null">#{spare3},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createTime != null">#{createTime},</if>
+           '0',
+           '0'
+         </trim>
+    </insert>
+
+    <update id="updateSaleAccountsReceivableDetail" parameterType="com.zkqy.business.domain.SaleAccountsReceivableDetail">
+        update {DBNAME}.sale_accounts_receivable_detail
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="accountingType != null">accounting_type = #{accountingType},</if>
+            <if test="customerId != null">customer_id = #{customerId},</if>
+            <if test="accountsReceivableDate != null">accounts_receivable_date = #{accountsReceivableDate},</if>
+            <if test="saleNo != null">sale_no = #{saleNo},</if>
+            <if test="saleProductNo != null">sale_product_no = #{saleProductNo},</if>
+            <if test="registrationCollectionId != null">registration_collection_id = #{registrationCollectionId},</if>
+            <if test="productId != null">product_id = #{productId},</if>
+            <if test="productName != null">product_name = #{productName},</if>
+            <if test="productSpecifications != null">product_specifications = #{productSpecifications},</if>
+            <if test="productLevel != null">product_level = #{productLevel},</if>
+            <if test="productColour != null">product_colour = #{productColour},</if>
+            <if test="lotNumber != null">lot_number = #{lotNumber},</if>
+            <if test="boxNum != null">box_num = #{boxNum},</if>
+            <if test="weight != null">weight = #{weight},</if>
+            <if test="productPrice != null">product_price = #{productPrice},</if>
+            <if test="amountReceivable != null">amount_receivable = #{amountReceivable},</if>
+            <if test="receivedAmount != null">received_amount = #{receivedAmount},</if>
+            <if test="amounts != null">amounts = #{amounts},</if>
+            <if test="paymentMethod != null">payment_method = #{paymentMethod},</if>
+            <if test="billingType != null">billing_type = #{billingType},</if>
+            <if test="accountsReceivableRemark != null">accounts_receivable_remark = #{accountsReceivableRemark},</if>
+            <if test="settlementUnit != null">settlement_unit = #{settlementUnit},</if>
+            <if test="returnReceipt != null">return_receipt = #{returnReceipt},</if>
+            return_receipt_date = #{returnReceiptDate},
+            <if test="returnReceiptRemark != null">return_receipt_remark = #{returnReceiptRemark},</if>
+            <if test="noticeNumber != null">notice_number = #{noticeNumber},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="spare1 != null">spare1 = #{spare1},</if>
+            <if test="spare2 != null">spare2 = #{spare2},</if>
+            <if test="spare3 != null">spare3 = #{spare3},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="billingFlag != null">billing_flag = #{billingFlag},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSaleAccountsReceivableDetailById" parameterType="Long">
+        update {DBNAME}.sale_accounts_receivable_detail set del_flag = '2' where id = #{id}
+    </delete>
+
+    <delete id="deleteSaleAccountsReceivableDetailByIds" parameterType="String">
+        update {DBNAME}.sale_accounts_receivable_detail set del_flag = '2' where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <insert id="batchInsertSaleAccountsReceivableDetail">
+        INSERT INTO {DBNAME}.sale_accounts_receivable_detail (
+        accounting_type,
+        customer_id,
+        accounts_receivable_date,
+        sale_no,
+        sale_product_no,
+        registration_collection_id,
+        product_id,
+        product_name,
+        product_specifications,
+        product_level,
+        product_colour,
+        lot_number,
+        box_num,
+        weight,
+        product_price,
+        amount_receivable,
+        received_amount,
+        amounts,
+        payment_method,
+        billing_type,
+        accounts_receivable_remark,
+        settlement_unit,
+        return_receipt,
+        return_receipt_date,
+        return_receipt_remark,
+        notice_number,
+        status,
+        spare1,
+        spare2,
+        spare3,
+        remark,
+        create_by,
+        create_by_id,
+        create_time,
+        del_flag,
+        billing_flag
+        ) VALUES
+        <foreach collection="list" item="item" separator=",">
+            (
+            #{item.accountingType},
+            #{item.customerId},
+            #{item.accountsReceivableDate},
+            #{item.saleNo},
+            #{item.saleProductNo},
+            #{item.registrationCollectionId},
+            #{item.productId},
+            #{item.productName},
+            #{item.productSpecifications},
+            #{item.productLevel},
+            #{item.productColour},
+            #{item.lotNumber},
+            #{item.boxNum},
+            #{item.weight},
+            #{item.productPrice},
+            #{item.amountReceivable},
+            #{item.receivedAmount},
+            #{item.amounts},
+            #{item.paymentMethod},
+            #{item.billingType},
+            #{item.accountsReceivableRemark},
+            #{item.settlementUnit},
+            #{item.returnReceipt},
+            #{item.returnReceiptDate},
+            #{item.returnReceiptRemark},
+            #{item.noticeNumber},
+            #{item.status},
+            #{item.spare1},
+            #{item.spare2},
+            #{item.spare3},
+            #{item.remark},
+            #{item.createBy},
+            #{item.createById},
+            #{item.createTime},
+            '0',
+            '0'
+            )
+        </foreach>
+    </insert>
+
+    <select id="selectAccountsReceivableDetailList" parameterType="com.zkqy.business.domain.SaleAccountsReceivableDetail" resultMap="SaleAccountsReceivableDetailResult">
+        <include refid="selectSaleAccountsReceivableDetailVo"></include>
+        where del_flag = '0'
+        <if test="accountingType != null  and accountingType != ''"> and accounting_type = #{accountingType}</if>
+        <if test="customerId != null "> and customer_id = #{customerId}</if>
+        <if test="startTime != null and endTime != null "> and accounts_receivable_date between #{startTime} and #{endTime}</if>
+        <if test="billingType != null  and billingType != ''"> and billing_type = #{billingType}</if>
+        <if test="accountsReceivableRemark != null  and accountsReceivableRemark != ''"> and accounts_receivable_remark like concat('%', #{accountsReceivableRemark}, '%')</if>
+        <if test="returnReceipt != null  and returnReceipt != ''"> and return_receipt = #{returnReceipt}</if>
+        <if test="status != null and status != ''">and status in ( #{status} )</if>
+        order by id asc
+    </select>
+
+</mapper>

+ 46 - 0
zkqy-custom-business/src/main/resources/mapper/business/SaleOrderMapper.xml

@@ -397,6 +397,52 @@
         </foreach>
     </update>
 
+    <select id="printOutsourceOrderList" resultType="com.zkqy.business.domain.vo.SaleProductsVo">
+        select
+            a.* ,
+            b.productUnitPrice
+        from
+            (
+                SELECT
+                    p.id as productId,
+                    p.product_name as productName,
+                    p.product_specifications as productSpecifications,
+                    por.lot_num as lotNumber,
+                    count(box_num) as boxNum,
+                    TRUNCATE(sum(por.suttle),2) as productNumber,
+                    por.product_colour as productColour,
+                    por.notice_number as noticeNumber,
+                    pi.sale_order_no as saleNo,
+                    p.product_no as productNo,
+                    por.levels as productLevel
+                FROM
+                    {DBNAME}.product_outbound_record por
+                        left join {DBNAME}.production p on p.id = por.product_id
+                        LEFT JOIN {DBNAME}.product_invoice pi ON por.notice_number = pi.notice_number
+                WHERE
+                    por.del_flag = '0'
+                  AND pi.notice_number = #{noticeNumber}
+                  and por.id not in
+                      (select outbound_record_id from {DBNAME}.product_outbound_record_batch where del_flag = '0' and notice_number = #{noticeNumber})
+                group by por.product_id,por.levels,por.lot_num,por.product_colour
+
+            ) as a left join
+            (
+                SELECT
+                    sp.product_no as productNo,
+                    sp.product_unit_price as productUnitPrice,
+                    CONCAT(m.materie_encoding,m.materie_color_number) as productColour
+                FROM
+                    {DBNAME}.sale_order so
+                        LEFT JOIN {DBNAME}.sale_products sp ON so.sale_no = sp.sale_order_no
+                        AND sp.del_flag = '0'
+                        left join {DBNAME}.production p on  sp.product_no = p.product_no and p.del_flag = '0'
+                        left join {DBNAME}.materiel m on m.materiel_code = sp.colour_number and m.del_flag = '0'
+                where so.del_flag = '0'
+                  and so.sale_no = #{saleNo}
+            ) as b on a.productNo = b.productNo and a.productColour = b.productColour
+    </select>
+
 
 
 <!--    <select id="aa">-->

+ 150 - 0
zkqy-custom-business/src/main/resources/mapper/business/SaleOtherCollectionMapper.xml

@@ -0,0 +1,150 @@
+<?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.SaleOtherCollectionMapper">
+    
+    <resultMap type="com.zkqy.business.domain.SaleOtherCollection" id="SaleOtherCollectionResult">
+        <result property="id"    column="id"    />
+        <result property="serialNumber"    column="serial_number"    />
+        <result property="otherCollectionDate"    column="other_collection_date"    />
+        <result property="customerId"    column="customer_id"    />
+        <result property="personInChargeId"    column="person_in_charge_id"    />
+        <result property="paymentMethod"    column="payment_method"    />
+        <result property="travelCertificateNumber"    column="travel_certificate_number"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="collectionDetails"    column="collection_details"    />
+        <result property="itemReceivable"    column="item_receivable"    />
+        <result property="settlementUnitId" column="settlement_unit_id"/>
+        <result property="amount"    column="amount"    />
+        <result property="auditor" column="auditor"/>
+        <result property="bookkeepingFlag"    column="bookkeeping_flag"    />
+        <result property="status"    column="status"    />
+        <result property="remark"    column="remark"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="settlementUnitName" column="customer_name"/>
+
+    </resultMap>
+
+    <sql id="selectSaleOtherCollectionVo">
+        select id, serial_number, other_collection_date, customer_id, person_in_charge_id, payment_method, travel_certificate_number, dept_id, collection_details, item_receivable,settlement_unit_id, amount,auditor, bookkeeping_flag, status, remark, create_by, create_by_id, create_time, update_by, update_by_id, update_time, del_flag from {DBNAME}.sale_other_collection
+    </sql>
+
+    <select id="selectSaleOtherCollectionList" parameterType="com.zkqy.business.domain.SaleOtherCollection" resultMap="SaleOtherCollectionResult">
+        SELECT
+        soc.* ,
+        csu.customer_name
+        FROM
+        {DBNAME}.sale_other_collection soc
+        LEFT JOIN {DBNAME}.customer_settlement_unit csu ON soc.settlement_unit_id = csu.id
+        where soc.del_flag = '0'
+            <if test="serialNumber != null  and serialNumber != ''"> and soc.serial_number = #{serialNumber}</if>
+            <if test="otherCollectionDate != null "> and soc.other_collection_date = #{otherCollectionDate}</if>
+            <if test="customerId != null "> and soc.customer_id = #{customerId}</if>
+            <if test="personInChargeId != null "> and soc.person_in_charge_id = #{personInChargeId}</if>
+            <if test="paymentMethod != null  and paymentMethod != ''"> and soc.payment_method = #{paymentMethod}</if>
+            <if test="travelCertificateNumber != null  and travelCertificateNumber != ''"> and soc.travel_certificate_number = #{travelCertificateNumber}</if>
+            <if test="deptId != null "> and soc.dept_id = #{deptId}</if>
+            <if test="collectionDetails != null  and collectionDetails != ''"> and soc.collection_details = #{collectionDetails}</if>
+            <if test="itemReceivable != null  and itemReceivable != ''"> and soc.item_receivable = #{itemReceivable}</if>
+            <if test="settlementUnitId != null "> and soc.settlement_unit_id = #{settlementUnitId}</if>
+            <if test="amount != null "> and soc.amount = #{amount}</if>
+            <if test="bookkeepingFlag != null  and bookkeepingFlag != ''"> and bookkeeping_flag = #{bookkeepingFlag}</if>
+            <if test="status != null  and status != ''"> and soc.status = #{status}</if>
+            <if test="startTime != null and endTime != null">and soc.other_collection_date BETWEEN #{startTime} AND #{endTime}</if>
+        order by soc.id desc
+    </select>
+    
+    <select id="selectSaleOtherCollectionById" parameterType="Long" resultMap="SaleOtherCollectionResult">
+        <include refid="selectSaleOtherCollectionVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertSaleOtherCollection" parameterType="com.zkqy.business.domain.SaleOtherCollection" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.sale_other_collection
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="serialNumber != null">serial_number,</if>
+            <if test="otherCollectionDate != null">other_collection_date,</if>
+            <if test="customerId != null">customer_id,</if>
+            <if test="personInChargeId != null">person_in_charge_id,</if>
+            <if test="paymentMethod != null">payment_method,</if>
+            <if test="travelCertificateNumber != null">travel_certificate_number,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="collectionDetails != null">collection_details,</if>
+            <if test="itemReceivable != null">item_receivable,</if>
+            <if test="settlementUnitId != null">settlement_unit_id,</if>
+            <if test="amount != null">amount,</if>
+            <if test="auditor != null">auditor,</if>
+            <if test="bookkeepingFlag != null">bookkeeping_flag,</if>
+            <if test="status != null">status,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createTime != null">create_time,</if>
+            del_flag
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="serialNumber != null">#{serialNumber},</if>
+            <if test="otherCollectionDate != null">#{otherCollectionDate},</if>
+            <if test="customerId != null">#{customerId},</if>
+            <if test="personInChargeId != null">#{personInChargeId},</if>
+            <if test="paymentMethod != null">#{paymentMethod},</if>
+            <if test="travelCertificateNumber != null">#{travelCertificateNumber},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="collectionDetails != null">#{collectionDetails},</if>
+            <if test="itemReceivable != null">#{itemReceivable},</if>
+            <if test="settlementUnitId != null">#{settlementUnitId},</if>
+            <if test="amount != null">#{amount},</if>
+            <if test="auditor != null">#{auditor},</if>
+            <if test="bookkeepingFlag != null">#{bookkeepingFlag},</if>
+            <if test="status != null">#{status},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createTime != null">#{createTime},</if>
+            '0'
+         </trim>
+    </insert>
+
+    <update id="updateSaleOtherCollection" parameterType="com.zkqy.business.domain.SaleOtherCollection">
+        update {DBNAME}.sale_other_collection
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="serialNumber != null">serial_number = #{serialNumber},</if>
+            <if test="otherCollectionDate != null">other_collection_date = #{otherCollectionDate},</if>
+            <if test="customerId != null">customer_id = #{customerId},</if>
+            <if test="personInChargeId != null">person_in_charge_id = #{personInChargeId},</if>
+            <if test="paymentMethod != null">payment_method = #{paymentMethod},</if>
+            <if test="travelCertificateNumber != null">travel_certificate_number = #{travelCertificateNumber},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="collectionDetails != null">collection_details = #{collectionDetails},</if>
+            <if test="itemReceivable != null">item_receivable = #{itemReceivable},</if>
+            <if test="settlementUnitId != null">settlement_unit_id = #{settlementUnitId},</if>
+            <if test="amount != null">amount = #{amount},</if>
+            <if test="auditor != null">auditor = #{auditor},</if>
+            <if test="bookkeepingFlag != null">bookkeeping_flag = #{bookkeepingFlag},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSaleOtherCollectionById" parameterType="Long">
+        delete from {DBNAME}.sale_other_collection where id = #{id}
+    </delete>
+
+    <delete id="deleteSaleOtherCollectionByIds" parameterType="String">
+        update {DBNAME}.sale_other_collection set del_flag = '2' where id in
+        <foreach item="id" collection="list" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 131 - 0
zkqy-custom-business/src/main/resources/mapper/business/SaleRegistrationCollectionMapper.xml

@@ -0,0 +1,131 @@
+<?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.SaleRegistrationCollectionMapper">
+    
+    <resultMap type="com.zkqy.business.domain.SaleRegistrationCollection" id="SaleRegistrationCollectionResult">
+        <result property="id"    column="id"    />
+        <result property="customerId"    column="customer_id"    />
+        <result property="paymentMethod"    column="payment_method"    />
+        <result property="amounts"    column="amounts"    />
+        <result property="collectionMoneyType"    column="collection_money_type"    />
+        <result property="collectionMoneyDate"    column="collection_money_date"    />
+        <result property="settlementUnitId"    column="settlement_unit_id"    />
+        <result property="remark"    column="remark"    />
+        <result property="bookkeepingFlag"    column="bookkeeping_flag"    />
+        <result property="status" column="status"/>
+        <result property="createBy"    column="create_by"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+    </resultMap>
+
+    <sql id="selectSaleRegistrationCollectionVo">
+        select id, customer_id, payment_method, amounts, collection_money_type, collection_money_date, settlement_unit_id,status, remark, bookkeeping_flag, create_by, create_by_id, create_time, update_by, update_by_id, update_time, del_flag from {DBNAME}.sale_registration_collection
+    </sql>
+
+    <select id="selectSaleRegistrationCollectionList" parameterType="com.zkqy.business.domain.SaleRegistrationCollection" resultMap="SaleRegistrationCollectionResult">
+        <include refid="selectSaleRegistrationCollectionVo"/>
+        <where>  
+            <if test="customerId != null "> and customer_id = #{customerId}</if>
+            <if test="paymentMethod != null  and paymentMethod != ''"> and payment_method = #{paymentMethod}</if>
+            <if test="amounts != null "> and amounts = #{amounts}</if>
+            <if test="collectionMoneyType != null  and collectionMoneyType != ''"> and collection_money_type = #{collectionMoneyType}</if>
+            <if test="collectionMoneyDate != null "> and collection_money_date = #{collectionMoneyDate}</if>
+            <if test="settlementUnitId != null "> and settlement_unit_id = #{settlementUnitId}</if>
+            <if test="bookkeepingFlag != null  and bookkeepingFlag != ''"> and bookkeeping_flag = #{bookkeepingFlag}</if>
+        </where>
+    </select>
+    
+    <select id="selectSaleRegistrationCollectionById" parameterType="Long" resultMap="SaleRegistrationCollectionResult">
+        <include refid="selectSaleRegistrationCollectionVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertSaleRegistrationCollection" parameterType="com.zkqy.business.domain.SaleRegistrationCollection" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.sale_registration_collection
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="customerId != null">customer_id,</if>
+            <if test="paymentMethod != null">payment_method,</if>
+            <if test="amounts != null">amounts,</if>
+            <if test="collectionMoneyType != null">collection_money_type,</if>
+            <if test="collectionMoneyDate != null">collection_money_date,</if>
+            <if test="settlementUnitId != null">settlement_unit_id,</if>
+            <if test="remark != null">remark,</if>
+            <if test="bookkeepingFlag != null">bookkeeping_flag,</if>
+            <if test="status != null">status,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createTime != null">create_time,</if>
+            del_flag
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="customerId != null">#{customerId},</if>
+            <if test="paymentMethod != null">#{paymentMethod},</if>
+            <if test="amounts != null">#{amounts},</if>
+            <if test="collectionMoneyType != null">#{collectionMoneyType},</if>
+            <if test="collectionMoneyDate != null">#{collectionMoneyDate},</if>
+            <if test="settlementUnitId != null">#{settlementUnitId},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="bookkeepingFlag != null">#{bookkeepingFlag},</if>
+            <if test="status != null">#{status},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createTime != null">#{createTime},</if>
+           '0'
+         </trim>
+    </insert>
+
+    <update id="updateSaleRegistrationCollection" parameterType="com.zkqy.business.domain.SaleRegistrationCollection">
+        update {DBNAME}.sale_registration_collection
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="customerId != null">customer_id = #{customerId},</if>
+            <if test="paymentMethod != null">payment_method = #{paymentMethod},</if>
+            <if test="amounts != null">amounts = #{amounts},</if>
+            <if test="collectionMoneyType != null">collection_money_type = #{collectionMoneyType},</if>
+            <if test="collectionMoneyDate != null">collection_money_date = #{collectionMoneyDate},</if>
+            <if test="settlementUnitId != null">settlement_unit_id = #{settlementUnitId},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="bookkeepingFlag != null">bookkeeping_flag = #{bookkeepingFlag},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSaleRegistrationCollectionById" parameterType="Long">
+        delete from sale_registration_collection where id = #{id}
+    </delete>
+
+    <delete id="deleteSaleRegistrationCollectionByIds" parameterType="String">
+        update {DBNAME}.sale_registration_collection set del_flag = '2' where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="selectRegistrationCollectionList" resultType="com.zkqy.business.domain.vo.SaleRegistrationCollectionVo">
+        SELECT
+            src.*,
+            c.custom_name,
+            c.custom_no,
+            csu.customer_name as settlementUnit
+        FROM
+            {DBNAME}.sale_registration_collection src
+                LEFT JOIN {DBNAME}.customer c ON src.customer_id = c.id
+                left join {DBNAME}.customer_settlement_unit csu on src.settlement_unit_id = csu.id
+        where src.del_flag = '0'
+        <if test="startTime != null and endTime != null">and src.collection_money_date BETWEEN #{startTime} AND #{endTime}</if>
+        <if test="customerId != null "> and src.customer_id = #{customerId}</if>
+        <if test="bookkeepingFlag != null and bookkeepingFlag != ''">and src.bookkeeping_flag = #{bookkeepingFlag}</if>
+        <if test="status != null">and src.status = #{status}</if>
+        order by src.id desc
+    </select>
+
+</mapper>

+ 40 - 40
zkqy-ui/src/views/orderMange/order/processingOrder.vue

@@ -1622,37 +1622,37 @@ export default {
               btnHasPermi: "huaxian:xsglddgl:INSERT",
               children: [],
             },
-            {
-              btnName: "出库明细",
-              btnType: "OutDetail",
-              btnIcon: "",
-              // btnShowCondition: "[]",
-              btnShowCondition:
-                '[{"fieldName":"sale_order.status","mark":"3","refValue":"1"},{"fieldName":"sale_order.status","mark":"3","refValue":"7"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"}]',
-              btnHasPermi: "huaxian:xsglddgl:INSERT",
-              children: [],
-            },
-            {
-              btnName: "打印出库单",
-              btnType: "printOutBound",
-              btnIcon: "",
-              // btnShowCondition: "[]",
-              btnShowCondition:
-                '[{"fieldName":"sale_order.status","mark":"3","refValue":"1"},{"fieldName":"sale_order.status","mark":"3","refValue":"2"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"},{"fieldName":"sale_order.status","mark":"3","refValue":"7"}]',
-              btnHasPermi: "huaxian:xsglddgl:INSERT",
-              children: [],
-            },
-            {
-              btnName: "出库发货",
-              btnType: "deliver",
-              btnIcon: "",
-              // btnShowCondition: "[]",
-              btnShowCondition:
-                '[{"fieldName":"sale_order.status","mark":"3","refValue":"1"},{"fieldName":"sale_order.status","mark":"3","refValue":"2"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"},{"fieldName":"sale_order.status","mark":"3","refValue":"7"}]',
-              // ,{"fieldName":"sale_order.status","mark":"3","refValue":"3"}  3待生产
-              btnHasPermi: "huaxian:xsglddgl:INSERT",
-              children: [],
-            },
+            // {
+            //   btnName: "出库明细",
+            //   btnType: "OutDetail",
+            //   btnIcon: "",
+            //   // btnShowCondition: "[]",
+            //   btnShowCondition:
+            //     '[{"fieldName":"sale_order.status","mark":"3","refValue":"1"},{"fieldName":"sale_order.status","mark":"3","refValue":"7"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"}]',
+            //   btnHasPermi: "huaxian:xsglddgl:INSERT",
+            //   children: [],
+            // },
+            // {
+            //   btnName: "打印出库单",
+            //   btnType: "printOutBound",
+            //   btnIcon: "",
+            //   // btnShowCondition: "[]",
+            //   btnShowCondition:
+            //     '[{"fieldName":"sale_order.status","mark":"3","refValue":"1"},{"fieldName":"sale_order.status","mark":"3","refValue":"2"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"},{"fieldName":"sale_order.status","mark":"3","refValue":"7"}]',
+            //   btnHasPermi: "huaxian:xsglddgl:INSERT",
+            //   children: [],
+            // },
+            // {
+            //   btnName: "出库发货",
+            //   btnType: "deliver",
+            //   btnIcon: "",
+            //   // btnShowCondition: "[]",
+            //   btnShowCondition:
+            //     '[{"fieldName":"sale_order.status","mark":"3","refValue":"1"},{"fieldName":"sale_order.status","mark":"3","refValue":"2"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"},{"fieldName":"sale_order.status","mark":"3","refValue":"7"}]',
+            //   // ,{"fieldName":"sale_order.status","mark":"3","refValue":"3"}  3待生产
+            //   btnHasPermi: "huaxian:xsglddgl:INSERT",
+            //   children: [],
+            // },
             {
               btnName: "详情",
               btnType: "myDetail",
@@ -1670,15 +1670,15 @@ export default {
               children: [],
               btnHasPermi: "huaxian:xsglddgl:INSERT",
             },
-            {
-              btnName: "完成",
-              btnType: "myComplate",
-              btnIcon: "",
-              btnShowCondition:
-                '[{"fieldName":"sale_order.status","mark":"6","refValue":"9"}]',
-              children: [],
-              btnHasPermi: "huaxian:xsglddgl:INSERT",
-            }
+            // {
+            //   btnName: "完成",
+            //   btnType: "myComplate",
+            //   btnIcon: "",
+            //   btnShowCondition:
+            //     '[{"fieldName":"sale_order.status","mark":"6","refValue":"9"}]',
+            //   children: [],
+            //   btnHasPermi: "huaxian:xsglddgl:INSERT",
+            // }
           );
 
           this.excuteBtnArr[0].children = this.excuteBtnArr[0].children.filter(

+ 6 - 5
zkqy-ui/src/views/orderMange/retailMange/index.vue

@@ -643,11 +643,11 @@
                   </el-form-item>
                 </template>
               </el-table-column>
-              <el-table-column prop="productAmounts" label="金额">
-                <template slot-scope="scope">
-                  {{ scope.row.productAmounts }}
-                </template>
-              </el-table-column>
+<!--              <el-table-column prop="productAmounts" label="金额">-->
+<!--                <template slot-scope="scope">-->
+<!--                  {{ scope.row.productAmounts }}-->
+<!--                </template>-->
+<!--              </el-table-column>-->
               <el-table-column prop="inventoryBoxNum" label="库存箱数">
                 <template slot-scope="scope">
                   {{ scope.row.inventoryBoxNum }}
@@ -1441,6 +1441,7 @@ export default {
           index === 2 ||
           index === 3 ||
           index === 4 ||
+          index === 7 ||
           index === 8 ||
           index === 9 ||
           index === 10 ||