领料单、退料单问题修复

This commit is contained in:
liux 2025-07-10 14:07:04 +08:00
parent 49ef3a7983
commit 12d58efac3
6 changed files with 63 additions and 496 deletions

View File

@ -1,13 +1,16 @@
package com.bonus.canteen.core.ims.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
@ApiModel(value = "DrpFetchMaterial对象",description = "领料单表"
)
@Data
public class FetchMaterialPageDTO {
@ApiModelProperty("领料单号/标题")
private String fetchMaterialId;
@ -26,17 +29,17 @@ public class FetchMaterialPageDTO {
@ApiModelProperty("审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
private Integer approveStatus;
@ApiModelProperty("领料开始时间")
private LocalDateTime startTime;
private String startTime;
@ApiModelProperty("领料结束时间")
private LocalDateTime endTime;
private String endTime;
@ApiModelProperty("领料人")
private Long fetchUserId;
@ApiModelProperty("领料人名称")
private String fetchUser;
@ApiModelProperty("制表开始时间")
private LocalDateTime crtimeStart;
private String crtimeStart;
@ApiModelProperty("制表结束时间")
private LocalDateTime crtimeEnd;
private String crtimeEnd;
@ApiModelProperty("食堂id")
private Long canteenId;
@ApiModelProperty("档口id")
@ -45,165 +48,4 @@ public class FetchMaterialPageDTO {
private Long areaId;
private List<Long> areaAuth;
public Long getAreaId() {
return areaId;
}
public void setAreaId(Long areaId) {
this.areaId = areaId;
}
public String getFetchMaterialId() {
return this.fetchMaterialId;
}
public List<Long> getAreaIdList() {
return this.areaIdList;
}
public List<Long> getCanteenIdList() {
return this.canteenIdList;
}
public List<Long> getStallIdList() {
return this.stallIdList;
}
public List<Long> getWarehouseIdList() {
return this.warehouseIdList;
}
public Integer getCommitStatus() {
return this.commitStatus;
}
public Integer getFetchStatus() {
return this.fetchStatus;
}
public Integer getApproveStatus() {
return this.approveStatus;
}
public LocalDateTime getStartTime() {
return this.startTime;
}
public LocalDateTime getEndTime() {
return this.endTime;
}
public Long getFetchUserId() {
return this.fetchUserId;
}
public LocalDateTime getCrtimeStart() {
return this.crtimeStart;
}
public LocalDateTime getCrtimeEnd() {
return this.crtimeEnd;
}
public Long getCanteenId() {
return this.canteenId;
}
public Long getStallId() {
return this.stallId;
}
public List<Long> getAreaAuth() {
return this.areaAuth;
}
public String getFetchUser() {
return fetchUser;
}
public FetchMaterialPageDTO setFetchUser(String fetchUser) {
this.fetchUser = fetchUser;
return this;
}
public FetchMaterialPageDTO setFetchMaterialId(final String fetchMaterialId) {
this.fetchMaterialId = fetchMaterialId;
return this;
}
public FetchMaterialPageDTO setAreaIdList(final List<Long> areaIdList) {
this.areaIdList = areaIdList;
return this;
}
public FetchMaterialPageDTO setCanteenIdList(final List<Long> canteenIdList) {
this.canteenIdList = canteenIdList;
return this;
}
public FetchMaterialPageDTO setStallIdList(final List<Long> stallIdList) {
this.stallIdList = stallIdList;
return this;
}
public FetchMaterialPageDTO setWarehouseIdList(final List<Long> warehouseIdList) {
this.warehouseIdList = warehouseIdList;
return this;
}
public FetchMaterialPageDTO setCommitStatus(final Integer commitStatus) {
this.commitStatus = commitStatus;
return this;
}
public FetchMaterialPageDTO setFetchStatus(final Integer fetchStatus) {
this.fetchStatus = fetchStatus;
return this;
}
public FetchMaterialPageDTO setApproveStatus(final Integer approveStatus) {
this.approveStatus = approveStatus;
return this;
}
public FetchMaterialPageDTO setStartTime(final LocalDateTime startTime) {
this.startTime = startTime;
return this;
}
public FetchMaterialPageDTO setEndTime(final LocalDateTime endTime) {
this.endTime = endTime;
return this;
}
public FetchMaterialPageDTO setFetchUserId(final Long fetchUserId) {
this.fetchUserId = fetchUserId;
return this;
}
public FetchMaterialPageDTO setCrtimeStart(final LocalDateTime crtimeStart) {
this.crtimeStart = crtimeStart;
return this;
}
public FetchMaterialPageDTO setCrtimeEnd(final LocalDateTime crtimeEnd) {
this.crtimeEnd = crtimeEnd;
return this;
}
public FetchMaterialPageDTO setCanteenId(final Long canteenId) {
this.canteenId = canteenId;
return this;
}
public FetchMaterialPageDTO setStallId(final Long stallId) {
this.stallId = stallId;
return this;
}
public FetchMaterialPageDTO setAreaAuth(final List<Long> areaAuth) {
this.areaAuth = areaAuth;
return this;
}
}

View File

@ -2,29 +2,33 @@ package com.bonus.canteen.core.ims.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
@ApiModel
@Data
public class RefundGoodsPageDTO {
@ApiModelProperty("退货单号")
private String refundGoodsId;
private String refundGoodsCode;
@ApiModelProperty("供应商id")
private Long supplierId;
@ApiModelProperty("退货日期")
private LocalDate refundTime;
private String refundTime;
@ApiModelProperty("区域id集合")
private List<Long> areaIdList;
@ApiModelProperty("退货仓库id")
private List<Long> warehouseIdList;
@ApiModelProperty("退货人")
private String refundName;
private String refundContact;
@ApiModelProperty("制表开始时间")
private LocalDateTime crtimeStart;
private String crtimeStart;
@ApiModelProperty("制表结束时间")
private LocalDateTime crtimeEnd;
private String crtimeEnd;
@ApiModelProperty("制表人")
private String createBy;
@ApiModelProperty("关联采购订单号")
@ -32,142 +36,9 @@ public class RefundGoodsPageDTO {
@ApiModelProperty("关联采购订单号")
private String orderGoodsId;
@ApiModelProperty("退货开始时间")
private LocalDateTime refundTimeStart;
private String refundTimeStart;
@ApiModelProperty("退货结束时间")
private LocalDateTime refundTimeEnd;
private String refundTimeEnd;
private Integer status;
public String getRefundGoodsId() {
return this.refundGoodsId;
}
public Long getSupplierId() {
return this.supplierId;
}
public LocalDate getRefundTime() {
return this.refundTime;
}
public List<Long> getAreaIdList() {
return this.areaIdList;
}
public List<Long> getWarehouseIdList() {
return this.warehouseIdList;
}
public String getRefundName() {
return this.refundName;
}
public LocalDateTime getCrtimeStart() {
return this.crtimeStart;
}
public LocalDateTime getCrtimeEnd() {
return this.crtimeEnd;
}
public String getRelateOrderGoodsId() {
return this.relateOrderGoodsId;
}
public String getOrderGoodsId() {
return this.orderGoodsId;
}
public LocalDateTime getRefundTimeStart() {
return this.refundTimeStart;
}
public LocalDateTime getRefundTimeEnd() {
return this.refundTimeEnd;
}
public RefundGoodsPageDTO setRefundGoodsId(final String refundGoodsId) {
this.refundGoodsId = refundGoodsId;
return this;
}
public RefundGoodsPageDTO setSupplierId(final Long supplierId) {
this.supplierId = supplierId;
return this;
}
public RefundGoodsPageDTO setRefundTime(final LocalDate refundTime) {
this.refundTime = refundTime;
return this;
}
public RefundGoodsPageDTO setAreaIdList(final List<Long> areaIdList) {
this.areaIdList = areaIdList;
return this;
}
public RefundGoodsPageDTO setWarehouseIdList(final List<Long> warehouseIdList) {
this.warehouseIdList = warehouseIdList;
return this;
}
public RefundGoodsPageDTO setRefundName(final String refundName) {
this.refundName = refundName;
return this;
}
public RefundGoodsPageDTO setCrtimeStart(final LocalDateTime crtimeStart) {
this.crtimeStart = crtimeStart;
return this;
}
public RefundGoodsPageDTO setCrtimeEnd(final LocalDateTime crtimeEnd) {
this.crtimeEnd = crtimeEnd;
return this;
}
public RefundGoodsPageDTO setRelateOrderGoodsId(final String relateOrderGoodsId) {
this.relateOrderGoodsId = relateOrderGoodsId;
return this;
}
public RefundGoodsPageDTO setOrderGoodsId(final String orderGoodsId) {
this.orderGoodsId = orderGoodsId;
return this;
}
public RefundGoodsPageDTO setRefundTimeStart(final LocalDateTime refundTimeStart) {
this.refundTimeStart = refundTimeStart;
return this;
}
public RefundGoodsPageDTO setRefundTimeEnd(final LocalDateTime refundTimeEnd) {
this.refundTimeEnd = refundTimeEnd;
return this;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
@Override
public String toString() {
return "DrpRefundGoodsPageDTO{" +
"refundGoodsId='" + refundGoodsId + '\'' +
", supplierId=" + supplierId +
", refundTime=" + refundTime +
", areaIdList=" + areaIdList +
", warehouseIdList=" + warehouseIdList +
", refundName='" + refundName + '\'' +
", crtimeStart=" + crtimeStart +
", crtimeEnd=" + crtimeEnd +
", createBy='" + createBy + '\'' +
", relateOrderGoodsId='" + relateOrderGoodsId + '\'' +
", orderGoodsId='" + orderGoodsId + '\'' +
", refundTimeStart=" + refundTimeStart +
", refundTimeEnd=" + refundTimeEnd +
'}';
}
}

View File

@ -66,9 +66,12 @@ public class RefundGoodsServiceImpl implements IRefundGoodsService {
if (CharSequenceUtil.isNotEmpty(refundGoods.getRefundGoodsId())) {
refundGoods.setRefundGoodsId(LeBeanUtil.fieldLikeHandle(refundGoods.getRefundGoodsId()));
}
if (CharSequenceUtil.isNotEmpty(refundGoods.getRefundGoodsCode())) {
refundGoods.setRefundGoodsCode(LeBeanUtil.fieldLikeHandle(refundGoods.getRefundGoodsCode()));
}
if (CharSequenceUtil.isNotEmpty(refundGoods.getRefundName())) {
refundGoods.setRefundName(LeBeanUtil.fieldLikeHandle(refundGoods.getRefundName()));
if (CharSequenceUtil.isNotEmpty(refundGoods.getRefundContact())) {
refundGoods.setRefundContact(LeBeanUtil.fieldLikeHandle(refundGoods.getRefundContact()));
}
return refundGoodsMapper.pageRefundGoods(refundGoods);

View File

@ -2,26 +2,30 @@ package com.bonus.canteen.core.ims.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@ApiModel
@Data
public class RefundGoodsPageVO {
@ApiModelProperty("退货单号")
private String refundGoodsId;
private String refundGoodsCode;
@ApiModelProperty("供应商id")
private Long supplierId;
@ApiModelProperty("供应商")
private String supplierName;
@ApiModelProperty("退货时间")
private LocalDateTime refundTime;
private String refundTime;
@ApiModelProperty("所属区域id")
private Long areaId;
@ApiModelProperty("所属区域")
private String areaName;
@ApiModelProperty("退货仓库id")
private Long refundZWarehouseId;
private Long refundWarehouseId;
@ApiModelProperty("退货仓库")
private String warehouseName;
@ApiModelProperty("退货人")
@ -37,182 +41,14 @@ public class RefundGoodsPageVO {
@ApiModelProperty("创建人")
private String createBy;
@ApiModelProperty("创建时间")
private LocalDateTime createTime;
private String createTime;
@ApiModelProperty("更新人")
private String updateBy;
@ApiModelProperty("更新时间")
private LocalDateTime updateTime;
private String updateTime;
public String getRefundGoodsId() {
return this.refundGoodsId;
}
public Long getSupplierId() {
return this.supplierId;
}
public String getSupplierName() {
return this.supplierName;
}
public LocalDateTime getRefundTime() {
return this.refundTime;
}
public Long getAreaId() {
return this.areaId;
}
public String getAreaName() {
return this.areaName;
}
public Long getRefundZWarehouseId() {
return this.refundZWarehouseId;
}
public String getWarehouseName() {
return this.warehouseName;
}
public String getRefundContact() {
return this.refundContact;
}
public Long getRefundTotalAmount() {
return this.refundTotalAmount;
}
public BigDecimal getRefundTotalNum() {
return this.refundTotalNum;
}
public String getRelateOrderGoodsId() {
return this.relateOrderGoodsId;
}
public Integer getIfOut() {
return this.ifOut;
}
@ApiModelProperty(" 状态1已提交2待提交")
private Integer status;
public RefundGoodsPageVO setRefundGoodsId(final String refundGoodsId) {
this.refundGoodsId = refundGoodsId;
return this;
}
public RefundGoodsPageVO setSupplierId(final Long supplierId) {
this.supplierId = supplierId;
return this;
}
public RefundGoodsPageVO setSupplierName(final String supplierName) {
this.supplierName = supplierName;
return this;
}
public RefundGoodsPageVO setRefundTime(final LocalDateTime refundTime) {
this.refundTime = refundTime;
return this;
}
public RefundGoodsPageVO setAreaId(final Long areaId) {
this.areaId = areaId;
return this;
}
public RefundGoodsPageVO setAreaName(final String areaName) {
this.areaName = areaName;
return this;
}
public RefundGoodsPageVO setefundZWarehouseId(final Long refundZWarehouseId) {
this.refundZWarehouseId = refundZWarehouseId;
return this;
}
public RefundGoodsPageVO setWarehouseName(final String warehouseName) {
this.warehouseName = warehouseName;
return this;
}
public RefundGoodsPageVO setRefundContact(final String refundContact) {
this.refundContact = refundContact;
return this;
}
public RefundGoodsPageVO setRefundTotalAmount(final Long refundTotalAmount) {
this.refundTotalAmount = refundTotalAmount;
return this;
}
public RefundGoodsPageVO setRefundTotalNum(final BigDecimal refundTotalNum) {
this.refundTotalNum = refundTotalNum;
return this;
}
public RefundGoodsPageVO setRelateOrderGoodsId(final String relateOrderGoodsId) {
this.relateOrderGoodsId = relateOrderGoodsId;
return this;
}
public RefundGoodsPageVO setIfOut(final Integer ifOut) {
this.ifOut = ifOut;
return this;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
return "DrpRefundGoodsPageVO{" +
"refundGoodsId='" + refundGoodsId + '\'' +
", supplierId=" + supplierId +
", supplierName='" + supplierName + '\'' +
", refundTime=" + refundTime +
", areaId=" + areaId +
", areaName='" + areaName + '\'' +
", refundZWarehouseId=" + refundZWarehouseId +
", warehouseName='" + warehouseName + '\'' +
", refundContact='" + refundContact + '\'' +
", refundTotalAmount=" + refundTotalAmount +
", refundTotalNum=" + refundTotalNum +
", relateOrderGoodsId='" + relateOrderGoodsId + '\'' +
", ifOut=" + ifOut +
", createBy='" + createBy + '\'' +
", createTime=" + createTime +
", updateBy='" + updateBy + '\'' +
", updateTime=" + updateTime +
'}';
}
}

View File

@ -184,7 +184,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content.fetchMaterialId != null and content.fetchMaterialId != ''">
and (a.fetch_material_id like #{content.fetchMaterialId}
or
a.title like #{content.fetchMaterialId})
a.title like #{content.fetchMaterialId}
or
a.fetch_material_code like #{content.fetchMaterialId}
)
</if>
<if test="content.commitStatus != null">
and a.commit_status = #{content.commitStatus}
@ -195,19 +198,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content.approveStatus != null">
and a.approve_status = #{content.approveStatus}
</if>
<if test="content.startTime != null">
<if test="content.startTime != null and content.startTime !=''">
and a.fetch_material_time <![CDATA[ >= ]]> #{content.startTime}
</if>
<if test="content.endTime != null">
<if test="content.endTime != null and content.endTime !='' ">
and a.fetch_material_time <![CDATA[ <= ]]> #{content.endTime}
</if>
<if test="content.fetchUserId != null">
and a.fetch_user_id = #{content.fetchUserId}
</if>
<if test="content.crtimeStart != null">
<if test="content.crtimeStart != null and content.crtimeStart !=''">
and a.create_time <![CDATA[ >= ]]> #{content.crtimeStart}
</if>
<if test="content.crtimeEnd != null">
<if test="content.crtimeEnd != null and content.crtimeEnd !=''">
and a.create_time <![CDATA[ <= ]]> #{content.crtimeEnd}
</if>
@ -218,7 +221,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND a.canteen_id = #{content.canteenId}
</if>
<if test="content.stallId != null and content.stallId != ''">
AND a.area_id = #{content.stallId}
AND a.stall_id = #{content.stallId}
</if>
</where>
order by a.create_time desc

View File

@ -125,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="pageRefundGoods" resultType="com.bonus.canteen.core.ims.vo.RefundGoodsPageVO">
SELECT
a.refund_goods_id,
a.refund_goods_code,
a.supplier_id,
b.supplier_name,
a.refund_time,
@ -140,7 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.update_by,
a.update_time,
c.area_id,
aa.area_name
aa.area_name,
a.status
FROM
ims_refund_goods a
LEFT JOIN ims_supplier b ON b.supplier_id = a.supplier_id
@ -148,12 +150,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join basic_area aa on c.area_id = aa.area_id
<where>
<if test="content.refundGoodsId != null and content.refundGoodsId != ''">
AND a.refund_goods_id LIKE #{content.refundGoodsId}
AND (
a.refund_goods_id LIKE #{content.refundGoodsId}
or
a.refund_goods_code LIKE #{content.refundGoodsId}
)
</if>
<if test="content.refundGoodsCode != null and content.refundGoodsCode != ''">
AND a.refund_goods_code LIKE #{content.refundGoodsCode}
</if>
<if test="content.supplierId != null">
AND a.supplier_id = #{content.supplierId}
</if>
<if test="content.refundTime != null">
<if test="content.refundTime != null and content.refundTime != ''">
AND DATE_FORMAT( a.refund_time, '%Y-%m-%d' ) = #{content.refundTime}
</if>
<if test="content.areaIdList != null and content.areaIdList.size() > 0">
@ -168,16 +177,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item}
</foreach>
</if>
<if test="content.refundName != null and content.refundName != ''">
AND a.refund_name LIKE #{content.refundName}
<if test="content.refundContact != null and content.refundContact != ''">
AND a.refund_contact LIKE #{content.refundContact}
</if>
<if test="content.createBy != null and content.createBy != ''">
and a.create_by like #{content.createBy}
</if>
<if test="content.crtimeStart != null">
<if test="content.crtimeStart != null and content.crtimeStart !=''">
and a.create_time <![CDATA[ >= ]]> #{content.crtimeStart}
</if>
<if test="content.crtimeEnd != null">
<if test="content.crtimeEnd != null and content.crtimeEnd !=''">
and a.create_time <![CDATA[ <= ]]> #{content.crtimeEnd}
</if>
<if test="content.relateOrderGoodsId != null and content.relateOrderGoodsId != ''">
@ -186,12 +195,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content.orderGoodsId != null and content.orderGoodsId != ''">
and a.relate_order_goods_id = #{content.orderGoodsId}
</if>
<if test="content.refundTimeStart != null">
<if test="content.refundTimeStart != null and content.refundTimeStart != ''">
and a.refund_time <![CDATA[ >= ]]> #{content.refundTimeStart}
</if>
<if test="content.refundTimeEnd != null">
<if test="content.refundTimeEnd != null and content.refundTimeEnd != ''">
and a.refund_time <![CDATA[ <= ]]> #{content.refundTimeEnd}
</if>
<if test="content.status != null and content.status != ''">
and a.status = #{content.status}
</if>
</where>
ORDER BY
a.create_time DESC