|
@@ -39,10 +39,7 @@ import org.springframework.ui.Model;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
@RequestMapping("/weixin/libVip")
|
|
|
@Controller
|
|
@@ -109,327 +106,104 @@ public class LibVipController extends BaseController {
|
|
|
model.addAttribute("msgType", "您好!此会员卡不存在。");
|
|
|
return "weixin/library/bangding_infor";
|
|
|
}
|
|
|
- User user = UserUtil.getUser(request);
|
|
|
- //有服务就跳转到激活
|
|
|
+ //查看卡是否激活
|
|
|
+ if(Objects.isNull(vip.getUserId())){
|
|
|
+ model.addAttribute("msgType", "您好,请前往小程序激活!");
|
|
|
+ return "weixin/library/bangding_infor";
|
|
|
+ }
|
|
|
+ //无服务就跳转到激活
|
|
|
LibVipService libVipService = libVipServiceService.getVipIdService(id);
|
|
|
if(libVipService==null){
|
|
|
- model.addAttribute("msgType", "您好,请前往小程序激活!");
|
|
|
+ model.addAttribute("msgType", "您好,您的服务已经过期,请联系管理员!");
|
|
|
return "weixin/library/bangding_infor";
|
|
|
}
|
|
|
+ User user = UserUtil.getUser(request);
|
|
|
TbLibManager manager = managerService.findByUserIdAndLibIsNotNull(user.getId());
|
|
|
- Date nowDate = new Date();
|
|
|
- if(manager != null && vip.getUserId() ==null){ //管理员
|
|
|
-
|
|
|
- if(manager.getType() == 5){
|
|
|
- model.addAttribute("msgType", "尊敬的合伙人,您未拥有扫卡权限!");
|
|
|
- return "weixin/library/bangding_infor";
|
|
|
- }
|
|
|
- if(libVipService!=null){
|
|
|
- //跳转到激活
|
|
|
- TbLibJoin tbLibJoin=joinService.getById(libVipService.getLibId());
|
|
|
- String school =cnAreaService.getLocationArea(tbLibJoin.getLeagueLat(), tbLibJoin.getLeagueLng(), 4);
|
|
|
- model.addAttribute("school", school);
|
|
|
- model.addAttribute("tbLibJoin", tbLibJoin);
|
|
|
- model.addAttribute("type", 0);//0代购后激活
|
|
|
- model.addAttribute("user", user);
|
|
|
- model.addAttribute("vipId", id);
|
|
|
- model.addAttribute("grade", sortService.getParamValByCode("grade"));//年级
|
|
|
- return "weixin/vip/activateCard";
|
|
|
- }
|
|
|
- model.addAttribute("vipId", id);
|
|
|
- if(5==vip.getLevel()){
|
|
|
- model.addAttribute("type", 2);//自己购卡,定位
|
|
|
- return "weixin/vip/location";
|
|
|
- }
|
|
|
-
|
|
|
- model.addAttribute("type", 1);//自己购卡,定位
|
|
|
- if(4==vip.getLevel()){
|
|
|
- return "weixin/vip/lxLocation";
|
|
|
- }
|
|
|
- return "weixin/vip/location";
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- }else if (manager != null && !Strings.isNullOrEmpty(vip.getUserId())){
|
|
|
-
|
|
|
+ //管理员
|
|
|
+ if(Objects.nonNull(manager)){
|
|
|
if(manager.getType() == 5){
|
|
|
model.addAttribute("msgType", "尊敬的合伙人,您未拥有扫卡权限!");
|
|
|
return "weixin/library/bangding_infor";
|
|
|
}
|
|
|
+ //查看是否属于自己馆的卡
|
|
|
Integer ptCount = libVipServiceService.getVipIdAndLibIdCount(id,manager.getLibId());
|
|
|
if(ptCount==0){
|
|
|
model.addAttribute("msgType", "图书馆管理员您好!此卡没有购买您图书馆的相关服务,无法进行操作");
|
|
|
return "weixin/library/bangding_infor";
|
|
|
- }else{
|
|
|
- //判断是否有购买普通会员卡服务
|
|
|
- TbLibJoin tbLibJoin=joinService.getById(manager.getLibId());
|
|
|
- Date start_jia_time =DateHelper.parseDate( tbLibJoin.getStartJiaTime()==null?"2018-01-15":tbLibJoin.getStartJiaTime(), "yyyy-MM-dd") ;
|
|
|
- Date end_jia_time = DateHelper.parseDate(tbLibJoin.getEndJiaTime()==null?"2018-02-19":tbLibJoin.getEndJiaTime(), "yyyy-MM-dd") ;
|
|
|
- if(nowDate.getTime()>start_jia_time.getTime() && nowDate.getTime()<end_jia_time.getTime()){ //在寒假范围内
|
|
|
- //查询此卡是否有作业吧服务
|
|
|
- Integer countVip = libVipServiceService.getVipIdZXServiceCount(id,manager.getLibId());
|
|
|
- if(countVip == 0 ){ //没有作业吧服务
|
|
|
- //查询该卡是否有寒暑假
|
|
|
- Integer mouthCount = libVipServiceService.getMouthServiceCount(id,manager.getLibId(),"S001","C003");
|
|
|
- if(mouthCount==0){
|
|
|
- Integer isOcbuy = libVipServiceService.getOcBuyServiceCount(id,manager.getLibId(),"S001","C001");
|
|
|
- if(isOcbuy==0){
|
|
|
- Integer jiaCount = libVipServiceService.findIsHaveJiaSer(id,manager.getLibId());
|
|
|
- if(jiaCount == 0){
|
|
|
- model.addAttribute("msgType", "图书馆管理员您好!此卡没有购买您图书馆的寒暑假假期服务,无法进行操作");
|
|
|
- return "weixin/library/bangding_infor";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- }else{
|
|
|
- //不在寒暑假时间内 查询是否拥有非寒暑假服务
|
|
|
- Integer jiaCount = libVipServiceService.findJiaServiceByLib(id,manager.getLibId());
|
|
|
- if(jiaCount == 0){
|
|
|
- model.addAttribute("msgType", "图书馆管理员您好!此卡没有购买您图书馆的非假期相关服务,无法进行操作");
|
|
|
- return "weixin/library/bangding_infor";
|
|
|
- }
|
|
|
- }
|
|
|
- if(4==vip.getLevel() || libVipServiceService.isVipIdAndWeekService(vip.getId(),null)){
|
|
|
- int dayWeek=DateHelper.getday(new Date());//判断是不是周六日
|
|
|
- if(dayWeek>1&& dayWeek<6){
|
|
|
- model.addAttribute("msgType", "图书馆管理员,您好。<br/>本卡仅限周末使用,不包含寒暑假,不承诺配阅读顾问;<br/>仅限与社区机构/学校进行图书馆共建合作。");
|
|
|
- return "weixin/library/bangding_infor";
|
|
|
- }
|
|
|
- }
|
|
|
- //看是否馆长
|
|
|
- LibStaffing libStaffing = libStaffingService.findByUserIdAndLib(user.getId(),manager.getLibId());
|
|
|
- List<Map<String, Object>> serviceList = libVipServiceService.findUserServiceList(id,manager.getLibId());
|
|
|
- //本周借阅情况
|
|
|
- Map<String, Object> weekReadInfo = subService.findWeekReadInfo(id);
|
|
|
- if(libStaffing!=null && ("s_sd".equals(libStaffing.getType()) || "s_cd".equals(libStaffing.getType()))){
|
|
|
- //馆长---消费情况
|
|
|
- Map<String, Object> costInfo = libStaffingService.findUserCost(id,manager.getLibId());
|
|
|
- // 到馆情况
|
|
|
- Map<String, Object> comeLibInfo = subService.findComeLibInfo(id);
|
|
|
- Integer countVip = libVipServiceService.getVipIdZXServiceCount(id,manager.getLibId());
|
|
|
- if(countVip == 0){
|
|
|
- model.addAttribute("workInfo", null);
|
|
|
- model.addAttribute("workSug", null);
|
|
|
- }else{
|
|
|
- Map<String, Object> workInfo = subService.findworkInfo(id,manager.getLibId());
|
|
|
- Map<String, Object> workSug = subService.findWorkSug(id);
|
|
|
- model.addAttribute("workInfo", workInfo);
|
|
|
- model.addAttribute("workSug", workSug);
|
|
|
- }
|
|
|
- //作业反馈
|
|
|
-
|
|
|
- comeLibInfo.put("sug", "及时与家长电话回访跟进");
|
|
|
- model.addAttribute("serviceList", serviceList);
|
|
|
- model.addAttribute("weekReadInfo", weekReadInfo);
|
|
|
- model.addAttribute("costInfo", costInfo);
|
|
|
- model.addAttribute("comeLibInfo", comeLibInfo);
|
|
|
-
|
|
|
- model.addAttribute("vip", vip);
|
|
|
- model.addAttribute("libtype", manager.getLibtype());
|
|
|
- TbLibSubscribe sub = subService.findByVipIdAndStat(vip.getId(),"1");
|
|
|
- if(sub != null ){
|
|
|
- //离馆 签离
|
|
|
- model.addAttribute("vip", vip);
|
|
|
- model.addAttribute("subId", sub.getId());
|
|
|
- Integer ptCount2 = libVipServiceService.getVipIdPTServiceCount(id,manager.getLibId());
|
|
|
- if(ptCount2 == 0){
|
|
|
- model.addAttribute("islib", "1"); //不是图书馆服务,没代借
|
|
|
- }else{
|
|
|
- model.addAttribute("islib", "2"); //图书馆服务,有代借
|
|
|
- }
|
|
|
- model.addAttribute("siginout", "1"); //是否签离 1、是,2否
|
|
|
- }else{
|
|
|
- //确认到馆操作 签到
|
|
|
- model.addAttribute("orderUser", vip);
|
|
|
- model.addAttribute("subId", "");
|
|
|
- model.addAttribute("siginout", "2"); //是否签离 1、是,2否
|
|
|
- Integer ptCount2 = libVipServiceService.getVipIdPTServiceCount(id,manager.getLibId());
|
|
|
- if(ptCount2 == 0){
|
|
|
- model.addAttribute("islib", "1"); //不是图书馆服务,没代借
|
|
|
- }else{
|
|
|
- model.addAttribute("islib", "2"); //图书馆服务,有代借
|
|
|
- }
|
|
|
- }
|
|
|
- return "weixin/library/order/cdsign";
|
|
|
- }else{
|
|
|
- //用户侦测说明
|
|
|
-
|
|
|
-
|
|
|
- TbTyZyb tyzyb = tyzybService.findByAnyCondition(vip.getUserId());
|
|
|
- model.addAttribute("tyzyb", tyzyb);
|
|
|
- model.addAttribute("serviceList", serviceList);
|
|
|
- model.addAttribute("weekReadInfo", weekReadInfo);
|
|
|
- model.addAttribute("vip", vip);
|
|
|
- model.addAttribute("libtype", manager.getLibtype());
|
|
|
- TbLibSubscribe sub = subService.findByVipIdAndStat(vip.getId(),"1");
|
|
|
- if(sub != null ){
|
|
|
- //离馆 签离
|
|
|
- model.addAttribute("vip", vip);
|
|
|
- model.addAttribute("subId", sub.getId());
|
|
|
- Integer ptCount2 = libVipServiceService.getVipIdPTServiceCount(id,manager.getLibId());
|
|
|
- if(ptCount2 == 0){
|
|
|
- model.addAttribute("islib", "1"); //不是图书馆服务,没代借
|
|
|
- }else{
|
|
|
- model.addAttribute("islib", "2"); //图书馆服务,有代借
|
|
|
- }
|
|
|
- model.addAttribute("siginout", "1"); //是否签离 1、是,2否
|
|
|
- }else{
|
|
|
- //确认到馆操作 签到
|
|
|
- model.addAttribute("orderUser", vip);
|
|
|
- model.addAttribute("subId", "");
|
|
|
- model.addAttribute("siginout", "2"); //是否签离 1、是,2否
|
|
|
- Integer ptCount2 = libVipServiceService.getVipIdPTServiceCount(id,manager.getLibId());
|
|
|
- if(ptCount2 == 0){
|
|
|
- model.addAttribute("islib", "1"); //不是图书馆服务,没代借
|
|
|
- }else{
|
|
|
- model.addAttribute("islib", "2"); //图书馆服务,有代借
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return "weixin/library/order/salessign";
|
|
|
- }
|
|
|
-
|
|
|
- //}
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- //这里判断是不是销售人员。。。
|
|
|
- if(vip.getUserId() != null && !"".equals(vip.getUserId())){ //已绑定
|
|
|
- if(user.getId().equals(vip.getUserId())){ //本人
|
|
|
- LibVipService vipService=libVipServiceService.getVipIdService(id);
|
|
|
- if(vipService != null){
|
|
|
- TbLibJoin tbLibJoin = joinService.getById(vipService.getLibId());
|
|
|
- Date start_jia_time =DateHelper.parseDate( tbLibJoin.getStartJiaTime()==null?"2018-01-15":tbLibJoin.getStartJiaTime(), "yyyy-MM-dd") ;
|
|
|
- Date end_jia_time = DateHelper.parseDate(tbLibJoin.getEndJiaTime()==null?"2018-02-19":tbLibJoin.getEndJiaTime(), "yyyy-MM-dd") ;
|
|
|
- if(nowDate.getTime()>start_jia_time.getTime() && nowDate.getTime()<end_jia_time.getTime()){ //在寒假范围内
|
|
|
- //查询该馆是否有寒假卡
|
|
|
- LibSalesPrice salesPrice = salesPriceService.findByLibIdAndSpeciesAndType(vipService.getLibId(), "S001", "C008");
|
|
|
- if(salesPrice != null){ //设有寒暑假服务
|
|
|
- Integer countVip = libVipServiceService.getVipIdZXServiceCount(id,vipService.getLibId()); //是否有作业吧服务
|
|
|
- if(countVip == 0){
|
|
|
- Integer mouthCount = libVipServiceService.getMouthServiceCount(id,vipService.getLibId(),"S001","C003");//半年卡以及月卡不计寒暑假
|
|
|
- if(mouthCount==0){
|
|
|
- //查询是否是10月1号前买的年卡
|
|
|
- Integer isOcbuy = libVipServiceService.getOcBuyServiceCount(id,vipService.getLibId(),"S001","C001");
|
|
|
- if(isOcbuy == 0){
|
|
|
- //查询该卡是否有寒暑假
|
|
|
- Integer jiaCount = libVipServiceService.findIsHaveJiaSer(id,vipService.getLibId());
|
|
|
- if(jiaCount == 0){
|
|
|
- model.addAttribute("msgType", vip.getChildName()+"妈妈/爸爸,您好。<br/>现在是寒暑假假期时间,需要购买假期服务才能进行预约。");
|
|
|
- return "weixin/library/bangding_infor";
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }else{
|
|
|
- //不在寒暑假时间内 查询是否拥有非寒暑假服务
|
|
|
- Integer jiaCount = libVipServiceService.findJiaServiceByLib(id,tbLibJoin.getId());
|
|
|
- if(jiaCount == 0){
|
|
|
- model.addAttribute("msgType", vip.getChildName()+"妈妈/爸爸,您好。<br/>现在不是寒暑假假期时间,需要购买非假期服务才能进行预约。");
|
|
|
- return "weixin/library/bangding_infor";
|
|
|
- }
|
|
|
- }
|
|
|
- if(4==vip.getLevel() || libVipServiceService.isVipIdAndWeekService(id,null)){
|
|
|
- int dayWeek=DateHelper.getday(new Date());//判断是不是周六日
|
|
|
- if(dayWeek>1&& dayWeek<6){
|
|
|
- model.addAttribute("msgType", vip.getChildName()+"妈妈/爸爸,您好。<br/>本卡仅限周末使用,可免预约周末到馆外借图书,但因周末馆内场地有限,需提前预约确认能否周末到馆阅读。");
|
|
|
- return "weixin/library/bangding_infor";
|
|
|
- }
|
|
|
- }
|
|
|
- //查询是否已预约--已预约--跳预约详情页面--否跳预约页面
|
|
|
- TbLibSubscribe sub = subService.findByVipIdAndStat(vip.getId(),"1");
|
|
|
- if(sub != null && sub.getOrderTime() != null){
|
|
|
- model.addAttribute("vip", vip);
|
|
|
- model.addAttribute("sub",sub);
|
|
|
- model.addAttribute("isOrder", "1"); //已预约
|
|
|
- return "weixin/library/orderView";
|
|
|
- }else{
|
|
|
- List<Map<String, Object>> serviceList = libVipServiceService.findUserServiceList(id,vipService.getLibId());
|
|
|
- //本周借阅情况
|
|
|
- Map<String, Object> weekReadInfo = subService.findWeekReadInfo(id);
|
|
|
- Integer countVip = libVipServiceService.getVipIdZXServiceCount(id,vipService.getLibId());
|
|
|
- if(countVip == 0){
|
|
|
- model.addAttribute("workInfo", null);
|
|
|
- model.addAttribute("workSug", null);
|
|
|
- }else{
|
|
|
- Map<String, Object> workInfo = subService.findworkInfo(id,vipService.getLibId());
|
|
|
- Map<String, Object> workSug = subService.findWorkSug(id);
|
|
|
- model.addAttribute("workInfo", workInfo);
|
|
|
- model.addAttribute("workSug", workSug);
|
|
|
- }
|
|
|
- //作业反馈
|
|
|
-
|
|
|
-
|
|
|
- //查询一个该馆的管理员
|
|
|
- Map<String, Object> managerMap = subService.findOneManager(tbLibJoin.getId());
|
|
|
-
|
|
|
- model.addAttribute("sub",new TbLibSubscribe());
|
|
|
- model.addAttribute("vip", vip);
|
|
|
- model.addAttribute("isOrder", "2"); //未预约
|
|
|
- model.addAttribute("join", tbLibJoin);
|
|
|
- model.addAttribute("managerMap", managerMap);
|
|
|
- model.addAttribute("serviceList", serviceList); //未预约
|
|
|
- model.addAttribute("weekReadInfo", weekReadInfo);
|
|
|
- return "weixin/library/order/parentsign";
|
|
|
- }
|
|
|
- }else{
|
|
|
- model.addAttribute("msgType", "尊敬的用户!您还没有购买图书馆的相关服务,无法进行操作!");
|
|
|
- return "weixin/library/bangding_infor";
|
|
|
- }
|
|
|
+ List<Map<String, Object>> serviceList = libVipServiceService.findUserServiceList(id,manager.getLibId());
|
|
|
+ //本周借阅情况
|
|
|
+ Map<String, Object> weekReadInfo = subService.findWeekReadInfo(id);
|
|
|
+ //用户侦测说明
|
|
|
+ TbTyZyb tyzyb = tyzybService.findByAnyCondition(vip.getUserId());
|
|
|
+ model.addAttribute("tyzyb", tyzyb);
|
|
|
+ model.addAttribute("serviceList", serviceList);
|
|
|
+ model.addAttribute("weekReadInfo", weekReadInfo);
|
|
|
+ model.addAttribute("vip", vip);
|
|
|
+ model.addAttribute("libtype", manager.getLibtype());
|
|
|
+ TbLibSubscribe sub = subService.findByVipIdAndStat(vip.getId(),"1");
|
|
|
+ if(sub != null ){
|
|
|
+ //离馆 签离
|
|
|
+ model.addAttribute("vip", vip);
|
|
|
+ model.addAttribute("subId", sub.getId());
|
|
|
+ model.addAttribute("siginout", "1");
|
|
|
}else{
|
|
|
- //提示已绑定
|
|
|
- model.addAttribute("msgType", "尊敬的用户!此卡已经绑定,如果有需要请联系图书馆管理员!");
|
|
|
- return "weixin/library/bangding_infor";
|
|
|
+ //确认到馆操作 签到
|
|
|
+ model.addAttribute("orderUser", vip);
|
|
|
+ model.addAttribute("subId", "");
|
|
|
+ //是否签离 1、是,2否
|
|
|
+ model.addAttribute("siginout", "2");
|
|
|
}
|
|
|
- }else{ // 绑定用户
|
|
|
- //先判断改卡是否有服务,
|
|
|
- //判断是否有服务
|
|
|
- LibVipService vipser = libVipServiceService.getVipIdService(id);
|
|
|
- if(vipser!=null){
|
|
|
- //跳转到激活
|
|
|
- TbLibJoin tbLibJoin=joinService.getById(vipser.getLibId());
|
|
|
- String school =cnAreaService.getLocationArea(tbLibJoin.getLeagueLat(), tbLibJoin.getLeagueLng(), 4);
|
|
|
- model.addAttribute("school", school);
|
|
|
- model.addAttribute("tbLibJoin", tbLibJoin);
|
|
|
- model.addAttribute("type", 0);//0代购后激活
|
|
|
- model.addAttribute("user", user);
|
|
|
- model.addAttribute("vipId", id);
|
|
|
- model.addAttribute("grade", sortService.getParamValByCode("grade"));//年级
|
|
|
- return "weixin/vip/activateCard";
|
|
|
- }
|
|
|
- model.addAttribute("vipId", id);
|
|
|
- if(5==vip.getLevel()){
|
|
|
- model.addAttribute("type", 2);//自己购卡,定位
|
|
|
- return "weixin/vip/location";
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- if(4==vip.getLevel()){
|
|
|
- //用户自己扫卡支付联名卡
|
|
|
- if(vip.getOrderUser() != null && DateHelper.daysOfTian(new Date(),vip.getOrderTime())< 2){
|
|
|
- //跳过定位
|
|
|
- LibStaffing libStaffing2 = libStaffingService.findByUserIdAndType(vip.getOrderUser(),"s_qd");
|
|
|
- return "forward:/weixin/payment/lxVipBuy_"+libStaffing2.getLibId()+".html?vipId="+id+"&type=0";
|
|
|
- }else{
|
|
|
- model.addAttribute("type", 1);//自己购卡,定位
|
|
|
- return "weixin/vip/lxLocation";
|
|
|
- }
|
|
|
+ Integer ptCount2 = libVipServiceService.getVipIdPTServiceCount(id,manager.getLibId());
|
|
|
+ model.addAttribute("islib", ptCount2 == 0?"1":"2");
|
|
|
+ //是否签离 1、是,2否
|
|
|
+ return "weixin/library/order/salessign";
|
|
|
|
|
|
+ }else{
|
|
|
+ //不是管理员,用户自己
|
|
|
+ if(!vip.getUserId().equals(user.getId())){
|
|
|
+ model.addAttribute("msgType", "您好,此卡已被其他人激活,请联系管理员!");
|
|
|
+ return "weixin/library/bangding_infor";
|
|
|
}
|
|
|
- if(vip.getOrderUser() != null && DateHelper.daysOfTian(new Date(),vip.getOrderTime())< 2){
|
|
|
- //跳过定位
|
|
|
- LibStaffing libStaffing3 = libStaffingService.findByUserIdAndType(vip.getOrderUser(),"s_qd");
|
|
|
- return "forward:/weixin/payment/vipCardSales_"+libStaffing3.getLibId()+".html?vipId="+id+"&salesId="+vip.getOrderUser()+"&type=0";
|
|
|
- }else{
|
|
|
- model.addAttribute("type", 1);//自己购卡,定位
|
|
|
- return "weixin/vip/location";
|
|
|
+ //查询是否已预约--已预约--跳预约详情页面--否跳预约页面
|
|
|
+ TbLibSubscribe sub = subService.findByVipIdAndStat(vip.getId(),"1");
|
|
|
+ if(sub != null && sub.getOrderTime() != null){
|
|
|
+ model.addAttribute("vip", vip);
|
|
|
+ model.addAttribute("sub",sub);
|
|
|
+ model.addAttribute("isOrder", "1"); //已预约
|
|
|
+ return "weixin/library/orderView";
|
|
|
+ }else {
|
|
|
+ LibVipService vipService = libVipServiceService.getVipIdService(id);
|
|
|
+ List<Map<String, Object>> serviceList = libVipServiceService.findUserServiceList(id, vipService.getLibId());
|
|
|
+ //本周借阅情况
|
|
|
+ Map<String, Object> weekReadInfo = subService.findWeekReadInfo(id);
|
|
|
+ Integer countVip = libVipServiceService.getVipIdZXServiceCount(id, vipService.getLibId());
|
|
|
+ if (countVip == 0) {
|
|
|
+ model.addAttribute("workInfo", null);
|
|
|
+ model.addAttribute("workSug", null);
|
|
|
+ } else {
|
|
|
+ Map<String, Object> workInfo = subService.findworkInfo(id, vipService.getLibId());
|
|
|
+ Map<String, Object> workSug = subService.findWorkSug(id);
|
|
|
+ model.addAttribute("workInfo", workInfo);
|
|
|
+ model.addAttribute("workSug", workSug);
|
|
|
+ }
|
|
|
+ //作业反馈
|
|
|
+
|
|
|
+ TbLibJoin tbLibJoin = joinService.getById(vipService.getLibId());
|
|
|
+ //查询一个该馆的管理员
|
|
|
+ Map<String, Object> managerMap = subService.findOneManager(tbLibJoin.getId());
|
|
|
+
|
|
|
+ model.addAttribute("sub", new TbLibSubscribe());
|
|
|
+ model.addAttribute("vip", vip);
|
|
|
+ model.addAttribute("isOrder", "2");
|
|
|
+ model.addAttribute("join", tbLibJoin);
|
|
|
+ model.addAttribute("managerMap", managerMap);
|
|
|
+ model.addAttribute("serviceList", serviceList);
|
|
|
+ model.addAttribute("weekReadInfo", weekReadInfo);
|
|
|
+ return "weixin/library/order/parentsign";
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -524,15 +298,6 @@ public class LibVipController extends BaseController {
|
|
|
TbLibSubscribe sub = new TbLibSubscribe();
|
|
|
if(subId != null && !"".equals(subId) && !"undefined".equals(subId)){
|
|
|
sub = subService.getById(subId);
|
|
|
-
|
|
|
- //签离需要老师编辑完成,即对应zuoybStudentPush的type需要为2或3
|
|
|
-// ZuoybStudentPush zuoybStudentPush = zuoybStudentPushSerivce.findByVipIdAndDate(vipId, DateUtil.format_yyyyMMddHHmmss(sub.getCreateTime()));
|
|
|
-// Integer type = zuoybStudentPush.getType();
|
|
|
-// if (type != 2 && type != 3) {
|
|
|
-// logger.info("老师编辑未完成,不可签离,zuoybStudentPush=" + zuoybStudentPush);
|
|
|
-// response.failure("老师编辑未完成,不可签离");
|
|
|
-// return response;
|
|
|
-// }
|
|
|
}
|
|
|
|
|
|
//确认离馆操作
|