123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- <?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.ruoyi.system.mapper.OrderBillsPlansMapper">
- <insert id="insertLoadFeeItems">
- Insert Into LoadFeeItems (SysID, EntityID, LineNo, CarID, ItemID, ItemProp, ItemAuditType, Dc, Qty, Price, Amt,
- OpUserID, OpUserName, SrcActID, SrcEntityID, SrcLineNo)
- values (1, #{o.entityId}, #{l.lineNo}, #{o.carId}, #{l.itemId}, #{l.itemProp}, #{l.itemAuditType}, 'C', 1,
- '录入', '录入',
- #{e.}, #{e.empl}, #{o.actId}, #{o.entityId}, #{o.lineNo})
- </insert>
- <update id="updateOrderBillsPlansByid">
- update OrderBillsPlans
- set LoadQty = #{LoadQty},
- LoadDate = #{LoadDate},
- UnLoadQty = #{UnLoadQty},
- UnLoadDate = #{UnLoadDate},
- EMPTYADDR1 = #{EMPTYADDR1},
- ODOMETERSTART = #{ODOMETERSTART},
- EMPTYADDR2 = #{EMPTYADDR2},
- ODOMETEREND = #{ODOMETEREND},
- LOADMILE = #{LOADMILE},
- Remarks = #{Remarks}
- where sysId = '1'
- and OrderNo = #{OrderNo}
- </update>
- <update id="updateLoadFeeItems">
- update LoadFeeItems
- set atm1 = #{atm1}
- where itemId = #{itemId}
- and entityId = #{entityId}
- </update>
- <select id="getOrderBillsPlansLsit" parameterType="Map" resultType="com.ruoyi.system.domain.WfTaskList">
- Select
- Distinct p.SysID sysId
- , p.EntityID entityId
- , p.LineNo lineNo
- , p.OrderNo orderNo
- ,p.CarID carID
- , p.CarRegNo carRegNo
- ,p.PlanLoadDate planLoadDate
- , p.LoadDate loadDate
- , p.LoadAddr loadAddr
- , p.EMPTYADDR1 emptyAddr1
- , p.EMPTYADDR2 emptyAddr2
- ,p.PlanUnLoadDate planUnLoadDate
- , p.UnLoadDate unLoadDate
- , p.UnLoadAddr unLoadAddr
- , p.Remarks remarks
- ,t.TaskID taskId
- , t.Status status
- ,t.AuditStatus auditStatus
- , t.ActID wfActId
- ,c.SName corpSName
- , c.CName corpCName
- , g.CName goodsCName
- ,l.SName loadFactory
- , ul.SName unLoadFactory
- ,dr1.Empl driver1Name
- ,dr1.mobile driver1mobile
- , sp.Empl sUPERCARGOName
- ,e.Empl transact
- from wf_TaskList t
- Left join LoadBills b on (b.SysID=t.SysID and b.EntityID=t.EntityID)
- Left join OrderBillsPlans p on (p.SysID=b.SysID and p.EntityID=b.SrcEntityID and p.LineNo=b.SrcLineNo)
- Left join Empls e on (e.SysID=b.SysID and e.EmplID=b.TransactID)
- Left join Empls dr1 on (dr1.SysID=b.SysID and dr1.EmplID=p.DRIVER1ID)
- Left join Empls sp on (sp.SysID=b.SysID and sp.EmplID=p.SUPERCARGOID)
- Left join Corps c on (c.SysID=p.SysID and c.CorpID=p.CorpID)
- Left join Corps l on (l.SysID=p.SysID and l.CorpID=p.LoadFactoryID)
- Left join Corps ul on (ul.SysID=b.SysID and ul.CorpID=p.UnLoadFactoryID)
- Left join Goods g on (g.SysID=b.SysID and g.GoodsID=b.GoodsID)
- <where>
- t.SysID=1 and t.ActID=317 and (t.Status = 2 or t.Status = 6)
- and ((b.CarID=-1) or ((b.CarID <> -1)))
- <if test="dataStart != null and dataStart != '' and dataEnd != null and dataEnd != ''">
- and b.BillDate >= #{dataStart, jdbcType=VARCHAR} and b.BillDate <= #{dataEnd, jdbcType=VARCHAR}
- </if>
- and p.IFORDER1ED='T'
- and ((p.DRIVER1ID=#{emplId, jdbcType=VARCHAR}) or (p.SUPERCARGOID=#{emplId, jdbcType=VARCHAR}))
- <if test="orderNo != null and orderNo != ''">
- -- and p.orderNo like concat('%', #{orderNo}, '%')
- </if>
- </where>
- ORDER BY b.BillDate desc
- </select>
- <select id="getOrderBillsPlansByid" resultType="com.ruoyi.system.domain.OrderBillsPlans">
- Select g.CName goodsCName
- , p.LoadAddr loadAddr
- , l.SName loadFactory
- , p.LoadAttn loadAttn
- , p.LoadAttnTel loadAttnTel
- , p.UnLoadAddr unLoadAddr
- , ul.SName unLoadFactory
- , p.UnLoadAttn unLoadAttn
- , p.UNLoadAttnTel unLoadAttnTel
- , p.planRemarks
- from OrderBillsPlans p
- Left join Empls e on (e.SysID = p.SysID and e.EmplID = p.TransactID)
- Left join Empls dr1 on (dr1.SysID = p.SysID and dr1.EmplID = p.DRIVER1ID)
- Left join Empls sp on (sp.SysID = p.SysID and sp.EmplID = p.SUPERCARGOID)
- Left join Corps c on (c.SysID = p.SysID and c.CorpID = p.CorpID)
- Left join Corps l on (l.SysID = p.SysID and l.CorpID = p.LoadFactoryID)
- Left join Corps ul on (ul.SysID = p.SysID and ul.CorpID = p.UnLoadFactoryID)
- Left join Goods g on (g.SysID = p.SysID and g.GoodsID = p.GoodsID)
- where p.SysID = 1
- and p.OrderNo = #{orderNo}
- </select>
- <select id="getItemsList" resultType="com.ruoyi.system.domain.vo.ItemsVo">
- select itemId, cName from Items where SysID=1 and itemProp='F'
- </select>
- <select id="getLoadFeeitemsMapByentityIdKeyItemId" resultType="java.util.Map">
- select itemId, atm1, entityId from LoadFeeItems where entityId = #{entityId}
- </select>
- <select id="getGasStations" resultType="com.ruoyi.system.domain.GasStations">
- select gasStationId, cName from GasStations
- </select>
- </mapper>
|