Browse Source

公出&报销表与导出开发

anderx 1 year ago
parent
commit
94e01028e8

+ 2 - 6
src/main/java/com/goafanti/common/dao/PublicReleaseMapper.java

@@ -3,11 +3,7 @@ package com.goafanti.common.dao;
 import com.goafanti.admin.bo.OutFinanceCount;
 import com.goafanti.common.model.OutPublicReleaseCount;
 import com.goafanti.common.model.PublicRelease;
-import com.goafanti.expenseAccount.bo.ExpenseCountsOrder;
-import com.goafanti.weChat.bo.InputreleaseAndExpenseCount;
-import com.goafanti.weChat.bo.OutPublicRelease;
-import com.goafanti.weChat.bo.OutPublicReleaseAndDetails;
-import com.goafanti.weChat.bo.OutPublicReleaseList;
+import com.goafanti.weChat.bo.*;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.Date;
@@ -66,5 +62,5 @@ public interface PublicReleaseMapper {
 
     List<PublicRelease>  selectAll();
 
-    List<ExpenseCountsOrder> releaseAndExpenseCount(InputreleaseAndExpenseCount in);
+    List<releaseAndExpenseCountOut > releaseAndExpenseCount(InputreleaseAndExpenseCount in);
 }

+ 3 - 2
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -749,9 +749,10 @@
         from public_release
         where  status in  (1,2)
     </select>
-    <select id="releaseAndExpenseCount" resultType="com.goafanti.expenseAccount.bo.ExpenseCountsOrder">
+    <select id="releaseAndExpenseCount" resultType="com.goafanti.weChat.bo.releaseAndExpenseCountOut">
         select
-            a.order_no orderNo,a.contract_no contractNo,b.buyer_name buyerName,toc.max_duration maxDuration ,toc.actual_duration actualDuration ,
+            a.order_no orderNo,a.contract_no contractNo,b.buyer_name buyerName,b.salesman_name salesmanName,
+            toc.max_duration maxDuration ,toc.actual_duration actualDuration ,
             toc.exceed_duration exceedDuration, a.total_amount totalAmount,a.settlement_amount settlementAmount,b.bid_type bidType,
             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

+ 1 - 1
src/main/java/com/goafanti/expenseAccount/bo/ExpenseCountsOrder.java

@@ -12,7 +12,7 @@ public class ExpenseCountsOrder extends ExpenseCountsBo{
     private String contractNo;
     @Excel(name = "客户名称")
     private String buyerName;
-
+    
     @Excel(name = "应公出工时")
     private String  maxDuration;
     @Excel(name = "实际公出工时")

+ 242 - 0
src/main/java/com/goafanti/weChat/bo/releaseAndExpenseCountOut.java

@@ -0,0 +1,242 @@
+package com.goafanti.weChat.bo;
+
+import com.goafanti.common.utils.excel.Excel;
+
+import java.math.BigDecimal;
+
+public class releaseAndExpenseCountOut {
+
+
+    private String orderNo;
+    @Excel(name = "合同编号")
+    private String contractNo;
+    @Excel(name = "客户名称")
+    private String buyerName;
+    @Excel(name = "营销员名称")
+    private String salesmanName;
+
+    @Excel(name = "应公出工时")
+    private String  maxDuration;
+    @Excel(name = "实际公出工时")
+    private String actualDuration;
+    @Excel(name = "超出工时")
+    private String exceedDuration;
+    @Excel(name = "合同金额",scale = 6)
+    private BigDecimal totalAmount;
+    @Excel(name = "已收款",scale = 6)
+    private BigDecimal settlementAmount;
+    @Excel(name = "报销总额",scale = 6)
+    private BigDecimal expenseAmount;
+    @Excel(name = "已付成本",scale = 6)
+    private BigDecimal paymentAmount;
+
+    @Excel(name = "报销人数")
+    private Integer peopleCount;
+    @Excel(name = "天数")
+    private Integer days;
+    @Excel(name = "报销单数")
+    private Integer expenseCount;
+    @Excel(name = "报销未审核")
+    private Integer notExamine;
+    @Excel(name = "驳回单数")
+    private Integer rejectCount;
+    private Integer exceedType;
+
+    public String getSalesmanName() {
+        return salesmanName;
+    }
+
+    public void setSalesmanName(String salesmanName) {
+        this.salesmanName = salesmanName;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    
+    public String getContractNo() {
+        return contractNo;
+    }
+
+    
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+
+    
+    public String getBuyerName() {
+        return buyerName;
+    }
+
+    
+    public void setBuyerName(String buyerName) {
+        this.buyerName = buyerName;
+    }
+
+    
+    public String getMaxDuration() {
+        if(maxDuration==null){
+            maxDuration="0";
+        }
+        return maxDuration;
+    }
+
+    
+    public void setMaxDuration(String maxDuration) {
+        this.maxDuration = maxDuration;
+    }
+
+    
+    public String getActualDuration() {
+        if(actualDuration==null){
+            actualDuration="0";
+        }
+        return actualDuration;
+    }
+
+    
+    public void setActualDuration(String actualDuration) {
+        this.actualDuration = actualDuration;
+    }
+
+    
+    public String getExceedDuration() {
+        if(exceedDuration==null){
+            exceedDuration="0";
+        }
+        return exceedDuration;
+    }
+
+    
+    public void setExceedDuration(String exceedDuration) {
+        this.exceedDuration = exceedDuration;
+    }
+
+    
+    public BigDecimal getTotalAmount() {
+        return totalAmount;
+    }
+
+    
+    public void setTotalAmount(BigDecimal totalAmount) {
+        this.totalAmount = totalAmount;
+    }
+
+    
+    public BigDecimal getSettlementAmount() {
+        return settlementAmount;
+    }
+
+    
+    public void setSettlementAmount(BigDecimal settlementAmount) {
+        this.settlementAmount = settlementAmount;
+    }
+
+    
+    public BigDecimal getExpenseAmount() {
+        if(expenseAmount==null){
+            return BigDecimal.ZERO;
+        }
+        return expenseAmount;
+    }
+
+    
+    public void setExpenseAmount(BigDecimal expenseAmount) {
+        this.expenseAmount = expenseAmount;
+    }
+
+    
+    public BigDecimal getPaymentAmount() {
+        if(paymentAmount==null){
+            paymentAmount=BigDecimal.ZERO;
+        }
+        return paymentAmount;
+    }
+
+    
+    public void setPaymentAmount(BigDecimal paymentAmount) {
+        this.paymentAmount = paymentAmount;
+    }
+
+    
+    public Integer getPeopleCount() {
+        if(peopleCount==null){
+            peopleCount=0;
+        }
+        return peopleCount;
+    }
+
+    
+    public void setPeopleCount(Integer peopleCount) {
+        this.peopleCount = peopleCount;
+    }
+
+    
+    public Integer getDays() {
+        if(days==null){
+            days=0;
+        }
+        return days;
+    }
+
+    
+    public void setDays(Integer days) {
+        this.days = days;
+    }
+
+    
+    public Integer getExpenseCount() {
+        if(expenseCount==null){
+            expenseCount=0;
+        }
+        return expenseCount;
+    }
+
+    
+    public void setExpenseCount(Integer expenseCount) {
+        this.expenseCount = expenseCount;
+    }
+
+    
+    public Integer getNotExamine() {
+        if(notExamine==null){
+            notExamine=0;
+        }
+        return notExamine;
+    }
+
+    
+    public void setNotExamine(Integer notExamine) {
+        this.notExamine = notExamine;
+    }
+
+    
+    public Integer getRejectCount() {
+        if(rejectCount==null){
+            rejectCount=0;
+        }
+        return rejectCount;
+    }
+
+    
+    public void setRejectCount(Integer rejectCount) {
+        this.rejectCount = rejectCount;
+    }
+
+    public Integer getExceedType() {
+        if(exceedType==null){
+            exceedType=0;
+        }
+        return exceedType;
+    }
+
+    public void setExceedType(Integer exceedType) {
+        this.exceedType = exceedType;
+    }
+}

+ 2 - 3
src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java

@@ -8,7 +8,6 @@ import com.goafanti.common.controller.CertifyApiController;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.common.utils.excel.NewExcelUtil;
-import com.goafanti.expenseAccount.bo.ExpenseCountsOrder;
 import com.goafanti.weChat.bo.*;
 import com.goafanti.weChat.service.PublicReleaseService;
 import org.apache.commons.beanutils.BeanUtils;
@@ -464,8 +463,8 @@ public class AdminReleaseApiController extends CertifyApiController{
 	 */
 	@RequestMapping(value = "/releaseAndExpenseCount/Export",method = RequestMethod.GET)
 	public Result releaseAndExpenseCountExport (InputreleaseAndExpenseCount in){
-		List<ExpenseCountsOrder> list = publicReleaseService.releaseAndExpenseCount(in);
-		NewExcelUtil<ExpenseCountsOrder> excelUtil=new NewExcelUtil<>(ExpenseCountsOrder.class);
+		List<releaseAndExpenseCountOut> list = publicReleaseService.releaseAndExpenseCount(in);
+		NewExcelUtil<releaseAndExpenseCountOut> excelUtil=new NewExcelUtil<>(releaseAndExpenseCountOut.class);
 		return excelUtil.exportExcel(list,"公出&报销表",uploadPath);
 	}
 

+ 1 - 2
src/main/java/com/goafanti/weChat/service/PublicReleaseService.java

@@ -1,6 +1,5 @@
 package com.goafanti.weChat.service;
 
-import com.goafanti.expenseAccount.bo.ExpenseCountsOrder;
 import com.goafanti.weChat.bo.*;
 
 import java.util.List;
@@ -73,7 +72,7 @@ public interface PublicReleaseService {
 
 	Object pushDateClock();
 
-	List<ExpenseCountsOrder> releaseAndExpenseCount(InputreleaseAndExpenseCount in);
+	List<releaseAndExpenseCountOut> releaseAndExpenseCount(InputreleaseAndExpenseCount in);
 
 	Object releaseAndExpenseCountClear();
 }

+ 2 - 5
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -17,7 +17,6 @@ import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.core.websocket.SystemWebSocketHandler;
 import com.goafanti.customer.bo.FollowBusinessBo;
 import com.goafanti.customer.service.CustomerService;
-import com.goafanti.expenseAccount.bo.ExpenseCountsOrder;
 import com.goafanti.order.bo.TOrderNewBo;
 import com.goafanti.weChat.bo.*;
 import com.goafanti.weChat.service.PublicReleaseService;
@@ -1958,8 +1957,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 
 	@Override
 	@Cacheable(value = "releaseAndExpenseCount#300", key = "'getCounts:key='+#in.buyerName+#in.contractNo+#in.aid+#in.depId+#in.allStatus")
-	public List<ExpenseCountsOrder> releaseAndExpenseCount(InputreleaseAndExpenseCount in) {
-		List<ExpenseCountsOrder> expenseCountsOrders = publicReleaseMapper.releaseAndExpenseCount(in);
+	public List<releaseAndExpenseCountOut> releaseAndExpenseCount(InputreleaseAndExpenseCount in) {
+		List<releaseAndExpenseCountOut> expenseCountsOrders = publicReleaseMapper.releaseAndExpenseCount(in);
 		expenseCountsOrders.forEach(e->{
 			if (e.getExceedDuration()!=null){
 				double exceedDuration = Double.parseDouble(e.getExceedDuration());
@@ -1972,8 +1971,6 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 					e.setMaxDuration("不限制");
 				}
 			}
-
-
 		});
 		return expenseCountsOrders;
 	}