From 837e27591dffbdf27100c2915300ddfceb64919c Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 11 五月 2026 14:20:49 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New_pro' into dev_New_pro
---
src/main/resources/mapper/sales/InvoiceRegistrationProductMapper.xml | 4
src/main/java/com/ruoyi/account/service/impl/AccountSalesServiceImpl.java | 58 ++++++++
src/main/resources/mapper/procurementrecord/ReturnManagementMapper.xml | 28 +++
src/main/java/com/ruoyi/account/bean/vo/SalesOutboundVo.java | 52 +++++++
src/main/java/com/ruoyi/account/controller/AccountSalesController.java | 68 +++++++++
src/main/java/com/ruoyi/account/service/AccountSalesService.java | 28 ++++
src/main/java/com/ruoyi/procurementrecord/mapper/ReturnManagementMapper.java | 4
src/main/java/com/ruoyi/account/bean/vo/SalesReturnVo.java | 48 ++++++
src/main/java/com/ruoyi/staff/controller/StaffOnJobController.java | 11
src/main/resources/mapper/sales/ShippingInfoMapper.xml | 29 ++++
src/main/java/com/ruoyi/account/bean/dto/SalesReturnDto.java | 26 +++
src/main/java/com/ruoyi/device/service/impl/DeviceRepairServiceImpl.java | 5
src/main/resources/mapper/staff/StaffOnJobMapper.xml | 12
src/main/java/com/ruoyi/sales/mapper/ShippingInfoMapper.java | 5
src/main/java/com/ruoyi/account/bean/dto/SalesOutboundDto.java | 26 +++
15 files changed, 385 insertions(+), 19 deletions(-)
diff --git a/src/main/java/com/ruoyi/account/bean/dto/SalesOutboundDto.java b/src/main/java/com/ruoyi/account/bean/dto/SalesOutboundDto.java
new file mode 100644
index 0000000..a30e035
--- /dev/null
+++ b/src/main/java/com/ruoyi/account/bean/dto/SalesOutboundDto.java
@@ -0,0 +1,26 @@
+package com.ruoyi.account.bean.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@Schema(name = "SalesOutboundDto", description = "璐㈠姟绠$悊--閿�鍞嚭搴撳彴璐�(浼犲弬)")
+public class SalesOutboundDto {
+
+ @Schema(description = "鍑哄簱鍗曞彿")
+ private String outboundBatches;
+
+ @Schema(description = "瀹㈡埛鍚嶇О")
+ private String customerName;
+
+ @Schema(description = "寮�濮嬫棩鏈�")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date startDate;
+
+ @Schema(description = "缁撴潫鏃ユ湡")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date endDate;
+}
diff --git a/src/main/java/com/ruoyi/account/bean/dto/SalesReturnDto.java b/src/main/java/com/ruoyi/account/bean/dto/SalesReturnDto.java
new file mode 100644
index 0000000..d635408
--- /dev/null
+++ b/src/main/java/com/ruoyi/account/bean/dto/SalesReturnDto.java
@@ -0,0 +1,26 @@
+package com.ruoyi.account.bean.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@Schema(name = "SalesReturnDto", description = "璐㈠姟绠$悊--閿�鍞��璐у彴璐�(浼犲弬)")
+public class SalesReturnDto {
+
+ @Schema(description = "閫�璐у崟鍙�")
+ private String returnNo;
+
+ @Schema(description = "瀹㈡埛鍚嶇О")
+ private String customerName;
+
+ @Schema(description = "寮�濮嬫棩鏈�")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date startDate;
+
+ @Schema(description = "缁撴潫鏃ユ湡")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date endDate;
+}
diff --git a/src/main/java/com/ruoyi/account/bean/vo/SalesOutboundVo.java b/src/main/java/com/ruoyi/account/bean/vo/SalesOutboundVo.java
new file mode 100644
index 0000000..cfc0a68
--- /dev/null
+++ b/src/main/java/com/ruoyi/account/bean/vo/SalesOutboundVo.java
@@ -0,0 +1,52 @@
+package com.ruoyi.account.bean.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@Schema(name = "SalesOutboundVo", description = "璐㈠姟绠$悊--閿�鍞嚭搴撳彴璐�(杩斿洖)")
+@ExcelIgnoreUnannotated
+public class SalesOutboundVo {
+
+ @Schema(description = "鍑哄簱鍗昳d")
+ private Long id;
+
+ @Schema(description = "鍑哄簱鍗曞彿")
+ @Excel(name = "鍑哄簱鍗曞彿")
+ private String outboundBatches;
+
+ @Schema(description = "瀹㈡埛鍚嶇О")
+ @Excel(name = "瀹㈡埛鍚嶇О")
+ private String customerName;
+
+ @Schema(description = "鍑哄簱鏃ユ湡")
+ @Excel(name = "鍑哄簱鏃ユ湡")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date shippingDate;
+
+ @Schema(description = "浜у搧鍚嶇О")
+ @Excel(name = "浜у搧鍚嶇О")
+ private String productName;
+
+ @Schema(description = "浜у搧瑙勬牸")
+ @Excel(name = "浜у搧瑙勬牸")
+ private String specificationModel;
+
+ @Schema(description = "鍑哄簱鏁伴噺")
+ @Excel(name = "鍑哄簱鏁伴噺")
+ private BigDecimal stockOutNum;
+
+ @Schema(description = "鍙戣揣缂栧彿")
+ @Excel(name = "鍙戣揣缂栧彿")
+ private String shippingNo;
+
+ @Schema(description = "閿�鍞鍗曞彿")
+ @Excel(name = "閿�鍞鍗曞彿")
+ private String salesContractNo;
+}
diff --git a/src/main/java/com/ruoyi/account/bean/vo/SalesReturnVo.java b/src/main/java/com/ruoyi/account/bean/vo/SalesReturnVo.java
new file mode 100644
index 0000000..c425737
--- /dev/null
+++ b/src/main/java/com/ruoyi/account/bean/vo/SalesReturnVo.java
@@ -0,0 +1,48 @@
+package com.ruoyi.account.bean.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+@Data
+@Schema(name = "SalesReturnVo", description = "璐㈠姟绠$悊--閿�鍞��璐у彴璐�(杩斿洖)")
+@ExcelIgnoreUnannotated
+public class SalesReturnVo {
+
+ @Schema(description = "閫�璐у崟id")
+ private Long id;
+
+ @Excel(name = "閫�璐у崟鍙�")
+ @Schema(description = "閫�璐у崟鍙�")
+ private String returnNo;
+
+ @Schema(description = "瀹㈡埛鍚嶇О")
+ @Excel(name = "瀹㈡埛鍚嶇О")
+ private String customerName;
+
+ @Schema(description = "鍏宠仈鍙戣揣鍗曞彿")
+ @Excel(name = "鍏宠仈鍙戣揣鍗曞彿")
+ private String shippingNo;
+
+ @Schema(description = "閫�璐ф棩鏈�")
+ @Excel(name = "閫�璐ф棩鏈�")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private LocalDateTime makeTime;
+
+ @Schema(description = "閫�娆炬�婚")
+ @Excel(name = "閫�娆炬�婚")
+ private BigDecimal refundAmount;
+
+ @Schema(description = "閫�璐у師鍥�")
+ @Excel(name = "閫�璐у師鍥�")
+ private String returnReason;
+
+ @Schema(description = "閿�鍞鍗曞彿")
+ @Excel(name = "閿�鍞鍗曞彿")
+ private String salesContractNo;
+}
diff --git a/src/main/java/com/ruoyi/account/controller/AccountSalesController.java b/src/main/java/com/ruoyi/account/controller/AccountSalesController.java
new file mode 100644
index 0000000..5fb5e4f
--- /dev/null
+++ b/src/main/java/com/ruoyi/account/controller/AccountSalesController.java
@@ -0,0 +1,68 @@
+package com.ruoyi.account.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.account.bean.dto.SalesOutboundDto;
+import com.ruoyi.account.bean.dto.SalesReturnDto;
+import com.ruoyi.account.bean.vo.SalesOutboundVo;
+import com.ruoyi.account.bean.vo.SalesReturnVo;
+import com.ruoyi.account.service.AccountSalesService;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.framework.web.domain.R;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 璐㈠姟绠$悊鐨勯攢鍞儴鍒� 鍓嶇鎺у埗鍣�
+ * </p>
+ *
+ * @author 鑺杞欢锛堟睙鑻忥級鏈夐檺鍏徃
+ * @since 2026-05-07 04:45:30
+ */
+@RestController
+@RequestMapping("/accountSales")
+@RequiredArgsConstructor
+@Tag(name = "璐㈠姟绠$悊鐨勯攢鍞儴鍒�")
+public class AccountSalesController {
+
+ private final AccountSalesService accountSalesService;
+
+ @GetMapping("/listPageByOutbound")
+ @Log(title = "閿�鍞嚭搴撳彴璐�", businessType = BusinessType.OTHER)
+ @Operation(summary = "璐㈠姟绠$悊--閿�鍞嚭搴撳彴璐�")
+ public R<IPage<SalesOutboundVo>> listPageByOutbound(Page page, SalesOutboundDto salesOutboundDto) {
+ IPage<SalesOutboundVo> listPage = accountSalesService.listPageByOutbound(page,salesOutboundDto);
+ return R.ok(listPage);
+ }
+
+ @PostMapping("/exportAccountSalesOutbound")
+ @Operation(summary = "瀵煎嚭閿�鍞嚭搴撴枃浠�")
+ @Log(title = "瀵煎嚭閿�鍞嚭搴撴枃浠�", businessType = BusinessType.EXPORT)
+ public void exportAccountSalesOutbound(HttpServletResponse response,SalesOutboundDto salesOutboundDto) {
+ accountSalesService.exportAccountSalesOutbound(response,salesOutboundDto);
+ }
+
+ @GetMapping("/listPageByReturn")
+ @Log(title = "閿�鍞��璐у彴璐�", businessType = BusinessType.OTHER)
+ @Operation(summary = "璐㈠姟绠$悊--閿�鍞��璐у彴璐�")
+ public R<IPage<SalesReturnVo>> listPageBySalesReturn(Page page, SalesReturnDto salesReturnDto) {
+ IPage<SalesReturnVo> listPage = accountSalesService.listPageBySalesReturn(page,salesReturnDto);
+ return R.ok(listPage);
+ }
+
+ @PostMapping("/exportAccountSalesReturn")
+ @Operation(summary = "瀵煎嚭閿�鍞��璐ф枃浠�")
+ @Log(title = "瀵煎嚭閿�鍞��璐ф枃浠�", businessType = BusinessType.EXPORT)
+ public void exportAccountSalesReturn(HttpServletResponse response,SalesReturnDto salesReturnDto) {
+ accountSalesService.exportAccountSalesReturn(response,salesReturnDto);
+ }
+
+}
diff --git a/src/main/java/com/ruoyi/account/service/AccountSalesService.java b/src/main/java/com/ruoyi/account/service/AccountSalesService.java
new file mode 100644
index 0000000..930c5dd
--- /dev/null
+++ b/src/main/java/com/ruoyi/account/service/AccountSalesService.java
@@ -0,0 +1,28 @@
+package com.ruoyi.account.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.account.bean.dto.SalesOutboundDto;
+import com.ruoyi.account.bean.dto.SalesReturnDto;
+import com.ruoyi.account.bean.vo.SalesOutboundVo;
+import com.ruoyi.account.bean.vo.SalesReturnVo;
+import jakarta.servlet.http.HttpServletResponse;
+
+/**
+ * <p>
+ * 璐㈠姟绠$悊鐨勯攢鍞儴鍒� 鏈嶅姟绫�
+ * </p>
+ *
+ * @author 鑺杞欢锛堟睙鑻忥級鏈夐檺鍏徃
+ * @since 2026-05-07 04:45:30
+ */
+public interface AccountSalesService {
+
+ IPage<SalesOutboundVo> listPageByOutbound(Page page, SalesOutboundDto salesOutboundDto);
+
+ void exportAccountSalesOutbound(HttpServletResponse response, SalesOutboundDto salesOutboundDto);
+
+ IPage<SalesReturnVo> listPageBySalesReturn(Page page, SalesReturnDto salesReturnDto);
+
+ void exportAccountSalesReturn(HttpServletResponse response, SalesReturnDto salesReturnDto);
+}
diff --git a/src/main/java/com/ruoyi/account/service/impl/AccountSalesServiceImpl.java b/src/main/java/com/ruoyi/account/service/impl/AccountSalesServiceImpl.java
new file mode 100644
index 0000000..8ad55fe
--- /dev/null
+++ b/src/main/java/com/ruoyi/account/service/impl/AccountSalesServiceImpl.java
@@ -0,0 +1,58 @@
+package com.ruoyi.account.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.account.bean.dto.SalesOutboundDto;
+import com.ruoyi.account.bean.dto.SalesReturnDto;
+import com.ruoyi.account.bean.vo.SalesOutboundVo;
+import com.ruoyi.account.bean.vo.SalesReturnVo;
+import com.ruoyi.account.service.AccountSalesService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.procurementrecord.mapper.ReturnManagementMapper;
+import com.ruoyi.sales.mapper.ShippingInfoMapper;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 璐㈠姟绠$悊鐨勯攢鍞儴鍒� 鏈嶅姟瀹炵幇绫�
+ * </p>
+ *
+ * @author 鑺杞欢锛堟睙鑻忥級鏈夐檺鍏徃
+ * @since 2026-05-07 04:45:30
+ */
+@Service
+@RequiredArgsConstructor
+public class AccountSalesServiceImpl implements AccountSalesService {
+
+ private final ShippingInfoMapper shippingInfoMapper;
+
+ private final ReturnManagementMapper returnManagementMapper;
+
+ @Override
+ public IPage<SalesOutboundVo> listPageByOutbound(Page page, SalesOutboundDto salesOutboundDto) {
+ return shippingInfoMapper.listPageByOutbound(page,salesOutboundDto);
+ }
+
+ @Override
+ public void exportAccountSalesOutbound(HttpServletResponse response, SalesOutboundDto salesOutboundDto) {
+ List<SalesOutboundVo> list = shippingInfoMapper.listPageByOutbound(new Page(1,-1),salesOutboundDto).getRecords();
+ ExcelUtil<SalesOutboundVo> util = new ExcelUtil<>(SalesOutboundVo.class);
+ util.exportExcel(response, list , "閿�鍞嚭搴�");
+ }
+
+ @Override
+ public IPage<SalesReturnVo> listPageBySalesReturn(Page page, SalesReturnDto salesReturnDto) {
+ return returnManagementMapper.listPageBySalesReturn(page,salesReturnDto);
+ }
+
+ @Override
+ public void exportAccountSalesReturn(HttpServletResponse response, SalesReturnDto salesReturnDto) {
+ List<SalesReturnVo> list = returnManagementMapper.listPageBySalesReturn(new Page(1,-1),salesReturnDto).getRecords();
+ ExcelUtil<SalesReturnVo> util = new ExcelUtil<>(SalesReturnVo.class);
+ util.exportExcel(response, list , "閿�鍞��璐�");
+ }
+}
diff --git a/src/main/java/com/ruoyi/device/service/impl/DeviceRepairServiceImpl.java b/src/main/java/com/ruoyi/device/service/impl/DeviceRepairServiceImpl.java
index 897e569..e3ebb0e 100644
--- a/src/main/java/com/ruoyi/device/service/impl/DeviceRepairServiceImpl.java
+++ b/src/main/java/com/ruoyi/device/service/impl/DeviceRepairServiceImpl.java
@@ -4,7 +4,6 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
-import com.ruoyi.basic.enums.ApplicationTypeEnum;
import com.ruoyi.basic.enums.RecordTypeEnum;
import com.ruoyi.basic.utils.FileUtil;
import com.ruoyi.common.utils.bean.BeanUtils;
@@ -123,7 +122,9 @@
});
}
// 澶勭悊鍥剧墖涓婁紶
- fileUtil.saveStorageAttachmentByRecordTypeAndRecordId("file", RecordTypeEnum.DEVICE_REPAIR, id, deviceRepairDto.getStorageBlobDTOs());
+ if (deviceRepairDto.getStorageBlobDTOs() != null) {
+ fileUtil.saveStorageAttachmentByRecordTypeAndRecordId("file", RecordTypeEnum.DEVICE_REPAIR, id, deviceRepairDto.getStorageBlobDTOs());
+ }
return AjaxResult.success();
}
return AjaxResult.error();
diff --git a/src/main/java/com/ruoyi/procurementrecord/mapper/ReturnManagementMapper.java b/src/main/java/com/ruoyi/procurementrecord/mapper/ReturnManagementMapper.java
index 4392109..ec1693e 100644
--- a/src/main/java/com/ruoyi/procurementrecord/mapper/ReturnManagementMapper.java
+++ b/src/main/java/com/ruoyi/procurementrecord/mapper/ReturnManagementMapper.java
@@ -3,6 +3,8 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.account.bean.dto.SalesReturnDto;
+import com.ruoyi.account.bean.vo.SalesReturnVo;
import com.ruoyi.procurementrecord.dto.ReturnManagementDto;
import com.ruoyi.procurementrecord.pojo.ReturnManagement;
import org.apache.ibatis.annotations.Param;
@@ -22,4 +24,6 @@
IPage<ReturnManagementDto> listPage(Page page, @Param("req") ReturnManagementDto returnManagement);
ReturnManagementDto getReturnManagementDtoById(Long id);
+
+ IPage<SalesReturnVo> listPageBySalesReturn(Page page, @Param("req") SalesReturnDto salesReturnDto);
}
diff --git a/src/main/java/com/ruoyi/sales/mapper/ShippingInfoMapper.java b/src/main/java/com/ruoyi/sales/mapper/ShippingInfoMapper.java
index 5c7a5bf..57b142d 100644
--- a/src/main/java/com/ruoyi/sales/mapper/ShippingInfoMapper.java
+++ b/src/main/java/com/ruoyi/sales/mapper/ShippingInfoMapper.java
@@ -3,10 +3,11 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.account.bean.dto.SalesOutboundDto;
+import com.ruoyi.account.bean.vo.SalesOutboundVo;
import com.ruoyi.sales.dto.SalesLedgerProductDto;
import com.ruoyi.sales.dto.ShippingInfoDto;
import com.ruoyi.sales.pojo.ShippingInfo;
-import com.ruoyi.sales.pojo.ShippingProductDetail;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -24,5 +25,5 @@
List<ShippingInfo> getShippingInfoByCustomerName(String customerName);
- List<ShippingProductDetail> getDateil(Long id);
+ IPage<SalesOutboundVo> listPageByOutbound(Page page, @Param("req") SalesOutboundDto salesOutboundDto);
}
diff --git a/src/main/java/com/ruoyi/staff/controller/StaffOnJobController.java b/src/main/java/com/ruoyi/staff/controller/StaffOnJobController.java
index 3378f80..ab27019 100644
--- a/src/main/java/com/ruoyi/staff/controller/StaffOnJobController.java
+++ b/src/main/java/com/ruoyi/staff/controller/StaffOnJobController.java
@@ -6,19 +6,18 @@
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.staff.dto.StaffOnJobDto;
+import com.ruoyi.staff.dto.StaffOnJobExcelDto;
import com.ruoyi.staff.pojo.StaffContract;
import com.ruoyi.staff.pojo.StaffOnJob;
import com.ruoyi.staff.service.IStaffOnJobService;
-import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletResponse;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
-import com.ruoyi.staff.dto.StaffOnJobExcelDto;
-import jakarta.annotation.Resource;
-import jakarta.servlet.http.HttpServletResponse;
-import jakarta.validation.Valid;
import java.util.List;
/**
@@ -103,7 +102,7 @@
* @return
*/
@PostMapping("/renewContract/{id}")
- public AjaxResult renewContract(@PathVariable("id") Long id, @RequestBody StaffContract staffContract) {
+ public AjaxResult renewContract(@PathVariable Long id, @RequestBody StaffContract staffContract) {
return AjaxResult.success(staffOnJobService.renewContract(id, staffContract));
}
diff --git a/src/main/resources/mapper/procurementrecord/ReturnManagementMapper.xml b/src/main/resources/mapper/procurementrecord/ReturnManagementMapper.xml
index 1b84282..a06b4f0 100644
--- a/src/main/resources/mapper/procurementrecord/ReturnManagementMapper.xml
+++ b/src/main/resources/mapper/procurementrecord/ReturnManagementMapper.xml
@@ -53,4 +53,30 @@
left join sales_ledger sl on si.sales_ledger_id = sl.id
where rm.id = #{id}
</select>
-</mapper>
\ No newline at end of file
+ <select id="listPageBySalesReturn" resultType="com.ruoyi.account.bean.vo.SalesReturnVo">
+ select rm.id,
+ rm.return_no,
+ c.customer_name,
+ si.shipping_no,
+ rm.make_time,
+ rm.refund_amount,
+ rm.return_reason,
+ rm.make_time,
+ sl.sales_contract_no
+ from return_management rm
+ left join shipping_info si on rm.shipping_id = si.id
+ left join customer c on rm.customer_id = c.id
+ left join sales_ledger sl on si.sales_ledger_id = sl.id
+ where rm.status=1
+ <if test="req.returnNo != null and req.returnNo != ''">
+ and rm.return_no like concat('%',#{req.returnNo},'%')
+ </if>
+ <if test="req.customerName != null and req.customerName != ''">
+ and c.customer_name like concat('%',#{req.customerName},'%')
+ </if>
+ <if test="req.startDate != null and req.endDate != null">
+ AND DATE_FORMAT(rm.make_time, '%Y-%m-%d') BETWEEN #{startDate} AND #{endDate}
+ </if>
+ order by rm.id DESC
+ </select>
+</mapper>
diff --git a/src/main/resources/mapper/sales/InvoiceRegistrationProductMapper.xml b/src/main/resources/mapper/sales/InvoiceRegistrationProductMapper.xml
index fcaba49..ba790b1 100644
--- a/src/main/resources/mapper/sales/InvoiceRegistrationProductMapper.xml
+++ b/src/main/resources/mapper/sales/InvoiceRegistrationProductMapper.xml
@@ -56,7 +56,7 @@
AND T3.invoice_date = #{invoiceRegistrationProductDto.invoiceDate}
</if>
</where>
- ORDER BY T1.create_time DESC
+ ORDER BY T1.create_time DESC, T1.id DESC
</select>
<select id="invoiceRegistrationProductPage" resultType="com.ruoyi.sales.dto.InvoiceRegistrationProductDto">
@@ -127,6 +127,6 @@
%H:%i:%s')+interval 1 day
</if>
</where>
- ORDER BY T1.create_time DESC
+ ORDER BY T1.create_time DESC, T1.id DESC
</select>
</mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/sales/ShippingInfoMapper.xml b/src/main/resources/mapper/sales/ShippingInfoMapper.xml
index 048bb23..cd7dc3e 100644
--- a/src/main/resources/mapper/sales/ShippingInfoMapper.xml
+++ b/src/main/resources/mapper/sales/ShippingInfoMapper.xml
@@ -87,4 +87,33 @@
left join sales_ledger sl on si.sales_ledger_id = sl.id
where si.status = '宸插彂璐�' and sl.customer_name = #{customerName}
</select>
+ <select id="listPageByOutbound" resultType="com.ruoyi.account.bean.vo.SalesOutboundVo">
+ SELECT
+ sor.id,
+ sor.outbound_batches,
+ sl.customer_name,
+ s.shipping_date,
+ p.product_name,
+ slp.specification_model,
+ slp.stock_out_num,
+ s.shipping_no,
+ sl.sales_contract_no
+ FROM shipping_info s
+ LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id
+ LEFT JOIN sales_ledger_product slp ON s.sales_ledger_product_id = slp.id and slp.type = 1
+ left join product_model pm on slp.product_model_id = pm.id
+ left join product p on pm.product_id = p.id
+ left join stock_out_record sor on sor.record_id = s.id and sor.record_type='13'
+ WHERE s.status='宸插彂璐�'
+ <if test="req.outboundBatches != null and req.outboundBatches != ''">
+ AND sor.outbound_batches LIKE CONCAT('%',#{req.outboundBatches},'%')
+ </if>
+ <if test="req.customerName != null and req.customerName != ''">
+ AND sl.customer_name LIKE CONCAT('%',#{req.customerName},'%')
+ </if>
+ <if test="req.startDate != null and req.endDate != null">
+ AND s.shipping_date BETWEEN #{startDate} AND #{endDate}
+ </if>
+ order by sor.id DESC
+ </select>
</mapper>
diff --git a/src/main/resources/mapper/staff/StaffOnJobMapper.xml b/src/main/resources/mapper/staff/StaffOnJobMapper.xml
index b0c85bc..a256ff8 100644
--- a/src/main/resources/mapper/staff/StaffOnJobMapper.xml
+++ b/src/main/resources/mapper/staff/StaffOnJobMapper.xml
@@ -6,14 +6,13 @@
staff_on_job.*,
sp.post_name as postName,
sd.dept_name as deptName,
- t1.contract_start_time
+ MIN(t1.contract_start_time) as contract_start_time, -- 鍙栨渶鏃╁悎鍚屽紑濮嬫椂闂�
+ MAX(t1.contract_end_time) as contract_end_time
FROM staff_on_job
- LEFT JOIN
- sys_post sp ON sp.post_id = staff_on_job.sys_post_id
- LEFT JOIN
- sys_dept sd ON sd.dept_id = staff_on_job.sys_dept_id
+ LEFT JOIN sys_post sp ON sp.post_id = staff_on_job.sys_post_id
+ LEFT JOIN sys_dept sd ON sd.dept_id = staff_on_job.sys_dept_id
LEFT JOIN staff_contract as t1 ON t1.staff_on_job_id = staff_on_job.id
- where 1=1
+ WHERE 1=1
<if test="staffOnJob.staffState != null">
AND staff_state = #{staffOnJob.staffState}
</if>
@@ -26,6 +25,7 @@
<if test="staffOnJob.entryDateEnd != null and staffOnJob.entryDateEnd != '' ">
AND contract_expire_time <= DATE_FORMAT(#{staffOnJob.entryDateEnd},'%Y-%m-%d')
</if>
+ GROUP BY staff_on_job.id
</select>
<select id="staffOnJobList" resultType="com.ruoyi.staff.dto.StaffOnJobDto">
SELECT
--
Gitblit v1.9.3