Sfoglia il codice sorgente

修改报销详情接口新增统计信息

anderx 1 anno fa
parent
commit
156ce4b279

+ 4 - 2
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -2210,9 +2210,11 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
     where b.status=0 and b.aid = #{financeId} and a.process_status = 3
     where b.status=0 and b.aid = #{financeId} and a.process_status = 3
   </select>
   </select>
     <select id="selectExpenseCount" parameterType="com.goafanti.expenseAccount.bo.ExpenseCountsInput" resultType="com.goafanti.expenseAccount.bo.ExpenseCountsBo">
     <select id="selectExpenseCount" parameterType="com.goafanti.expenseAccount.bo.ExpenseCountsInput" resultType="com.goafanti.expenseAccount.bo.ExpenseCountsBo">
-      select a.order_no orderNo,a.contract_no contractNo,b.buyer_name buyerName,a.total_amount totalAmount,a.settlement_amount settlementAmount,
-             c.expenseCount,c.peopleCount,c.notExamine,c.rejectCount,d.paymentAmount,c.days,c.amount expenseAmount
+      select a.order_no orderNo,a.contract_no contractNo,b.buyer_name buyerName,toc.max_duration maxDuration ,toc.actual_duration actualDuration ,
+             toc.exceed_duration exceedDuration, a.total_amount totalAmount,a.settlement_amount settlementAmount,
+      c.expenseCount,c.peopleCount,c.notExamine,c.rejectCount,d.paymentAmount,c.days,c.amount expenseAmount
       from t_order_new a left join t_order_mid b on a.order_no =b.order_no
       from t_order_new a left join t_order_mid b on a.order_no =b.order_no
+      left join t_order_public_release_count toc on a.order_no =toc.order_no
       left join (select a.order_no,a.expenseCount,b.peopleCount,c.notExamine, c.rejectCount,a.days,a.amount
       left join (select a.order_no,a.expenseCount,b.peopleCount,c.notExamine, c.rejectCount,a.days,a.amount
                 from (select a.order_no,count(a.id)expenseCount,sum(a.amount) amount,sum(ROUND(a.duration/7.5) )days
                 from (select a.order_no,count(a.id)expenseCount,sum(a.amount) amount,sum(ROUND(a.duration/7.5) )days
                       from expense_account a where a.order_no in (select a.order_no from expense_account a
                       from expense_account a where a.order_no in (select a.order_no from expense_account a

+ 27 - 0
src/main/java/com/goafanti/expenseAccount/bo/ExpenseCountsBo.java

@@ -11,6 +11,8 @@ public class ExpenseCountsBo {
     private String depId;
     private String depId;
 
 
     private String depName;
     private String depName;
+
+    private Double maxDuration ,actualDuration ,exceedDuration;
     private BigDecimal totalAmount;
     private BigDecimal totalAmount;
     private BigDecimal settlementAmount;
     private BigDecimal settlementAmount;
     private BigDecimal expenseAmount;
     private BigDecimal expenseAmount;
@@ -22,6 +24,31 @@ public class ExpenseCountsBo {
     private Integer notExamine;
     private Integer notExamine;
     private Integer days;
     private Integer days;
 
 
+
+    public Double getMaxDuration() {
+        return maxDuration;
+    }
+
+    public void setMaxDuration(Double maxDuration) {
+        this.maxDuration = maxDuration;
+    }
+
+    public Double getActualDuration() {
+        return actualDuration;
+    }
+
+    public void setActualDuration(Double actualDuration) {
+        this.actualDuration = actualDuration;
+    }
+
+    public Double getExceedDuration() {
+        return exceedDuration;
+    }
+
+    public void setExceedDuration(Double exceedDuration) {
+        this.exceedDuration = exceedDuration;
+    }
+
     public String getDepId() {
     public String getDepId() {
         return depId;
         return depId;
     }
     }

+ 1 - 1
src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java

@@ -1427,7 +1427,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
                         ",已" + out.getPeopleCount() + "人公出," +
                         ",已" + out.getPeopleCount() + "人公出," +
                         out.getFrequency() + "次" +
                         out.getFrequency() + "次" +
                         "," + out.getActualDuration() + "小时" +
                         "," + out.getActualDuration() + "小时" +
-                        ",超过" + out.getMaxDuration() + "小时" +
+                        ",超过" + out.getExceedDuration() + "小时" +
                         ",已报销" + reduce.stripTrailingZeros().toPlainString() + "元";
                         ",已报销" + reduce.stripTrailingZeros().toPlainString() + "元";
                 e.setCountStr(str);
                 e.setCountStr(str);
             }
             }