4.0.0
增加ERP收料通知单同步到MES,并且插入提示信息,和发送邮件信息 原材料条码选择采购订单时根据收料通知单进行选择 agv成品仓库人工申请出库后,审核可以改为人工出库,通过PDA操作 发送邮件账号信息可以配置 不限制多端用户登录的用户可以配置master
parent
79f3dad67b
commit
c8063ccad8
@ -0,0 +1,310 @@
|
|||||||
|
package com.hw.jindie.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.hw.common.core.annotation.Excel;
|
||||||
|
import com.hw.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收料通知单对象 mes_purchase_receive_bill
|
||||||
|
*
|
||||||
|
* @author xins
|
||||||
|
* @date 2024-12-16
|
||||||
|
*/
|
||||||
|
public class MesPurchaseReceiveBill extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键标识 */
|
||||||
|
private Long receiveBillId;
|
||||||
|
|
||||||
|
/** ERP的主键信息;对应FID */
|
||||||
|
@Excel(name = "ERP的主键信息;对应FID")
|
||||||
|
private Long erpId;
|
||||||
|
|
||||||
|
/** 对应金蝶ERP收料单明细的ID;对应FDetailEntity_FEntryID */
|
||||||
|
@Excel(name = "对应金蝶ERP收料单明细的ID;对应FDetailEntity_FEntryID")
|
||||||
|
private Long fentryId;
|
||||||
|
|
||||||
|
/** 收料单据号;对应FBillNo */
|
||||||
|
@Excel(name = "收料单据号;对应FBillNo")
|
||||||
|
private String billNo;
|
||||||
|
|
||||||
|
/** 采购订单编号;对应FOrderBillNo */
|
||||||
|
@Excel(name = "采购订单编号;对应FOrderBillNo")
|
||||||
|
private String poNo;
|
||||||
|
|
||||||
|
/** 单据状态;FDocumentStatus */
|
||||||
|
@Excel(name = "单据状态;FDocumentStatus")
|
||||||
|
private String documentStatus;
|
||||||
|
|
||||||
|
/** ERP物料ID;FMaterialId */
|
||||||
|
@Excel(name = "ERP物料ID;FMaterialId")
|
||||||
|
private Long materialId;
|
||||||
|
|
||||||
|
/** 物料编码;对应FMaterialId.FNumber */
|
||||||
|
@Excel(name = "物料编码;对应FMaterialId.FNumber")
|
||||||
|
private String materialCode;
|
||||||
|
|
||||||
|
/** 物料名称;对应FMaterialId.FName */
|
||||||
|
@Excel(name = "物料名称;对应FMaterialId.FName")
|
||||||
|
private String materialName;
|
||||||
|
|
||||||
|
/** 源单内码;对应FDetailEntity_Link_FSBillId */
|
||||||
|
@Excel(name = "源单内码;对应FDetailEntity_Link_FSBillId")
|
||||||
|
private String fsBillId;
|
||||||
|
|
||||||
|
/** 源单分录内码;对应FDetailEntity_Link_FSId */
|
||||||
|
@Excel(name = "源单分录内码;对应FDetailEntity_Link_FSId")
|
||||||
|
private String fsId;
|
||||||
|
|
||||||
|
/** 实到数量;对应FActlandQty */
|
||||||
|
@Excel(name = "实到数量;对应FActlandQty")
|
||||||
|
private BigDecimal actLandAmount;
|
||||||
|
|
||||||
|
/** 交货数量;对应FActReceiveQty */
|
||||||
|
@Excel(name = "交货数量;对应FActReceiveQty")
|
||||||
|
private BigDecimal actReceiveAmount;
|
||||||
|
|
||||||
|
/** 审核日期;对应FApproveDate */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "审核日期;对应FApproveDate", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date approveDate;
|
||||||
|
|
||||||
|
/** ERP最后修改日期;对应FModifyDate */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "ERP最后修改日期;对应FModifyDate", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date erpModifyDate;
|
||||||
|
|
||||||
|
/** 收料组织;FPurchaseOrgId */
|
||||||
|
@Excel(name = "收料组织;FPurchaseOrgId")
|
||||||
|
private Long purchaseOrgId;
|
||||||
|
|
||||||
|
/** 京源项目;F_TOND_Base */
|
||||||
|
@Excel(name = "京源项目;F_TOND_Base")
|
||||||
|
private String tondBase;
|
||||||
|
|
||||||
|
/** 单价;FPRICE */
|
||||||
|
@Excel(name = "单价;FPRICE")
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/** 供应商ID;FSupplierId */
|
||||||
|
@Excel(name = "供应商ID;FSupplierId")
|
||||||
|
private Long supplierId;
|
||||||
|
|
||||||
|
private String materialSpec;
|
||||||
|
|
||||||
|
|
||||||
|
public void setReceiveBillId(Long receiveBillId)
|
||||||
|
{
|
||||||
|
this.receiveBillId = receiveBillId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getReceiveBillId()
|
||||||
|
{
|
||||||
|
return receiveBillId;
|
||||||
|
}
|
||||||
|
public void setErpId(Long erpId)
|
||||||
|
{
|
||||||
|
this.erpId = erpId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getErpId()
|
||||||
|
{
|
||||||
|
return erpId;
|
||||||
|
}
|
||||||
|
public void setFentryId(Long fentryId)
|
||||||
|
{
|
||||||
|
this.fentryId = fentryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getFentryId()
|
||||||
|
{
|
||||||
|
return fentryId;
|
||||||
|
}
|
||||||
|
public void setBillNo(String billNo)
|
||||||
|
{
|
||||||
|
this.billNo = billNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBillNo()
|
||||||
|
{
|
||||||
|
return billNo;
|
||||||
|
}
|
||||||
|
public void setPoNo(String poNo)
|
||||||
|
{
|
||||||
|
this.poNo = poNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPoNo()
|
||||||
|
{
|
||||||
|
return poNo;
|
||||||
|
}
|
||||||
|
public void setDocumentStatus(String documentStatus)
|
||||||
|
{
|
||||||
|
this.documentStatus = documentStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocumentStatus()
|
||||||
|
{
|
||||||
|
return documentStatus;
|
||||||
|
}
|
||||||
|
public void setMaterialId(Long materialId)
|
||||||
|
{
|
||||||
|
this.materialId = materialId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getMaterialId()
|
||||||
|
{
|
||||||
|
return materialId;
|
||||||
|
}
|
||||||
|
public void setMaterialCode(String materialCode)
|
||||||
|
{
|
||||||
|
this.materialCode = materialCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialCode()
|
||||||
|
{
|
||||||
|
return materialCode;
|
||||||
|
}
|
||||||
|
public void setMaterialName(String materialName)
|
||||||
|
{
|
||||||
|
this.materialName = materialName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialName()
|
||||||
|
{
|
||||||
|
return materialName;
|
||||||
|
}
|
||||||
|
public void setFsBillId(String fsBillId)
|
||||||
|
{
|
||||||
|
this.fsBillId = fsBillId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFsBillId()
|
||||||
|
{
|
||||||
|
return fsBillId;
|
||||||
|
}
|
||||||
|
public void setFsId(String fsId)
|
||||||
|
{
|
||||||
|
this.fsId = fsId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFsId()
|
||||||
|
{
|
||||||
|
return fsId;
|
||||||
|
}
|
||||||
|
public void setActLandAmount(BigDecimal actLandAmount)
|
||||||
|
{
|
||||||
|
this.actLandAmount = actLandAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getActLandAmount()
|
||||||
|
{
|
||||||
|
return actLandAmount;
|
||||||
|
}
|
||||||
|
public void setActReceiveAmount(BigDecimal actReceiveAmount)
|
||||||
|
{
|
||||||
|
this.actReceiveAmount = actReceiveAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getActReceiveAmount()
|
||||||
|
{
|
||||||
|
return actReceiveAmount;
|
||||||
|
}
|
||||||
|
public void setApproveDate(Date approveDate)
|
||||||
|
{
|
||||||
|
this.approveDate = approveDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getApproveDate()
|
||||||
|
{
|
||||||
|
return approveDate;
|
||||||
|
}
|
||||||
|
public void setErpModifyDate(Date erpModifyDate)
|
||||||
|
{
|
||||||
|
this.erpModifyDate = erpModifyDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getErpModifyDate()
|
||||||
|
{
|
||||||
|
return erpModifyDate;
|
||||||
|
}
|
||||||
|
public void setPurchaseOrgId(Long purchaseOrgId)
|
||||||
|
{
|
||||||
|
this.purchaseOrgId = purchaseOrgId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getPurchaseOrgId()
|
||||||
|
{
|
||||||
|
return purchaseOrgId;
|
||||||
|
}
|
||||||
|
public void setTondBase(String tondBase)
|
||||||
|
{
|
||||||
|
this.tondBase = tondBase;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTondBase()
|
||||||
|
{
|
||||||
|
return tondBase;
|
||||||
|
}
|
||||||
|
public void setPrice(BigDecimal price)
|
||||||
|
{
|
||||||
|
this.price = price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPrice()
|
||||||
|
{
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
public void setSupplierId(Long supplierId)
|
||||||
|
{
|
||||||
|
this.supplierId = supplierId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSupplierId()
|
||||||
|
{
|
||||||
|
return supplierId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialSpec() {
|
||||||
|
return materialSpec;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaterialSpec(String materialSpec) {
|
||||||
|
this.materialSpec = materialSpec;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("receiveBillId", getReceiveBillId())
|
||||||
|
.append("erpId", getErpId())
|
||||||
|
.append("fentryId", getFentryId())
|
||||||
|
.append("billNo", getBillNo())
|
||||||
|
.append("poNo", getPoNo())
|
||||||
|
.append("documentStatus", getDocumentStatus())
|
||||||
|
.append("materialId", getMaterialId())
|
||||||
|
.append("materialCode", getMaterialCode())
|
||||||
|
.append("materialName", getMaterialName())
|
||||||
|
.append("fsBillId", getFsBillId())
|
||||||
|
.append("fsId", getFsId())
|
||||||
|
.append("actLandAmount", getActLandAmount())
|
||||||
|
.append("actReceiveAmount", getActReceiveAmount())
|
||||||
|
.append("approveDate", getApproveDate())
|
||||||
|
.append("erpModifyDate", getErpModifyDate())
|
||||||
|
.append("purchaseOrgId", getPurchaseOrgId())
|
||||||
|
.append("tondBase", getTondBase())
|
||||||
|
.append("price", getPrice())
|
||||||
|
.append("supplierId", getSupplierId())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,94 @@
|
|||||||
|
package com.hw.jindie.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hw.jindie.domain.MesPurchaseOrder;
|
||||||
|
import com.hw.jindie.domain.MesPurchaseReceiveBill;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收料通知单Mapper接口
|
||||||
|
*
|
||||||
|
* @author xins
|
||||||
|
* @date 2024-12-16
|
||||||
|
*/
|
||||||
|
public interface MesPurchaseReceiveBillMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询收料通知单
|
||||||
|
*
|
||||||
|
* @param receiveBillId 收料通知单主键
|
||||||
|
* @return 收料通知单
|
||||||
|
*/
|
||||||
|
public MesPurchaseReceiveBill selectMesPurchaseReceiveBillByReceiveBillId(Long receiveBillId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询收料通知单列表
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 收料通知单集合
|
||||||
|
*/
|
||||||
|
public List<MesPurchaseReceiveBill> selectMesPurchaseReceiveBillList(MesPurchaseReceiveBill mesPurchaseReceiveBill);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增收料通知单
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertMesPurchaseReceiveBill(MesPurchaseReceiveBill mesPurchaseReceiveBill);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改收料通知单
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateMesPurchaseReceiveBill(MesPurchaseReceiveBill mesPurchaseReceiveBill);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除收料通知单
|
||||||
|
*
|
||||||
|
* @param receiveBillId 收料通知单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesPurchaseReceiveBillByReceiveBillId(Long receiveBillId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除收料通知单
|
||||||
|
*
|
||||||
|
* @param receiveBillIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesPurchaseReceiveBillByReceiveBillIds(Long[] receiveBillIds);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最大的ERP更新时间
|
||||||
|
*
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String selectMaxErpModifyDate();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询收料通知单信息
|
||||||
|
*
|
||||||
|
* @param erpId ERP主键
|
||||||
|
* @param fentryId ERP销售明细主键
|
||||||
|
* @return 收料通知单信息
|
||||||
|
*/
|
||||||
|
public MesPurchaseReceiveBill selectMesPurchaseReceiveBillByUI(@Param("erpId") Long erpId,
|
||||||
|
@Param("fentryId") Long fentryId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增收料通知单信息
|
||||||
|
*
|
||||||
|
* @param MesPurchaseReceiveBills 收料通知单信息列表
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int batchMesBasePurchaseReceiveBill(List<MesPurchaseReceiveBill> MesPurchaseReceiveBills);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,180 @@
|
|||||||
|
<?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.hw.jindie.mapper.MesPurchaseReceiveBillMapper">
|
||||||
|
|
||||||
|
<resultMap type="MesPurchaseReceiveBill" id="MesPurchaseReceiveBillResult">
|
||||||
|
<result property="receiveBillId" column="receive_bill_id" />
|
||||||
|
<result property="erpId" column="erp_id" />
|
||||||
|
<result property="fentryId" column="fentry_id" />
|
||||||
|
<result property="billNo" column="bill_no" />
|
||||||
|
<result property="poNo" column="po_no" />
|
||||||
|
<result property="documentStatus" column="document_status" />
|
||||||
|
<result property="materialId" column="material_id" />
|
||||||
|
<result property="materialCode" column="material_code" />
|
||||||
|
<result property="materialName" column="material_name" />
|
||||||
|
<result property="fsBillId" column="fs_bill_id" />
|
||||||
|
<result property="fsId" column="fs_id" />
|
||||||
|
<result property="actLandAmount" column="act_land_amount" />
|
||||||
|
<result property="actReceiveAmount" column="act_receive_amount" />
|
||||||
|
<result property="approveDate" column="approve_date" />
|
||||||
|
<result property="erpModifyDate" column="erp_modify_date" />
|
||||||
|
<result property="purchaseOrgId" column="purchase_org_id" />
|
||||||
|
<result property="tondBase" column="tond_base" />
|
||||||
|
<result property="price" column="price" />
|
||||||
|
<result property="supplierId" column="supplier_id" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectMesPurchaseReceiveBillVo">
|
||||||
|
select receive_bill_id, erp_id, fentry_id, bill_no, po_no, document_status, material_id, material_code, material_name, fs_bill_id, fs_id, act_land_amount, act_receive_amount, approve_date, erp_modify_date, purchase_org_id, tond_base, price, supplier_id, remark, create_by, create_time, update_by, update_time from mes_purchase_receive_bill
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectMesPurchaseReceiveBillList" parameterType="MesPurchaseReceiveBill" resultMap="MesPurchaseReceiveBillResult">
|
||||||
|
<include refid="selectMesPurchaseReceiveBillVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="erpId != null "> and erp_id = #{erpId}</if>
|
||||||
|
<if test="fentryId != null "> and fentry_id = #{fentryId}</if>
|
||||||
|
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</if>
|
||||||
|
<if test="poNo != null and poNo != ''"> and po_no = #{poNo}</if>
|
||||||
|
<if test="documentStatus != null and documentStatus != ''"> and document_status = #{documentStatus}</if>
|
||||||
|
<if test="materialId != null "> and material_id = #{materialId}</if>
|
||||||
|
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
||||||
|
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
||||||
|
<if test="fsBillId != null and fsBillId != ''"> and fs_bill_id = #{fsBillId}</if>
|
||||||
|
<if test="fsId != null and fsId != ''"> and fs_id = #{fsId}</if>
|
||||||
|
<if test="actLandAmount != null "> and act_land_amount = #{actLandAmount}</if>
|
||||||
|
<if test="actReceiveAmount != null "> and act_receive_amount = #{actReceiveAmount}</if>
|
||||||
|
<if test="approveDate != null "> and approve_date = #{approveDate}</if>
|
||||||
|
<if test="erpModifyDate != null "> and erp_modify_date = #{erpModifyDate}</if>
|
||||||
|
<if test="purchaseOrgId != null "> and purchase_org_id = #{purchaseOrgId}</if>
|
||||||
|
<if test="tondBase != null and tondBase != ''"> and tond_base = #{tondBase}</if>
|
||||||
|
<if test="price != null "> and price = #{price}</if>
|
||||||
|
<if test="supplierId != null "> and supplier_id = #{supplierId}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMesPurchaseReceiveBillByReceiveBillId" parameterType="Long" resultMap="MesPurchaseReceiveBillResult">
|
||||||
|
<include refid="selectMesPurchaseReceiveBillVo"/>
|
||||||
|
where receive_bill_id = #{receiveBillId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertMesPurchaseReceiveBill" parameterType="MesPurchaseReceiveBill" useGeneratedKeys="true" keyProperty="receiveBillId">
|
||||||
|
insert into mes_purchase_receive_bill
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="erpId != null">erp_id,</if>
|
||||||
|
<if test="fentryId != null">fentry_id,</if>
|
||||||
|
<if test="billNo != null">bill_no,</if>
|
||||||
|
<if test="poNo != null">po_no,</if>
|
||||||
|
<if test="documentStatus != null">document_status,</if>
|
||||||
|
<if test="materialId != null">material_id,</if>
|
||||||
|
<if test="materialCode != null and materialCode != ''">material_code,</if>
|
||||||
|
<if test="materialName != null">material_name,</if>
|
||||||
|
<if test="fsBillId != null">fs_bill_id,</if>
|
||||||
|
<if test="fsId != null">fs_id,</if>
|
||||||
|
<if test="actLandAmount != null">act_land_amount,</if>
|
||||||
|
<if test="actReceiveAmount != null">act_receive_amount,</if>
|
||||||
|
<if test="approveDate != null">approve_date,</if>
|
||||||
|
<if test="erpModifyDate != null">erp_modify_date,</if>
|
||||||
|
<if test="purchaseOrgId != null">purchase_org_id,</if>
|
||||||
|
<if test="tondBase != null">tond_base,</if>
|
||||||
|
<if test="price != null">price,</if>
|
||||||
|
<if test="supplierId != null">supplier_id,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="erpId != null">#{erpId},</if>
|
||||||
|
<if test="fentryId != null">#{fentryId},</if>
|
||||||
|
<if test="billNo != null">#{billNo},</if>
|
||||||
|
<if test="poNo != null">#{poNo},</if>
|
||||||
|
<if test="documentStatus != null">#{documentStatus},</if>
|
||||||
|
<if test="materialId != null">#{materialId},</if>
|
||||||
|
<if test="materialCode != null and materialCode != ''">#{materialCode},</if>
|
||||||
|
<if test="materialName != null">#{materialName},</if>
|
||||||
|
<if test="fsBillId != null">#{fsBillId},</if>
|
||||||
|
<if test="fsId != null">#{fsId},</if>
|
||||||
|
<if test="actLandAmount != null">#{actLandAmount},</if>
|
||||||
|
<if test="actReceiveAmount != null">#{actReceiveAmount},</if>
|
||||||
|
<if test="approveDate != null">#{approveDate},</if>
|
||||||
|
<if test="erpModifyDate != null">#{erpModifyDate},</if>
|
||||||
|
<if test="purchaseOrgId != null">#{purchaseOrgId},</if>
|
||||||
|
<if test="tondBase != null">#{tondBase},</if>
|
||||||
|
<if test="price != null">#{price},</if>
|
||||||
|
<if test="supplierId != null">#{supplierId},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateMesPurchaseReceiveBill" parameterType="MesPurchaseReceiveBill">
|
||||||
|
update mes_purchase_receive_bill
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="erpId != null">erp_id = #{erpId},</if>
|
||||||
|
<if test="fentryId != null">fentry_id = #{fentryId},</if>
|
||||||
|
<if test="billNo != null">bill_no = #{billNo},</if>
|
||||||
|
<if test="poNo != null">po_no = #{poNo},</if>
|
||||||
|
<if test="documentStatus != null">document_status = #{documentStatus},</if>
|
||||||
|
<if test="materialId != null">material_id = #{materialId},</if>
|
||||||
|
<if test="materialCode != null and materialCode != ''">material_code = #{materialCode},</if>
|
||||||
|
<if test="materialName != null">material_name = #{materialName},</if>
|
||||||
|
<if test="fsBillId != null">fs_bill_id = #{fsBillId},</if>
|
||||||
|
<if test="fsId != null">fs_id = #{fsId},</if>
|
||||||
|
<if test="actLandAmount != null">act_land_amount = #{actLandAmount},</if>
|
||||||
|
<if test="actReceiveAmount != null">act_receive_amount = #{actReceiveAmount},</if>
|
||||||
|
<if test="approveDate != null">approve_date = #{approveDate},</if>
|
||||||
|
<if test="erpModifyDate != null">erp_modify_date = #{erpModifyDate},</if>
|
||||||
|
<if test="purchaseOrgId != null">purchase_org_id = #{purchaseOrgId},</if>
|
||||||
|
<if test="tondBase != null">tond_base = #{tondBase},</if>
|
||||||
|
<if test="price != null">price = #{price},</if>
|
||||||
|
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where receive_bill_id = #{receiveBillId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteMesPurchaseReceiveBillByReceiveBillId" parameterType="Long">
|
||||||
|
delete from mes_purchase_receive_bill where receive_bill_id = #{receiveBillId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteMesPurchaseReceiveBillByReceiveBillIds" parameterType="String">
|
||||||
|
delete from mes_purchase_receive_bill where receive_bill_id in
|
||||||
|
<foreach item="receiveBillId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{receiveBillId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectMaxErpModifyDate" resultType="String">
|
||||||
|
SELECT max(erp_modify_date) FROM mes_purchase_receive_bill order by erp_id,fentry_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMesPurchaseReceiveBillByUI" resultMap="MesPurchaseReceiveBillResult">
|
||||||
|
<include refid="selectMesPurchaseReceiveBillVo"/>
|
||||||
|
where erp_id = #{erpId} and fentry_id = #{fentryId} limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="batchMesBasePurchaseReceiveBill">
|
||||||
|
INSERT INTO mes_purchase_receive_bill (erp_id, fentry_id, bill_no,po_no, document_status, material_id, material_code, material_name, approve_date, erp_modify_date, fs_bill_id, fs_id,purchase_org_id, supplier_id, act_land_amount,act_receive_amount, create_time,update_time) VALUES
|
||||||
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
|
(#{item.erpId}, #{item.fentryId}, #{item.billNo},#{item.poNo},#{item.documentStatus}, #{item.materialId}, #{item.materialCode}, #{item.materialName}, #{item.approveDate}, #{item.erpModifyDate},#{item.fsBillId},#{item.fsId}, #{item.purchaseOrgId}, #{item.supplierId}, #{item.actLandAmount}, #{item.actReceiveAmount}, #{item.createTime},#{item.updateTime})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
@ -0,0 +1,105 @@
|
|||||||
|
package com.hw.mes.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
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.hw.common.log.annotation.Log;
|
||||||
|
import com.hw.common.log.enums.BusinessType;
|
||||||
|
import com.hw.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.hw.mes.domain.MesPurchaseReceiveBill;
|
||||||
|
import com.hw.mes.service.IMesPurchaseReceiveBillService;
|
||||||
|
import com.hw.common.core.web.controller.BaseController;
|
||||||
|
import com.hw.common.core.web.domain.AjaxResult;
|
||||||
|
import com.hw.common.core.utils.poi.ExcelUtil;
|
||||||
|
import com.hw.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收料通知单Controller
|
||||||
|
*
|
||||||
|
* @author xins
|
||||||
|
* @date 2024-12-16
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/purchaseReceiveBill")
|
||||||
|
public class MesPurchaseReceiveBillController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IMesPurchaseReceiveBillService mesPurchaseReceiveBillService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询收料通知单列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:purchaseReceiveBill:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(MesPurchaseReceiveBill mesPurchaseReceiveBill)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<MesPurchaseReceiveBill> list = mesPurchaseReceiveBillService.selectMesPurchaseReceiveBillJoinList(mesPurchaseReceiveBill);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出收料通知单列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:purchaseReceiveBill:export")
|
||||||
|
@Log(title = "收料通知单", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, MesPurchaseReceiveBill mesPurchaseReceiveBill)
|
||||||
|
{
|
||||||
|
List<MesPurchaseReceiveBill> list = mesPurchaseReceiveBillService.selectMesPurchaseReceiveBillList(mesPurchaseReceiveBill);
|
||||||
|
ExcelUtil<MesPurchaseReceiveBill> util = new ExcelUtil<MesPurchaseReceiveBill>(MesPurchaseReceiveBill.class);
|
||||||
|
util.exportExcel(response, list, "收料通知单数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取收料通知单详细信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:purchaseReceiveBill:query")
|
||||||
|
@GetMapping(value = "/{receiveBillId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("receiveBillId") Long receiveBillId)
|
||||||
|
{
|
||||||
|
return success(mesPurchaseReceiveBillService.selectMesPurchaseReceiveBillByReceiveBillId(receiveBillId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增收料通知单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:purchaseReceiveBill:add")
|
||||||
|
@Log(title = "收料通知单", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody MesPurchaseReceiveBill mesPurchaseReceiveBill)
|
||||||
|
{
|
||||||
|
return toAjax(mesPurchaseReceiveBillService.insertMesPurchaseReceiveBill(mesPurchaseReceiveBill));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改收料通知单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:purchaseReceiveBill:edit")
|
||||||
|
@Log(title = "收料通知单", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody MesPurchaseReceiveBill mesPurchaseReceiveBill)
|
||||||
|
{
|
||||||
|
return toAjax(mesPurchaseReceiveBillService.updateMesPurchaseReceiveBill(mesPurchaseReceiveBill));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除收料通知单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:purchaseReceiveBill:remove")
|
||||||
|
@Log(title = "收料通知单", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{receiveBillIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] receiveBillIds)
|
||||||
|
{
|
||||||
|
return toAjax(mesPurchaseReceiveBillService.deleteMesPurchaseReceiveBillByReceiveBillIds(receiveBillIds));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,309 @@
|
|||||||
|
package com.hw.mes.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.hw.common.core.annotation.Excel;
|
||||||
|
import com.hw.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收料通知单对象 mes_purchase_receive_bill
|
||||||
|
*
|
||||||
|
* @author xins
|
||||||
|
* @date 2024-12-16
|
||||||
|
*/
|
||||||
|
public class MesPurchaseReceiveBill extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键标识 */
|
||||||
|
private Long receiveBillId;
|
||||||
|
|
||||||
|
/** ERP的主键信息;对应FID */
|
||||||
|
@Excel(name = "ERP的主键信息;对应FID")
|
||||||
|
private Long erpId;
|
||||||
|
|
||||||
|
/** 对应金蝶ERP收料单明细的ID;对应FDetailEntity_FEntryID */
|
||||||
|
@Excel(name = "对应金蝶ERP收料单明细的ID;对应FDetailEntity_FEntryID")
|
||||||
|
private Long fentryId;
|
||||||
|
|
||||||
|
/** 收料单据号;对应FBillNo */
|
||||||
|
@Excel(name = "收料单据号;对应FBillNo")
|
||||||
|
private String billNo;
|
||||||
|
|
||||||
|
/** 采购订单编号;对应FOrderBillNo */
|
||||||
|
@Excel(name = "采购订单编号;对应FOrderBillNo")
|
||||||
|
private String poNo;
|
||||||
|
|
||||||
|
/** 单据状态;FDocumentStatus */
|
||||||
|
@Excel(name = "单据状态;FDocumentStatus")
|
||||||
|
private String documentStatus;
|
||||||
|
|
||||||
|
/** ERP物料ID;FMaterialId */
|
||||||
|
@Excel(name = "ERP物料ID;FMaterialId")
|
||||||
|
private Long materialId;
|
||||||
|
|
||||||
|
/** 物料编码;对应FMaterialId.FNumber */
|
||||||
|
@Excel(name = "物料编码;对应FMaterialId.FNumber")
|
||||||
|
private String materialCode;
|
||||||
|
|
||||||
|
/** 物料名称;对应FMaterialId.FName */
|
||||||
|
@Excel(name = "物料名称;对应FMaterialId.FName")
|
||||||
|
private String materialName;
|
||||||
|
|
||||||
|
/** 源单内码;对应FDetailEntity_Link_FSBillId */
|
||||||
|
@Excel(name = "源单内码;对应FDetailEntity_Link_FSBillId")
|
||||||
|
private String fsBillId;
|
||||||
|
|
||||||
|
/** 源单分录内码;对应FDetailEntity_Link_FSId */
|
||||||
|
@Excel(name = "源单分录内码;对应FDetailEntity_Link_FSId")
|
||||||
|
private String fsId;
|
||||||
|
|
||||||
|
/** 实到数量;对应FActlandQty */
|
||||||
|
@Excel(name = "实到数量;对应FActlandQty")
|
||||||
|
private BigDecimal actLandAmount;
|
||||||
|
|
||||||
|
/** 交货数量;对应FActReceiveQty */
|
||||||
|
@Excel(name = "交货数量;对应FActReceiveQty")
|
||||||
|
private BigDecimal actReceiveAmount;
|
||||||
|
|
||||||
|
/** 审核日期;对应FApproveDate */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "审核日期;对应FApproveDate", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date approveDate;
|
||||||
|
|
||||||
|
/** ERP最后修改日期;对应FModifyDate */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Excel(name = "ERP最后修改日期;对应FModifyDate", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date erpModifyDate;
|
||||||
|
|
||||||
|
/** 收料组织;FPurchaseOrgId */
|
||||||
|
@Excel(name = "收料组织;FPurchaseOrgId")
|
||||||
|
private Long purchaseOrgId;
|
||||||
|
|
||||||
|
/** 京源项目;F_TOND_Base */
|
||||||
|
@Excel(name = "京源项目;F_TOND_Base")
|
||||||
|
private String tondBase;
|
||||||
|
|
||||||
|
/** 单价;FPRICE */
|
||||||
|
@Excel(name = "单价;FPRICE")
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/** 供应商ID;FSupplierId */
|
||||||
|
@Excel(name = "供应商ID;FSupplierId")
|
||||||
|
private Long supplierId;
|
||||||
|
|
||||||
|
private String materialSpec;
|
||||||
|
|
||||||
|
public void setReceiveBillId(Long receiveBillId)
|
||||||
|
{
|
||||||
|
this.receiveBillId = receiveBillId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getReceiveBillId()
|
||||||
|
{
|
||||||
|
return receiveBillId;
|
||||||
|
}
|
||||||
|
public void setErpId(Long erpId)
|
||||||
|
{
|
||||||
|
this.erpId = erpId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getErpId()
|
||||||
|
{
|
||||||
|
return erpId;
|
||||||
|
}
|
||||||
|
public void setFentryId(Long fentryId)
|
||||||
|
{
|
||||||
|
this.fentryId = fentryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getFentryId()
|
||||||
|
{
|
||||||
|
return fentryId;
|
||||||
|
}
|
||||||
|
public void setBillNo(String billNo)
|
||||||
|
{
|
||||||
|
this.billNo = billNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBillNo()
|
||||||
|
{
|
||||||
|
return billNo;
|
||||||
|
}
|
||||||
|
public void setPoNo(String poNo)
|
||||||
|
{
|
||||||
|
this.poNo = poNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPoNo()
|
||||||
|
{
|
||||||
|
return poNo;
|
||||||
|
}
|
||||||
|
public void setDocumentStatus(String documentStatus)
|
||||||
|
{
|
||||||
|
this.documentStatus = documentStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocumentStatus()
|
||||||
|
{
|
||||||
|
return documentStatus;
|
||||||
|
}
|
||||||
|
public void setMaterialId(Long materialId)
|
||||||
|
{
|
||||||
|
this.materialId = materialId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getMaterialId()
|
||||||
|
{
|
||||||
|
return materialId;
|
||||||
|
}
|
||||||
|
public void setMaterialCode(String materialCode)
|
||||||
|
{
|
||||||
|
this.materialCode = materialCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialCode()
|
||||||
|
{
|
||||||
|
return materialCode;
|
||||||
|
}
|
||||||
|
public void setMaterialName(String materialName)
|
||||||
|
{
|
||||||
|
this.materialName = materialName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialName()
|
||||||
|
{
|
||||||
|
return materialName;
|
||||||
|
}
|
||||||
|
public void setFsBillId(String fsBillId)
|
||||||
|
{
|
||||||
|
this.fsBillId = fsBillId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFsBillId()
|
||||||
|
{
|
||||||
|
return fsBillId;
|
||||||
|
}
|
||||||
|
public void setFsId(String fsId)
|
||||||
|
{
|
||||||
|
this.fsId = fsId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFsId()
|
||||||
|
{
|
||||||
|
return fsId;
|
||||||
|
}
|
||||||
|
public void setActLandAmount(BigDecimal actLandAmount)
|
||||||
|
{
|
||||||
|
this.actLandAmount = actLandAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getActLandAmount()
|
||||||
|
{
|
||||||
|
return actLandAmount;
|
||||||
|
}
|
||||||
|
public void setActReceiveAmount(BigDecimal actReceiveAmount)
|
||||||
|
{
|
||||||
|
this.actReceiveAmount = actReceiveAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getActReceiveAmount()
|
||||||
|
{
|
||||||
|
return actReceiveAmount;
|
||||||
|
}
|
||||||
|
public void setApproveDate(Date approveDate)
|
||||||
|
{
|
||||||
|
this.approveDate = approveDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getApproveDate()
|
||||||
|
{
|
||||||
|
return approveDate;
|
||||||
|
}
|
||||||
|
public void setErpModifyDate(Date erpModifyDate)
|
||||||
|
{
|
||||||
|
this.erpModifyDate = erpModifyDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getErpModifyDate()
|
||||||
|
{
|
||||||
|
return erpModifyDate;
|
||||||
|
}
|
||||||
|
public void setPurchaseOrgId(Long purchaseOrgId)
|
||||||
|
{
|
||||||
|
this.purchaseOrgId = purchaseOrgId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getPurchaseOrgId()
|
||||||
|
{
|
||||||
|
return purchaseOrgId;
|
||||||
|
}
|
||||||
|
public void setTondBase(String tondBase)
|
||||||
|
{
|
||||||
|
this.tondBase = tondBase;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTondBase()
|
||||||
|
{
|
||||||
|
return tondBase;
|
||||||
|
}
|
||||||
|
public void setPrice(BigDecimal price)
|
||||||
|
{
|
||||||
|
this.price = price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPrice()
|
||||||
|
{
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
public void setSupplierId(Long supplierId)
|
||||||
|
{
|
||||||
|
this.supplierId = supplierId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSupplierId()
|
||||||
|
{
|
||||||
|
return supplierId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialSpec() {
|
||||||
|
return materialSpec;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaterialSpec(String materialSpec) {
|
||||||
|
this.materialSpec = materialSpec;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("receiveBillId", getReceiveBillId())
|
||||||
|
.append("erpId", getErpId())
|
||||||
|
.append("fentryId", getFentryId())
|
||||||
|
.append("billNo", getBillNo())
|
||||||
|
.append("poNo", getPoNo())
|
||||||
|
.append("documentStatus", getDocumentStatus())
|
||||||
|
.append("materialId", getMaterialId())
|
||||||
|
.append("materialCode", getMaterialCode())
|
||||||
|
.append("materialName", getMaterialName())
|
||||||
|
.append("fsBillId", getFsBillId())
|
||||||
|
.append("fsId", getFsId())
|
||||||
|
.append("actLandAmount", getActLandAmount())
|
||||||
|
.append("actReceiveAmount", getActReceiveAmount())
|
||||||
|
.append("approveDate", getApproveDate())
|
||||||
|
.append("erpModifyDate", getErpModifyDate())
|
||||||
|
.append("purchaseOrgId", getPurchaseOrgId())
|
||||||
|
.append("tondBase", getTondBase())
|
||||||
|
.append("price", getPrice())
|
||||||
|
.append("supplierId", getSupplierId())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package com.hw.mes.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.hw.mes.domain.MesPurchaseReceiveBill;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收料通知单Mapper接口
|
||||||
|
*
|
||||||
|
* @author xins
|
||||||
|
* @date 2024-12-16
|
||||||
|
*/
|
||||||
|
public interface MesPurchaseReceiveBillMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询收料通知单
|
||||||
|
*
|
||||||
|
* @param receiveBillId 收料通知单主键
|
||||||
|
* @return 收料通知单
|
||||||
|
*/
|
||||||
|
public MesPurchaseReceiveBill selectMesPurchaseReceiveBillByReceiveBillId(Long receiveBillId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询收料通知单列表
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 收料通知单集合
|
||||||
|
*/
|
||||||
|
public List<MesPurchaseReceiveBill> selectMesPurchaseReceiveBillList(MesPurchaseReceiveBill mesPurchaseReceiveBill);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增收料通知单
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertMesPurchaseReceiveBill(MesPurchaseReceiveBill mesPurchaseReceiveBill);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改收料通知单
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateMesPurchaseReceiveBill(MesPurchaseReceiveBill mesPurchaseReceiveBill);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除收料通知单
|
||||||
|
*
|
||||||
|
* @param receiveBillId 收料通知单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesPurchaseReceiveBillByReceiveBillId(Long receiveBillId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除收料通知单
|
||||||
|
*
|
||||||
|
* @param receiveBillIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesPurchaseReceiveBillByReceiveBillIds(Long[] receiveBillIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询收料通知单列表,join material
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 收料通知单集合
|
||||||
|
*/
|
||||||
|
public List<MesPurchaseReceiveBill> selectMesPurchaseReceiveBillJoinList(MesPurchaseReceiveBill mesPurchaseReceiveBill);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.hw.mes.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.hw.mes.domain.MesPurchaseReceiveBill;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收料通知单Service接口
|
||||||
|
*
|
||||||
|
* @author xins
|
||||||
|
* @date 2024-12-16
|
||||||
|
*/
|
||||||
|
public interface IMesPurchaseReceiveBillService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询收料通知单
|
||||||
|
*
|
||||||
|
* @param receiveBillId 收料通知单主键
|
||||||
|
* @return 收料通知单
|
||||||
|
*/
|
||||||
|
public MesPurchaseReceiveBill selectMesPurchaseReceiveBillByReceiveBillId(Long receiveBillId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询收料通知单列表
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 收料通知单集合
|
||||||
|
*/
|
||||||
|
public List<MesPurchaseReceiveBill> selectMesPurchaseReceiveBillList(MesPurchaseReceiveBill mesPurchaseReceiveBill);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询收料通知单列表,Join material
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 收料通知单集合
|
||||||
|
*/
|
||||||
|
public List<MesPurchaseReceiveBill> selectMesPurchaseReceiveBillJoinList(MesPurchaseReceiveBill mesPurchaseReceiveBill);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增收料通知单
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertMesPurchaseReceiveBill(MesPurchaseReceiveBill mesPurchaseReceiveBill);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改收料通知单
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateMesPurchaseReceiveBill(MesPurchaseReceiveBill mesPurchaseReceiveBill);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除收料通知单
|
||||||
|
*
|
||||||
|
* @param receiveBillIds 需要删除的收料通知单主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesPurchaseReceiveBillByReceiveBillIds(Long[] receiveBillIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除收料通知单信息
|
||||||
|
*
|
||||||
|
* @param receiveBillId 收料通知单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesPurchaseReceiveBillByReceiveBillId(Long receiveBillId);
|
||||||
|
}
|
@ -0,0 +1,109 @@
|
|||||||
|
package com.hw.mes.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.hw.common.core.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.hw.mes.mapper.MesPurchaseReceiveBillMapper;
|
||||||
|
import com.hw.mes.domain.MesPurchaseReceiveBill;
|
||||||
|
import com.hw.mes.service.IMesPurchaseReceiveBillService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收料通知单Service业务层处理
|
||||||
|
*
|
||||||
|
* @author xins
|
||||||
|
* @date 2024-12-16
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MesPurchaseReceiveBillServiceImpl implements IMesPurchaseReceiveBillService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private MesPurchaseReceiveBillMapper mesPurchaseReceiveBillMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询收料通知单
|
||||||
|
*
|
||||||
|
* @param receiveBillId 收料通知单主键
|
||||||
|
* @return 收料通知单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public MesPurchaseReceiveBill selectMesPurchaseReceiveBillByReceiveBillId(Long receiveBillId)
|
||||||
|
{
|
||||||
|
return mesPurchaseReceiveBillMapper.selectMesPurchaseReceiveBillByReceiveBillId(receiveBillId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询收料通知单列表
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 收料通知单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MesPurchaseReceiveBill> selectMesPurchaseReceiveBillList(MesPurchaseReceiveBill mesPurchaseReceiveBill)
|
||||||
|
{
|
||||||
|
return mesPurchaseReceiveBillMapper.selectMesPurchaseReceiveBillList(mesPurchaseReceiveBill);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询收料通知单列表,Join material
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 收料通知单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MesPurchaseReceiveBill> selectMesPurchaseReceiveBillJoinList(MesPurchaseReceiveBill mesPurchaseReceiveBill)
|
||||||
|
{
|
||||||
|
return mesPurchaseReceiveBillMapper.selectMesPurchaseReceiveBillJoinList(mesPurchaseReceiveBill);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增收料通知单
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertMesPurchaseReceiveBill(MesPurchaseReceiveBill mesPurchaseReceiveBill)
|
||||||
|
{
|
||||||
|
mesPurchaseReceiveBill.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return mesPurchaseReceiveBillMapper.insertMesPurchaseReceiveBill(mesPurchaseReceiveBill);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改收料通知单
|
||||||
|
*
|
||||||
|
* @param mesPurchaseReceiveBill 收料通知单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateMesPurchaseReceiveBill(MesPurchaseReceiveBill mesPurchaseReceiveBill)
|
||||||
|
{
|
||||||
|
mesPurchaseReceiveBill.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return mesPurchaseReceiveBillMapper.updateMesPurchaseReceiveBill(mesPurchaseReceiveBill);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除收料通知单
|
||||||
|
*
|
||||||
|
* @param receiveBillIds 需要删除的收料通知单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMesPurchaseReceiveBillByReceiveBillIds(Long[] receiveBillIds)
|
||||||
|
{
|
||||||
|
return mesPurchaseReceiveBillMapper.deleteMesPurchaseReceiveBillByReceiveBillIds(receiveBillIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除收料通知单信息
|
||||||
|
*
|
||||||
|
* @param receiveBillId 收料通知单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMesPurchaseReceiveBillByReceiveBillId(Long receiveBillId)
|
||||||
|
{
|
||||||
|
return mesPurchaseReceiveBillMapper.deleteMesPurchaseReceiveBillByReceiveBillId(receiveBillId);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,186 @@
|
|||||||
|
<?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.hw.mes.mapper.MesPurchaseReceiveBillMapper">
|
||||||
|
|
||||||
|
<resultMap type="MesPurchaseReceiveBill" id="MesPurchaseReceiveBillResult">
|
||||||
|
<result property="receiveBillId" column="receive_bill_id" />
|
||||||
|
<result property="erpId" column="erp_id" />
|
||||||
|
<result property="fentryId" column="fentry_id" />
|
||||||
|
<result property="billNo" column="bill_no" />
|
||||||
|
<result property="poNo" column="po_no" />
|
||||||
|
<result property="documentStatus" column="document_status" />
|
||||||
|
<result property="materialId" column="material_id" />
|
||||||
|
<result property="materialCode" column="material_code" />
|
||||||
|
<result property="materialName" column="material_name" />
|
||||||
|
<result property="fsBillId" column="fs_bill_id" />
|
||||||
|
<result property="fsId" column="fs_id" />
|
||||||
|
<result property="actLandAmount" column="act_land_amount" />
|
||||||
|
<result property="actReceiveAmount" column="act_receive_amount" />
|
||||||
|
<result property="approveDate" column="approve_date" />
|
||||||
|
<result property="erpModifyDate" column="erp_modify_date" />
|
||||||
|
<result property="purchaseOrgId" column="purchase_org_id" />
|
||||||
|
<result property="tondBase" column="tond_base" />
|
||||||
|
<result property="price" column="price" />
|
||||||
|
<result property="supplierId" column="supplier_id" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="materialSpec" column="material_spec" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectMesPurchaseReceiveBillVo">
|
||||||
|
select receive_bill_id, erp_id, fentry_id, bill_no, po_no, document_status, material_id, material_code, material_name, fs_bill_id, fs_id, act_land_amount, act_receive_amount, approve_date, erp_modify_date, purchase_org_id, tond_base, price, supplier_id, remark, create_by, create_time, update_by, update_time from mes_purchase_receive_bill
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectMesPurchaseReceiveBillList" parameterType="MesPurchaseReceiveBill" resultMap="MesPurchaseReceiveBillResult">
|
||||||
|
<include refid="selectMesPurchaseReceiveBillVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="erpId != null "> and erp_id = #{erpId}</if>
|
||||||
|
<if test="fentryId != null "> and fentry_id = #{fentryId}</if>
|
||||||
|
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</if>
|
||||||
|
<if test="poNo != null and poNo != ''"> and po_no = #{poNo}</if>
|
||||||
|
<if test="documentStatus != null and documentStatus != ''"> and document_status = #{documentStatus}</if>
|
||||||
|
<if test="materialId != null "> and material_id = #{materialId}</if>
|
||||||
|
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
||||||
|
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
||||||
|
<if test="fsBillId != null and fsBillId != ''"> and fs_bill_id = #{fsBillId}</if>
|
||||||
|
<if test="fsId != null and fsId != ''"> and fs_id = #{fsId}</if>
|
||||||
|
<if test="actLandAmount != null "> and act_land_amount = #{actLandAmount}</if>
|
||||||
|
<if test="actReceiveAmount != null "> and act_receive_amount = #{actReceiveAmount}</if>
|
||||||
|
<if test="approveDate != null "> and approve_date = #{approveDate}</if>
|
||||||
|
<if test="erpModifyDate != null "> and erp_modify_date = #{erpModifyDate}</if>
|
||||||
|
<if test="purchaseOrgId != null "> and purchase_org_id = #{purchaseOrgId}</if>
|
||||||
|
<if test="tondBase != null and tondBase != ''"> and tond_base = #{tondBase}</if>
|
||||||
|
<if test="price != null "> and price = #{price}</if>
|
||||||
|
<if test="supplierId != null "> and supplier_id = #{supplierId}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMesPurchaseReceiveBillByReceiveBillId" parameterType="Long" resultMap="MesPurchaseReceiveBillResult">
|
||||||
|
<include refid="selectMesPurchaseReceiveBillVo"/>
|
||||||
|
where receive_bill_id = #{receiveBillId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertMesPurchaseReceiveBill" parameterType="MesPurchaseReceiveBill" useGeneratedKeys="true" keyProperty="receiveBillId">
|
||||||
|
insert into mes_purchase_receive_bill
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="erpId != null">erp_id,</if>
|
||||||
|
<if test="fentryId != null">fentry_id,</if>
|
||||||
|
<if test="billNo != null">bill_no,</if>
|
||||||
|
<if test="poNo != null">po_no,</if>
|
||||||
|
<if test="documentStatus != null">document_status,</if>
|
||||||
|
<if test="materialId != null">material_id,</if>
|
||||||
|
<if test="materialCode != null and materialCode != ''">material_code,</if>
|
||||||
|
<if test="materialName != null">material_name,</if>
|
||||||
|
<if test="fsBillId != null">fs_bill_id,</if>
|
||||||
|
<if test="fsId != null">fs_id,</if>
|
||||||
|
<if test="actLandAmount != null">act_land_amount,</if>
|
||||||
|
<if test="actReceiveAmount != null">act_receive_amount,</if>
|
||||||
|
<if test="approveDate != null">approve_date,</if>
|
||||||
|
<if test="erpModifyDate != null">erp_modify_date,</if>
|
||||||
|
<if test="purchaseOrgId != null">purchase_org_id,</if>
|
||||||
|
<if test="tondBase != null">tond_base,</if>
|
||||||
|
<if test="price != null">price,</if>
|
||||||
|
<if test="supplierId != null">supplier_id,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="erpId != null">#{erpId},</if>
|
||||||
|
<if test="fentryId != null">#{fentryId},</if>
|
||||||
|
<if test="billNo != null">#{billNo},</if>
|
||||||
|
<if test="poNo != null">#{poNo},</if>
|
||||||
|
<if test="documentStatus != null">#{documentStatus},</if>
|
||||||
|
<if test="materialId != null">#{materialId},</if>
|
||||||
|
<if test="materialCode != null and materialCode != ''">#{materialCode},</if>
|
||||||
|
<if test="materialName != null">#{materialName},</if>
|
||||||
|
<if test="fsBillId != null">#{fsBillId},</if>
|
||||||
|
<if test="fsId != null">#{fsId},</if>
|
||||||
|
<if test="actLandAmount != null">#{actLandAmount},</if>
|
||||||
|
<if test="actReceiveAmount != null">#{actReceiveAmount},</if>
|
||||||
|
<if test="approveDate != null">#{approveDate},</if>
|
||||||
|
<if test="erpModifyDate != null">#{erpModifyDate},</if>
|
||||||
|
<if test="purchaseOrgId != null">#{purchaseOrgId},</if>
|
||||||
|
<if test="tondBase != null">#{tondBase},</if>
|
||||||
|
<if test="price != null">#{price},</if>
|
||||||
|
<if test="supplierId != null">#{supplierId},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateMesPurchaseReceiveBill" parameterType="MesPurchaseReceiveBill">
|
||||||
|
update mes_purchase_receive_bill
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="erpId != null">erp_id = #{erpId},</if>
|
||||||
|
<if test="fentryId != null">fentry_id = #{fentryId},</if>
|
||||||
|
<if test="billNo != null">bill_no = #{billNo},</if>
|
||||||
|
<if test="poNo != null">po_no = #{poNo},</if>
|
||||||
|
<if test="documentStatus != null">document_status = #{documentStatus},</if>
|
||||||
|
<if test="materialId != null">material_id = #{materialId},</if>
|
||||||
|
<if test="materialCode != null and materialCode != ''">material_code = #{materialCode},</if>
|
||||||
|
<if test="materialName != null">material_name = #{materialName},</if>
|
||||||
|
<if test="fsBillId != null">fs_bill_id = #{fsBillId},</if>
|
||||||
|
<if test="fsId != null">fs_id = #{fsId},</if>
|
||||||
|
<if test="actLandAmount != null">act_land_amount = #{actLandAmount},</if>
|
||||||
|
<if test="actReceiveAmount != null">act_receive_amount = #{actReceiveAmount},</if>
|
||||||
|
<if test="approveDate != null">approve_date = #{approveDate},</if>
|
||||||
|
<if test="erpModifyDate != null">erp_modify_date = #{erpModifyDate},</if>
|
||||||
|
<if test="purchaseOrgId != null">purchase_org_id = #{purchaseOrgId},</if>
|
||||||
|
<if test="tondBase != null">tond_base = #{tondBase},</if>
|
||||||
|
<if test="price != null">price = #{price},</if>
|
||||||
|
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where receive_bill_id = #{receiveBillId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteMesPurchaseReceiveBillByReceiveBillId" parameterType="Long">
|
||||||
|
delete from mes_purchase_receive_bill where receive_bill_id = #{receiveBillId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteMesPurchaseReceiveBillByReceiveBillIds" parameterType="String">
|
||||||
|
delete from mes_purchase_receive_bill where receive_bill_id in
|
||||||
|
<foreach item="receiveBillId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{receiveBillId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectMesPurchaseReceiveBillJoinList" parameterType="MesPurchaseReceiveBill" resultMap="MesPurchaseReceiveBillResult">
|
||||||
|
select mprb.receive_bill_id, mprb.erp_id, mprb.fentry_id, mprb.bill_no, mprb.po_no, mprb.document_status,
|
||||||
|
mprb.material_id, mbmi.material_code, mbmi.material_name, mbmi.material_spec,mprb.fs_bill_id, mprb.fs_id,
|
||||||
|
mprb.act_land_amount, mprb.act_receive_amount, mprb.approve_date, mprb.erp_modify_date,
|
||||||
|
mprb.purchase_org_id, mprb.tond_base, mprb.price, mprb.supplier_id, mprb.remark, mprb.create_by,
|
||||||
|
mprb.create_time, mprb.update_by, mprb.update_time from mes_purchase_receive_bill mprb
|
||||||
|
left join mes_base_material_info mbmi on mprb.material_id=mbmi.erp_id
|
||||||
|
|
||||||
|
<where>
|
||||||
|
<if test="billNo != null and billNo != ''"> and mprb.bill_no like concat('%', #{billNo}, '%')</if>
|
||||||
|
<if test="poNo != null and poNo != ''"> and mprb.po_no like concat('%', #{poNo}, '%')</if>
|
||||||
|
<if test="materialCode != null and materialCode != ''"> and mbmi.material_code like concat('%', #{materialCode}, '%')</if>
|
||||||
|
<if test="materialName != null and materialName != ''"> and mbmi.material_name like concat('%', #{materialName}, '%')</if>
|
||||||
|
<if test="materialSpec != null and materialSpec != ''"> and mbmi.material_spec like concat('%', #{materialSpec}, '%')</if>
|
||||||
|
</where>
|
||||||
|
order by mprb.erp_modify_date desc
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询收料通知单列表
|
||||||
|
export function listPurchaseReceiveBill(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/purchaseReceiveBill/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询收料通知单详细
|
||||||
|
export function getPurchaseReceiveBill(receiveBillId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/purchaseReceiveBill/' + receiveBillId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增收料通知单
|
||||||
|
export function addPurchaseReceiveBill(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/purchaseReceiveBill',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改收料通知单
|
||||||
|
export function updatePurchaseReceiveBill(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/purchaseReceiveBill',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除收料通知单
|
||||||
|
export function delPurchaseReceiveBill(receiveBillId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/purchaseReceiveBill/' + receiveBillId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
@ -0,0 +1,276 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
|
||||||
|
<el-form-item label="收料单据号" prop="billNo">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.billNo"
|
||||||
|
placeholder="请输入收料单据号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="采购订单编号" prop="poNo">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.poNo"
|
||||||
|
placeholder="请输入采购订单编"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料编码" prop="materialCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.materialCode"
|
||||||
|
placeholder="请输入物料编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料名称" prop="materialName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.materialName"
|
||||||
|
placeholder="请输入物料名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料规格" prop="materialSpec">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.materialSpec"
|
||||||
|
placeholder="请输入物料规格"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="syncPurchaseReceiveBillInfos"
|
||||||
|
>同步
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="purchaseReceiveBillList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column label="ERPID" align="center" prop="erpId" />
|
||||||
|
<el-table-column label="收料单据号" align="center" prop="billNo" />
|
||||||
|
<el-table-column label="采购订单号" align="center" prop="poNo" />
|
||||||
|
<el-table-column label="物料编码" align="center" prop="materialCode" />
|
||||||
|
<el-table-column label="物料名称" align="center" prop="materialName" />
|
||||||
|
<el-table-column label="物料规格" align="center" prop="materialSpec" />
|
||||||
|
<el-table-column label="实到数量" align="center" prop="actLandAmount" />
|
||||||
|
<el-table-column label="ERP最后修改日期" align="center" prop="erpModifyDate" width="180">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listPurchaseReceiveBill, getPurchaseReceiveBill, delPurchaseReceiveBill, addPurchaseReceiveBill, updatePurchaseReceiveBill } from "@/api/mes/purchaseReceiveBill";
|
||||||
|
import {runJob} from "@/api/monitor/job";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "PurchaseReceiveBill",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 收料通知单表格数据
|
||||||
|
purchaseReceiveBillList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
erpId: null,
|
||||||
|
fentryId: null,
|
||||||
|
billNo: null,
|
||||||
|
poNo: null,
|
||||||
|
documentStatus: null,
|
||||||
|
materialId: null,
|
||||||
|
materialCode: null,
|
||||||
|
materialName: null,
|
||||||
|
materialSpec:null,
|
||||||
|
fsBillId: null,
|
||||||
|
fsId: null,
|
||||||
|
actLandAmount: null,
|
||||||
|
actReceiveAmount: null,
|
||||||
|
approveDate: null,
|
||||||
|
erpModifyDate: null,
|
||||||
|
purchaseOrgId: null,
|
||||||
|
tondBase: null,
|
||||||
|
price: null,
|
||||||
|
supplierId: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
materialCode: [
|
||||||
|
{ required: true, message: "物料编码;对应FMaterialId.FNumber不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询收料通知单列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listPurchaseReceiveBill(this.queryParams).then(response => {
|
||||||
|
this.purchaseReceiveBillList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
receiveBillId: null,
|
||||||
|
erpId: null,
|
||||||
|
fentryId: null,
|
||||||
|
billNo: null,
|
||||||
|
poNo: null,
|
||||||
|
documentStatus: null,
|
||||||
|
materialId: null,
|
||||||
|
materialCode: null,
|
||||||
|
materialName: null,
|
||||||
|
fsBillId: null,
|
||||||
|
fsId: null,
|
||||||
|
actLandAmount: null,
|
||||||
|
actReceiveAmount: null,
|
||||||
|
approveDate: null,
|
||||||
|
erpModifyDate: null,
|
||||||
|
purchaseOrgId: null,
|
||||||
|
tondBase: null,
|
||||||
|
price: null,
|
||||||
|
supplierId: null,
|
||||||
|
remark: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.receiveBillId)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加收料通知单";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const receiveBillId = row.receiveBillId || this.ids
|
||||||
|
getPurchaseReceiveBill(receiveBillId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改收料通知单";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.receiveBillId != null) {
|
||||||
|
updatePurchaseReceiveBill(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addPurchaseReceiveBill(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const receiveBillIds = row.receiveBillId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除收料通知单编号为"' + receiveBillIds + '"的数据项?').then(function() {
|
||||||
|
return delPurchaseReceiveBill(receiveBillIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('mes/purchaseReceiveBill/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `purchaseReceiveBill_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
|
||||||
|
syncPurchaseReceiveBillInfos(){
|
||||||
|
this.$modal.confirm('确认要立即同步收料通知单信息么?').then(function() {
|
||||||
|
return runJob(211, 'DEFAULT');
|
||||||
|
}).then(() => {
|
||||||
|
this.$modal.msgSuccess("执行成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,231 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
|
||||||
|
<el-form-item label="收料单据号" prop="billNo">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.billNo"
|
||||||
|
placeholder="请输入收料单据号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="采购订单编号" prop="poNo">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.poNo"
|
||||||
|
placeholder="请输入采购订单编"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料编码" prop="materialCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.materialCode"
|
||||||
|
placeholder="请输入物料编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料名称" prop="materialName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.materialName"
|
||||||
|
placeholder="请输入物料名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料规格" prop="materialSpec">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.materialSpec"
|
||||||
|
placeholder="请输入物料规格"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="purchaseReceiveBillList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
:current-row-key="selectedRowId"
|
||||||
|
ref="purchaseReceiveBillRef"
|
||||||
|
>
|
||||||
|
<el-table-column label="选择" width="50">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-radio v-model="selectedRowId" :label="scope.row.receiveBillId" @change="handleSelect(scope.row)">
|
||||||
|
{{scope.row.i}}
|
||||||
|
</el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="ERPID" align="center" prop="erpId" />
|
||||||
|
<el-table-column label="收料单据号" align="center" prop="billNo" />
|
||||||
|
<el-table-column label="采购订单号" align="center" prop="poNo" />
|
||||||
|
<el-table-column label="物料编码" align="center" prop="materialCode" />
|
||||||
|
<el-table-column label="物料名称" align="center" prop="materialName" />
|
||||||
|
<el-table-column label="物料规格" align="center" prop="materialSpec" />
|
||||||
|
<el-table-column label="实到数量" align="center" prop="actLandAmount" />
|
||||||
|
<el-table-column label="ERP最后修改日期" align="center" prop="erpModifyDate" width="180">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listPurchaseReceiveBill, getPurchaseReceiveBill, delPurchaseReceiveBill, addPurchaseReceiveBill, updatePurchaseReceiveBill } from "@/api/mes/purchaseReceiveBill";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "PurchaseReceiveBill",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 收料通知单表格数据
|
||||||
|
purchaseReceiveBillList: [],
|
||||||
|
selectedRows:[],
|
||||||
|
selectedRow:null,
|
||||||
|
selectedRowId:null,
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
erpId: null,
|
||||||
|
fentryId: null,
|
||||||
|
billNo: null,
|
||||||
|
poNo: null,
|
||||||
|
documentStatus: null,
|
||||||
|
materialId: null,
|
||||||
|
materialCode: null,
|
||||||
|
materialName: null,
|
||||||
|
materialSpec:null,
|
||||||
|
fsBillId: null,
|
||||||
|
fsId: null,
|
||||||
|
actLandAmount: null,
|
||||||
|
actReceiveAmount: null,
|
||||||
|
approveDate: null,
|
||||||
|
erpModifyDate: null,
|
||||||
|
purchaseOrgId: null,
|
||||||
|
tondBase: null,
|
||||||
|
price: null,
|
||||||
|
supplierId: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
materialCode: [
|
||||||
|
{ required: true, message: "物料编码;对应FMaterialId.FNumber不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询收料通知单列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listPurchaseReceiveBill(this.queryParams).then(response => {
|
||||||
|
this.purchaseReceiveBillList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
receiveBillId: null,
|
||||||
|
erpId: null,
|
||||||
|
fentryId: null,
|
||||||
|
billNo: null,
|
||||||
|
poNo: null,
|
||||||
|
documentStatus: null,
|
||||||
|
materialId: null,
|
||||||
|
materialCode: null,
|
||||||
|
materialName: null,
|
||||||
|
fsBillId: null,
|
||||||
|
fsId: null,
|
||||||
|
actLandAmount: null,
|
||||||
|
actReceiveAmount: null,
|
||||||
|
approveDate: null,
|
||||||
|
erpModifyDate: null,
|
||||||
|
purchaseOrgId: null,
|
||||||
|
tondBase: null,
|
||||||
|
price: null,
|
||||||
|
supplierId: null,
|
||||||
|
remark: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.receiveBillId)
|
||||||
|
this.selectedRows = selection.map(item => item)
|
||||||
|
this.single = selection.length !== 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
handleSelect(row){
|
||||||
|
this.selectedRow = row;
|
||||||
|
this.selectedRowId = row.receiveBillId;
|
||||||
|
// 滚动到选中行
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.purchaseReceiveBillRef.setCurrentRow(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in New Issue