Commit 5522d54ffc53a9460d338b1800188f616079aacb
Merge branch 'minhang' of http://192.168.168.201:8888/panzhaov5/bsth_control into minhang
Showing
73 changed files
with
1587 additions
and
1303 deletions
Too many changes to show.
To preserve performance only 73 of 118 files are displayed.
src/main/java/com/bsth/common/Constants.java
| ... | ... | @@ -36,4 +36,14 @@ public class Constants { |
| 36 | 36 | |
| 37 | 37 | public static final String SESSION_USERNAME = "sessionUserName"; |
| 38 | 38 | public static final String COMPANY_AUTHORITYS = "cmyAuths"; |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 解除调度指令和班次的外键约束 | |
| 42 | + */ | |
| 43 | + public static final String REMOVE_DIRECTIVE_SCH_FK = "update bsth_v_directive_60 set sch=NULL where sch=?"; | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * 批量解除调度指令和班次的外键约束 | |
| 47 | + */ | |
| 48 | + public static final String MULTI_REMOVE_DIRECTIVE_SCH_FK = "update bsth_v_directive_60 set sch=NULL where sch in "; | |
| 39 | 49 | } | ... | ... |
src/main/java/com/bsth/controller/BaseController.java
| 1 | 1 | package com.bsth.controller; |
| 2 | 2 | |
| 3 | -import com.bsth.common.ResponseCode; | |
| 4 | 3 | import com.bsth.service.BaseService; |
| 5 | -import com.bsth.service.schedule.utils.DataImportExportService; | |
| 6 | 4 | import com.google.common.base.Splitter; |
| 7 | 5 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | 6 | import org.springframework.data.domain.Page; |
| 9 | 7 | import org.springframework.data.domain.PageRequest; |
| 10 | 8 | import org.springframework.data.domain.Sort; |
| 11 | 9 | import org.springframework.data.domain.Sort.Direction; |
| 12 | -import org.springframework.util.CollectionUtils; | |
| 13 | 10 | import org.springframework.web.bind.annotation.PathVariable; |
| 14 | 11 | import org.springframework.web.bind.annotation.RequestMapping; |
| 15 | 12 | import org.springframework.web.bind.annotation.RequestMethod; |
| 16 | 13 | import org.springframework.web.bind.annotation.RequestParam; |
| 17 | -import org.springframework.web.multipart.MultipartFile; | |
| 18 | 14 | |
| 19 | -import javax.servlet.http.HttpServletResponse; | |
| 20 | -import java.io.*; | |
| 15 | +import java.io.Serializable; | |
| 21 | 16 | import java.util.ArrayList; |
| 22 | -import java.util.HashMap; | |
| 23 | 17 | import java.util.List; |
| 24 | 18 | import java.util.Map; |
| 25 | 19 | |
| ... | ... | @@ -35,8 +29,6 @@ public class BaseController<T, ID extends Serializable> { |
| 35 | 29 | |
| 36 | 30 | @Autowired |
| 37 | 31 | protected BaseService<T, ID> baseService; |
| 38 | - @Autowired | |
| 39 | - DataImportExportService dataImportExportService; | |
| 40 | 32 | |
| 41 | 33 | /** |
| 42 | 34 | * @param @param map 查询条件 |
| ... | ... | @@ -126,115 +118,4 @@ public class BaseController<T, ID extends Serializable> { |
| 126 | 118 | return baseService.delete(id); |
| 127 | 119 | } |
| 128 | 120 | |
| 129 | - /** | |
| 130 | - * 上传数据文件,并使用ktr转换文件导入数据。 | |
| 131 | - * | |
| 132 | - * @param file | |
| 133 | - * @return | |
| 134 | - * @throws Exception | |
| 135 | - */ | |
| 136 | - @RequestMapping(value = "/dataImport", method = RequestMethod.POST) | |
| 137 | - public Map<String, Object> uploadDataAndImport(MultipartFile file) throws Exception { | |
| 138 | - Map<String, Object> resultMap = new HashMap<>(); | |
| 139 | - | |
| 140 | - try { | |
| 141 | - // 获取ktr转换文件绝对路径 | |
| 142 | - File ktrfile = new File(this.getClass().getResource(getDataImportKtrClasspath()).toURI()); | |
| 143 | - System.out.println(ktrfile.getAbsolutePath()); | |
| 144 | - // 导入数据 | |
| 145 | - dataImportExportService.fileDataImport(file, ktrfile); | |
| 146 | - | |
| 147 | - resultMap.put("status", ResponseCode.SUCCESS); | |
| 148 | - resultMap.put("msg", "导入成功"); | |
| 149 | - } catch (Exception exp) { | |
| 150 | - exp.printStackTrace(); | |
| 151 | - resultMap.put("status", ResponseCode.ERROR); | |
| 152 | - resultMap.put("msg", exp.getLocalizedMessage()); | |
| 153 | - } | |
| 154 | - | |
| 155 | - return resultMap; | |
| 156 | - } | |
| 157 | - | |
| 158 | - /** | |
| 159 | - * 使用ktr导出数据。 | |
| 160 | - * | |
| 161 | - * @param response | |
| 162 | - * @throws Exception | |
| 163 | - */ | |
| 164 | - @RequestMapping(value = "/dataExport", method = RequestMethod.GET) | |
| 165 | - public void dataExport(HttpServletResponse response) throws Exception { | |
| 166 | - dataExport(response, null); | |
| 167 | - } | |
| 168 | - | |
| 169 | - @RequestMapping(value = "/dataExportExt", method = RequestMethod.GET) | |
| 170 | - public void dataExport(HttpServletResponse response, @RequestParam Map<String, Object> param) throws Exception { | |
| 171 | - // 1、使用ktr转换获取输出文件 | |
| 172 | - File ktrfile = new File(this.getClass().getResource(getDataExportKtrClasspath()).toURI()); | |
| 173 | - File outputfile = null; | |
| 174 | - if (!CollectionUtils.isEmpty(param)) { | |
| 175 | - outputfile = dataImportExportService.fileDataOutput( | |
| 176 | - getDataExportFilename(), | |
| 177 | - ktrfile, | |
| 178 | - param); | |
| 179 | - } else { | |
| 180 | - outputfile = dataImportExportService.fileDataOutput( | |
| 181 | - getDataExportFilename(), | |
| 182 | - ktrfile); | |
| 183 | - } | |
| 184 | - | |
| 185 | - System.out.println(outputfile.getName()); | |
| 186 | - String filePath = outputfile.getAbsolutePath(); | |
| 187 | - String fp[] = filePath.split(File.separator); | |
| 188 | - String fileName = fp[fp.length - 1]; | |
| 189 | - | |
| 190 | - // TODO:使用ktr获取导出数据 | |
| 191 | - | |
| 192 | - response.setHeader("conent-type", "application/octet-stream"); | |
| 193 | - response.setContentType("application/octet-stream"); | |
| 194 | - response.setHeader("Content-Disposition", "attachment; filename=" + "东东"); | |
| 195 | - | |
| 196 | - OutputStream os = response.getOutputStream(); | |
| 197 | - BufferedOutputStream bos = new BufferedOutputStream(os); | |
| 198 | - | |
| 199 | - InputStream is = null; | |
| 200 | - | |
| 201 | - is = new FileInputStream(filePath); | |
| 202 | - BufferedInputStream bis = new BufferedInputStream(is); | |
| 203 | - | |
| 204 | - int length = 0; | |
| 205 | - byte[] temp = new byte[1 * 1024 * 10]; | |
| 206 | - | |
| 207 | - while ((length = bis.read(temp)) != -1) { | |
| 208 | - bos.write(temp, 0, length); | |
| 209 | - } | |
| 210 | - bos.flush(); | |
| 211 | - bis.close(); | |
| 212 | - bos.close(); | |
| 213 | - is.close(); | |
| 214 | - } | |
| 215 | - | |
| 216 | - /** | |
| 217 | - * @return 数据导出的ktr转换文件类路径。 | |
| 218 | - */ | |
| 219 | - protected String getDataExportKtrClasspath() { | |
| 220 | - // 默认返回异常,子类如果要使用导出功能,必须覆写此方法,指定ktr文件类路径 | |
| 221 | - throw new RuntimeException("必须override,并指定ktr classpath"); | |
| 222 | - } | |
| 223 | - | |
| 224 | - /** | |
| 225 | - * @return 导出文件名。 | |
| 226 | - */ | |
| 227 | - protected String getDataExportFilename() { | |
| 228 | - // 默认返回异常,子类如果要使用导出功能,必须覆写此方法,指定导出的文件路径名 | |
| 229 | - throw new RuntimeException("必须override,并指定导出文件名"); | |
| 230 | - } | |
| 231 | - | |
| 232 | - /** | |
| 233 | - * @return 数据导入的ktr转换文件类路径。 | |
| 234 | - */ | |
| 235 | - protected String getDataImportKtrClasspath() { | |
| 236 | - // 默认返回异常,子类如果要使用导入功能,必须覆写此方法,指定ktr文件类路径 | |
| 237 | - throw new RuntimeException("必须override,并指定ktr classpath"); | |
| 238 | - } | |
| 239 | - | |
| 240 | 121 | } | ... | ... |
src/main/java/com/bsth/controller/BaseController2.java deleted
100644 → 0
| 1 | -package com.bsth.controller; | |
| 2 | - | |
| 3 | - | |
| 4 | -import com.bsth.common.ResponseCode; | |
| 5 | -import com.bsth.service.BaseService; | |
| 6 | -import com.bsth.service.schedule.utils.DataImportExportService; | |
| 7 | -import com.google.common.base.Splitter; | |
| 8 | -import jxl.Sheet; | |
| 9 | -import jxl.Workbook; | |
| 10 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 11 | -import org.springframework.data.domain.Page; | |
| 12 | -import org.springframework.data.domain.PageRequest; | |
| 13 | -import org.springframework.data.domain.Sort; | |
| 14 | -import org.springframework.util.CollectionUtils; | |
| 15 | -import org.springframework.web.bind.annotation.*; | |
| 16 | -import org.springframework.web.multipart.MultipartFile; | |
| 17 | - | |
| 18 | -import javax.servlet.http.HttpServletResponse; | |
| 19 | -import java.io.*; | |
| 20 | -import java.util.ArrayList; | |
| 21 | -import java.util.HashMap; | |
| 22 | -import java.util.List; | |
| 23 | -import java.util.Map; | |
| 24 | - | |
| 25 | -/** | |
| 26 | - * Created by xu on 16/11/3. | |
| 27 | - */ | |
| 28 | -public class BaseController2<T, ID extends Serializable> { | |
| 29 | - | |
| 30 | - @Autowired | |
| 31 | - protected BaseService<T, ID> baseService; | |
| 32 | - @Autowired | |
| 33 | - DataImportExportService dataImportExportService; | |
| 34 | - | |
| 35 | - /** | |
| 36 | - * | |
| 37 | - * @Title: list | |
| 38 | - * @Description: TODO(多条件分页查询) | |
| 39 | - * @param @param map 查询条件 | |
| 40 | - * @param @param page 页码 | |
| 41 | - * @param @param size 每页显示数量 | |
| 42 | - * @throws | |
| 43 | - */ | |
| 44 | - @RequestMapping(method = RequestMethod.GET) | |
| 45 | - public Page<T> list(@RequestParam Map<String, Object> map, | |
| 46 | - @RequestParam(defaultValue = "0") int page, | |
| 47 | - @RequestParam(defaultValue = "10") int size, | |
| 48 | - @RequestParam(defaultValue = "id") String order, | |
| 49 | - @RequestParam(defaultValue = "DESC") String direction){ | |
| 50 | - | |
| 51 | - // 允许多个字段排序,order可以写单个字段,也可以写多个字段 | |
| 52 | - // 多个字段格式:{col1},{col2},{col3},....,{coln} | |
| 53 | - List<String> order_columns = Splitter.on(",").trimResults().splitToList(order); | |
| 54 | - // 多字段排序:DESC,ASC... | |
| 55 | - List<String> order_dirs = Splitter.on(",").trimResults().splitToList(direction); | |
| 56 | - | |
| 57 | - if (order_dirs.size() == 1) { // 所有字段采用一种排序 | |
| 58 | - if (null != order_dirs.get(0) && order_dirs.get(0).equals("ASC")) { | |
| 59 | - return baseService.list(map, new PageRequest(page, size, new Sort(Sort.Direction.ASC, order_columns))); | |
| 60 | - } else { | |
| 61 | - return baseService.list(map, new PageRequest(page, size, new Sort(Sort.Direction.DESC, order_columns))); | |
| 62 | - } | |
| 63 | - } else if (order_columns.size() == order_dirs.size()) { | |
| 64 | - List<Sort.Order> orderList = new ArrayList<>(); | |
| 65 | - for (int i = 0; i < order_columns.size(); i++) { | |
| 66 | - if (null != order_dirs.get(i) && order_dirs.get(i).equals("ASC")) { | |
| 67 | - orderList.add(new Sort.Order(Sort.Direction.ASC, order_columns.get(i))); | |
| 68 | - } else { | |
| 69 | - orderList.add(new Sort.Order(Sort.Direction.DESC, order_columns.get(i))); | |
| 70 | - } | |
| 71 | - } | |
| 72 | - return baseService.list(map, new PageRequest(page, size, new Sort(orderList))); | |
| 73 | - } else { | |
| 74 | - throw new RuntimeException("多字段排序参数格式问题,排序顺序和字段数不一致"); | |
| 75 | - } | |
| 76 | - } | |
| 77 | - | |
| 78 | - /** | |
| 79 | - * | |
| 80 | - * @Title: list | |
| 81 | - * @Description: TODO(多条件查询) | |
| 82 | - * @param @param map | |
| 83 | - * @throws | |
| 84 | - */ | |
| 85 | - @RequestMapping(value = "/all", method = RequestMethod.GET) | |
| 86 | - public Iterable<T> list(@RequestParam Map<String, Object> map){ | |
| 87 | - return baseService.list(map); | |
| 88 | - } | |
| 89 | - | |
| 90 | - /** | |
| 91 | - * 这里保存直接返回保存后的对象,不自己定义Map返回了,和前端angularjs配合。 | |
| 92 | - * form也可以提交,但是页面参数可能不全, | |
| 93 | - * json的化比较灵活,但是貌似有多余属性也会报错,或者碰到lazy属性值,也有问题 | |
| 94 | - * 不论form,还是json提交都能解决问题,就看哪个方便哪个来 | |
| 95 | - * | |
| 96 | - * @param t 参数需要使用@RequestBody转换json成对象 | |
| 97 | - * @return | |
| 98 | - */ | |
| 99 | - @RequestMapping(method = RequestMethod.POST) | |
| 100 | - public T save(@RequestBody T t) { | |
| 101 | - baseService.save(t); | |
| 102 | - return t; | |
| 103 | - } | |
| 104 | - | |
| 105 | - @RequestMapping(value="/{id}", method = RequestMethod.POST) | |
| 106 | - public T update(@RequestBody T t) { | |
| 107 | - baseService.save(t); | |
| 108 | - return t; | |
| 109 | - } | |
| 110 | - | |
| 111 | - /** | |
| 112 | - * | |
| 113 | - * @Title: findById | |
| 114 | - * @Description: TODO(根据主键获取单个对象) | |
| 115 | - * @param @param id | |
| 116 | - * @throws | |
| 117 | - */ | |
| 118 | - @RequestMapping(value="/{id}",method = RequestMethod.GET) | |
| 119 | - public T findById(@PathVariable("id") ID id){ | |
| 120 | - return baseService.findById(id); | |
| 121 | - } | |
| 122 | - | |
| 123 | - /** | |
| 124 | - * | |
| 125 | - * @Title: delete | |
| 126 | - * @Description: TODO(根据主键删除对象) | |
| 127 | - * @param @param id | |
| 128 | - * @throws | |
| 129 | - */ | |
| 130 | - @RequestMapping(value="/{id}",method = RequestMethod.DELETE) | |
| 131 | - public Map<String, Object> delete(@PathVariable("id") ID id){ | |
| 132 | - return baseService.delete(id); | |
| 133 | - } | |
| 134 | - | |
| 135 | - /** | |
| 136 | - * 上传数据文件,并使用ktr转换文件导入数据。 | |
| 137 | - * @param file | |
| 138 | - * @return | |
| 139 | - * @throws Exception | |
| 140 | - */ | |
| 141 | - @RequestMapping(value = "/dataImport", method = RequestMethod.POST) | |
| 142 | - public Map<String, Object> uploadDataAndImport(MultipartFile file) throws Exception { | |
| 143 | - Map<String, Object> resultMap = new HashMap<>(); | |
| 144 | - | |
| 145 | - try { | |
| 146 | - // 获取ktr转换文件绝对路径 | |
| 147 | - File ktrfile = new File(this.getClass().getResource(getDataImportKtrClasspath()).toURI()); | |
| 148 | - System.out.println(ktrfile.getAbsolutePath()); | |
| 149 | - // 导入数据 | |
| 150 | - dataImportExportService.fileDataImport(file, ktrfile); | |
| 151 | - | |
| 152 | - resultMap.put("status", ResponseCode.SUCCESS); | |
| 153 | - resultMap.put("msg", "导入成功"); | |
| 154 | - } catch (Exception exp) { | |
| 155 | - exp.printStackTrace(); | |
| 156 | - resultMap.put("status", ResponseCode.ERROR); | |
| 157 | - resultMap.put("msg", exp.getLocalizedMessage()); | |
| 158 | - } | |
| 159 | - | |
| 160 | - return resultMap; | |
| 161 | - } | |
| 162 | - | |
| 163 | - /** | |
| 164 | - * 使用ktr导出数据。 | |
| 165 | - * @param response | |
| 166 | - * @throws Exception | |
| 167 | - */ | |
| 168 | - @RequestMapping(value = "/dataExport", method = RequestMethod.GET) | |
| 169 | - public void dataExport(HttpServletResponse response) throws Exception { | |
| 170 | - dataExport(response, null); | |
| 171 | - } | |
| 172 | - | |
| 173 | - @RequestMapping(value = "/dataExportExt", method = RequestMethod.GET) | |
| 174 | - public void dataExport(HttpServletResponse response, @RequestParam Map<String, Object> param) throws Exception { | |
| 175 | - // 1、使用ktr转换获取输出文件 | |
| 176 | - File ktrfile = new File(this.getClass().getResource(getDataExportKtrClasspath()).toURI()); | |
| 177 | - File outputfile = null; | |
| 178 | - if (!CollectionUtils.isEmpty(param)) { | |
| 179 | - outputfile = dataImportExportService.fileDataOutput( | |
| 180 | - getDataExportFilename(), | |
| 181 | - ktrfile, | |
| 182 | - param); | |
| 183 | - } else { | |
| 184 | - outputfile = dataImportExportService.fileDataOutput( | |
| 185 | - getDataExportFilename(), | |
| 186 | - ktrfile); | |
| 187 | - } | |
| 188 | - | |
| 189 | - System.out.println(outputfile.getName()); | |
| 190 | - System.out.println(outputfile.getAbsolutePath()); | |
| 191 | - | |
| 192 | - String filePath = outputfile.getAbsolutePath(); | |
| 193 | -// String fp[] = filePath.split(File.separator); | |
| 194 | -// String fileName = fp[fp.length - 1]; | |
| 195 | - | |
| 196 | - // TODO:使用ktr获取导出数据 | |
| 197 | - | |
| 198 | - response.setHeader("conent-type", "application/octet-stream"); | |
| 199 | - response.setContentType("application/octet-stream"); | |
| 200 | - response.setHeader("Content-Disposition", "attachment; filename=" + "东东"); | |
| 201 | - | |
| 202 | - OutputStream os = response.getOutputStream(); | |
| 203 | - BufferedOutputStream bos = new BufferedOutputStream(os); | |
| 204 | - | |
| 205 | - InputStream is = null; | |
| 206 | - | |
| 207 | - is = new FileInputStream(filePath); | |
| 208 | - BufferedInputStream bis = new BufferedInputStream(is); | |
| 209 | - | |
| 210 | - int length = 0; | |
| 211 | - byte[] temp = new byte[1 * 1024 * 10]; | |
| 212 | - | |
| 213 | - while ((length = bis.read(temp)) != -1) { | |
| 214 | - bos.write(temp, 0, length); | |
| 215 | - } | |
| 216 | - bos.flush(); | |
| 217 | - bis.close(); | |
| 218 | - bos.close(); | |
| 219 | - is.close(); | |
| 220 | - } | |
| 221 | - | |
| 222 | - /** | |
| 223 | - * @return 数据导出的ktr转换文件类路径。 | |
| 224 | - */ | |
| 225 | - protected String getDataExportKtrClasspath() { | |
| 226 | - // 默认返回异常,子类如果要使用导出功能,必须覆写此方法,指定ktr文件类路径 | |
| 227 | - throw new RuntimeException("必须override,并指定ktr classpath"); | |
| 228 | - } | |
| 229 | - | |
| 230 | - /** | |
| 231 | - * @return 导出文件名。 | |
| 232 | - */ | |
| 233 | - protected String getDataExportFilename() { | |
| 234 | - // 默认返回异常,子类如果要使用导出功能,必须覆写此方法,指定导出的文件路径名 | |
| 235 | - throw new RuntimeException("必须override,并指定导出文件名"); | |
| 236 | - } | |
| 237 | - | |
| 238 | - /** | |
| 239 | - * @return 数据导入的ktr转换文件类路径。 | |
| 240 | - */ | |
| 241 | - protected String getDataImportKtrClasspath() { | |
| 242 | - // 默认返回异常,子类如果要使用导入功能,必须覆写此方法,指定ktr文件类路径 | |
| 243 | - throw new RuntimeException("必须override,并指定ktr classpath"); | |
| 244 | - } | |
| 245 | - | |
| 246 | - | |
| 247 | - public static class ExcelFileOutput { | |
| 248 | - private String fileName; | |
| 249 | - private List<Map<String, Object>> sheetnames = new ArrayList<>(); | |
| 250 | - | |
| 251 | - public String getFileName() { | |
| 252 | - return fileName; | |
| 253 | - } | |
| 254 | - | |
| 255 | - public void setFileName(String fileName) { | |
| 256 | - this.fileName = fileName; | |
| 257 | - } | |
| 258 | - | |
| 259 | - public List<Map<String, Object>> getSheetnames() { | |
| 260 | - return sheetnames; | |
| 261 | - } | |
| 262 | - | |
| 263 | - public void setSheetnames(List<Map<String, Object>> sheetnames) { | |
| 264 | - this.sheetnames = sheetnames; | |
| 265 | - } | |
| 266 | - } | |
| 267 | - | |
| 268 | - /** | |
| 269 | - * 上传Excel文件,返回文件全路径名,工作区名称列表。 | |
| 270 | - * @param file | |
| 271 | - * @return | |
| 272 | - * @throws Exception | |
| 273 | - */ | |
| 274 | - @RequestMapping(value = "/uploadFile", method = RequestMethod.POST) | |
| 275 | - public ExcelFileOutput fileUpload(MultipartFile file) throws Exception { | |
| 276 | - // 返回对象 | |
| 277 | - ExcelFileOutput rs = new ExcelFileOutput(); | |
| 278 | - | |
| 279 | - // 上传文件 | |
| 280 | - File file1 = dataImportExportService.uploadFile(file); | |
| 281 | - // 获取文件的sheet | |
| 282 | - Workbook book = Workbook.getWorkbook(file1); | |
| 283 | - for (Sheet sheet : book.getSheets()) { | |
| 284 | - String sheetname = sheet.getName(); | |
| 285 | - Map<String, Object> s = new HashMap<>(); | |
| 286 | - s.put("name", sheetname); | |
| 287 | - rs.getSheetnames().add(s); | |
| 288 | - } | |
| 289 | - | |
| 290 | - rs.setFileName(file1.getAbsolutePath()); | |
| 291 | - return rs; | |
| 292 | - } | |
| 293 | - | |
| 294 | -} |
src/main/java/com/bsth/controller/CarsController.java
| 1 | 1 | package com.bsth.controller; |
| 2 | 2 | |
| 3 | -import com.bsth.common.ResponseCode; | |
| 4 | 3 | import com.bsth.entity.Cars; |
| 5 | -import com.bsth.service.schedule.utils.DataImportExportService; | |
| 6 | -import com.bsth.service.schedule.utils.DataToolsProperties; | |
| 7 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | -import org.springframework.boot.context.properties.EnableConfigurationProperties; | |
| 9 | 4 | import org.springframework.web.bind.annotation.RequestMapping; |
| 10 | -import org.springframework.web.bind.annotation.RequestMethod; | |
| 11 | -import org.springframework.web.bind.annotation.RequestParam; | |
| 12 | 5 | import org.springframework.web.bind.annotation.RestController; |
| 13 | 6 | |
| 14 | -import java.io.File; | |
| 15 | -import java.util.HashMap; | |
| 16 | -import java.util.Map; | |
| 17 | - | |
| 18 | 7 | /** |
| 19 | 8 | * Created by xu on 16/5/31. |
| 20 | 9 | */ |
| 21 | 10 | @RestController |
| 22 | 11 | @RequestMapping("cars") |
| 23 | -@EnableConfigurationProperties(DataToolsProperties.class) | |
| 24 | -public class CarsController extends BaseController2<Cars, Integer> { | |
| 25 | - | |
| 26 | - @Autowired | |
| 27 | - private DataToolsProperties dataToolsProperties; | |
| 28 | - @Autowired | |
| 29 | - private DataImportExportService dataImportExportService; | |
| 30 | - | |
| 31 | - /** | |
| 32 | - * 验证。 | |
| 33 | - * @param map | |
| 34 | - * @return | |
| 35 | - */ | |
| 36 | - @RequestMapping(value = "/validate/equale", method = RequestMethod.GET) | |
| 37 | - public Map<String, Object> validateData(@RequestParam Map<String, Object> map) { | |
| 38 | - // 一般比较自编号是否重复 | |
| 39 | - return baseService.validateEquale(map); | |
| 40 | - } | |
| 41 | - | |
| 42 | - // uploadFile post | |
| 43 | - | |
| 44 | - // 验证excel sheet | |
| 45 | - @RequestMapping(value = "/validate/sheet", method = RequestMethod.GET) | |
| 46 | - public Map<String, Object> validateSheet() throws Exception { | |
| 47 | - Map<String, Object> rtn = new HashMap<>(); | |
| 48 | - | |
| 49 | - // TODO: | |
| 50 | - | |
| 51 | - rtn.put("status", ResponseCode.SUCCESS); | |
| 52 | - return rtn; | |
| 53 | - } | |
| 54 | - | |
| 55 | - @RequestMapping(value = "/importfile", method = RequestMethod.POST) | |
| 56 | - public Map<String, Object> importData( | |
| 57 | - @RequestParam Map<String, Object> form) | |
| 58 | - throws Exception { | |
| 59 | - Map<String, Object> rtn = new HashMap<>(); | |
| 60 | - | |
| 61 | - // TODO: | |
| 62 | - String filename = (String) form.get("filename"); | |
| 63 | - | |
| 64 | - | |
| 65 | - try { | |
| 66 | - // 获取ktr转换文件绝对路径 | |
| 67 | - File ktrfile = new File(this.getClass().getResource(getDataImportKtrClasspath()).toURI()); | |
| 68 | - System.out.println(ktrfile.getAbsolutePath()); | |
| 69 | - // 导入数据 | |
| 70 | - dataImportExportService.fileDataImport(new File(filename), ktrfile); | |
| 71 | - | |
| 72 | - rtn.put("status", ResponseCode.SUCCESS); | |
| 73 | - rtn.put("msg", "导入成功"); | |
| 74 | - } catch (Exception exp) { | |
| 75 | - exp.printStackTrace(); | |
| 76 | - rtn.put("status", ResponseCode.ERROR); | |
| 77 | - rtn.put("msg", exp.getLocalizedMessage()); | |
| 78 | - } | |
| 79 | - | |
| 80 | - return rtn; | |
| 81 | - } | |
| 82 | - | |
| 83 | - | |
| 84 | - @Override | |
| 85 | - protected String getDataImportKtrClasspath() { | |
| 86 | - return dataToolsProperties.getCarsDatainputktr(); | |
| 87 | - } | |
| 88 | - | |
| 89 | - @Override | |
| 90 | - protected String getDataExportKtrClasspath() { | |
| 91 | - return dataToolsProperties.getCarsDataoutputktr(); | |
| 92 | - } | |
| 12 | +public class CarsController extends BaseController<Cars, Integer> { | |
| 93 | 13 | |
| 94 | - @Override | |
| 95 | - protected String getDataExportFilename() { | |
| 96 | - return "车辆基础数据"; | |
| 97 | - } | |
| 98 | 14 | } | ... | ... |
src/main/java/com/bsth/controller/PersonnelController.java
| ... | ... | @@ -2,10 +2,11 @@ package com.bsth.controller; |
| 2 | 2 | |
| 3 | 3 | import com.bsth.entity.Personnel; |
| 4 | 4 | import com.bsth.service.PersonnelService; |
| 5 | -import com.bsth.service.schedule.utils.DataToolsProperties; | |
| 6 | 5 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | -import org.springframework.boot.context.properties.EnableConfigurationProperties; | |
| 8 | -import org.springframework.web.bind.annotation.*; | |
| 6 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 7 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 8 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 9 | +import org.springframework.web.bind.annotation.RestController; | |
| 9 | 10 | |
| 10 | 11 | import java.util.List; |
| 11 | 12 | import java.util.Map; |
| ... | ... | @@ -15,54 +16,11 @@ import java.util.Map; |
| 15 | 16 | */ |
| 16 | 17 | @RestController |
| 17 | 18 | @RequestMapping("personnel") |
| 18 | -@EnableConfigurationProperties(DataToolsProperties.class) | |
| 19 | 19 | public class PersonnelController extends BaseController<Personnel, Integer> { |
| 20 | 20 | |
| 21 | 21 | @Autowired |
| 22 | - private DataToolsProperties dataToolsProperties; | |
| 23 | - | |
| 24 | - @Autowired | |
| 25 | 22 | private PersonnelService service; |
| 26 | - /** | |
| 27 | - * 覆写方法,因为form提交的方式参数不全,改用 json形式提交 @RequestBody | |
| 28 | - * @Title: save | |
| 29 | - * @Description: TODO(持久化对象) | |
| 30 | - * @param @param t | |
| 31 | - * @param @return 设定文件 | |
| 32 | - * @return Map<String,Object> {status: 1(成功),-1(失败)} | |
| 33 | - * @throws | |
| 34 | - */ | |
| 35 | - @RequestMapping(method = RequestMethod.POST) | |
| 36 | - public Map<String, Object> save(@RequestBody Personnel t){ | |
| 37 | - return baseService.save(t); | |
| 38 | - } | |
| 39 | - | |
| 40 | - /** | |
| 41 | - * 验证。 | |
| 42 | - * @param map | |
| 43 | - * @return | |
| 44 | - */ | |
| 45 | - @RequestMapping(value = "/validate/equale", method = RequestMethod.GET) | |
| 46 | - public Map<String, Object> validateData(@RequestParam Map<String, Object> map) { | |
| 47 | - // 一般比较相同公司下工号是否相同 | |
| 48 | - return baseService.validateEquale(map); | |
| 49 | - } | |
| 50 | - | |
| 51 | - @Override | |
| 52 | - protected String getDataImportKtrClasspath() { | |
| 53 | - return dataToolsProperties.getEmployeesDatainputktr(); | |
| 54 | - } | |
| 55 | - | |
| 56 | - @Override | |
| 57 | - protected String getDataExportKtrClasspath() { | |
| 58 | - return dataToolsProperties.getEmployeesDataoutputktr(); | |
| 59 | - } | |
| 60 | 23 | |
| 61 | - @Override | |
| 62 | - protected String getDataExportFilename() { | |
| 63 | - return "人员基础信息"; | |
| 64 | - } | |
| 65 | - | |
| 66 | 24 | @RequestMapping(value = "/sreachPersonnel", method = RequestMethod.GET) |
| 67 | 25 | public List<Map<String, String>> sreachPersonnel(@RequestParam String jobCode) { |
| 68 | 26 | return service.sreachPersonnel(jobCode); | ... | ... |
src/main/java/com/bsth/controller/realcontrol/DataManagerController.java
0 → 100644
| 1 | +package com.bsth.controller.realcontrol; | |
| 2 | + | |
| 3 | +import com.bsth.service.realcontrol.DataManagerService; | |
| 4 | +import org.apache.commons.lang3.StringEscapeUtils; | |
| 5 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 6 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 7 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 8 | +import org.springframework.web.bind.annotation.RestController; | |
| 9 | + | |
| 10 | +import java.util.Map; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 数据管理,包括从老系统的数据迁移。新系统的数据校验等 | |
| 14 | + * Created by panzhao on 2017/4/17. | |
| 15 | + */ | |
| 16 | +@RestController | |
| 17 | +@RequestMapping("dataManager") | |
| 18 | +public class DataManagerController { | |
| 19 | + | |
| 20 | + @Autowired | |
| 21 | + DataManagerService dataManagerService; | |
| 22 | + | |
| 23 | + @RequestMapping("cars/old_now") | |
| 24 | + public Map<String, Object> carInfos(@RequestParam Integer lineId){ | |
| 25 | + return dataManagerService.carInfos(lineId); | |
| 26 | + } | |
| 27 | + | |
| 28 | + @RequestMapping("car/updateDevices") | |
| 29 | + public Map<String, Object> updateDevices(@RequestParam String jsonStr){ | |
| 30 | + jsonStr = StringEscapeUtils.unescapeHtml4(jsonStr); | |
| 31 | + return dataManagerService.updateDevices(jsonStr); | |
| 32 | + } | |
| 33 | +} | ... | ... |
src/main/java/com/bsth/controller/realcontrol/anomalyCheckController.java
0 → 100644
| 1 | +package com.bsth.controller.realcontrol; | |
| 2 | + | |
| 3 | +import com.bsth.data.schedule.DayOfSchedule; | |
| 4 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 5 | +import org.slf4j.Logger; | |
| 6 | +import org.slf4j.LoggerFactory; | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 9 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 10 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 11 | +import org.springframework.web.bind.annotation.RestController; | |
| 12 | + | |
| 13 | +import java.util.HashSet; | |
| 14 | +import java.util.List; | |
| 15 | +import java.util.Set; | |
| 16 | + | |
| 17 | +/** | |
| 18 | + * 相关数据异常检测 | |
| 19 | + * Created by panzhao on 2017/4/14. | |
| 20 | + */ | |
| 21 | +@RestController | |
| 22 | +@RequestMapping("anomalyCheck") | |
| 23 | +public class anomalyCheckController { | |
| 24 | + | |
| 25 | + | |
| 26 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 27 | + | |
| 28 | + @Autowired | |
| 29 | + DayOfSchedule dayOfSchedule; | |
| 30 | + /** | |
| 31 | + * 出现重复班次的车辆 | |
| 32 | + * @param nbbm | |
| 33 | + */ | |
| 34 | + @RequestMapping(value = "/schRepeat", method = RequestMethod.POST) | |
| 35 | + public void schRepeat(@RequestParam String nbbm){ | |
| 36 | + logger.info("前端通知,车辆 " + nbbm + "出现重复班次,开始检测..."); | |
| 37 | + List<ScheduleRealInfo> list = dayOfSchedule.findByNbbm(nbbm); | |
| 38 | + | |
| 39 | + Set<ScheduleRealInfo> set = new HashSet<>(); | |
| 40 | + for(ScheduleRealInfo sch : list){ | |
| 41 | + if(!set.add(sch)){ | |
| 42 | + logger.info("出现一次重复班次,班次ID:" + sch.getId()); | |
| 43 | + } | |
| 44 | + } | |
| 45 | + | |
| 46 | + if(set.size() > 0){ | |
| 47 | + dayOfSchedule.replaceByNbbm(nbbm, set); | |
| 48 | + } | |
| 49 | + } | |
| 50 | +} | ... | ... |
src/main/java/com/bsth/controller/sys/UserController.java
| ... | ... | @@ -237,4 +237,9 @@ public class UserController extends BaseController<SysUser, Integer> { |
| 237 | 237 | } |
| 238 | 238 | return msg; |
| 239 | 239 | } |
| 240 | + | |
| 241 | + @RequestMapping(value = "/register" ,method = RequestMethod.POST) | |
| 242 | + public Map<String, Object> register(SysUser u){ | |
| 243 | + return sysUserService.register(u); | |
| 244 | + } | |
| 240 | 245 | } | ... | ... |
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| ... | ... | @@ -3,12 +3,14 @@ package com.bsth.data.schedule; |
| 3 | 3 | import com.alibaba.fastjson.JSON; |
| 4 | 4 | import com.alibaba.fastjson.JSONArray; |
| 5 | 5 | import com.bsth.Application; |
| 6 | +import com.bsth.common.Constants; | |
| 6 | 7 | import com.bsth.common.ResponseCode; |
| 7 | 8 | import com.bsth.data.BasicData; |
| 8 | 9 | import com.bsth.data.LineConfigData; |
| 9 | 10 | import com.bsth.data.directive.DirectivesPstThread; |
| 10 | 11 | import com.bsth.data.gpsdata.GpsRealData; |
| 11 | 12 | import com.bsth.data.gpsdata.recovery.GpsDataRecovery; |
| 13 | +import com.bsth.data.schedule.late_adjust.ScheduleLateThread; | |
| 12 | 14 | import com.bsth.data.schedule.thread.*; |
| 13 | 15 | import com.bsth.entity.realcontrol.LineConfig; |
| 14 | 16 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| ... | ... | @@ -27,6 +29,8 @@ import org.slf4j.LoggerFactory; |
| 27 | 29 | import org.springframework.beans.factory.annotation.Autowired; |
| 28 | 30 | import org.springframework.boot.CommandLineRunner; |
| 29 | 31 | import org.springframework.core.annotation.Order; |
| 32 | +import org.springframework.dao.DataIntegrityViolationException; | |
| 33 | +import org.springframework.jdbc.core.JdbcTemplate; | |
| 30 | 34 | import org.springframework.stereotype.Component; |
| 31 | 35 | |
| 32 | 36 | import java.text.ParseException; |
| ... | ... | @@ -383,6 +387,11 @@ public class DayOfSchedule implements CommandLineRunner { |
| 383 | 387 | sch.setLate(false); |
| 384 | 388 | } |
| 385 | 389 | |
| 390 | + //售票员为空设置为""字符串 | |
| 391 | + if(StringUtils.isEmpty(sch.getsGh())){ | |
| 392 | + sch.setsGh(""); | |
| 393 | + sch.setsName(""); | |
| 394 | + } | |
| 386 | 395 | sch.setJhlcOrig(sch.getJhlc()); |
| 387 | 396 | //保留备注 |
| 388 | 397 | if(StringUtils.isNotEmpty(sch.getRemark())) |
| ... | ... | @@ -855,6 +864,9 @@ public class DayOfSchedule implements CommandLineRunner { |
| 855 | 864 | return false; |
| 856 | 865 | } |
| 857 | 866 | |
| 867 | + | |
| 868 | + @Autowired | |
| 869 | + JdbcTemplate jdbcTemplate; | |
| 858 | 870 | /** |
| 859 | 871 | * 删除实际排班 |
| 860 | 872 | * @param lineCode |
| ... | ... | @@ -866,20 +878,33 @@ public class DayOfSchedule implements CommandLineRunner { |
| 866 | 878 | try { |
| 867 | 879 | String rq = currSchDateMap.get(lineCode); |
| 868 | 880 | if(StringUtils.isNotEmpty(rq)){ |
| 881 | + List<ScheduleRealInfo> all = findByLineCode(lineCode); | |
| 869 | 882 | //解除gps 和班次之间的关联 |
| 870 | - List<ScheduleRealInfo> unions = calcUnion(findByLineCode(lineCode), carExecutePlanMap.values()); | |
| 883 | + List<ScheduleRealInfo> unions = calcUnion(all, carExecutePlanMap.values()); | |
| 871 | 884 | for(ScheduleRealInfo sch : unions){ |
| 872 | 885 | removeExecPlan(sch.getClZbh()); |
| 873 | 886 | } |
| 887 | + //解除调度指令和班次的外键约束 | |
| 888 | + StringBuilder inStr = new StringBuilder("("); | |
| 889 | + for(ScheduleRealInfo sch : all){ | |
| 890 | + inStr.append(sch.getId() + ","); | |
| 891 | + } | |
| 892 | + inStr.deleteCharAt(inStr.length() - 1).append(")"); | |
| 893 | + jdbcTemplate.update(Constants.MULTI_REMOVE_DIRECTIVE_SCH_FK + " " + inStr.toString()); | |
| 874 | 894 | |
| 875 | 895 | //删除班次数据 |
| 876 | 896 | removeRealSch(lineCode, rq); |
| 877 | 897 | //删除相关班次修正记录 |
| 898 | + | |
| 878 | 899 | } |
| 879 | 900 | rs.put("status", ResponseCode.SUCCESS); |
| 880 | 901 | }catch (Exception e){ |
| 881 | 902 | logger.error("", e); |
| 882 | 903 | rs.put("status", ResponseCode.ERROR); |
| 904 | + if(e instanceof DataIntegrityViolationException) | |
| 905 | + rs.put("msg", "失败,违反数据约束!!"); | |
| 906 | + else | |
| 907 | + rs.put("msg", e.getMessage()); | |
| 883 | 908 | } |
| 884 | 909 | |
| 885 | 910 | return rs; |
| ... | ... | @@ -902,4 +927,16 @@ public class DayOfSchedule implements CommandLineRunner { |
| 902 | 927 | } |
| 903 | 928 | return rs; |
| 904 | 929 | } |
| 930 | + | |
| 931 | + /** | |
| 932 | + * 覆盖一辆车的所有班次 | |
| 933 | + * @param nbbm | |
| 934 | + * @param sets | |
| 935 | + */ | |
| 936 | + public void replaceByNbbm(String nbbm, Set<ScheduleRealInfo> sets){ | |
| 937 | + nbbmScheduleMap.removeAll(nbbm); | |
| 938 | + nbbmScheduleMap.putAll(nbbm, sets); | |
| 939 | + //重新计算班次应到时间 | |
| 940 | + updateQdzTimePlan(nbbm); | |
| 941 | + } | |
| 905 | 942 | } |
| 906 | 943 | \ No newline at end of file | ... | ... |
src/main/java/com/bsth/data/schedule/late_adjust/LateAdjustHandle.java
0 → 100644
| 1 | + | |
| 2 | +package com.bsth.data.schedule.late_adjust; | |
| 3 | + | |
| 4 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 5 | + | |
| 6 | +import java.util.Map; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * 误点调整处理程序 | |
| 10 | + * Created by panzhao on 2017/4/16. | |
| 11 | + */ | |
| 12 | +public class LateAdjustHandle { | |
| 13 | + | |
| 14 | + /** | |
| 15 | + * 误点的车辆 和 班次 | |
| 16 | + */ | |
| 17 | + private static Map<String, ScheduleRealInfo> lateSchMap; | |
| 18 | + | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * 误点的班次ID 和 停靠时间(秒) | |
| 22 | + */ | |
| 23 | + private static Map<Long, Integer> stopTimeMap; | |
| 24 | + | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 班次误点(考虑停靠时间) | |
| 28 | + * @param sch | |
| 29 | + */ | |
| 30 | + public static void schLate(ScheduleRealInfo sch){ | |
| 31 | + | |
| 32 | + } | |
| 33 | +} | ... | ... |
src/main/java/com/bsth/data/schedule/thread/ScheduleLateThread.java renamed to src/main/java/com/bsth/data/schedule/late_adjust/ScheduleLateThread.java
| 1 | -package com.bsth.data.schedule.thread; | |
| 2 | - | |
| 3 | - | |
| 4 | -import java.util.ArrayList; | |
| 5 | -import java.util.Collections; | |
| 6 | -import java.util.Comparator; | |
| 7 | -import java.util.List; | |
| 8 | - | |
| 9 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 10 | -import org.springframework.stereotype.Component; | |
| 11 | - | |
| 12 | -import com.bsth.data.schedule.DayOfSchedule; | |
| 13 | -import com.bsth.data.schedule.ScheduleComparator; | |
| 14 | -import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 15 | -import com.bsth.websocket.handler.SendUtils; | |
| 16 | - | |
| 17 | -/** | |
| 18 | - * | |
| 19 | - * @ClassName: ScheduleLateThread | |
| 20 | - * @Description: TODO(班次误点扫描线程) | |
| 21 | - * @author PanZhao | |
| 22 | - * @date 2016年8月31日 下午3:09:02 | |
| 23 | - * | |
| 24 | - */ | |
| 25 | -@Component | |
| 26 | -public class ScheduleLateThread extends Thread{ | |
| 27 | - | |
| 28 | - @Autowired | |
| 29 | - DayOfSchedule dayOfSchedule; | |
| 30 | - | |
| 31 | - @Autowired | |
| 32 | - SendUtils sendUtils; | |
| 33 | - | |
| 34 | - private static Comparator<ScheduleRealInfo> cpm = new ScheduleComparator.FCSJ(); | |
| 35 | - | |
| 36 | - @Override | |
| 37 | - public void run() { | |
| 38 | - List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findAll()); | |
| 39 | - Collections.sort(all, cpm); | |
| 40 | - | |
| 41 | - long t = System.currentTimeMillis(); | |
| 42 | - int size = all.size(); | |
| 43 | - | |
| 44 | - ScheduleRealInfo sch; | |
| 45 | - for(int i = 0; i < size; i ++){ | |
| 46 | - sch = all.get(i); | |
| 47 | - if(sch.getDfsjT() > t) | |
| 48 | - break; | |
| 49 | - | |
| 50 | - if(sch.isLate() == false | |
| 51 | - && sch.getStatus() == 0 | |
| 52 | - && sch.getFcsjActual() == null){ | |
| 53 | - //应发未发 | |
| 54 | - sch.setLate(true); | |
| 55 | - //通知客户端 | |
| 56 | - sendUtils.refreshSch(sch); | |
| 57 | - } | |
| 58 | - } | |
| 59 | - } | |
| 60 | -} | |
| 1 | +package com.bsth.data.schedule.late_adjust; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.bsth.data.schedule.DayOfSchedule; | |
| 5 | +import com.bsth.data.schedule.ScheduleComparator; | |
| 6 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 7 | +import com.bsth.websocket.handler.SendUtils; | |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | +import org.springframework.stereotype.Component; | |
| 10 | + | |
| 11 | +import java.util.ArrayList; | |
| 12 | +import java.util.Collections; | |
| 13 | +import java.util.Comparator; | |
| 14 | +import java.util.List; | |
| 15 | + | |
| 16 | +/** | |
| 17 | + * | |
| 18 | + * @ClassName: ScheduleLateThread | |
| 19 | + * @Description: TODO(班次误点扫描线程) | |
| 20 | + * @author PanZhao | |
| 21 | + * @date 2016年8月31日 下午3:09:02 | |
| 22 | + * | |
| 23 | + */ | |
| 24 | +@Component | |
| 25 | +public class ScheduleLateThread extends Thread{ | |
| 26 | + | |
| 27 | + @Autowired | |
| 28 | + DayOfSchedule dayOfSchedule; | |
| 29 | + | |
| 30 | + @Autowired | |
| 31 | + SendUtils sendUtils; | |
| 32 | + | |
| 33 | + private static Comparator<ScheduleRealInfo> cpm = new ScheduleComparator.FCSJ(); | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public void run() { | |
| 37 | + List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findAll()); | |
| 38 | + Collections.sort(all, cpm); | |
| 39 | + | |
| 40 | + long t = System.currentTimeMillis(); | |
| 41 | + int size = all.size(); | |
| 42 | + | |
| 43 | + ScheduleRealInfo sch; | |
| 44 | + for(int i = 0; i < size; i ++){ | |
| 45 | + sch = all.get(i); | |
| 46 | + if(sch.getDfsjT() > t) | |
| 47 | + break; | |
| 48 | + | |
| 49 | + if(sch.isLate() == false | |
| 50 | + && sch.getStatus() == 0 | |
| 51 | + && sch.getFcsjActual() == null){ | |
| 52 | + //应发未发 | |
| 53 | + sch.setLate(true); | |
| 54 | + //通知客户端 | |
| 55 | + sendUtils.refreshSch(sch); | |
| 56 | + } | |
| 57 | + } | |
| 58 | + } | |
| 59 | +} | ... | ... |
src/main/java/com/bsth/entity/mcy_forms/Shiftuehiclemanth.java
| ... | ... | @@ -22,6 +22,17 @@ public class Shiftuehiclemanth { |
| 22 | 22 | |
| 23 | 23 | private String jgh; |
| 24 | 24 | private String zbh; |
| 25 | + public String getSgh() { | |
| 26 | + return sgh; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void setSgh(String sgh) { | |
| 30 | + this.sgh = sgh; | |
| 31 | + } | |
| 32 | + | |
| 33 | + private String sgh; | |
| 34 | + | |
| 35 | + | |
| 25 | 36 | public String getJgh() { |
| 26 | 37 | return jgh; |
| 27 | 38 | } | ... | ... |
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
src/main/java/com/bsth/entity/schedule/rule/ScheduleRule1Flat.java
| ... | ... | @@ -57,6 +57,7 @@ public class ScheduleRule1Flat extends BEntity { |
| 57 | 57 | private String lpNames; |
| 58 | 58 | /** 对应的路牌ids(用逗号隔开) */ |
| 59 | 59 | @NotNull |
| 60 | + @Column(length = 1000) | |
| 60 | 61 | private String lpIds; |
| 61 | 62 | /** 起始路牌(从0开始) */ |
| 62 | 63 | @NotNull |
| ... | ... | @@ -66,6 +67,7 @@ public class ScheduleRule1Flat extends BEntity { |
| 66 | 67 | private String ryDbbms; |
| 67 | 68 | /** 对应的人员配置ids(用逗号隔开,如果分班,就先-隔开再逗号隔开) */ |
| 68 | 69 | @NotNull |
| 70 | + @Column(length = 1000) | |
| 69 | 71 | private String ryConfigIds; |
| 70 | 72 | /** 起始人员(从0开始) */ |
| 71 | 73 | @NotNull | ... | ... |
src/main/java/com/bsth/entity/schedule/temp/SchedulePlanRuleResult.java
| ... | ... | @@ -2,10 +2,7 @@ package com.bsth.entity.schedule.temp; |
| 2 | 2 | |
| 3 | 3 | import com.bsth.entity.schedule.SchedulePlan; |
| 4 | 4 | |
| 5 | -import javax.persistence.Entity; | |
| 6 | -import javax.persistence.GeneratedValue; | |
| 7 | -import javax.persistence.Id; | |
| 8 | -import javax.persistence.Table; | |
| 5 | +import javax.persistence.*; | |
| 9 | 6 | import java.util.Date; |
| 10 | 7 | |
| 11 | 8 | /** |
| ... | ... | @@ -32,12 +29,14 @@ public class SchedulePlanRuleResult { |
| 32 | 29 | private String ccZbh; |
| 33 | 30 | |
| 34 | 31 | /** 路牌id列表字符串 */ |
| 32 | + @Column(length = 1000) | |
| 35 | 33 | private String gids; |
| 36 | 34 | /** 路牌名字列表字符串 */ |
| 37 | 35 | private String gnames; |
| 38 | 36 | /** 翻到哪个路牌索引 */ |
| 39 | 37 | private String gidindex; |
| 40 | 38 | /** 人员配置id列表字符串 */ |
| 39 | + @Column(length = 1000) | |
| 41 | 40 | private String ecids; |
| 42 | 41 | /** 人员配置搭班编码列表字符串 */ |
| 43 | 42 | private String ecdbbms; | ... | ... |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| ... | ... | @@ -156,7 +156,10 @@ public class FormsServiceImpl implements FormsService { |
| 156 | 156 | if(map.containsKey("fgsdmManth")){ |
| 157 | 157 | fgsdmManth=map.get("fgsdmManth").toString(); |
| 158 | 158 | } |
| 159 | - String sql = "select r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type,r.s_name,r.lp_name " | |
| 159 | + String sql = "select" | |
| 160 | + + " r.j_name, r.cl_zbh,r.j_gh,r.s_gh,r.s_name " | |
| 161 | +// + "r.gs_bm,r.gs_name," | |
| 162 | +// + " r.fgs_bm,r.fgs_name,r.bc_type,r.lp_name " | |
| 160 | 163 | + " from bsth_c_s_sp_info_real r " |
| 161 | 164 | + " where 1=1 "; |
| 162 | 165 | if(map.get("startDate")!=null&&!map.get("startDate").equals("")){ |
| ... | ... | @@ -169,19 +172,23 @@ public class FormsServiceImpl implements FormsService { |
| 169 | 172 | if(map.get("line")!=null&&!map.get("line").equals("")){ |
| 170 | 173 | sql+=" and r.xl_bm='"+ map.get("line").toString() + "' "; |
| 171 | 174 | } |
| 172 | - sql+= " AND r.gs_bm is not null and r.bc_type not in('in','out')"; | |
| 173 | - if(map.get("gsdmManth")!=null&&!map.get("gsdmManth").equals("")){ | |
| 174 | - sql+=" and r.gs_bm='"+map.get("gsdmManth").toString()+"' "; | |
| 175 | - } | |
| 175 | +// sql+= " AND r.gs_bm is not null and r.bc_type not in('in','out')"; | |
| 176 | +// if(map.get("gsdmManth")!=null&&!map.get("gsdmManth").equals("")){ | |
| 177 | + sql+=" and r.gs_bm like'%"+gsdmManth+"%' "; | |
| 178 | +// } | |
| 176 | 179 | if(map.get("fgsdmManth")!=null&&!map.get("fgsdmManth").equals("")){ |
| 177 | - sql+=" and r.fgs_bm='"+map.get("fgsdmManth").toString()+"' "; | |
| 180 | + sql+=" and r.fgs_bm like'%"+fgsdmManth+"%' "; | |
| 178 | 181 | } |
| 179 | 182 | if(empnames.equals("售票员")){ |
| 180 | 183 | sql+="and r.s_name is not null AND r.s_name !=''"; |
| 181 | 184 | } |
| 182 | - sql += " GROUP BY r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type "; | |
| 185 | + sql += " GROUP BY " | |
| 186 | + + "r.j_name, r.cl_zbh,r.j_gh,r.s_gh,r.s_name "; | |
| 187 | +// + ",r.gs_bm,r.gs_name," | |
| 188 | +// + "r.fgs_bm,r.fgs_name,r.bc_type "; | |
| 183 | 189 | |
| 184 | - | |
| 190 | +// r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name," | |
| 191 | +// + " r.fgs_bm,r.fgs_name,r.bc_type,r.s_name,r.lp_name | |
| 185 | 192 | List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() { |
| 186 | 193 | |
| 187 | 194 | @Override |
| ... | ... | @@ -191,12 +198,13 @@ public class FormsServiceImpl implements FormsService { |
| 191 | 198 | shif.setjName(arg0.getString("j_name")); |
| 192 | 199 | }else if(empnames.equals("售票员")){ |
| 193 | 200 | shif.setjName(arg0.getString("s_name")==null ? "":arg0.getString("s_name")); |
| 201 | + shif.setSgh(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh")); | |
| 194 | 202 | }else if(empnames.equals("车辆自编号")){ |
| 195 | 203 | shif.setjName(arg0.getString("cl_zbh")); |
| 196 | 204 | } |
| 197 | - | |
| 198 | 205 | shif.setJgh(arg0.getString("j_gh")); |
| 199 | 206 | shif.setZbh(arg0.getString("cl_zbh")); |
| 207 | +// shif.setjName(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh")); | |
| 200 | 208 | return shif; |
| 201 | 209 | } |
| 202 | 210 | }); |
| ... | ... | @@ -208,9 +216,24 @@ public class FormsServiceImpl implements FormsService { |
| 208 | 216 | Shiftuehiclemanth d=list.get(i); |
| 209 | 217 | for (int j = 0; j < lists.size(); j++) { |
| 210 | 218 | ScheduleRealInfo s=lists.get(j); |
| 211 | - if(d.getJgh().equals(s.getjGh()) && d.getZbh().equals(s.getClZbh())){ | |
| 212 | - sList.add(s); | |
| 219 | +// if(d.getJgh().equals(s.getjGh()) && d.getZbh().equals(s.getClZbh())){ | |
| 220 | +// sList.add(s); | |
| 221 | +// } | |
| 222 | + if(empnames.equals("驾驶员")){ | |
| 223 | + if(d.getJgh().equals(s.getjGh())){ | |
| 224 | + sList.add(s); | |
| 225 | + } | |
| 226 | + }else if(empnames.equals("售票员")){ | |
| 227 | + String sgh=s.getsGh()==null?"":s.getsGh(); | |
| 228 | + if(d.getSgh().equals(sgh) && d.getZbh().equals(s.getClZbh())){ | |
| 229 | + sList.add(s); | |
| 230 | + } | |
| 231 | + }else if(empnames.equals("车辆自编号")){ | |
| 232 | + if(d.getZbh().equals(s.getClZbh())){ | |
| 233 | + sList.add(s); | |
| 234 | + } | |
| 213 | 235 | } |
| 236 | + | |
| 214 | 237 | } |
| 215 | 238 | |
| 216 | 239 | double ksgl=culateMileageService.culateKsgl(sList); |
| ... | ... | @@ -219,16 +242,17 @@ public class FormsServiceImpl implements FormsService { |
| 219 | 242 | double ljgl=culateMileageService.culateLjgl(sList); |
| 220 | 243 | double sjgl=culateMileageService.culateSjgl(sList); |
| 221 | 244 | double zyygl=Arith.add(ljgl, sjgl); |
| 222 | - double cjbc=culateMileageService.culateLbbc(sList); | |
| 223 | - double Ljbc=culateMileageService.culateLjbc(sList,""); | |
| 245 | + int cjbc=culateMileageService.culateLbbc(sList); | |
| 246 | + int ljbc=culateMileageService.culateLjbc(sList,""); | |
| 247 | + int sjbc=culateMileageService.culateSjbc(sList, ""); | |
| 224 | 248 | double cjgl=culateMileageService.culateLbgl(sList); |
| 225 | 249 | double zjgl=culateMileageService.culateLjgl(sList); |
| 226 | 250 | d.setEmptMileage(String.valueOf(zksgl));//空驶公里 |
| 227 | 251 | d.setTotalm(String.valueOf(Arith.add(zksgl, zyygl)));//总公里 |
| 228 | - d.setSjbc(String.valueOf(culateMileageService.culateSjbc(sList, "")+culateMileageService.culateLjbc(sList, ""))); | |
| 252 | + d.setSjbc(String.valueOf(sjbc+ljbc)); | |
| 229 | 253 | d.setJhlc(String.valueOf(zyygl));//运营里程 |
| 230 | 254 | d.setCjbc(String.valueOf(cjbc));//抽检班次 |
| 231 | - d.setLjbc(String.valueOf(Ljbc));//增加班次 | |
| 255 | + d.setLjbc(String.valueOf(ljbc));//增加班次 | |
| 232 | 256 | d.setRemMileage(String.valueOf(cjgl));//抽检里程 |
| 233 | 257 | d.setAddMileage(String.valueOf(zjgl));//增加里程 |
| 234 | 258 | |
| ... | ... | @@ -258,13 +282,16 @@ public class FormsServiceImpl implements FormsService { |
| 258 | 282 | if(map.get("fgsdmShif")!=null&&!map.get("fgsdmShif").equals("")){ |
| 259 | 283 | fgsdmShif =map.get("fgsdmShif").toString(); |
| 260 | 284 | } |
| 261 | - String sql ="select t.* from (select r.schedule_date,r.j_name,IFNULL(r.s_name,'')as s_name," | |
| 262 | - + " r.cl_zbh,r.xl_bm, r.j_gh,r.gs_bm,r.fgs_bm,r.lp_name FROM bsth_c_s_sp_info_real r where 1=1 " | |
| 285 | + String sql ="select t.* from (select r.schedule_date,r.j_name," | |
| 286 | + + "IFNULL(r.s_name,'')as s_name," | |
| 287 | + + " r.cl_zbh,r.xl_bm, r.j_gh,r.gs_bm,r.fgs_bm,r.lp_name " | |
| 288 | + + "FROM bsth_c_s_sp_info_real r where 1=1 " | |
| 263 | 289 | + " and to_days(r.schedule_date)=to_days('"+date + "') " |
| 264 | 290 | + " and r.xl_bm like '%"+line+"%' " |
| 265 | 291 | + " and r.gs_bm like '%"+gsdmShif+"%' " |
| 266 | 292 | + " and r.fgs_bm like '%"+fgsdmShif+"%' ) t" |
| 267 | - + " GROUP BY t.schedule_date,t.j_name,t.s_name, t.cl_zbh,t.xl_bm,t.j_gh,t.gs_bm,t.fgs_bm "; | |
| 293 | + + " GROUP BY t.schedule_date,t.j_name,t.s_name, " | |
| 294 | + + "t.cl_zbh,t.xl_bm,t.j_gh,t.gs_bm,t.fgs_bm,t.lp_name "; | |
| 268 | 295 | |
| 269 | 296 | |
| 270 | 297 | List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { |
| ... | ... | @@ -302,22 +329,23 @@ public class FormsServiceImpl implements FormsService { |
| 302 | 329 | double zyygl=Arith.add(ljgl, sjgl); |
| 303 | 330 | double jhgl=culateMileageService.culateJhgl(sList); |
| 304 | 331 | double cjgl=culateMileageService.culateLbgl(sList); |
| 305 | - double jhbc =culateMileageService.culateJhbc(sList,""); | |
| 306 | - double cjbc=culateMileageService.culateLbbc(sList); | |
| 307 | - double Ljbc=culateMileageService.culateLjbc(sList,""); | |
| 332 | + int jhbc =culateMileageService.culateJhbc(sList,""); | |
| 333 | + int cjbc=culateMileageService.culateLbbc(sList); | |
| 334 | + int ljbc=culateMileageService.culateLjbc(sList,""); | |
| 335 | + int sjbc=culateMileageService.culateSjbc(sList, ""); | |
| 308 | 336 | double zjgl=culateMileageService.culateLjgl(sList); |
| 309 | 337 | d.setEmptMileage(String.valueOf(zksgl));//空驶公里 |
| 310 | 338 | d.setTotalm(String.valueOf(Arith.add(zksgl, zyygl)));//总公里 |
| 311 | - d.setSjbc(String.valueOf(culateMileageService.culateSjbc(sList, "")+culateMileageService.culateLjbc(sList, ""))); | |
| 339 | + d.setSjbc(String.valueOf(sjbc+ljbc)); | |
| 312 | 340 | d.setJhlc(String.valueOf(jhgl));//计划里程 |
| 313 | 341 | d.setYygl(String.valueOf(zyygl));//运营公里 |
| 314 | 342 | d.setSjjhlc(String.valueOf(sjgl));//实际计划里程 |
| 315 | 343 | d.setRemMileage(String.valueOf(cjgl));//抽减里程 |
| 316 | 344 | d.setJhbc(String.valueOf(jhbc));//计划班次 |
| 317 | 345 | d.setCjbc(String.valueOf(cjbc));//抽检班次 |
| 318 | - d.setLjbc(String.valueOf(Ljbc));//增加班次 | |
| 346 | + d.setLjbc(String.valueOf(ljbc));//增加班次 | |
| 319 | 347 | d.setAddMileage(String.valueOf(zjgl));//增加公里 |
| 320 | - d.setSjjhbc(String.valueOf(culateMileageService.culateSjbc(sList, "")));//实际计划班次 | |
| 348 | + d.setSjjhbc(String.valueOf(sjbc));//实际计划班次 | |
| 321 | 349 | } |
| 322 | 350 | return list; |
| 323 | 351 | } |
| ... | ... | @@ -806,7 +834,7 @@ public class FormsServiceImpl implements FormsService { |
| 806 | 834 | + " and y.ssgsdm like '%"+gsbm+"%' " |
| 807 | 835 | + " and y.fgsdm like '%"+fgsbm+"%'" |
| 808 | 836 | + " ) x" |
| 809 | - + " on t.cl_zbh = x.nbbm "; | |
| 837 | + + " on t.cl_zbh = x.nbbm and t.j_gh=x.jsy"; | |
| 810 | 838 | |
| 811 | 839 | List<Daily> list = jdbcTemplate.query(sql, new RowMapper<Daily>() { |
| 812 | 840 | @Override | ... | ... |
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java
| ... | ... | @@ -106,8 +106,6 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS |
| 106 | 106 | List<Cdl> cdyList=cdlRepository.obtainCdl(); |
| 107 | 107 | //从排班表中计算出行驶的总里程 |
| 108 | 108 | List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList(line,rq,"","","",""); |
| 109 | - List<Ylb> addList=new ArrayList<Ylb>(); | |
| 110 | - List<Ylb> updateList=new ArrayList<Ylb>(); | |
| 111 | 109 | for(int x=0;x<listpb.size();x++){ |
| 112 | 110 | String type="add"; |
| 113 | 111 | boolean sfdc=false; | ... | ... |
src/main/java/com/bsth/service/realcontrol/DataManagerService.java
0 → 100644
src/main/java/com/bsth/service/realcontrol/impl/DataManagerServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.realcontrol.impl; | |
| 2 | + | |
| 3 | +import com.alibaba.fastjson.JSONArray; | |
| 4 | +import com.alibaba.fastjson.JSONObject; | |
| 5 | +import com.bsth.common.ResponseCode; | |
| 6 | +import com.bsth.data.BasicData; | |
| 7 | +import com.bsth.entity.Cars; | |
| 8 | +import com.bsth.repository.CarsRepository; | |
| 9 | +import com.bsth.service.realcontrol.DataManagerService; | |
| 10 | +import com.bsth.util.db.DBUtils_oldSystem; | |
| 11 | +import org.slf4j.Logger; | |
| 12 | +import org.slf4j.LoggerFactory; | |
| 13 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 14 | +import org.springframework.jdbc.core.JdbcTemplate; | |
| 15 | +import org.springframework.stereotype.Service; | |
| 16 | + | |
| 17 | +import java.util.ArrayList; | |
| 18 | +import java.util.HashMap; | |
| 19 | +import java.util.List; | |
| 20 | +import java.util.Map; | |
| 21 | + | |
| 22 | +/** | |
| 23 | + * Created by panzhao on 2017/4/18. | |
| 24 | + */ | |
| 25 | +@Service | |
| 26 | +public class DataManagerServiceImpl implements DataManagerService{ | |
| 27 | + | |
| 28 | + @Autowired | |
| 29 | + CarsRepository carsRepository; | |
| 30 | + | |
| 31 | + @Autowired | |
| 32 | + JdbcTemplate controlJdbcTemp; | |
| 33 | + | |
| 34 | + @Autowired | |
| 35 | + BasicData.BasicDataLoader dataLoader; | |
| 36 | + | |
| 37 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 38 | + | |
| 39 | + @Override | |
| 40 | + public Map<String, Object> carInfos(Integer lineId) { | |
| 41 | + | |
| 42 | + Map<String, Object> rs = new HashMap<>(); | |
| 43 | + try { | |
| 44 | + List<Map<String, String>> nowData = new ArrayList<>(); | |
| 45 | + List<Map<String, String>> oldData = new ArrayList<>(); | |
| 46 | + Map<String, String> map; | |
| 47 | + | |
| 48 | + //查询新系统车辆信息 | |
| 49 | + List<Cars> list = carsRepository.findCarsByLineId(lineId); | |
| 50 | + for(Cars c : list){ | |
| 51 | + map = new HashMap<>(); | |
| 52 | + map.put("nbbm", c.getInsideCode()); | |
| 53 | + map.put("device", c.getEquipmentCode()); | |
| 54 | + nowData.add(map); | |
| 55 | + } | |
| 56 | + | |
| 57 | + //获取老系统数据 | |
| 58 | + JdbcTemplate jdbcTemplate = new JdbcTemplate(DBUtils_oldSystem.getDataSource()); | |
| 59 | + List<Map<String, Object>> oyList = jdbcTemplate.queryForList("select NBBM,SBBH from JJWGPS_T_CLXXB t where xlbm=?", BasicData.lineId2CodeMap.get(lineId)); | |
| 60 | + for(Map<String, Object> tempMap : oyList){ | |
| 61 | + map = new HashMap<>(); | |
| 62 | + map.put("nbbm", tempMap.get("NBBM").toString()); | |
| 63 | + map.put("device", tempMap.get("SBBH").toString()); | |
| 64 | + oldData.add(map); | |
| 65 | + } | |
| 66 | + | |
| 67 | + rs.put("status", ResponseCode.SUCCESS); | |
| 68 | + rs.put("nows", nowData); | |
| 69 | + rs.put("olds", oldData); | |
| 70 | + }catch (Exception e){ | |
| 71 | + logger.error("", e); | |
| 72 | + rs.put("status", ResponseCode.ERROR); | |
| 73 | + rs.put("msg", e.getMessage()); | |
| 74 | + } | |
| 75 | + | |
| 76 | + return rs; | |
| 77 | + } | |
| 78 | + | |
| 79 | + /** | |
| 80 | + * 更新设备号 | |
| 81 | + * @param jsonStr | |
| 82 | + * @return | |
| 83 | + */ | |
| 84 | + @Override | |
| 85 | + public Map<String, Object> updateDevices(String jsonStr) { | |
| 86 | + Map<String, Object> rs = new HashMap<>(); | |
| 87 | + try { | |
| 88 | + int count=0; | |
| 89 | + JSONArray array = JSONArray.parseArray(jsonStr); | |
| 90 | + JSONObject jObj; | |
| 91 | + for(int i = 0; i < array.size(); i ++){ | |
| 92 | + jObj = array.getJSONObject(i); | |
| 93 | + count += controlJdbcTemp.update("update bsth_c_cars set equipment_code=? where inside_code=?" | |
| 94 | + , jObj.getString("device"), jObj.getString("nbbm")); | |
| 95 | + } | |
| 96 | + | |
| 97 | + //刷新缓存 | |
| 98 | + dataLoader.loadDeviceInfo(); | |
| 99 | + rs.put("status", ResponseCode.SUCCESS); | |
| 100 | + rs.put("count", count); | |
| 101 | + }catch (Exception e){ | |
| 102 | + logger.error("", e); | |
| 103 | + rs.put("status", ResponseCode.ERROR); | |
| 104 | + rs.put("msg", e.getMessage()); | |
| 105 | + } | |
| 106 | + return rs; | |
| 107 | + } | |
| 108 | +} | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -3,6 +3,7 @@ package com.bsth.service.realcontrol.impl; |
| 3 | 3 | import com.alibaba.fastjson.JSON; |
| 4 | 4 | import com.alibaba.fastjson.JSONArray; |
| 5 | 5 | import com.alibaba.fastjson.JSONObject; |
| 6 | +import com.bsth.common.Constants; | |
| 6 | 7 | import com.bsth.common.ResponseCode; |
| 7 | 8 | import com.bsth.controller.realcontrol.dto.ChangePersonCar; |
| 8 | 9 | import com.bsth.controller.realcontrol.dto.DfsjChange; |
| ... | ... | @@ -400,25 +401,33 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 400 | 401 | Map<String, Object> rs = new HashMap<>(); |
| 401 | 402 | rs.put("status", ResponseCode.ERROR); |
| 402 | 403 | |
| 403 | - ScheduleRealInfo sch = dayOfSchedule.get(id); | |
| 404 | - if (sch == null) { | |
| 405 | - rs.put("msg", "无效的id号"); | |
| 406 | - return rs; | |
| 407 | - } | |
| 404 | + try { | |
| 405 | + ScheduleRealInfo sch = dayOfSchedule.get(id); | |
| 406 | + if (sch == null) { | |
| 407 | + rs.put("msg", "无效的id号"); | |
| 408 | + return rs; | |
| 409 | + } | |
| 408 | 410 | |
| 409 | - if (!sch.isSflj()) { | |
| 410 | - rs.put("msg", "你只能删除临加班次"); | |
| 411 | - return rs; | |
| 412 | - } | |
| 411 | + if (!sch.isSflj()) { | |
| 412 | + rs.put("msg", "你只能删除临加班次"); | |
| 413 | + return rs; | |
| 414 | + } | |
| 413 | 415 | |
| 414 | - //数据库删除 | |
| 415 | - rs = super.delete(id); | |
| 416 | - if(rs.get("status").equals(ResponseCode.SUCCESS)){ | |
| 417 | - dayOfSchedule.delete(sch); | |
| 418 | - //更新起点应到时间 | |
| 419 | - List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch.getClZbh()); | |
| 420 | - rs.put("ts", ts); | |
| 421 | - rs.put("delete", sch); | |
| 416 | + //解除和调度指令的外键约束 | |
| 417 | + jdbcTemplate.update(Constants.REMOVE_DIRECTIVE_SCH_FK, id); | |
| 418 | + | |
| 419 | + //数据库删除 | |
| 420 | + rs = super.delete(id); | |
| 421 | + if(rs.get("status").equals(ResponseCode.SUCCESS)){ | |
| 422 | + dayOfSchedule.delete(sch); | |
| 423 | + //更新起点应到时间 | |
| 424 | + List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch.getClZbh()); | |
| 425 | + rs.put("ts", ts); | |
| 426 | + rs.put("delete", sch); | |
| 427 | + } | |
| 428 | + }catch (Exception e){ | |
| 429 | + logger.error("", e); | |
| 430 | + rs.put("msg", e.getMessage()); | |
| 422 | 431 | } |
| 423 | 432 | |
| 424 | 433 | return rs; |
| ... | ... | @@ -494,14 +503,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 494 | 503 | String px = type; |
| 495 | 504 | if (state.equals("lpName")) { |
| 496 | 505 | state = state + "+1"; |
| 497 | - type = "asc"; | |
| 506 | + type = "ASC"; | |
| 498 | 507 | } |
| 499 | 508 | String sqlPlan = "select min(s.id) as id,s.j_Gh as jGh,s.cl_Zbh as clZbh," |
| 500 | - + " s.lp_Name as lpName,s.j_Name as jName" | |
| 509 | + + " s.lp_Name as lpName,s.j_Name as jName,min(s.schedule_date_str) as dateStr ,min(s.fcsj) as fcsj" | |
| 501 | 510 | + " from bsth_c_s_sp_info_real s " |
| 502 | 511 | + " where s.xl_Bm = '" + line + "' and DATE_FORMAT(s.schedule_Date,'%Y-%m-%d') ='" + date + "' " |
| 503 | 512 | + " GROUP BY s.j_Gh,s.cl_Zbh,s.lp_Name ,s.j_Name" |
| 504 | - + " order by (" + state + ") " + type; | |
| 513 | + + " order by (" + state + "),dateStr,fcsj " + type; | |
| 505 | 514 | List<ScheduleRealInfo> list = jdbcTemplate.query(sqlPlan, |
| 506 | 515 | new RowMapper<ScheduleRealInfo>() { |
| 507 | 516 | @Override |
| ... | ... | @@ -518,29 +527,41 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 518 | 527 | if (lpname.equals("lpName")) { |
| 519 | 528 | List<ScheduleRealInfo> listNew = new ArrayList<ScheduleRealInfo>(); |
| 520 | 529 | Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$"); |
| 521 | - if (px.equals("desc")) { | |
| 530 | +// if (px.equals("desc")) { | |
| 522 | 531 | int zt = 0; |
| 523 | - for (int l = 0; l < 3; l++) { | |
| 532 | + for (int l = 0; l < 2; l++) { | |
| 524 | 533 | for (int i = 0; i < list.size(); i++) { |
| 525 | 534 | ScheduleRealInfo t = list.get(i); |
| 526 | 535 | if (t.getLpName().indexOf("+") != -1) { |
| 527 | 536 | if (zt == 0) { |
| 528 | 537 | listNew.add(t); |
| 529 | 538 | } |
| 530 | - | |
| 531 | 539 | } else if (pattern.matcher(t.getLpName()).matches()) { |
| 532 | 540 | if (zt == 1) { |
| 533 | 541 | listNew.add(t); |
| 534 | 542 | } |
| 535 | 543 | } else { |
| 536 | - if (zt == 2) { | |
| 537 | - listNew.add(t); | |
| 538 | - } | |
| 544 | +// if (zt == 2) { | |
| 545 | +// listNew.add(t); | |
| 546 | +// } | |
| 547 | + continue; | |
| 539 | 548 | } |
| 540 | 549 | } |
| 541 | 550 | zt++; |
| 542 | 551 | } |
| 543 | - } else { | |
| 552 | + | |
| 553 | + Collections.sort(list, new ComparableLp()); | |
| 554 | + for (int i = 0; i < list.size(); i++) { | |
| 555 | + ScheduleRealInfo t = list.get(i); | |
| 556 | + if (t.getLpName().indexOf("+") != -1) { | |
| 557 | + continue; | |
| 558 | + } else if (pattern.matcher(t.getLpName()).matches()) { | |
| 559 | + continue; | |
| 560 | + } else { | |
| 561 | + listNew.add(t); | |
| 562 | + } | |
| 563 | + } | |
| 564 | + /*} else { | |
| 544 | 565 | int zt = 0; |
| 545 | 566 | for (int l = 0; l < 3; l++) { |
| 546 | 567 | for (int i = 0; i < list.size(); i++) { |
| ... | ... | @@ -563,7 +584,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 563 | 584 | zt++; |
| 564 | 585 | } |
| 565 | 586 | |
| 566 | - } | |
| 587 | + }*/ | |
| 567 | 588 | return listNew; |
| 568 | 589 | } else { |
| 569 | 590 | return list; |
| ... | ... | @@ -1382,20 +1403,20 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1382 | 1403 | lists.add(s); |
| 1383 | 1404 | } |
| 1384 | 1405 | } |
| 1385 | - double ksgl=culateService.culateKsgl(lists); | |
| 1406 | + double ksgl=culateService.culateKsgl(list); | |
| 1386 | 1407 | double sjgl=culateService.culateSjgl(lists); |
| 1387 | 1408 | double jccgl=culateService.culateJccgl(lists); |
| 1388 | 1409 | double ljgl=culateService.culateLjgl(lists); |
| 1389 | 1410 | |
| 1390 | 1411 | map.put("jhlc", culateService.culateJhgl(list)); //计划里程 |
| 1391 | - map.put("remMileage", culateService.culateLbgl(lists)); //烂班公里 | |
| 1412 | + map.put("remMileage", culateService.culateLbgl(list)); //烂班公里 | |
| 1392 | 1413 | map.put("addMileage", ljgl); //临加公里 |
| 1393 | 1414 | map.put("yygl",Arith.add(sjgl,ljgl)); //实际公里 |
| 1394 | 1415 | map.put("ksgl", ksgl);//空驶公里 |
| 1395 | 1416 | map.put("realMileage",Arith.add(Arith.add(ksgl,jccgl ),Arith.add(sjgl,ljgl))); |
| 1396 | 1417 | // map.put("realMileage", format.format(yygl + ksgl + jcclc+addMileage)); |
| 1397 | 1418 | map.put("jhbc", culateService.culateJhbc(list,"")); |
| 1398 | - map.put("cjbc", culateService.culateLbbc(lists)); | |
| 1419 | + map.put("cjbc", culateService.culateLbbc(list)); | |
| 1399 | 1420 | map.put("ljbc", culateService.culateLjbc(lists,"")); |
| 1400 | 1421 | map.put("sjbc", culateService.culateJhbc(lists,"") - culateService.culateLbbc(lists) + culateService.culateLjbc(lists,"")); |
| 1401 | 1422 | map.put("jcclc", jccgl); |
| ... | ... | @@ -3712,7 +3733,15 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 3712 | 3733 | tempMap.put("zdsjk" + size, ""); |
| 3713 | 3734 | tempMap.put("zdsjm" + size, ""); |
| 3714 | 3735 | tempMap.put("fcsj" + size, schedule.getFcsj()); |
| 3715 | - tempMap.put("fcsjActual" + size, schedule.getFcsjActual() != null ? schedule.getFcsjActual() : ""); | |
| 3736 | + String fcsjActural=schedule.getFcsjActual() != null ? schedule.getFcsjActual() : ""; | |
| 3737 | + String bcType=schedule.getBcType()!=null?schedule.getBcType():""; | |
| 3738 | + if(bcType.equals("in")){ | |
| 3739 | + fcsjActural=fcsjActural+"(进)"; | |
| 3740 | + } | |
| 3741 | + if(bcType.equals("out")){ | |
| 3742 | + fcsjActural=fcsjActural+"(出)"; | |
| 3743 | + } | |
| 3744 | + tempMap.put("fcsjActual" + size, fcsjActural); | |
| 3716 | 3745 | tempMap.put("fcsjk" + size, ""); |
| 3717 | 3746 | tempMap.put("fcsjm" + size, ""); |
| 3718 | 3747 | tempMap.put("remarks" + size, schedule.getRemarks() != null ? schedule.getRemarks() : ""); | ... | ... |
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| 1 | 1 | package com.bsth.service.report.impl; |
| 2 | 2 | |
| 3 | 3 | import java.util.ArrayList; |
| 4 | +import java.util.Collections; | |
| 4 | 5 | import java.util.HashMap; |
| 5 | 6 | import java.util.Iterator; |
| 6 | 7 | import java.util.List; |
| ... | ... | @@ -14,6 +15,7 @@ import com.bsth.entity.realcontrol.ChildTaskPlan; |
| 14 | 15 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 15 | 16 | import com.bsth.service.report.CulateMileageService; |
| 16 | 17 | import com.bsth.util.Arith; |
| 18 | +import com.bsth.util.ComparableJob; | |
| 17 | 19 | |
| 18 | 20 | @Service |
| 19 | 21 | public class CulateMileageServiceImpl implements CulateMileageService{ |
| ... | ... | @@ -25,6 +27,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ |
| 25 | 27 | @Override |
| 26 | 28 | public List<Map<String, Object>> jobFwqk(List<ScheduleRealInfo> lists) { |
| 27 | 29 | // TODO Auto-generated method stub |
| 30 | + String[] lblxs = {"配车", "保养","故障","肇事","路阻","纠纷","缺人","客稀","缺车","气候","援外","吊慢","抽减","其他" }; | |
| 28 | 31 | List<Map<String, Object>> list=new ArrayList<Map<String,Object>>(); |
| 29 | 32 | for (int i = 0; i < lists.size(); i++) { |
| 30 | 33 | ScheduleRealInfo scheduleRealInfo = lists.get(i); |
| ... | ... | @@ -47,7 +50,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ |
| 47 | 50 | newMap.put("dz", scheduleRealInfo.getQdzName()); |
| 48 | 51 | newMap.put("sj", scheduleRealInfo.getFcsj()); |
| 49 | 52 | newMap.put("lbbc", 1); |
| 50 | - newMap.put("lblc", scheduleRealInfo.getJhlcOrig()); | |
| 53 | + newMap.put("lblc", scheduleRealInfo.getJhlcOrig()==null?0:scheduleRealInfo.getJhlcOrig()); | |
| 51 | 54 | newMap.put("jyqp", scheduleRealInfo.getRealMileage()); |
| 52 | 55 | list.add(newMap); |
| 53 | 56 | } |
| ... | ... | @@ -71,7 +74,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ |
| 71 | 74 | newMap.put("dz", childTaskPlan.getStartStationName()); |
| 72 | 75 | newMap.put("sj", childTaskPlan.getStartDate()); |
| 73 | 76 | newMap.put("lbbc", 0); |
| 74 | - newMap.put("lblc", childTaskPlan.getMileage()); | |
| 77 | + newMap.put("lblc", childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage()); | |
| 75 | 78 | newMap.put("jyqp", scheduleRealInfo.getRealMileage()); |
| 76 | 79 | list.add(newMap); |
| 77 | 80 | |
| ... | ... | @@ -80,7 +83,33 @@ public class CulateMileageServiceImpl implements CulateMileageService{ |
| 80 | 83 | } |
| 81 | 84 | } |
| 82 | 85 | } |
| 83 | - return list; | |
| 86 | + List<Map<String, Object>> listNew=new ArrayList<Map<String,Object>>(); | |
| 87 | + for (int i = 0; i < lblxs.length; i++) { | |
| 88 | + String lx=lblxs[i]; | |
| 89 | + double lblc=0.0; | |
| 90 | + int lbbc=0; | |
| 91 | + for (int j = 0; j < list.size(); j++) { | |
| 92 | + Map<String, Object> m1=list.get(j); | |
| 93 | + m1.put("lx", 0); | |
| 94 | + listNew.add(m1); | |
| 95 | + if(lx.equals(m1.get("nr").toString())){ | |
| 96 | + lblc =Arith.add(lblc,Double.parseDouble(m1.get("lblc").toString())); | |
| 97 | + lbbc += Integer.parseInt(m1.get("lbbc").toString()); | |
| 98 | + } | |
| 99 | + } | |
| 100 | + Map<String, Object> newMap = new HashMap<String, Object>(); | |
| 101 | + newMap.put("lx", 1); | |
| 102 | + newMap.put("nr", lx); | |
| 103 | + newMap.put("lp", "小计"); | |
| 104 | + newMap.put("nbbm", "少驶公里"); | |
| 105 | + newMap.put("dz", lbbc); | |
| 106 | + newMap.put("sj", "少驶公里"); | |
| 107 | + newMap.put("lblc", lblc); | |
| 108 | + listNew.add(newMap); | |
| 109 | + | |
| 110 | + } | |
| 111 | + Collections.sort(listNew, new ComparableJob()); | |
| 112 | + return listNew; | |
| 84 | 113 | } |
| 85 | 114 | |
| 86 | 115 | @Override |
| ... | ... | @@ -364,7 +393,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ |
| 364 | 393 | time=scheduleRealInfo.getFcsj(); |
| 365 | 394 | } |
| 366 | 395 | if(!time.equals("")){ |
| 367 | - String[] fcsjStr = scheduleRealInfo.getFcsj().split(":"); | |
| 396 | + String[] fcsjStr = time.split(":"); | |
| 368 | 397 | long fcsj= Long.parseLong(fcsjStr[0])*60+Long.parseLong(fcsjStr[1]); |
| 369 | 398 | if(childTaskPlans.isEmpty()){ |
| 370 | 399 | if(scheduleRealInfo.getStatus()!=-1){ | ... | ... |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| ... | ... | @@ -8,6 +8,7 @@ import java.text.ParseException; |
| 8 | 8 | import java.text.SimpleDateFormat; |
| 9 | 9 | import java.util.ArrayList; |
| 10 | 10 | import java.util.Calendar; |
| 11 | +import java.util.Collections; | |
| 11 | 12 | import java.util.Date; |
| 12 | 13 | import java.util.HashMap; |
| 13 | 14 | import java.util.Iterator; |
| ... | ... | @@ -38,6 +39,7 @@ import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 38 | 39 | import com.bsth.service.report.CulateMileageService; |
| 39 | 40 | import com.bsth.service.report.ReportService; |
| 40 | 41 | import com.bsth.util.Arith; |
| 42 | +import com.bsth.util.ComparableJob; | |
| 41 | 43 | import com.bsth.util.db.DBUtils_MS; |
| 42 | 44 | |
| 43 | 45 | @Service |
| ... | ... | @@ -1150,6 +1152,7 @@ public class ReportServiceImpl implements ReportService{ |
| 1150 | 1152 | @Override |
| 1151 | 1153 | public List<Map<String, Object>> jobFwqk(Map<String, Object> map) { |
| 1152 | 1154 | // TODO Auto-generated method stub |
| 1155 | + String[] lblxs = {"配车", "保养","故障","肇事","路阻","纠纷","缺人","客稀","缺车","气候","援外","吊慢","抽减","其他" }; | |
| 1153 | 1156 | String line=map.get("line").toString(); |
| 1154 | 1157 | String date=map.get("date").toString(); |
| 1155 | 1158 | map.put("bcType", "normal"); |
| ... | ... | @@ -1179,7 +1182,7 @@ public class ReportServiceImpl implements ReportService{ |
| 1179 | 1182 | newMap.put("sj", scheduleRealInfo.getFcsj()); |
| 1180 | 1183 | newMap.put("lbbc", 1); |
| 1181 | 1184 | newMap.put("lblc", scheduleRealInfo.getJhlcOrig()); |
| 1182 | - newMap.put("jyqp", scheduleRealInfo.getRealMileage()); | |
| 1185 | + newMap.put("jyqp", scheduleRealInfo.getRemarks()); | |
| 1183 | 1186 | list.add(newMap); |
| 1184 | 1187 | } |
| 1185 | 1188 | |
| ... | ... | @@ -1205,7 +1208,7 @@ public class ReportServiceImpl implements ReportService{ |
| 1205 | 1208 | newMap.put("sj", childTaskPlan.getStartDate()); |
| 1206 | 1209 | newMap.put("lbbc", 0); |
| 1207 | 1210 | newMap.put("lblc", childTaskPlan.getMileage()); |
| 1208 | - newMap.put("jyqp", scheduleRealInfo.getRealMileage()); | |
| 1211 | + newMap.put("jyqp", childTaskPlan.getRemarks()); | |
| 1209 | 1212 | list.add(newMap); |
| 1210 | 1213 | |
| 1211 | 1214 | } |
| ... | ... | @@ -1213,7 +1216,36 @@ public class ReportServiceImpl implements ReportService{ |
| 1213 | 1216 | } |
| 1214 | 1217 | } |
| 1215 | 1218 | } |
| 1216 | - return list; | |
| 1219 | + List<Map<String, Object>> listNew=new ArrayList<Map<String,Object>>(); | |
| 1220 | + for (int i = 0; i < lblxs.length; i++) { | |
| 1221 | + String lx=lblxs[i]; | |
| 1222 | + double lblc=0.0; | |
| 1223 | + int lbbc=0; | |
| 1224 | + for (int j = 0; j < list.size(); j++) { | |
| 1225 | + Map<String, Object> m1=list.get(j); | |
| 1226 | + if(lx.equals(m1.get("nr").toString())){ | |
| 1227 | + m1.put("lx", 0); | |
| 1228 | + listNew.add(m1); | |
| 1229 | + lblc =Arith.add(lblc,Double.parseDouble(m1.get("lblc").toString())); | |
| 1230 | + lbbc += Integer.parseInt(m1.get("lbbc").toString()); | |
| 1231 | + } | |
| 1232 | + } | |
| 1233 | + if(lblc>0){ | |
| 1234 | + Map<String, Object> newMap = new HashMap<String, Object>(); | |
| 1235 | + newMap.put("lx", 1); | |
| 1236 | + newMap.put("nr", lx); | |
| 1237 | + newMap.put("lp", "小计"); | |
| 1238 | + newMap.put("nbbm", "少驶班次"); | |
| 1239 | + newMap.put("jgh", lbbc); | |
| 1240 | + newMap.put("sj", "少驶公里"); | |
| 1241 | + newMap.put("lblc", lblc); | |
| 1242 | + listNew.add(newMap); | |
| 1243 | + } | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + } | |
| 1247 | + Collections.sort(listNew, new ComparableJob()); | |
| 1248 | + return listNew; | |
| 1217 | 1249 | } |
| 1218 | 1250 | |
| 1219 | 1251 | //统计临加班次详细信息 | ... | ... |
src/main/java/com/bsth/service/schedule/impl/SchedulePlanServiceImpl.java
| ... | ... | @@ -65,7 +65,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im |
| 65 | 65 | * @param schedulePlan 排班计划对象 |
| 66 | 66 | * @param lpInfoResults_output 时刻表每日路牌的情况 |
| 67 | 67 | */ |
| 68 | - private ScheduleResults_output loopRuleOutput( | |
| 68 | + public ScheduleResults_output loopRuleOutput( | |
| 69 | 69 | SchedulePlan schedulePlan, |
| 70 | 70 | LpInfoResults_output lpInfoResults_output) { |
| 71 | 71 | // 1-1、构造drools规则输入数据,输出数据 |
| ... | ... | @@ -116,7 +116,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im |
| 116 | 116 | * @param schedulePlan 排班计划对象 |
| 117 | 117 | * @return TTInfoResults_output, LpInfoResults_output |
| 118 | 118 | */ |
| 119 | - private Object[] ttInfoOutput(SchedulePlan schedulePlan) { | |
| 119 | + public Object[] ttInfoOutput(SchedulePlan schedulePlan) { | |
| 120 | 120 | // 获取线路的所有未作废的时刻表 |
| 121 | 121 | List<TTInfo> ttInfos = ttInfoRepository.findInCanceledByXl(schedulePlan.getXl()); |
| 122 | 122 | |
| ... | ... | @@ -174,7 +174,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im |
| 174 | 174 | * @param ttInfoResults_output ttInfoOutput方法规则输出 |
| 175 | 175 | * @return PlanResult |
| 176 | 176 | */ |
| 177 | - private PlanResult planResultOutput( | |
| 177 | + public PlanResult planResultOutput( | |
| 178 | 178 | SchedulePlan schedulePlan, |
| 179 | 179 | ScheduleResults_output scheduleResults_output, |
| 180 | 180 | TTInfoResults_output ttInfoResults_output) { | ... | ... |
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
| ... | ... | @@ -360,7 +360,7 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im |
| 360 | 360 | } |
| 361 | 361 | editInfo.getHeader().addAll(Arrays.asList(headarrays)); |
| 362 | 362 | |
| 363 | - editInfo.setYy_desc(String.format("空驶班次=%d,营运班次=%d,空驶里程=%.2f,营运里程=%.2f", all_bc_ks, all_bc_yy, all_lc_ks, all_lc_yy)); | |
| 363 | + editInfo.setYy_desc(String.format("空驶班次=%d,营运班次=%d,空驶里程=%.2f,营运里程=%.2f,总里程=%.2f", all_bc_ks, all_bc_yy, all_lc_ks, all_lc_yy, all_lc_ks + all_lc_yy)); | |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | LOGGER.info("//---------------- 时刻表编辑用数据输出 success... ----------------//"); | ... | ... |
src/main/java/com/bsth/service/schedule/rules/MyDroolsConfiguration.java
| ... | ... | @@ -4,7 +4,6 @@ import org.kie.api.KieBase; |
| 4 | 4 | import org.kie.api.KieBaseConfiguration; |
| 5 | 5 | import org.kie.api.KieServices; |
| 6 | 6 | import org.kie.api.builder.*; |
| 7 | -import org.kie.api.builder.Message; | |
| 8 | 7 | import org.kie.api.builder.model.KieBaseModel; |
| 9 | 8 | import org.kie.api.builder.model.KieModuleModel; |
| 10 | 9 | import org.kie.api.builder.model.KieSessionModel; |
| ... | ... | @@ -12,6 +11,8 @@ import org.kie.api.conf.EqualityBehaviorOption; |
| 12 | 11 | import org.kie.api.conf.EventProcessingOption; |
| 13 | 12 | import org.kie.api.runtime.KieContainer; |
| 14 | 13 | import org.kie.api.runtime.conf.ClockTypeOption; |
| 14 | +import org.slf4j.Logger; | |
| 15 | +import org.slf4j.LoggerFactory; | |
| 15 | 16 | import org.springframework.context.annotation.Bean; |
| 16 | 17 | import org.springframework.context.annotation.Configuration; |
| 17 | 18 | |
| ... | ... | @@ -20,6 +21,9 @@ import org.springframework.context.annotation.Configuration; |
| 20 | 21 | */ |
| 21 | 22 | @Configuration |
| 22 | 23 | public class MyDroolsConfiguration { |
| 24 | + /** 日志记录器 */ | |
| 25 | + private static final Logger logger = LoggerFactory.getLogger(MyDroolsConfiguration.class); | |
| 26 | + | |
| 23 | 27 | /** |
| 24 | 28 | * 返回一个kiebase知识库,直接冲文件系统读入drl规则文件, |
| 25 | 29 | * TODO:以后需要从数据库读入规则文件,并重新创建kbase知识库。 |
| ... | ... | @@ -72,8 +76,12 @@ public class MyDroolsConfiguration { |
| 72 | 76 | // 4、创建KieBuilder,使用KieFileSystem构建 |
| 73 | 77 | KieBuilder kieBuilder = kieServices.newKieBuilder(kfs).buildAll(); |
| 74 | 78 | Results results = kieBuilder.getResults(); |
| 75 | - if (results.hasMessages(Message.Level.ERROR)) | |
| 76 | - throw new IllegalStateException("构建drools6错误:" + results.getMessages()); | |
| 79 | +// if (results.hasMessages(Message.Level.ERROR)) | |
| 80 | +// throw new IllegalStateException("构建drools6错误:" + results.getMessages()); | |
| 81 | + if (results.hasMessages(Message.Level.ERROR)) { | |
| 82 | + logger.info("构建drools6错误:" + results.getMessages()); | |
| 83 | + return null; | |
| 84 | + } | |
| 77 | 85 | |
| 78 | 86 | // 5、获取KieContainer |
| 79 | 87 | // TODO:ReleaseId用处很大,以后再议 | ... | ... |
src/main/java/com/bsth/service/schedule/utils/DataImportExportService.java deleted
100644 → 0
| 1 | -package com.bsth.service.schedule.utils; | |
| 2 | - | |
| 3 | -import org.springframework.web.multipart.MultipartFile; | |
| 4 | - | |
| 5 | -import java.io.File; | |
| 6 | -import java.util.Map; | |
| 7 | - | |
| 8 | -/** | |
| 9 | - * 数据导入导出服务。 | |
| 10 | - */ | |
| 11 | -public interface DataImportExportService { | |
| 12 | - /** | |
| 13 | - * 上传文件。 | |
| 14 | - * @param file mutipartFile | |
| 15 | - * @return 上传后的文件路径 | |
| 16 | - * @throws Exception | |
| 17 | - */ | |
| 18 | - File uploadFile(MultipartFile file) throws Exception; | |
| 19 | - | |
| 20 | - /** | |
| 21 | - * 上传文件,并导入文件数据。 | |
| 22 | - * @param datafile 上传的文件 | |
| 23 | - * @param ktrFile 导入的逻辑ktr文件 | |
| 24 | - * @throws Exception | |
| 25 | - */ | |
| 26 | - void fileDataImport(MultipartFile datafile, File ktrFile) throws Exception; | |
| 27 | - void fileDataImport(File datafile, File ktrFile) throws Exception; | |
| 28 | - | |
| 29 | - /** | |
| 30 | - * 数据导出。 | |
| 31 | - * @param fileName 文件名 | |
| 32 | - * @param ktrFile 导出的逻辑ktr文件 | |
| 33 | - * @return 导出的文件 | |
| 34 | - * @throws Exception | |
| 35 | - */ | |
| 36 | - File fileDataOutput(String fileName, File ktrFile) throws Exception; | |
| 37 | - | |
| 38 | - | |
| 39 | - File fileDataOutput(String fileName, File ktrFile, Map<String, Object> param) throws Exception; | |
| 40 | -} |
src/main/java/com/bsth/service/schedule/utils/DataImportExportServiceImpl.java deleted
100644 → 0
| 1 | -package com.bsth.service.schedule.utils; | |
| 2 | - | |
| 3 | -import com.google.common.io.Files; | |
| 4 | -import org.joda.time.DateTime; | |
| 5 | -import org.pentaho.di.core.KettleEnvironment; | |
| 6 | -import org.pentaho.di.core.util.EnvUtil; | |
| 7 | -import org.pentaho.di.trans.Trans; | |
| 8 | -import org.pentaho.di.trans.TransMeta; | |
| 9 | -import org.springframework.beans.factory.InitializingBean; | |
| 10 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 11 | -import org.springframework.boot.context.properties.EnableConfigurationProperties; | |
| 12 | -import org.springframework.stereotype.Service; | |
| 13 | -import org.springframework.util.CollectionUtils; | |
| 14 | -import org.springframework.web.multipart.MultipartFile; | |
| 15 | - | |
| 16 | -import java.io.File; | |
| 17 | -import java.util.HashMap; | |
| 18 | -import java.util.Map; | |
| 19 | -import java.util.Properties; | |
| 20 | - | |
| 21 | -/** | |
| 22 | - * Created by xu on 16/6/23. | |
| 23 | - */ | |
| 24 | -@Service | |
| 25 | -@EnableConfigurationProperties(DataToolsProperties.class) | |
| 26 | -public class DataImportExportServiceImpl implements DataImportExportService, InitializingBean { | |
| 27 | - | |
| 28 | - @Autowired | |
| 29 | - private DataToolsProperties dataToolsProperties; | |
| 30 | - | |
| 31 | - /** | |
| 32 | - * 自定义kettle环境初始化定义。 | |
| 33 | - */ | |
| 34 | - private void ktrEnvironmentInit() throws Exception { | |
| 35 | - // 由于kettle.properties可能没有(没有安装过kettle), | |
| 36 | - // 导致 EnvUtil.environmentInit() 报找不到kettle.properties文件 | |
| 37 | - // 所以这里重写 EnvUtil.environmentInit() 方法 | |
| 38 | - | |
| 39 | - if(Thread.currentThread().getContextClassLoader() == null) { | |
| 40 | - Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader()); | |
| 41 | - } | |
| 42 | - | |
| 43 | - // 获取配置文件 | |
| 44 | - File file = new File(getClass().getResource(dataToolsProperties.getKettleProperties()).toURI()); | |
| 45 | - Properties kettleProperties = EnvUtil.readProperties(file.getAbsolutePath()); | |
| 46 | - EnvUtil.applyKettleProperties(kettleProperties); | |
| 47 | - System.getProperties().put("Internal.Cluster.Size", "1"); | |
| 48 | - System.getProperties().put("Internal.Slave.Transformation.Number", "0"); | |
| 49 | - System.getProperties().put("Internal.Slave.Server.Name", "slave-trans-name"); | |
| 50 | - System.getProperties().put("Internal.Step.CopyNr", "0"); | |
| 51 | - System.getProperties().put("Internal.Step.Name", "step-name"); | |
| 52 | - System.getProperties().put("Internal.Step.Partition.ID", "partition-id"); | |
| 53 | - System.getProperties().put("Internal.Step.Partition.Number", "0"); | |
| 54 | - System.getProperties().put("Internal.Step.Unique.Count", "1"); | |
| 55 | - System.getProperties().put("Internal.Step.Unique.Number", "0"); | |
| 56 | - if(!kettleProperties.containsKey("vfs.sftp.org.apache.commons.vfs2.provider.sftp.SftpFileSystemConfigBuilder.USER_DIR_IS_ROOT")) { | |
| 57 | - System.getProperties().put("vfs.sftp.org.apache.commons.vfs2.provider.sftp.SftpFileSystemConfigBuilder.USER_DIR_IS_ROOT", "false"); | |
| 58 | - } | |
| 59 | - | |
| 60 | - } | |
| 61 | - | |
| 62 | - @Override | |
| 63 | - public void afterPropertiesSet() throws Exception { | |
| 64 | - // 初始化kettle环境(自定义) | |
| 65 | - ktrEnvironmentInit(); | |
| 66 | - | |
| 67 | - // 添加全局ktr变量,并覆盖原来的设置 | |
| 68 | - Map<String, String> kvars = new HashMap<>(); | |
| 69 | - kvars.put("v_db_ip", dataToolsProperties.getKvarsDbip()); | |
| 70 | - kvars.put("v_db_uname", dataToolsProperties.getKvarsDbuname()); | |
| 71 | - kvars.put("v_db_pwd", dataToolsProperties.getKvarsDbpwd()); | |
| 72 | - kvars.put("v_db_dname", dataToolsProperties.getKvarsDbdname()); | |
| 73 | - EnvUtil.applyKettleProperties(kvars, true); | |
| 74 | - KettleEnvironment.init(); | |
| 75 | - } | |
| 76 | - | |
| 77 | - @Override | |
| 78 | - public File uploadFile(MultipartFile file) throws Exception { | |
| 79 | - // TODO:以后的文件名要加时间戳 | |
| 80 | - File newFile = new File( | |
| 81 | - dataToolsProperties.getFileuploadDir() + File.separator + | |
| 82 | - file.getOriginalFilename()); | |
| 83 | - Files.write(file.getBytes(), newFile); | |
| 84 | - | |
| 85 | - return newFile; | |
| 86 | - } | |
| 87 | - | |
| 88 | - @Override | |
| 89 | - public void fileDataImport(MultipartFile datafile, File ktrFile) throws Exception { | |
| 90 | - // 1、上传数据文件 | |
| 91 | - File uploadFile = uploadFile(datafile); | |
| 92 | - | |
| 93 | - // 2、使用kettle运行封装数据导入逻辑的ktr转换文件 | |
| 94 | - // 2.1、初始化kettle(组件初始化已经做了) | |
| 95 | - // 2.2、创建转换元数据,转换 | |
| 96 | - TransMeta transMeta = new TransMeta(ktrFile.getAbsolutePath()); | |
| 97 | - Trans trans = new Trans(transMeta); | |
| 98 | - // 2.3、设定命名参数,用于指定数据文件,注意每个ktr必须都有以下指定的命名参数 | |
| 99 | - trans.setParameterValue("filepath", uploadFile.getAbsolutePath()); // 指定导入数据文件的位置 | |
| 100 | - trans.setParameterValue("erroroutputdir", dataToolsProperties.getTransErrordir()); // ktr转换错误输出目录 | |
| 101 | - // TODO:可以考虑设定日志输出 | |
| 102 | - // 2.4、执行转换 | |
| 103 | - trans.execute(null); | |
| 104 | - // 2.5、等待转换结束 | |
| 105 | - trans.waitUntilFinished(); | |
| 106 | - | |
| 107 | - // 3、判定ktr错误数,注意这种错误代表部分数据错误,不会终止转换执行,一般设计ktr的时候,会有错误输出文件,TODO:以后考虑使用日志实时输出 | |
| 108 | - if (trans.getErrors() > 0) { | |
| 109 | - throw new Exception("转换数据部分错误,请查看相关错误输出文件!"); | |
| 110 | - } | |
| 111 | - } | |
| 112 | - | |
| 113 | - @Override | |
| 114 | - public void fileDataImport(File datafile, File ktrFile) throws Exception { | |
| 115 | -// // 1、上传数据文件 | |
| 116 | -// File uploadFile = datafile; | |
| 117 | - | |
| 118 | - // 2、使用kettle运行封装数据导入逻辑的ktr转换文件 | |
| 119 | - // 2.1、初始化kettle(组件初始化已经做了) | |
| 120 | - // 2.2、创建转换元数据,转换 | |
| 121 | - TransMeta transMeta = new TransMeta(ktrFile.getAbsolutePath()); | |
| 122 | - Trans trans = new Trans(transMeta); | |
| 123 | - // 2.3、设定命名参数,用于指定数据文件,注意每个ktr必须都有以下指定的命名参数 | |
| 124 | - trans.setParameterValue("filepath", datafile.getAbsolutePath()); // 指定导入数据文件的位置 | |
| 125 | - trans.setParameterValue("erroroutputdir", dataToolsProperties.getTransErrordir()); // ktr转换错误输出目录 | |
| 126 | - // TODO:可以考虑设定日志输出 | |
| 127 | - // 2.4、执行转换 | |
| 128 | - trans.execute(null); | |
| 129 | - // 2.5、等待转换结束 | |
| 130 | - trans.waitUntilFinished(); | |
| 131 | - | |
| 132 | - // 3、判定ktr错误数,注意这种错误代表部分数据错误,不会终止转换执行,一般设计ktr的时候,会有错误输出文件,TODO:以后考虑使用日志实时输出 | |
| 133 | - if (trans.getErrors() > 0) { | |
| 134 | - throw new Exception("转换数据部分错误,请查看相关错误输出文件!"); | |
| 135 | - } | |
| 136 | - } | |
| 137 | - | |
| 138 | - @Override | |
| 139 | - public File fileDataOutput(String fileName, File ktrFile) throws Exception { | |
| 140 | - return fileDataOutput(fileName, ktrFile, null); | |
| 141 | - } | |
| 142 | - | |
| 143 | - @Override | |
| 144 | - public File fileDataOutput(String fileName, File ktrFile, Map<String, Object> param) throws Exception { | |
| 145 | - // 初始化转换,元数据,转换对象 | |
| 146 | - TransMeta transMeta = new TransMeta(ktrFile.getAbsolutePath()); | |
| 147 | - Trans trans = new Trans(transMeta); | |
| 148 | - // 设定命名参数 | |
| 149 | - String filepath = dataToolsProperties.getFileoutputDir() + | |
| 150 | - File.separator + | |
| 151 | - fileName + | |
| 152 | - new DateTime().toString("yyyyMMddHHmmss") + ".xls"; | |
| 153 | - trans.setParameterValue("filepath", filepath); | |
| 154 | - | |
| 155 | - // 添加其他参数 | |
| 156 | - if (!CollectionUtils.isEmpty(param)) { | |
| 157 | - for (String key : param.keySet()) { | |
| 158 | - trans.setParameterValue(key, String.valueOf(param.get(key))); | |
| 159 | - } | |
| 160 | - } | |
| 161 | - | |
| 162 | - // 执行转换 | |
| 163 | - trans.execute(null); | |
| 164 | - // 等待转换结束 | |
| 165 | - trans.waitUntilFinished(); | |
| 166 | - | |
| 167 | - if (trans.getErrors() > 0) { | |
| 168 | - throw new Exception("转换数据部分错误,请查看相关错误输出文件!"); | |
| 169 | - } | |
| 170 | - | |
| 171 | - return new File(filepath); | |
| 172 | - } | |
| 173 | - | |
| 174 | - | |
| 175 | - // TODO:以后改成下面的样子 | |
| 176 | -// import java.io.FileInputStream; | |
| 177 | -// import java.io.FileOutputStream; | |
| 178 | -// import java.io.IOException; | |
| 179 | -// import java.io.InputStream; | |
| 180 | -// import java.util.Iterator; | |
| 181 | -// | |
| 182 | -// import org.apache.poi.hssf.usermodel.HSSFCell; | |
| 183 | -// import org.apache.poi.hssf.usermodel.HSSFRow; | |
| 184 | -// import org.apache.poi.hssf.usermodel.HSSFSheet; | |
| 185 | -// import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
| 186 | -// | |
| 187 | -// import org.apache.poi.xssf.usermodel.XSSFCell; | |
| 188 | -// import org.apache.poi.xssf.usermodel.XSSFRow; | |
| 189 | -// import org.apache.poi.xssf.usermodel.XSSFSheet; | |
| 190 | -// import org.apache.poi.xssf.usermodel.XSSFWorkbook; | |
| 191 | -// | |
| 192 | -// public class ReadWriteExcelFile { | |
| 193 | -// | |
| 194 | -// public static void readXLSFile() throws IOException | |
| 195 | -// { | |
| 196 | -// InputStream ExcelFileToRead = new FileInputStream("C:/Test.xls"); | |
| 197 | -// HSSFWorkbook wb = new HSSFWorkbook(ExcelFileToRead); | |
| 198 | -// | |
| 199 | -// HSSFSheet sheet=wb.getSheetAt(0); | |
| 200 | -// HSSFRow row; | |
| 201 | -// HSSFCell cell; | |
| 202 | -// | |
| 203 | -// Iterator rows = sheet.rowIterator(); | |
| 204 | -// | |
| 205 | -// while (rows.hasNext()) | |
| 206 | -// { | |
| 207 | -// row=(HSSFRow) rows.next(); | |
| 208 | -// Iterator cells = row.cellIterator(); | |
| 209 | -// | |
| 210 | -// while (cells.hasNext()) | |
| 211 | -// { | |
| 212 | -// cell=(HSSFCell) cells.next(); | |
| 213 | -// | |
| 214 | -// if (cell.getCellType() == HSSFCell.CELL_TYPE_STRING) | |
| 215 | -// { | |
| 216 | -// System.out.print(cell.getStringCellValue()+" "); | |
| 217 | -// } | |
| 218 | -// else if(cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) | |
| 219 | -// { | |
| 220 | -// System.out.print(cell.getNumericCellValue()+" "); | |
| 221 | -// } | |
| 222 | -// else | |
| 223 | -// { | |
| 224 | -// //U Can Handel Boolean, Formula, Errors | |
| 225 | -// } | |
| 226 | -// } | |
| 227 | -// System.out.println(); | |
| 228 | -// } | |
| 229 | -// | |
| 230 | -// } | |
| 231 | -// | |
| 232 | -// public static void writeXLSFile() throws IOException { | |
| 233 | -// | |
| 234 | -// String excelFileName = "C:/Test.xls";//name of excel file | |
| 235 | -// | |
| 236 | -// String sheetName = "Sheet1";//name of sheet | |
| 237 | -// | |
| 238 | -// HSSFWorkbook wb = new HSSFWorkbook(); | |
| 239 | -// HSSFSheet sheet = wb.createSheet(sheetName) ; | |
| 240 | -// | |
| 241 | -// //iterating r number of rows | |
| 242 | -// for (int r=0;r < 5; r++ ) | |
| 243 | -// { | |
| 244 | -// HSSFRow row = sheet.createRow(r); | |
| 245 | -// | |
| 246 | -// //iterating c number of columns | |
| 247 | -// for (int c=0;c < 5; c++ ) | |
| 248 | -// { | |
| 249 | -// HSSFCell cell = row.createCell(c); | |
| 250 | -// | |
| 251 | -// cell.setCellValue("Cell "+r+" "+c); | |
| 252 | -// } | |
| 253 | -// } | |
| 254 | -// | |
| 255 | -// FileOutputStream fileOut = new FileOutputStream(excelFileName); | |
| 256 | -// | |
| 257 | -// //write this workbook to an Outputstream. | |
| 258 | -// wb.write(fileOut); | |
| 259 | -// fileOut.flush(); | |
| 260 | -// fileOut.close(); | |
| 261 | -// } | |
| 262 | -// | |
| 263 | -// public static void readXLSXFile() throws IOException | |
| 264 | -// { | |
| 265 | -// InputStream ExcelFileToRead = new FileInputStream("C:/Test.xlsx"); | |
| 266 | -// XSSFWorkbook wb = new XSSFWorkbook(ExcelFileToRead); | |
| 267 | -// | |
| 268 | -// XSSFWorkbook test = new XSSFWorkbook(); | |
| 269 | -// | |
| 270 | -// XSSFSheet sheet = wb.getSheetAt(0); | |
| 271 | -// XSSFRow row; | |
| 272 | -// XSSFCell cell; | |
| 273 | -// | |
| 274 | -// Iterator rows = sheet.rowIterator(); | |
| 275 | -// | |
| 276 | -// while (rows.hasNext()) | |
| 277 | -// { | |
| 278 | -// row=(XSSFRow) rows.next(); | |
| 279 | -// Iterator cells = row.cellIterator(); | |
| 280 | -// while (cells.hasNext()) | |
| 281 | -// { | |
| 282 | -// cell=(XSSFCell) cells.next(); | |
| 283 | -// | |
| 284 | -// if (cell.getCellType() == XSSFCell.CELL_TYPE_STRING) | |
| 285 | -// { | |
| 286 | -// System.out.print(cell.getStringCellValue()+" "); | |
| 287 | -// } | |
| 288 | -// else if(cell.getCellType() == XSSFCell.CELL_TYPE_NUMERIC) | |
| 289 | -// { | |
| 290 | -// System.out.print(cell.getNumericCellValue()+" "); | |
| 291 | -// } | |
| 292 | -// else | |
| 293 | -// { | |
| 294 | -// //U Can Handel Boolean, Formula, Errors | |
| 295 | -// } | |
| 296 | -// } | |
| 297 | -// System.out.println(); | |
| 298 | -// } | |
| 299 | -// | |
| 300 | -// } | |
| 301 | -// | |
| 302 | -// public static void writeXLSXFile() throws IOException { | |
| 303 | -// | |
| 304 | -// String excelFileName = "C:/Test.xlsx";//name of excel file | |
| 305 | -// | |
| 306 | -// String sheetName = "Sheet1";//name of sheet | |
| 307 | -// | |
| 308 | -// XSSFWorkbook wb = new XSSFWorkbook(); | |
| 309 | -// XSSFSheet sheet = wb.createSheet(sheetName) ; | |
| 310 | -// | |
| 311 | -// //iterating r number of rows | |
| 312 | -// for (int r=0;r < 5; r++ ) | |
| 313 | -// { | |
| 314 | -// XSSFRow row = sheet.createRow(r); | |
| 315 | -// | |
| 316 | -// //iterating c number of columns | |
| 317 | -// for (int c=0;c < 5; c++ ) | |
| 318 | -// { | |
| 319 | -// XSSFCell cell = row.createCell(c); | |
| 320 | -// | |
| 321 | -// cell.setCellValue("Cell "+r+" "+c); | |
| 322 | -// } | |
| 323 | -// } | |
| 324 | -// | |
| 325 | -// FileOutputStream fileOut = new FileOutputStream(excelFileName); | |
| 326 | -// | |
| 327 | -// //write this workbook to an Outputstream. | |
| 328 | -// wb.write(fileOut); | |
| 329 | -// fileOut.flush(); | |
| 330 | -// fileOut.close(); | |
| 331 | -// } | |
| 332 | -// | |
| 333 | -// public static void main(String[] args) throws IOException { | |
| 334 | -// | |
| 335 | -// writeXLSFile(); | |
| 336 | -// readXLSFile(); | |
| 337 | -// | |
| 338 | -// writeXLSXFile(); | |
| 339 | -// readXLSXFile(); | |
| 340 | -// | |
| 341 | -// } | |
| 342 | -// | |
| 343 | -// } | |
| 344 | -} |
src/main/java/com/bsth/service/schedule/utils/DataToolsServiceImpl.java
| ... | ... | @@ -13,10 +13,9 @@ import org.pentaho.di.trans.Trans; |
| 13 | 13 | import org.pentaho.di.trans.TransMeta; |
| 14 | 14 | import org.slf4j.Logger; |
| 15 | 15 | import org.slf4j.LoggerFactory; |
| 16 | -import org.springframework.beans.factory.InitializingBean; | |
| 17 | 16 | import org.springframework.beans.factory.annotation.Autowired; |
| 18 | 17 | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| 19 | -import org.springframework.stereotype.Service; | |
| 18 | +import org.springframework.stereotype.Component; | |
| 20 | 19 | |
| 21 | 20 | import java.io.File; |
| 22 | 21 | import java.io.PrintWriter; |
| ... | ... | @@ -24,19 +23,41 @@ import java.io.StringWriter; |
| 24 | 23 | import java.util.HashMap; |
| 25 | 24 | import java.util.Map; |
| 26 | 25 | import java.util.Properties; |
| 26 | +import java.util.concurrent.atomic.AtomicBoolean; | |
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * Created by xu on 17/1/3. |
| 30 | 30 | */ |
| 31 | -@Service | |
| 31 | +@Component | |
| 32 | 32 | @EnableConfigurationProperties(DataToolsProperties.class) |
| 33 | -public class DataToolsServiceImpl implements DataToolsService, InitializingBean { | |
| 33 | +public class DataToolsServiceImpl implements DataToolsService { | |
| 34 | 34 | /** 日志记录器 */ |
| 35 | 35 | private static final Logger LOGGER = LoggerFactory.getLogger(DataToolsServiceImpl.class); |
| 36 | 36 | |
| 37 | 37 | @Autowired |
| 38 | 38 | private DataToolsProperties dataToolsProperties; |
| 39 | 39 | |
| 40 | + /** 原子操作类 */ | |
| 41 | + private AtomicBoolean flag = new AtomicBoolean(false); | |
| 42 | + | |
| 43 | + private void initKettle() throws Exception { | |
| 44 | + if (flag.compareAndSet(false, true)) { | |
| 45 | + LOGGER.info("kettle初始化......"); | |
| 46 | + | |
| 47 | + // 初始化kettle环境(自定义) | |
| 48 | + ktrEnvironmentInit(); | |
| 49 | + | |
| 50 | + // 添加全局ktr变量,并覆盖原来的设置 | |
| 51 | + Map<String, String> kvars = new HashMap<>(); | |
| 52 | + kvars.put("v_db_ip", dataToolsProperties.getKvarsDbip()); | |
| 53 | + kvars.put("v_db_uname", dataToolsProperties.getKvarsDbuname()); | |
| 54 | + kvars.put("v_db_pwd", dataToolsProperties.getKvarsDbpwd()); | |
| 55 | + kvars.put("v_db_dname", dataToolsProperties.getKvarsDbdname()); | |
| 56 | + EnvUtil.applyKettleProperties(kvars, true); | |
| 57 | + KettleEnvironment.init(); | |
| 58 | + } | |
| 59 | + } | |
| 60 | + | |
| 40 | 61 | /** |
| 41 | 62 | * 自定义kettle环境初始化定义。 |
| 42 | 63 | */ |
| ... | ... | @@ -70,24 +91,11 @@ public class DataToolsServiceImpl implements DataToolsService, InitializingBean |
| 70 | 91 | } |
| 71 | 92 | |
| 72 | 93 | @Override |
| 73 | - public void afterPropertiesSet() throws Exception { | |
| 74 | - // 初始化kettle环境(自定义) | |
| 75 | - ktrEnvironmentInit(); | |
| 76 | - | |
| 77 | - // 添加全局ktr变量,并覆盖原来的设置 | |
| 78 | - Map<String, String> kvars = new HashMap<>(); | |
| 79 | - kvars.put("v_db_ip", dataToolsProperties.getKvarsDbip()); | |
| 80 | - kvars.put("v_db_uname", dataToolsProperties.getKvarsDbuname()); | |
| 81 | - kvars.put("v_db_pwd", dataToolsProperties.getKvarsDbpwd()); | |
| 82 | - kvars.put("v_db_dname", dataToolsProperties.getKvarsDbdname()); | |
| 83 | - EnvUtil.applyKettleProperties(kvars, true); | |
| 84 | - KettleEnvironment.init(); | |
| 85 | - } | |
| 86 | - | |
| 87 | - @Override | |
| 88 | 94 | public File uploadFile(String filename, byte[] filedata) throws ScheduleException { |
| 89 | 95 | // 上传文件 |
| 90 | 96 | try { |
| 97 | + initKettle(); | |
| 98 | + | |
| 91 | 99 | LOGGER.info("start uploadFile...originalFilename={}", filename); |
| 92 | 100 | File newFile = new File(dataToolsProperties.getFileuploadDir() + File.separator + |
| 93 | 101 | filename + "-upload-" + new DateTime().toString("yyyyMMddHHmmss") + ".xls"); |
| ... | ... | @@ -127,6 +135,8 @@ public class DataToolsServiceImpl implements DataToolsService, InitializingBean |
| 127 | 135 | String transLogId = ""; |
| 128 | 136 | String transMetaLogId = ""; |
| 129 | 137 | try { |
| 138 | + initKettle(); | |
| 139 | + | |
| 130 | 140 | LOGGER.info("start importData...originalFilename={}", file.getAbsolutePath()); |
| 131 | 141 | // 检查参数 |
| 132 | 142 | String transpath = String.valueOf(params.get("transpath")); |
| ... | ... | @@ -189,6 +199,8 @@ public class DataToolsServiceImpl implements DataToolsService, InitializingBean |
| 189 | 199 | String transLogId = ""; |
| 190 | 200 | String transMetaLogId = ""; |
| 191 | 201 | try { |
| 202 | + initKettle(); | |
| 203 | + | |
| 192 | 204 | LOGGER.info("start exportData..."); |
| 193 | 205 | // 检查参数 |
| 194 | 206 | String filename = String.valueOf(params.get("filename")); | ... | ... |
src/main/java/com/bsth/service/sys/SysUserService.java
| ... | ... | @@ -3,6 +3,8 @@ package com.bsth.service.sys; |
| 3 | 3 | import com.bsth.entity.sys.SysUser; |
| 4 | 4 | import com.bsth.service.BaseService; |
| 5 | 5 | |
| 6 | +import java.util.Map; | |
| 7 | + | |
| 6 | 8 | public interface SysUserService extends BaseService<SysUser, Integer>{ |
| 7 | 9 | |
| 8 | 10 | SysUser findByUserName(String name); |
| ... | ... | @@ -10,4 +12,6 @@ public interface SysUserService extends BaseService<SysUser, Integer>{ |
| 10 | 12 | int changeEnabled(int id,int enabled); |
| 11 | 13 | |
| 12 | 14 | int changePWD(int id,String newPWD); |
| 15 | + | |
| 16 | + Map<String,Object> register(SysUser u); | |
| 13 | 17 | } | ... | ... |
src/main/java/com/bsth/service/sys/impl/SysUserServiceImpl.java
| 1 | 1 | package com.bsth.service.sys.impl; |
| 2 | 2 | |
| 3 | -import java.util.Map; | |
| 4 | - | |
| 5 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 6 | -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; | |
| 7 | -import org.springframework.stereotype.Service; | |
| 8 | - | |
| 3 | +import com.bsth.common.ResponseCode; | |
| 9 | 4 | import com.bsth.entity.sys.SysUser; |
| 10 | 5 | import com.bsth.repository.sys.SysUserRepository; |
| 11 | -import com.bsth.security.util.SecurityUtils; | |
| 12 | 6 | import com.bsth.service.impl.BaseServiceImpl; |
| 13 | 7 | import com.bsth.service.sys.SysUserService; |
| 8 | +import org.slf4j.Logger; | |
| 9 | +import org.slf4j.LoggerFactory; | |
| 10 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 11 | +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; | |
| 12 | +import org.springframework.stereotype.Service; | |
| 13 | + | |
| 14 | +import java.util.HashMap; | |
| 15 | +import java.util.Map; | |
| 14 | 16 | |
| 15 | 17 | @Service |
| 16 | 18 | public class SysUserServiceImpl extends BaseServiceImpl<SysUser, Integer> implements SysUserService{ |
| 17 | 19 | |
| 18 | 20 | @Autowired |
| 19 | 21 | SysUserRepository sysUserRepository; |
| 22 | + | |
| 23 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 20 | 24 | |
| 21 | 25 | @Override |
| 22 | 26 | public SysUser findByUserName(String name) { |
| ... | ... | @@ -45,4 +49,25 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUser, Integer> implem |
| 45 | 49 | public int changePWD(int id,String newPWD) { |
| 46 | 50 | return sysUserRepository.changePWD(id,new BCryptPasswordEncoder(4).encode(newPWD)); |
| 47 | 51 | } |
| 52 | + | |
| 53 | + @Override | |
| 54 | + public Map<String, Object> register(SysUser u) { | |
| 55 | + Map<String, Object> rs = new HashMap(); | |
| 56 | + try{ | |
| 57 | + //检查用户名是否存在 | |
| 58 | + if(findByUserName(u.getUserName()) != null){ | |
| 59 | + rs.put("status", ResponseCode.ERROR); | |
| 60 | + rs.put("msg", "用户名" + u.getUserName() + "已存在!"); | |
| 61 | + } | |
| 62 | + else{ | |
| 63 | + u.setPassword(new BCryptPasswordEncoder(4).encode(u.getPassword())); | |
| 64 | + rs = super.save(u); | |
| 65 | + } | |
| 66 | + }catch (Exception e){ | |
| 67 | + logger.error("", e); | |
| 68 | + rs.put("status", ResponseCode.ERROR); | |
| 69 | + rs.put("msg", e.getMessage()); | |
| 70 | + } | |
| 71 | + return rs; | |
| 72 | + } | |
| 48 | 73 | } | ... | ... |
src/main/java/com/bsth/util/ComparableJob.java
0 → 100644
| 1 | +package com.bsth.util; | |
| 2 | + | |
| 3 | +import java.util.Comparator; | |
| 4 | +import java.util.Map; | |
| 5 | + | |
| 6 | + | |
| 7 | +public class ComparableJob implements Comparator<Map<String, Object>>{ | |
| 8 | + | |
| 9 | + @Override | |
| 10 | + public int compare(Map<String, Object> o1, Map<String, Object> o2) { | |
| 11 | + // TODO Auto-generated method stub | |
| 12 | + return o1.get("nr").toString().compareTo(o2.get("nr").toString()); | |
| 13 | + } | |
| 14 | + | |
| 15 | +} | ... | ... |
src/main/java/com/bsth/util/ComparableLp.java
0 → 100644
| 1 | +package com.bsth.util; | |
| 2 | + | |
| 3 | +import java.util.Comparator; | |
| 4 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 5 | + | |
| 6 | +public class ComparableLp implements Comparator<ScheduleRealInfo>{ | |
| 7 | + | |
| 8 | + @Override | |
| 9 | + public int compare(ScheduleRealInfo o1, ScheduleRealInfo o2) { | |
| 10 | + // TODO Auto-generated method stub | |
| 11 | + return o1.getLpName().compareTo(o2.getLpName()); | |
| 12 | + } | |
| 13 | + | |
| 14 | +} | ... | ... |
src/main/java/com/bsth/util/db/BaseDao_MS.java deleted
100644 → 0
| 1 | -package com.bsth.util.db; | |
| 2 | - | |
| 3 | - | |
| 4 | -import org.apache.commons.lang3.CharUtils; | |
| 5 | -import org.apache.commons.lang3.StringUtils; | |
| 6 | -import org.slf4j.Logger; | |
| 7 | -import org.slf4j.LoggerFactory; | |
| 8 | - | |
| 9 | - | |
| 10 | -/** | |
| 11 | - * | |
| 12 | - * @ClassName: BaseDao | |
| 13 | - * @author PanZhao | |
| 14 | - * @param <T> | |
| 15 | - * @date 2016年6月27日 上午10:33:12 | |
| 16 | - * | |
| 17 | - */ | |
| 18 | -public class BaseDao_MS { | |
| 19 | - | |
| 20 | - static Logger logger = LoggerFactory.getLogger(BaseDao_MS.class); | |
| 21 | - | |
| 22 | - /** | |
| 23 | - * | |
| 24 | - * @Title: propertyToField | |
| 25 | - * @Description: TODO(java转数据库字段名) | |
| 26 | - * @param @param property | |
| 27 | - * @throws | |
| 28 | - */ | |
| 29 | - public static String propertyToField(String property) { | |
| 30 | - if (null == property) { | |
| 31 | - return ""; | |
| 32 | - } | |
| 33 | - char[] chars = property.toCharArray(); | |
| 34 | - StringBuffer sb = new StringBuffer(); | |
| 35 | - for (char c : chars) { | |
| 36 | - if (CharUtils.isAsciiAlphaUpper(c)) { | |
| 37 | - sb.append("_" + StringUtils.lowerCase(CharUtils.toString(c))); | |
| 38 | - } else { | |
| 39 | - sb.append(c); | |
| 40 | - } | |
| 41 | - } | |
| 42 | - return sb.toString(); | |
| 43 | - } | |
| 44 | -} |
src/main/java/com/bsth/util/db/DBUtils_MS.java
| 1 | 1 | package com.bsth.util.db; |
| 2 | 2 | |
| 3 | +import com.mchange.v2.c3p0.DataSources; | |
| 4 | +import org.apache.log4j.Logger; | |
| 5 | + | |
| 6 | +import javax.sql.DataSource; | |
| 3 | 7 | import java.io.FileNotFoundException; |
| 4 | 8 | import java.io.IOException; |
| 5 | 9 | import java.sql.Connection; |
| ... | ... | @@ -10,15 +14,8 @@ import java.util.HashMap; |
| 10 | 14 | import java.util.Map; |
| 11 | 15 | import java.util.Properties; |
| 12 | 16 | |
| 13 | -import javax.sql.DataSource; | |
| 14 | - | |
| 15 | -import org.apache.log4j.Logger; | |
| 16 | -import org.springframework.stereotype.Component; | |
| 17 | - | |
| 18 | -import com.mchange.v2.c3p0.DataSources; | |
| 19 | - | |
| 20 | 17 | /** |
| 21 | - * 808GPS SQL Server数据库连接工具类 | |
| 18 | + * 网关ms库连接池 | |
| 22 | 19 | * @author PanZhao |
| 23 | 20 | * |
| 24 | 21 | */ | ... | ... |
src/main/java/com/bsth/util/db/DBUtils_oldSystem.java
0 → 100644
| 1 | +package com.bsth.util.db; | |
| 2 | + | |
| 3 | +import com.mchange.v2.c3p0.DataSources; | |
| 4 | +import org.apache.log4j.Logger; | |
| 5 | + | |
| 6 | +import javax.sql.DataSource; | |
| 7 | +import java.sql.Connection; | |
| 8 | +import java.sql.ResultSet; | |
| 9 | +import java.sql.SQLException; | |
| 10 | +import java.sql.Statement; | |
| 11 | +import java.util.HashMap; | |
| 12 | +import java.util.Map; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * 老系统数据库连接池(保持少量的连接,不会对老系统有什么影响) | |
| 16 | + * @author PanZhao | |
| 17 | + * | |
| 18 | + */ | |
| 19 | +//@Component | |
| 20 | +public class DBUtils_oldSystem { | |
| 21 | + | |
| 22 | + private static String url = null; | |
| 23 | + | |
| 24 | + private static String username = null; | |
| 25 | + | |
| 26 | + private static String pwd = null; | |
| 27 | + | |
| 28 | + private static DataSource ds_pooled; | |
| 29 | + | |
| 30 | + static Logger logger = Logger.getLogger(DBUtils_oldSystem.class); | |
| 31 | + | |
| 32 | + static { | |
| 33 | + | |
| 34 | + try { | |
| 35 | + // 1. 加载驱动类 | |
| 36 | + Class.forName("oracle.jdbc.driver.OracleDriver"); | |
| 37 | + | |
| 38 | + url = "jdbc:oracle:thin:@10.10.200.225:1521:orcl"; | |
| 39 | + username = "jjwgps"; | |
| 40 | + pwd = "jjwgps"; | |
| 41 | + | |
| 42 | + // 设置连接数据库的配置信息 | |
| 43 | + DataSource ds_unpooled = DataSources.unpooledDataSource(url, | |
| 44 | + username, pwd); | |
| 45 | + | |
| 46 | + Map<String, Object> pool_conf = new HashMap<String, Object>(); | |
| 47 | + // 设置最大连接数 | |
| 48 | + pool_conf.put("maxPoolSize", 5); | |
| 49 | + | |
| 50 | + pool_conf.put("testConnectionOnCheckout", false); | |
| 51 | + //异步检测连接的有效性 | |
| 52 | + pool_conf.put("testConnectionOnCheckin", true); | |
| 53 | + //10分钟检测一次 | |
| 54 | + pool_conf.put("idleConnectionTestPeriod", 60 * 10); | |
| 55 | + ds_pooled = DataSources.pooledDataSource(ds_unpooled, pool_conf); | |
| 56 | + } catch (ClassNotFoundException e) { | |
| 57 | + logger.error(e.toString()); | |
| 58 | + e.printStackTrace(); | |
| 59 | + } catch (SQLException e) { | |
| 60 | + logger.error("初始化老系统连接池失败,非正式环境请忽略这个问题!"); | |
| 61 | + logger.error(e.toString()); | |
| 62 | + e.printStackTrace(); | |
| 63 | + } | |
| 64 | + } | |
| 65 | + | |
| 66 | + /** | |
| 67 | + * 获取连接对象 | |
| 68 | + */ | |
| 69 | + public static Connection getConnection() throws SQLException { | |
| 70 | + return ds_pooled.getConnection(); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /** | |
| 74 | + * 释放连接池资源 | |
| 75 | + */ | |
| 76 | + public static void clearup() { | |
| 77 | + if (ds_pooled != null) { | |
| 78 | + try { | |
| 79 | + DataSources.destroy(ds_pooled); | |
| 80 | + } catch (SQLException e) { | |
| 81 | + logger.error(e.toString()); | |
| 82 | + e.printStackTrace(); | |
| 83 | + } | |
| 84 | + } | |
| 85 | + } | |
| 86 | + | |
| 87 | + /** | |
| 88 | + * 资源关闭 | |
| 89 | + * | |
| 90 | + * @param rs | |
| 91 | + * @param stmt | |
| 92 | + * @param conn | |
| 93 | + */ | |
| 94 | + public static void close(ResultSet rs, Statement stmt, Connection conn) { | |
| 95 | + if (rs != null) { | |
| 96 | + try { | |
| 97 | + rs.close(); | |
| 98 | + } catch (SQLException e) { | |
| 99 | + logger.error(e.toString()); | |
| 100 | + e.printStackTrace(); | |
| 101 | + } | |
| 102 | + } | |
| 103 | + | |
| 104 | + if (stmt != null) { | |
| 105 | + try { | |
| 106 | + stmt.close(); | |
| 107 | + } catch (SQLException e) { | |
| 108 | + logger.error(e.toString()); | |
| 109 | + e.printStackTrace(); | |
| 110 | + } | |
| 111 | + } | |
| 112 | + | |
| 113 | + if (conn != null) { | |
| 114 | + try { | |
| 115 | + conn.close(); | |
| 116 | + } catch (SQLException e) { | |
| 117 | + logger.error(e.toString()); | |
| 118 | + e.printStackTrace(); | |
| 119 | + } | |
| 120 | + } | |
| 121 | + } | |
| 122 | + | |
| 123 | + public static DataSource getDataSource(){ | |
| 124 | + return ds_pooled; | |
| 125 | + } | |
| 126 | +} | ... | ... |
src/main/resources/datatools/ktrs/carsDataInput.ktr
| ... | ... | @@ -86,6 +86,30 @@ |
| 86 | 86 | <notepads> |
| 87 | 87 | </notepads> |
| 88 | 88 | <connection> |
| 89 | + <name>192.168.168.1_jwgl_dw</name> | |
| 90 | + <server>192.168.168.1</server> | |
| 91 | + <type>ORACLE</type> | |
| 92 | + <access>Native</access> | |
| 93 | + <database>orcl</database> | |
| 94 | + <port>1521</port> | |
| 95 | + <username>jwgl_dw</username> | |
| 96 | + <password>Encrypted 2be98afc86aa7f2e4cb13b977d2adabcd</password> | |
| 97 | + <servername/> | |
| 98 | + <data_tablespace/> | |
| 99 | + <index_tablespace/> | |
| 100 | + <attributes> | |
| 101 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 102 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 103 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 104 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | |
| 105 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 106 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 107 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 108 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 109 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 110 | + </attributes> | |
| 111 | + </connection> | |
| 112 | + <connection> | |
| 89 | 113 | <name>bus_control_variable</name> |
| 90 | 114 | <server>${v_db_ip}</server> |
| 91 | 115 | <type>MYSQL</type> |
| ... | ... | @@ -298,6 +322,18 @@ |
| 298 | 322 | <group/> |
| 299 | 323 | </field> |
| 300 | 324 | <field> |
| 325 | + <name>车辆编码</name> | |
| 326 | + <type>String</type> | |
| 327 | + <length>-1</length> | |
| 328 | + <precision>-1</precision> | |
| 329 | + <trim_type>none</trim_type> | |
| 330 | + <repeat>N</repeat> | |
| 331 | + <format/> | |
| 332 | + <currency/> | |
| 333 | + <decimal/> | |
| 334 | + <group/> | |
| 335 | + </field> | |
| 336 | + <field> | |
| 301 | 337 | <name>内部编码</name> |
| 302 | 338 | <type>String</type> |
| 303 | 339 | <length>-1</length> |
| ... | ... | @@ -358,7 +394,7 @@ |
| 358 | 394 | <group/> |
| 359 | 395 | </field> |
| 360 | 396 | <field> |
| 361 | - <name>供应商名称</name> | |
| 397 | + <name>设备供应厂商</name> | |
| 362 | 398 | <type>String</type> |
| 363 | 399 | <length>-1</length> |
| 364 | 400 | <precision>-1</precision> |
| ... | ... | @@ -444,12 +480,12 @@ |
| 444 | 480 | <update>Y</update> |
| 445 | 481 | </value> |
| 446 | 482 | <value> |
| 447 | - <name>inside_code</name> | |
| 448 | - <rename>内部编码</rename> | |
| 483 | + <name>car_code</name> | |
| 484 | + <rename>车辆编码</rename> | |
| 449 | 485 | <update>Y</update> |
| 450 | 486 | </value> |
| 451 | 487 | <value> |
| 452 | - <name>car_code</name> | |
| 488 | + <name>inside_code</name> | |
| 453 | 489 | <rename>内部编码</rename> |
| 454 | 490 | <update>Y</update> |
| 455 | 491 | </value> |
| ... | ... | @@ -475,7 +511,7 @@ |
| 475 | 511 | </value> |
| 476 | 512 | <value> |
| 477 | 513 | <name>supplier_name</name> |
| 478 | - <rename>供应商名称</rename> | |
| 514 | + <rename>设备供应厂商</rename> | |
| 479 | 515 | <update>Y</update> |
| 480 | 516 | </value> |
| 481 | 517 | <value> |
| ... | ... | @@ -683,4 +719,3 @@ |
| 683 | 719 | <slave_transformation>N</slave_transformation> |
| 684 | 720 | |
| 685 | 721 | </transformation> |
| 686 | - | ... | ... |
src/main/resources/datatools/ktrs/carsDataOutput.ktr
| ... | ... | @@ -81,6 +81,30 @@ |
| 81 | 81 | <notepads> |
| 82 | 82 | </notepads> |
| 83 | 83 | <connection> |
| 84 | + <name>192.168.168.1_jwgl_dw</name> | |
| 85 | + <server>192.168.168.1</server> | |
| 86 | + <type>ORACLE</type> | |
| 87 | + <access>Native</access> | |
| 88 | + <database>orcl</database> | |
| 89 | + <port>1521</port> | |
| 90 | + <username>jwgl_dw</username> | |
| 91 | + <password>Encrypted 2be98afc86aa7f2e4cb13b977d2adabcd</password> | |
| 92 | + <servername/> | |
| 93 | + <data_tablespace/> | |
| 94 | + <index_tablespace/> | |
| 95 | + <attributes> | |
| 96 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 97 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 98 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 99 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | |
| 100 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 101 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 102 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 103 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 104 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 105 | + </attributes> | |
| 106 | + </connection> | |
| 107 | + <connection> | |
| 84 | 108 | <name>bus_control_variable</name> |
| 85 | 109 | <server>${v_db_ip}</server> |
| 86 | 110 | <type>MYSQL</type> |
| ... | ... | @@ -292,6 +316,11 @@ |
| 292 | 316 | <format/> |
| 293 | 317 | </field> |
| 294 | 318 | <field> |
| 319 | + <name>车辆编码</name> | |
| 320 | + <type>String</type> | |
| 321 | + <format/> | |
| 322 | + </field> | |
| 323 | + <field> | |
| 295 | 324 | <name>内部编码</name> |
| 296 | 325 | <type>String</type> |
| 297 | 326 | <format/> |
| ... | ... | @@ -317,6 +346,11 @@ |
| 317 | 346 | <format/> |
| 318 | 347 | </field> |
| 319 | 348 | <field> |
| 349 | + <name>设备供应厂商</name> | |
| 350 | + <type>String</type> | |
| 351 | + <format/> | |
| 352 | + </field> | |
| 353 | + <field> | |
| 320 | 354 | <name>设备终端号</name> |
| 321 | 355 | <type>String</type> |
| 322 | 356 | <format/> |
| ... | ... | @@ -362,6 +396,10 @@ |
| 362 | 396 | <rename>车牌号</rename> |
| 363 | 397 | <length>-2</length> |
| 364 | 398 | <precision>-2</precision> |
| 399 | + </field> <field> <name>car_code</name> | |
| 400 | + <rename>车辆编码</rename> | |
| 401 | + <length>-2</length> | |
| 402 | + <precision>-2</precision> | |
| 365 | 403 | </field> <field> <name>inside_code</name> |
| 366 | 404 | <rename>内部编码</rename> |
| 367 | 405 | <length>-2</length> | ... | ... |
src/main/resources/fatso/handle_real_ctl.js
0 → 100644
| 1 | +/** | |
| 2 | + * 处理线调文件 | |
| 3 | + */ | |
| 4 | +var fs = require('fs') | |
| 5 | + , cheerio = require('cheerio') | |
| 6 | + , minifier = require('./minifier') | |
| 7 | + , crypto = require("crypto") | |
| 8 | + , CleanCSS = require('clean-css') | |
| 9 | + , UglifyJS = require("uglify-js"); | |
| 10 | +; | |
| 11 | + | |
| 12 | +//不参与的目录 | |
| 13 | +var pName = 'bsth_control' | |
| 14 | + , path = process.cwd() | |
| 15 | + //根目录 | |
| 16 | + , root = path.substr(0, path.indexOf('\\src\\main')) | |
| 17 | + , workspace = root.substr(0, root.indexOf('\\' + pName)) | |
| 18 | + //临时目录 | |
| 19 | + , dest = (workspace + '\\' + pName + '@fatso_copy').replace(/\//g, '\\') | |
| 20 | + , _static = '\\src\\main\\resources\\static'; | |
| 21 | + | |
| 22 | + | |
| 23 | +var mainFile = dest + _static + '\\real_control_v2\\main.html'; | |
| 24 | +var mapFile = dest + _static + '\\real_control_v2\\mapmonitor\\real.html'; | |
| 25 | +var realCtl = { | |
| 26 | + /** | |
| 27 | + * 处理线调首页 | |
| 28 | + */ | |
| 29 | + handleMain: function (cb) { | |
| 30 | + //读取文件 | |
| 31 | + var data = fs.readFileSync(mainFile, 'utf-8') | |
| 32 | + , $ = cheerio.load(data); | |
| 33 | + | |
| 34 | + handleCss($, function () { | |
| 35 | + handleJs($, mainFile, cb); | |
| 36 | + }); | |
| 37 | + }, | |
| 38 | + /** | |
| 39 | + * 处理地图模块 | |
| 40 | + * @param cb | |
| 41 | + */ | |
| 42 | + handleMap: function (cb) { | |
| 43 | + //读取文件 | |
| 44 | + var data = fs.readFileSync(mapFile, 'utf-8') | |
| 45 | + , $ = cheerio.load(data); | |
| 46 | + | |
| 47 | + handleCss($, function () { | |
| 48 | + handleJs($, mapFile, cb); | |
| 49 | + }); | |
| 50 | + } | |
| 51 | +}; | |
| 52 | + | |
| 53 | +/** | |
| 54 | + * 处理css | |
| 55 | + * @type {any} | |
| 56 | + */ | |
| 57 | +var handleCss = function ($, cb) { | |
| 58 | + var cssArray = $('link[rel=stylesheet][merge]'); | |
| 59 | + //按 merge 值分组 | |
| 60 | + var cssMap = {}, mergeName; | |
| 61 | + for (var i = 0, c; c = cssArray[i++];) { | |
| 62 | + mergeName = $(c).attr('merge'); | |
| 63 | + if (!cssMap[mergeName]) | |
| 64 | + cssMap[mergeName] = []; | |
| 65 | + cssMap[mergeName].push(dest + _static + $(c).attr('href')); | |
| 66 | + //remove | |
| 67 | + $(c).remove(); | |
| 68 | + } | |
| 69 | + //按 merge 合并压缩css | |
| 70 | + var ks = get_keys(cssMap), index = 0; | |
| 71 | + (function () { | |
| 72 | + if (index >= ks.length) { | |
| 73 | + cb && cb(); | |
| 74 | + return; | |
| 75 | + } | |
| 76 | + var k = ks[index]; | |
| 77 | + index++; | |
| 78 | + var f = arguments.callee; | |
| 79 | + //合并css | |
| 80 | + new CleanCSS().minify(cssMap[k], function (error, out) { | |
| 81 | + var data = out.styles; | |
| 82 | + var fName = (k + '_' + md5(data)) + '.css'; | |
| 83 | + //写入 assets css 目录下 | |
| 84 | + var descFile = dest + _static + '\\real_control_v2\\assets\\css\\' + fName; | |
| 85 | + fs.open(descFile, 'a', function (err, fd) { | |
| 86 | + | |
| 87 | + fs.write(fd, data, function () { | |
| 88 | + var tag = '<link rel="stylesheet" href="/real_control_v2/assets/css/' + fName + '"/>'; | |
| 89 | + if ($('head').length > 0) | |
| 90 | + $('head').append(tag); | |
| 91 | + else { | |
| 92 | + if($('link').length > 0) | |
| 93 | + $('link').last().before(tag); | |
| 94 | + else | |
| 95 | + $('div').first().before(tag); | |
| 96 | + } | |
| 97 | + console.log(k + ' css', '结束,下一个'); | |
| 98 | + f(); | |
| 99 | + }); | |
| 100 | + }); | |
| 101 | + }); | |
| 102 | + })(); | |
| 103 | +}; | |
| 104 | + | |
| 105 | +/** | |
| 106 | + * 处理js | |
| 107 | + */ | |
| 108 | +var handleJs = function ($, file, cb) { | |
| 109 | + var scriptArray = $('script[merge]'); | |
| 110 | + //按 merge 值分组 | |
| 111 | + var jsMap = {}, mergeName; | |
| 112 | + for (var i = 0, s; s = scriptArray[i++];) { | |
| 113 | + mergeName = $(s).attr('merge'); | |
| 114 | + if (!jsMap[mergeName]) | |
| 115 | + jsMap[mergeName] = []; | |
| 116 | + jsMap[mergeName].push(dest + _static + $(s).attr('src')); | |
| 117 | + //remove | |
| 118 | + $(s).remove(); | |
| 119 | + } | |
| 120 | + | |
| 121 | + //按 merge 合并压缩js | |
| 122 | + var ks = get_keys(jsMap), index = 0; | |
| 123 | + (function () { | |
| 124 | + if (index >= ks.length) { | |
| 125 | + write(file, $.html()); | |
| 126 | + console.log(file + ' 结束'.green); | |
| 127 | + cb && cb(); | |
| 128 | + return; | |
| 129 | + } | |
| 130 | + var k = ks[index]; | |
| 131 | + index++; | |
| 132 | + var f = arguments.callee; | |
| 133 | + //合并压缩js | |
| 134 | + var result = UglifyJS.minify(jsMap[k]); | |
| 135 | + var data = result.code; | |
| 136 | + var fName = (k + '_' + md5(data)) + '.js'; | |
| 137 | + //写入 assets js 目录下 | |
| 138 | + var descFile = dest + _static + '\\real_control_v2\\assets\\js\\' + fName; | |
| 139 | + fs.open(descFile, 'a', function (err, fd) { | |
| 140 | + | |
| 141 | + fs.write(fd, data, function () { | |
| 142 | + var tag = '<script src="/real_control_v2/assets/js/' + fName + '"></script>'; | |
| 143 | + if ($('body').length > 0) | |
| 144 | + $('body').append(tag); | |
| 145 | + else { | |
| 146 | + //没有body 就写在尾部 | |
| 147 | + $('*').last().after(tag); | |
| 148 | + } | |
| 149 | + console.log(k + ' js', '结束,下一个'); | |
| 150 | + f(); | |
| 151 | + }); | |
| 152 | + }); | |
| 153 | + })(); | |
| 154 | +}; | |
| 155 | + | |
| 156 | +var get_keys = function (json) { | |
| 157 | + var array = []; | |
| 158 | + for (var key in json) { | |
| 159 | + array.push(key); | |
| 160 | + } | |
| 161 | + return array; | |
| 162 | +}; | |
| 163 | + | |
| 164 | +function md5(text) { | |
| 165 | + return crypto.createHash("md5").update(text).digest("hex"); | |
| 166 | +} | |
| 167 | + | |
| 168 | +function write(file, text) { | |
| 169 | + fs.writeFile(file, text, function (err) { | |
| 170 | + if (err) { | |
| 171 | + console.log(err.toString().red); | |
| 172 | + process.exit(); | |
| 173 | + } | |
| 174 | + console.log(file.green); | |
| 175 | + }); | |
| 176 | +} | |
| 177 | + | |
| 178 | +module.exports = realCtl; | |
| 0 | 179 | \ No newline at end of file | ... | ... |
src/main/resources/fatso/package.json
src/main/resources/fatso/parse.js
src/main/resources/fatso/start.js
| ... | ... | @@ -8,7 +8,8 @@ var fs = require('fs') |
| 8 | 8 | ,EventProxy = require('eventproxy') |
| 9 | 9 | ,parse = require('./parse') |
| 10 | 10 | ,minifier = require('./minifier') |
| 11 | - ,crypto = require("crypto"); | |
| 11 | + ,crypto = require("crypto") | |
| 12 | + ,handle_real_ctl = require('./handle_real_ctl'); | |
| 12 | 13 | |
| 13 | 14 | //不参与的目录 |
| 14 | 15 | var excludes = ['scheduleApp', 'trafficManage', 'control'] |
| ... | ... | @@ -74,15 +75,21 @@ ep.tail('check-js', function(){ |
| 74 | 75 | //合并压缩JS |
| 75 | 76 | ep.tail('minifier-js', function(){ |
| 76 | 77 | logInfo('handle index.html...'); |
| 77 | - | |
| 78 | - //先处理首页 | |
| 78 | + | |
| 79 | + //再处理首页 | |
| 79 | 80 | ep.emit('handle-index', function(){ |
| 80 | 81 | //递归处理片段 |
| 81 | 82 | walk(dest + _static + '\\pages', function(item){ |
| 82 | 83 | ep.emit('handle-fragment', item); |
| 83 | 84 | }, |
| 84 | 85 | function(){ |
| 85 | - ep.emit('package-jar'); | |
| 86 | + //处理线调首页 | |
| 87 | + handle_real_ctl.handleMain(function () { | |
| 88 | + //处理线调地图 | |
| 89 | + handle_real_ctl.handleMap(function () { | |
| 90 | + ep.emit('package-jar'); | |
| 91 | + }); | |
| 92 | + }); | |
| 86 | 93 | }); |
| 87 | 94 | }); |
| 88 | 95 | }); | ... | ... |
src/main/resources/static/pages/forms/statement/jobSummary.html
| ... | ... | @@ -277,6 +277,27 @@ |
| 277 | 277 | initPinYinSelect2('#line',data,''); |
| 278 | 278 | |
| 279 | 279 | }) */ |
| 280 | + | |
| 281 | + jQuery.fn.rowspan = function(colIdx) { //封装的一个JQuery小插件 | |
| 282 | + return this.each(function(){ | |
| 283 | + var that; | |
| 284 | + $('tr', this).each(function(row) { | |
| 285 | + $('td:eq('+colIdx+')', this).filter(':visible').each(function(col) { | |
| 286 | + if (that!=null && $(this).html() == $(that).html()) { | |
| 287 | + rowspan = $(that).attr("rowSpan"); | |
| 288 | + if (rowspan == undefined) { | |
| 289 | + $(that).attr("rowSpan",1); | |
| 290 | + rowspan = $(that).attr("rowSpan"); } | |
| 291 | + rowspan = Number(rowspan)+1; | |
| 292 | + $(that).attr("rowSpan",rowspan); | |
| 293 | + $(this).hide(); | |
| 294 | + } else { | |
| 295 | + that = this; | |
| 296 | + } | |
| 297 | + }); | |
| 298 | + }); | |
| 299 | + }); | |
| 300 | + } | |
| 280 | 301 | $("#query").on("click",function(){ |
| 281 | 302 | var line=$("#line").val();; |
| 282 | 303 | var lineName=$(".select2-selection__rendered").html(); |
| ... | ... | @@ -292,6 +313,11 @@ |
| 292 | 313 | var list_lbqk = template('list_lbqk',{list:result}); |
| 293 | 314 | // 把渲染好的模版html文本追加到表格中 |
| 294 | 315 | $('#forms .list_lbqk').html(list_lbqk); |
| 316 | + $('#forms .list_lbqk').rowspan(0); | |
| 317 | + $('#forms .list_lbqk').rowspan(1); | |
| 318 | + $('#forms .list_lbqk').rowspan(2); | |
| 319 | + $('#forms .list_lbqk').rowspan(3); | |
| 320 | + | |
| 295 | 321 | }) |
| 296 | 322 | |
| 297 | 323 | $get('/report/jobLjqk',{line:line,date:date},function(result){ |
| ... | ... | @@ -328,13 +354,19 @@ |
| 328 | 354 | <td>{{obj.nr}}</td> |
| 329 | 355 | <td>{{obj.lp}}</td> |
| 330 | 356 | <td>{{obj.nbbm}}</td> |
| 331 | - <td>{{obj.jgh}}</td> | |
| 357 | + <td {{if obj.lx ==1}} colspan="2" {{/if}}>{{obj.jgh}}</td> | |
| 358 | + {{if obj.lx ==0}} | |
| 332 | 359 | <td>{{obj.dz}}</td> |
| 333 | - <td>{{obj.sj}}</td> | |
| 360 | + {{/if}} | |
| 361 | + <td {{if obj.lx ==1}} colspan="3" {{/if}}>{{obj.sj}}</td> | |
| 362 | + {{if obj.lx ==0}} | |
| 334 | 363 | <td> </td> |
| 335 | 364 | <td>{{obj.lbbc}}</td> |
| 336 | - <td>{{obj.lblc}}</td> | |
| 365 | + {{/if}} | |
| 366 | + <td {{if obj.lx ==1}} colspan="2" {{/if}}>{{obj.lblc}}</td> | |
| 367 | + {{if obj.lx ==0}} | |
| 337 | 368 | <td>{{obj.jyqp}}</td> |
| 369 | + {{/if}} | |
| 338 | 370 | </tr> |
| 339 | 371 | {{/each}} |
| 340 | 372 | {{if list.length == 0}} | ... | ... |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| ... | ... | @@ -14,6 +14,17 @@ |
| 14 | 14 | |
| 15 | 15 | .table > tbody + tbody { |
| 16 | 16 | border-top: 1px solid; } |
| 17 | + | |
| 18 | + #forms > thead > tr> td >span{ | |
| 19 | + | |
| 20 | + width: 5px; | |
| 21 | +word-wrap: break-word; | |
| 22 | +letter-spacing: 20px; | |
| 23 | + } | |
| 24 | + | |
| 25 | + #forms tr> td >label{ | |
| 26 | + word-break: keep-all;white-space:nowrap; | |
| 27 | + } | |
| 17 | 28 | </style> |
| 18 | 29 | |
| 19 | 30 | <div class="page-head"> |
| ... | ... | @@ -60,18 +71,18 @@ |
| 60 | 71 | <th colspan="40">线路调度日报</th> |
| 61 | 72 | </tr> |
| 62 | 73 | <tr> |
| 63 | - <td rowspan="3">路线名</td> | |
| 74 | + <td rowspan="3"><span >路线名</span></td> | |
| 64 | 75 | <td colspan="16"><c>全日</c>营运里程(公里)</td> |
| 65 | 76 | <td colspan="15"><c>全日</c>营运班次</td> |
| 66 | 77 | <td colspan="9">大间隔情况</td> |
| 67 | 78 | </tr> |
| 68 | 79 | <tr> |
| 69 | - <td rowspan="2">计划</td> | |
| 70 | - <td rowspan="2">实驶</td> | |
| 71 | - <td rowspan="2">少驶公里</td> | |
| 72 | - <td rowspan="2">少驶班次</td> | |
| 80 | + <td rowspan="2"><span >计划</span></td> | |
| 81 | + <td rowspan="2"><span >实驶</span></td> | |
| 82 | + <td rowspan="2"><span>少驶公里</span></td> | |
| 83 | + <td rowspan="2"><span>少驶班次</span></td> | |
| 73 | 84 | <td colspan="11">少驶原因(公里)</td> |
| 74 | - <td rowspan="2">临加公里</td> | |
| 85 | + <td rowspan="2"><span >临加公里</span></td> | |
| 75 | 86 | <td colspan="3">计划班次</td> |
| 76 | 87 | <td colspan="3">实际班次</td> |
| 77 | 88 | <td colspan="3">临加班次</td> |
| ... | ... | @@ -82,35 +93,35 @@ |
| 82 | 93 | <td colspan="5" rowspan="2">原因</td> |
| 83 | 94 | </tr> |
| 84 | 95 | <tr> |
| 85 | - <td>路阻</td> | |
| 86 | - <td>吊慢</td> | |
| 87 | - <td>故障</td> | |
| 88 | - <td>纠纷</td> | |
| 89 | - <td>肇事</td> | |
| 90 | - <td>缺人</td> | |
| 91 | - <td>缺车</td> | |
| 92 | - <td>客稀</td> | |
| 93 | - <td>气候</td> | |
| 94 | - <td>援外</td> | |
| 95 | - <td>其他</td> | |
| 96 | - <td><c>全日</c></td> | |
| 97 | - <td>早高峰</td> | |
| 98 | - <td>晚高峰</td> | |
| 99 | - <td><c>全日</c></td> | |
| 100 | - <td>早高峰</td> | |
| 101 | - <td>晚高峰</td> | |
| 102 | - <td><c>全日</c></td> | |
| 103 | - <td>早高峰</td> | |
| 104 | - <td>晚高峰</td> | |
| 105 | - <td><c>全日</c></td> | |
| 106 | - <td>早高峰</td> | |
| 107 | - <td>晚高峰</td> | |
| 108 | - <td><c>全日</c></td> | |
| 109 | - <td>早高峰</td> | |
| 110 | - <td>晚高峰</td> | |
| 111 | - <td><c>全日</c></td> | |
| 112 | - <td>早高峰</td> | |
| 113 | - <td>晚高峰</td> | |
| 96 | + <td><span >路阻</span></td> | |
| 97 | + <td><span>吊慢</span></td> | |
| 98 | + <td><span >故障</span></td> | |
| 99 | + <td><span >纠纷</span></td> | |
| 100 | + <td><span >肇事</span></td> | |
| 101 | + <td><span>缺人</span></td> | |
| 102 | + <td><span>缺车</span></td> | |
| 103 | + <td><span >客稀</span></td> | |
| 104 | + <td><span>气候</span></td> | |
| 105 | + <td><span>援外</span></td> | |
| 106 | + <td><span>其他</span></td> | |
| 107 | + <td><span ><c>全日</c></span></td> | |
| 108 | + <td><span >早高峰</span></td> | |
| 109 | + <td><span>晚高峰</span></td> | |
| 110 | + <td><span><c>全日</c></span></td> | |
| 111 | + <td><span>早高峰</span></td> | |
| 112 | + <td><span>晚高峰</span></td> | |
| 113 | + <td><span><c>全日</c></span></td> | |
| 114 | + <td><span>早高峰</span></td> | |
| 115 | + <td><span>晚高峰</span></td> | |
| 116 | + <td><span><c>全日</c></span></td> | |
| 117 | + <td><span>早高峰</span></td> | |
| 118 | + <td><span>晚高峰</span></td> | |
| 119 | + <td><span><c>全日</c></span></td> | |
| 120 | + <td><span>早高峰</span></td> | |
| 121 | + <td><span>晚高峰</span></td> | |
| 122 | + <td><span><c>全日</c></span></td> | |
| 123 | + <td><span>早高峰</span></td> | |
| 124 | + <td><span>晚高峰</span></td> | |
| 114 | 125 | </tr> |
| 115 | 126 | </thead> |
| 116 | 127 | |
| ... | ... | @@ -169,36 +180,36 @@ |
| 169 | 180 | <td colspan="40"> </td> |
| 170 | 181 | </tr> --> |
| 171 | 182 | <tr> |
| 172 | - <td colspan="2">路牌</td> | |
| 173 | - <td colspan="2">车号</td> | |
| 174 | - <td>司早</td> | |
| 175 | - <td>售早</td> | |
| 176 | - <td>司晚</td> | |
| 177 | - <td>售晚</td> | |
| 178 | - <td colspan="2">路牌</td> | |
| 179 | - <td colspan="2">车号</td> | |
| 180 | - <td>司早</td> | |
| 181 | - <td>售早</td> | |
| 182 | - <td>司晚</td> | |
| 183 | - <td>售晚</td> | |
| 184 | - <td colspan="2">路牌</td> | |
| 185 | - <td colspan="2">车号</td> | |
| 186 | - <td>司早</td> | |
| 187 | - <td>售早</td> | |
| 188 | - <td>司晚</td> | |
| 189 | - <td>售晚</td> | |
| 190 | - <td colspan="2">路牌</td> | |
| 191 | - <td colspan="2">车号</td> | |
| 192 | - <td>司早</td> | |
| 193 | - <td>售早</td> | |
| 194 | - <td>司晚</td> | |
| 195 | - <td>售晚</td> | |
| 196 | - <td colspan="2">路牌</td> | |
| 197 | - <td colspan="2">车号</td> | |
| 198 | - <td>司早</td> | |
| 199 | - <td>售早</td> | |
| 200 | - <td>司晚</td> | |
| 201 | - <td>售晚</td> | |
| 183 | + <td colspan="2"><label>路牌</label></td> | |
| 184 | + <td colspan="2"><label>车号</label></td> | |
| 185 | + <td> <label>司早</label></td> | |
| 186 | + <td><label>售早</label></td> | |
| 187 | + <td><label>司晚</label></td> | |
| 188 | + <td><label>售晚</label></td> | |
| 189 | + <td colspan="2"><label>路牌</label></td> | |
| 190 | + <td colspan="2"><label>车号</label></td> | |
| 191 | + <td><label>司早</label></td> | |
| 192 | + <td><label>售早</label></td> | |
| 193 | + <td><label>司晚</label></td> | |
| 194 | + <td><label>售晚</label></td> | |
| 195 | + <td colspan="2"><label>路牌</label></td> | |
| 196 | + <td colspan="2"><label>车号</label></td> | |
| 197 | + <td><label>司早</label></td> | |
| 198 | + <td><label>售早</label></td> | |
| 199 | + <td><label>司晚</label></td> | |
| 200 | + <td><label>售晚</label></td> | |
| 201 | + <td colspan="2"><label>路牌</label></td> | |
| 202 | + <td colspan="2"><label>车号</label></td> | |
| 203 | + <td><label>司早</label></td> | |
| 204 | + <td><label>售早</label></td> | |
| 205 | + <td><label>司晚</label></td> | |
| 206 | + <td><label>售晚</label></td> | |
| 207 | + <td colspan="2"><label>路牌</label></td> | |
| 208 | + <td colspan="2"><label>车号</label></td> | |
| 209 | + <td><label>司早</label></td> | |
| 210 | + <td><label>售早</label></td> | |
| 211 | + <td><label>司晚</label></td> | |
| 212 | + <td><label>售晚</label></td> | |
| 202 | 213 | </tr> |
| 203 | 214 | <tbody class="scheduleDaily_2"> |
| 204 | 215 | |
| ... | ... | @@ -208,17 +219,17 @@ |
| 208 | 219 | </tr> |
| 209 | 220 | <tr> |
| 210 | 221 | <td rowspan="2">路牌</td> |
| 211 | - <td colspan="2" rowspan="2">起点站</td> | |
| 222 | + <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td> | |
| 212 | 223 | <td colspan="4">到达时间</td> |
| 213 | 224 | <td colspan="4">发车时间</td> |
| 214 | 225 | <td colspan="2" rowspan="2">备注</td> |
| 215 | 226 | <td rowspan="2">路牌</td> |
| 216 | - <td colspan="2" rowspan="2">起点站</td> | |
| 227 | + <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td> | |
| 217 | 228 | <td colspan="4">到达时间</td> |
| 218 | 229 | <td colspan="4">发车时间</td> |
| 219 | 230 | <td colspan="2" rowspan="2">备注</td> |
| 220 | 231 | <td rowspan="2">路牌</td> |
| 221 | - <td colspan="2" rowspan="2">起点站</td> | |
| 232 | + <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td> | |
| 222 | 233 | <td colspan="4">到达时间</td> |
| 223 | 234 | <td colspan="4">发车时间</td> |
| 224 | 235 | <td colspan="2" rowspan="2">备注</td> |
| ... | ... | @@ -456,7 +467,7 @@ |
| 456 | 467 | </script> |
| 457 | 468 | <script type="text/html" id="scheduleDaily_1"> |
| 458 | 469 | {{each list as obj i}} |
| 459 | - <tr> | |
| 470 | + <tr > | |
| 460 | 471 | <td>{{obj.xlName}}</td> |
| 461 | 472 | <td>{{obj.jhlc}}</td> |
| 462 | 473 | <td>{{obj.sjgl}}</td> |
| ... | ... | @@ -534,13 +545,13 @@ |
| 534 | 545 | <tr> |
| 535 | 546 | {{/if}} |
| 536 | 547 | <td>{{obj.lpName}}</td> |
| 537 | - <td colspan="2">{{obj.qdzName}}</td> | |
| 548 | + <td colspan="2" style="word-break: keep-all;white-space:nowrap;">{{obj.qdzName}}</td> | |
| 538 | 549 | <td>{{obj.zdsj}}</td> |
| 539 | 550 | <td>{{obj.zdsjActual}}</td> |
| 540 | 551 | <td>{{obj.fast}}</td> |
| 541 | 552 | <td>{{obj.slow}}</td> |
| 542 | 553 | <td>{{obj.fcsj}}</td> |
| 543 | - <td>{{obj.fcsjActual}} | |
| 554 | + <td style="word-break: keep-all;white-space:nowrap;">{{obj.fcsjActual}} | |
| 544 | 555 | {{if obj.bcType== "in"}} |
| 545 | 556 | (进) |
| 546 | 557 | {{/if}} | ... | ... |
src/main/resources/static/pages/mforms/shifdays/shifday.html
src/main/resources/static/pages/mforms/shiftuehiclemanths/shiftuehiclemanth.html
src/main/resources/static/pages/permission/user/add.html
| ... | ... | @@ -150,10 +150,26 @@ |
| 150 | 150 | submitHandler : function(f) { |
| 151 | 151 | var params = form.serializeJSON(); |
| 152 | 152 | error.hide(); |
| 153 | - console.log(params); | |
| 154 | - | |
| 155 | - //检查一下用户是否存在 | |
| 156 | - $get('/user/all', {userName_eq: params.userName}, function(list){ | |
| 153 | + | |
| 154 | + $.ajax({ | |
| 155 | + url: '/user/register', | |
| 156 | + type: 'POST', | |
| 157 | + traditional: true, | |
| 158 | + data: params, | |
| 159 | + success: function(rs){ | |
| 160 | + if(!rs){ | |
| 161 | + layer.msg('未知异常!'); | |
| 162 | + } | |
| 163 | + if(rs.status=='SUCCESS'){ | |
| 164 | + layer.msg('添加用户成功.'); | |
| 165 | + loadPage('list.html'); | |
| 166 | + } | |
| 167 | + else if(rs.status=='ERROR'){ | |
| 168 | + layer.msg('添加失败[ ' + rs.msg + ']'); | |
| 169 | + } | |
| 170 | + } | |
| 171 | + }); | |
| 172 | + /*$get('/user/all', {userName_eq: params.userName}, function(list){ | |
| 157 | 173 | if(!list || list.length == 0){ |
| 158 | 174 | console.log(params); |
| 159 | 175 | $.ajax({ |
| ... | ... | @@ -166,14 +182,14 @@ |
| 166 | 182 | loadPage('list.html'); |
| 167 | 183 | } |
| 168 | 184 | }); |
| 169 | - /* $post('/user', params, function(res){ | |
| 185 | + /!* $post('/user', params, function(res){ | |
| 170 | 186 | layer.msg('添加用户成功.'); |
| 171 | 187 | loadPage('list.html'); |
| 172 | - }); */ | |
| 188 | + }); *!/ | |
| 173 | 189 | } |
| 174 | 190 | else |
| 175 | 191 | layer.alert('用户【' + params.userName + '】已存在', {icon: 2, title: '提交被拒绝'}); |
| 176 | - }); | |
| 192 | + });*/ | |
| 177 | 193 | } |
| 178 | 194 | }); |
| 179 | 195 | }); | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/dts2/ttinfotable/new/sa1.js
0 → 100644
| 1 | +/** | |
| 2 | + * saTimeTable指令工具集,创建内部单元格类,及其他操作 | |
| 3 | + */ | |
| 4 | +angular.module('ScheduleApp').factory( | |
| 5 | + 'SaTimeTableUtils', | |
| 6 | + [ | |
| 7 | + function() { | |
| 8 | + /** | |
| 9 | + * 表格,单元格头类 | |
| 10 | + * 如:路牌,出1,青2......进6 | |
| 11 | + */ | |
| 12 | + var Cell_Header = function(str) { | |
| 13 | + /** 表头数据 */ | |
| 14 | + this.headStr = str; | |
| 15 | + }; | |
| 16 | + Cell_Header.prototype.setHead = function(str) { | |
| 17 | + this.headStr = str || ""; | |
| 18 | + }; | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * 表格,单元格内容类,在表格上只显示时间,但是内部还是保存其他值。 | |
| 22 | + */ | |
| 23 | + var Cell_Body_Bc = function() { | |
| 24 | + /** 表格单元格显示的信息 */ | |
| 25 | + this.info = undefined; | |
| 26 | + | |
| 27 | + this.isSel = false; // 是否被选中 | |
| 28 | + this.isCanSel = true; // 是否能被选择 | |
| 29 | + this.isValidInfo = false; // 数据是否有效 | |
| 30 | + | |
| 31 | + this.data = {}; // 内部信息 | |
| 32 | + | |
| 33 | + this.data.ttdid = undefined; // 班次信息Id | |
| 34 | + this.data.fcsj = undefined; // 发车时间 | |
| 35 | + this.data.bcType = undefined; // 班次类型 | |
| 36 | + this.data.xldir = undefined; // 线路方向 | |
| 37 | + this.data.isfb = undefined; // 是否分班 | |
| 38 | + this.data.jhlc = undefined; // 计划里程 | |
| 39 | + this.data.qdz = null; // 起点站id | |
| 40 | + this.data.zdz = null; // 终点站id | |
| 41 | + this.data.tcc = null; // 停车场id | |
| 42 | + | |
| 43 | + this.self.lpId = undefined; // 路牌Id | |
| 44 | + this.self.lpName = undefined; // 路牌名字 | |
| 45 | + | |
| 46 | + this.self.fcno = undefined; // 发车序号 | |
| 47 | + this.self.bcs = undefined; // 班次数 | |
| 48 | + }; | |
| 49 | + /** | |
| 50 | + * 路牌单元格类。 | |
| 51 | + */ | |
| 52 | + var Cell_Body_Lp = function() { | |
| 53 | + this.info = undefined; | |
| 54 | + | |
| 55 | + this.isSel = false; // 是否被选中 | |
| 56 | + this.isCanSel = false; // 是否能被选择 | |
| 57 | + this.isValidInfo = false; // 数据是否有效 | |
| 58 | + | |
| 59 | + this.data = {}; // 内部信息 | |
| 60 | + | |
| 61 | + this.data.lpId = undefined; // 路牌Id | |
| 62 | + this.data.lpName = undefined; // 路牌名字 | |
| 63 | + }; | |
| 64 | + /** | |
| 65 | + * 统计单元格类。 | |
| 66 | + */ | |
| 67 | + var Cell_Body_Stat = function() { | |
| 68 | + this.info = undefined; | |
| 69 | + | |
| 70 | + this.isSel = false; // 是否被选中 | |
| 71 | + this.isCanSel = false; // 是否能被选择 | |
| 72 | + this.isValidInfo = false; // 数据是否有效 | |
| 73 | + | |
| 74 | + this.data = {}; // 内部信息 | |
| 75 | + }; | |
| 76 | + | |
| 77 | + Cell_Body_Bc.prototype.canSel = function() { // 是否能被选中 | |
| 78 | + return this.isCanSel; | |
| 79 | + }; | |
| 80 | + Cell_Body_Bc.prototype.canUpdate = function() { // 是否能更新 | |
| 81 | + return this.isSel && this.data.ttdid; | |
| 82 | + }; | |
| 83 | + Cell_Body_Bc.prototype.canDelete = function() { // 是否能删除 | |
| 84 | + return this.isSel && this.data.ttdid; | |
| 85 | + }; | |
| 86 | + Cell_Body_Bc.prototype.validInfo = function() { // 验证班次内数据是否正确 | |
| 87 | + if (this.canSel() && this.data.ttdid) { | |
| 88 | + if (this.data.bcType == 'in') { | |
| 89 | + this.isValidInfo = this.data.qdz != null && this.data.tcc != null; | |
| 90 | + } else if (this.data.bcType == 'out') { | |
| 91 | + this.isValidInfo = this.data.tcc != null && this.data.zdz != null; | |
| 92 | + } else { | |
| 93 | + this.isValidInfo = this.data.qdz != null && this.data.zdz != null; | |
| 94 | + } | |
| 95 | + } else { | |
| 96 | + this.isValidInfo = true; | |
| 97 | + } | |
| 98 | + return this.isValidInfo; | |
| 99 | + }; | |
| 100 | + Cell_Body_Bc.prototype.where = function( | |
| 101 | + xldir, startTime_h_m, endTime_h_m, isInOut | |
| 102 | + ) { // 判定班次是否在指定条件内 | |
| 103 | + | |
| 104 | + var fcsj_m_h = []; | |
| 105 | + fcsj_m_h[0] = parseInt(this.data.fcsj.split(":")[0]); | |
| 106 | + fcsj_m_h[1] = parseInt(this.data.fcsj.split(":")[1]); | |
| 107 | + | |
| 108 | + var fcsj = new Date(2000,1,1); | |
| 109 | + fcsj.setHours(fcsj_m_h[0]); | |
| 110 | + fcsj.setMinutes(fcsj_m_h[1]); | |
| 111 | + | |
| 112 | + var s_temp_date = new Date(2000, 1, 1); | |
| 113 | + var e_temp_date = new Date(2000, 1, 1); | |
| 114 | + | |
| 115 | + if (xldir == 2) { // 上下行 | |
| 116 | + // 判定是否要进出场班次 | |
| 117 | + if (isInOut == false && (this.data.bcType == "in" || this.data.bcType == "out")) { | |
| 118 | + return false; | |
| 119 | + } | |
| 120 | + | |
| 121 | + if (startTime_h_m) { | |
| 122 | + if (endTime_h_m) { | |
| 123 | + s_temp_date.setHours(startTime_h_m[0]); | |
| 124 | + s_temp_date.setMinutes(startTime_h_m[1]); | |
| 125 | + e_temp_date.setHours(endTime_h_m[0]); | |
| 126 | + e_temp_date.setMinutes(endTime_h_m[1]); | |
| 127 | + return fcsj >= s_temp_date && fcsj <= e_temp_date; | |
| 128 | + } else { | |
| 129 | + s_temp_date.setHours(startTime_h_m[0]); | |
| 130 | + s_temp_date.setMinutes(startTime_h_m[1]); | |
| 131 | + return fcsj >= s_temp_date; | |
| 132 | + } | |
| 133 | + } else { | |
| 134 | + if (endTime_h_m) { | |
| 135 | + e_temp_date.setHours(endTime_h_m[0]); | |
| 136 | + e_temp_date.setMinutes(endTime_h_m[1]); | |
| 137 | + return fcsj <= e_temp_date; | |
| 138 | + } else { | |
| 139 | + return false; | |
| 140 | + } | |
| 141 | + } | |
| 142 | + } else { | |
| 143 | + // 判定是否要进出场班次 | |
| 144 | + if (isInOut == false && (this.data.bcType == "in" || this.data.bcType == "out")) { | |
| 145 | + return false; | |
| 146 | + } | |
| 147 | + | |
| 148 | + if (xldir == this.xldir) { | |
| 149 | + if (startTime_h_m) { | |
| 150 | + if (endTime_h_m) { | |
| 151 | + s_temp_date.setHours(startTime_h_m[0]); | |
| 152 | + s_temp_date.setMinutes(startTime_h_m[1]); | |
| 153 | + e_temp_date.setHours(endTime_h_m[0]); | |
| 154 | + e_temp_date.setMinutes(endTime_h_m[1]); | |
| 155 | + return fcsj >= s_temp_date && fcsj <= e_temp_date; | |
| 156 | + } else { | |
| 157 | + s_temp_date.setHours(startTime_h_m[0]); | |
| 158 | + s_temp_date.setMinutes(startTime_h_m[1]); | |
| 159 | + return fcsj >= s_temp_date; | |
| 160 | + } | |
| 161 | + } else { | |
| 162 | + if (endTime_h_m) { | |
| 163 | + e_temp_date.setHours(endTime_h_m[0]); | |
| 164 | + e_temp_date.setMinutes(endTime_h_m[1]); | |
| 165 | + return fcsj <= e_temp_date; | |
| 166 | + } else { | |
| 167 | + return true; | |
| 168 | + } | |
| 169 | + } | |
| 170 | + } else { | |
| 171 | + return false; | |
| 172 | + } | |
| 173 | + } | |
| 174 | + }; | |
| 175 | + | |
| 176 | + Cell_Body_Lp.prototype.canSel = function() { // 是否能被选中 | |
| 177 | + return this.isCanSel; | |
| 178 | + }; | |
| 179 | + Cell_Body_Lp.prototype.canUpdate = function() { // 是否能更新 | |
| 180 | + return this.isSel && this.data.ttdid; | |
| 181 | + }; | |
| 182 | + Cell_Body_Lp.prototype.canDelete = function() { // 是否能删除 | |
| 183 | + return this.isSel && this.data.ttdid; | |
| 184 | + }; | |
| 185 | + | |
| 186 | + Cell_Body_Stat.prototype.canSel = function() { // 是否能被选中 | |
| 187 | + return this.isCanSel; | |
| 188 | + }; | |
| 189 | + Cell_Body_Stat.prototype.canUpdate = function() { // 是否能更新 | |
| 190 | + return this.isSel && this.data.ttdid; | |
| 191 | + }; | |
| 192 | + Cell_Body_Stat.prototype.canDelete = function() { // 是否能删除 | |
| 193 | + return this.isSel && this.data.ttdid; | |
| 194 | + }; | |
| 195 | + | |
| 196 | + return { | |
| 197 | + // TODO: | |
| 198 | + }; | |
| 199 | + } | |
| 200 | + ] | |
| 201 | +); | |
| 0 | 202 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/module.js
| ... | ... | @@ -126,8 +126,9 @@ angular.module('ScheduleApp').controller( |
| 126 | 126 | |
| 127 | 127 | // 导出excel |
| 128 | 128 | self.exportData = function() { |
| 129 | - if (busConfigService.dataExport()) { | |
| 130 | - busConfigService.dataExport().then( | |
| 129 | + var p = busConfigService.dataExport(); | |
| 130 | + if (p) { | |
| 131 | + p.then( | |
| 131 | 132 | function(result) { |
| 132 | 133 | fileDownload.downloadFile(result.data, "application/octet-stream", "车辆配置信息.xls"); |
| 133 | 134 | }, | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/module.js
| ... | ... | @@ -127,8 +127,9 @@ angular.module('ScheduleApp').controller( |
| 127 | 127 | |
| 128 | 128 | // 导出excel |
| 129 | 129 | self.exportData = function() { |
| 130 | - if (service.dataExport()) { | |
| 131 | - service.dataExport().then( | |
| 130 | + var p = service.dataExport(); | |
| 131 | + if (p) { | |
| 132 | + p.then( | |
| 132 | 133 | function(result) { |
| 133 | 134 | fileDownload.downloadFile(result.data, "application/octet-stream", "人员配置信息.xls"); |
| 134 | 135 | }, | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/module.js
| ... | ... | @@ -131,8 +131,9 @@ angular.module('ScheduleApp').controller( |
| 131 | 131 | |
| 132 | 132 | // 导出excel |
| 133 | 133 | self.exportData = function() { |
| 134 | - if (service.dataExport()) { | |
| 135 | - service.dataExport().then( | |
| 134 | + var p = service.dataExport(); | |
| 135 | + if (p) { | |
| 136 | + p.then( | |
| 136 | 137 | function(result) { |
| 137 | 138 | fileDownload.downloadFile(result.data, "application/octet-stream", "路牌信息.xls"); |
| 138 | 139 | }, | ... | ... |
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/accordion.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/all.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/autocomplete.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/base.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/button.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/core.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/datepicker.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/dialog.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/draggable.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/menu.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/progressbar.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/resizable.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/selectable.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/selectmenu.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/slider.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/sortable.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/spinner.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/tabs.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/theme.css
| 1 | -/*! | |
| 1 | +/* | |
| 2 | 2 | * jQuery UI CSS Framework 1.11.1 |
| 3 | 3 | * http://jqueryui.com |
| 4 | 4 | * |
| ... | ... | @@ -30,7 +30,7 @@ |
| 30 | 30 | } |
| 31 | 31 | .ui-widget-content { |
| 32 | 32 | border: 1px solid #aaaaaa/*{borderColorContent}*/; |
| 33 | - background: #ffffff/*{bgColorContent}*/ url("images/ui-bg_flat_75_ffffff_40x100.png")/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; | |
| 33 | + background: #ffffff/*{bgColorContent}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_flat_75_ffffff_40x100.png")/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; | |
| 34 | 34 | color: #222222/*{fcContent}*/; |
| 35 | 35 | } |
| 36 | 36 | .ui-widget-content a { |
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | } |
| 39 | 39 | .ui-widget-header { |
| 40 | 40 | border: 1px solid #aaaaaa/*{borderColorHeader}*/; |
| 41 | - background: #cccccc/*{bgColorHeader}*/ url("images/ui-bg_highlight-soft_75_cccccc_1x100.png")/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; | |
| 41 | + background: #cccccc/*{bgColorHeader}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png")/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; | |
| 42 | 42 | color: #222222/*{fcHeader}*/; |
| 43 | 43 | font-weight: bold; |
| 44 | 44 | } |
| ... | ... | @@ -52,7 +52,7 @@ |
| 52 | 52 | .ui-widget-content .ui-state-default, |
| 53 | 53 | .ui-widget-header .ui-state-default { |
| 54 | 54 | border: 1px solid #d3d3d3/*{borderColorDefault}*/; |
| 55 | - background: #e6e6e6/*{bgColorDefault}*/ url("images/ui-bg_glass_75_e6e6e6_1x400.png")/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; | |
| 55 | + background: #e6e6e6/*{bgColorDefault}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png")/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; | |
| 56 | 56 | font-weight: normal/*{fwDefault}*/; |
| 57 | 57 | color: #555555/*{fcDefault}*/; |
| 58 | 58 | } |
| ... | ... | @@ -69,7 +69,7 @@ |
| 69 | 69 | .ui-widget-content .ui-state-focus, |
| 70 | 70 | .ui-widget-header .ui-state-focus { |
| 71 | 71 | border: 1px solid #999999/*{borderColorHover}*/; |
| 72 | - background: #dadada/*{bgColorHover}*/ url("images/ui-bg_glass_75_dadada_1x400.png")/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; | |
| 72 | + background: #dadada/*{bgColorHover}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_75_dadada_1x400.png")/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; | |
| 73 | 73 | font-weight: normal/*{fwDefault}*/; |
| 74 | 74 | color: #212121/*{fcHover}*/; |
| 75 | 75 | } |
| ... | ... | @@ -88,7 +88,7 @@ |
| 88 | 88 | .ui-widget-content .ui-state-active, |
| 89 | 89 | .ui-widget-header .ui-state-active { |
| 90 | 90 | border: 1px solid #aaaaaa/*{borderColorActive}*/; |
| 91 | - background: #ffffff/*{bgColorActive}*/ url("images/ui-bg_glass_65_ffffff_1x400.png")/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; | |
| 91 | + background: #ffffff/*{bgColorActive}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_65_ffffff_1x400.png")/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; | |
| 92 | 92 | font-weight: normal/*{fwDefault}*/; |
| 93 | 93 | color: #212121/*{fcActive}*/; |
| 94 | 94 | } |
| ... | ... | @@ -105,7 +105,7 @@ |
| 105 | 105 | .ui-widget-content .ui-state-highlight, |
| 106 | 106 | .ui-widget-header .ui-state-highlight { |
| 107 | 107 | border: 1px solid #fcefa1/*{borderColorHighlight}*/; |
| 108 | - background: #fbf9ee/*{bgColorHighlight}*/ url("images/ui-bg_glass_55_fbf9ee_1x400.png")/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; | |
| 108 | + background: #fbf9ee/*{bgColorHighlight}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png")/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; | |
| 109 | 109 | color: #363636/*{fcHighlight}*/; |
| 110 | 110 | } |
| 111 | 111 | .ui-state-highlight a, |
| ... | ... | @@ -117,7 +117,7 @@ |
| 117 | 117 | .ui-widget-content .ui-state-error, |
| 118 | 118 | .ui-widget-header .ui-state-error { |
| 119 | 119 | border: 1px solid #cd0a0a/*{borderColorError}*/; |
| 120 | - background: #fef1ec/*{bgColorError}*/ url("images/ui-bg_glass_95_fef1ec_1x400.png")/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; | |
| 120 | + background: #fef1ec/*{bgColorError}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png")/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; | |
| 121 | 121 | color: #cd0a0a/*{fcError}*/; |
| 122 | 122 | } |
| 123 | 123 | .ui-state-error a, |
| ... | ... | @@ -163,27 +163,27 @@ |
| 163 | 163 | } |
| 164 | 164 | .ui-icon, |
| 165 | 165 | .ui-widget-content .ui-icon { |
| 166 | - background-image: url("images/ui-icons_222222_256x240.png")/*{iconsContent}*/; | |
| 166 | + background-image: url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_222222_256x240.png")/*{iconsContent}*/; | |
| 167 | 167 | } |
| 168 | 168 | .ui-widget-header .ui-icon { |
| 169 | - background-image: url("images/ui-icons_222222_256x240.png")/*{iconsHeader}*/; | |
| 169 | + background-image: url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_222222_256x240.png")/*{iconsHeader}*/; | |
| 170 | 170 | } |
| 171 | 171 | .ui-state-default .ui-icon { |
| 172 | - background-image: url("images/ui-icons_888888_256x240.png")/*{iconsDefault}*/; | |
| 172 | + background-image: url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_888888_256x240.png")/*{iconsDefault}*/; | |
| 173 | 173 | } |
| 174 | 174 | .ui-state-hover .ui-icon, |
| 175 | 175 | .ui-state-focus .ui-icon { |
| 176 | - background-image: url("images/ui-icons_454545_256x240.png")/*{iconsHover}*/; | |
| 176 | + background-image: url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_454545_256x240.png")/*{iconsHover}*/; | |
| 177 | 177 | } |
| 178 | 178 | .ui-state-active .ui-icon { |
| 179 | - background-image: url("images/ui-icons_454545_256x240.png")/*{iconsActive}*/; | |
| 179 | + background-image: url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_454545_256x240.png")/*{iconsActive}*/; | |
| 180 | 180 | } |
| 181 | 181 | .ui-state-highlight .ui-icon { |
| 182 | - background-image: url("images/ui-icons_2e83ff_256x240.png")/*{iconsHighlight}*/; | |
| 182 | + background-image: url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_2e83ff_256x240.png")/*{iconsHighlight}*/; | |
| 183 | 183 | } |
| 184 | 184 | .ui-state-error .ui-icon, |
| 185 | 185 | .ui-state-error-text .ui-icon { |
| 186 | - background-image: url("images/ui-icons_cd0a0a_256x240.png")/*{iconsError}*/; | |
| 186 | + background-image: url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_cd0a0a_256x240.png")/*{iconsError}*/; | |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | /* positioning */ |
| ... | ... | @@ -396,14 +396,14 @@ |
| 396 | 396 | |
| 397 | 397 | /* Overlays */ |
| 398 | 398 | .ui-widget-overlay { |
| 399 | - background: #aaaaaa/*{bgColorOverlay}*/ url("images/ui-bg_flat_0_aaaaaa_40x100.png")/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; | |
| 399 | + background: #aaaaaa/*{bgColorOverlay}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png")/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; | |
| 400 | 400 | opacity: .3/*{opacityOverlay}*/; |
| 401 | 401 | filter: Alpha(Opacity=30)/*{opacityFilterOverlay}*/; /* support: IE8 */ |
| 402 | 402 | } |
| 403 | 403 | .ui-widget-shadow { |
| 404 | 404 | margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; |
| 405 | 405 | padding: 8px/*{thicknessShadow}*/; |
| 406 | - background: #aaaaaa/*{bgColorShadow}*/ url("images/ui-bg_flat_0_aaaaaa_40x100.png")/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; | |
| 406 | + background: #aaaaaa/*{bgColorShadow}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png")/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; | |
| 407 | 407 | opacity: .3/*{opacityShadow}*/; |
| 408 | 408 | filter: Alpha(Opacity=30)/*{opacityFilterShadow}*/; /* support: IE8 */ |
| 409 | 409 | border-radius: 8px/*{cornerRadiusShadow}*/; | ... | ... |
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/tooltip.css
src/main/resources/static/real_control_v2/assets/plugins/jstree/default/style.css
| ... | ... | @@ -400,7 +400,7 @@ |
| 400 | 400 | } |
| 401 | 401 | .jstree-default .jstree-node, |
| 402 | 402 | .jstree-default .jstree-icon { |
| 403 | - background-image: url("32px.png"); | |
| 403 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/32px.png"); | |
| 404 | 404 | } |
| 405 | 405 | .jstree-default .jstree-node { |
| 406 | 406 | background-position: -292px -4px; |
| ... | ... | @@ -505,13 +505,13 @@ |
| 505 | 505 | background-position: 0 0; |
| 506 | 506 | } |
| 507 | 507 | .jstree-default > .jstree-container-ul .jstree-loading > .jstree-ocl { |
| 508 | - background: url("throbber.gif") center center no-repeat; | |
| 508 | + background: url("/real_control_v2/assets/plugins/jstree/default/throbber.gif") center center no-repeat; | |
| 509 | 509 | } |
| 510 | 510 | .jstree-default .jstree-file { |
| 511 | - background: url("32px.png") -100px -68px no-repeat; | |
| 511 | + background: url("/real_control_v2/assets/plugins/jstree/default/32px.png") -100px -68px no-repeat; | |
| 512 | 512 | } |
| 513 | 513 | .jstree-default .jstree-folder { |
| 514 | - background: url("32px.png") -260px -4px no-repeat; | |
| 514 | + background: url("/real_control_v2/assets/plugins/jstree/default/32px.png") -260px -4px no-repeat; | |
| 515 | 515 | } |
| 516 | 516 | .jstree-default > .jstree-container-ul > .jstree-node { |
| 517 | 517 | margin-left: 0; |
| ... | ... | @@ -523,7 +523,7 @@ |
| 523 | 523 | } |
| 524 | 524 | #jstree-dnd.jstree-default .jstree-ok, |
| 525 | 525 | #jstree-dnd.jstree-default .jstree-er { |
| 526 | - background-image: url("32px.png"); | |
| 526 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/32px.png"); | |
| 527 | 527 | background-repeat: no-repeat; |
| 528 | 528 | background-color: transparent; |
| 529 | 529 | } |
| ... | ... | @@ -573,7 +573,7 @@ |
| 573 | 573 | } |
| 574 | 574 | .jstree-default-small .jstree-node, |
| 575 | 575 | .jstree-default-small .jstree-icon { |
| 576 | - background-image: url("32px.png"); | |
| 576 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/32px.png"); | |
| 577 | 577 | } |
| 578 | 578 | .jstree-default-small .jstree-node { |
| 579 | 579 | background-position: -295px -7px; |
| ... | ... | @@ -678,13 +678,13 @@ |
| 678 | 678 | background-position: 0 0; |
| 679 | 679 | } |
| 680 | 680 | .jstree-default-small > .jstree-container-ul .jstree-loading > .jstree-ocl { |
| 681 | - background: url("throbber.gif") center center no-repeat; | |
| 681 | + background: url("/real_control_v2/assets/plugins/jstree/default/throbber.gif") center center no-repeat; | |
| 682 | 682 | } |
| 683 | 683 | .jstree-default-small .jstree-file { |
| 684 | - background: url("32px.png") -103px -71px no-repeat; | |
| 684 | + background: url("/real_control_v2/assets/plugins/jstree/default/32px.png") -103px -71px no-repeat; | |
| 685 | 685 | } |
| 686 | 686 | .jstree-default-small .jstree-folder { |
| 687 | - background: url("32px.png") -263px -7px no-repeat; | |
| 687 | + background: url("/real_control_v2/assets/plugins/jstree/default/32px.png") -263px -7px no-repeat; | |
| 688 | 688 | } |
| 689 | 689 | .jstree-default-small > .jstree-container-ul > .jstree-node { |
| 690 | 690 | margin-left: 0; |
| ... | ... | @@ -696,7 +696,7 @@ |
| 696 | 696 | } |
| 697 | 697 | #jstree-dnd.jstree-default-small .jstree-ok, |
| 698 | 698 | #jstree-dnd.jstree-default-small .jstree-er { |
| 699 | - background-image: url("32px.png"); | |
| 699 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/32px.png"); | |
| 700 | 700 | background-repeat: no-repeat; |
| 701 | 701 | background-color: transparent; |
| 702 | 702 | } |
| ... | ... | @@ -746,7 +746,7 @@ |
| 746 | 746 | } |
| 747 | 747 | .jstree-default-large .jstree-node, |
| 748 | 748 | .jstree-default-large .jstree-icon { |
| 749 | - background-image: url("32px.png"); | |
| 749 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/32px.png"); | |
| 750 | 750 | } |
| 751 | 751 | .jstree-default-large .jstree-node { |
| 752 | 752 | background-position: -288px 0px; |
| ... | ... | @@ -851,13 +851,13 @@ |
| 851 | 851 | background-position: 0 0; |
| 852 | 852 | } |
| 853 | 853 | .jstree-default-large > .jstree-container-ul .jstree-loading > .jstree-ocl { |
| 854 | - background: url("throbber.gif") center center no-repeat; | |
| 854 | + background: url("/real_control_v2/assets/plugins/jstree/default/throbber.gif") center center no-repeat; | |
| 855 | 855 | } |
| 856 | 856 | .jstree-default-large .jstree-file { |
| 857 | - background: url("32px.png") -96px -64px no-repeat; | |
| 857 | + background: url("/real_control_v2/assets/plugins/jstree/default/32px.png") -96px -64px no-repeat; | |
| 858 | 858 | } |
| 859 | 859 | .jstree-default-large .jstree-folder { |
| 860 | - background: url("32px.png") -256px 0px no-repeat; | |
| 860 | + background: url("/real_control_v2/assets/plugins/jstree/default/32px.png") -256px 0px no-repeat; | |
| 861 | 861 | } |
| 862 | 862 | .jstree-default-large > .jstree-container-ul > .jstree-node { |
| 863 | 863 | margin-left: 0; |
| ... | ... | @@ -869,7 +869,7 @@ |
| 869 | 869 | } |
| 870 | 870 | #jstree-dnd.jstree-default-large .jstree-ok, |
| 871 | 871 | #jstree-dnd.jstree-default-large .jstree-er { |
| 872 | - background-image: url("32px.png"); | |
| 872 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/32px.png"); | |
| 873 | 873 | background-repeat: no-repeat; |
| 874 | 874 | background-color: transparent; |
| 875 | 875 | } |
| ... | ... | @@ -904,12 +904,12 @@ |
| 904 | 904 | height: 40px; |
| 905 | 905 | } |
| 906 | 906 | #jstree-dnd.jstree-dnd-responsive > .jstree-ok { |
| 907 | - background-image: url("40px.png"); | |
| 907 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/40px.png"); | |
| 908 | 908 | background-position: 0 -200px; |
| 909 | 909 | background-size: 120px 240px; |
| 910 | 910 | } |
| 911 | 911 | #jstree-dnd.jstree-dnd-responsive > .jstree-er { |
| 912 | - background-image: url("40px.png"); | |
| 912 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/40px.png"); | |
| 913 | 913 | background-position: -40px -200px; |
| 914 | 914 | background-size: 120px 240px; |
| 915 | 915 | } |
| ... | ... | @@ -928,7 +928,7 @@ |
| 928 | 928 | */ |
| 929 | 929 | } |
| 930 | 930 | .jstree-default-responsive .jstree-icon { |
| 931 | - background-image: url("40px.png"); | |
| 931 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/40px.png"); | |
| 932 | 932 | } |
| 933 | 933 | .jstree-default-responsive .jstree-node, |
| 934 | 934 | .jstree-default-responsive .jstree-leaf > .jstree-ocl { |
| ... | ... | @@ -1032,7 +1032,7 @@ |
| 1032 | 1032 | .jstree-default-responsive .jstree-node > .jstree-ocl, |
| 1033 | 1033 | .jstree-default-responsive .jstree-themeicon, |
| 1034 | 1034 | .jstree-default-responsive .jstree-checkbox { |
| 1035 | - background-image: url("40px.png"); | |
| 1035 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/40px.png"); | |
| 1036 | 1036 | background-size: 120px 240px; |
| 1037 | 1037 | } |
| 1038 | 1038 | .jstree-default-responsive .jstree-node { |
| ... | ... | @@ -1054,11 +1054,11 @@ |
| 1054 | 1054 | background-position: 0 0; |
| 1055 | 1055 | } |
| 1056 | 1056 | .jstree-default-responsive .jstree-file { |
| 1057 | - background: url("40px.png") 0 -160px no-repeat; | |
| 1057 | + background: url("/real_control_v2/assets/plugins/jstree/default/40px.png") 0 -160px no-repeat; | |
| 1058 | 1058 | background-size: 120px 240px; |
| 1059 | 1059 | } |
| 1060 | 1060 | .jstree-default-responsive .jstree-folder { |
| 1061 | - background: url("40px.png") -40px -40px no-repeat; | |
| 1061 | + background: url("/real_control_v2/assets/plugins/jstree/default/40px.png") -40px -40px no-repeat; | |
| 1062 | 1062 | background-size: 120px 240px; |
| 1063 | 1063 | } |
| 1064 | 1064 | .jstree-default-responsive > .jstree-container-ul > .jstree-node { | ... | ... |
src/main/resources/static/real_control_v2/assets/plugins/jstree/default/style.min.css deleted
100644 → 0
| 1 | -.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#000;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-hidden,.jstree-node.jstree-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 #fff;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-default .jstree-anchor,.jstree-default .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default .jstree-hovered{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-context{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-clicked{background:#beebff;border-radius:2px;box-shadow:inset 0 0 1px #999}.jstree-default .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default .jstree-disabled{background:0 0;color:#666}.jstree-default .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-default .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;box-shadow:none}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#e7f4f9}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#e7f4f9}.jstree-default>.jstree-striped{min-width:100%;display:inline-block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-default>.jstree-wholerow-ul .jstree-hovered,.jstree-default>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-default .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default .jstree-wholerow-clicked{background:#beebff;background:-webkit-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:linear-gradient(to bottom,#beebff 0,#a8e4ff 100%)}.jstree-default .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default .jstree-anchor{line-height:24px;height:24px}.jstree-default .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default.jstree-rtl .jstree-node{margin-right:24px}.jstree-default .jstree-wholerow{height:24px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-image:url(32px.png)}.jstree-default .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default .jstree-last{background:0 0}.jstree-default .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default .jstree-themeicon{background-position:-260px -4px}.jstree-default>.jstree-no-dots .jstree-node,.jstree-default>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default .jstree-disabled{background:0 0}.jstree-default .jstree-disabled.jstree-hovered{background:0 0}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-checkbox{background-position:-164px -4px}.jstree-default .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default .jstree-checked>.jstree-checkbox{background-position:-228px -4px}.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default .jstree-checked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default>.jstree-striped{background-size:auto 48px}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default .jstree-file{background:url(32px.png) -100px -68px no-repeat}.jstree-default .jstree-folder{background:url(32px.png) -260px -4px no-repeat}.jstree-default>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default{line-height:24px;padding:0 4px}#jstree-dnd.jstree-default .jstree-ok,#jstree-dnd.jstree-default .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default i{background:0 0;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-default .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-default .jstree-er{background-position:-36px -68px}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-small .jstree-wholerow{height:18px}.jstree-default-small .jstree-node,.jstree-default-small .jstree-icon{background-image:url(32px.png)}.jstree-default-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-small .jstree-last{background:0 0}.jstree-default-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-small .jstree-themeicon{background-position:-263px -7px}.jstree-default-small>.jstree-no-dots .jstree-node,.jstree-default-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-small .jstree-disabled{background:0 0}.jstree-default-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-small .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-small>.jstree-striped{background-size:auto 36px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-small .jstree-file{background:url(32px.png) -103px -71px no-repeat}.jstree-default-small .jstree-folder{background:url(32px.png) -263px -7px no-repeat}.jstree-default-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-default-small .jstree-ok,#jstree-dnd.jstree-default-small .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-small i{background:0 0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-default-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-default-small .jstree-er{background-position:-39px -71px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-large .jstree-wholerow{height:32px}.jstree-default-large .jstree-node,.jstree-default-large .jstree-icon{background-image:url(32px.png)}.jstree-default-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-large .jstree-last{background:0 0}.jstree-default-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-large .jstree-themeicon{background-position:-256px 0}.jstree-default-large>.jstree-no-dots .jstree-node,.jstree-default-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-large .jstree-disabled{background:0 0}.jstree-default-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-large .jstree-checkbox{background-position:-160px 0}.jstree-default-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-large .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-large>.jstree-striped{background-size:auto 64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}.jstree-default-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-large .jstree-file{background:url(32px.png) -96px -64px no-repeat}.jstree-default-large .jstree-folder{background:url(32px.png) -256px 0 no-repeat}.jstree-default-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-default-large .jstree-ok,#jstree-dnd.jstree-default-large .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-large i{background:0 0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-default-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-default-large .jstree-er{background-position:-32px -64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0 0;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(40px.png);background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(40px.png);background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-default-responsive .jstree-icon{background-image:url(40px.png)}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px;background:0 0}.jstree-default-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-responsive .jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-size:120px 240px}.jstree-default-responsive .jstree-leaf>.jstree-ocl,.jstree-default-responsive.jstree-rtl .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-default-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.jstree-default-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}.jstree-default-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-responsive .jstree-checked>.jstree-checkbox,.jstree-default-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-responsive .jstree-anchor{font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}.jstree-default-responsive>.jstree-striped{background:0 0}.jstree-default-responsive .jstree-wholerow{border-top:1px solid rgba(255,255,255,.7);border-bottom:1px solid rgba(64,64,64,.2);background:#ebebeb;height:40px}.jstree-default-responsive .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default-responsive .jstree-wholerow-clicked{background:#beebff}.jstree-default-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666}.jstree-default-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #666;border-top:0}.jstree-default-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-node>.jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-image:url(40px.png);background-size:120px 240px}.jstree-default-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-responsive .jstree-last{background:0 0}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-responsive .jstree-file{background:url(40px.png) 0 -160px no-repeat;background-size:120px 240px}.jstree-default-responsive .jstree-folder{background:url(40px.png) -40px -40px no-repeat;background-size:120px 240px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}} | |
| 2 | 0 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css
0 → 100644
| 1 | +/* perfect-scrollbar v0.6.16 */ | |
| 2 | +.ps-container { | |
| 3 | + -ms-touch-action: auto; | |
| 4 | + touch-action: auto; | |
| 5 | + overflow: hidden !important; | |
| 6 | + -ms-overflow-style: none; } | |
| 7 | + @supports (-ms-overflow-style: none) { | |
| 8 | + .ps-container { | |
| 9 | + overflow: auto !important; } } | |
| 10 | + @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | |
| 11 | + .ps-container { | |
| 12 | + overflow: auto !important; } } | |
| 13 | + .ps-container.ps-active-x > .ps-scrollbar-x-rail, | |
| 14 | + .ps-container.ps-active-y > .ps-scrollbar-y-rail { | |
| 15 | + display: block; | |
| 16 | + background-color: transparent; } | |
| 17 | + .ps-container.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail { | |
| 18 | + background-color: #eee; | |
| 19 | + opacity: 0.9; } | |
| 20 | + .ps-container.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail > .ps-scrollbar-x { | |
| 21 | + background-color: #999; | |
| 22 | + height: 11px; } | |
| 23 | + .ps-container.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail { | |
| 24 | + background-color: #eee; | |
| 25 | + opacity: 0.9; } | |
| 26 | + .ps-container.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail > .ps-scrollbar-y { | |
| 27 | + background-color: #999; | |
| 28 | + width: 11px; } | |
| 29 | + .ps-container > .ps-scrollbar-x-rail { | |
| 30 | + display: none; | |
| 31 | + position: absolute; | |
| 32 | + /* please don't change 'position' */ | |
| 33 | + opacity: 0; | |
| 34 | + -webkit-transition: background-color .2s linear, opacity .2s linear; | |
| 35 | + -o-transition: background-color .2s linear, opacity .2s linear; | |
| 36 | + -moz-transition: background-color .2s linear, opacity .2s linear; | |
| 37 | + transition: background-color .2s linear, opacity .2s linear; | |
| 38 | + bottom: 0px; | |
| 39 | + /* there must be 'bottom' for ps-scrollbar-x-rail */ | |
| 40 | + height: 15px; } | |
| 41 | + .ps-container > .ps-scrollbar-x-rail > .ps-scrollbar-x { | |
| 42 | + position: absolute; | |
| 43 | + /* please don't change 'position' */ | |
| 44 | + background-color: #aaa; | |
| 45 | + -webkit-border-radius: 6px; | |
| 46 | + -moz-border-radius: 6px; | |
| 47 | + border-radius: 6px; | |
| 48 | + -webkit-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out; | |
| 49 | + transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out; | |
| 50 | + -o-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out; | |
| 51 | + -moz-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out; | |
| 52 | + transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out; | |
| 53 | + transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out; | |
| 54 | + bottom: 2px; | |
| 55 | + /* there must be 'bottom' for ps-scrollbar-x */ | |
| 56 | + height: 6px; } | |
| 57 | + .ps-container > .ps-scrollbar-x-rail:hover > .ps-scrollbar-x, .ps-container > .ps-scrollbar-x-rail:active > .ps-scrollbar-x { | |
| 58 | + height: 11px; } | |
| 59 | + .ps-container > .ps-scrollbar-y-rail { | |
| 60 | + display: none; | |
| 61 | + position: absolute; | |
| 62 | + /* please don't change 'position' */ | |
| 63 | + opacity: 0; | |
| 64 | + -webkit-transition: background-color .2s linear, opacity .2s linear; | |
| 65 | + -o-transition: background-color .2s linear, opacity .2s linear; | |
| 66 | + -moz-transition: background-color .2s linear, opacity .2s linear; | |
| 67 | + transition: background-color .2s linear, opacity .2s linear; | |
| 68 | + right: 0; | |
| 69 | + /* there must be 'right' for ps-scrollbar-y-rail */ | |
| 70 | + width: 15px; } | |
| 71 | + .ps-container > .ps-scrollbar-y-rail > .ps-scrollbar-y { | |
| 72 | + position: absolute; | |
| 73 | + /* please don't change 'position' */ | |
| 74 | + background-color: #aaa; | |
| 75 | + -webkit-border-radius: 6px; | |
| 76 | + -moz-border-radius: 6px; | |
| 77 | + border-radius: 6px; | |
| 78 | + -webkit-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out; | |
| 79 | + transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out; | |
| 80 | + -o-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out; | |
| 81 | + -moz-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out; | |
| 82 | + transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out; | |
| 83 | + transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out; | |
| 84 | + right: 2px; | |
| 85 | + /* there must be 'right' for ps-scrollbar-y */ | |
| 86 | + width: 6px; } | |
| 87 | + .ps-container > .ps-scrollbar-y-rail:hover > .ps-scrollbar-y, .ps-container > .ps-scrollbar-y-rail:active > .ps-scrollbar-y { | |
| 88 | + width: 11px; } | |
| 89 | + .ps-container:hover.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail { | |
| 90 | + background-color: #eee; | |
| 91 | + opacity: 0.9; } | |
| 92 | + .ps-container:hover.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail > .ps-scrollbar-x { | |
| 93 | + background-color: #999; | |
| 94 | + height: 11px; } | |
| 95 | + .ps-container:hover.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail { | |
| 96 | + background-color: #eee; | |
| 97 | + opacity: 0.9; } | |
| 98 | + .ps-container:hover.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail > .ps-scrollbar-y { | |
| 99 | + background-color: #999; | |
| 100 | + width: 11px; } | |
| 101 | + .ps-container:hover > .ps-scrollbar-x-rail, | |
| 102 | + .ps-container:hover > .ps-scrollbar-y-rail { | |
| 103 | + opacity: 0.6; } | |
| 104 | + .ps-container:hover > .ps-scrollbar-x-rail:hover { | |
| 105 | + background-color: #eee; | |
| 106 | + opacity: 0.9; } | |
| 107 | + .ps-container:hover > .ps-scrollbar-x-rail:hover > .ps-scrollbar-x { | |
| 108 | + background-color: #999; } | |
| 109 | + .ps-container:hover > .ps-scrollbar-y-rail:hover { | |
| 110 | + background-color: #eee; | |
| 111 | + opacity: 0.9; } | |
| 112 | + .ps-container:hover > .ps-scrollbar-y-rail:hover > .ps-scrollbar-y { | |
| 113 | + background-color: #999; } | ... | ... |