gaodd 1 rok temu
rodzic
commit
c63ba80e9b

+ 4 - 4
src/main/java/com/chinaitop/agile/mapper/BgmxzMapper.xml

@@ -83,10 +83,10 @@
83 83
         c.lqss,
84 84
         b.tzdh,
85 85
         d.y_dataid ydataid
86
-        from lsreport_ts:data_kcgl_fcbgz_default a
87
-        left join lsreport_ts:data_kcgl_xckc_default b on b.dataid=a.dataid
88
-        left join depot:business_delivery_storage_notice c on c.bill_number=b.tzdh and c.org_id=b.unitid
89
-        left join depot:storage_keep_voucher d on d.y_dataid=a.DataID
86
+        from data_kcgl_fcbgz_default a
87
+        left join data_kcgl_xckc_default b on b.dataid=a.dataid
88
+        left join depot_qh.business_delivery_storage_notice c on c.bill_number=b.tzdh and c.org_id=b.unitid
89
+        left join depot_qh.storage_keep_voucher d on d.y_dataid=a.DataID
90 90
         where 1=1 and (a.srsl > 0.0  or a.zcsl > 0.0) AND a.Direction = 1
91 91
         <if test="ch != null">
92 92
             and a.ch = #{ch}

+ 10 - 1
src/main/java/com/chinaitop/agile/mapper/DataKcglFcbgzDefaultMapper.xml

@@ -687,7 +687,7 @@
687 687
   </select>
688 688
   <!-- 分仓保管账 -->
689 689
   <select id="countByDay" parameterType="com.chinaitop.agile.model.DataKcglFcbgzDefaultExample" resultMap="BaseResultMap">
690
-    select
690
+    <!-- select
691 691
         unitid UnitID, to_char(rq,'yyyy-mm-dd') as rqs, ch, hwh, hwxz, pz,
692 692
     sum(srsl) as srsl, sum(zcsl) as zcsl
693 693
     from data_kcgl_fcbgz_default
@@ -695,6 +695,15 @@
695 695
       	<include refid="Example_Where_Clause" />
696 696
       </if>
697 697
     group by unitid, ch, hwh, hwxz, pz, rqs
698
+    order by rqs desc -->
699
+    select
700
+        unitid UnitID, DATE_FORMAT(rq,'%Y-%m-%d') as rqs, ch, hwh, hwxz, pz,
701
+    sum(srsl) as srsl, sum(zcsl) as zcsl
702
+    from data_kcgl_fcbgz_default
703
+      <if test="_parameter != null">
704
+      	<include refid="Example_Where_Clause" />
705
+      </if>
706
+    group by unitid, ch, hwh, hwxz, pz, rqs
698 707
     order by rqs desc
699 708
   </select>
700 709