소스 검색

商户的内容

wuwen 5 년 전
부모
커밋
bf169f14ad

+ 105 - 18
src/main/java/com/ssj/sys/controller/FxController.java

@@ -51,11 +51,8 @@ import com.ssj.bean.sys.fx.domain.DeviceAct;
 import com.ssj.bean.sys.fx.domain.DeviceParts;
 import com.ssj.bean.sys.fx.domain.DevicePartsAct;
 import com.ssj.bean.sys.fx.domain.Merchant;
-import com.ssj.bean.sys.fx.domain.MerchantArea;
-import com.ssj.bean.sys.fx.domain.MerchantSign;
 import com.ssj.bean.sys.organization.domain.Organization;
 import com.ssj.bean.sys.role.domain.Admin;
-import com.ssj.bean.weixin.libmy.domain.LibVip;
 import com.ssj.bean.weixin.libmy.domain.TbLibJoin;
 import com.ssj.bean.weixin.libmy.domain.TbLibJoinConsume;
 import com.ssj.bean.weixin.problem.domain.CnArea;
@@ -65,7 +62,6 @@ import com.ssj.framework.core.common.controller.BaseController;
 import com.ssj.framework.core.util.PropertiesUtil;
 import com.ssj.framework.core.util.ResponseConstant;
 import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.framework.core.util.SystemResourceLocator;
 import com.ssj.framework.core.util.WebUtil;
 import com.ssj.framework.files.service.FileInfoService;
 import com.ssj.framework.idworker.IdWorker;
@@ -332,6 +328,13 @@ public class FxController  extends BaseController {
 	 	Map<String, Object> params = new HashMap<String, Object>();
         params.put("LIKE_unitName", request.getParameter("LIKE_unitName")==null?"":request.getParameter("LIKE_unitName"));
         params.put("LIKE_posCode", request.getParameter("LIKE_posCode")==null?"":request.getParameter("LIKE_posCode"));
+        if(request.getParameter("signType")!=null ) {
+        	if("0".equals(request.getParameter("signType").toString())){
+        		params.put("EQ_signType", 0);
+        	}else if("1".equals(request.getParameter("signType").toString())){
+        		params.put("GTE_signType", 1);
+        	}
+        }
         params.put("NOT_status", 4);
         
         String orgCode=request.getParameter("LIKE_orgCode")==null?"":request.getParameter("LIKE_orgCode");
@@ -351,6 +354,7 @@ public class FxController  extends BaseController {
         model.addAttribute("list", page.getContent());
         model.addAttribute("listNavigatHtml", sp.getSysPaginHtml());
         model.addAttribute("page", sp);
+        params.put("signType", request.getParameter("signType")==null?"":request.getParameter("signType"));
         model.addAttribute("search", params);
         model.addAttribute("curMerchant", merchant);
         return "sys/fx/merchantAllList";
@@ -1678,16 +1682,25 @@ public class FxController  extends BaseController {
     		HttpSession session = request.getSession();
     		Admin admin =(Admin) session.getAttribute("admin");
     		Merchant merchant=merchantService.getMerchantByPosCode(admin.getLoginName());
-    	 	Map<String, Object> params = new HashMap<String, Object>();
-            params.put("LIKE_unitName", request.getParameter("unitName")==null?"":request.getParameter("unitName"));
-            params.put("LIKE_posCode", request.getParameter("posCode")==null?"":request.getParameter("posCode"));
+    		Map<String, Object> params = new HashMap<String, Object>();
+            params.put("LIKE_unitName", request.getParameter("LIKE_unitName")==null?"":request.getParameter("LIKE_unitName"));
+            params.put("LIKE_posCode", request.getParameter("LIKE_posCode")==null?"":request.getParameter("LIKE_posCode"));
+            if(request.getParameter("signType")!=null ) {
+            	if("0".equals(request.getParameter("signType").toString())){
+            		params.put("EQ_signType", 0);
+            	}else if("1".equals(request.getParameter("signType").toString())){
+            		params.put("GTE_signType", 1);
+            	}
+            }
             params.put("NOT_status", 4);
-            
-            if(!"SSJ-Fx".equals(merchant.getOrgCode())) {
-            	 params.put("LIKE_orgCode", merchant.getOrgCode());
+            String orgCode=request.getParameter("LIKE_orgCode")==null?"":request.getParameter("LIKE_orgCode");
+            if(StringUtils.isNotEmpty(orgCode)) {
+            	params.put("LIKE_orgCode", orgCode);
+            }else {
+            	params.put("LIKE_orgCode", merchant.getOrgCode());
             }
             
-            Page<Merchant> list = merchantService.findMerchantByPage(params, initPage(1, 10000, Direction.DESC, new String[]{"createTime"}));
+            Page<Merchant> list = merchantService.findMerchantByPage(params, initPage(1, 10000, Direction.DESC, new String[]{"signType","createTime"}));
     		List<ExcelColumn> myColumns3 = new ArrayList<ExcelColumn>();
     		myColumns3.add(new ExcelColumn("商户账号", "posCode", 20));
     		myColumns3.add(new ExcelColumn("商户编码", "orgCode", 20));
@@ -1699,23 +1712,27 @@ public class FxController  extends BaseController {
     		myColumns3.add(new ExcelColumn("商户代表", "deputyName", 20));
     		myColumns3.add(new ExcelColumn("代表电话", "deputyPhone", 20));
     		
+    		myColumns3.add(new ExcelColumn("套餐:套餐类型", "mealType", 20));
+    		myColumns3.add(new ExcelColumn("套餐:服务包类型	", "signType", 20));
     		myColumns3.add(new ExcelColumn("签约端口数量", "portNum", 20));
-    		myColumns3.add(new ExcelColumn("机构塾币", "libService", 20));
+    		myColumns3.add(new ExcelColumn("机构塾币", "libService_0", 20));
     		myColumns3.add(new ExcelColumn("平台塾币", "platformService", 20));
-    		myColumns3.add(new ExcelColumn("签约数(练习册用)", "signService", 20));
-    		myColumns3.add(new ExcelColumn("硬件数量", "hardwareService", 20));
-    		
-    		myColumns3.add(new ExcelColumn("签约开始时间", "signTime", 20));
-    		myColumns3.add(new ExcelColumn("签约结束时间", "endSignTime", 20));
+    		myColumns3.add(new ExcelColumn("套餐人数", "libService_1", 20));
+    		myColumns3.add(new ExcelColumn("充值/已结算(月份)", "monthStr", 20));
+    		myColumns3.add(new ExcelColumn("合同开始日期", "signTime", 20));
+    		myColumns3.add(new ExcelColumn("合同结束日期", "endSignTime", 20));
+    		myColumns3.add(new ExcelColumn("激活日期", "summaryTimeStr", 20));
     		myColumns3.add(new ExcelColumn("下个结算日", "nextSummaryTime", 20));
     		
     		myColumns3.add(new ExcelColumn("关联机构", "joinName", 20));
     		myColumns3.add(new ExcelColumn("关联学校", "schoolName", 20));
     		
-    		
+    		myColumns3.add(new ExcelColumn("签约数(练习册用)", "signService", 20));
+    		myColumns3.add(new ExcelColumn("硬件数量", "hardwareService", 20));
     		myColumns3.add(new ExcelColumn("服务:签约单价", "price", 20));
     		myColumns3.add(new ExcelColumn("硬件:签约单价", "hardwarePrice", 20));
     		myColumns3.add(new ExcelColumn("出货单价", "outPrice", 20));
+    		
     		myColumns3.add(new ExcelColumn("状态", "status", 20));
     		myColumns3.add(new ExcelColumn("创建时间", "createTime", 20));
     		
@@ -1817,6 +1834,76 @@ public class FxController  extends BaseController {
 						break;
 					}
 					map.put(key,  str);
+				}else if("signType".equals(key)){
+					String str="";
+					String monthStr="";
+					String summaryTimeStr="";
+					String libService_0="";
+					String libService_1="";
+					switch (value!=null ?value.toString():"") {
+					case "0":
+						str="旧兼容模式";
+						monthStr="";
+						summaryTimeStr="";
+						libService_0=obj.getLibService()+"";
+						break;
+					case "1":
+						str="服务包1";
+						monthStr=obj.getLibServiceMonth()+"/"+obj.getCurIsSummary();
+						summaryTimeStr=DateHelper.format(obj.getCurSummaryTime(), "yyyy-MM-dd") ;
+						libService_1=obj.getLibService()+"";
+						break;
+					case "2":
+						str="服务包2";
+						monthStr=obj.getLibServiceMonth()+"/"+obj.getCurIsSummary();
+						summaryTimeStr=DateHelper.format(obj.getCurSummaryTime(), "yyyy-MM-dd") ;
+						libService_1=obj.getLibService()+"";
+						break;
+					case "3":
+						str="服务包3";
+						monthStr=obj.getLibServiceMonth()+"/"+obj.getCurIsSummary();
+						summaryTimeStr=DateHelper.format(obj.getCurSummaryTime(), "yyyy-MM-dd") ;
+						libService_1=obj.getLibService()+"";
+						break;
+					default:
+						str="";
+						monthStr="";
+						summaryTimeStr="";
+						libService_0="";
+						libService_1="";
+						break;
+					}
+					map.put(key,  str);
+					map.put("monthStr",monthStr);
+					map.put("summaryTimeStr", summaryTimeStr);
+					map.put("libService_0", libService_0);
+					map.put("libService_1", libService_1);
+				}else if("mealType".equals(key)){
+					String str="";
+					switch (value!=null ?value.toString():"") {
+					case "0":
+						str="旧兼容模式";
+						break;
+					case "1":
+						str="优选套餐";
+						break;
+					case "2":
+						str="VIP套餐";
+						break;
+					case "3":
+						str="尊享套餐";
+						break;
+					default:
+						str="";
+						break;
+					}
+					map.put(key,  str);
+				}else if("signTime".equals(key)){
+					map.put(key,DateHelper.format(obj.getSignTime(), "yyyy-MM-dd"));
+				}else if("endSignTime".equals(key)){
+					map.put(key,DateHelper.format(obj.getEndSignTime(), "yyyy-MM-dd"));
+				}else if("nextSummaryTime".equals(key)){
+					map.put(key,DateHelper.format(obj.getNextSummaryTime(), "yyyy-MM-dd"));
 				}else {
 					map.put(key, value);
 				} 

+ 12 - 8
src/main/resources/templates/sys/fx/merchantAdd.html

@@ -703,12 +703,10 @@ function push_user(){
 }
 
 function save(){
-	
-	 var schoollist=[];
-	 $.each($('stext'),function(){
+	var schoollist=[];
+	$.each($('stext'),function(){
         schoollist.push($(this).data("val"));
     });
-	 
 	if($("#poscode").val()==''){
 		parent.layer.msg("商户账号不能为空",{icon:11});
 		return
@@ -723,16 +721,22 @@ function save(){
 		return
 	}
 	if($("#signTime").val()==''){
-		parent.layer.msg("签约开始时间不能为空",{icon:11});
+		parent.layer.msg("合同开始日期不能为空",{icon:11});
 		return
 	}
 	if($("#endSignTime").val()==''){
-		parent.layer.msg("签约结束时间不能为空",{icon:11});
+		parent.layer.msg("合同结束日期不能为空",{icon:11});
+		return
+	}
+	if($("#signType").val()!='' && $("#signType").val()>=1 && $("#libServiceMonth").val()<=0){
+		parent.layer.msg("新模式充值月份数不可小于0",{icon:11});
+		return
+	}
+	if($("#signType").val()!='' && $("#signType").val()>=1 && $("#curSummaryTime").val()==''){
+		parent.layer.msg("新模式激活时间不可为空",{icon:11});
 		return
 	}
-	
 
-	
 	var title="您确定要保存商户信息?<br/>此动作会把商户塾币覆盖到机构塾币";
 	if(id!=''){
 		title="您确定要保存商户信息?";

+ 20 - 12
src/main/resources/templates/sys/fx/merchantAllList.html

@@ -126,18 +126,26 @@
 	<input type="hidden" name="reportType" id="reportType" />
 	<input type="hidden" name="pageSize" id="pageSize" value="10" />
 	<ul class="seachform">
-			
-			<li>
-			 <label>商户名称</label>
-			  <input name=LIKE_orgCode type="hidden" class="scinput" th:value="${search.get('LIKE_orgCode')}"/>
-			  <input name="LIKE_unitName" type="text" class="scinput" th:value="${search.get('LIKE_unitName')}"/>
-		    </li>
+		<li>
+		 <label>商户名称</label>
+		  <input name=LIKE_orgCode type="hidden" class="scinput" th:value="${search.get('LIKE_orgCode')}"/>
+		  <input name="LIKE_unitName" type="text" class="scinput" th:value="${search.get('LIKE_unitName')}"/>
+	    </li>
 		    
-		    <li>
-			 <label>商户账号</label>
-			  <input name="LIKE_posCode" type="text" class="scinput" th:value="${search.get('LIKE_posCode')}"/>
-		    </li>
-			
+	    <li>
+		 <label>商户账号</label>
+		  <input name="LIKE_posCode" type="text" class="scinput" th:value="${search.get('LIKE_posCode')}"/>
+	    </li>
+		    
+	    <li>
+		 <label>商户模式</label>
+		 	<select class="scinput select_width" name="signType" id="signType"   style="width: 150px;" >
+		 	 	<option value="" >全部</option>
+				<option value="0"  th:selected="${search.get('signType') eq '0' ? true : false}" >旧模式</option>
+				<option value="1"  th:selected="${search.get('signType') eq '1' ? true : false}">新模式</option>
+			</select>
+	    </li>
+	    
 		<li>
 			<input type="button" class="scbtn" value="查询" />
 		</li>
@@ -266,7 +274,7 @@
 					
 			</tr>
 		</tbody>
-	</table>
+	</table> 
 	
 	
 <div class="formbody" id="joinServiceEdit" style="display: none">