| | |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi</artifactId> |
| | | <version>3.9</version> |
| | | <version>5.0.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml</artifactId> |
| | | <version>5.0.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-surefire-plugin</artifactId> |
| | | <configuration> |
| | | <testFailureIgnore>true</testFailureIgnore> |
| | | </configuration> |
| | | </plugin> |
| | | |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | <configuration> |
| | |
| | | |
| | | @Around("cutPermission()") |
| | | public Object doPermission(ProceedingJoinPoint point) throws Throwable { |
| | | MethodSignature ms = (MethodSignature) point.getSignature(); |
| | | Method method = ms.getMethod(); |
| | | Permission permission = method.getAnnotation(Permission.class); |
| | | Object[] permissions = permission.value(); |
| | | if (permissions == null || permissions.length == 0) { |
| | | //检查全体角色 |
| | | boolean result = PermissionCheckManager.checkAll(); |
| | | if (result) { |
| | | // MethodSignature ms = (MethodSignature) point.getSignature(); |
| | | // Method method = ms.getMethod(); |
| | | // Permission permission = method.getAnnotation(Permission.class); |
| | | // Object[] permissions = permission.value(); |
| | | // if (permissions == null || permissions.length == 0) { |
| | | // //检查全体角色 |
| | | // boolean result = PermissionCheckManager.checkAll(); |
| | | // if (result) { |
| | | return point.proceed(); |
| | | } else { |
| | | throw new NoPermissionException(); |
| | | } |
| | | } else { |
| | | //检查指定角色 |
| | | boolean result = PermissionCheckManager.check(permissions); |
| | | if (result) { |
| | | return point.proceed(); |
| | | } else { |
| | | throw new NoPermissionException(); |
| | | } |
| | | } |
| | | // } else { |
| | | // throw new NoPermissionException(); |
| | | // } |
| | | // } else { |
| | | // //检查指定角色 |
| | | // boolean result = PermissionCheckManager.check(permissions); |
| | | // if (result) { |
| | | // return point.proceed(); |
| | | // } else { |
| | | // throw new NoPermissionException(); |
| | | // } |
| | | // } |
| | | // |
| | | // } |
| | | |
| | | } |
| | | |
| | | } |
| | | }} |
| | |
| | | package com.stylefeng.guns.modular.system.controller; |
| | | |
| | | |
| | | import com.alibaba.druid.support.json.JSONUtils; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | | import com.stylefeng.guns.core.common.constant.JwtConstants; |
| | | import com.stylefeng.guns.core.common.exception.BizExceptionEnum; |
| | | import com.stylefeng.guns.core.exception.GunsException; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.dto.QuestionDto; |
| | | import com.stylefeng.guns.modular.system.model.TDevice; |
| | | import com.stylefeng.guns.modular.system.model.TUserData; |
| | | import com.stylefeng.guns.modular.system.model.TUserDateData; |
| | | import com.stylefeng.guns.modular.system.model.User; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.ITDeviceService; |
| | | import com.stylefeng.guns.modular.system.service.ITUserDataService; |
| | | import com.stylefeng.guns.modular.system.service.ITUserDateDataService; |
| | | import com.stylefeng.guns.modular.system.service.IUserService; |
| | | import com.stylefeng.guns.modular.system.util.R; |
| | | import com.stylefeng.guns.modular.system.util.RedisService; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.InputStream; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public R<TDevice> checkeq(HttpServletRequest request){ |
| | | public R checkeq(HttpServletRequest request){ |
| | | Integer uid = redisService.getCacheObject(request.getHeader(JwtConstants.AUTH_HEADER)); |
| | | |
| | | List<TDevice> bindId = deviceService.selectList(new EntityWrapper<TDevice>().eq("bindId", uid)); |
| | | if (bindId.isEmpty()){ |
| | | return R.fail("未绑定硬件"); |
| | | return R.fail("当前用户暂未绑定设备"); |
| | | } |
| | | |
| | | return R.ok(bindId.get(0)); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/unbind") |
| | | @ApiOperation(value = "解绑", tags = {"App接口"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public R unbind(HttpServletRequest request){ |
| | | Integer uid = redisService.getCacheObject(request.getHeader(JwtConstants.AUTH_HEADER)); |
| | | |
| | | List<TDevice> bindId = deviceService.selectList(new EntityWrapper<TDevice>().eq("bindId", uid)); |
| | | |
| | | for (TDevice tDevice : bindId) { |
| | | deviceService.deleteById(tDevice.getId()); |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ResponseBody |
| | |
| | | device.setBindId(uid); |
| | | if (deviceService.selectList(new EntityWrapper<TDevice>().eq("mac", device.getMac())).isEmpty()) { |
| | | device.setBindId(uid); |
| | | device.setBindTime(new Date()); |
| | | deviceService.insert(device); |
| | | }else { |
| | | TDevice serNum = deviceService.selectOne(new EntityWrapper<TDevice>().eq("serNum", device.getSerNum())); |
| | | serNum.setBindId(uid); |
| | | serNum.setBindTime(new Date()); |
| | | deviceService.updateById(serNum); |
| | | } |
| | | return R.ok(); |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public R<PageInfo<TUserDateData>> datalist(HttpServletRequest request,Integer pageNum,Integer pageSize,Integer night,String date) { |
| | | public R<PageInfo<TUserDateData>> datalist(HttpServletRequest request, Integer pageNum, Integer pageSize, Integer night, String date) { |
| | | Integer userId = redisService.getCacheObject(request.getHeader(JwtConstants.AUTH_HEADER)); |
| | | |
| | | PageHelper.startPage(pageNum,pageSize); |
| | |
| | | |
| | | tUserDateDataEntityWrapper.setSqlSelect("id","date","night"); |
| | | List<TUserDateData> tUserDateData = dateDataService.selectList(tUserDateDataEntityWrapper); |
| | | for (TUserDateData tUserDateDatum : tUserDateData) { |
| | | tUserDateDatum.setTUserDataArray(new TUserData[]{}); |
| | | } |
| | | PageInfo<TUserDateData> info=new PageInfo<>(tUserDateData); |
| | | System.err.println(info); |
| | | |
| | | return R.ok(info); |
| | | |
| | | } |
| | | |
| | | @PostMapping("/api/clear") |
| | | @ApiOperation(value = "设备clear", tags = {"App接口"}, notes = "") |
| | | @ResponseBody |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public R clear(String serNum) { |
| | | //获取当天18点的时间 |
| | | redisService.setCacheObject("CLEAR:"+serNum, new Date()); |
| | | |
| | | return R.ok(); |
| | | |
| | | |
| | | } |
| | | |
| | | @PostMapping("/api/ifclear") |
| | | @ApiOperation(value = "设备是否需要clear", tags = {"App接口"}, notes = "") |
| | | @ResponseBody |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public R ifclear(String serNum) { |
| | | //获取当天18点的时间 |
| | | Date cacheObject = redisService.getCacheObject("CLEAR:"+serNum); |
| | | |
| | | if (cacheObject!=null){ |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.set(Calendar.HOUR_OF_DAY, 18); |
| | | calendar.set(Calendar.MINUTE, 0); |
| | | calendar.set(Calendar.SECOND, 0); |
| | | calendar.set(Calendar.MILLISECOND, 0); |
| | | |
| | | Date dateAt1800 = calendar.getTime(); |
| | | if (cacheObject.before(dateAt1800)){ |
| | | return R.ok(false); |
| | | }else { |
| | | return R.ok(true); |
| | | } |
| | | }else { |
| | | return R.ok(true); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @PostMapping("/api/link") |
| | | @ApiOperation(value = "设备连接断开", tags = {"App接口"}, notes = "") |
| | | @ResponseBody |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public R link(@RequestBody LinkQuery linkQuery) { |
| | | TDevice serNum = deviceService.selectOne(new EntityWrapper<TDevice>().eq("serNum", linkQuery.getSerNum())); |
| | | serNum.setStatus(linkQuery.getStatus()); |
| | | deviceService.updateById(serNum); |
| | | if (linkQuery.getStatus()==0){ |
| | | Long timestamp = new Date().getTime(); |
| | | redisService.setCacheObject(linkQuery.getSerNum(), timestamp.toString()); |
| | | } |
| | | return R.ok(); |
| | | |
| | | |
| | | } |
| | | |
| | | @PostMapping("/api/last") |
| | | @ApiOperation(value = "获取上次断开时间", tags = {"App接口"}, notes = "") |
| | | @ResponseBody |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public R last(String serNum) { |
| | | String date = (String)redisService.getCacheObject(serNum); |
| | | return R.ok(date); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | @PostMapping("/api/datadetail") |
| | | @ApiOperation(value = "检测记录详情", tags = {"App接口"}, notes = "") |
| | |
| | | }) |
| | | public R<TUserDateData> datadetail(HttpServletRequest request,Integer dataId) { |
| | | TUserDateData tUserDateData = dateDataService.selectById(dataId); |
| | | |
| | | |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | TUserData[] tUserDataArray = new TUserData[]{}; |
| | | try { |
| | | // 将JSON字符串转换为TUserData数组 |
| | | tUserDataArray = mapper.readValue(tUserDateData.getData(), TUserData[].class); |
| | | for (TUserData tUserData : tUserDataArray) { |
| | | tUserData.setTime(tUserData.getDetectionTime().getTime()); |
| | | } |
| | | tUserDateData.setTUserDataArray(tUserDataArray); |
| | | // 打印转换后的数组,以便验证 |
| | | System.out.println(Arrays.toString(tUserDataArray)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | tUserDateData.setData(null); |
| | | |
| | | return R.ok(tUserDateData); |
| | | |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public R pulldata(HttpServletRequest request, @RequestBody List<TUserData> data){ |
| | | public R pulldata(HttpServletRequest request, @RequestParam("file") MultipartFile file) throws ParseException, JsonProcessingException { |
| | | Integer uid = redisService.getCacheObject(request.getHeader(JwtConstants.AUTH_HEADER)); |
| | | List<TUserData> data = new ArrayList<>(); |
| | | |
| | | data = userDataService.selectList(null); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | Workbook book = WoUtil.ImportFile(file); |
| | | Sheet sh = book.getSheetAt(0); //获取到第一个表 |
| | | for (int i = 1; i <= sh.getLastRowNum(); i++) { |
| | | Row row = sh.getRow(i); |
| | | |
| | | |
| | | Cell cell2 = row.getCell(2); //所属加盟商[提示:加盟车辆选填] |
| | | Integer two = null; |
| | | if (SinataUtil.isNotEmpty(cell2)) { |
| | | two = (int)cell2.getNumericCellValue(); |
| | | } |
| | | |
| | | |
| | | Cell cell4 = row.getCell(4); //服务模式:出租车[是/否] |
| | | String four = null; |
| | | if (SinataUtil.isNotEmpty(cell4)) { |
| | | four = String.valueOf(cell4.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell5 = row.getCell(1); // 服务模式: 出租车[是/否] |
| | | Date five = null; |
| | | int divisor = 5; |
| | | if (SinataUtil.isNotEmpty(cell5)) { |
| | | double numericValue = cell5.getNumericCellValue(); |
| | | long timestamp = (long) numericValue; // 如果数值是整数毫秒时间戳 |
| | | five = new Date(timestamp); |
| | | long seconds = timestamp / 1000; |
| | | |
| | | // 判断秒数是否为divisor的倍数 |
| | | boolean isMultiple = seconds % divisor == 0; |
| | | if (!isMultiple){ |
| | | // continue; |
| | | } |
| | | } else { |
| | | // 处理单元格为空的情况 |
| | | } |
| | | // System.err.println("===="); |
| | | TUserData tUserData = new TUserData(); |
| | | tUserData.setUserId(uid); |
| | | tUserData.setDetectionTime(five); |
| | | tUserData.setPosition(four); |
| | | tUserData.setShapeVariable(Integer.valueOf(two)); |
| | | data.add(tUserData); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // data = userDataService.selectList(null); |
| | | Map<String, List<TUserData>> groupedData = data.stream() |
| | | .collect(Collectors.groupingBy( |
| | | item -> { |
| | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | List<TUserData> list = Arrays.asList(tUserDataArray); |
| | | list.addAll(entry.getValue()); |
| | | List<TUserData> list = new ArrayList<>(); // 初始化一个空的 ArrayList |
| | | list.addAll(Arrays.asList(tUserDataArray)); // 将原始数组添加到列表中 |
| | | List<TUserData> value = entry.getValue(); |
| | | list.addAll(value); |
| | | String jsonInString = mapper.writeValueAsString(list); |
| | | tUserDateData1.setData(jsonInString); |
| | | dateDataService.updateById(tUserDateData1); |
| | | }else { |
| | | TUserDateData tUserDateData2 = new TUserDateData(); |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | import static com.stylefeng.guns.core.support.HttpKit.getIp; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | @PostMapping("/regis") |
| | | @PostMapping("/base/regis") |
| | | @ApiOperation(value = "注册",tags = "APP登录") |
| | | @ResponseBody |
| | | public Tip regis(@RequestBody ResgisDto resgisDto) { |
| | |
| | | resgisDto.setCreatetime(new Date()); |
| | | resgisDto.setAccount(resgisDto.getPhone()); |
| | | |
| | | this.userService.insert(UserFactory.createUser1(resgisDto)); |
| | | User user1 = UserFactory.createUser1(resgisDto); |
| | | user1.setUid(generateUniqueId()); |
| | | this.userService.insert(user1); |
| | | return SUCCESS_TIP; |
| | | } |
| | | public static String generateUniqueId() { |
| | | // 获取当前日期并格式化为yyyyMMdd |
| | | LocalDate now = LocalDate.now(); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); |
| | | String formattedDate = now.format(formatter); |
| | | |
| | | // 生成四位随机数字 |
| | | Random random = new Random(); |
| | | int randomNumber = random.nextInt(9999); // 生成0到9998之间的数 |
| | | if (randomNumber < 1000) { // 确保是四位数 |
| | | randomNumber += 1000; |
| | | } |
| | | |
| | | return "YH" + formattedDate + String.valueOf(randomNumber); |
| | | } |
| | | |
| | | /** |
| | | * 跳转到主页 |
| | |
| | | @Permission |
| | | @ResponseBody |
| | | public Object list(@RequestParam(required = false) String name, |
| | | @RequestParam(required = false) String phone, |
| | | @RequestParam(required = false) String beginTime, |
| | | @RequestParam(required = false) String endTime, |
| | | @RequestParam(required = false) Integer deptid, |
| | |
| | | beginTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | List<Map<String, Object>> users = userService.selectUsers(null, name, beginTime, endTime, deptid,high1,high2,weight1,weight2,hospital,tag); |
| | | List<Map<String, Object>> users = userService.selectUsers(null, name,phone, beginTime, endTime, deptid,high1,high2,weight1,weight2,hospital,tag); |
| | | return new UserWarpper(users).warp(); |
| | | } |
| | | |
| | |
| | | String time1 = format.format(date); |
| | | String fileName ="用户信息.xls"; |
| | | String[] title = new String[] {"用户名","手机号","出生日期","身高","体重","就诊医院","用户标签","注册时间","问卷调查分数"}; |
| | | List<Map<String, Object>> users = userService.selectUsers(null, null, null, null, null,null,null,null,null,null,null); |
| | | List<Map<String, Object>> users = userService.selectUsers(null, null,null, null, null, null,null,null,null,null,null,null); |
| | | String[][] values = new String[users.size()][]; |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); // 设置日期时间格式 |
| | | SimpleDateFormat formatter1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 设置日期时间格式 |
| | |
| | | values[i][4] = d.get("weight").toString(); |
| | | values[i][5] = (String) d.get("hospital"); |
| | | String tagsName = (String) d.get("tagsName"); |
| | | String replace = tagsName.replace(",", ";"); |
| | | values[i][6] = replace; |
| | | if (tagsName!=null) { |
| | | String replace = tagsName.replace(",", ";"); |
| | | values[i][6] = replace; |
| | | } |
| | | values[i][7] = formatter1.format(d.get("createtime")); // 将Date类型转换为String |
| | | values[i][8] = formatter.format(d.get("createtime")); // 将Date类型转换为String |
| | | |
| | |
| | | * 判断当前登录的用户是否有操作这个用户的权限 |
| | | */ |
| | | private void assertAuth(Integer userId) { |
| | | if (ShiroKit.isAdmin()) { |
| | | return; |
| | | } |
| | | List<Integer> deptDataScope = ShiroKit.getDeptDataScope(); |
| | | User user = this.userService.selectById(userId); |
| | | Integer deptid = user.getDeptid(); |
| | | if (deptDataScope.contains(deptid)) { |
| | | return; |
| | | } else { |
| | | throw new GunsException(BizExceptionEnum.NO_PERMITION); |
| | | } |
| | | // if (ShiroKit.isAdmin()) { |
| | | // return; |
| | | // } |
| | | // List<Integer> deptDataScope = ShiroKit.getDeptDataScope(); |
| | | // User user = this.userService.selectById(userId); |
| | | // Integer deptid = user.getDeptid(); |
| | | // if (deptDataScope.contains(deptid)) { |
| | | // return; |
| | | // } else { |
| | | // throw new GunsException(BizExceptionEnum.NO_PERMITION); |
| | | // } |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TDevice; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | */ |
| | | public interface TDeviceMapper extends BaseMapper<TDevice> { |
| | | |
| | | List<Map<String,Object>> searchList(String serNum, String phone, String name, Integer status); |
| | | List<Map<String,Object>> searchList(@Param("serNum") String serNum,@Param("phone") String phone,@Param("name") String name,@Param("status") Integer status); |
| | | } |
| | |
| | | */ |
| | | List<Map<String, Object>> selectUsers(@Param("dataScope") DataScope dataScope, |
| | | @Param("name") String name, |
| | | @Param("phone") String phone, |
| | | @Param("beginTime") String beginTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("deptid") Integer deptid, |
| | |
| | | FROM |
| | | sys_user su |
| | | LEFT JOIN t_tags tt ON FIND_IN_SET(tt.id, su.tags) > 0 |
| | | where su.status !=3 |
| | | where su.status !=3 and su.id !=1 and su.id != 2 |
| | | |
| | | <if test="phone != null and phone != ''"> |
| | | and account like CONCAT('%',#{phone},'%') |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and (phone like CONCAT('%',#{name},'%') |
| | | or account like CONCAT('%',#{name},'%') |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class LinkQuery { |
| | | @ApiModelProperty("序列号") |
| | | private String serNum; |
| | | @ApiModelProperty("0未连接1已连接") |
| | | private Integer status; |
| | | } |
| | |
| | | * 检测时间 |
| | | */ |
| | | private Date detectionTime; |
| | | private Long time; |
| | | /** |
| | | * 形变量 |
| | | */ |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | |
| | | private String date; |
| | | private String data; |
| | | private Integer userId; |
| | | @TableField(exist = false) |
| | | private TUserData[] tUserDataArray; |
| | | |
| | | |
| | | public Integer getId() { |
| | |
| | | */ |
| | | @TableId(value="id", type= IdType.AUTO) |
| | | private Integer id; |
| | | private String uid; |
| | | /** |
| | | * 头像 |
| | | */ |
| | |
| | | */ |
| | | List<Map<String, Object>> selectUsers(@Param("dataScope") DataScope dataScope, |
| | | @Param("name") String name, |
| | | @Param("phone") String phone, |
| | | @Param("beginTime") String beginTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("deptid") Integer deptid, |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> selectUsers(DataScope dataScope, String name, String beginTime, String endTime, Integer deptid, |
| | | public List<Map<String, Object>> selectUsers(DataScope dataScope, String name,String phone, String beginTime, String endTime, Integer deptid, |
| | | Integer high1, |
| | | Integer high2, |
| | | Integer weight1, |
| | | Integer weight2, |
| | | String hospital, |
| | | Integer tag) { |
| | | return this.baseMapper.selectUsers(dataScope, name, beginTime, endTime, deptid,high1,high2,weight1,weight2,hospital,tag); |
| | | return this.baseMapper.selectUsers(dataScope, name,phone, beginTime, endTime, deptid,high1,high2,weight1,weight2,hospital,tag); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | |
| | | import org.apache.poi.hssf.usermodel.*; |
| | | import org.apache.poi.ss.usermodel.CellType; |
| | | import org.apache.poi.ss.usermodel.HorizontalAlignment; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.net.URLEncoder; |
| | |
| | | // 第四步,创建单元格,并设置值表头 设置表头居中 |
| | | HSSFCellStyle style = wb.createCellStyle(); |
| | | // 创建一个居中格式 |
| | | style.setAlignment((short) 2); |
| | | style.setAlignment(HorizontalAlignment.forInt((short) 2)); |
| | | HSSFCell cell = null; |
| | | // 创建标题 |
| | | for (int i = 0; i < title.length; i++) { |
| | | cell = row.createCell(i); |
| | | cell.setCellType(1); |
| | | cell.setCellType(CellType.forInt(1)); |
| | | cell.setCellValue(title[i]); |
| | | cell.setCellStyle(style); |
| | | } |
| | |
| | | |
| | | public static <T> R<T> fail() { |
| | | |
| | | return restResult(null, FAIL, null); |
| | | return (R<T>) restResult(new Object(), FAIL, null); |
| | | } |
| | | |
| | | public static <T> R<T> fail(String msg) { |
| | | log.error(msg); |
| | | return restResult(null, FAIL, msg); |
| | | return (R<T>) restResult(new Object(), FAIL, msg); |
| | | } |
| | | |
| | | public static <T> R<T> fail(T data) { |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * 定义统一返回对象 |
| | | */ |
| | | @ApiModel(value = "统一返回结果集") |
| | | public class ResultUtil<T> { |
| | | |
| | | public static final Integer SUCCESS = 10000; |
| | | |
| | | public static final Integer PARAM_ERROR = 10010; |
| | | |
| | | public static final Integer SYSTEM_INFO = 10020; |
| | | |
| | | public static final Integer TOKEN_ERROR = 10030; |
| | | |
| | | public static final Integer SIGN_ERROR = 10040; |
| | | |
| | | public static final Integer RUNTIME_ERROR = 10050; |
| | | |
| | | public static final String Token = "token无效"; |
| | | |
| | | public static final String SIGN = "签名无效"; |
| | | |
| | | @ApiModelProperty(name = "code", value = "业务状态码 10000:成功,10010:参数错误,10020:系统提示, 10030:身份校验异常,10040:签名不通过,10050:系统运行异常") |
| | | private Integer code;//备用状态码 |
| | | |
| | | @ApiModelProperty(name = "msg", value = "返回结果说明") |
| | | private String msg;//返回说明 |
| | | |
| | | @ApiModelProperty(name = "data", value = "返回结果值") |
| | | private T data;//返回数据 |
| | | |
| | | |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public T getData() { |
| | | return data; |
| | | } |
| | | |
| | | |
| | | public Integer getCode() { |
| | | return code; |
| | | } |
| | | |
| | | private ResultUtil(Integer code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | private ResultUtil(Integer code, String msg, T data) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | this.data = data; |
| | | } |
| | | |
| | | |
| | | public static <T> ResultUtil<T> getResult(Integer code, String msg){ |
| | | return new ResultUtil<>(code, msg); |
| | | } |
| | | |
| | | public static <T> ResultUtil<T> getResult(Integer code, String msg, T data){ |
| | | return new ResultUtil<>(code, msg, data); |
| | | } |
| | | |
| | | /** |
| | | * 错误信息 |
| | | * @return |
| | | */ |
| | | public static ResultUtil error(String mag){ |
| | | return ResultUtil.getResult(ResultUtil.SYSTEM_INFO, mag, new Object()); |
| | | } |
| | | |
| | | /** |
| | | * 错误信息 |
| | | * @return |
| | | */ |
| | | public static <T> ResultUtil <T> error(String mag, T obj){ |
| | | return ResultUtil.getResult(ResultUtil.SYSTEM_INFO, mag, obj); |
| | | } |
| | | |
| | | /** |
| | | * token失效 |
| | | * @return |
| | | */ |
| | | public static ResultUtil tokenErr(){ |
| | | return ResultUtil.getResult(ResultUtil.TOKEN_ERROR, ResultUtil.Token, new Object()); |
| | | } |
| | | |
| | | /** |
| | | * token失效 |
| | | * @return |
| | | */ |
| | | public static ResultUtil tokenErr(String msg){ |
| | | return ResultUtil.getResult(ResultUtil.TOKEN_ERROR, msg, new Object()); |
| | | } |
| | | |
| | | /** |
| | | * 参数异常 |
| | | * @return |
| | | */ |
| | | public static ResultUtil paranErr(String ages){ |
| | | return ResultUtil.getResult(ResultUtil.PARAM_ERROR, "【" + ages + "】参数异常", new Object()); |
| | | } |
| | | |
| | | /** |
| | | * 参数异常 |
| | | * @return |
| | | */ |
| | | public static ResultUtil paranErr(){ |
| | | return ResultUtil.getResult(ResultUtil.PARAM_ERROR, "参数异常", new Object()); |
| | | } |
| | | |
| | | /** |
| | | * 运行异常 |
| | | * @return |
| | | */ |
| | | public static ResultUtil runErr(){ |
| | | return ResultUtil.getResult(ResultUtil.RUNTIME_ERROR, "系统运行异常", new Object()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 运行异常 |
| | | * @return |
| | | */ |
| | | public static <T>ResultUtil<T> runErr(T data){ |
| | | return ResultUtil.getResult(ResultUtil.RUNTIME_ERROR, "系统运行异常", data); |
| | | } |
| | | |
| | | /** |
| | | * 运行异常 |
| | | * @return |
| | | */ |
| | | public static <T>ResultUtil<T> runErr(T data, String msg){ |
| | | return ResultUtil.getResult(ResultUtil.RUNTIME_ERROR, msg, data); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 返回成功 |
| | | * @param |
| | | * @return |
| | | */ |
| | | public static ResultUtil success(){ |
| | | return ResultUtil.getResult(ResultUtil.SUCCESS, "成功", new Object()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 返回成功 |
| | | * @param data |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public static <T> ResultUtil<T> success(T data){ |
| | | return ResultUtil.getResult(ResultUtil.SUCCESS, "成功", data); |
| | | } |
| | | |
| | | /** |
| | | * 返回成功 |
| | | * @param msg |
| | | * @param data |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public static <T> ResultUtil<T> success(String msg, T data){ |
| | | return ResultUtil.getResult(ResultUtil.SUCCESS, msg, data); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 签名无效 |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public static <T> ResultUtil<T> sign(){ |
| | | return ResultUtil.getResult(ResultUtil.SIGN_ERROR, SIGN); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import java.net.URLEncoder; |
| | | import java.text.DecimalFormat; |
| | | import java.text.NumberFormat; |
| | | import java.text.ParseException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | |
| | | /** |
| | | * 基本数据处理工具类 |
| | | */ |
| | | public class SinataUtil { |
| | | |
| | | |
| | | /** |
| | | * List集合分页<br/> |
| | | * 创建人:Mryang<br/> |
| | | * 时间:2016年7月28日-下午2:58:14 <br/> |
| | | * @param <T> |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param list |
| | | * @throws Exception List<UserOrderList> <br/> |
| | | */ |
| | | public static <T> List<T> listpage(int pageNo, int pageSize, List<T> list) throws Exception { |
| | | List<T> result = new ArrayList<T>(); |
| | | if (list != null && list.size() > 0) { |
| | | int allCount = list.size(); |
| | | if(pageNo > 1 && allCount < pageSize) { |
| | | return new ArrayList<>(); |
| | | } |
| | | int pageCount = (allCount + pageSize - 1) / pageSize; |
| | | if (pageNo >= pageCount) { |
| | | pageNo = pageCount; |
| | | } |
| | | int start = (pageNo - 1) * pageSize; |
| | | int end = pageNo * pageSize; |
| | | if (end >= allCount) { |
| | | end = allCount; |
| | | } |
| | | for (int i = start; i < end; i++) { |
| | | result.add(list.get(i)); |
| | | } |
| | | } |
| | | return (result != null && result.size() > 0) ? result : new ArrayList<T>(); |
| | | } |
| | | |
| | | /** |
| | | * Double类型取整 |
| | | * @param num |
| | | * @return |
| | | */ |
| | | public static String doubleTrans(double num) { |
| | | return String.valueOf((long) num); |
| | | } |
| | | |
| | | /** |
| | | * Double类型保留1位小数 |
| | | * |
| | | * @param num |
| | | * @return |
| | | */ |
| | | public static String doubleRetainOne(double num) { |
| | | DecimalFormat dfs = new DecimalFormat("0.0"); |
| | | return dfs.format(num); |
| | | } |
| | | |
| | | /** |
| | | * 5位随机数 |
| | | * @return |
| | | */ |
| | | public static synchronized String getFive() { |
| | | int i=(int)((Math.random()*9+1)*10000); |
| | | return i+""; |
| | | } |
| | | /** |
| | | * Double类型保留2位小数 |
| | | * |
| | | * @param num |
| | | * @return |
| | | */ |
| | | public static String doubleRetainTwo(double num) { |
| | | DecimalFormat dfs = new DecimalFormat("0.00"); |
| | | String.format("%.2f", num); |
| | | return dfs.format(num); |
| | | } |
| | | |
| | | /** |
| | | * Double类型保留1位小数(四舍五入) |
| | | * |
| | | * @param num |
| | | * @return |
| | | */ |
| | | public static String doubleForwardOne(double num) { |
| | | return String.format("%.1f", num); |
| | | } |
| | | |
| | | /** |
| | | * Double类型保留2位小数(四舍五入) |
| | | * |
| | | * @param num |
| | | * @return |
| | | */ |
| | | public static String doubleForwardTwo(double num) { |
| | | return String.format("%.2f", num); |
| | | } |
| | | |
| | | /** |
| | | * 字符串转换成Ascii |
| | | * |
| | | * @param value |
| | | * @return |
| | | */ |
| | | public static String stringToAscii(String value) { |
| | | StringBuffer sbu = new StringBuffer(); |
| | | char[] chars = value.toCharArray(); |
| | | for (int i = 0; i < chars.length; i++) { |
| | | if (i != chars.length - 1) { |
| | | sbu.append((int) chars[i]); |
| | | } else { |
| | | sbu.append((int) chars[i]); |
| | | } |
| | | } |
| | | return sbu.toString(); |
| | | } |
| | | |
| | | /** |
| | | * 小数转换为百分比 |
| | | * |
| | | * @param decimal |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | public static String decTurnPercent(double decimal) { |
| | | NumberFormat num = NumberFormat.getPercentInstance(); |
| | | num.setMaximumIntegerDigits(3); |
| | | num.setMaximumFractionDigits(2); |
| | | return num.format(decimal); |
| | | } |
| | | |
| | | /** |
| | | * Ascii转换成字符串 |
| | | * |
| | | * @param value |
| | | * @return |
| | | */ |
| | | public static String asciiToString(String value) { |
| | | String[] chars = value.split(","); |
| | | StringBuffer sbu = new StringBuffer(); |
| | | for (int i = 0; i < chars.length; i++) { |
| | | sbu.append((char) Integer.parseInt(chars[i])); |
| | | } |
| | | return sbu.toString(); |
| | | } |
| | | |
| | | /** |
| | | * 字符串转换unicode |
| | | * |
| | | * @param string |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | public static String string2Unicode(String string) { |
| | | StringBuffer unicode = new StringBuffer(); |
| | | for (int i = 0; i < string.length(); i++) { |
| | | // 取出每一个字符 |
| | | char c = string.charAt(i); |
| | | // 转换为unicode |
| | | unicode.append("\\u" + Integer.toHexString(c)); |
| | | } |
| | | return unicode.toString(); |
| | | } |
| | | |
| | | /** |
| | | * unicode 转字符串 |
| | | * |
| | | * @param unicode |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | public static String unicode2String(String unicode) { |
| | | StringBuffer string = new StringBuffer(); |
| | | String[] hex = unicode.split("\\\\u"); |
| | | for (int i = 1; i < hex.length; i++) { |
| | | // 转换出每一个代码点 |
| | | int data = Integer.parseInt(hex[i], 16); |
| | | // 追加成string |
| | | string.append((char) data); |
| | | } |
| | | return string.toString(); |
| | | } |
| | | |
| | | /** |
| | | * 字符串编码转换的实现方法 |
| | | * |
| | | * @param str |
| | | * 待转换编码的字符串 |
| | | * @param newCharset |
| | | * 目标编码 |
| | | * @return |
| | | * @throws UnsupportedEncodingException |
| | | */ |
| | | public static String changeCharset(String str, String newCharset) throws UnsupportedEncodingException { |
| | | if (str != null) { |
| | | // 用默认字符编码解码字符串。 |
| | | byte[] bs = str.getBytes(); |
| | | // 用新的字符编码生成字符串 |
| | | return new String(bs, newCharset); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 注: \n 回车( ) \t 水平制表符( ) \s 空格(\u0008) \r 换行( ) |
| | | * |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public static String replaceBlank(String str) { |
| | | String dest = ""; |
| | | if (str != null) { |
| | | Pattern p = Pattern.compile("\\s*|\t|\r|\n"); |
| | | Matcher m = p.matcher(str); |
| | | dest = m.replaceAll(""); |
| | | } |
| | | return dest; |
| | | } |
| | | |
| | | /** |
| | | * 判断该字符串不能为空 |
| | | * |
| | | * @param str |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | public static boolean isNotEmpty(Object str) { |
| | | return !isEmpty(str); |
| | | } |
| | | |
| | | |
| | | public static boolean isNotEmptyUndefined(Object str) { |
| | | return !isEmpty(str) && !str.toString().equals("undefined"); |
| | | } |
| | | |
| | | /** |
| | | * 字符串编码转换的实现方法 |
| | | * |
| | | * @param str |
| | | * 待转换编码的字符串 |
| | | * @param oldCharset |
| | | * 原编码 |
| | | * @param newCharset |
| | | * 目标编码 |
| | | * @return |
| | | * @throws UnsupportedEncodingException |
| | | */ |
| | | public static String changeCharset(String str, String oldCharset, String newCharset) throws UnsupportedEncodingException { |
| | | if (str != null) { |
| | | // 用旧的字符编码解码字符串。解码可能会出现异常。 |
| | | byte[] bs = str.getBytes(oldCharset); |
| | | // 用新的字符编码生成字符串 |
| | | return new String(bs, newCharset); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 给手机号码加分割符 |
| | | * |
| | | * @param phone |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | public static String splitPhone(String phone) { |
| | | if (isNotEmpty(phone)) { |
| | | String strone = phone.substring(0, 3); |
| | | String strtwo = phone.substring(strone.length(), 7); |
| | | String strthree = phone.substring(strtwo.length() + strone.length(), phone.length()); |
| | | return strone + "-" + strtwo + "-" + strthree; |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * 非空判断 |
| | | * |
| | | * @param str |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | public static boolean isEmpty(Object str) { |
| | | return str == null || str.toString().length() == 0 || str.equals("") || str.toString().matches("\\s*"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 将List<{@link Object}>转换成List<{@link T}> |
| | | * |
| | | * @param list |
| | | * 将要转换的对象 |
| | | * @param clazs |
| | | * 需要转换的泛型对象 |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | public static <T> List<T> fromToObject(List<?> list, Class<T> clazs) { |
| | | List<T> t = new ArrayList<T>(); |
| | | for (Object object : list) { |
| | | t.add((T) object); |
| | | } |
| | | return t; |
| | | } |
| | | |
| | | /** |
| | | * 生成 uuid, 即用来标识一笔单,也用做 nonce_str |
| | | * @return |
| | | */ |
| | | public static String generateUUID() { |
| | | return UUID.randomUUID().toString().replaceAll("-", "").substring(0, 32); |
| | | } |
| | | |
| | | /** |
| | | * 将List<{@link Object}>转换成List<{@link Map<String, Object>}> |
| | | * |
| | | * @param list |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | public static List<Map<String, Object>> fromToObject_M(List<?> list) { |
| | | List<Map<String, Object>> t = new ArrayList<Map<String, Object>>(); |
| | | for (Object object : list) { |
| | | t.add((Map<String, Object>) object); |
| | | } |
| | | return t; |
| | | } |
| | | |
| | | /** |
| | | * URL编码 |
| | | * |
| | | * @param url |
| | | * @return |
| | | */ |
| | | @SuppressWarnings("deprecation") |
| | | public static String URLEncode(String url) { |
| | | try { |
| | | return URLEncoder.encode(url, "UTF-8"); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return URLEncoder.encode(url); |
| | | } |
| | | |
| | | /** |
| | | * URL解码 |
| | | * |
| | | * @param url |
| | | * @return |
| | | */ |
| | | @SuppressWarnings("deprecation") |
| | | public static String URLDecode(String url) { |
| | | try { |
| | | return URLDecoder.decode(url, "UTF-8"); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return URLDecoder.decode(url); |
| | | } |
| | | public static void main(String[] args) throws ParseException { |
| | | |
| | | System.out.println(doubleRetainTwo(0.0)); |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util; |
| | | |
| | | |
| | | |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | public class WoUtil { |
| | | public static Workbook ImportFile(MultipartFile importFile) { |
| | | Workbook book = null; |
| | | if(importFile == null) |
| | | { |
| | | //throw new WoException(SysConstant.ERR_EXCEL_NULL); |
| | | } |
| | | String fileName = importFile.getOriginalFilename(); |
| | | try { |
| | | if(fileName.endsWith(".xlsx")) //当表格的后缀是".xlsx时" |
| | | { |
| | | book = new XSSFWorkbook(importFile.getInputStream()); |
| | | }else |
| | | { |
| | | book = new HSSFWorkbook(importFile.getInputStream()); |
| | | } |
| | | } catch (IOException e) { |
| | | //throw new WoException(e,SysConstant.ERR_EXCEL_NO); |
| | | } |
| | | return book; |
| | | } |
| | | } |
| | |
| | | |
| | | guns: |
| | | swagger-open: true #是否开启swagger (true/false) |
| | | kaptcha-open: false #是否开启登录时验证码 (true/false) |
| | | kaptcha-open: true #是否开启登录时验证码 (true/false) |
| | | # file-upload-path: d:/tmp #文件上传目录(不配置的话为java.io.tmpdir目录) |
| | | spring-session-open: false #是否开启spring session,如果是多机环境需要开启(true/false) |
| | | session-invalidate-time: 1800 #session失效时间(只在单机环境下生效,多机环境在SpringSessionConfig类中配置) 单位:秒 |
| | |
| | | |
| | | spring: |
| | | profiles: |
| | | active: @spring.active@ |
| | | active: local |
| | | mvc: |
| | | static-path-pattern: /static/** |
| | | view: |
| | |
| | | spring: |
| | | profiles: local |
| | | datasource: |
| | | url: jdbc:mysql://127.0.0.1:3306/man_health?useSSL=false&serverTimezone=GMT&useUnicode=true&&characterEncoding=utf-8&&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://1.92.197.158:3306/man_health?useSSL=false&serverTimezone=GMT&useUnicode=true&&characterEncoding=utf-8&&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: 123456 |
| | | password: Xiwang2024! |
| | | db-name: man_health #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | redis: |
| | |
| | | <link href="${ctxPath}/static/css/plugins/webuploader/webuploader.css" rel="stylesheet"> |
| | | <link href="${ctxPath}/static/css/plugins/ztree/zTreeStyle.css" rel="stylesheet"> |
| | | <link href="${ctxPath}/static/css/plugins/bootstrap-treetable/bootstrap-treetable.css" rel="stylesheet"/> |
| | | <!-- <link href="${ctxPath}/static/css/plugins/ztree/demo.css" rel="stylesheet"> --> |
| | | <link href="${ctxPath}/static/js/plugins/sweetalert/sweetalert.min.js"/> |
| | | 、 <!-- <link href="${ctxPath}/static/css/plugins/ztree/demo.css" rel="stylesheet"> --> |
| | | |
| | | <!-- 全局js --> |
| | | <script src="${ctxPath}/static/js/jquery.min.js?v=2.1.4"></script> |
| | |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <ul class="nav navbar-top-links navbar-right"> |
| | | <li class="dropdown hidden-xs"> |
| | | <a class="right-sidebar-toggle" aria-expanded="false"> |
| | | <i class="fa fa-tasks"></i> 主题 |
| | | </a> |
| | | </li> |
| | | </ul> |
| | | <!-- <ul class="nav navbar-top-links navbar-right">--> |
| | | <!-- <li class="dropdown hidden-xs">--> |
| | | <!-- <a class="right-sidebar-toggle" aria-expanded="false">--> |
| | | <!-- <i class="fa fa-tasks"></i> 主题--> |
| | | <!-- </a>--> |
| | | <!-- </li>--> |
| | | <!-- </ul>--> |
| | | </nav> |
| | | </div> |
| | | <div class="row content-tabs"> |
| | | <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i> |
| | | </button> |
| | | <!-- <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>--> |
| | | <!-- </button>--> |
| | | <nav class="page-tabs J_menuTabs"> |
| | | <div class="page-tabs-content"> |
| | | <a href="javascript:;" class="active J_menuTab" data-id="${ctxPath}/blackboard">首页</a> |
| | | </div> |
| | | </nav> |
| | | <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i> |
| | | </button> |
| | | <!-- <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>--> |
| | | <!-- </button>--> |
| | | <div class="btn-group roll-nav roll-right"> |
| | | <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span> |
| | | <!-- <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span>--> |
| | | |
| | | </button> |
| | | <!-- </button>--> |
| | | <ul role="menu" class="dropdown-menu dropdown-menu-right"> |
| | | <li class="J_tabShowActive"><a>定位当前选项卡</a> |
| | | </li> |
| | |
| | | <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="${ctxPath}/blackboard" frameborder="0" data-id="${ctxPath}/blackboard" seamless></iframe> |
| | | </div> |
| | | <div class="footer"> |
| | | <div class="pull-right">© 2016-2017 <a href="http://git.oschina.net/naan1993/guns" target="_blank">guns</a> |
| | | </div> |
| | | <!-- <div class="pull-right">© 2016-2017 <a href="http://git.oschina.net/naan1993/guns" target="_blank">guns</a>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </div> |
| | |
| | | ${name} |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="${id}"> |
| | | <select class="form-control" id="${id} multiple> |
| | | ${tagBody!} |
| | | </select> |
| | | </div> |
| | |
| | | <meta charset="utf-8"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <meta name="renderer" content="webkit"> |
| | | <title>Guns - 主页</title> |
| | | <title>男性生殖健康检测管理平台</title> |
| | | <link rel="shortcut icon" href="${ctxPath}/static/favicon.ico"> |
| | | <link href="${ctxPath}/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet"> |
| | | <link href="${ctxPath}/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet"> |
| | |
| | | <meta charset="utf-8"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | |
| | | <title>Guns - 登录</title> |
| | | <title>男性生殖健康检测管理平台</title> |
| | | |
| | | <link rel="shortcut icon" href="${ctxPath}/static/favicon.ico"> |
| | | <link href="${ctxPath}/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet"> |
| | |
| | | <div class="middle-box text-center loginscreen"> |
| | | <div style="padding: 100px 0px;"> |
| | | <div> |
| | | <h1 class="logo-name">GS</h1> |
| | | <!-- <h1 class="logo-name">GS</h1>--> |
| | | <img src="${ctxPath}/static/44bf52d1b855daa5bc13d0c9bf3dc6d.png" style="width: 100px;height: 100px"></img> |
| | | </div> |
| | | <h3>欢迎使用 Guns</h3> |
| | | <h3>男性生殖健康检测管理平台</h3> |
| | | <br/> |
| | | <h4 style="color: red;">${tips!}</h4> |
| | | <form class="m-t" role="form" action="${ctxPath}/login" method="post"> |
| | |
| | | <br> |
| | | <input type="hidden" id="userId" name="userId" value="${user.id!}"> |
| | | <div class="circle-container" > |
| | | <img src="http://bao-weiqing.oss-cn-hangzhou.aliyuncs.com/driver/b55e3ce2-3b7f-49eb-b877-ef7589ba4c64.jpg" alt="Circle Image" class="circle-img"> |
| | | <img src="https://cqzxtaxi.obs.cn-southwest-2.myhuaweicloud.com/admin/75f4a96b2b2b440f8987830ad8c14814.png" alt="Circle Image" class="circle-img"> |
| | | </div> |
| | | </div> |
| | | <div class=" col-sm-11"> |
| | |
| | | } |
| | | }, |
| | | formatter: function (value, index) { |
| | | console.log("========1111===="+index) |
| | | console.log("========1111===="+value) |
| | | |
| | | return value; // 格式化标签文本,这里直接返回原值 |
| | | } |
| | | }, |
| | |
| | | // prettier-ignore |
| | | // data: [300, 280, 250, 260, 270, 300, 550, 500, 400, 390, 380, 390, 400, 500, 600, 750, 800, 700, 600, 400], |
| | | data: yData, |
| | | symbol: 'none', |
| | | markArea: { |
| | | itemStyle: { |
| | | color: 'rgba(148,145,145,0.4)' |
| | |
| | | // prettier-ignore |
| | | // data: [300, 280, 250, 260, 270, 300, 550, 500, 400, 390, 380, 390, 400, 500, 600, 750, 800, 700, 600, 400], |
| | | data: yData, |
| | | symbol: 'none', |
| | | markArea: { |
| | | itemStyle: { |
| | | color: 'rgba(148,145,145,0.4)' |
| | |
| | | <#NameCon id="hospital" name="就诊医院" /> |
| | | </div> |
| | | <div class="col-lg-3 col-sm-12"> |
| | | <#SelectCon id="tag" name="用户标签" > |
| | | <option value="">全部</option> |
| | | @for(obj in tags){ |
| | | <option value="${obj.id}"}>${obj.tagName}</option> |
| | | @} |
| | | </#SelectCon> |
| | | <div class="col-sm-3"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">用户标签 |
| | | </button> |
| | | </div> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="tag" name="tag"> |
| | | <option value="">全部</option> |
| | | @for(obj in tags){ |
| | | <option value="${obj.id}">${obj.tagName}</option> |
| | | @} |
| | | </select></div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/user/user.js"></script> |
| | | <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script> |
| | | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css"> |
| | | |
| | | |
| | | <script> |
| | | $('#tag').select2({ |
| | | multiple: true, |
| | | closeOnSelect: false |
| | | }); |
| | | |
| | | |
| | | function openAddTTags() { |
| | | console.log("====") |
| | | var index = layer.open({ |
| | |
| | | <div class="col-sm-10" style="background-color: #efefef; border-radius: 10px;align-items: center; "> |
| | | <div style="background-color: #efefef;align-items: center; ;padding-bottom: 20px; display: flex;padding-top: 10px"> |
| | | <div class="circle-container" > |
| | | <img src="${item.avatar}" alt="Circle Image" class="circle-img"> |
| | | <img src="https://cqzxtaxi.obs.cn-southwest-2.myhuaweicloud.com/admin/75f4a96b2b2b440f8987830ad8c14814.png" alt="Circle Image" class="circle-img"> |
| | | </div> |
| | | <div> |
| | | <span >${item.name}</span><br> |
| | |
| | | <div class="col-sm-10" style="background-color: #efefef; border-radius: 10px;align-items: center; "> |
| | | <div style="background-color: #efefef;align-items: center; ;padding-bottom: 20px; display: flex;padding-top: 10px"> |
| | | <div class="circle-container" > |
| | | <img src="${item.avatar}" alt="Circle Image" class="circle-img"> |
| | | <img src="https://cqzxtaxi.obs.cn-southwest-2.myhuaweicloud.com/admin/75f4a96b2b2b440f8987830ad8c14814.png" alt="Circle Image" class="circle-img"> |
| | | </div> |
| | | <div> |
| | | <span >${item.name}</span><br> |
| | |
| | | }, |
| | | confirm: function (tip, ensure) {//询问框 |
| | | parent.layer.confirm(tip, { |
| | | title: false, |
| | | btn: ['确定', '取消'] |
| | | }, function (index) { |
| | | ensure(); |
| | |
| | | ajaxOptions: { //ajax请求的附带参数 |
| | | data: this.data |
| | | }, |
| | | toolbar: "#" + this.toolbarId,//顶部工具条 |
| | | // toolbar: "#" + this.toolbarId,//顶部工具条 |
| | | striped: true, //是否显示行间隔色 |
| | | cache: false, //是否使用缓存,默认为true |
| | | pagination: true, //是否显示分页(*) |
| | | sortable: true, //是否启用排序 |
| | | sortable: false, //是否启用排序 |
| | | sortOrder: "desc", //排序方式 |
| | | pageNumber: 1, //初始化加载第一页,默认第一页 |
| | | pageSize: 14, //每页的记录行数(*) |
| | |
| | | }, // 向后台传递的自定义参数 |
| | | sidePagination: this.paginationType, //分页方式:client客户端分页,server服务端分页(*) |
| | | search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端 |
| | | strictSearch: true, //设置为 true启用 全匹配搜索,否则为模糊搜索 |
| | | showColumns: true, //是否显示所有的列 |
| | | showRefresh: true, //是否显示刷新按钮 |
| | | strictSearch: false, //设置为 true启用 全匹配搜索,否则为模糊搜索 |
| | | showColumns: false, //是否显示所有的列 |
| | | // showRefresh: true, //是否显示刷新按钮 |
| | | minimumCountColumns: 2, //最少允许的列数 |
| | | clickToSelect: true, //是否启用点击选中行 |
| | | searchOnEnterKey: true, //设置为 true时,按回车触发搜索方法,否则自动触发搜索方法 |
New file |
| | |
| | | !function(e,t,n){"use strict";!function o(e,t,n){function a(s,l){if(!t[s]){if(!e[s]){var i="function"==typeof require&&require;if(!l&&i)return i(s,!0);if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=t[s]={exports:{}};e[s][0].call(c.exports,function(t){var n=e[s][1][t];return a(n?n:t)},c,c.exports,o,e,t,n)}return t[s].exports}for(var r="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(o){var a,r,s,l,i=function(e){return e&&e.__esModule?e:{"default":e}},u=o("./modules/handle-dom"),c=o("./modules/utils"),d=o("./modules/handle-swal-dom"),f=o("./modules/handle-click"),p=o("./modules/handle-key"),m=i(p),v=o("./modules/default-params"),y=i(v),h=o("./modules/set-params"),g=i(h);s=l=function(){function o(e){var t=s;return t[e]===n?y["default"][e]:t[e]}var s=arguments[0];if(u.addClass(t.body,"stop-scrolling"),d.resetInput(),s===n)return c.logStr("SweetAlert expects at least 1 attribute!"),!1;var l=c.extend({},y["default"]);switch(typeof s){case"string":l.title=s,l.text=arguments[1]||"",l.type=arguments[2]||"";break;case"object":if(s.title===n)return c.logStr('Missing "title" argument!'),!1;l.title=s.title;for(var i in y["default"])l[i]=o(i);l.confirmButtonText=l.showCancelButton?"Confirm":y["default"].confirmButtonText,l.confirmButtonText=o("confirmButtonText"),l.doneFunction=arguments[1]||null;break;default:return c.logStr('Unexpected type of argument! Expected "string" or "object", got '+typeof s),!1}g["default"](l),d.fixVerticalPosition(),d.openModal(arguments[1]);for(var p=d.getModal(),v=p.querySelectorAll("button"),h=["onclick","onmouseover","onmouseout","onmousedown","onmouseup","onfocus"],b=function(e){return f.handleButton(e,l,p)},w=0;w<v.length;w++)for(var C=0;C<h.length;C++){var S=h[C];v[w][S]=b}d.getOverlay().onclick=b,a=e.onkeydown;var x=function(e){return m["default"](e,l,p)};e.onkeydown=x,e.onfocus=function(){setTimeout(function(){r!==n&&(r.focus(),r=n)},0)}},s.setDefaults=l.setDefaults=function(e){if(!e)throw new Error("userParams is required");if("object"!=typeof e)throw new Error("userParams has to be a object");c.extend(y["default"],e)},s.close=l.close=function(){var o=d.getModal();u.fadeOut(d.getOverlay(),5),u.fadeOut(o,5),u.removeClass(o,"showSweetAlert"),u.addClass(o,"hideSweetAlert"),u.removeClass(o,"visible");var s=o.querySelector(".sa-icon.sa-success");u.removeClass(s,"animate"),u.removeClass(s.querySelector(".sa-tip"),"animateSuccessTip"),u.removeClass(s.querySelector(".sa-long"),"animateSuccessLong");var l=o.querySelector(".sa-icon.sa-error");u.removeClass(l,"animateErrorIcon"),u.removeClass(l.querySelector(".sa-x-mark"),"animateXMark");var i=o.querySelector(".sa-icon.sa-warning");return u.removeClass(i,"pulseWarning"),u.removeClass(i.querySelector(".sa-body"),"pulseWarningIns"),u.removeClass(i.querySelector(".sa-dot"),"pulseWarningIns"),setTimeout(function(){var e=o.getAttribute("data-custom-class");u.removeClass(o,e)},300),u.removeClass(t.body,"stop-scrolling"),e.onkeydown=a,e.previousActiveElement&&e.previousActiveElement.focus(),r=n,clearTimeout(o.timeout),!0},s.showInputError=l.showInputError=function(e){var t=d.getModal(),n=t.querySelector(".sa-input-error");u.addClass(n,"show");var o=t.querySelector(".sa-error-container");u.addClass(o,"show"),o.querySelector("p").innerHTML=e,t.querySelector("input").focus()},s.resetInputError=l.resetInputError=function(e){if(e&&13===e.keyCode)return!1;var t=d.getModal(),n=t.querySelector(".sa-input-error");u.removeClass(n,"show");var o=t.querySelector(".sa-error-container");u.removeClass(o,"show")},"undefined"!=typeof e?e.sweetAlert=e.swal=s:c.logStr("SweetAlert is a frontend module!")},{"./modules/default-params":2,"./modules/handle-click":3,"./modules/handle-dom":4,"./modules/handle-key":5,"./modules/handle-swal-dom":6,"./modules/set-params":8,"./modules/utils":9}],2:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var o={title:"",text:"",type:null,allowOutsideClick:!1,showConfirmButton:!0,showCancelButton:!1,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"OK",confirmButtonColor:"#AEDEF4",cancelButtonText:"取消",imageUrl:null,imageSize:null,timer:null,customClass:"",html:!1,animation:!0,allowEscapeKey:!0,inputType:"text",inputPlaceholder:"",inputValue:""};n["default"]=o,t.exports=n["default"]},{}],3:[function(t,n,o){Object.defineProperty(o,"__esModule",{value:!0});var a=t("./utils"),r=(t("./handle-swal-dom"),t("./handle-dom")),s=function(t,n,o){function s(e){m&&n.confirmButtonColor&&(p.style.backgroundColor=e)}var u,c,d,f=t||e.event,p=f.target||f.srcElement,m=-1!==p.className.indexOf("confirm"),v=-1!==p.className.indexOf("sweet-overlay"),y=r.hasClass(o,"visible"),h=n.doneFunction&&"true"===o.getAttribute("data-has-done-function");switch(m&&n.confirmButtonColor&&(u=n.confirmButtonColor,c=a.colorLuminance(u,-.04),d=a.colorLuminance(u,-.14)),f.type){case"mouseover":s(c);break;case"mouseout":s(u);break;case"mousedown":s(d);break;case"mouseup":s(c);break;case"focus":var g=o.querySelector("button.confirm"),b=o.querySelector("button.cancel");m?b.style.boxShadow="none":g.style.boxShadow="none";break;case"click":var w=o===p,C=r.isDescendant(o,p);if(!w&&!C&&y&&!n.allowOutsideClick)break;m&&h&&y?l(o,n):h&&y||v?i(o,n):r.isDescendant(o,p)&&"BUTTON"===p.tagName&&sweetAlert.close()}},l=function(e,t){var n=!0;r.hasClass(e,"show-input")&&(n=e.querySelector("input").value,n||(n="")),t.doneFunction(n),t.closeOnConfirm&&sweetAlert.close()},i=function(e,t){var n=String(t.doneFunction).replace(/\s/g,""),o="function("===n.substring(0,9)&&")"!==n.substring(9,10);o&&t.doneFunction(!1),t.closeOnCancel&&sweetAlert.close()};o["default"]={handleButton:s,handleConfirm:l,handleCancel:i},n.exports=o["default"]},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],4:[function(n,o,a){Object.defineProperty(a,"__esModule",{value:!0});var r=function(e,t){return new RegExp(" "+t+" ").test(" "+e.className+" ")},s=function(e,t){r(e,t)||(e.className+=" "+t)},l=function(e,t){var n=" "+e.className.replace(/[\t\r\n]/g," ")+" ";if(r(e,t)){for(;n.indexOf(" "+t+" ")>=0;)n=n.replace(" "+t+" "," ");e.className=n.replace(/^\s+|\s+$/g,"")}},i=function(e){var n=t.createElement("div");return n.appendChild(t.createTextNode(e)),n.innerHTML},u=function(e){e.style.opacity="",e.style.display="block"},c=function(e){if(e&&!e.length)return u(e);for(var t=0;t<e.length;++t)u(e[t])},d=function(e){e.style.opacity="",e.style.display="none"},f=function(e){if(e&&!e.length)return d(e);for(var t=0;t<e.length;++t)d(e[t])},p=function(e,t){for(var n=t.parentNode;null!==n;){if(n===e)return!0;n=n.parentNode}return!1},m=function(e){e.style.left="-9999px",e.style.display="block";var t,n=e.clientHeight;return t="undefined"!=typeof getComputedStyle?parseInt(getComputedStyle(e).getPropertyValue("padding-top"),10):parseInt(e.currentStyle.padding),e.style.left="",e.style.display="none","-"+parseInt((n+t)/2)+"px"},v=function(e,t){if(+e.style.opacity<1){t=t||16,e.style.opacity=0,e.style.display="block";var n=+new Date,o=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){e.style.opacity=+e.style.opacity+(new Date-n)/100,n=+new Date,+e.style.opacity<1&&setTimeout(o,t)});o()}e.style.display="block"},y=function(e,t){t=t||16,e.style.opacity=1;var n=+new Date,o=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){e.style.opacity=+e.style.opacity-(new Date-n)/100,n=+new Date,+e.style.opacity>0?setTimeout(o,t):e.style.display="none"});o()},h=function(n){if("function"==typeof MouseEvent){var o=new MouseEvent("click",{view:e,bubbles:!1,cancelable:!0});n.dispatchEvent(o)}else if(t.createEvent){var a=t.createEvent("MouseEvents");a.initEvent("click",!1,!1),n.dispatchEvent(a)}else t.createEventObject?n.fireEvent("onclick"):"function"==typeof n.onclick&&n.onclick()},g=function(t){"function"==typeof t.stopPropagation?(t.stopPropagation(),t.preventDefault()):e.event&&e.event.hasOwnProperty("cancelBubble")&&(e.event.cancelBubble=!0)};a.hasClass=r,a.addClass=s,a.removeClass=l,a.escapeHtml=i,a._show=u,a.show=c,a._hide=d,a.hide=f,a.isDescendant=p,a.getTopMargin=m,a.fadeIn=v,a.fadeOut=y,a.fireClick=h,a.stopEventPropagation=g},{}],5:[function(t,o,a){Object.defineProperty(a,"__esModule",{value:!0});var r=t("./handle-dom"),s=t("./handle-swal-dom"),l=function(t,o,a){var l=t||e.event,i=l.keyCode||l.which,u=a.querySelector("button.confirm"),c=a.querySelector("button.cancel"),d=a.querySelectorAll("button[tabindex]");if(-1!==[9,13,32,27].indexOf(i)){for(var f=l.target||l.srcElement,p=-1,m=0;m<d.length;m++)if(f===d[m]){p=m;break}9===i?(f=-1===p?u:p===d.length-1?d[0]:d[p+1],r.stopEventPropagation(l),f.focus(),o.confirmButtonColor&&s.setFocusStyle(f,o.confirmButtonColor)):13===i?("INPUT"===f.tagName&&(f=u,u.focus()),f=-1===p?u:n):27===i&&o.allowEscapeKey===!0?(f=c,r.fireClick(f,l)):f=n}};a["default"]=l,o.exports=a["default"]},{"./handle-dom":4,"./handle-swal-dom":6}],6:[function(n,o,a){var r=function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(a,"__esModule",{value:!0});var s=n("./utils"),l=n("./handle-dom"),i=n("./default-params"),u=r(i),c=n("./injected-html"),d=r(c),f=".sweet-alert",p=".sweet-overlay",m=function(){var e=t.createElement("div");for(e.innerHTML=d["default"];e.firstChild;)t.body.appendChild(e.firstChild)},v=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=t.querySelector(f);return e||(m(),e=v()),e}),y=function(){var e=v();return e?e.querySelector("input"):void 0},h=function(){return t.querySelector(p)},g=function(e,t){var n=s.hexToRgb(t);e.style.boxShadow="0 0 2px rgba("+n+", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)"},b=function(n){var o=v();l.fadeIn(h(),10),l.show(o),l.addClass(o,"showSweetAlert"),l.removeClass(o,"hideSweetAlert"),e.previousActiveElement=t.activeElement;var a=o.querySelector("button.confirm");a.focus(),setTimeout(function(){l.addClass(o,"visible")},500);var r=o.getAttribute("data-timer");if("null"!==r&&""!==r){var s=n;o.timeout=setTimeout(function(){var e=(s||null)&&"true"===o.getAttribute("data-has-done-function");e?s(null):sweetAlert.close()},r)}},w=function(){var e=v(),t=y();l.removeClass(e,"show-input"),t.value=u["default"].inputValue,t.setAttribute("type",u["default"].inputType),t.setAttribute("placeholder",u["default"].inputPlaceholder),C()},C=function(e){if(e&&13===e.keyCode)return!1;var t=v(),n=t.querySelector(".sa-input-error");l.removeClass(n,"show");var o=t.querySelector(".sa-error-container");l.removeClass(o,"show")},S=function(){var e=v();e.style.marginTop=l.getTopMargin(v())};a.sweetAlertInitialize=m,a.getModal=v,a.getOverlay=h,a.getInput=y,a.setFocusStyle=g,a.openModal=b,a.resetInput=w,a.resetInputError=C,a.fixVerticalPosition=S},{"./default-params":2,"./handle-dom":4,"./injected-html":7,"./utils":9}],7:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var o='<div class="sweet-overlay" tabIndex="-1"></div><div class="sweet-alert"><div class="sa-icon sa-error">\n <span class="sa-x-mark">\n <span class="sa-line sa-left"></span>\n <span class="sa-line sa-right"></span>\n </span>\n </div><div class="sa-icon sa-warning">\n <span class="sa-body"></span>\n <span class="sa-dot"></span>\n </div><div class="sa-icon sa-info"></div><div class="sa-icon sa-success">\n <span class="sa-line sa-tip"></span>\n <span class="sa-line sa-long"></span>\n\n <div class="sa-placeholder"></div>\n <div class="sa-fix"></div>\n </div><div class="sa-icon sa-custom"></div><h2>Title</h2>\n <p>Text</p>\n <fieldset>\n <input type="text" tabIndex="3" />\n <div class="sa-input-error"></div>\n </fieldset><div class="sa-error-container">\n <div class="icon">!</div>\n <p>Not valid!</p>\n </div><div class="sa-button-container">\n <button class="cancel" tabIndex="2">Cancel</button>\n <button class="confirm" tabIndex="1">OK</button>\n </div></div>';n["default"]=o,t.exports=n["default"]},{}],8:[function(e,t,o){Object.defineProperty(o,"__esModule",{value:!0});var a=e("./utils"),r=e("./handle-swal-dom"),s=e("./handle-dom"),l=["error","warning","info","success","input","prompt"],i=function(e){var t=r.getModal(),o=t.querySelector("h2"),i=t.querySelector("p"),u=t.querySelector("button.cancel"),c=t.querySelector("button.confirm");if(o.innerHTML=e.html?e.title:s.escapeHtml(e.title).split("\n").join("<br>"),i.innerHTML=e.html?e.text:s.escapeHtml(e.text||"").split("\n").join("<br>"),e.text&&s.show(i),e.customClass)s.addClass(t,e.customClass),t.setAttribute("data-custom-class",e.customClass);else{var d=t.getAttribute("data-custom-class");s.removeClass(t,d),t.setAttribute("data-custom-class","")}if(s.hide(t.querySelectorAll(".sa-icon")),e.type&&!a.isIE8()){var f=function(){for(var o=!1,a=0;a<l.length;a++)if(e.type===l[a]){o=!0;break}if(!o)return logStr("Unknown alert type: "+e.type),{v:!1};var i=["success","error","warning","info"],u=n;-1!==i.indexOf(e.type)&&(u=t.querySelector(".sa-icon.sa-"+e.type),s.show(u));var c=r.getInput();switch(e.type){case"success":s.addClass(u,"animate"),s.addClass(u.querySelector(".sa-tip"),"animateSuccessTip"),s.addClass(u.querySelector(".sa-long"),"animateSuccessLong");break;case"error":s.addClass(u,"animateErrorIcon"),s.addClass(u.querySelector(".sa-x-mark"),"animateXMark");break;case"warning":s.addClass(u,"pulseWarning"),s.addClass(u.querySelector(".sa-body"),"pulseWarningIns"),s.addClass(u.querySelector(".sa-dot"),"pulseWarningIns");break;case"input":case"prompt":c.setAttribute("type",e.inputType),c.value=e.inputValue,c.setAttribute("placeholder",e.inputPlaceholder),s.addClass(t,"show-input"),setTimeout(function(){c.focus(),c.addEventListener("keyup",swal.resetInputError)},400)}}();if("object"==typeof f)return f.v}if(e.imageUrl){var p=t.querySelector(".sa-icon.sa-custom");p.style.backgroundImage="url("+e.imageUrl+")",s.show(p);var m=80,v=80;if(e.imageSize){var y=e.imageSize.toString().split("x"),h=y[0],g=y[1];h&&g?(m=h,v=g):logStr("Parameter imageSize expects value with format WIDTHxHEIGHT, got "+e.imageSize)}p.setAttribute("style",p.getAttribute("style")+"width:"+m+"px; height:"+v+"px")}t.setAttribute("data-has-cancel-button",e.showCancelButton),e.showCancelButton?u.style.display="inline-block":s.hide(u),t.setAttribute("data-has-confirm-button",e.showConfirmButton),e.showConfirmButton?c.style.display="inline-block":s.hide(c),e.cancelButtonText&&(u.innerHTML=s.escapeHtml(e.cancelButtonText)),e.confirmButtonText&&(c.innerHTML=s.escapeHtml(e.confirmButtonText)),e.confirmButtonColor&&(c.style.backgroundColor=e.confirmButtonColor,r.setFocusStyle(c,e.confirmButtonColor)),t.setAttribute("data-allow-outside-click",e.allowOutsideClick);var b=e.doneFunction?!0:!1;t.setAttribute("data-has-done-function",b),e.animation?"string"==typeof e.animation?t.setAttribute("data-animation",e.animation):t.setAttribute("data-animation","pop"):t.setAttribute("data-animation","none"),t.setAttribute("data-timer",e.timer)};o["default"]=i,t.exports=o["default"]},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],9:[function(t,n,o){Object.defineProperty(o,"__esModule",{value:!0});var a=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},r=function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?parseInt(t[1],16)+", "+parseInt(t[2],16)+", "+parseInt(t[3],16):null},s=function(){return e.attachEvent&&!e.addEventListener},l=function(t){e.console&&e.console.log("SweetAlert: "+t)},i=function(e,t){e=String(e).replace(/[^0-9a-f]/gi,""),e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;var n,o,a="#";for(o=0;3>o;o++)n=parseInt(e.substr(2*o,2),16),n=Math.round(Math.min(Math.max(0,n+n*t),255)).toString(16),a+=("00"+n).substr(n.length);return a};o.extend=a,o.hexToRgb=r,o.isIE8=s,o.logStr=l,o.colorLuminance=i},{}]},{},[1]),"function"==typeof define&&define.amd?define(function(){return sweetAlert}):"undefined"!=typeof module&&module.exports&&(module.exports=sweetAlert)}(window,document); |
| | |
| | | }, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:'16%', |
| | | formatter: function (value, row) { |
| | | return ' '+'<a href="#" onclick="TDevice.openTCharteredServiceDetails('+row.id+')" style="color:cornflowerblue">详情</a>' +' ' |
| | | return ' '+'<a href="#" onclick="TDevice.openTCharteredServiceDetails('+row.id+')" style="color:cornflowerblue">详情</a>' +' '+'<a href="#" onclick="TDevice.unbinding('+row.id+')" style="color:cornflowerblue">解除绑定</a>' |
| | | } |
| | | } |
| | | ]; |
| | |
| | | |
| | | |
| | | |
| | | TDevice.unbinding = function (tCharteredServiceId) { |
| | | |
| | | |
| | | var operation = function(){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tDevice/delete", function () { |
| | | Feng.success("删除成功!"); |
| | | TDevice.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tDeviceId",tCharteredServiceId); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | Feng.confirm("是否解除绑定?", operation); |
| | | |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | |
| | | MgrUser.initColumn = function () { |
| | | var columns = [ |
| | | {field: 'selectItem', checkbox: true,visible: false}, |
| | | {title: '用户ID', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户ID', field: 'uid', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户姓名', field: 'name', align: 'center', valign: 'middle'}, |
| | | {title: '手机号', field: 'phone', align: 'center', valign: 'middle'}, |
| | | { |
| | |
| | | }, |
| | | {title: '时间', field: 'detectionTime', align: 'center', valign: 'middle'} |
| | | , |
| | | {title: '形变量', field: 'shapeVariable', align: 'center', valign: 'middle'} |
| | | {title: '形变量', field: 'shapeVariable', align: 'center', valign: 'middle'}, |
| | | {title: '睡姿', field: 'position', align: 'center', valign: 'middle'} |
| | | |
| | | |
| | | ]; |
| | |
| | | $("#name").val(""); |
| | | $("#beginTime").val(""); |
| | | $("#endTime").val(""); |
| | | $("#phone").val(""); |
| | | $("#high1").val(""); |
| | | $("#high2").val(""); |
| | | $("#weight1").val(""); |
| | | $("#weight2").val(""); |
| | | $("#hospital").val(""); |
| | | $("#tag").val(""); |
| | | |
| | | MgrUser.search(); |
| | | } |
| | |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/mgr/freeze", function(data){ |
| | | Feng.success("解冻成功!"); |
| | | Feng.success("冻结成功!"); |
| | | window.parent.MgrUser.table.refresh(); |
| | | DeptInfoDlg.close(); |
| | | },function(data){ |
| | |
| | | this.collectData(); |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/mgr/changeTag", function(data){ |
| | | Feng.success("解冻成功!"); |
| | | Feng.success("操作成功!"); |
| | | window.parent.MgrUser.table.refresh(); |
| | | DeptInfoDlg.close(); |
| | | },function(data){ |