新增单据同步时同时同步业务单据详情信息
parent
6441034775
commit
71d1cf46d7
@ -0,0 +1,17 @@
|
||||
package com.glxp.api.admin.dao.business;
|
||||
|
||||
import com.glxp.api.admin.entity.business.StockOrderRemakEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface StockOrderRemakDao {
|
||||
|
||||
List<StockOrderRemakEntity> findByOrderIdFk(@Param("id") String id);
|
||||
|
||||
boolean insertOrderRemaks(@Param("orderRemakEntities") List<StockOrderRemakEntity> OrderRemakEntitys);
|
||||
|
||||
boolean deleteByOrderIdFk(@Param("id") String id);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.glxp.api.admin.entity.business;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class StockOrderRemakEntity {
|
||||
private Integer id;
|
||||
private String orderIdFk;
|
||||
private String relId;
|
||||
private String batchNo;
|
||||
private BigDecimal price;
|
||||
private String secSalesListNo;
|
||||
private String firstSalesInvNo;
|
||||
private String secSalesInvNo;
|
||||
private String invoiceDate;
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
<?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.glxp.api.admin.dao.business.StockOrderRemakDao">
|
||||
|
||||
<select id="findByOrderIdFk" parameterType="Map"
|
||||
resultType="com.glxp.api.admin.entity.business.StockOrderRemakEntity">
|
||||
select stock_order_remak.*
|
||||
from stock_order_remak
|
||||
WHERE orderIdFk = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertOrderRemaks" keyProperty="id"
|
||||
parameterType="com.glxp.api.admin.entity.business.StockOrderRemakEntity">
|
||||
insert INTO stock_order_remak(
|
||||
orderIdFk,batchNo,price,relId
|
||||
,firstSalesInvNo,secSalesInvNo,secSalesListNo,invoiceDate,remark)
|
||||
values
|
||||
<foreach collection="orderRemakEntities" item="item" index="index"
|
||||
separator=",">
|
||||
(
|
||||
#{item.orderIdFk},
|
||||
#{item.batchNo},
|
||||
#{item.price},#{item.relId},#{item.firstSalesInvNo},#{item.secSalesInvNo},
|
||||
#{item.secSalesListNo},#{item.invoiceDate},#{item.remark}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByOrderIdFk" parameterType="Map">
|
||||
DELETE
|
||||
FROM stock_order_remak
|
||||
WHERE orderIdFk = #{id}
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue