wuwen 4 anni fa
parent
commit
6ea471a34a

+ 8 - 2
src/main/java/com/ssj/dao/weixin/library/dao/impl/ILibJoinConsumeQueryDaoImpl.java

@@ -33,8 +33,14 @@ public class ILibJoinConsumeQueryDaoImpl   implements ILibJoinConsumeQueryDao {
 			queryParams.add(params.get("remarks"));
 		}
 		if(params.containsKey("type") && StringUtils.isNotEmpty(params.getOrDefault("type","").toString())) {
-			selSql.append(" AND t.type =?  ");
-			queryParams.add(params.get("type"));
+			if(params.get("type").toString().equals("-1")) {
+				selSql.append(" AND t.type in (1,2,3,4,5)  ");
+			}else if(params.get("type").toString().equals("-2")) {
+				selSql.append(" AND t.type in (6,7,8,9,10,11)  ");
+			} else {
+				selSql.append(" AND t.type =?  ");
+				queryParams.add(params.get("type"));
+			}
 		}
 		if(params.containsKey("startTime") && StringUtils.isNotEmpty(params.getOrDefault("startTime","").toString())) {
 			selSql.append(" AND TO_DAYS(t.create_time)>=TO_DAYS(?)  ");

+ 33 - 2
src/main/java/com/ssj/sys/controller/FinanceReportController.java

@@ -433,14 +433,47 @@ public class FinanceReportController extends BaseController {
         Page<Map<String,Object>> page = financeService.balanceConsumeDetailList_New(params, initPage(pageNo, pageSize));
         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())!=5){
         			map.put("external_unit_name", map.get("unit_name"));
         			map.put("unit_name", "");
         		}
         	}
+        	
+        	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());
+
 		}
         
+        
         sp.setRowCnt((int) page.getTotalElements());
         model.addAttribute("list",list);
         model.addAttribute("listNavigatHtml", sp.getSysPaginHtml());
@@ -619,9 +652,7 @@ public class FinanceReportController extends BaseController {
             myColumns3.add(new ExcelColumn("月份", "balance_month", 20));
             myColumns3.add(new ExcelColumn("商户账号", "pos_code", 20));
             myColumns3.add(new ExcelColumn("商户编码", "org_code", 20));
-            myColumns3.add(new ExcelColumn("商户级别", "level_name", 20));
             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));

+ 8 - 4
src/main/resources/templates/sys/finance/allList6.html

@@ -51,7 +51,6 @@
 				<th style="width: 50px;">序号</th>
 				<th>签约帐号</th>
 				<th>签约商户</th>
-				<th>非签约商户</th>
 				
 				<th>套餐名称</th>
 		    	<th>服务包名称</th>
@@ -60,13 +59,16 @@
 		    	<th>总有效服务数</th>
 		    	<th>总结束服务数</th>
 		    	<th>结算月份</th>
-
+		    	<th>服务包结算金额</th>
 		    	
+
 		    	<th style="color: red">加油包/月金额</th>
 		    	<th style="color: red">加油包/有效服务数</th>
 		    	<th style="color: red">加油包/结束服务数</th>
 		    	<th style="color: red">加油包/结算月份</th>
-		    	<th style="color: red">加油包/结算数量</th>
+		    	<th style="color: red">加油包/结算数</th>
+		    	<th style="color: red">加油包结算金额</th>
+		    	<th >总结算金额</th>
 		    </tr>
 		</thead>
 		<tbody>
@@ -74,7 +76,6 @@
 					<td th:text="${itemStat.count}"></td>
 					<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>
@@ -89,12 +90,15 @@
 					<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="${item.get('sum_price_1')}"></td>
 	
 					<td th:text="700"></td>
 					<td th:text="${item.get('sum_3')}"></td>
 					<td th:text="${item.get('sum_4')}"></td>
 					<td th:text="${item.get('count_2')>0 ? item.get('balance_month') : ''   }"></td>
 					<td th:text="${item.get('count_2')>0 ? item.get('count_2') : ''   }"></td>
+					<td th:text="${item.get('sum_price_2')}"></td>
+					<td th:text="${item.get('sum_price_3')}"></td>
 			</tr>
 		</tbody>
 	</table>

+ 4 - 0
src/main/resources/templates/sys/fx/consumeList.html

@@ -46,10 +46,14 @@
 					<option th:each="item:${poslist}"  th:selected="${search.get('merchantId') eq item.id ? true : false}" th:value="${item.id}">[[${item.unitName}]]</option>
 				</select>
 			</li>
+			
 			<li>
 				<label>操作类型</label>
 				<select class="scinput select_width"  name="type"   style="width: 150px;" >
 					<option value="" th:selected="${search.get('type')+'' eq '' ? true : false} ">全部</option>
+					<option value="-1" th:selected="${search.get('type')+'' eq '-1' ? true : false} ">--旧模式--</option>
+					<option value="-2" th:selected="${search.get('type')+'' eq '-2' ? true : false} ">--新模式--</option>
+					
 					<option value="1" th:selected="${search.get('type')+'' eq '1' ? true : false} ">塾币充值【旧模式】</option>
 					<option value="2" th:selected="${search.get('type')+'' eq '2' ? true : false} ">塾币消费【旧模式】</option>
 					<option value="3" th:selected="${search.get('type')+'' eq '3' ? true : false} ">服务扣除【旧模式】</option>