wuwen 5 vuotta sitten
vanhempi
commit
9c562138cb

+ 39 - 0
src/main/java/com/ssj/sys/controller/FinanceReportController.java

@@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 import java.io.IOException;
+import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
 
@@ -546,6 +547,9 @@ public class FinanceReportController extends BaseController {
             List<Map<String,Object>> list=page.getContent();
             for (Map<String, Object> map : list) {
             	map.put("price_1", "700");
+              	map.put("sum_price_1", "0");
+            	map.put("sum_price_2", "0");
+            	map.put("sum_price_3", "0");
             	
             	if(map.containsKey("type")) {
             		if(map.get("type")==null || Integer.parseInt(map.get("type").toString())!=1){
@@ -553,6 +557,22 @@ public class FinanceReportController extends BaseController {
             			map.put("unit_name", "");
             		}
             	}
+            	
+            	if(map.containsKey("meal_type")) {
+            		if(map.get("meal_type")!=null){
+            			if(Integer.parseInt(map.get("meal_type").toString())==1){
+            				map.put("meal_type", "优选套餐");
+            			}else if(Integer.parseInt(map.get("meal_type").toString())==2){
+            				map.put("meal_type", "VIP套餐");
+            			}else if(Integer.parseInt(map.get("meal_type").toString())==3){
+            				map.put("meal_type", "尊享套餐");
+            			}else {
+            				map.put("meal_type", "");
+            			}
+            		
+            		}
+            	}
+            	
             	if(map.containsKey("sign_type")) {
             		if(map.get("sign_type")!=null){
             			if(Integer.parseInt(map.get("sign_type").toString())==1){
@@ -567,20 +587,32 @@ public class FinanceReportController extends BaseController {
             		
             		}
             	}
+            	
             	map.put("count_1_m", "");
             	map.put("count_2_m", "");
             	
             	if(map.containsKey("count_1")) {
             		if(Integer.parseInt(map.get("count_1").toString())>0) {
             			map.put("count_1_m", map.get("balance_month") );
+            			map.put("sum_price_1", map.get("price")!=null && StringUtils.isNotEmpty(map.get("price").toString()) ? 
+            					new BigDecimal(map.get("price").toString()).doubleValue()*
+            					0.4  
+            					: 0);
             		}
             	}
+            	
             	if(map.containsKey("count_2")) {
             		if(Integer.parseInt(map.get("count_2").toString())>0) {
             			map.put("count_2_m", map.get("balance_month") );
+            			map.put("sum_price_2", map.get("price_1")!=null && StringUtils.isNotEmpty(map.get("price_1").toString()) ? 
+            					new BigDecimal(map.get("price_1").toString()).doubleValue()*
+            					new BigDecimal(map.get("count_2").toString()).intValue()
+            					*0.4 
+            					: 0);
             		}
             	}
             	
+            	map.put("sum_price_3", new BigDecimal(map.get("sum_price_1").toString()).doubleValue()+new BigDecimal(map.get("sum_price_2").toString()).doubleValue());
     		}
             
             List<ExcelColumn> myColumns3 = new ArrayList<ExcelColumn>();
@@ -591,18 +623,25 @@ public class FinanceReportController extends BaseController {
             myColumns3.add(new ExcelColumn("签约商户", "unit_name", 20));
             myColumns3.add(new ExcelColumn("非签约商户", "external_unit_name", 20));
            
+            myColumns3.add(new ExcelColumn("套餐名称", "meal_type", 20));
             myColumns3.add(new ExcelColumn("服务包名称", "sign_type", 20));
+            
             myColumns3.add(new ExcelColumn("服务包/月金额", "price", 20));
             myColumns3.add(new ExcelColumn("总有效服务数", "sum_1", 20));
             myColumns3.add(new ExcelColumn("总结束服务数", "sum_2", 20));
             myColumns3.add(new ExcelColumn("服务包/结算月份", "count_1_m", 20));
             
+            myColumns3.add(new ExcelColumn("服务包应结算金额", "sum_price_1", 20));
+            
             myColumns3.add(new ExcelColumn("加油包/月金额", "price_1", 20));
             myColumns3.add(new ExcelColumn("加油包/有效服务数", "sum_3", 20));
             myColumns3.add(new ExcelColumn("加油包/结束服务数", "sum_4", 20));
             myColumns3.add(new ExcelColumn("加油包/结算月份", "count_2_m", 20));
             myColumns3.add(new ExcelColumn("加油包/结算数量", "count_2", 20));
             
+            myColumns3.add(new ExcelColumn("加油包应结算金额", "sum_price_2", 20));
+            myColumns3.add(new ExcelColumn("总应结算金额", "sum_price_3", 20));
+            
             CustomizeToExcel.downFile(myColumns3, list, os);
         }catch (IOException e) {
             logger.error("异常", e);

+ 56 - 1
src/main/resources/templates/sys/finance/allList6.html

@@ -53,12 +53,14 @@
 				<th>签约商户</th>
 				<th>非签约商户</th>
 				
+				<th>套餐名称</th>
 		    	<th>服务包名称</th>
 		    	
 		    	<th>服务包/月金额</th>
 		    	<th>总有效服务数</th>
 		    	<th>总结束服务数</th>
 		    	<th>结算月份</th>
+
 		    	
 		    	<th style="color: red">加油包/月金额</th>
 		    	<th style="color: red">加油包/有效服务数</th>
@@ -73,6 +75,11 @@
 					<td th:text="${item.get('pos_code')}"></td>
 					<td th:text="${item.get('unit_name')}"></td>
 					<td th:text="${item.get('external_unit_name')}"></td>
+					<td  th:switch="${item.meal_type}">
+					   <span th:case="1" >优选套餐</span>
+					   <span th:case="2" >VIP套餐</span>
+					   <span th:case="3" >尊享套餐</span>
+					</td>
 					<td  th:switch="${item.sign_type}">
 					   <span th:case="1" >服务包1</span>
 					   <span th:case="2" >服务包2</span>
@@ -82,6 +89,7 @@
 					<td th:text="${item.get('sum_1')}"></td>
 					<td th:text="${item.get('sum_2')}"></td>
 					<td th:text="${item.get('count_1')>0 ? item.get('balance_month') : ''   }"></td>
+	
 					<td th:text="700"></td>
 					<td th:text="${item.get('sum_3')}"></td>
 					<td th:text="${item.get('sum_4')}"></td>
@@ -96,7 +104,54 @@
 		<div th:utext='${listNavigatHtml}' th:remove="tag" ></div>
 	</div>
 	
-		
+	
+<ul style="margin-bottom: 100px;margin-top:20px;margin-left: 10px;">
+		<li style="line-height: 25px;">
+			<span style="font-size: 14px;">操作名词解释</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">1.服务包/月金额:合同签订的服务包每月金额。</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">2.总有效服务数:为当月有效服务的“服务包上限人数”+“加油包上限人数”。</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">3.总结束服务数:为当月结束服务的“服务包上限人数”+“加油包上限人数”。</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">4.服务包/结算月份:为指点公司就所显示的月份,与供应商(爱加公司)进行商户使用服务包结算。</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">5.服务包应结算金额:若“服务包/结算月份”显示具体结算月份,“服务包应结算金额”=“服务包/月金额”*40%。</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">6.加油包/月金额:合同签订的加油包每月金额。</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">7.加油包/有效服务数:为当月有效服务的“加油包上限人数”。</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">8.加油包/结束服务数:当月结束服务的“加油包上限人数”。</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">9.加油包/结算月份:为指点公司的该商户需就所显示月份与供应商(爱加公司)进行加油包结算。</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">10.加油包/结算数量:当月商户所使用应结算的加油包数量。</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">11.加油包应结算金额:若“加油包/结算月份”显示具体结算月份,“加油包应结算金额”=“加油包/月金额”*“加油包/结算数量”*40%。</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">12.总应结算金额:指点公司就该商户使用情况应结算给供应商(爱加公司)的平台服务费金额。“总应结算金额”=“服务包应结算金额”+“加油包应结算金额”。</span>
+		</li>
+	</ul>
+
+
+</body>
+	
+	
+	
 </div>
 </body>
 <script type="text/javascript">