ShipmentDetailMapper.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.iocoder.yudao.module.order.dal.mysql.ShipmentDetailMapper">
  4. <!-- 根据主表ID查询明细列表 -->
  5. <select id="selectDetailsByMasterId" resultType="cn.iocoder.yudao.module.order.dal.dataobject.ShipmentDetailDO">
  6. SELECT
  7. RecID as recId,
  8. Domain as domain,
  9. Id as id,
  10. Line as line,
  11. OrdNbr as ordNbr,
  12. OrdLine as ordLine,
  13. ContainerItem as containerItem,
  14. Descr as descr,
  15. UM as um,
  16. Location as location,
  17. LotSerial as lotSerial,
  18. QtyToShip as qtyToShip,
  19. PickingQty as pickingQty,
  20. RealQty as realQty,
  21. Status as status,
  22. Remark as remark,
  23. ShType as shType,
  24. Typed as typed,
  25. IsActive as isActive,
  26. IsConfirm as isConfirm,
  27. CreateUser as createUser,
  28. CreateTime as createTime,
  29. UpdateUser as updateUser,
  30. UpdateTime as updateTime,
  31. ASNBOLShipperRecID as asnbolShipperRecId,
  32. ShipDate as shipDate,
  33. CustPO as custPo,
  34. Price as price,
  35. GrossWeight as grossWeight,
  36. NetWeight as netWeight,
  37. Volume as volume
  38. FROM ASNBOLShipperDetail
  39. WHERE Id = #{id} AND Domain = #{domain} AND IsActive = 1
  40. ORDER BY Line
  41. </select>
  42. <!-- 根据主表ID删除明细 -->
  43. <update id="deleteByMasterId">
  44. UPDATE ASNBOLShipperDetail
  45. SET IsActive = 0, UpdateTime = NOW()
  46. WHERE Id = #{id} AND Domain = #{domain}
  47. </update>
  48. <!-- 插入发货单明细 -->
  49. <insert id="insert" useGeneratedKeys="true" keyProperty="recId" keyColumn="RecID">
  50. INSERT INTO ASNBOLShipperDetail (
  51. Domain, Id, Line, OrdNbr, OrdLine, ContainerItem, Descr, UM,
  52. Location, LotSerial, QtyToShip, PickingQty, RealQty, Status, Remark,
  53. ShType, Typed, IsActive, IsConfirm, CreateTime, ASNBOLShipperRecID, ShipDate,
  54. ShipFromId, ShipToId, Dimension1, Dimension2
  55. ) VALUES (
  56. #{domain}, #{id}, #{line}, #{ordNbr}, #{ordLine}, #{containerItem}, #{descr}, #{um},
  57. #{location}, #{lotSerial}, #{qtyToShip}, #{pickingQty}, #{realQty}, #{status}, #{remark},
  58. #{shType}, #{typed}, #{isActive}, #{isConfirm}, #{createTime}, #{asnbolShipperRecId}, #{shipDate},
  59. #{shipFromId}, #{shipToId}, #{dimension1}, #{dimension2}
  60. )
  61. </insert>
  62. </mapper>