|  | @@ -0,0 +1,70 @@
 | 
											
												
													
														|  | 
 |  | +<?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">
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    <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} and b.BillDate <= #{dataEnd}
 | 
											
												
													
														|  | 
 |  | +            </if>
 | 
											
												
													
														|  | 
 |  | +            and p.IFORDER1ED='T'
 | 
											
												
													
														|  | 
 |  | +            and ((p.DRIVER1ID=#{emplId}) or (p.SUPERCARGOID=#{emplId}))
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +            <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 * from OrderBillsPlans where entityId = #{entityId}
 | 
											
												
													
														|  | 
 |  | +    </select>
 | 
											
												
													
														|  | 
 |  | +</mapper>
 |