Browse Source

订单项目统计列表修改

anderx 1 year ago
parent
commit
73e0cce1e6

+ 1 - 1
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -2520,7 +2520,7 @@
            ttm.service_life as serviceLife,ttm.year_sum as yearSum,e.task_distribution_time as taskDistributionTime ,e.commodity_quantity as commodityQuantity,
            e3.cost_amount as costAmount,e.project_status as  projectStatus,e.task_start_time as taskStartTime,e.task_end_time as taskEndTime,
            e.receiver_name as receiverName ,'技术组',t1.cb restatement,a.order_status orderStatus,e.satisfaction_degree satisfactionDegree,
-      e.task_comment taskComment,'核算比例',a.order_status orderStatus,t1.counts,t1.tdtk refundType,a3.name depName,a4.name as  province
+      e.task_comment taskComment,'核算比例',a.order_status orderStatus,t1.counts changeType,t1.tdtk refundType,a3.name depName,a4.name as  province
     from t_order_new a left join t_order_mid b on a.order_no =b.order_no
         left join admin a2 on a.salesman_id=a2.id left join department a3 on a2.department_id=a3.id
         left join district_glossory a4 on a3.province=a4.id left join user_mid b2 on a.buyer_id=b2.uid

+ 16 - 16
src/main/java/com/goafanti/order/bo/OutOrderProject.java

@@ -86,22 +86,22 @@ public class OutOrderProject {
     /**
      * 总金额
      */
-    @Excel(name = "签单金额")
+    @Excel(name = "签单金额",scale = 6)
     private BigDecimal totalAmount;
 
     @Excel(name = "合同收款比例")
     private String contractAmountProportion;
 
-    @Excel(name = "应收款")
+    @Excel(name = "应收款",scale = 6)
     private BigDecimal orderReceivables;
 
     /**
      * 已收款
      */
-    @Excel(name = "已收款")
+    @Excel(name = "已收款",scale = 6)
     private BigDecimal settlementAmount;
 
-    @Excel(name = "欠款")
+    @Excel(name = "欠款",scale = 6)
     private BigDecimal arrearsAmount;
 
     @Excel(name = "已报销")
@@ -118,19 +118,19 @@ public class OutOrderProject {
      * 成本金额
      */
     @Excel(name = "总成本",scale = 6)
-    private String costAmount;
+    private BigDecimal costAmount;
     /**
      * 成本实付
      */
     @Excel(name = "实付成本",scale = 6)
-    private String paymentAmount;
+    private BigDecimal paymentAmount;
     /**
      * 开票金额
      */
     @Excel(name = "已开票金额",scale = 6)
-    private String invicueAmount;
+    private BigDecimal invicueAmount;
     @Excel(name = "退款金额",scale = 6)
-    private String refundAmount;
+    private BigDecimal refundAmount;
     /**
      * 财务负责人
      */
@@ -377,35 +377,35 @@ public class OutOrderProject {
         this.exceedPublic = exceedPublic;
     }
 
-    public String getCostAmount() {
+    public BigDecimal getCostAmount() {
         return costAmount;
     }
 
-    public void setCostAmount(String costAmount) {
+    public void setCostAmount(BigDecimal costAmount) {
         this.costAmount = costAmount;
     }
 
-    public String getPaymentAmount() {
+    public BigDecimal getPaymentAmount() {
         return paymentAmount;
     }
 
-    public void setPaymentAmount(String paymentAmount) {
+    public void setPaymentAmount(BigDecimal paymentAmount) {
         this.paymentAmount = paymentAmount;
     }
 
-    public String getInvicueAmount() {
+    public BigDecimal getInvicueAmount() {
         return invicueAmount;
     }
 
-    public void setInvicueAmount(String invicueAmount) {
+    public void setInvicueAmount(BigDecimal invicueAmount) {
         this.invicueAmount = invicueAmount;
     }
 
-    public String getRefundAmount() {
+    public BigDecimal getRefundAmount() {
         return refundAmount;
     }
 
-    public void setRefundAmount(String refundAmount) {
+    public void setRefundAmount(BigDecimal refundAmount) {
         this.refundAmount = refundAmount;
     }
 

+ 10 - 0
src/main/java/com/goafanti/order/service/impl/UserStatisticsServiceImpl.java

@@ -113,6 +113,8 @@ public class UserStatisticsServiceImpl extends BaseMybatisDao<UserMidMapper> imp
 				BigDecimal divide = settlementAmount.divide(orderReceivables, 2, RoundingMode.HALF_UP);
 				BigDecimal multiply = divide.multiply(new BigDecimal(100));
 				e.setContractAmountProportion(multiply+"%");
+			}else {
+				e.setContractAmountProportion("100%");
 			}
 			if (e.getRefundType()!=null&&e.getRefundType().equals("1")){
 				e.setRefundType("有");
@@ -133,6 +135,14 @@ public class UserStatisticsServiceImpl extends BaseMybatisDao<UserMidMapper> imp
 				String valueByCode = NewProjectStatus.getValueByCode(Integer.valueOf(e.getProjectStatus()));
 				e.setProjectStatus(valueByCode);
 			}
+			if(e.getSettlementAmount()!=null){
+				if (e.getOrderReceivables().compareTo(BigDecimal.ZERO)==0){
+					e.setArrearsAmount(BigDecimal.ZERO);
+				}else {
+					e.setArrearsAmount(e.getOrderReceivables().subtract(e.getSettlementAmount()));
+				}
+			}
+
 		}
 		return outOrderProject;
 	}