Browse Source

服务包5

wuwen 4 years ago
parent
commit
016bd93bc0

+ 65 - 84
src/main/java/com/ssj/service/sys/fx/service/impl/MerchantServiceImpl.java

@@ -1223,6 +1223,7 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
 	}
 	}
 
 
 	@Override
 	@Override
+	@Transactional
 	public Response saveMerchantByUsed(
 	public Response saveMerchantByUsed(
 			Merchant merchant,
 			Merchant merchant,
 			String startTime,String endTime,String password,String province,String city,String area,String schoollist,String location,
 			String startTime,String endTime,String password,String province,String city,String area,String schoollist,String location,
@@ -1410,6 +1411,7 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
 	}
 	}
 
 
 	@Override
 	@Override
+	@Transactional
 	public Response saveMerchantByNew(
 	public Response saveMerchantByNew(
 				Merchant merchant,
 				Merchant merchant,
 				String startTime,String endTime,String startActiveTimeStr,String activeTimeStr,String computeTimeStr,String password,String province,String city,String area,String schoollist,String location,
 				String startTime,String endTime,String startActiveTimeStr,String activeTimeStr,String computeTimeStr,String password,String province,String city,String area,String schoollist,String location,
@@ -1418,18 +1420,18 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
 		
 		
 		if(StringUtils.isNotEmpty(merchant.getId())){
 		if(StringUtils.isNotEmpty(merchant.getId())){
 				
 				
-				boolean isLibId=false;
-				boolean isSignType=false;
-				boolean isMealType=false;
-				boolean isServiceMonth=false;
+				boolean isSignType=false;//修改了服务包
+				boolean isServiceMonth=false;//修改了月份
+				
 				Merchant oldmerchant =this.getById(merchant.getId());
 				Merchant oldmerchant =this.getById(merchant.getId());
 				
 				
-				//发生了旧转新
+				//发生了旧转新,记录旧模式的币,端,当前时间。
 				if(oldmerchant.getSignType()==0) {
 				if(oldmerchant.getSignType()==0) {
 					oldmerchant.setLibServiceOdd(oldmerchant.getLibService());
 					oldmerchant.setLibServiceOdd(oldmerchant.getLibService());
 					oldmerchant.setPortNumOdd(oldmerchant.getPortNum());
 					oldmerchant.setPortNumOdd(oldmerchant.getPortNum());
 					oldmerchant.setChangeTime(new Date());
 					oldmerchant.setChangeTime(new Date());
 				}
 				}
+				
 				if(StringUtils.isNotEmpty(merchant.getLibId())) {
 				if(StringUtils.isNotEmpty(merchant.getLibId())) {
 					Merchant libMerchant=this.getMerchantByLibId(merchant.getLibId());
 					Merchant libMerchant=this.getMerchantByLibId(merchant.getLibId());
 					if(libMerchant!=null && !libMerchant.getId().equals(merchant.getId())) {
 					if(libMerchant!=null && !libMerchant.getId().equals(merchant.getId())) {
@@ -1437,6 +1439,7 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
 				        return response;
 				        return response;
 					}
 					}
 				}
 				}
+				
 				if(merchant.getLibServiceMonth()<oldmerchant.getLibServiceMonth()) {
 				if(merchant.getLibServiceMonth()<oldmerchant.getLibServiceMonth()) {
 					response.failure("您充值月份数不可小于当前月份数");
 					response.failure("您充值月份数不可小于当前月份数");
 			        return response;
 			        return response;
@@ -1450,18 +1453,10 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
 				if(!oldmerchant.getSignType().equals(merchant.getSignType())) {
 				if(!oldmerchant.getSignType().equals(merchant.getSignType())) {
 					isSignType=true;
 					isSignType=true;
 				}
 				}
-				if(!oldmerchant.getMealType().equals(merchant.getMealType())) {
-					isMealType=true;
-				}
 				if(!oldmerchant.getLibServiceMonth().equals(merchant.getLibServiceMonth())) {
 				if(!oldmerchant.getLibServiceMonth().equals(merchant.getLibServiceMonth())) {
 					isServiceMonth=true;
 					isServiceMonth=true;
 				}
 				}
-				if(StringUtils.isNotEmpty(merchant.getLibId())) {
-					if(!merchant.getLibId().equals(oldmerchant.getLibId())) {
-						isLibId=true;
-					}
-				}
-				
+
 				oldmerchant.setDeputyName(merchant.getDeputyName());
 				oldmerchant.setDeputyName(merchant.getDeputyName());
 				oldmerchant.setDeputyPhone(merchant.getDeputyPhone());
 				oldmerchant.setDeputyPhone(merchant.getDeputyPhone());
 				oldmerchant.setLegalPerson(merchant.getLegalPerson());
 				oldmerchant.setLegalPerson(merchant.getLegalPerson());
@@ -1481,35 +1476,44 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
 				oldmerchant.setLibServiceMonth(merchant.getLibServiceMonth());
 				oldmerchant.setLibServiceMonth(merchant.getLibServiceMonth());
 				oldmerchant.setLocation(location);
 				oldmerchant.setLocation(location);
 				
 				
+				//合同日期
+				if(StringUtils.isNotEmpty(startTime)) {
+					oldmerchant.setSignTime(DateHelper.parseDate(startTime, "yyyy-MM-dd"));
+				}
 				
 				
+				//合同日期
+				if(StringUtils.isNotEmpty(endTime)) {
+					oldmerchant.setEndSignTime(DateHelper.parseDate(endTime, "yyyy-MM-dd"));
+				}
+				
+				//激活开始日期
 				if(StringUtils.isNotEmpty(startActiveTimeStr)) {
 				if(StringUtils.isNotEmpty(startActiveTimeStr)) {
 					oldmerchant.setStartActiveTime(DateHelper.parseDate(startActiveTimeStr, "yyyy-MM-dd"));
 					oldmerchant.setStartActiveTime(DateHelper.parseDate(startActiveTimeStr, "yyyy-MM-dd"));
 				}
 				}
+				
+				//激活结束日期,初始化下一个结算日。
 				if(StringUtils.isNotEmpty(activeTimeStr)) {
 				if(StringUtils.isNotEmpty(activeTimeStr)) {
 					oldmerchant.setActiveTime(DateHelper.parseDate(activeTimeStr, "yyyy-MM-dd"));
 					oldmerchant.setActiveTime(DateHelper.parseDate(activeTimeStr, "yyyy-MM-dd"));
+					
+					oldmerchant.setCurSummaryTime(oldmerchant.getActiveTime());//当前结算日为激活结束日期
+					oldmerchant.setNextSummaryTime(DateHelper.getMonthDate(oldmerchant.getCurSummaryTime(),1));//下一个结算日为激活结束日期+1月
 				}
 				}
-				if(StringUtils.isNotEmpty(activeTimeStr)) {
-					oldmerchant.setCurSummaryTime(DateHelper.parseDate(activeTimeStr, "yyyy-MM-dd"));
-					oldmerchant.setNextSummaryTime(DateHelper.getMonthDate(oldmerchant.getCurSummaryTime(),1));
-				}
-				
+
+				//计费开始日期也可设为空
 				if(StringUtils.isNotEmpty(computeTimeStr)) {
 				if(StringUtils.isNotEmpty(computeTimeStr)) {
 					oldmerchant.setComputeTime(DateHelper.parseDate(computeTimeStr, "yyyy-MM-dd"));
 					oldmerchant.setComputeTime(DateHelper.parseDate(computeTimeStr, "yyyy-MM-dd"));
-				}
-				if(StringUtils.isNotEmpty(startTime)) {
-					oldmerchant.setSignTime(DateHelper.parseDate(startTime, "yyyy-MM-dd"));
-				}
-				if(StringUtils.isNotEmpty(endTime)) {
-					oldmerchant.setEndSignTime(DateHelper.parseDate(endTime, "yyyy-MM-dd"));
+				}else {
+					oldmerchant.setComputeTime(null);
 				}
 				}
 				
 				
-				//删除所有关联的学校
-				List<MerchantArea> merchantAreas=merchantAreaService.findSchoolByMerchantList(merchant.getId());
-				for (MerchantArea merchantArea : merchantAreas) {
-					merchantAreaService.delete(merchantArea);
-				}
 				//重新关联学校
 				//重新关联学校
 				if(StringUtils.isNotEmpty(schoollist)) {
 				if(StringUtils.isNotEmpty(schoollist)) {
+					//删除所有关联的学校
+					List<MerchantArea> merchantAreas=merchantAreaService.findSchoolByMerchantList(merchant.getId());
+					for (MerchantArea merchantArea : merchantAreas) {
+						merchantAreaService.delete(merchantArea);
+					}
+					
 					merchantAreas=new ArrayList<MerchantArea>();
 					merchantAreas=new ArrayList<MerchantArea>();
 					String[] areaIds=schoollist.split(";");
 					String[] areaIds=schoollist.split(";");
 					for (String areaId : areaIds) {
 					for (String areaId : areaIds) {
@@ -1550,50 +1554,38 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
 							oldmerchant.setLibService(20+signNum);
 							oldmerchant.setLibService(20+signNum);
 							oldmerchant.setPortNum(200);
 							oldmerchant.setPortNum(200);
 							break;
 							break;
+						case 5:
+							oldmerchant.setLibService(merchant.getLibService());
+							oldmerchant.setPortNum(400);
+							break;
 						default:
 						default:
 							oldmerchant.setLibService(0);
 							oldmerchant.setLibService(0);
 							oldmerchant.setPortNum(0);
 							oldmerchant.setPortNum(0);
 							break;
 							break;
 					}
 					}
-					
-					//更新套餐
-					oldmerchant.setSignType(merchant.getSignType());
+					oldmerchant.setSignType(merchant.getSignType());//更新套餐
 				}
 				}
-				
-				//商户同步学币/人数 到机构 / 时间
-//				if(StringUtils.isNotEmpty(merchant.getLibId())) {
-//					oldmerchant.setLibId(merchant.getLibId());
-//					TbLibJoin  libJoin= libJoinService.getById(oldmerchant.getLibId());
-//					if(libJoin!=null) {
-//						libJoin.setLibService(oldmerchant.getLibService());
-//						libJoin.setPlatformService(oldmerchant.getPlatformService());
-//						
-//						libJoinService.save(libJoin);
-//					}	
-//				}
-				
 				this.save(oldmerchant);
 				this.save(oldmerchant);
 				
 				
-				if(isSignType || isMealType || isServiceMonth || isLibId) {
-					
-					if(isSignType || isServiceMonth) {
-						//记录套餐更改记录
-						for (int i = oldMonth+1; i <= month; i++) {
-							TbLibJoinConsume consume=new TbLibJoinConsume();
-							consume.setToLibId(merchant.getLibId());
-							consume.setToMerchantId(merchant.getId());
-							consume.setLibService(oldmerchant.getLibService());
-							consume.setPlatformService(0);
-							consume.setType(6);
-							consume.setSignType(merchant.getSignType());
-							consume.setComputeNum(merchant.getCurIsSummary());
-							consume.setRemarks("服务包开通【服务包开通:第"+i+"月】");
-							consume.setCreateTime(new Date());
-							libJoinConsumeService.save(consume);
-						}
+				if(isSignType || isServiceMonth) {
+					//记录套餐更改记录
+					for (int i = oldMonth+1; i <= month; i++) {
+						TbLibJoinConsume consume=new TbLibJoinConsume();
+						consume.setToLibId(merchant.getLibId());
+						consume.setToMerchantId(merchant.getId());
+						consume.setLibService(oldmerchant.getLibService());
+						consume.setPlatformService(0);
+						consume.setType(6);
+						consume.setSignType(merchant.getSignType());
+						consume.setComputeNum(merchant.getCurIsSummary());
+						consume.setRemarks("服务包开通【服务包开通:第"+i+"月】");
+						consume.setCreateTime(new Date());
+						libJoinConsumeService.save(consume);
 					}
 					}
-					
-					//调用openApi接口
+				}
+				
+				//调用openApi接口
+				if(StringUtils.isNotEmpty(oldmerchant.getLibId())) {
 					DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
 					DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
 					libVipServiceService.openApiServiceCRM(
 					libVipServiceService.openApiServiceCRM(
 							3,
 							3,
@@ -1608,8 +1600,6 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
 										format.format(DateHelper.getMonthDate(oldmerchant.getActiveTime(),oldmerchant.getLibServiceMonth()))
 										format.format(DateHelper.getMonthDate(oldmerchant.getActiveTime(),oldmerchant.getLibServiceMonth()))
 							);
 							);
 				}
 				}
-				
-				
 				this.syncRecordByMerchant(curadmin.getLoginName(), oldmerchant.getId(),"", "修改套餐商户");
 				this.syncRecordByMerchant(curadmin.getLoginName(), oldmerchant.getId(),"", "修改套餐商户");
 				
 				
 		}else{
 		}else{
@@ -1645,8 +1635,6 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
 				merchant.setCreateTime(new Date());
 				merchant.setCreateTime(new Date());
 				merchant.setSaleLoginName(curadmin.getLoginName());
 				merchant.setSaleLoginName(curadmin.getLoginName());
 				merchant.setCurIsSummary(0);
 				merchant.setCurIsSummary(0);
-				merchant.setSignTime(startTime!=null ? DateHelper.parseDate(startTime, "yyyy-MM-dd"):null);
-				merchant.setEndSignTime(endTime!=null ? DateHelper.parseDate(endTime, "yyyy-MM-dd"): null);
 				
 				
 				if(StringUtils.isNotEmpty(startActiveTimeStr)) {
 				if(StringUtils.isNotEmpty(startActiveTimeStr)) {
 					merchant.setStartActiveTime(DateHelper.parseDate(startActiveTimeStr, "yyyy-MM-dd"));
 					merchant.setStartActiveTime(DateHelper.parseDate(startActiveTimeStr, "yyyy-MM-dd"));
@@ -1656,8 +1644,7 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
 				}
 				}
 				if(StringUtils.isNotEmpty(computeTimeStr)) {
 				if(StringUtils.isNotEmpty(computeTimeStr)) {
 					merchant.setComputeTime(DateHelper.parseDate(computeTimeStr, "yyyy-MM-dd"));
 					merchant.setComputeTime(DateHelper.parseDate(computeTimeStr, "yyyy-MM-dd"));
-				}
-				if(StringUtils.isNotEmpty(activeTimeStr)) {
+					
 					merchant.setCurSummaryTime(DateHelper.parseDate(activeTimeStr, "yyyy-MM-dd"));
 					merchant.setCurSummaryTime(DateHelper.parseDate(activeTimeStr, "yyyy-MM-dd"));
 					merchant.setNextSummaryTime(DateHelper.getMonthDate(merchant.getCurSummaryTime(),1));
 					merchant.setNextSummaryTime(DateHelper.getMonthDate(merchant.getCurSummaryTime(),1));
 				}
 				}
@@ -1668,6 +1655,7 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
 					merchant.setEndSignTime(DateHelper.parseDate(endTime, "yyyy-MM-dd"));
 					merchant.setEndSignTime(DateHelper.parseDate(endTime, "yyyy-MM-dd"));
 				}
 				}
 				
 				
+
 				String code="SSJ-FX";
 				String code="SSJ-FX";
 				if(StringUtils.isNotEmpty(merchant.getParentPosCode())){
 				if(StringUtils.isNotEmpty(merchant.getParentPosCode())){
 					Merchant pMerchant =this.getMerchantByPosCode(merchant.getParentPosCode());
 					Merchant pMerchant =this.getMerchantByPosCode(merchant.getParentPosCode());
@@ -1676,6 +1664,7 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
 					code=code+"-"+merchant.getPosCode(); 
 					code=code+"-"+merchant.getPosCode(); 
 				}
 				}
 				merchant.setOrgCode(code);
 				merchant.setOrgCode(code);
+				
 				switch (merchant.getSignType()) {
 				switch (merchant.getSignType()) {
 					case 1:
 					case 1:
 						merchant.setLibService(30);
 						merchant.setLibService(30);
@@ -1692,6 +1681,10 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
 						merchant.setLibService(20);
 						merchant.setLibService(20);
 						merchant.setPortNum(200);
 						merchant.setPortNum(200);
 						break;
 						break;
+					case 5:
+						merchant.setLibService(merchant.getLibService());
+						merchant.setPortNum(400);
+						break;
 					default:
 					default:
 						merchant.setLibService(0);
 						merchant.setLibService(0);
 						merchant.setPortNum(0);
 						merchant.setPortNum(0);
@@ -1725,19 +1718,7 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
 					}
 					}
 					merchantAreaService.save(merchantAreas);
 					merchantAreaService.save(merchantAreas);
 				}
 				}
-				
-				//商户同步学币/人数 到机构 / 时间
-//				if(StringUtils.isNotEmpty(merchant.getLibId())) {
-//					TbLibJoin  libJoin= libJoinService.getById(merchant.getLibId());
-//					if(libJoin!=null) {
-//						libJoin.setLibService(merchant.getLibService());
-//						libJoin.setPlatformService(merchant.getPlatformService());
-//						
-//						libJoinService.save(libJoin);
-//					}	
-//				}
-				
-				
+
 				//记录开通商户记录
 				//记录开通商户记录
 				for (int i = 1; i <= merchant.getLibServiceMonth(); i++) {
 				for (int i = 1; i <= merchant.getLibServiceMonth(); i++) {
 					TbLibJoinConsume consume=new TbLibJoinConsume();
 					TbLibJoinConsume consume=new TbLibJoinConsume();

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

@@ -616,6 +616,8 @@ public class FinanceReportController extends BaseController {
             				map.put("sign_type", "服务包3");
             				map.put("sign_type", "服务包3");
             			}else if(Integer.parseInt(map.get("sign_type").toString())==4){
             			}else if(Integer.parseInt(map.get("sign_type").toString())==4){
             				map.put("sign_type", "服务包4");
             				map.put("sign_type", "服务包4");
+            			}else if(Integer.parseInt(map.get("sign_type").toString())==5){
+            				map.put("sign_type", "服务包5");
             			}else {
             			}else {
             				map.put("sign_type", "");
             				map.put("sign_type", "");
             			}
             			}

+ 21 - 0
src/main/java/com/ssj/sys/controller/FxController.java

@@ -1433,6 +1433,7 @@ public class FxController  extends BaseController {
 			
 			
 	        return merchantService.saveMerchantByUsed(merchant, startTime, endTime, password, province, city, area, schoollist, location, curadmin);
 	        return merchantService.saveMerchantByUsed(merchant, startTime, endTime, password, province, city, area, schoollist, location, curadmin);
 		}else {
 		}else {
+			
 			if(StringUtils.isEmpty(startActiveTimeStr)) {
 			if(StringUtils.isEmpty(startActiveTimeStr)) {
 				response.failure("新模式的开始激活日期不可为空");
 				response.failure("新模式的开始激活日期不可为空");
 		        return response;
 		        return response;
@@ -2088,6 +2089,16 @@ public class FxController  extends BaseController {
 						}
 						}
 						libService_1=obj.getLibService()+"";
 						libService_1=obj.getLibService()+"";
 						break;
 						break;
+					case "5":
+						str="服务包5";
+						monthStr=obj.getLibServiceMonth()+"/"+obj.getCurIsSummary();
+						startActiveTimeStr=DateHelper.format(obj.getStartActiveTime(), "yyyy-MM-dd") ;
+						activeTimeStr=DateHelper.format(obj.getActiveTime(), "yyyy-MM-dd") ;
+						if(obj.getComputeTime()!=null) {
+							computeTimeStr=DateHelper.format(obj.getComputeTime(), "yyyy-MM-dd") ;
+						}
+						libService_1=obj.getLibService()+"";
+						break;
 					default:
 					default:
 						str="";
 						str="";
 						monthStr="";
 						monthStr="";
@@ -2299,6 +2310,16 @@ public class FxController  extends BaseController {
 						}
 						}
 						libService_1=obj.getLibService()+"";
 						libService_1=obj.getLibService()+"";
 						break;
 						break;
+					case "5":
+						str="服务包5";
+						monthStr=obj.getLibServiceMonth()+"/"+obj.getCurIsSummary();
+						startActiveTimeStr=DateHelper.format(obj.getStartActiveTime(), "yyyy-MM-dd") ;
+						activeTimeStr=DateHelper.format(obj.getActiveTime(), "yyyy-MM-dd") ;
+						if(obj.getComputeTime()!=null) {
+							computeTimeStr=DateHelper.format(obj.getComputeTime(), "yyyy-MM-dd") ;
+						}
+						libService_1=obj.getLibService()+"";
+						break;
 					default:
 					default:
 						str="";
 						str="";
 						monthStr="";
 						monthStr="";

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

@@ -97,6 +97,7 @@
 					   <span th:case="2" >服务包2</span>
 					   <span th:case="2" >服务包2</span>
 					   <span th:case="3" >服务包3</span>
 					   <span th:case="3" >服务包3</span>
 					   <span th:case="4" >服务包4</span>
 					   <span th:case="4" >服务包4</span>
+					   <span th:case="5" >服务包5</span>
 					</td>
 					</td>
 					<td th:text="${item.get('count_1')>0 ? item.get('price') : '0' }"></td>
 					<td th:text="${item.get('count_1')>0 ? item.get('price') : '0' }"></td>
 <!-- 					<td th:text="${item.get('sum_1')}"></td> -->
 <!-- 					<td th:text="${item.get('sum_1')}"></td> -->

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

@@ -121,6 +121,13 @@ dtext{
 				</div>
 				</div>
 			</li>
 			</li>
 			
 			
+			<li>
+				<label>合同日期:<b >*</b></label>
+				<input type="hidden"  id="minDate" value="2020-01-01" >
+				<input type="text" id="signTime" name="signTime"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'minDate\')}'})" autocomplete="off" th:value="${#dates.format(merchant.signTime, 'yyyy-MM-dd')}" class="scinput date_width " placeholder="合同开始日期">
+				&nbsp;&nbsp;&nbsp;~~&nbsp;&nbsp;
+				<input type="text" id="endSignTime" name="endSignTime"   onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'signTime\')}'})"  autocomplete="off" th:value="${#dates.format(merchant.endSignTime, 'yyyy-MM-dd')}" class="scinput date_width" placeholder="合同结束日期">
+			</li>
 			
 			
 			<li>
 			<li>
 				<label>套餐:套餐类型<b>*</b></label>
 				<label>套餐:套餐类型<b>*</b></label>
@@ -138,25 +145,25 @@ dtext{
 				<label>套餐:服务包类型<b>*</b></label>
 				<label>套餐:服务包类型<b>*</b></label>
 				<div class="vocation" style="margin-right: 5px; width: 345px">
 				<div class="vocation" style="margin-right: 5px; width: 345px">
 					<select name="signType" id="signType" class="select1"  > 
 					<select name="signType" id="signType" class="select1"  > 
-						<option value="0" th:selected="${merchant.signType==0 ? true : false}">合同签约模式(旧模式)</option>
-						<option value="1" th:selected="${merchant.signType==1 ? true : false}">服务包1</option>
-						<option value="2" th:selected="${merchant.signType==2 ? true : false}">服务包2</option>
-						<option value="3" th:selected="${merchant.signType==3 ? true : false}">服务包3</option>
-						<option value="4" th:selected="${merchant.signType==4 ? true : false}">服务包4</option>
+						<option value="0" th:selected="${merchant.signType==0 ? true : false}" data-val="0">合同签约模式(旧模式)</option>
+						<option value="1" th:selected="${merchant.signType==1 ? true : false}" data-val="30" >服务包1</option>
+						<option value="2" th:selected="${merchant.signType==2 ? true : false}" data-val="50" >服务包2</option>
+						<option value="3" th:selected="${merchant.signType==3 ? true : false}" data-val="100" >服务包3</option>
+						<option value="4" th:selected="${merchant.signType==4 ? true : false}" data-val="20" >服务包4</option>
+						<option value="5" th:selected="${merchant.signType==5 ? true : false}" th:data-val="${merchant.libService!=null ? merchant.libService : 0}" >服务包5</option>
 					</select>
 					</select>
 				</div>
 				</div>
 				<text th:if="${merchant.id!=null}"  style="width: 230px;color:red">[修改套餐模式,不会影响加油包有效性 ]</text>
 				<text th:if="${merchant.id!=null}"  style="width: 230px;color:red">[修改套餐模式,不会影响加油包有效性 ]</text>
 			</li>
 			</li>
 			
 			
-
 			<li>
 			<li>
-				<label>合同日期:<b >*</b></label>
-				<input type="hidden"  id="minDate" value="2020-01-01" >
-				<input type="text" id="signTime" name="signTime"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'minDate\')}'})" autocomplete="off" th:value="${#dates.format(merchant.signTime, 'yyyy-MM-dd')}" class="scinput date_width " placeholder="合同开始日期">
-				&nbsp;&nbsp;&nbsp;~~&nbsp;&nbsp;
-				<input type="text" id="endSignTime" name="endSignTime"   onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'signTime\')}'})"  autocomplete="off" th:value="${#dates.format(merchant.endSignTime, 'yyyy-MM-dd')}" class="scinput date_width" placeholder="合同结束日期">
+				<label><b >【服务包模式】</b>服务包人数:<b>*</b></label>
+				<input type="number" id="libService" min="0" class="dfinput fl" name="libService" th:value="${merchant.libService!=null ? merchant.libService : 0}" autocomplete="off"/>
+				<text id="libServiceTips" style="width: 230px;color:red;display: none;">[ 请输入服务包5的服务人数 ]</text>
 			</li>
 			</li>
 			
 			
+			
+			
 			<li>
 			<li>
 				<label><b >【服务包模式】</b>充值月份数:<b>*</b></label>
 				<label><b >【服务包模式】</b>充值月份数:<b>*</b></label>
 				<input type="number" id="libServiceMonth" min="0" class="dfinput fl" name="libServiceMonth" th:value="${merchant.libServiceMonth!=null ? merchant.libServiceMonth : 0}" autocomplete="off"/>
 				<input type="number" id="libServiceMonth" min="0" class="dfinput fl" name="libServiceMonth" th:value="${merchant.libServiceMonth!=null ? merchant.libServiceMonth : 0}" autocomplete="off"/>
@@ -327,7 +334,7 @@ dtext{
 
 
 
 
 <div class="formbody" id="schoollist" style="display: none">
 <div class="formbody" id="schoollist" style="display: none">
-	<div class="rightinfo">
+	<div class="rightinfo">	
 			<ul class="seachform">
 			<ul class="seachform">
 			    <li>
 			    <li>
 				 	<label style="color:red">已选择:</label>
 				 	<label style="color:red">已选择:</label>
@@ -425,6 +432,24 @@ $(function (){
 	    alert("");
 	    alert("");
 	});
 	});
 	
 	
+	$("#signType").on("change",function(){
+	    var val=$(this).find("option:selected").data("val");
+	    $("#libService").val(val);
+	    if($(this).val()<=4){
+	    	$("#libServiceTips").hide();
+	    }else{
+	    	$("#libServiceTips").show();
+	    }
+	});
+	
+	$("#libService").on("focus",function(){
+		if($("#signType").val()<=4){
+			parent.layer.msg("当前服务包类型不支持修改服务人数",{icon:3});
+		}
+		return;
+	});
+	
+	
 	$("#selectschoollist").on("click","dtext",function(){
 	$("#selectschoollist").on("click","dtext",function(){
 		$(this).parent().remove();
 		$(this).parent().remove();
 		
 		
@@ -786,6 +811,7 @@ function save(){
             
             
             'signType':$("#signType").val(),
             'signType':$("#signType").val(),
             'mealType':$("#mealType").val(),
             'mealType':$("#mealType").val(),
+            'libService':$("#libService").val(),
             
             
             'libServiceMonth':$("#libServiceMonth").val(),
             'libServiceMonth':$("#libServiceMonth").val(),
             
             

+ 3 - 2
src/main/resources/templates/sys/fx/merchantAllList.html

@@ -229,6 +229,7 @@
 					   <span th:case="2" >服务包2</span>
 					   <span th:case="2" >服务包2</span>
 					   <span th:case="3" >服务包3</span>
 					   <span th:case="3" >服务包3</span>
 					   <span th:case="4" >服务包4</span>
 					   <span th:case="4" >服务包4</span>
+					   <span th:case="5" >服务包5</span>
 					   <span th:case="*" style="color:red">旧兼容模式</span>
 					   <span th:case="*" style="color:red">旧兼容模式</span>
 					</td>
 					</td>
 					
 					
@@ -240,8 +241,8 @@
 					
 					
 					<td th:title="${item.signTime!=null ?  #dates.format(item.signTime, 'yyyy-MM-dd')+'~'+#dates.format(item.endSignTime, 'yyyy-MM-dd') : '--' }"  th:text="${item.signTime!=null ?  #dates.format(item.signTime, 'yyyy-MM-dd')+'~'+#dates.format(item.endSignTime, 'yyyy-MM-dd') : '--' }"></td>
 					<td th:title="${item.signTime!=null ?  #dates.format(item.signTime, 'yyyy-MM-dd')+'~'+#dates.format(item.endSignTime, 'yyyy-MM-dd') : '--' }"  th:text="${item.signTime!=null ?  #dates.format(item.signTime, 'yyyy-MM-dd')+'~'+#dates.format(item.endSignTime, 'yyyy-MM-dd') : '--' }"></td>
 					<td >
 					<td >
-					   <span th:if="${item.libServiceMonth>0  && ( item.signType==1 || item.signType==2 || item.signType==3 || item.signType==4 )}"  style="color: red">[[${item.libServiceMonth +' / '+ item.curIsSummary}]]</span>
-					   <span th:if="${item.nextSummaryTime==null && ( item.signType==1 || item.signType==2 || item.signType==3  || item.signType==4)}" >已结清</span>
+					   <span th:if="${item.libServiceMonth>0  && item.signType>0}"  style="color: red">[[${item.libServiceMonth +' / '+ item.curIsSummary}]]</span>
+					   <span th:if="${item.nextSummaryTime==null && item.signType>0}" >已结清</span>
 					</td>
 					</td>
 					<td  th:text="${#calendars.format(item.startActiveTime,'yyyy-MM-dd')}" ></td> 
 					<td  th:text="${#calendars.format(item.startActiveTime,'yyyy-MM-dd')}" ></td> 
 					<td  th:text="${#calendars.format(item.activeTime,'yyyy-MM-dd')}" ></td> 
 					<td  th:text="${#calendars.format(item.activeTime,'yyyy-MM-dd')}" ></td> 

+ 1 - 0
src/main/resources/templates/sys/fx/merchantBackupInfo.html

@@ -138,6 +138,7 @@ dtext{
 						<option value="2" th:selected="${merchant.signType==2 ? true : false}">服务包2</option>
 						<option value="2" th:selected="${merchant.signType==2 ? true : false}">服务包2</option>
 						<option value="3" th:selected="${merchant.signType==3 ? true : false}">服务包3</option>
 						<option value="3" th:selected="${merchant.signType==3 ? true : false}">服务包3</option>
 						<option value="4" th:selected="${merchant.signType==4 ? true : false}">服务包4</option>
 						<option value="4" th:selected="${merchant.signType==4 ? true : false}">服务包4</option>
+						<option value="5" th:selected="${merchant.signType==5 ? true : false}">服务包5</option>
 					</select>
 					</select>
 				</div>
 				</div>
 				<text th:if="${merchant.id!=null}"  style="width: 230px;color:red">[修改套餐模式,不会影响加油包有效性 ]</text>
 				<text th:if="${merchant.id!=null}"  style="width: 230px;color:red">[修改套餐模式,不会影响加油包有效性 ]</text>

+ 3 - 2
src/main/resources/templates/sys/fx/merchantBackupList.html

@@ -211,6 +211,7 @@
 					   <span th:case="2" >服务包2</span>
 					   <span th:case="2" >服务包2</span>
 					   <span th:case="3" >服务包3</span>
 					   <span th:case="3" >服务包3</span>
 					   <span th:case="4" >服务包4</span>
 					   <span th:case="4" >服务包4</span>
+					   <span th:case="5" >服务包5</span>
 					   <span th:case="*" style="color:red">旧兼容模式</span>
 					   <span th:case="*" style="color:red">旧兼容模式</span>
 					</td>
 					</td>
 					
 					
@@ -220,8 +221,8 @@
 					
 					
 					<td th:title="${item.signTime!=null ?  #dates.format(item.signTime, 'yyyy-MM-dd')+'~'+#dates.format(item.endSignTime, 'yyyy-MM-dd') : '--' }"  th:text="${item.signTime!=null ?  #dates.format(item.signTime, 'yyyy-MM-dd')+'~'+#dates.format(item.endSignTime, 'yyyy-MM-dd') : '--' }"></td>
 					<td th:title="${item.signTime!=null ?  #dates.format(item.signTime, 'yyyy-MM-dd')+'~'+#dates.format(item.endSignTime, 'yyyy-MM-dd') : '--' }"  th:text="${item.signTime!=null ?  #dates.format(item.signTime, 'yyyy-MM-dd')+'~'+#dates.format(item.endSignTime, 'yyyy-MM-dd') : '--' }"></td>
 					<td >
 					<td >
-					   <span th:if="${item.libServiceMonth>0  && ( item.signType==1 || item.signType==2 || item.signType==3 || item.signType==4 )}"  style="color: red">[[${item.libServiceMonth +' / '+ item.curIsSummary}]]</span>
-					   <span th:if="${item.nextSummaryTime==null && ( item.signType==1 || item.signType==2 || item.signType==3 || item.signType==4 )}" >已结清</span>
+					   <span th:if="${item.libServiceMonth>0  && item.signType>0 }" style="color: red">[[${item.libServiceMonth +' / '+ item.curIsSummary}]]</span>
+					   <span th:if="${item.nextSummaryTime==null &&  item.signType>0 }" >已结清</span>
 					</td>
 					</td>
 					<td  th:text="${#calendars.format(item.startActiveTime,'yyyy-MM-dd')}" ></td> 
 					<td  th:text="${#calendars.format(item.startActiveTime,'yyyy-MM-dd')}" ></td> 
 					<td  th:text="${#calendars.format(item.activeTime,'yyyy-MM-dd')}" ></td> 
 					<td  th:text="${#calendars.format(item.activeTime,'yyyy-MM-dd')}" ></td> 

+ 1 - 0
src/main/resources/templates/sys/fx/merchantInfo.html

@@ -138,6 +138,7 @@ dtext{
 						<option value="2" th:selected="${merchant.signType==2 ? true : false}">服务包2</option>
 						<option value="2" th:selected="${merchant.signType==2 ? true : false}">服务包2</option>
 						<option value="3" th:selected="${merchant.signType==3 ? true : false}">服务包3</option>
 						<option value="3" th:selected="${merchant.signType==3 ? true : false}">服务包3</option>
 						<option value="4" th:selected="${merchant.signType==4 ? true : false}">服务包4</option>
 						<option value="4" th:selected="${merchant.signType==4 ? true : false}">服务包4</option>
+						<option value="5" th:selected="${merchant.signType==5 ? true : false}">服务包5</option>
 					</select>
 					</select>
 				</div>
 				</div>
 				<text th:if="${merchant.id!=null}"  style="width: 230px;color:red">[修改套餐模式,不会影响加油包有效性 ]</text>
 				<text th:if="${merchant.id!=null}"  style="width: 230px;color:red">[修改套餐模式,不会影响加油包有效性 ]</text>