Browse Source

催款统计导出BUG修复

anderx 4 years ago
parent
commit
e2e39b2d73

+ 4 - 6
src/main/java/com/goafanti/common/mapper/NewOrderDunMapper.xml

@@ -510,9 +510,9 @@
 
 
   <select id="selectOrderDun" resultType="com.goafanti.order.bo.OutSelectOrderDun">
-    select  z.provinceName,z.aName,z.totalAmount,z.money,z.aid
-    from( select dg.name provinceName,y.id aid,y.name aName,sum(y.total_amount)totalAmount, sum(y.money)money
-    from (select c.province ,b.name ,b.id,x.money ,x.quantity,a.total_amount
+    select  z.depName,z.aName,z.totalAmount,z.money,z.aid
+    from( select y.depName,y.id aid,y.name aName,sum(y.total_amount)totalAmount, sum(y.money)money
+    from (select c.name depName ,b.name ,b.id,x.money ,x.quantity,a.total_amount
     from (select order_no ,sum(money)money,1 quantity from new_order_dun nod where status=1
     <if test="startDate!=null and endDate!=null">
     and start_time between #{startDate} and #{endDate}
@@ -528,9 +528,7 @@
       <if test="aid !=null">
     and b.id= #{aid}
       </if>
-    )y left join district_glossory dg on y.province=dg.id
-    group by dg.name ,y.id,y.name)z
-    order by
+    )y group by y.depName,y.name,y.id)z order by
      <if test="sort=0">
        z.totalAmount
      </if>

+ 6 - 6
src/main/java/com/goafanti/order/bo/OutSelectOrderDun.java

@@ -6,8 +6,8 @@ import java.math.BigDecimal;
 
 public class OutSelectOrderDun {
 
-    @Excel(name = "催收省份")
-    private String provinceName;
+    @Excel(name = "催收部分")
+    private String depName;
     @Excel(name = "催收入")
     private String aName;
     private String aid;
@@ -24,12 +24,12 @@ public class OutSelectOrderDun {
         this.aid = aid;
     }
 
-    public String getProvinceName() {
-        return provinceName;
+    public String getDepName() {
+        return depName;
     }
 
-    public void setProvinceName(String provinceName) {
-        this.provinceName = provinceName;
+    public void setDepName(String depName) {
+        this.depName = depName;
     }
 
     public String getaName() {

+ 1 - 1
src/main/java/com/goafanti/order/controller/AdminNewOrderDunApiController.java

@@ -154,7 +154,7 @@ public class AdminNewOrderDunApiController extends CertifyApiController {
 		NewExcelUtil<OutSelectOrderDun> excelUtil=new NewExcelUtil<>(OutSelectOrderDun.class);
 		StringBuffer sb=new StringBuffer("搜索条件=》");
 		if (depName!=null)sb=sb.append("省份:").append(depName).append(",");
-		if (aName!=null)sb=sb.append("催款人:").append(depName).append(",");
+		if (aName!=null)sb=sb.append("催款人:").append(aName).append(",");
 		if (sort!=null){
 			if (sort==0)sb=sb.append("排序:").append("按签单金额").append(",");
 			if (sort==1)sb=sb.append("排序:").append("按应收款").append(",");