| | |
| | | import com.dsh.account.model.vo.CoachChangeStateVO; |
| | | import com.dsh.account.model.vo.CoachSerchVO; |
| | | import com.dsh.account.service.CoachService; |
| | | import io.swagger.models.auth.In; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | public List<Coach> queryCoachListByName(@RequestBody String name){ |
| | | return service.list(new QueryWrapper<Coach>().like("name",name)); |
| | | } |
| | | /**根据运营商id查询教练 |
| | | */ |
| | | @PostMapping("/coach/queryCoachByOperatorId") |
| | | @ResponseBody |
| | | public List<Coach> queryCoachByOperatorId(@RequestBody Integer operatorId){ |
| | | return service.list(new QueryWrapper<Coach>().eq("cityManagerId",operatorId)); |
| | | } |
| | | |
| | | /** |
| | | * 获取教练列表数据 |
| | |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id)); |
| | | return list.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | } |
| | | @PostMapping("/student/getUserYys") |
| | | @ResponseBody |
| | | public List<Integer> getUserYys(@RequestBody Integer id){ |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id)); |
| | | return list.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/student/getUserPtVip") |
| | | public List<Integer> getUserPtVip(){ |
| | |
| | | try { |
| | | return parseToDate(formatDateTimetoString(getSystemDate(), fmtstr)); |
| | | } catch (Exception e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | return getSystemDate(); |
| | | } |
| | |
| | | } catch (BadPaddingException e) { |
| | | e.printStackTrace(); |
| | | } catch (NoSuchProviderException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } catch (Exception e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | |
| | | try { |
| | | return parseToDate(formatDateTimetoString(getSystemDate(), fmtstr)); |
| | | } catch (Exception e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | return getSystemDate(); |
| | | } |
| | |
| | | try { |
| | | return parseToDate(formatDateTimetoString(getSystemDate(), fmtstr)); |
| | | } catch (Exception e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | return getSystemDate(); |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | @RequestMapping("/coursePackageType/getByCourseIds") |
| | | public List<TCoursePackageType> getByCourseIds(@RequestBody List<Integer> ids){ |
| | | if (ids.size()==0){ |
| | | return new ArrayList<>(); |
| | | } |
| | | return coursePackageTypeService.list(new QueryWrapper<TCoursePackageType>().in("id",ids)); |
| | | } |
| | | /** |
| | |
| | | try { |
| | | return parseToDate(formatDateTimetoString(getSystemDate(), fmtstr)); |
| | | } catch (Exception e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | return getSystemDate(); |
| | | } |
| | |
| | | |
| | | // @Override |
| | | // protected void channelRead(ChannelHandlerContext ctx, String msg) throws Exception { |
| | | // // TODO Auto-generated method stub |
| | | // InetSocketAddress insocket = (InetSocketAddress) ctx.channel().remoteAddress(); |
| | | // if(isdebug) { |
| | | // System.out.println(insocket.getAddress() + ": 收到客户端数据......."); |
| | |
| | | System.err.println("调用driver-server添加司机在线数据出错了"); |
| | | } |
| | | |
| | | //TODO 存储最后一次上传的时间(用于保证车载端断电后1小时自动下班) |
| | | if(StringUtil.isNotEmpty(device) && device.equals("carDevice")){ |
| | | redisUtil.setStrValue("DEVICE_" + userId1, String.valueOf(System.currentTimeMillis())); |
| | | |
| | |
| | | |
| | | @PostMapping("/student/getUserStore") |
| | | List<Integer> getUserStore(Integer id); |
| | | @PostMapping("/student/getUserYys") |
| | | List<Integer> getUserYys(Integer id); |
| | | @PostMapping("/student/getUserPtVip") |
| | | List<Integer> getUserPtVip(); |
| | | |
| | |
| | | @FeignClient("mb-cloud-account") |
| | | public interface CoachClient { |
| | | |
| | | |
| | | /**根据运营商id查询教练 |
| | | */ |
| | | @PostMapping("/coach/queryCoachByOperatorId") |
| | | List<Coach> queryCoachByOperatorId(@RequestBody Integer operatorId); |
| | | /** |
| | | * 上/下架、删除常见问题 type=1为上架 2为下架 3为删除 |
| | | */ |
| | |
| | | public interface EvaluationMapper extends BaseMapper<TEvaluation> { |
| | | |
| | | |
| | | List<TEvaluationListVo> listAll(@Param("page") Page<TEvaluationListVo> page, @Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode, @Param("name") String name, @Param("phone") String phone, @Param("shopName") String shopName); |
| | | List<TEvaluationListVo> listAll(@Param("page") Page<TEvaluationListVo> page, @Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode, @Param("name") String name, @Param("phone") String phone, @Param("shopName") String shopName, @Param("operatorId") List<Integer> operatorId); |
| | | |
| | | TEvaluationListVo info(@Param("id") Integer id); |
| | | } |
| | |
| | | try { |
| | | return parseToDate(formatDateTimetoString(getSystemDate(), fmtstr)); |
| | | } catch (Exception e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | return getSystemDate(); |
| | | } |
| | |
| | | List<Coach> list1=coachClient.getProvince(); |
| | | CoachQuery coachQuery = new CoachQuery(); |
| | | List<CoachSerchVO> data = coachClient.listAll(coachQuery); |
| | | |
| | | List<String> province = new ArrayList<>(); |
| | | |
| | | for (CoachSerchVO coach : data) { |
| | | province.add(coach.getProvince()); |
| | | } |
| | | HashSet<String> set = new HashSet<String>(province); |
| | | |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("data",data); |
| | |
| | | CoachQuery coachQuery = new CoachQuery(); |
| | | List<CoachSerchVO> data = coachClient.listAll(coachQuery); |
| | | List<CoachType> list = coachTypeClient.list(); |
| | | |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("data",data); |
| | |
| | | model.addAttribute("coachType",list); |
| | | return PREFIX + "TCoach_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 添加教练 |
| | | */ |
| | |
| | | public ResultUtil addCoach(@RequestBody Coach coach) { |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | if (UserExt.getUser().getObjectType() == 2){ |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(objectId); |
| | | coach.setProvince(cityManager.getProvince()); |
| | | coach.setProvinceCode(cityManager.getProvinceCode()); |
| | | coach.setCity(cityManager.getCity()); |
| | | coach.setCityCode(cityManager.getCityCode()); |
| | | coach.setCityManagerId(objectId); |
| | | } |
| | | if (coach.getDiploma().equals("")) { |
| | |
| | | coachClient.changeState(vo); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | /** |
| | | * 跳转修改教练页面 |
| | | */ |
| | |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | if (roleType==2){ |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | List<TStore> operatorId = storeService.list(new QueryWrapper<TStore>().eq("operatorId", objectId)); |
| | | model.addAttribute("stores",operatorId); |
| | | }else{ |
| | | model.addAttribute("stores",new ArrayList<>()); |
| | | } |
| | | // 获取所有课包类型 |
| | | List<TCoursePackageType> tCoursePackageTypes = coursePackageTypeClient.queryAllCoursePackageType(); |
| | | model.addAttribute("roleType",roleType); |
| | | model.addAttribute("coursePackageType",tCoursePackageTypes); |
| | | return PREFIX + "cpPayment_add.html"; |
| | | } |
| | | /** |
| | |
| | | List<QueryAppUserVO> queryAppUserVOS = appUserClient.listAll(queryAppUser); |
| | | for (QueryAppUserVO queryAppUserVO : queryAppUserVOS) { |
| | | if (queryAppUserVO.getSalesmanUserId()!=null){ |
| | | queryAppUserVO.setSalesmanUserName(userService.getById(queryAppUserVO.getSalesmanUserId()).getName()); |
| | | User byId = userService.getById(queryAppUserVO.getSalesmanUserId()); |
| | | if (byId!=null){ |
| | | queryAppUserVO.setSalesmanUserName(byId.getName()); |
| | | } |
| | | } |
| | | } |
| | | if (salesmanUserName!=null && (!salesmanUserName.equals(""))){ |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | |
| | | import com.dsh.course.feignClient.account.model.Coach; |
| | | import com.dsh.course.feignClient.course.*; |
| | | import com.dsh.course.feignClient.course.model.*; |
| | | import com.dsh.course.feignClient.other.model.Site; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.TSite; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.model.dto.SelectDto; |
| | | import com.dsh.guns.modular.system.service.ICoursePackageService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITSiteService; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import io.swagger.models.auth.In; |
| | | import org.aspectj.weaver.ast.Var; |
| | |
| | | @Resource |
| | | private CoursePackageClient coursePackageClient; |
| | | |
| | | |
| | | @Autowired |
| | | private TOperatorService tOperatorService; |
| | | @Autowired |
| | | private TOperatorCityService tOperatorCityService; |
| | | |
| | | |
| | | /** |
| | |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @Autowired |
| | | private ICityService cityService; |
| | | @GetMapping("/openAddCoursePackage") |
| | | public String openAddCoursePackage(Model model,Integer type){ |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | List<TCoursePackageType> tCoursePackageTypes = coursePackageTypeClient.queryAllCoursePackageType(); |
| | | model.addAttribute("coursePackageType", tCoursePackageTypes); |
| | | String cityCode = null; |
| | | String cityCode = ""; |
| | | if(objectType == 2){//城市管理员 |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(objectId); |
| | | if (cityManager!=null){ |
| | | cityCode = cityManager.getCityCode(); |
| | | // 获取到这个运营商下面的所有门店 |
| | | List<TStore> operatorId = storeService.list(new QueryWrapper<TStore>().eq("operatorId",objectId)); |
| | | model.addAttribute("store", operatorId); |
| | | List<Coach> coach = coachClient.queryCoachByOperatorId(objectId); |
| | | model.addAttribute("coach", coach); |
| | | // 如果该运营商下面没有门店 |
| | | if (operatorId.size()==0){ |
| | | List<TStore> o = new ArrayList<>(); |
| | | List<TSite> tSites = new ArrayList<>(); |
| | | model.addAttribute("store", o); |
| | | model.addAttribute("site", tSites); |
| | | }else{ |
| | | List<TSite> storeId = siteService.list(new QueryWrapper<TSite>() |
| | | .eq("storeId", operatorId.get(0).getId())); |
| | | model.addAttribute("site", storeId); |
| | | } |
| | | }else{ |
| | | List<Map<String, Object>> list = storeService.queryProvince(cityCode); |
| | | model.addAttribute("province", list); |
| | | Object code = list.get(0).get("code"); |
| | | List<Map<String, Object>> list1 = storeService.queryCity(code.toString(), cityCode); |
| | | model.addAttribute("city", list1); |
| | | String code1 = list1.get(0).get("code").toString(); |
| | | List<TStore> list2 = storeService.list(new QueryWrapper<TStore>().eq("cityCode", code1).eq("state", 1)); |
| | | model.addAttribute("store", list2); |
| | | TStore store = list2.get(0); |
| | | List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", store.getId()).eq("state", 1)); |
| | | model.addAttribute("site", list3); |
| | | List<Coach> coaches = coachClient.queryCoachByCity(code1); |
| | | model.addAttribute("coach", coaches); |
| | | System.out.println("========type========"+type); |
| | | } |
| | | List<Map<String, Object>> list = storeService.queryProvince(cityCode); |
| | | model.addAttribute("province", list); |
| | | Object code = list.get(0).get("code"); |
| | | List<Map<String, Object>> list1 = storeService.queryCity(code.toString(), cityCode); |
| | | model.addAttribute("city", list1); |
| | | String code1 = list1.get(0).get("code").toString(); |
| | | List<TStore> list2 = storeService.list(new QueryWrapper<TStore>().eq("cityCode", code1).eq("state", 1)); |
| | | model.addAttribute("store", list2); |
| | | TStore store = list2.get(0); |
| | | List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", store.getId()).eq("state", 1)); |
| | | model.addAttribute("site", list3); |
| | | List<Coach> coaches = coachClient.queryCoachByCity(code1); |
| | | model.addAttribute("coach", coaches); |
| | | |
| | | |
| | | model.addAttribute("type",type); |
| | | model.addAttribute("objectType",objectType); |
| | | System.out.println("========type========"+type); |
| | | model.addAttribute("type",type); |
| | | // if (type ==1){ |
| | | // return PREFIX + "coursePackage_edit.html"; |
| | | // } |
| | |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityClient; |
| | | import com.dsh.course.feignClient.account.model.CityListQuery; |
| | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 车辆管理控制器 |
| | |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String provinceCode, String cityCode ,String shopName, String name, String phone) { |
| | | List<Integer> operatorId = new ArrayList<>(); |
| | | if (UserExt.getUser().getObjectType()==2){ |
| | | operatorId = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId", UserExt.getUser().getObjectId())) |
| | | .stream().map(TStore::getId).collect(Collectors.toList()); |
| | | } |
| | | if (UserExt.getUser().getObjectType()==3){ |
| | | operatorId.add(UserExt.getUser().getObjectId()); |
| | | } |
| | | Page<TEvaluationListVo> page = new PageFactory<TEvaluationListVo>().defaultPage(); |
| | | List<TEvaluationListVo> list = evaluationService.listAll(page,provinceCode,cityCode,name,phone,shopName); |
| | | List<TEvaluationListVo> list = evaluationService.listAll(page,provinceCode,cityCode,name,phone,shopName,operatorId); |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | |
| | | @ResponseBody |
| | | public Object GoodsWriteOff(Integer id){ |
| | | System.out.println(id); |
| | | // TODO: 2023/8/15 核销操作 |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.bouncycastle.math.raw.Mod; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpRequest; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | public String index(Model model) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | model.addAttribute("objectType",objectType); |
| | | return PREFIX + "tStudent.html"; |
| | | } |
| | | |
| | |
| | | } |
| | | search.setIds(ids); |
| | | } |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | ids = appUserClient.getUserYYs(UserExt.getUser().getObjectId()); |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | | } |
| | | search.setIds(ids); |
| | | } |
| | | System.out.println("============学员查询接口========="); |
| | | return itStudentService.listAll(search); |
| | | } |
| | |
| | | public interface IEvaluationService extends IService<TEvaluation> { |
| | | |
| | | |
| | | List<TEvaluationListVo> listAll(Page<TEvaluationListVo> page, String provinceCode, String cityCode, String name, String phone, String shopName); |
| | | List<TEvaluationListVo> listAll(Page<TEvaluationListVo> page, String provinceCode, String cityCode, String name, String phone, String shopName,List<Integer> operatorId); |
| | | |
| | | TEvaluationListVo info(Integer id); |
| | | |
| | |
| | | private AppUserClient appUserClient; |
| | | |
| | | @Override |
| | | public List<TEvaluationListVo> listAll(Page<TEvaluationListVo> page, String provinceCode, String cityCode, String name, String phone, String shopName) { |
| | | public List<TEvaluationListVo> listAll(Page<TEvaluationListVo> page, String provinceCode, String cityCode, String name, String phone, String shopName,List<Integer >operatorId) { |
| | | List<TAppUser> list = appUserClient.queryByNamePhone(new QueryByNamePhone(name,phone)); |
| | | if(list.size()==0){ |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | List<TEvaluationListVo> tEvaluationListVos = this.baseMapper.listAll(page, provinceCode, cityCode, name, phone, shopName); |
| | | List<TEvaluationListVo> tEvaluationListVos = this.baseMapper.listAll(page, provinceCode, cityCode, name, phone, shopName,operatorId); |
| | | for (TEvaluationListVo tEvaluationListVo : tEvaluationListVos) { |
| | | for (TAppUser tAppUser : list) { |
| | | if(tEvaluationListVo.getAppUserId().equals(tAppUser.getId())){ |
| | |
| | | public class TimeException extends Exception { |
| | | |
| | | /** |
| | | * TODO |
| | | */ |
| | | private static final long serialVersionUID = 5703430073981692250L; |
| | | |
| | |
| | | <if test="name!=null and name !=''"> |
| | | and t2.name like concat("%",#{name},"%") |
| | | </if> |
| | | <if test="operatorId != null and operatorId.size()>0"> |
| | | AND t1.storeId IN |
| | | <foreach collection="operatorId" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | <select id="info" resultType="com.dsh.guns.modular.system.model.TEvaluationListVo"> |
| | | select t1.id,t1.appUserId,t1.score,t1.insertTime time,t1.imgs,t1.content,t2.name shopName,t2.province pName,t2.city cName from t_store_evaluation t1 left join t_store t2 on t1.storeId =t2.id |
| | |
| | | <div class="row"> |
| | | <div class="form-group"> |
| | | <input type="hidden" value="${type}" id="type" name="type"> |
| | | <input type="hidden" value="${objectType}" id="objectType" name="type"> |
| | | @if(objectType==1){ |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-4"> |
| | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <h2>选择课包信息</h2> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | @if(roleType==1){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(roleType !=3){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="store" name="store" onchange="TCompetition.nextStore(this)" > |
| | | <select style="width: 300px" class="form-control" id="store" name="store" > |
| | | <option value="">选择门店</option> |
| | | </select> |
| | | </div> |
| | |
| | | <label class="col-sm-3 control-label">*课包类型:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="coursePackageType" name="store" onchange="TCompetition.getCoursePackage(this)" > |
| | | <option value="">选择课包类型</option> |
| | | @for(obj in coursePackageType){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课包名称:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="role" value="${role}"> |
| | | @if(objectType==1){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(objectType==1){ |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(objectType==1){ |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*所属账号:</label> |
| | |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | @if(objectType ==1){ |
| | | |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="province" name="省份" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="city" name="城市" /> |
| | | </div> |
| | | @} |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="姓名" /> |
| | | </div> |
| | |
| | | if (defaultExpandAll) { |
| | | this.states.expandRows = data.slice(); |
| | | } else if (rowKey) { |
| | | // TODO:这里的代码可以优化 |
| | | var expandRowsMap = getKeysMap(expandRows, rowKey); |
| | | this.states.expandRows = data.reduce(function (prev, row) { |
| | | var rowId = getRowIdentity(row, rowKey); |
| | |
| | | couponIds: typeof counpons == "undefined" ? 0 : counpons |
| | | }); |
| | | }); |
| | | if(null == provinceCode || '' == provinceCode){ |
| | | Feng.error("所在省不能为空"); |
| | | return |
| | | let objectType= $('#objectType').val(); |
| | | if (objectType==1){ |
| | | if(null == provinceCode || '' == provinceCode){ |
| | | Feng.error("所在省不能为空"); |
| | | return |
| | | } |
| | | if(null == cityCode || '' == cityCode){ |
| | | Feng.error("所在市不能为空"); |
| | | return |
| | | } |
| | | } |
| | | if(null == cityCode || '' == cityCode){ |
| | | Feng.error("所在市不能为空"); |
| | | return |
| | | } |
| | | |
| | | if(null == storeId || '' == storeId){ |
| | | Feng.error("所属门店不能为空"); |
| | | return |
| | |
| | | var content = "<option value=''>请选择</option>"; |
| | | var ajax = new $ax(Feng.ctxPath + "/coursePackage/getCoursePackageByStoreId", function(data){ |
| | | if(data!=null){ |
| | | |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | |
| | | TCompetition.getCoursePackage = function (e) { |
| | | var oneId=$(e).val(); |
| | | console.log(oneId) |
| | | var type = $("#coursePackageType").val(); |
| | | var content = "<option value=''>请选择</option>"; |
| | | var ajax = new $ax(Feng.ctxPath + "/coursePackage/getCoursePackageByType", function(data){ |
| | | if(data!=null){ |
| | |
| | | } |
| | | }); |
| | | ajax.set("storeId",oneId); |
| | | ajax.set("courseType",type); |
| | | ajax.start(); |
| | | }; |
| | | TCompetition.getCoursePackageConfig = function (e) { |
| | |
| | | |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: "添加场地", |
| | | title: "添加教练", |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | |
| | | |
| | | data.halfName= halfName; |
| | | data.ids= $("#ids").val(); |
| | | let introduce = TSite.editor.getContent(); |
| | | |
| | | |
| | | let introduce ; |
| | | if (objectType==1){ |
| | | introduce = TSite.editor.getContent(); |
| | | } |
| | | |
| | | console.log(introduce) |
| | | if(introduce==""){ |
| | |
| | | |
| | | |
| | | var goodImgs = this.goodsPicArray; |
| | | if(goodImgs.length==0){ |
| | | Feng.info("请上传实景图") |
| | | return; |
| | | if(objectType==1){ |
| | | if(goodImgs.length==0){ |
| | | Feng.info("请上传实景图") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | var imgOne =""; |
| | | for (let i = 0; i <goodImgs.length; i++) { |
| | | if(i==goodImgs.length-1){ |
| | |
| | | try { |
| | | return parseToDate(formatDateTimetoString(getSystemDate(), fmtstr)); |
| | | } catch (Exception e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | return getSystemDate(); |
| | | } |
| | |
| | | } |
| | | return new String(buf); |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | return null; |
| | | } |
| | | } |