|
@@ -230,6 +230,46 @@
|
|
|
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+ <select id="getsTheQuantityOfTheReturnedOrder" resultType="java.lang.Integer">
|
|
|
+ Select
|
|
|
+ COUNT(1)
|
|
|
+ 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 = #{actId, jdbcType=VARCHAR}
|
|
|
+ and p.ifStarted = 'B'
|
|
|
+ and ((b.CarID=-1) or ((b.CarID <> -1))) and p.IfOrder1ed = 'T'
|
|
|
+ <if test="dataStart != null and dataStart != '' and dataEnd != null and dataEnd != ''">
|
|
|
+ and b.BillDate >= #{dataStart, jdbcType=VARCHAR} and b.BillDate <= #{dataEnd, jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="role == 0">
|
|
|
+ and p.DeptUserID = #{emplId, jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="role == 1">
|
|
|
+ and ((p.DRIVER1ID=#{emplId, jdbcType=VARCHAR}) or (p.SUPERCARGOID=#{emplId, jdbcType=VARCHAR}))
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="orderNo != null and orderNo != ''">
|
|
|
+ and (p.CarRegNo like #{orderNo}
|
|
|
+ or p.loadAddr like #{orderNo}
|
|
|
+ or p.unLoadAddr like #{orderNo}
|
|
|
+ or g.CName like #{orderNo})
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="getOrderBillsPlansByid" resultType="com.ruoyi.system.domain.OrderBillsPlans">
|
|
|
Select g.CName goodsCName
|
|
|
, p.LoadAddr loadAddr
|