Merge remote-tracking branch 'origin/master'
| | |
| | | @RequestMapping("/base/appUser/listAll") |
| | | public List<QueryAppUserVO> listAll(@RequestBody QueryAppUser query){ |
| | | List<QueryAppUserVO> queryAppUserVOS = appUserService.listAll(query); |
| | | ArrayList<QueryAppUserVO> res = new ArrayList<>(); |
| | | |
| | | if (query.getUserIds()!=null && query.getUserIds().size()!=0){ |
| | | List<QueryAppUserVO> queryAppUserVOS1 = appUserService.listAll1(query); |
| | | queryAppUserVOS.addAll(queryAppUserVOS1); |
| | | } |
| | | return queryAppUserVOS.stream().distinct().collect(Collectors.toList()); |
| | | List<QueryAppUserVO> collect = queryAppUserVOS.stream().distinct().collect(Collectors.toList()); |
| | | for (QueryAppUserVO vo : collect) { |
| | | // 会员到期时间小于当前时间或者会员到期时间为null 则会员过期 |
| | | if (vo.getVipEndTime()!=null && vo.getVipEndTime().after(new Date())){ |
| | | vo.setIsVip(1); |
| | | }else{ |
| | | vo.setIsVip(0); |
| | | } |
| | | if (query.getIsVip() != null && (!query.getIsVip().equals("")) ){ |
| | | if (vo.getIsVip() == query.getIsVip()){ |
| | | res.add(vo); |
| | | } |
| | | }else{ |
| | | res.add(vo); |
| | | } |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | /** |
| | |
| | | <if test="query.phone!=null and query.phone!= ''"> |
| | | and t1.phone LIKE concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.isVip!=null and query.isVip!= ''"> |
| | | and t1.isVip = #{query.isVip} |
| | | </if> |
| | | <if test="query.salesmanUser!=null and query.salesmanUser!= ''"> |
| | | and t1.salesmanUserId = #{query.salesmanUser} |
| | | </if> |
| | |
| | | case 1: |
| | | coupon.setIntegral(BigDecimal.valueOf(dataVo.getRequiredPoints())); |
| | | break; |
| | | case 2: |
| | | coupon.setCash(dataVo.getRequiredCash()); |
| | | coupon.setIntegral(BigDecimal.valueOf(dataVo.getRequiredPoints())); |
| | | break; |
| | | |
| | | case 3: |
| | | coupon.setCash(dataVo.getRequiredCash()); |
| | | break; |
| | |
| | | userPopulation, |
| | | quantityIssued, |
| | | pickUpQuantity, |
| | | auditStatus |
| | | auditStatus, |
| | | publisherType, |
| | | cityManagerId |
| | | from t_coupon |
| | | where auditStatus != 2 |
| | | <if test="name != null"> |
| | |
| | | |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.poi.excel.ExcelUtil; |
| | | 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 javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.io.PrintWriter; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletionService; |
| | |
| | | return null; |
| | | } |
| | | } |
| | | @PostMapping("/base/competition/getPeoples") |
| | | @ResponseBody |
| | | public List<CompetitionUser> getPeoples(@RequestBody GetPeopleQuery getPeopleQuery){ |
| | | List<CompetitionUser> list = participantService.getPeoples( |
| | | getPeopleQuery.getId(),getPeopleQuery.getState()); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | map.put("monthsUser",monthsUser); |
| | | |
| | | return map; |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | import com.dsh.competition.feignclient.model.CompetitionUser; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/6 16:51 |
| | | */ |
| | | public interface ParticipantMapper extends BaseMapper<Participant> { |
| | | Page<CompetitionUser> getPeopleFromId(@Param("participantPage") Page<UserCompetition> participantPage, @Param("id") Integer id, @Param("state") Integer state); |
| | | List<CompetitionUser> getPeoples(@Param("id") Integer id, @Param("state") Integer state); |
| | | } |
| | |
| | | void saveParticipant(SaveParticipant saveParticipant) throws Exception; |
| | | |
| | | Page<CompetitionUser> getPeopleFromId(Page<UserCompetition> participantPage, Integer id, Integer state); |
| | | |
| | | List<CompetitionUser> getPeoples(Integer id, Integer state); |
| | | } |
| | |
| | | public Page<CompetitionUser> getPeopleFromId(Page<UserCompetition> participantPage, Integer id, Integer state) { |
| | | return this.baseMapper.getPeopleFromId(participantPage,id,state); |
| | | } |
| | | |
| | | @Override |
| | | public List<CompetitionUser> getPeoples(Integer id, Integer state) { |
| | | return this.baseMapper.getPeoples(id,state); |
| | | } |
| | | } |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.competition.mapper.ParticipantMapper"> |
| | | <select id="getPeopleFromId" resultType="com.dsh.competition.feignclient.model.CompetitionUser"> |
| | | select t2.name,t2.gender sex,t2.phone ,t2.idcard idCard ,t3.payStatus state from t_user_competition t1 left join t_participant t2 on t1.participantId = t2.id left join t_payment_competition t3 on t1.paymentCompetitionId = t3.id |
| | | select t2.id, t2.name,t2.gender sex,t2.phone ,t2.idcard idCard ,t3.payStatus state |
| | | from t_user_competition t1 left join t_participant t2 on t1.participantId = t2.id |
| | | left join t_payment_competition t3 on t1.paymentCompetitionId = t3.id |
| | | where t1.competitionId =#{id} and t2.id is not null and t3.id is not null |
| | | <if test="state !=null and state !='' and state ==1"> |
| | | and t3.payStatus in (1,2) |
| | |
| | | <if test="state !=null and state !='' and state ==3"> |
| | | and t3.payStatus =3 |
| | | </if> |
| | | |
| | | |
| | | |
| | | </select> |
| | | <select id="getPeoples" resultType="com.dsh.competition.feignclient.model.CompetitionUser"> |
| | | select t2.id, t2.name,t2.gender sex,t2.phone ,t2.idcard idCard ,t3.payStatus state |
| | | from t_user_competition t1 left join t_participant t2 on t1.participantId = t2.id |
| | | left join t_payment_competition t3 on t1.paymentCompetitionId = t3.id |
| | | where t1.competitionId =#{id} and t2.id is not null and t3.id is not null |
| | | <if test="state !=null and state !='' and state ==1"> |
| | | and t3.payStatus in (1,2) |
| | | </if> |
| | | <if test="state !=null and state !='' and state ==3"> |
| | | and t3.payStatus =3 |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | @PostMapping("/coursePackageDiscount/queryCoursePackageDiscount") |
| | | public List<TCoursePackageDiscount> queryCoursePackageDiscount(@RequestBody Integer coursePackagePaymentConfigId){ |
| | | return coursePackageDiscountService.list(new QueryWrapper<TCoursePackageDiscount>().eq("coursePackagePaymentConfigId", coursePackagePaymentConfigId) |
| | | .eq("auditStatus", 2)); |
| | | ); |
| | | } |
| | | |
| | | |
| | |
| | | for (int i = 0; i < tCoursePackageDiscounts.size(); i++) { |
| | | if(tCoursePackageDiscounts.get(i).getType()==1){ |
| | | type += "会员折扣、"; |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==2){ |
| | | type += "续课优惠、"; |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==3){ |
| | | type += "限时折扣、"; |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==4){ |
| | |
| | | } |
| | | List<DiscountList> discountLists = this.baseMapper.queryDiscountList(discountListPage, queryDiscountList.getPCode(), queryDiscountList.getCCode(), queryDiscountList.getName(), queryDiscountList.getType(), queryDiscountList.getIds()); |
| | | for (DiscountList discountList : discountLists) { |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = this.baseMapper.selectList(new LambdaQueryWrapper<TCoursePackageDiscount>().eq(TCoursePackageDiscount::getCoursePackageId, discountList.getCourseId()).eq(TCoursePackageDiscount::getAuditStatus,2).orderByAsc(TCoursePackageDiscount::getType)); |
| | | long count = tCoursePackageDiscounts.stream().filter(e -> e.getStatus().equals(2)).count(); |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = this.baseMapper.selectList |
| | | (new LambdaQueryWrapper<TCoursePackageDiscount>() |
| | | .eq(TCoursePackageDiscount::getCoursePackageId, |
| | | discountList.getCourseId()) |
| | | .orderByAsc(TCoursePackageDiscount::getType)); |
| | | long count = tCoursePackageDiscounts.stream().count(); |
| | | if(count>0){ |
| | | discountList.setStatus(2); |
| | | }else { |
| | |
| | | for (int i = 0; i < tCoursePackageDiscounts.size(); i++) { |
| | | if(tCoursePackageDiscounts.get(i).getType()==1){ |
| | | type += "会员折扣、"; |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==3){ |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==2){ |
| | | type += "续课优惠、"; |
| | | } |
| | | else if(tCoursePackageDiscounts.get(i).getType()==3){ |
| | | type += "限时折扣、"; |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==4){ |
| | | type += "赠送课时、"; |
| | |
| | | select t1.id,t1.type,t1.status,t2.province pName,t2.city cName,t2.name,t2.storeId,t2.id courseId from t_course_package_discount t1 left join t_course_package t2 on t1.coursePackageId = t2.id |
| | | where t2.storeId in <foreach collection="ids" close=")" item="id" open="(" separator=","> |
| | | #{id} |
| | | </foreach> and t1.auditStatus =2 |
| | | </foreach> |
| | | <if test="pCode !=null and pCode !=''"> |
| | | and t2.provinceCode =#{pCode} |
| | | </if> |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="null != item.name and '' != item.name"> |
| | | and a.name line CONCAT('%', #{item.name}, '%') |
| | | and a.name like CONCAT('%', #{item.name}, '%') |
| | | </if> |
| | | <if test="null != item.status"> |
| | | and a.status = #{item.status} |
| | |
| | | void cancel(Integer id); |
| | | @PostMapping("/base/competition/getPeopleFromId") |
| | | Page<CompetitionUser> getPeopleFromId(GetPeopleQuery getPeopleQuery); |
| | | |
| | | @PostMapping("/base/competition/getPeoples") |
| | | List<CompetitionUser> getPeoples(@RequestBody GetPeopleQuery getPeopleQuery); |
| | | @PostMapping("/base/competition/listUser") |
| | | Page<CompetitionUser> listUser(CompetitionUserQuery competitionUserQuery); |
| | | |
| | |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | |
| | | private Date endTime; |
| | | /** |
| | | * 扣除课时数 |
| | | */ |
| | | private Integer needNum; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.guns.core.dataScope.DataScope; |
| | | import com.dsh.guns.modular.system.model.User; |
| | | import com.dsh.guns.modular.system.model.UserListVO; |
| | | import com.dsh.guns.modular.system.model.UserQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | @Param("deptid") Integer deptid, |
| | | @Param("objectType") Integer objectType, |
| | | @Param("objectId") Integer objectId); |
| | | |
| | | List<UserListVO> searchUsers(@Param("query") UserQuery userQuery); |
| | | |
| | | } |
| | |
| | | SimpleDateFormat format = new SimpleDateFormat(timeFrameStart); |
| | | SimpleDateFormat format1 = new SimpleDateFormat(timeFrameEnd); |
| | | try { |
| | | |
| | | // 判断当日时间是否能享受到折扣 |
| | | String startTime = jsonObject.getString("startTime"); |
| | | String endTime = jsonObject.getString("endTime"); |
| | |
| | | } |
| | | // 判断三个折扣 谁所需支付金额最少 |
| | | double minValue = 0.00; |
| | | |
| | | if (c1 != 0.00 && (c2 == 0.00 || c1 < c2) && (c3 == 0.00 || c1 < c3)) { |
| | | minValue = c1; |
| | | } else if (c2 != 0.00 && (c3 == 0.00 || c2 < c3)) { |
| | |
| | | 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.model.TAppUser; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.competition.model.*; |
| | | import com.dsh.guns.config.UserExt; |
| | |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.TOperatorCityService; |
| | | import com.dsh.guns.modular.system.service.TOperatorService; |
| | | import com.dsh.guns.modular.system.util.ExcelUtil; |
| | | import com.dsh.guns.modular.system.util.OBSUploadUtil; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import sun.rmi.runtime.Log; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | /** |
| | | * 导出赛事已报名用户列表 |
| | | */ |
| | | |
| | | @RequestMapping(value = "/export") |
| | | @ResponseBody |
| | | public void exportUserInfo(Integer id, Integer state, HttpServletResponse response) { |
| | | try { |
| | | Competition byId = competitionClient.queryById(id); |
| | | String name = byId.getName(); |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName =name+"报名信息.xls"; |
| | | String[] title = new String[] {"姓名","性别","联系电话","身份证号","状态"}; |
| | | GetPeopleQuery query = new GetPeopleQuery(); |
| | | query.setId(id); |
| | | query.setState(state); |
| | | List<CompetitionUser> list = competitionClient.getPeoples(query); |
| | | String[][] values = new String[list.size()][]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | CompetitionUser d = list.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = d.getName(); |
| | | Integer sex = d.getSex(); |
| | | if(Objects.nonNull(sex)){ |
| | | if(1 == sex){ |
| | | values[i][1] = "男"; |
| | | }else if(2 == sex){ |
| | | values[i][1] = "女"; |
| | | } |
| | | }else { |
| | | values[i][1] = "未知"; |
| | | } |
| | | values[i][2] = d.getPhone(); |
| | | values[i][3] = d.getIdCard(); |
| | | Integer state1 = d.getState(); |
| | | if(1 == state1){ |
| | | values[i][4] = "正常"; |
| | | }else if(2 == state1){ |
| | | values[i][4] = "冻结"; |
| | | }else { |
| | | values[i][4] = "删除"; |
| | | } |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | public Object listUser(@PathVariable Integer id,Integer state) { |
| | | try { |
| | | Page<Object> page = new PageFactory<>().defaultPage(); |
| | | Page<CompetitionUser> data = competitionClient.getPeopleFromId(new GetPeopleQuery(page.getSize(),page.getCurrent(),id,state)); |
| | | Page<CompetitionUser> data = competitionClient.getPeopleFromId |
| | | (new GetPeopleQuery(page.getSize(),page.getCurrent(),id,state)); |
| | | return super.packForBT(data); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.activity.CouponClient; |
| | | import com.dsh.course.feignClient.activity.model.Coupon; |
| | |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.exception.GunsException; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.TOperator; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.User; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.IUserService; |
| | | import com.dsh.guns.modular.system.service.TOperatorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | private CouponClient client; |
| | | @Autowired |
| | | private IUserService userService; |
| | | @Autowired |
| | | private TOperatorService operatorService; |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | |
| | | /** |
| | | * 优惠券审核列表页 |
| | |
| | | ofSearch.setDistributionMethod(distributionMethod); |
| | | ofSearch.setUserPopulation(userPopulation); |
| | | ofSearch.setAuditStatus(auditStatus); |
| | | return client.getCouponExamineListOfSearch(ofSearch); |
| | | List<Map<String, Object>> res = client.getCouponExamineListOfSearch(ofSearch); |
| | | for (Map<String, Object> re : res) { |
| | | if (re.get("publisherType")!=null){ |
| | | |
| | | } |
| | | switch (Integer.valueOf(re.get("publisherType").toString())){ |
| | | case 1: |
| | | // 运营商添加 |
| | | if (re.get("cityManagerId")!=null){ |
| | | TOperator one = operatorService.getOne(new QueryWrapper<TOperator>() |
| | | .eq("id", Integer.valueOf(re.get("cityManagerId").toString()))); |
| | | if (one!=null){ |
| | | User id = userService.getOne(new QueryWrapper<User>().eq("id", one.getUserId())); |
| | | if (id!=null){ |
| | | re.put("account",one.getName()+"-"+id.getPhone()); |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | case 2: |
| | | re.put("account","平台"); |
| | | // 平台添加 |
| | | break; |
| | | case 3: |
| | | // 门店添加 |
| | | if (re.get("cityManagerId")!=null){ |
| | | TStore one = storeService.getOne(new QueryWrapper<TStore>() |
| | | .eq("id", Integer.valueOf(re.get("cityManagerId").toString()))); |
| | | if (one!=null){ |
| | | User id = userService.getOne(new QueryWrapper<User>().eq("id", one.getStoreStaffId())); |
| | | if (id!=null){ |
| | | re.put("account",one.getName()+"-"+id.getPhone()); |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | /** |
| | |
| | | return PREFIX + "coursePackageDiscount.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到报名列表页 |
| | | * @param model |
| | |
| | | model.addAttribute("auditStatus", tCoursePackage.getAuditStatus()); |
| | | |
| | | model.addAttribute("authRemark", tCoursePackage.getAuthRemark()); |
| | | String classStartTime = tCoursePackage.getClassStartTime(); |
| | | String classEndTime = tCoursePackage.getClassEndTime(); |
| | | if (tCoursePackage.getStartTime()!=null) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String dateString = sdf.format(tCoursePackage.getStartTime()); |
| | | String dateString1 = sdf.format(tCoursePackage.getEndTime()); |
| | | model.addAttribute("holi", dateString + " - " + dateString1); |
| | | } |
| | | String[] split1 = classStartTime.split(","); |
| | | String[] split2 = classEndTime.split(","); |
| | | |
| | | model.addAttribute("classTime", tCoursePackage.getClassStartTime() + ":00 - " + tCoursePackage.getClassEndTime() + ":00"); |
| | | List<String> listtime = new ArrayList<>(); |
| | | |
| | | for (int i = 0; i < split1.length; i++) { |
| | | String o = split1[i]+"-"+split2[i]; |
| | | listtime.add(o); |
| | | } |
| | | |
| | | |
| | | model.addAttribute("time1",listtime.remove(0)); |
| | | if (listtime.size()!=0) { |
| | | model.addAttribute("times", listtime); |
| | | } |
| | | model.addAttribute("classTime", |
| | | tCoursePackage.getClassStartTime() + ":00 - " |
| | | + tCoursePackage.getClassEndTime() + ":00"); |
| | | String[] split = tCoursePackage.getClassWeeks().split(";"); |
| | | List<String> list5 = Arrays.asList("周一", "周二", "周三", "周四", "周五", "周六", "周日"); |
| | | List<Map<String, Object>> classWeeks = new ArrayList<>(); |
| | |
| | | model.addAttribute("playPaiCoin", coursePackagePaymentConfig.getPlayPaiCoin() == 0 ? false : true);} |
| | | model.addAttribute("coursePackagePaymentConfig", list4.remove(0)); |
| | | model.addAttribute("coursePackagePaymentConfigs", list4); |
| | | |
| | | Integer type = tCoursePackage.getType(); |
| | | model.addAttribute("type",type); |
| | | return PREFIX + "examineCoursePackage_info.html"; |
| | | } |
| | | |
| | |
| | | @ResponseBody |
| | | @PostMapping("/queryCity") |
| | | public List<Map<String, Object>> queryCity(String code){ |
| | | |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | String cityCode = null; |
| | |
| | | if(objectType == 3) {// 门店 |
| | | storeIds.add(objectId); |
| | | } |
| | | Page<Map<String, Object>> mapPage = coursePackageService.queryCoursePackageLists(provinceCode, cityCode, coursePackageTypeId, storeIds, name, status, state); |
| | | Page<Map<String, Object>> mapPage = coursePackageService.queryCoursePackageLists(provinceCode, |
| | | cityCode, coursePackageTypeId, storeIds, name, status, state); |
| | | return super.packForBT(mapPage); |
| | | } |
| | | |
| | |
| | | private CoursePackageDiscountClient coursePackageDiscountClient; |
| | | @RequestMapping("/info") |
| | | public String info( Integer id, Model model) { |
| | | TCoursePackage tCoursePackage1 = courseClient.queryByDiscountId(id); |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(tCoursePackage1.getId()); |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(id); |
| | | model.addAttribute("item", tCoursePackage); |
| | | List<CoursePackagePaymentConfig> list4 = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | |
| | | map.put("coursePackageDiscount", tCoursePackageDiscounts); |
| | | list.add(map); |
| | | } |
| | | model.addAttribute("role",UserExt.getUser().getObjectType()); |
| | | model.addAttribute("type",tCoursePackage.getType()); |
| | | model.addAttribute("coursePackagePaymentConfig", JSON.toJSONString(list)); |
| | | return PREFIX + "coursePackageDiscount.html"; |
| | | } |
| | | @RequestMapping("/infoOne") |
| | | public String infoOne( Integer id, Model model) { |
| | | Integer state = courseClient.queryDiscountById(id); |
| | | if(state==1){ |
| | | model.addAttribute("stateStr","待审核"); |
| | | model.addAttribute("state",1); |
| | | }else { |
| | | model.addAttribute("stateStr","未通过"); |
| | | model.addAttribute("state",3); |
| | | } |
| | | |
| | | TCoursePackage tCoursePackage1 = courseClient.queryByDiscountId(id); |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(tCoursePackage1.getId()); |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(id); |
| | | model.addAttribute("item", tCoursePackage); |
| | | List<CoursePackagePaymentConfig> list4 = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | // 拒绝理由 |
| | | StringBuilder reasons = new StringBuilder(""); |
| | | for (CoursePackagePaymentConfig coursePackagePaymentConfig : list4) { |
| | | if(coursePackagePaymentConfig.getCashPayment() == 0){ |
| | | continue; |
| | |
| | | } |
| | | map.put("payment", payment); |
| | | map.put("cashPayment", coursePackagePaymentConfig.getCashPayment()); |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = coursePackageDiscountClient.queryCoursePackageDiscountOne(coursePackagePaymentConfig.getId()); |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = coursePackageDiscountClient.queryCoursePackageDiscount(coursePackagePaymentConfig.getId()); |
| | | for (TCoursePackageDiscount tCoursePackageDiscount : tCoursePackageDiscounts) { |
| | | if (tCoursePackageDiscount.getAuditStatus()==3){ |
| | | reasons.append(tCoursePackageDiscount.getAuditRemark()+","); |
| | | model.addAttribute("type1",3); |
| | | }else{ |
| | | model.addAttribute("type1",-1); |
| | | } |
| | | } |
| | | map.put("coursePackageDiscount", tCoursePackageDiscounts); |
| | | list.add(map); |
| | | } |
| | | model.addAttribute("role",UserExt.getUser().getObjectType()); |
| | | Integer type1 = tCoursePackage.getType(); |
| | | // 审核状态 |
| | | StringBuilder stringBuilder = new StringBuilder(""); |
| | | |
| | | switch (type1){ |
| | | case 1: |
| | | stringBuilder.append("待审核"); |
| | | break; |
| | | case 2: |
| | | stringBuilder.append("已通过"); |
| | | break; |
| | | case 3: |
| | | stringBuilder.append("未通过"); |
| | | break; |
| | | } |
| | | model.addAttribute("type",stringBuilder); |
| | | |
| | | String string = reasons.toString(); |
| | | if (!string.equals("")){ |
| | | String substring = string.substring(0, string.length() - 1); |
| | | model.addAttribute("reasons", substring); |
| | | }else{ |
| | | model.addAttribute("reasons", ""); |
| | | } |
| | | model.addAttribute("coursePackagePaymentConfig", JSON.toJSONString(list)); |
| | | |
| | | return PREFIX1 + "coursePackageDiscount.html"; |
| | | } |
| | | |
| | |
| | | public String payOfDetails(@PathVariable(value = "id") Integer id,Model model) { |
| | | System.out.println(id); |
| | | model.addAttribute("id",id); |
| | | Coupon coupon = client.queryCouponById(id); |
| | | model.addAttribute("type",coupon.getType()); |
| | | return PREFIX + "TGoods_pay.html"; |
| | | } |
| | | /** |
| | |
| | | private IUserService userService; |
| | | |
| | | |
| | | @RequestMapping("/tShop_addDevice/{id}") |
| | | public String addDevice(@PathVariable("id") Integer id,Model model) { |
| | | // 查询门店下的所有场地 |
| | | List<TSite> list = siteService.list(new QueryWrapper<TSite>().eq("storeId", id)); |
| | | // 门店id |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "TShop_add_device.html"; |
| | | } |
| | | @RequestMapping("/addDevice") |
| | | public Object addDevice(Integer id,Integer siteId,String device) { |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map.put("space_id",siteId+""); |
| | | map.put("device_id",device); |
| | | map.put("region_id",id.toString()); |
| | | // 添加门禁 |
| | | String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | | */ |
| | |
| | | System.out.println(result); |
| | | |
| | | |
| | | |
| | | for (String s : tStore.getIds().split(",")) { |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map.put("space_id",tStore.getId()+""); |
| | | map.put("device_id",s); |
| | | map.put("region_id",tSite.getId().toString()); |
| | | // 添加门禁 |
| | | String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map); |
| | | System.out.println(s1); |
| | | } |
| | | |
| | | |
| | | |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | } |
| | | @RequestMapping(value = "/addConfig") |
| | | @ResponseBody |
| | | public Object addConfig(String name,Integer id) { |
| | | public Object addConfig(String name,Integer id,Integer sort) { |
| | | try { |
| | | List<TStoreOtherConfig> list = storeOtherConfigService.list(); |
| | | if(list.size()>0){ |
| | | TStoreOther tStoreOther = new TStoreOther(); |
| | | tStoreOther.setName(name); |
| | | tStoreOther.setStoreId(id); |
| | | tStoreOther.setSort(sort); |
| | | storeOtherService.save(tStoreOther); |
| | | |
| | | // 找出temp表数据 |
| | |
| | | } |
| | | @RequestMapping(value = "/addConfig1") |
| | | @ResponseBody |
| | | public Object addConfig1(String name,Integer id) { |
| | | public Object addConfig1(String name,Integer id,Integer sort) { |
| | | try { |
| | | TStoreOther byId = storeOtherService.getById(id); |
| | | byId.setName( |
| | | name |
| | | ); |
| | | byId.setName(name); |
| | | byId.setSort(sort); |
| | | storeOtherService.updateById(byId); |
| | | |
| | | |
| | |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map.put("name",site.getName()); |
| | | map.put("space_id",site.getStoreId().toString()); |
| | | map.put("area_id",integer1.toString()); |
| | | String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpaceArea", map); |
| | | |
| | | map.put("space_id",site.getId().toString()); |
| | | map.put("area_id",store.getId().toString()); |
| | | String s = HttpRequestUtil.postRequest |
| | | ("https://try.daowepark.com/v7/user_api/general/addSpaceArea", map); |
| | | // 添加门禁 |
| | | JSONObject jsonObject = JSONObject.parseObject(s); |
| | | JSONObject data = jsonObject.getJSONObject("data"); |
| | |
| | | for (String s1 : site.getIds().split(",")) { |
| | | HashMap<String, String> map1 = new HashMap<>(); |
| | | map1.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map1.put("space_id", site.getStoreId() + ""); |
| | | map1.put("space_id", site.getId() + ""); |
| | | map1.put("device_id", s1); |
| | | map1.put("region_id", integer1 + ""); |
| | | map1.put("region_id", store.getId().toString() + ""); |
| | | String s2 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map1); |
| | | System.out.println("添加闸机:" + s2); |
| | | } |
| | | } |
| | | |
| | | |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑场地管理 |
| | | */ |
| | |
| | | |
| | | |
| | | |
| | | System.out.println("---------------------------"+gameConfigList); |
| | | System.out.println("---------------------------"+gameConfigList); |
| | | ballClient.saveConfig( gameConfigList); |
| | | return null; |
| | | } |
| | |
| | | public String yuyueadd(Model model) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | |
| | | String cityCode = null; |
| | | if(objectType == 2){//城市管理员 |
| | | // 获取到这个运营商下面的所有门店 |
| | |
| | | |
| | | 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.mapper.UserMapper; |
| | | import com.dsh.guns.config.UserExt; |
| | |
| | | import com.dsh.guns.core.util.SinataUtil; |
| | | import com.dsh.guns.modular.system.controller.util.MD5; |
| | | import com.dsh.guns.modular.system.factory.UserFactory; |
| | | import com.dsh.guns.modular.system.model.Role; |
| | | import com.dsh.guns.modular.system.model.User; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.IDeptService; |
| | | import com.dsh.guns.modular.system.service.IRoleService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.IUserService; |
| | | import com.dsh.guns.modular.system.transfer.UserDto; |
| | | import com.dsh.guns.modular.system.util.OBSUploadUtil; |
| | | import com.dsh.guns.modular.system.util.OssUploadUtil; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 系统管理员控制器 |
| | |
| | | |
| | | @Autowired |
| | | private IRoleService roleService; |
| | | |
| | | @Autowired |
| | | private IDeptService deptService; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RequestMapping("/user_add") |
| | | public String addView(Model model) { |
| | | model.addAttribute("role",UserExt.getUser().getObjectType()); |
| | | model.addAttribute("language",UserExt.getLanguage()); |
| | | LambdaQueryWrapper<Role> roleLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | if(UserExt.getUser().getObjectType()!=1){ |
| | |
| | | roleLambdaQueryWrapper.eq(Role::getObjType,UserExt.getUser().getObjectType()); |
| | | List<Role> list = roleService.list(roleLambdaQueryWrapper); |
| | | model.addAttribute("list",list); |
| | | // 部门列表 |
| | | List<Dept> depts = deptService.list(new QueryWrapper<>()); |
| | | model.addAttribute("depts",depts); |
| | | return PREFIX + "user_add.html"; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 跳转到编辑管理员页面 |
| | | * 跳转到编辑管理员页面 type=1编辑 type=2 查看详情 |
| | | */ |
| | | @Permission |
| | | @RequestMapping("/user_edit/{userId}") |
| | | public String userEdit(@PathVariable Integer userId, Model model) { |
| | | @RequestMapping("/user_edit/{userId}/{type}") |
| | | public String userEdit(@PathVariable Integer userId,@PathVariable Integer type, Model model) { |
| | | model.addAttribute("role",UserExt.getUser().getObjectType()); |
| | | if (Objects.isNull(userId)) { |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL); |
| | | } |
| | |
| | | List<Role> list = roleService.list(roleLambdaQueryWrapper); |
| | | model.addAttribute("list",list); |
| | | model.addAttribute("language",UserExt.getLanguage()); |
| | | // 部门列表 |
| | | List<Dept> depts = deptService.list(new QueryWrapper<>()); |
| | | model.addAttribute("depts",depts); |
| | | model.addAttribute("type",type); |
| | | return PREFIX + "user_edit.html"; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | /** |
| | | * 查询管理员列表 |
| | | */ |
| | | @RequestMapping("/list") |
| | | @Permission |
| | | @ResponseBody |
| | | public Object list(@RequestParam(required = false) String name, @RequestParam(required = false) String createTime, @RequestParam(required = false) Integer deptid) { |
| | | //创建日期 |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | String[] timeArray = createTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | public List<UserListVO> list(String name, String phone, String idCard, Integer isSales, Integer state) { |
| | | UserQuery userQuery = new UserQuery(); |
| | | userQuery.setName(name); |
| | | userQuery.setPhone(phone); |
| | | userQuery.setIdCard(idCard); |
| | | userQuery.setIsSales(isSales); |
| | | userQuery.setStatus(state); |
| | | |
| | | // 根据当前登陆人类型来查询员工列表 |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | switch (objectType){ |
| | | case 1: |
| | | // 平台查询所有 |
| | | List<UserListVO> res= userService.searchUsers(userQuery); |
| | | return res; |
| | | case 2: |
| | | // 运营商查询运营商账号的员工和属于该运营商门店的员工 |
| | | userQuery.setObjectType(2); |
| | | userQuery.setObjectId(objectId); |
| | | // 获取属于这个运营商的门店的店长ids |
| | | List<Integer> storeStaffIds = storeService.list(new QueryWrapper<TStore>().eq("operatorId", objectId) |
| | | .ne("state", 3)).stream().map(TStore::getStoreStaffId).collect(Collectors.toList()); |
| | | userQuery.setStoreIds(storeStaffIds); |
| | | List<UserListVO> res1= userService.searchUsers(userQuery); |
| | | return res1; |
| | | case 3: |
| | | // 门店只查询门店员工 |
| | | TStore store = storeService.getById(objectId); |
| | | List<Integer> storeIds = userQuery.getStoreIds(); |
| | | storeIds.add(store.getStoreStaffId()); |
| | | List<UserListVO> res2= userService.searchUsers(userQuery); |
| | | return res2; |
| | | } |
| | | User user = UserExt.getUser(); |
| | | Role role = roleService.getBaseMapper().selectById(user.getRoleid()); |
| | | if ("administrator".equals(role.getTips())) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(userService.getUserListPage(page,null, name, beginTime, endTime, deptid)); |
| | | return super.packForBT(page); |
| | | } else { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(userService.getUserListPage(page,null, name, beginTime, endTime, deptid)); |
| | | return super.packForBT(page); |
| | | } |
| | | return new ArrayList<>(); |
| | | // //创建日期 |
| | | // String beginTime = null; |
| | | // String endTime = null; |
| | | // if (SinataUtil.isNotEmpty(createTime)){ |
| | | // String[] timeArray = createTime.split(" - "); |
| | | // beginTime = timeArray[0]; |
| | | // endTime = timeArray[1]; |
| | | // } |
| | | // User user = UserExt.getUser(); |
| | | // Role role = roleService.getBaseMapper().selectById(user.getRoleid()); |
| | | // if ("administrator".equals(role.getTips())) { |
| | | // Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | // page.setRecords(userService.getUserListPage(page,null, name, beginTime, endTime, deptid)); |
| | | // return super.packForBT(page); |
| | | // } else { |
| | | // Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | // page.setRecords(userService.getUserListPage(page,null, name, beginTime, endTime, deptid)); |
| | | // return super.packForBT(page); |
| | | // } |
| | | } |
| | | |
| | | /** |
| | |
| | | @BussinessLog(value = "添加管理员", key = "account", dict = UserDict.class) |
| | | @Permission(Const.ADMIN_NAME) |
| | | @ResponseBody |
| | | public Tip add(@Valid UserDto user, BindingResult result) { |
| | | public Object add(@Valid UserDto user, BindingResult result) { |
| | | if (result.hasErrors()) { |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL); |
| | | } |
| | | |
| | | // 判断账号是否重复 |
| | | //Check if the account is duplicated |
| | | User theUser = new User(); |
| | | if (user.getAccount()!=""){ |
| | | theUser = userService.getByAccount(user.getAccount()); |
| | | |
| | | if (user.getPhone()!=""){ |
| | | theUser = userService.getByAccount(user.getPhone()); |
| | | } |
| | | System.out.println("=====theUser======="+theUser); |
| | | if (theUser != null&&user.getAccount()!="") { |
| | | throw new GunsException(BizExceptionEnum.USER_ALREADY_REG); |
| | | if (theUser != null){ |
| | | return 5001; |
| | | } |
| | | |
| | | // 完善账号信息 |
| | | // Complete account information |
| | | user.setPassword(SecureUtil.md5(user.getPassword())); |
| | | user.setStatus(ManagerStatus.OK.getCode()); |
| | | user.setCreatetime(new Date()); |
| | | |
| | | User objectUser = UserFactory.createUser(user); |
| | | objectUser.setObjectType(UserExt.getUser().getObjectType()); |
| | | objectUser.setObjectType(Integer.valueOf(user.getRoleid())); |
| | | objectUser.setObjectId(UserExt.getUser().getObjectId()); |
| | | objectUser.setRoleid(user.getRoleid()); |
| | | objectUser.setAccount(user.getPhone()); |
| | | objectUser.setName(user.getName()); |
| | | objectUser.setPhone(user.getPhone()); |
| | | objectUser.setBirthday(user.getBirthday()); |
| | | objectUser.setDeptid(user.getDeptid()); |
| | | objectUser.setIdCard(user.getIdCard()); |
| | | objectUser.setSex(user.getSex()); |
| | | objectUser.setStatus(1); |
| | | objectUser.setPassword(SecureUtil.md5("a123456")); |
| | | //查找平台所属公司 |
| | | //Search for the company that owns the platform. |
| | | objectUser.setCreatetime(new Date()); |
| | | // 运营商添加员工 |
| | | if (UserExt.getUser().getObjectType() == 2){ |
| | | objectUser.setObjectType(UserExt.getUser().getObjectType()); |
| | | objectUser.setRoleid("2"); |
| | | objectUser.setObjectId(UserExt.getUser().getObjectId()); |
| | | } |
| | | // 门店添加员工 |
| | | if (UserExt.getUser().getObjectType() == 3){ |
| | | objectUser.setObjectType(UserExt.getUser().getObjectType()); |
| | | objectUser.setRoleid("3"); |
| | | objectUser.setObjectId(UserExt.getUser().getObjectId()); |
| | | } |
| | | this.userService.save(objectUser); |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | |
| | | @RequestMapping("/edit") |
| | | @BussinessLog(value = "修改管理员", key = "account", dict = UserDict.class) |
| | | @ResponseBody |
| | | public Tip edit(@Valid UserDto user, BindingResult result) throws NoPermissionException { |
| | | public Object edit(@Valid UserDto user, BindingResult result) throws NoPermissionException { |
| | | if (result.hasErrors()) { |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL); |
| | | } |
| | | |
| | | |
| | | User oldUser = userService.getById(user.getId()); |
| | | // UserExt.hasRole(Const.ADMIN_NAME) |
| | | if (false) { |
| | | this.userService.updateById(UserFactory.editUser(user, oldUser)); |
| | | return SUCCESS_TIP; |
| | | } else { |
| | | assertAuth(user.getId()); |
| | | User shiroUser = UserExt.getUser(); |
| | | if (shiroUser.getId().equals(user.getId()) || shiroUser.getId()==1) { |
| | | this.userService.updateById(UserFactory.editUser(user, oldUser)); |
| | | return SUCCESS_TIP; |
| | | } else { |
| | | throw new GunsException(BizExceptionEnum.NO_PERMITION); |
| | | // 判断是否更改电话 |
| | | if (!oldUser.getPhone().equals(user.getPhone())){ |
| | | User phone = userService.getOne(new QueryWrapper<User>().eq("phone", user.getPhone())); |
| | | if (phone == null){ |
| | | oldUser.setPhone(user.getPhone()); |
| | | }else{ |
| | | return 5001; |
| | | } |
| | | } |
| | | oldUser.setName(user.getName()); |
| | | oldUser.setBirthday(user.getBirthday()); |
| | | oldUser.setRoleid(user.getRoleid()); |
| | | oldUser.setDeptid(user.getDeptid()); |
| | | oldUser.setIdCard(user.getIdCard()); |
| | | oldUser.setSex(user.getSex()); |
| | | if (user.getAvatar()!=null && (!user.getAvatar().equals(""))) |
| | | oldUser.setAvatar(user.getAvatar()); |
| | | this.userService.updateById(oldUser); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 员工管理查询返回VO |
| | | */ |
| | | @Data |
| | | public class UserListVO { |
| | | // 用户id |
| | | private Integer id; |
| | | // 员工姓名 |
| | | private String name; |
| | | // 联系电话 |
| | | private String phone; |
| | | // 头像 |
| | | private String avatar; |
| | | // 生日 |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date birthday; |
| | | // 性别 1男2女 |
| | | private Integer sex; |
| | | // 身份证号 |
| | | private String idCard; |
| | | // 所在部门 |
| | | private String deptName; |
| | | // 状态 1=正常 2=冻结 |
| | | private Integer status; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | import org.omg.CORBA.PRIVATE_MEMBER; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 员工管理查询Query |
| | | */ |
| | | @Data |
| | | public class UserQuery { |
| | | private String name; |
| | | private String phone; |
| | | private String idCard; |
| | | private Integer isSales; |
| | | private Integer status; |
| | | // 以下为运营商、门店权限筛选条件 |
| | | private Integer objectType; |
| | | private Integer objectId; |
| | | // 门店员工ids |
| | | private List<Integer> storeIds; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.guns.core.dataScope.DataScope; |
| | | import com.dsh.guns.modular.system.model.User; |
| | | import com.dsh.guns.modular.system.model.UserListVO; |
| | | import com.dsh.guns.modular.system.model.UserQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | @Param("deptid") Integer deptid); |
| | | |
| | | |
| | | List<UserListVO> searchUsers(UserQuery userQuery); |
| | | } |
| | |
| | | @Override |
| | | public void updateCoursePackage(TCoursePackage coursePackage, String coursePackagePaymentConfig) { |
| | | String holitime = coursePackage.getHolitime(); |
| | | String[] split = holitime.split(" - "); |
| | | String startTime = split[0]; |
| | | String endTime = split[1]; |
| | | SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | Date parse1 = format1.parse(startTime); |
| | | parse1.setHours(0); |
| | | parse1.setMinutes(0); |
| | | parse1.setSeconds(0); |
| | | Date parse2 = format2.parse(endTime); |
| | | parse2.setHours(23); |
| | | parse2.setMinutes(59); |
| | | parse2.setSeconds(59); |
| | | coursePackage.setStartTime(parse1); |
| | | coursePackage.setEndTime(parse2); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | if (holitime!=null){ |
| | | // 如果为空字符串 则默认未修改 |
| | | if (holitime.equals("")){ |
| | | TCoursePackage tCoursePackage = coursePackageClient.queryById(coursePackage.getId()); |
| | | coursePackage.setStartTime(tCoursePackage.getStartTime()); |
| | | coursePackage.setEndTime(tCoursePackage.getEndTime()); |
| | | }else{ |
| | | String[] split = holitime.split(" - "); |
| | | String startTime = split[0]; |
| | | String endTime = split[1]; |
| | | SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | Date parse1 = format1.parse(startTime); |
| | | parse1.setHours(0); |
| | | parse1.setMinutes(0); |
| | | parse1.setSeconds(0); |
| | | Date parse2 = format2.parse(endTime); |
| | | parse2.setHours(23); |
| | | parse2.setMinutes(59); |
| | | parse2.setSeconds(59); |
| | | coursePackage.setStartTime(parse1); |
| | | coursePackage.setEndTime(parse2); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | coursePackageClient.updateCoursePackage(coursePackage); |
| | | coursePackagePaymentConfigClient.delCoursePackagePaymentConfig(coursePackage.getId()); |
| | |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.dataScope.DataScope; |
| | | import com.dsh.guns.modular.system.model.UserListVO; |
| | | import com.dsh.guns.modular.system.model.UserQuery; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.dsh.guns.modular.system.model.User; |
| | |
| | | List<Map<String, Object>> userListPage = this.baseMapper.getUserListPage(page, dataScope, name, beginTime, endTime, deptid,objectType,objectId); |
| | | return userListPage; |
| | | } |
| | | |
| | | @Override |
| | | public List<UserListVO> searchUsers(UserQuery userQuery) { |
| | | return this.baseMapper.searchUsers(userQuery); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.util; |
| | | |
| | | |
| | | import org.apache.poi.hssf.usermodel.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | public class ExcelUtil { |
| | | public static HSSFWorkbook getHSSFWorkbook(String sheetName, String[] title, String[][] values, HSSFWorkbook wb) { |
| | | // 第一步,创建一个webbook,对应一个Excel文件 |
| | | if (wb == null) { |
| | | wb = new HSSFWorkbook(); |
| | | } |
| | | // 第二步,在webbook中添加一个sheet,对应Excel文件中的sheet |
| | | HSSFSheet sheet = wb.createSheet(sheetName); |
| | | // 第三步,在sheet中添加表头第0行,注意老版本poi对Excel的行数列数有限制short |
| | | HSSFRow row = sheet.createRow(0); |
| | | // 第四步,创建单元格,并设置值表头 设置表头居中 |
| | | HSSFCellStyle style = wb.createCellStyle(); |
| | | // 创建一个居中格式 |
| | | style.setAlignment((short) 2); |
| | | HSSFCell cell = null; |
| | | // 创建标题 |
| | | for (int i = 0; i < title.length; i++) { |
| | | cell = row.createCell(i); |
| | | cell.setCellType(1); |
| | | cell.setCellValue(title[i]); |
| | | cell.setCellStyle(style); |
| | | } |
| | | if(values!=null){ |
| | | // 创建内容 |
| | | for (int i = 0; i < values.length; i++) { |
| | | row = sheet.createRow(i + 1); |
| | | for (int j = 0; j < values[i].length; j++) { |
| | | row.createCell(j).setCellValue(values[i][j]); |
| | | } |
| | | } |
| | | |
| | | } |
| | | return wb; |
| | | } |
| | | |
| | | public static void setResponseHeader(HttpServletResponse response, String fileName) { |
| | | try { |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName); |
| | | response.setContentType("application/vnd.ms-excel;charset=UTF-8"); |
| | | response.addHeader("Pragma", "no-cache"); |
| | | response.addHeader("Cache-Control", "no-cache"); |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | </where> |
| | | order by o.id desc |
| | | </select> |
| | | <select id="searchUsers" resultType="com.dsh.guns.modular.system.model.UserListVO"> |
| | | select t1.id,t1.name ,t1.phone ,t1.avatar,t1.birthday,t1.sex,t1.idCard,t1.status |
| | | ,t2.simplename as deptName from sys_user t1 |
| | | left join sys_dept t2 on t1.deptid = t2.id |
| | | <where> |
| | | <if test="query.name != null and query.name != ''"> |
| | | and t1.name like CONCAT('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and t1.phone like CONCAT('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.idCard != null and query.idCard != ''"> |
| | | and t1.idCard like CONCAT('%',#{query.idCard},'%') |
| | | </if> |
| | | <if test="query.isSales == 1"> |
| | | and (t2.simplename like CONCAT('%','销售','%') |
| | | or t2.fullname like CONCAT('%','销售','%')) |
| | | </if> |
| | | <if test="query.status != null and query.status != ''"> |
| | | and t1.status = #{query.status} |
| | | </if> |
| | | <if test="query.storeIds != null and query.storeIds.size()>0"> |
| | | AND t1.id IN |
| | | <foreach collection="query.storeIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | and t1.status != 3 |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TStudent.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TStudent.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TStudentTableToolbar" role="group"> |
| | |
| | | @if(shiro.hasPermission("/coursePackage/examineCoursePackage")){ |
| | | <#button name="审核" icon="fa-plus" clickFun="ExamineCoursePackage.examineCoursePackage()"/> |
| | | @} |
| | | <#button name="详情" icon="fa-check-circle" clickFun="ExamineCoursePackage.detailsExamineCoursePackage()" space="true"/> |
| | | <#button name="查看详情" icon="fa-check-circle" clickFun="ExamineCoursePackage.detailsExamineCoursePackage()" space="true"/> |
| | | |
| | | </div> |
| | | <#table id="managerTable"/> |
| | |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <input type="hidden" id="type" value="${type}"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">当前状态:</label> |
| | | <div class="col-sm-4"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @if(type==1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*最多预约人数:</label> |
| | | <div class="col-sm-4"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*上课时间:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="classStartTime" name="classStartTime" value="${classTime}" placeholder="请选择" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label"></label> |
| | | <div class="col-sm-8"> |
| | | <div class="col-sm-4"> |
| | | @for(obj in classWeeks){ |
| | | <input type="checkbox" name="classWeeks" value="${obj.value}" ${obj.checked ? 'checked' : ''}> ${obj.value} |
| | | @} |
| | | </div> |
| | | </div> |
| | | <div class="form-group" style="display: flex; align-items: center;" id = "dayTime" > |
| | | <div style="display:flex"> |
| | | <input class="form-control" value="${time1}" id="classStartTime" name="classStartTime" placeholder="请选择" style="width: 200px;" disabled> |
| | | <i class="fa fa-plus-circle" style="font-size: 24px; margin-left: 10px;" onclick="addTime()" disabled></i> |
| | | </div> |
| | | @for(o in times!){ |
| | | <div style="display:flex"> |
| | | <input class="form-control" value="${o}" id="classStartTime" name="classStartTime" placeholder="请选择" style="width: 200px;" disabled> |
| | | <i class="fa fa-trash-o" style="font-size:24px" onclick="removePrice1(this)" disabled></i> |
| | | </div> |
| | | @} |
| | | </div> |
| | | @} |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*扣除课时数:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="needNum" name="name" value="${item.needNum}" readonly> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课包封面:</label> |
| | | <div class="col-sm-4"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="hr-line-dashed"></div> |
| | | @if(type == 3){ |
| | | <h3>支付设置</h3> |
| | | @} |
| | | @if(type == 2){ |
| | | <h3>支付设置</h3> |
| | | @} |
| | | @if(type == 1){ |
| | | <h3>课时设置</h3> |
| | | @} |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*支付方式:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | |
| | | <input type="checkbox" name="payType" value="2" ${playPaiCoin ? 'checked' : ''}> 玩湃币 |
| | | </div> |
| | | </div> |
| | | @if(type == 1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时有效期:</label> |
| | | <div class="col-sm-4"> |
| | | 购买后 <input id="validDays" name="validDays" type="number" value="${item.validDays}" min="0" placeholder="天数" style="width: 80px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> 天内有效 |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div id="price"> |
| | | <div class="form-group"> |
| | | @if(type == 1){ |
| | | <label class="col-sm-3 control-label">*课时数:</label> |
| | | @} |
| | | <div class="col-sm-8"> |
| | | <span class="classNumber_span"><input class="classNumber" type="number" value="${coursePackagePaymentConfig.classHours}" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> </span> |
| | | @if(type == 1){ |
| | | <span class="classNumber_span"> |
| | | <input class="classNumber" type="number" |
| | | value="${coursePackagePaymentConfig.classHours}" |
| | | min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> </span> |
| | | @} |
| | | <span class="cash_span"> |
| | | @if(cashPayment){ |
| | | 现金支付:<input class="cash" type="number" value="${coursePackagePaymentConfig.cashPayment}" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> ¥ |
| | |
| | | </div> |
| | | @for(obj in coursePackagePaymentConfigs){ |
| | | <div class="form-group"> |
| | | @if(type == 1){ |
| | | <label class="col-sm-3 control-label">*课时数:</label> |
| | | @} |
| | | <div class="col-sm-8"> |
| | | <span class="classNumber_span"><input class="classNumber" type="number" value="${obj.classHours}" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> </span> |
| | | <span class="cash_span"> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*审核状态:</label> |
| | | <div class="col-sm-8" style="margin-top: 6px;"> |
| | | <input name="auditStatus" type="radio" value="2" ${auditStatus == 2 ? 'checked' : ''}/> 通过 |
| | | <input name="auditStatus" type="radio" value="2" checked ${auditStatus == 2 ? 'checked' : ''}/> 通过 |
| | | <input name="auditStatus" type="radio" value="3" ${auditStatus == 3 ? 'checked':''}/> 拒绝 |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="CoursePackageInfo.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="CoursePackageInfo.close()"/> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="ExamineCoursePackageInfo.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="ExamineCoursePackageInfo.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <#button name="导出" icon="fa-plus" clickFun="TCompetition.export()"/> |
| | | <#button name="导出" icon="fa-plus" clickFun="TCompetition.ouTCompetition()"/> |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
| | | </div> |
| | |
| | | <div class="form-group"> |
| | | <div class="initialLevel col-sm-12 control-label form-group"> |
| | | <label class="col-sm-3 control-label">*兑换方式: </label> |
| | | <input class="col-sm-1 control-label" name="exchangeMethod" checked onclick="exchangeMethod2()" type="radio" |
| | | value="2" style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | <label class="col-sm-1" style="width: 20%;margin-top: 7px">现金+积分</label> |
| | | <input class="col-sm-1 control-label" onclick="exchangeMethod1()" name="exchangeMethod" type="radio" |
| | | value="1" style="margin-top: 10px"/> |
| | | <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">积分</label> |
| | | <input class="col-sm-1 control-label" name="exchangeMethod" onclick="exchangeMethod2()" type="radio" |
| | | value="2" style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | <label class="col-sm-1" style="width: 20%;margin-top: 7px">现金+积分</label> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <#SelectCon id="type" name="折扣类型" > |
| | | <option value="">全部</option> |
| | | <option value="1">会员折扣</option> |
| | | <option value="2">续课优惠</option> |
| | | <option value="3">限时折扣</option> |
| | | <option value="4">赠送课时</option> |
| | | </#SelectCon> |
| | |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <input type="hidden" id="role" value="${role}"> |
| | | <input type="hidden" id="type" value="${type}"> |
| | | <input type="hidden" id="coursePackagePaymentConfig" value='${coursePackagePaymentConfig}'> |
| | | @if(role==2){ |
| | | <div class="form-group"> |
| | | <div class="col-sm-2"></div> |
| | | <div class="col-sm-10"> |
| | | <label class="col-sm-2 control-label">审核状态:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | | <span>审核状态:${type}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | @if(type==3){ |
| | | <div class="form-group"> |
| | | <div class="col-sm-2"></div> |
| | | <div class="col-sm-10"> |
| | | <label class="col-sm-2 control-label">拒绝理由:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | | <span>拒绝理由:</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @} |
| | | <div class="form-group"> |
| | | <div class="col-sm-2"></div> |
| | | <div class="col-sm-10"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/coursePackage/coursePackageDiscount.js"></script> |
| | | <script src="${ctxPath}/modular/system/tDiscountAudit/coursePackageDiscount.js"></script> |
| | | <script src="${ctxPath}/modular/system/tDiscount/tDiscount_info.js"></script> |
| | | |
| | | |
| | |
| | | <#SelectCon id="type" name="折扣类型" > |
| | | <option value="">全部</option> |
| | | <option value="1">会员折扣</option> |
| | | <option value="2">续课优惠</option> |
| | | <option value="3">限时折扣</option> |
| | | <option value="4">赠送课时</option> |
| | | </#SelectCon> |
| | |
| | | <div class="form-group"> |
| | | <div class="col-sm-2"></div> |
| | | <div class="col-sm-10"> |
| | | <label class="col-sm-2 control-label">当前状态:</label> |
| | | @if(state==1){ |
| | | <div class="col-sm-4" style="margin-top: 6px;color: goldenrod"> |
| | | <span>${stateStr}</span> |
| | | <label class="col-sm-2 control-label">审核状态:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | | <span>审核状态:${type}</span> |
| | | </div> |
| | | @} |
| | | @if(state==3){ |
| | | <div class="col-sm-4" style="margin-top: 6px;color: red"> |
| | | <span>${stateStr}</span> |
| | | </div> |
| | | @} |
| | | |
| | | </div> |
| | | </div> |
| | | @if(type1==3){ |
| | | <div class="form-group"> |
| | | <div class="col-sm-2"></div> |
| | | <div class="col-sm-10"> |
| | | <label class="col-sm-2 control-label">拒绝理由:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | | <span>拒绝理由:${reasons}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group"> |
| | | <div class="col-sm-2"></div> |
| | | <div class="col-sm-10"> |
| | |
| | | <div id="complimentaryClass"> |
| | | |
| | | </div> |
| | | <div class="form-horizontal"> |
| | | <div class="col-sm-11"> |
| | | <div class="col-sm-11"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">审核状态:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="r1" value="2" checked> 通过 |
| | | <input type="radio" name="r1" value="3"> 拒绝 |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">拒绝理由:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea id="text" style="width: 460px; height: 138px;"></textarea> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | |
| | | <#button name="重置" icon="fa-trash" clickFun="TPayInfo.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | @if(type==1){ |
| | | <div class="hidden-xs" id="TPayInfoTableToolbar" role="group"> |
| | | <#button name="核销" icon="fa-plus" clickFun="TPayInfo.WriteOff()"/> |
| | | </div> |
| | | @} |
| | | <#table id="TPayInfoTable"/> |
| | | |
| | | <div style="margin-left: 40%"> |
| | |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="province"> |
| | | <select class="form-control" id="province" > |
| | | <option value="">全部</option> |
| | | </select> |
| | | </div> |
| | |
| | | <option value="">全部</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="userPopulation" name="所属账号" > |
| | | <option value="">全部</option> |
| | | </#SelectCon> |
| | | </div> |
| | | |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="storeName" name="门店名称" placeholder="请输入门店名称"/> |
| | | </div> |
| | |
| | | <option value="2">兑换商品</option> |
| | | <option value="3">完成课后练习</option> |
| | | <option value="4">观看教学视频</option> |
| | | <option value="5">启动游戏</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | |
| | | @} |
| | | <#button name="免费福利" icon="fa-remove" clickFun="TCompetition.gift()" space="true"/> |
| | | <#button name="首页设置" icon="fa-remove" clickFun="TCompetition.indexSet()" space="true"/> |
| | | <#button name="门禁设置" icon="fa-plus" clickFun="TCompetition.addDevice()" space="true"/> |
| | | |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
| | | </div> |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input id="id" value="${id}" hidden> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">*选择场地:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="site" name="site" > |
| | | <option value="">选择场地</option> |
| | | @for(i in list){ |
| | | <option value="${i.id}" >${i.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#input id="device" name="*添加入园闸机" placeholder= "请输入入园闸机id" type="text"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCompetition.addSubmit3()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCompetition.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | |
| | | |
| | | </script> |
| | | @} |
| | |
| | | <label class="col-sm-3 control-label">板块名称:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="name" name="name" type="text" style="width: 400px;"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="form-group" style="margin-left:-410px"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="sort" name="name" type="text" style="width: 400px;"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" style="margin-left:-410px"> |
| | |
| | | <label class="col-sm-3 control-label">板块名称:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="name" name="name" type="text" style="width: 400px;" value="${item.name}"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="form-group" style="margin-left:-410px"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="sort" name="name" type="text" value="${item.sort}" style="width: 400px;"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" style="margin-left:-410px"> |
| | |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>用户管理</h5> |
| | | <h5>员工管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | |
| | | <div class="col-lg-10 col-sm-9"> |
| | | <div class="row"> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#NameCon id="name" name="搜索" placeholder="帐号/姓名/手机号"/> |
| | | <#NameCon id="name" name="员工姓名" placeholder="请输入"/> |
| | | </div> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#NameCon id="phone" name="联系电话" placeholder="请输入"/> |
| | | </div> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#NameCon id="idCard" name="身份证号" placeholder="请输入"/> |
| | | </div> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#SelectCon id="isSales" name="销售人员" > |
| | | <option value="">全部</option> |
| | | <option value="1">是</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#SelectCon id="status" name="状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">正常</option> |
| | | <option value="2">冻结</option> |
| | | </#SelectCon> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | @if(shiro.hasPermission("/mgr/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="MgrUser.delMgrUser()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/mgr/reset")){ |
| | | <#button name="重置密码" icon="fa-refresh" clickFun="MgrUser.resetPwd()" space="true"/> |
| | | @if(shiro.hasPermission("/mgr/delete")){ |
| | | <#button name="查看详情" icon="fa-remove" clickFun="MgrUser.openChangeUser1()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/mgr/freeze")){ |
| | | <#button name="冻结" icon="fa-warning" clickFun="MgrUser.freezeAccount()" space="true"/> |
| | |
| | | @if(shiro.hasPermission("/mgr/unfreeze")){ |
| | | <#button name="解冻" icon="fa-check-circle" clickFun="MgrUser.unfreeze()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/mgr/reset")){ |
| | | <#button name="重置密码" icon="fa-refresh" clickFun="MgrUser.resetPwd()" space="true"/> |
| | | @} |
| | | |
| | | @if(shiro.hasPermission("/mgr/kanbanPermissions")){ |
| | | <#button name="看板权限设置" icon="fa-user-secret" clickFun="MgrUser.kanbanPermissions()" space="true"/> |
| | | @} |
| | |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="userInfoForm"> |
| | | <input type="hidden" id="id" value=""> |
| | | <input type="hidden" id="role" value="role"> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div id="driverInfoContent"> |
| | | <#input id="name" name="员工姓名" underline="true"/> |
| | | <#input id="phone" name="联系电话" underline="true"/> |
| | | <#avatar id="avatar" name="照片" underline="true"/> |
| | | <#input id="birthday" name="生日" underline="true" type="text"/> |
| | | <#select id="sex" name="性别" underline="true" > |
| | | <#input id="name" name="*员工姓名" underline="true"/> |
| | | <#input id="phone" name="*联系电话" underline="true"/> |
| | | <#avatar id="avatar" name="*照片" underline="true"/> |
| | | <#input id="birthday" name="*生日" underline="true" type="text"/> |
| | | <#select id="sex" name="*性别" underline="true" > |
| | | <option value="1" selected>男</option> |
| | | <option value="2">女</option> |
| | | </#select> |
| | | <#input id="idCard" name="身份证号" type="text" underline="true"/> |
| | | <#select id="roleid" name="角色" underline="true" > |
| | | <#input id="idCard" name="*身份证号" type="text" underline="true"/> |
| | | <#select id="deptid" name="*所在部门" underline="true" > |
| | | <option value="">请选择</option> |
| | | @for(l in depts){ |
| | | <option value="${l.id}">${l.fullname}</option> |
| | | @} |
| | | </#select> |
| | | @if(role == 1){ |
| | | <#select id="roleid" name="*所属角色" underline="true" > |
| | | <option value="">请选择</option> |
| | | @for(l in list){ |
| | | <option value="${l.id}">${l.name}</option> |
| | | @} |
| | | |
| | | </#select> |
| | | @} |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <#input id="idCard" name="身份证号" type="text" underline="true" value="${user.idCard}"/> |
| | | <#select id="roleid" name="角色" underline="true" > |
| | | @for(l in list){ |
| | | <option value="${l.id}" ${l.id == user.roleid ? 'selected=selected' : ''}>${l.name}</option> |
| | | <option value="${l.id}" ${l.id == user.roleid ? 'selected=selected' : ''}>${l.name}</option> |
| | | @} |
| | | </#select> |
| | | @if(role == 1){ |
| | | <#select id="deptid" name="角色" underline="true" > |
| | | @for(l in depts){ |
| | | <option value="${l.id}" ${l.id == user.deptid ? 'selected=selected' : ''}>${l.fullname}</option> |
| | | @} |
| | | </#select> |
| | | @} |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | @if(type == 1){ |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="UserInfoDlg.editSubmit()"/> |
| | | @} |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="UserInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | |
| | | queryData['date'] = $("#date").val(); |
| | | queryData['payMethod'] = $("#payMethod").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | |
| | | |
| | | |
| | | TStudent.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | /** |
| | | * 重置 |
| | | */ |
| | | TStudent.resetSearch = function () { |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | $("#store").val(""); |
| | | $("#peopleName").val(""); |
| | | $("#phone").val(""); |
| | | $("#date").val(""); |
| | | $("#payMethod").val(""); |
| | | $("#state").val(""); |
| | | TStudent.search(); |
| | | }; |
| | | $(function () { |
| | | var defaultColunms = TStudent.initColumn(); |
| | | var table = new BSTable(TStudent.id, "/ball/yuyuelist", defaultColunms); |
| | |
| | | queryData['cityCode'] = $("#cityCode").val(); |
| | | queryData['coursePackageTypeId'] = $("#coursePackageTypeId").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['status'] = $("#status").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | CoursePackage.table.refresh({query: queryData}); |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | let holitime = $('#holitime').val(); |
| | | |
| | | var inputElements = document.querySelectorAll('input[name="classStartTime"]'); |
| | | let classStartTime = JSON.stringify(Array.from(inputElements).map(function(element) { |
| | |
| | | // Feng.error("课时有效期不能为空"); |
| | | // return |
| | | // } |
| | | |
| | | let holitime = $('#holitime').val(); |
| | | let obj = { |
| | | id: id, |
| | | province: province, |
| | |
| | | sort: sort, |
| | | validDays: validDays, |
| | | coursePackagePaymentConfig: JSON.stringify(price), |
| | | holitime:holitime |
| | | holitime:$("#holitime").val() |
| | | } |
| | | |
| | | console.log("======="+obj) |
| | | console.log("看看") |
| | | console.log("======="+holitime) |
| | | console.log(holitime) |
| | | console.log($("#holitime").val()) |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/coursePackage/updateCoursePackage", function (data) { |
| | |
| | | /** |
| | | * 系统管理--用户管理的单例对象 |
| | | */ |
| | | let ExamineCoursePackage = { |
| | | var ExamineCoursePackage = { |
| | | id: "managerTable",//表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | |
| | | ExamineCoursePackage.initColumn = function () { |
| | | let columns = [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '序号', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所在省市', field: 'city', align: 'center', valign: 'middle'}, |
| | | {title: '所属门店', field: 'store', align: 'center', valign: 'middle'}, |
| | | {title: '课包种类', field: 'type', align: 'center', valign: 'middle'}, |
| | | {title: '课包类型', field: 'coursePackageType', align: 'center', valign: 'middle'}, |
| | | {title: '课包名称', field: 'name', align: 'center', valign: 'middle'}, |
| | | {title: '最多预约人数', field: 'maxSubscribeNumber', align: 'center', valign: 'middle'}, |
| | | {title: '课程有效期', field: 'validDays', align: 'center', valign: 'middle'}, |
| | | {title: '支付方式', field: 'payType', align: 'center', valign: 'middle'}, |
| | | {title: '排序', field: 'sort', align: 'center', valign: 'middle'}, |
| | | {title: '审核状态', field: 'auditStatus', align: 'center', valign: 'middle', |
| | | formatter: function (v) { |
| | | switch (v) { |
| | |
| | | parent.layer.close(window.parent.ExamineCoursePackage.layerIndex); |
| | | }; |
| | | |
| | | |
| | | ExamineCoursePackageInfo.addSubmit = function () { |
| | | |
| | | let auditStatus = $('input[name="auditStatus"]:checked').val();; |
| | | if(typeof auditStatus == "undefined"){ |
| | | Feng.error("请选择审核结果"); |
| | | return |
| | | } |
| | | let authRemark = $('#authRemark').text(); |
| | | let authRemark = $('#authRemark').val(); |
| | | if(3 == auditStatus && '' == authRemark){ |
| | | Feng.error("请输入拒绝理由"); |
| | | return |
| | | } |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/setCoursePackageAuditStatus", function (res) { |
| | | if(res.code == 200){ |
| | | console.log("路径") |
| | | Feng.success("审核成功!"); |
| | | ExamineCoursePackageInfo.close(); |
| | | window.parent.ExamineCoursePackage.table.refresh(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | }, |
| | | {title: '性别', field: 'sex', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '性别', field: 'sex', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"男",2:"女"}[data] |
| | | } |
| | | }, |
| | | {title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | }, |
| | | {title: '身份证号', field: 'idCard', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | |
| | | * 导出车辆操作 |
| | | */ |
| | | TCompetition.ouTCompetition = function () { |
| | | var operation = function() { |
| | | window.location.href = Feng.ctxPath + "/TCompetition/ouTCompetition"; |
| | | }; |
| | | if(language==1){ |
| | | Feng.confirm("是否确认导出车辆信息?", operation); |
| | | }else if(language==2){ |
| | | Feng.confirm("Are you sure to export vehicle information?", operation); |
| | | }else { |
| | | Feng.confirm("Apakah Anda pasti akan mengekspor informasi kendaraan?", operation); |
| | | } |
| | | } |
| | | var state=$("#state").val() |
| | | var id=$("#id").val() |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/export", function(data){ |
| | | }); |
| | | ajax.set("state",state); |
| | | ajax.set("id",id); |
| | | ajax.start(); |
| | | }; |
| | |
| | | stores = this.storeIds.join(','); |
| | | console.log('stores--===--',stores) |
| | | } |
| | | |
| | | var ensure = document.getElementById("ensure"); |
| | | ensure.disabled = true; |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/commitData", function (data) { |
| | | ensure.disabled = false; |
| | | Feng.success("添加成功!"); |
| | | window.parent.TCoupon.table.refresh(); |
| | | couponInfoDlg.close(); |
| | | }, function (data) { |
| | | ensure.disabled = false; |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("userType",$('#userType').val()); |
| | |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '课包id', field: 'courseId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所在省', field: 'pname', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '所在市', field: 'cname', visible: true, align: 'center', valign: 'middle'}, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDiscount/info?id=' + this.seItem.id |
| | | content: Feng.ctxPath + '/tDiscount/info?id=' + this.seItem.courseId |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '课包id', field: 'courseId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所在省', field: 'pname', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '所在市', field: 'cname', visible: true, align: 'center', valign: 'middle'}, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDiscount/infoOne?id=' + this.seItem.id |
| | | content: Feng.ctxPath + '/tDiscount/infoOne?id=' + this.seItem.courseId |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | queryData['cityCode'] = $("#cCode").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['shopName'] = $("#shopName").val(); |
| | | queryData['type'] = $("type").val(); |
| | | queryData['type'] = $("#type").val(); |
| | | TCompetition.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | |
| | | TStoreProvince.resetSearch = function () { |
| | | $("#province").val('') |
| | | $("#city").val('') |
| | | $("#account").val('') |
| | | $("#storeName").val('') |
| | | TStoreProvince.search(); |
| | | }; |
| | |
| | | }, |
| | | {title: '积分类型', field: 'type', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return{1:"赠送积分", 2:"兑换商品",3:"完成课后练习",4:"观看教学视频"}[data] |
| | | return{1:"赠送积分", 2:"兑换商品",3:"完成课后练习",4:"观看教学视频",5:"启动游戏"}[data] |
| | | } |
| | | }, |
| | | {title: '积分明细', field: 'integral', visible: true, align: 'center', valign: 'middle', |
| | |
| | | }, |
| | | ]; |
| | | }; |
| | | |
| | | |
| | | function currentTime(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * |
| | | * 点击门店设置门禁 |
| | | */ |
| | | TCompetition.addDevice = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加门禁', |
| | | area: ['50%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_addDevice/' +TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 点击添加车辆管理 |
| | | */ |
| | |
| | | |
| | | |
| | | let name = $("#name").val() |
| | | let sort = $("#sort").val() |
| | | |
| | | if(name=='' || name ==null){ |
| | | Feng.info("请填写板块名称") |
| | | return; |
| | | } |
| | | if(sort=='' || sort ==null){ |
| | | Feng.info("请填写排序") |
| | | return; |
| | | } |
| | | |
| | |
| | | }); |
| | | ajax.set("name",name); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("sort",$("#sort").val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | |
| | | Feng.info("请填写板块名称") |
| | | return; |
| | | } |
| | | |
| | | let sort = $("#sort").val() |
| | | if(sort=='' || sort ==null){ |
| | | Feng.info("请填写排序") |
| | | return; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/addConfig1", function(data){ |
| | | if(data.code == 200){ |
| | |
| | | }); |
| | | ajax.set("name",name); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("sort",$("#sort").val()); |
| | | ajax.start(); |
| | | } |
| | | TCompetition.close = function() { |
| | |
| | | .set('registerDate') |
| | | .set('commercialType'); |
| | | } |
| | | |
| | | TCarInfoDlg.addSubmit3 = function() { |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/addDevice", function(data){ |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }); |
| | | ajax.set("id",$("#id")); |
| | | ajax.set("siteId",$("#site")); |
| | | ajax.set("device",$("#device")); |
| | | ajax.start(); |
| | | } |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | |
| | | return ""; |
| | | } |
| | | }, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: language==1?'账号':(language==2?'Account number':'Nomor akun'), field: 'account', align: 'center', valign: 'middle', sortable: true}, |
| | | {title: language==1?'姓名':(language==2?'name':'Nama Lengkap'), field: 'name', align: 'center', valign: 'middle', sortable: true}, |
| | | {title: '序号', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '姓名', field: 'name', align: 'center', valign: 'middle', sortable: true}, |
| | | {title: '电话', field: 'phone', align: 'center', valign: 'middle', sortable: true}, |
| | | {title: '头像', field: 'avatar', align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | value = typeof value == "undefined" || value == '' ? '/static/img/NoPIC.png' : value; |
| | | return '<img src="' + value + '" style="height: 100px;"/>' |
| | | }, |
| | | sortable: true}, |
| | | {title: '生日', field: 'birthday', align: 'center', valign: 'middle', sortable: true}, |
| | | {title: language==1?'性别':(language==2?'Gender':'Jenis kelamin'), field: 'sexName', align: 'center', valign: 'middle', sortable: true, |
| | | formatter:function (data) { |
| | | if(language==1){ |
| | | if(data==1){ |
| | | return '男' |
| | | }else { |
| | | return '女' |
| | | } |
| | | }else if(language==2){ |
| | | } |
| | | }, |
| | | {title: '身份证号', field: 'idCard', align: 'center', valign: 'middle', sortable: true}, |
| | | {title: '所在部门', field: 'deptName', align: 'center', valign: 'middle', sortable: true}, |
| | | {title: '状态', field: 'status', align: 'center', valign: 'middle', sortable: true, |
| | | formatter:function (data) { |
| | | if(data==1){ |
| | | return 'man' |
| | | return '正常' |
| | | }else { |
| | | return 'woman' |
| | | return '冻结' |
| | | } |
| | | }else { |
| | | if(data==1){ |
| | | return 'laki-laki' |
| | | }else { |
| | | return 'wanita' |
| | | } |
| | | } |
| | | |
| | | } |
| | | }, |
| | | {title: language==1?'角色':(language==2?'role':'peran'), field: 'roleName', visible: true, align: 'center', valign: 'middle', sortable: true, |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.roleName != '' && row.roleName != null) { |
| | | var labelStr = ""; |
| | | var labelStrs = ""; |
| | | var labelArray = row.roleName.split(","); |
| | | for(var i=0;i<labelArray.length;i++){ |
| | | labelStr += labelArray[i] +"<br>"; |
| | | labelStrs += labelArray[i] + " "; |
| | | } |
| | | labelStr = labelStr.substring(0,labelStr.length-4); |
| | | labelStrs = labelStrs.substring(0,labelStrs.length-5); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + labelStrs + '" onfocus="AppCar.tooltip()">' + labelStr + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: language==1?'部门':(language==2?'department':'departemen'), field: 'deptName', align: 'center', valign: 'middle', sortable: true}, |
| | | {title: language==1?'邮箱':(language==2?'email':'email'), field: 'email', align: 'center', valign: 'middle', sortable: true}, |
| | | {title: language==1?'电话':(language==2?'phone':'Telepon'), field: 'phone', align: 'center', valign: 'middle', sortable: true}, |
| | | {title:language==1?'创建时间':(language==2?'Creation time':'Waktu penciptaan'), field: 'createtime', visible: true, align: 'center', valign: 'middle', sortable: true, |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.createtime1 != '' && row.createtime1 != null) { |
| | | var time = row.createtime1.replace(" ",'<br>'); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.createtime1 + '" onfocus="AppCar.tooltip()">' + time + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: language==1?'状态':(language==2?'State':'Status'), field: 'statusName', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.statusName != '' && row.statusName != null) { |
| | | if(language==1){ |
| | | if (row.statusName == "2"){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="' + `冻结` + '" onfocus="AppUserInfo.tooltip()">' + `冻结` + '</p>'] |
| | | }else{ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + `启用` + '" onfocus="AppUserInfo.tooltip()">' + `启用` + '</p>'] |
| | | } |
| | | }else if(language==2){ |
| | | if (row.statusName == "2"){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="' + `freeze` + '" onfocus="AppUserInfo.tooltip()">' + `freeze` + '</p>'] |
| | | }else{ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + `enable` + '" onfocus="AppUserInfo.tooltip()">' + `enable` + '</p>'] |
| | | } |
| | | }else { |
| | | if (row.statusName == "2"){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="' + `Membekukan` + '" onfocus="AppUserInfo.tooltip()">' + 'Membekukan' + '</p>'] |
| | | }else{ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + `aktifkan` + '" onfocus="AppUserInfo.tooltip()">' + 'aktifkan' + '</p>'] |
| | | } |
| | | } |
| | | |
| | | } |
| | | return btn; |
| | | } |
| | | } |
| | | ]; |
| | | return columns; |
| | | }; |
| | |
| | | area: ['800px', '450px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/mgr/user_edit/' + this.seItem.id |
| | | content: Feng.ctxPath + '/mgr/user_edit/' + this.seItem.id+"/1" |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 点击查看详情按钮时 |
| | | * @param userId 管理员id |
| | | */ |
| | | MgrUser.openChangeUser1 = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: language==1?'编辑':(language==2?'Edit':'Edit'), |
| | | area: ['800px', '450px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/mgr/user_edit/' + this.seItem.id+"/2" |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | ajax.set("userId", userId); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | if(language==1){ |
| | | Feng.confirm("是否删除用户" + MgrUser.seItem.account + "?",operation); |
| | | }else if(language==2){ |
| | | Feng.confirm("Whether to delete a user" + MgrUser.seItem.account + "?",operation); |
| | | }else { |
| | | Feng.confirm("Apakah menghapus pengguna" + MgrUser.seItem.account + "?",operation); |
| | | } |
| | | |
| | | Feng.confirm("是否删除员工: " + MgrUser.seItem.name + "?",operation); |
| | | } |
| | | }; |
| | | |
| | |
| | | if (this.check()) { |
| | | var userId = this.seItem.id; |
| | | if(language==1){ |
| | | parent.layer.confirm('是否重置密码为a123456?', { |
| | | parent.layer.confirm('是否重置密码为<span style="color: red;">a123456</span>?', { |
| | | btn: ['确定', '取消'], |
| | | shade: false //不显示遮罩 |
| | | }, function () { |
| | |
| | | |
| | | MgrUser.resetSearch = function () { |
| | | $("#name").val(""); |
| | | $("#createTime").val(""); |
| | | $("#phone").val(""); |
| | | $("#idCard").val(""); |
| | | $("#isSales").val(""); |
| | | $("#status").val(""); |
| | | |
| | | MgrUser.search(); |
| | | } |
| | | |
| | | MgrUser.search = function () { |
| | | var queryData = {}; |
| | | |
| | | queryData['deptid'] = MgrUser.deptid; |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['createTime'] = $("#createTime").val(); |
| | | |
| | | queryData['phone'] = $("#phone").val(); |
| | | queryData['idCard'] = $("#idCard").val(); |
| | | queryData['isSales'] = $("#isSales").val(); |
| | | queryData['state'] = $("#status").val(); |
| | | MgrUser.table.refresh({query: queryData}); |
| | | } |
| | | |
| | |
| | | var defaultColunms = MgrUser.initColumn(); |
| | | var table = new BSTable(MgrUser.id, "/mgr/list", defaultColunms); |
| | | // 设置物理分页server(逻辑分页client) |
| | | table.setPaginationType("server"); |
| | | table.setPaginationType("client"); |
| | | // 表单提交参数 |
| | | var queryData = {}; |
| | | queryData['deptid'] = MgrUser.deptid; |
| | |
| | | * 收集数据 |
| | | */ |
| | | UserInfoDlg.collectData = function () { |
| | | this.set('id').set('account').set('sex').set('password').set('avatar') |
| | | this.set('id').set('account').set('sex').set('password').set('avatar').set("deptid") |
| | | .set('email').set('name').set('birthday').set('rePassword').set('roleid').set('phone').set('idCard'); |
| | | }; |
| | | |
| | |
| | | if (!this.validate()) { |
| | | return; |
| | | } |
| | | |
| | | |
| | | |
| | | if($("#name").val()==''){ |
| | | Feng.info("请输入员工姓名") |
| | | return; |
| | | } |
| | | var phonePattern = /^1[3-9]\d{9}$/; |
| | | if (!phonePattern.test($("#phone").val())) { |
| | | Feng.info("请输入合法手机号") |
| | | return ; |
| | | } |
| | | if($("#phone").val()==''){ |
| | | Feng.info("请输入员工电话") |
| | | return; |
| | | } |
| | | if($("#birthday").val()==''){ |
| | | Feng.info("请选择员工生日") |
| | | return; |
| | | } |
| | | var avatar = $("#avatar").val(); |
| | | if(avatar==''){ |
| | | Feng.info("请上传照片") |
| | |
| | | Feng.info("请选择性别") |
| | | return; |
| | | } |
| | | var roleid = $("#roleid").val(); |
| | | if(roleid==''){ |
| | | Feng.info("请选择角色") |
| | | // 当前登陆人类型 如果不是平台 不校验角色选择 |
| | | var role = $("#role").val(); |
| | | if (role==1){ |
| | | var roleid = $("#roleid").val(); |
| | | if(roleid==''){ |
| | | Feng.info("请选择角色") |
| | | return; |
| | | } |
| | | } |
| | | var dept = $("#deptid").val(); |
| | | if(dept==''){ |
| | | Feng.info("请选择部门") |
| | | return; |
| | | } |
| | | console.log(this.userInfoData) |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/mgr/add", function (data) { |
| | | Feng.success("添加成功!"); |
| | | window.parent.MgrUser.table.refresh(); |
| | | UserInfoDlg.close(); |
| | | $(".img-circle").each(function () { |
| | | $(this).attr("src",Feng.ctxPath+$("#avatar").val()); |
| | | }) |
| | | if (data==5001){ |
| | | Feng.error("该手机号已存在!"); |
| | | }else{ |
| | | Feng.success("添加成功!"); |
| | | window.parent.MgrUser.table.refresh(); |
| | | UserInfoDlg.close(); |
| | | $(".img-circle").each(function () { |
| | | $(this).attr("src",Feng.ctxPath+$("#avatar").val()); |
| | | }) |
| | | } |
| | | }, function (data) { |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | |
| | | } |
| | | console.log(this.userInfoData) |
| | | |
| | | if($("#name").val()==''){ |
| | | Feng.info("请输入员工姓名") |
| | | return; |
| | | } |
| | | var phonePattern = /^1[3-9]\d{9}$/; |
| | | if (!phonePattern.test($("#phone").val())) { |
| | | Feng.info("请输入合法手机号") |
| | | return ; |
| | | } |
| | | if($("#phone").val()==''){ |
| | | Feng.info("请输入员工电话") |
| | | return; |
| | | } |
| | | if($("#birthday").val()==''){ |
| | | Feng.info("请选择员工生日") |
| | | return; |
| | | } |
| | | |
| | | var sex = $("#sex").val(); |
| | | if(sex==''){ |
| | | Feng.info("请选择性别") |
| | | return; |
| | | } |
| | | // 当前登陆人类型 如果不是平台 不校验角色选择 |
| | | var role = $("#role").val(); |
| | | if (role==1){ |
| | | var roleid = $("#roleid").val(); |
| | | if(roleid==''){ |
| | | Feng.info("请选择角色") |
| | | return; |
| | | } |
| | | } |
| | | var dept = $("#deptid").val(); |
| | | if(dept==''){ |
| | | Feng.info("请选择部门") |
| | | return; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/mgr/edit", function (data) { |
| | | Feng.success("修改成功!"); |
| | | if (window.parent.MgrUser != undefined) { |
| | | if (data==5001){ |
| | | Feng.error("该手机号已存在!"); |
| | | }else{ |
| | | Feng.success("修改成功!"); |
| | | window.parent.MgrUser.table.refresh(); |
| | | UserInfoDlg.close(); |
| | | $(".img-circle").each(function () { |
| | | $(this).attr("src",Feng.ctxPath+$("#avatar").val()); |
| | | }) |
| | | } |
| | | window.parent.$(".img-circle").each(function () { |
| | | $(this).attr("src",$("#avatar").val()); |
| | | }) |
| | | |
| | | window.parent.$("#userNameTab").text($("#name").val()); |
| | | }, function (data) { |