JeecgBoot2.3 里程碑版本,支持微服务和单体自由切换、提供新行编辑表格JVXETable

This commit is contained in:
zhangdaiscott 2020-09-11 18:15:43 +08:00
parent 0a315b9abb
commit aad242ae02
198 changed files with 228543 additions and 1 deletions

View File

@ -1,5 +1,4 @@
/target/
/.idea/
*.iml
jeecg-boot-module-demo
rebel.xml

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>jeecg-boot-parent</artifactId>
<groupId>org.jeecgframework.boot</groupId>
<version>2.3.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jeecg-boot-module-demo</artifactId>
<dependencies>
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-base-common</artifactId>
</dependency>
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-system-local-api</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,20 @@
//package org.jeecg;
//
//import org.springframework.boot.SpringApplication;
//import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
//import org.springframework.boot.autoconfigure.SpringBootApplication;
//import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
//import org.springframework.cloud.openfeign.EnableFeignClients;
//
//import java.net.UnknownHostException;
//
//@SpringBootApplication
//@EnableDiscoveryClient
//@EnableFeignClients
//@EnableAutoConfiguration(exclude={org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class})
//public class JeecgDemoApplication {
//
// public static void main(String[] args) throws UnknownHostException {
// SpringApplication.run(JeecgDemoApplication.class, args);
// }
//}

View File

@ -0,0 +1,204 @@
package org.jeecg.modules.demo.mock;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.swing.filechooser.FileSystemView;
import org.apache.commons.io.IOUtils;
import org.jeecg.common.api.vo.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import lombok.extern.slf4j.Slf4j;
@RestController
@RequestMapping("/api")
@Slf4j
public class MockController {
private final String JSON_PATH = "classpath:org/jeecg/modules/demo/mock/json";
/**
* 通用json访问接口
* 格式 http://localhost:8080/jeecg-boot/api/json/{filename}
* @param filename
* @return
*/
@RequestMapping(value = "/json/{filename}", method = RequestMethod.GET)
public String getJsonData(@PathVariable String filename) {
String jsonpath = "classpath:org/jeecg/modules/demo/mock/json/"+filename+".json";
return readJson(jsonpath);
}
@GetMapping(value = "/asynTreeList")
public String asynTreeList(String id) {
return readJson(JSON_PATH + "/asyn_tree_list_" + id + ".json");
}
@GetMapping(value = "/user")
public String user() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/user.json");
}
/**
* 老的登录获取用户信息接口
* @return
*/
@GetMapping(value = "/user/info")
public String userInfo() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/user_info.json");
}
@GetMapping(value = "/role")
public String role() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/role.json");
}
@GetMapping(value = "/service")
public String service() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/service.json");
}
@GetMapping(value = "/permission")
public String permission() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/permission.json");
}
@GetMapping(value = "/permission/no-pager")
public String permission_no_page() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/permission_no_page.json");
}
/**
* 省市县
*/
@GetMapping(value = "/area")
public String area() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/area.json");
}
/**
* 测试报表数据
*/
@GetMapping(value = "/report/getYearCountInfo")
public String getYearCountInfo() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/getCntrNoCountInfo.json");
}
@GetMapping(value = "/report/getMonthCountInfo")
public String getMonthCountInfo() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/getCntrNoCountInfo.json");
}
@GetMapping(value = "/report/getCntrNoCountInfo")
public String getCntrNoCountInfo() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/getCntrNoCountInfo.json");
}
@GetMapping(value = "/report/getCabinetCountInfo")
public String getCabinetCountInfo() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/getCntrNoCountInfo.json");
}
/**
* 实时磁盘监控
* @param request
* @param response
* @return
*/
@GetMapping("/queryDiskInfo")
public Result<List<Map<String,Object>>> queryDiskInfo(HttpServletRequest request, HttpServletResponse response){
Result<List<Map<String,Object>>> res = new Result<>();
try {
// 当前文件系统类
FileSystemView fsv = FileSystemView.getFileSystemView();
// 列出所有windows 磁盘
File[] fs = File.listRoots();
log.info("查询磁盘信息:"+fs.length+"");
List<Map<String,Object>> list = new ArrayList<>();
for (int i = 0; i < fs.length; i++) {
if(fs[i].getTotalSpace()==0) {
continue;
}
Map<String,Object> map = new HashMap<>();
map.put("name", fsv.getSystemDisplayName(fs[i]));
map.put("max", fs[i].getTotalSpace());
map.put("rest", fs[i].getFreeSpace());
map.put("restPPT", fs[i].getFreeSpace()*100/fs[i].getTotalSpace());
list.add(map);
log.info(map.toString());
}
res.setResult(list);
res.success("查询成功");
} catch (Exception e) {
res.error500("查询失败"+e.getMessage());
}
return res;
}
//-------------------------------------------------------------------------------------------
/**
* 工作台首页的数据
* @return
*/
@GetMapping(value = "/list/search/projects")
public String projects() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/workplace_projects.json");
}
@GetMapping(value = "/workplace/activity")
public String activity() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/workplace_activity.json");
}
@GetMapping(value = "/workplace/teams")
public String teams() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/workplace_teams.json");
}
@GetMapping(value = "/workplace/radar")
public String radar() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/workplace_radar.json");
}
@GetMapping(value = "/task/process")
public String taskProcess() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/task_process.json");
}
//-------------------------------------------------------------------------------------------
//author:lvdandan-----date20190315---for:添加数据日志json----
public String sysDataLogJson() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/sysdatalog.json");
}
//author:lvdandan-----date20190315---for:添加数据日志json----
/**
* 读取json格式文件
* @param jsonSrc
* @return
*/
private String readJson(String jsonSrc) {
String json = "";
try {
//File jsonFile = ResourceUtils.getFile(jsonSrc);
//json = FileUtils.re.readFileToString(jsonFile);
//换个写法解决springboot读取jar包中文件的问题
InputStream stream = getClass().getClassLoader().getResourceAsStream(jsonSrc.replace("classpath:", ""));
json = IOUtils.toString(stream,"UTF-8");
} catch (IOException e) {
log.error(e.getMessage(),e);
}
return json;
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,36 @@
[
{"value": "110000", "label": "北京市"},
{"value": "120000", "label": "天津市"},
{"value": "130000", "label": "河北省"},
{"value": "140000", "label": "山西省"},
{"value": "150000", "label": "内蒙古自治区"},
{"value": "210000", "label": "辽宁省"},
{"value": "220000", "label": "吉林省"},
{"value": "230000", "label": "黑龙江省"},
{"value": "310000", "label": "上海市"},
{"value": "320000", "label": "江苏省"},
{"value": "330000", "label": "浙江省"},
{"value": "340000", "label": "安徽省"},
{"value": "350000", "label": "福建省"},
{"value": "360000", "label": "江西省"},
{"value": "370000", "label": "山东省"},
{"value": "410000", "label": "河南省"},
{"value": "420000", "label": "湖北省"},
{"value": "430000", "label": "湖南省"},
{"value": "440000", "label": "广东省"},
{"value": "450000", "label": "广西壮族自治区"},
{"value": "460000", "label": "海南省"},
{"value": "500000", "label": "重庆市"},
{"value": "510000", "label": "四川省"},
{"value": "520000", "label": "贵州省"},
{"value": "530000", "label": "云南省"},
{"value": "540000", "label": "西藏自治区"},
{"value": "610000", "label": "陕西省"},
{"value": "620000", "label": "甘肃省"},
{"value": "630000", "label": "青海省"},
{"value": "640000", "label": "宁夏回族自治区"},
{"value": "650000", "label": "新疆维吾尔自治区"},
{"value": "710000", "label": "台湾省"},
{"value": "810000", "label": "香港特别行政区"},
{"value": "820000", "label": "澳门特别行政区"}
]

View File

@ -0,0 +1,29 @@
{
"status": 200,
"success": true,
"message": "ok",
"result": [
{
"id": 1,
"name": "首页",
"component": "dashboard/Analysis",
"orderNum": 1,
"hasChildren": false
},
{
"id": 2,
"name": "常见案例",
"component": "layouts/RouteView",
"orderNum": 2,
"hasChildren": true
},
{
"id": 3,
"name": "系统监控",
"component": "layouts/RouteView",
"orderNum": 3,
"hasChildren": true
}
],
"timestamp": 1554950583837
}

View File

@ -0,0 +1,29 @@
{
"status": 200,
"success": true,
"message": "ok",
"result": [
{
"id": 11,
"name": "首页",
"component": "dashboard/Analysis",
"orderNum": 1,
"hasChildren": false
},
{
"id": 12,
"name": "系统管理",
"component": "layouts/RouteView",
"orderNum": 2,
"hasChildren": true
},
{
"id": 13,
"name": "常见案例",
"component": "layouts/RouteView",
"orderNum": 3,
"hasChildren": true
}
],
"timestamp": 1554950583837
}

View File

@ -0,0 +1,29 @@
{
"status": 200,
"success": true,
"message": "ok",
"result": [
{
"id": 21,
"name": "弹框选择Demo",
"component": "jeecg/SelectDemo",
"orderNum": 1,
"hasChildren": false
},
{
"id": 22,
"name": "单表模型示例",
"component": "jeecg/JeecgDemoList",
"orderNum": 2,
"hasChildren": false
},
{
"id": 23,
"name": "一对多Tab示例",
"component": "jeecg/tablist/JeecgOrderDMainList",
"orderNum": 3,
"hasChildren": false
}
],
"timestamp": 1554950583837
}

View File

@ -0,0 +1,29 @@
{
"status": 200,
"success": true,
"message": "ok",
"result": [
{
"id": 31,
"name": "性能监控",
"component": "layouts/RouteView",
"orderNum": 1,
"hasChildren": true
},
{
"id": 32,
"name": "在线文档",
"component": "layouts/IframePageView",
"orderNum": 2,
"hasChildren": false
},
{
"id": 33,
"name": "工作台",
"component": "dashboard/Workplace",
"orderNum": 3,
"hasChildren": false
}
],
"timestamp": 1554950583837
}

View File

@ -0,0 +1,29 @@
{
"status": 200,
"success": true,
"message": "ok",
"result": [
{
"id": 311,
"name": "Redis监控",
"component": "modules/monitor/RedisInfo",
"orderNum": 1,
"hasChildren": false
},
{
"id": 312,
"name": "JVM信息",
"component": "modules/monitor/JvmInfo",
"orderNum": 2,
"hasChildren": false
},
{
"id": 313,
"name": "Tomcat信息",
"component": "modules/monitor/TomcatInfo",
"orderNum": 3,
"hasChildren": false
}
],
"timestamp": 1554950583837
}

View File

@ -0,0 +1,63 @@
{
"success": true,
"message": "查询成功",
"code": null,
"result": [
{
"resultIndex": 0,
"yearcount": 623,
"year": 2016,
"month": "四月",
"monthcount": 3255,
"classifyname": "证明类",
"cntrnocount": 24,
"cabinetname": "一号柜",
"cabinetcocunt": 12
},
{
"resultIndex": 1,
"yearcount": 243,
"year": 2017,
"month": "五月",
"monthcount": 5673,
"classifyname": "产权类",
"cntrnocount": 52,
"cabinetname": "二号柜",
"cabinetcocunt": 52
},
{
"resultIndex": 2,
"yearcount": 345,
"year": 2018,
"month": "六月",
"monthcount": 2673,
"classifyname": "知识类",
"cntrnocount": 85,
"cabinetname": "三号柜",
"cabinetcocunt": 24
},
{
"resultIndex": 3,
"yearcount": 452,
"year": 2019,
"month": "七月",
"monthcount": 2341,
"classifyname": "技术类",
"cntrnocount": 67,
"cabinetname": "四号柜",
"cabinetcocunt": 45
},
{
"resultIndex": 4,
"yearcount": 645,
"year": 2020,
"month": "八月",
"monthcount": 7473,
"classifyname": "工具类",
"cntrnocount": 93,
"cabinetname": "五号柜",
"cabinetcocunt": 94
}
],
"timestamp": 1554285003594
}

View File

@ -0,0 +1,50 @@
{
"status": 200,
"success": true,
"message": "ok",
"result": {
"data": [
{
"id": 0,
"x": "1",
"y": 889
},
{
"id": 1,
"x": "2",
"y": 341
},
{
"id": 2,
"x": "3",
"y": 1028
},
{
"id": 3,
"x": "4",
"y": 1168
},
{
"id": 4,
"x": "5",
"y": 653
},
{
"id": 5,
"x": "6",
"y": 863
},
{
"id": 6,
"x": "7",
"y": 421
},
{
"id": 7,
"x": "8",
"y": 1320
}
]
},
"timestamp": 1554950583837
}

View File

@ -0,0 +1,156 @@
{
"message": "",
"result": {
"data": [
{
"id": "marketing",
"name": "营销管理",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"sptDaTypes": null,
"optionalFields": null,
"parents": null,
"type": null,
"deleted": 0,
"actions": [
"add",
"query",
"get",
"update",
"delete"
]
},
{
"id": "member",
"name": "会员管理",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"sptDaTypes": null,
"optionalFields": "[]",
"parents": null,
"type": "default",
"deleted": 0,
"actions": [
"add",
"query",
"get",
"update",
"delete"
]
},
{
"id": "menu",
"name": "菜单管理",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"import\",\"defaultCheck\":false,\"describe\":\"导入\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"}]",
"sptDaTypes": null,
"optionalFields": "[]",
"parents": null,
"type": "default",
"deleted": 0,
"actions": [
"add",
"import",
"get",
"update"
]
},
{
"id": "order",
"name": "订单管理",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"sptDaTypes": null,
"optionalFields": "[]",
"parents": null,
"type": "default",
"deleted": 0,
"actions": [
"add",
"query",
"get",
"update",
"delete"
]
},
{
"id": "permission",
"name": "权限管理",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"sptDaTypes": null,
"optionalFields": "[]",
"parents": null,
"type": "default",
"deleted": 0,
"actions": [
"add",
"get",
"update",
"delete"
]
},
{
"id": "role",
"name": "角色管理",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"sptDaTypes": null,
"optionalFields": "[]",
"parents": null,
"type": "default",
"deleted": 0,
"actions": [
"add",
"get",
"update",
"delete"
]
},
{
"id": "test",
"name": "测试权限",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"}]",
"sptDaTypes": null,
"optionalFields": "[]",
"parents": null,
"type": "default",
"deleted": 0,
"actions": [
"add",
"get"
]
},
{
"id": "user",
"name": "用户管理",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"add\",\"describe\":\"新增\",\"defaultCheck\":false},{\"action\":\"get\",\"describe\":\"查询\",\"defaultCheck\":false}]",
"sptDaTypes": null,
"optionalFields": "[]",
"parents": null,
"type": "default",
"deleted": 0,
"actions": [
"add",
"get"
]
}
],
"pageSize": 10,
"pageNo": 0,
"totalPage": 1,
"totalCount": 5
},
"status": 200,
"timestamp": 1537082021471
}

View File

@ -0,0 +1,150 @@
{
"message": "",
"result": [
{
"id": "marketing",
"name": "营销管理",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"sptDaTypes": null,
"optionalFields": null,
"parents": null,
"type": null,
"deleted": 0,
"actions": [
"add",
"query",
"get",
"update",
"delete"
]
},
{
"id": "member",
"name": "会员管理",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"sptDaTypes": null,
"optionalFields": "[]",
"parents": null,
"type": "default",
"deleted": 0,
"actions": [
"add",
"query",
"get",
"update",
"delete"
]
},
{
"id": "menu",
"name": "菜单管理",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"import\",\"defaultCheck\":false,\"describe\":\"导入\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"}]",
"sptDaTypes": null,
"optionalFields": "[]",
"parents": null,
"type": "default",
"deleted": 0,
"actions": [
"add",
"import",
"get",
"update"
]
},
{
"id": "order",
"name": "订单管理",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"sptDaTypes": null,
"optionalFields": "[]",
"parents": null,
"type": "default",
"deleted": 0,
"actions": [
"add",
"query",
"get",
"update",
"delete"
]
},
{
"id": "permission",
"name": "权限管理",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"sptDaTypes": null,
"optionalFields": "[]",
"parents": null,
"type": "default",
"deleted": 0,
"actions": [
"add",
"get",
"update",
"delete"
]
},
{
"id": "role",
"name": "角色管理",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"sptDaTypes": null,
"optionalFields": "[]",
"parents": null,
"type": "default",
"deleted": 0,
"actions": [
"add",
"get",
"update",
"delete"
]
},
{
"id": "test",
"name": "测试权限",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"}]",
"sptDaTypes": null,
"optionalFields": "[]",
"parents": null,
"type": "default",
"deleted": 0,
"actions": [
"add",
"get"
]
},
{
"id": "user",
"name": "用户管理",
"describe": null,
"status": 1,
"actionData": "[{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"},{\"action\":\"import\",\"defaultCheck\":false,\"describe\":\"导入\"},{\"action\":\"export\",\"defaultCheck\":false,\"describe\":\"导出\"}]",
"sptDaTypes": null,
"optionalFields": "[]",
"parents": null,
"type": "default",
"deleted": 0,
"actions": [
"add",
"get"
]
}
],
"status": 200,
"timestamp": 1537082021471
}

View File

@ -0,0 +1,608 @@
{
"message": "",
"result": {
"data": [
{
"id": "admin",
"name": "管理员",
"describe": "拥有所有权限",
"status": 1,
"creatorId": "system",
"createTime": 1497160610259,
"deleted": 0,
"permissions": [
{
"roleId": "admin",
"permissionId": "comment",
"permissionName": "评论管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "member",
"permissionName": "会员管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "menu",
"permissionName": "菜单管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"import\",\"defaultCheck\":false,\"describe\":\"导入\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "import",
"describe": "导入",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "order",
"permissionName": "订单管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "permission",
"permissionName": "权限管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "role",
"permissionName": "角色管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "test",
"permissionName": "测试权限",
"actions": "[]",
"actionEntitySet": [],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "user",
"permissionName": "用户管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"import\",\"defaultCheck\":false,\"describe\":\"导入\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"},{\"action\":\"export\",\"defaultCheck\":false,\"describe\":\"导出\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "import",
"describe": "导入",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
},
{
"action": "export",
"describe": "导出",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
}
]
},
{
"id": "svip",
"name": "SVIP",
"describe": "超级会员",
"status": 1,
"creatorId": "system",
"createTime": 1532417744846,
"deleted": 0,
"permissions": [
{
"roleId": "admin",
"permissionId": "comment",
"permissionName": "评论管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "member",
"permissionName": "会员管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "menu",
"permissionName": "菜单管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"import\",\"defaultCheck\":false,\"describe\":\"导入\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "import",
"describe": "导入",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "order",
"permissionName": "订单管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "permission",
"permissionName": "权限管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "role",
"permissionName": "角色管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "test",
"permissionName": "测试权限",
"actions": "[]",
"actionEntitySet": [],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "user",
"permissionName": "用户管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"import\",\"defaultCheck\":false,\"describe\":\"导入\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"},{\"action\":\"export\",\"defaultCheck\":false,\"describe\":\"导出\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "import",
"describe": "导入",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
}
]
},
{
"id": "user",
"name": "普通会员",
"describe": "普通用户,只能查询",
"status": 1,
"creatorId": "system",
"createTime": 1497160610259,
"deleted": 0,
"permissions": [
{
"roleId": "user",
"permissionId": "comment",
"permissionName": "评论管理",
"actions": "[{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"}]",
"actionEntitySet": [
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "user",
"permissionId": "marketing",
"permissionName": "营销管理",
"actions": "[]",
"actionEntitySet": [],
"actionList": null,
"dataAccess": null
},
{
"roleId": "user",
"permissionId": "member",
"permissionName": "会员管理",
"actions": "[{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"}]",
"actionEntitySet": [
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "user",
"permissionId": "menu",
"permissionName": "菜单管理",
"actions": "[]",
"actionEntitySet": [],
"actionList": null,
"dataAccess": null
},
{
"roleId": "user",
"permissionId": "order",
"permissionName": "订单管理",
"actions": "[{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"}]",
"actionEntitySet": [
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "user",
"permissionId": "permission",
"permissionName": "权限管理",
"actions": "[]",
"actionEntitySet": [],
"actionList": null,
"dataAccess": null
},
{
"roleId": "user",
"permissionId": "role",
"permissionName": "角色管理",
"actions": "[]",
"actionEntitySet": [],
"actionList": null,
"dataAccess": null
},
{
"roleId": "user",
"permissionId": "test",
"permissionName": "测试权限",
"actions": "[]",
"actionEntitySet": [],
"actionList": null,
"dataAccess": null
},
{
"roleId": "user",
"permissionId": "user",
"permissionName": "用户管理",
"actions": "[]",
"actionEntitySet": [],
"actionList": null,
"dataAccess": null
}
]
}
],
"pageSize": 10,
"pageNo": 0,
"totalPage": 1,
"totalCount": 5
},
"status": 200,
"timestamp": 1537079497645
}

View File

@ -0,0 +1,103 @@
{
"message": "",
"result": {
"pageSize": 10,
"pageNo": 0,
"totalCount": 57,
"totalPage": 6,
"data": [
{
"key": 1,
"no": "No 1",
"description": "这是一段描述",
"callNo": 127,
"status": 2,
"updatedAt": "1970-06-24 11:51:20",
"editable": false
},
{
"key": 2,
"no": "No 2",
"description": "这是一段描述",
"callNo": 573,
"status": 2,
"updatedAt": "1994-12-11 00:37:35",
"editable": false
},
{
"key": 3,
"no": "No 3",
"description": "这是一段描述",
"callNo": 869,
"status": 2,
"updatedAt": "2013-11-11 08:04:03",
"editable": false
},
{
"key": 4,
"no": "No 4",
"description": "这是一段描述",
"callNo": 26,
"status": 2,
"updatedAt": "1990-11-04 15:41:42",
"editable": false
},
{
"key": 5,
"no": "No 5",
"description": "这是一段描述",
"callNo": 20,
"status": 2,
"updatedAt": "1970-01-05 11:04:56",
"editable": false
},
{
"key": 6,
"no": "No 6",
"description": "这是一段描述",
"callNo": 675,
"status": 2,
"updatedAt": "1983-06-06 04:09:04",
"editable": false
},
{
"key": 7,
"no": "No 7",
"description": "这是一段描述",
"callNo": 512,
"status": 3,
"updatedAt": "1996-08-26 21:47:44",
"editable": false
},
{
"key": 8,
"no": "No 8",
"description": "这是一段描述",
"callNo": 962,
"status": 2,
"updatedAt": "2004-08-15 23:15:22",
"editable": false
},
{
"key": 9,
"no": "No 9",
"description": "这是一段描述",
"callNo": 318,
"status": 3,
"updatedAt": "1988-08-10 14:36:35",
"editable": false
},
{
"key": 10,
"no": "No 10",
"description": "这是一段描述",
"callNo": 789,
"status": 0,
"updatedAt": "1988-12-27 23:39:41",
"editable": false
}
]
},
"status": 200,
"timestamp": 1534955098193
}

View File

@ -0,0 +1,12 @@
{
"mobilePhone":"1872222222",
"officePhone":"1222222",
"email":"",
"createDate":"Jun 23, 2016 12:00:00 PM",
"sex":"1",
"depId":"402880e447e99cf10147e9a03b320003",
"userName":"9001",
"status":"1",
"content":"111",
"id":"4028ef81550c1a7901550c1cd6e70001"
}

View File

@ -0,0 +1,55 @@
{
"success": true,
"message": "操作成功!",
"code": 0,
"result": {
"records": [
{
"taskId": "48701",
"name": "start",
"taskBeginTime": "2019-03-07 09:33:04",
"taskEndTime": "2019-03-08 04:03:01",
"principal": "测试体验账号",
"result": "已完成"
},
{
"taskId": "48702",
"name": "部门领导审批",
"taskBeginTime": "2019-03-07 09:33:04",
"taskEndTime": "2019-03-08 04:03:01",
"principal": "测试体验账号",
"result": "已完成"
},
{
"taskId": "48703",
"name": "调整申请",
"taskBeginTime": "2019-03-07 09:33:04",
"taskEndTime": "2019-03-08 04:03:01",
"principal": "测试体验账号",
"result": "已完成"
},
{
"taskId": "48704",
"name": "人事审批",
"taskBeginTime": "2019-03-07 09:33:04",
"taskEndTime": "2019-03-08 04:03:01",
"principal": "测试体验账号",
"result": "已完成"
},
{
"taskId": "48705",
"name": "end",
"taskBeginTime": "2019-03-07 09:33:04",
"taskEndTime": "2019-03-08 04:03:01",
"principal": "测试体验账号",
"result": "已完成"
}
],
"total": 0,
"size": 10,
"current": 1,
"searchCount": true,
"pages": 0
},
"timestamp": 1551922394641
}

View File

@ -0,0 +1,407 @@
{
"message": "",
"result": {
"id": "4291d7da9005377ec9aec4a71ea837f",
"name": "天野远子",
"username": "admin",
"password": "",
"avatar": "/avatar2.jpg",
"status": 1,
"telephone": "",
"lastLoginIp": "27.154.74.117",
"lastLoginTime": 1534837621348,
"creatorId": "admin",
"createTime": 1497160610259,
"merchantCode": "TLif2btpzg079h15bk",
"deleted": 0,
"roleId": "admin",
"role": {
"id": "admin",
"name": "管理员",
"describe": "拥有所有权限",
"status": 1,
"creatorId": "system",
"createTime": 1497160610259,
"deleted": 0,
"permissions": [
{
"roleId": "admin",
"permissionId": "dashboard",
"permissionName": "仪表盘",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "exception",
"permissionName": "异常页面权限",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "result",
"permissionName": "结果权限",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "profile",
"permissionName": "详细页权限",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "table",
"permissionName": "表格权限",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"import\",\"defaultCheck\":false,\"describe\":\"导入\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "import",
"describe": "导入",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "form",
"permissionName": "表单权限",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "order",
"permissionName": "订单管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "permission",
"permissionName": "权限管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "role",
"permissionName": "角色管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "table",
"permissionName": "桌子管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"query\",\"defaultCheck\":false,\"describe\":\"查询\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "query",
"describe": "查询",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
},
{
"roleId": "admin",
"permissionId": "user",
"permissionName": "用户管理",
"actions": "[{\"action\":\"add\",\"defaultCheck\":false,\"describe\":\"新增\"},{\"action\":\"import\",\"defaultCheck\":false,\"describe\":\"导入\"},{\"action\":\"get\",\"defaultCheck\":false,\"describe\":\"详情\"},{\"action\":\"update\",\"defaultCheck\":false,\"describe\":\"修改\"},{\"action\":\"delete\",\"defaultCheck\":false,\"describe\":\"删除\"},{\"action\":\"export\",\"defaultCheck\":false,\"describe\":\"导出\"}]",
"actionEntitySet": [
{
"action": "add",
"describe": "新增",
"defaultCheck": false
},
{
"action": "import",
"describe": "导入",
"defaultCheck": false
},
{
"action": "get",
"describe": "详情",
"defaultCheck": false
},
{
"action": "update",
"describe": "修改",
"defaultCheck": false
},
{
"action": "delete",
"describe": "删除",
"defaultCheck": false
},
{
"action": "export",
"describe": "导出",
"defaultCheck": false
}
],
"actionList": null,
"dataAccess": null
}
]
}
},
"status": 200,
"timestamp": 1534844188679
}

View File

@ -0,0 +1,85 @@
{
"message": "",
"result": [
{
"id": 1,
"user": {
"nickname": "Barbara Lee",
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png"
},
"project": {
"name": "白鹭酱油开发组",
"action": "更新",
"event": "番组计划"
},
"time": "2018-08-23 14:47:00"
},
{
"id": 1,
"user": {
"nickname": "蓝莓酱",
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/jZUIxmJycoymBprLOUbT.png"
},
"project": {
"name": "白鹭酱油开发组",
"action": "更新",
"event": "番组计划"
},
"time": "2018-08-23 09:35:37"
},
{
"id": 1,
"user": {
"nickname": "Brian Young",
"avatar": "http://dummyimage.com/64x64"
},
"project": {
"name": "白鹭酱油开发组",
"action": "创建",
"event": "番组计划"
},
"time": "2017-05-27 00:00:00"
},
{
"id": 1,
"user": {
"nickname": "曲丽丽",
"avatar": "http://dummyimage.com/64x64"
},
"project": {
"name": "高逼格设计天团",
"action": "更新",
"event": "六月迭代"
},
"time": "2018-08-23 14:47:00"
},
{
"id": 1,
"user": {
"nickname": "Dorothy Thompson",
"avatar": "http://dummyimage.com/64x64"
},
"project": {
"name": "高逼格设计天团",
"action": "created",
"event": "六月迭代"
},
"time": "2018-08-23 14:47:00"
},
{
"id": 1,
"user": {
"nickname": "曲丽丽",
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png"
},
"project": {
"name": "高逼格设计天团",
"action": "created",
"event": "六月迭代"
},
"time": "2018-08-23 14:47:00"
}
],
"status": 200,
"timestamp": 0
}

View File

@ -0,0 +1,61 @@
{
"message": "",
"result": {
"data": [
{
"id": 1,
"cover": "https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png",
"title": "Alipay",
"description": "那是一种内在的东西, 他们到达不了,也无法触及的",
"status": 1,
"updatedAt": "2018-07-26 00:00:00"
},
{
"id": 2,
"cover": "https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png",
"title": "Angular",
"description": "希望是一个好东西,也许是最好的,好东西是不会消亡的",
"status": 1,
"updatedAt": "2018-07-26 00:00:00"
},
{
"id": 3,
"cover": "https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png",
"title": "Ant Design",
"description": "城镇中有那么多的酒馆,她却偏偏走进了我的酒馆",
"status": 1,
"updatedAt": "2018-07-26 00:00:00"
},
{
"id": 4,
"cover": "https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png",
"title": "Ant Design Pro",
"description": "那时候我只会想自己想要什么,从不想自己拥有什么",
"status": 1,
"updatedAt": "2018-07-26 00:00:00"
},
{
"id": 5,
"cover": "https://gw.alipayobjects.com/zos/rmsportal/siCrBXXhmvTQGWPNLBow.png",
"title": "Bootstrap",
"description": "凛冬将至",
"status": 1,
"updatedAt": "2018-07-26 00:00:00"
},
{
"id": 6,
"cover": "https://gw.alipayobjects.com/zos/rmsportal/ComBAopevLwENQdKWiIn.png",
"title": "Vue",
"description": "生命就像一盒巧克力,结果往往出人意料",
"status": 1,
"updatedAt": "2018-07-26 00:00:00"
}
],
"pageSize": 10,
"pageNo": 1,
"totalPage": 6,
"totalCount": 57
},
"status": 200,
"timestamp": 1534955098193
}

View File

@ -0,0 +1,43 @@
{
"message": "",
"result": [
{
"item": "引用",
"个人": 70,
"团队": 30,
"部门": 40
},
{
"item": "口碑",
"个人": 60,
"团队": 70,
"部门": 40
},
{
"item": "产量",
"个人": 50,
"团队": 60,
"部门": 40
},
{
"item": "贡献",
"个人": 40,
"团队": 50,
"部门": 40
},
{
"item": "热度",
"个人": 60,
"团队": 70,
"部门": 40
},
{
"item": "引用",
"个人": 70,
"团队": 50,
"部门": 40
}
],
"status": 200,
"timestamp": 1534955098193
}

View File

@ -0,0 +1,32 @@
{
"message": "",
"result": [
{
"id": 1,
"name": "科学搬砖组",
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png"
},
{
"id": 2,
"name": "程序员日常",
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/cnrhVkzwxjPwAaCfPbdc.png"
},
{
"id": 1,
"name": "设计天团",
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/gaOngJwsRYRaVAuXXcmB.png"
},
{
"id": 1,
"name": "中二少女团",
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/ubnKSIfAJTxIgXOKlciN.png"
},
{
"id": 1,
"name": "骗你学计算机",
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/WhxKECPNujWoWEFNdnJE.png"
}
],
"status": 200,
"timestamp": 0
}

View File

@ -0,0 +1,408 @@
package org.jeecg.modules.demo.mock.vxe.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.constant.VXESocketConst;
import org.jeecg.common.system.query.MatchTypeEnum;
import org.jeecg.common.system.query.QueryCondition;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.mock.vxe.entity.MockEntity;
import org.jeecg.modules.demo.mock.vxe.websocket.VXESocket;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLDecoder;
import java.util.*;
@RestController
@RequestMapping("/mock/vxe")
@Slf4j
public class VxeMockController {
/**
* 模拟更改状态
*
* @param id
* @param status
* @return
*/
@GetMapping("/change1")
public Result mockChange1(@RequestParam("id") String id, @RequestParam("status") String status) {
/* id 为 行的idrowId只要获取到rowId那么只需要调用 VXESocket.sendMessageToAll() 即可 */
// 封装行数据
JSONObject rowData = new JSONObject();
// 这个字段就是要更改的行数据ID
rowData.put("id", id);
// 这个字段就是要更改的列的key和具体的值
rowData.put("status", status);
// 模拟更改数据
this.mockChange(rowData);
return Result.ok();
}
/**
* 模拟更改拖轮状态
*
* @param id
* @param tug_status
* @return
*/
@GetMapping("/change2")
public Result mockChange2(@RequestParam("id") String id, @RequestParam("tug_status") String tug_status) {
/* id 为 行的idrowId只要获取到rowId那么只需要调用 VXESocket.sendMessageToAll() 即可 */
// 封装行数据
JSONObject rowData = new JSONObject();
// 这个字段就是要更改的行数据ID
rowData.put("id", id);
// 这个字段就是要更改的列的key和具体的值
JSONObject tugStatus = JSON.parseObject(tug_status);
rowData.put("tug_status", tugStatus);
// 模拟更改数据
this.mockChange(rowData);
return Result.ok();
}
/**
* 模拟更改进度条状态
*
* @param id
* @param progress
* @return
*/
@GetMapping("/change3")
public Result mockChange3(@RequestParam("id") String id, @RequestParam("progress") String progress) {
/* id 为 行的idrowId只要获取到rowId那么只需要调用 VXESocket.sendMessageToAll() 即可 */
// 封装行数据
JSONObject rowData = new JSONObject();
// 这个字段就是要更改的行数据ID
rowData.put("id", id);
// 这个字段就是要更改的列的key和具体的值
rowData.put("progress", progress);
// 模拟更改数据
this.mockChange(rowData);
return Result.ok();
}
private void mockChange(JSONObject rowData) {
// 封装socket数据
JSONObject socketData = new JSONObject();
// 这里的 socketKey 必须要和调度计划页面上写的 socketKey 属性保持一致
socketData.put("socketKey", "page-dispatch");
// 这里的 args 必须得是一个数组下标0是行数据下标1是caseId一般不用传
socketData.put("args", new Object[]{rowData, ""});
// 封装消息字符串这里的
// type 必须是 VXESocketConst.TYPE_UVT
String message = VXESocket.packageMessage(VXESocketConst.TYPE_UVT, socketData);
// 调用 sendMessageToAll 发送给所有在线的用户
VXESocket.sendMessageToAll(message);
}
/**
* 模拟更改大船待审状态
*
* @param status
* @return
*/
@GetMapping("/change4")
public Result mockChange4(@RequestParam("status") String status) {
// 封装socket数据
JSONObject socketData = new JSONObject();
// 这里的 key 是前端注册时使用的key必须保持一致
socketData.put("key", "dispatch-dcds-status");
// 这里的 args 必须得是一个数组每一位都是注册方法的参数按顺序传递
socketData.put("args", new Object[]{status});
// 封装消息字符串这里的 type 必须是 VXESocketConst.TYPE_UVT
String message = VXESocket.packageMessage(VXESocketConst.TYPE_CSD, socketData);
// 调用 sendMessageToAll 发送给所有在线的用户
VXESocket.sendMessageToAll(message);
return Result.ok();
}
/**
* 模拟即时保存单行数据
*
* @param rowData 行数据实际使用时可以替换成一个实体类
*/
@PutMapping("/immediateSaveRow")
public Result mockImmediateSaveRow(@RequestBody JSONObject rowData) throws Exception {
System.out.println("即时保存.rowData" + rowData.toJSONString());
// 延时1.5秒模拟网慢堵塞真实感
Thread.sleep(500);
return Result.ok();
}
/**
* 模拟即时保存整个表格的数据
*
* @param tableData 表格数据实际使用时可以替换成一个List实体类
*/
@PostMapping("/immediateSaveAll")
public Result mockImmediateSaveAll(@RequestBody JSONArray tableData) throws Exception {
//
// 1tableData里包含该页所有的数据
// 2如果你实现了即时保存那么除了新增的数据其他的都是已经保存过的了
// 不需要再进行一次update操作了所以可以在前端传数据的时候就遍历判断一下
// 只传新增的数据给后台insert即可否者将会造成性能上的浪费
// 3新增的行是没有id的通过这一点就可以判断是否是新增的数据
System.out.println("即时保存.tableData" + tableData.toJSONString());
// 延时1.5秒模拟网慢堵塞真实感
Thread.sleep(1000);
return Result.ok();
}
/**
* 获取模拟数据
*
* @param pageNo 页码
* @param pageSize 页大小
* @param parentId 父ID不传则查询顶级
* @return
*/
@GetMapping("/getData")
public Result getMockData(
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
// 父级id根据父级id查询子级如果为空则查询顶级
@RequestParam(name = "parentId", required = false) String parentId
) {
// 模拟JSON数据路径
String path = "classpath:org/jeecg/modules/demo/mock/vxe/json/dlglong.json";
// 读取JSON数据
JSONArray dataList = readJsonData(path);
if (dataList == null) {
return Result.error("读取数据失败!");
}
IPage<JSONObject> page = this.queryDataPage(dataList, parentId, pageNo, pageSize);
return Result.ok(page);
}
/**
* 获取模拟调度计划页面的数据
*
* @param pageNo 页码
* @param pageSize 页大小
* @param parentId 父ID不传则查询顶级
* @return
*/
@GetMapping("/getDdjhData")
public Result getMockDdjhData(
// SpringMVC 会自动将参数注入到实体里
MockEntity mockEntity,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
// 父级id根据父级id查询子级如果为空则查询顶级
@RequestParam(name = "parentId", required = false) String parentId,
@RequestParam(name = "status", required = false) String status,
// 高级查询条件
@RequestParam(name = "superQueryParams", required = false) String superQueryParams,
// 高级查询模式
@RequestParam(name = "superQueryMatchType", required = false) String superQueryMatchType,
HttpServletRequest request
) {
// 获取查询条件前台传递的查询参数
Map<String, String[]> parameterMap = request.getParameterMap();
// 遍历输出到控制台
System.out.println("\ngetDdjhData - 普通查询条件:");
for (String key : parameterMap.keySet()) {
System.out.println("-- " + key + ": " + JSON.toJSONString(parameterMap.get(key)));
}
// 输出高级查询
try {
System.out.println("\ngetDdjhData - 高级查询条件:");
// 高级查询模式
MatchTypeEnum matchType = MatchTypeEnum.getByValue(superQueryMatchType);
if (matchType == null) {
System.out.println("-- 高级查询模式:不识别(" + superQueryMatchType + "");
} else {
System.out.println("-- 高级查询模式:" + matchType.getValue());
}
superQueryParams = URLDecoder.decode(superQueryParams, "UTF-8");
List<QueryCondition> conditions = JSON.parseArray(superQueryParams, QueryCondition.class);
if (conditions != null) {
for (QueryCondition condition : conditions) {
System.out.println("-- " + JSON.toJSONString(condition));
}
} else {
System.out.println("-- 没有传递任何高级查询条件");
}
System.out.println();
} catch (Exception e) {
log.error("-- 高级查询操作失败:" + superQueryParams, e);
e.printStackTrace();
}
/* 实际使用中不用写上面那种繁琐的代码这里只是为了直观的输出到控制台里而写的示例
使用下面这种写法更简洁方便 */
// 封装成 MyBatisPlus 能识别的 QueryWrapper可以直接使用这个对象进行SQL筛选条件拼接
// 这个方法也会自动封装高级查询条件但是高级查询参数名必须是superQueryParams和superQueryMatchType
QueryWrapper<MockEntity> queryWrapper = QueryGenerator.initQueryWrapper(mockEntity, parameterMap);
System.out.println("queryWrapper " + queryWrapper.getCustomSqlSegment());
// 模拟JSON数据路径
String path = "classpath:org/jeecg/modules/demo/mock/vxe/json/ddjh.json";
if ("8".equals(status)) {
path = "classpath:org/jeecg/modules/demo/mock/vxe/json/ddjh_s8.json";
}
// 读取JSON数据
JSONArray dataList = readJsonData(path);
if (dataList == null) {
return Result.error("读取数据失败!");
}
IPage<JSONObject> page = this.queryDataPage(dataList, parentId, pageNo, pageSize);
// 逐行查询子表数据用于计算拖轮状态
List<JSONObject> records = page.getRecords();
for (JSONObject record : records) {
Map<String, Integer> tugStatusMap = new HashMap<>();
String id = record.getString("id");
// 查询出主表的拖轮
String tugMain = record.getString("tug");
// 判断是否有值
if (StringUtils.isNotBlank(tugMain)) {
// 拖轮根据分号分割
String[] tugs = tugMain.split(";");
// 查询子表数据
List<JSONObject> subRecords = this.queryDataPage(dataList, id, null, null).getRecords();
// 遍历子表和拖轮数据找出进行计算反推拖轮状态
for (JSONObject subData : subRecords) {
String subTug = subData.getString("tug");
if (StringUtils.isNotBlank(subTug)) {
for (String tug : tugs) {
if (tug.equals(subTug)) {
// 计算拖轮状态逻辑
int statusCode = 0;
/* 如果有发船时间、作业开始时间、作业结束时间、回船时间,则主表中的拖轮列中的每个拖轮背景色要即时变色 */
// 有发船时间状态 +1
String departureTime = subData.getString("departure_time");
if (StringUtils.isNotBlank(departureTime)) {
statusCode += 1;
}
// 有作业开始时间状态 +1
String workBeginTime = subData.getString("work_begin_time");
if (StringUtils.isNotBlank(workBeginTime)) {
statusCode += 1;
}
// 有作业结束时间状态 +1
String workEndTime = subData.getString("work_end_time");
if (StringUtils.isNotBlank(workEndTime)) {
statusCode += 1;
}
// 有回船时间状态 +1
String returnTime = subData.getString("return_time");
if (StringUtils.isNotBlank(returnTime)) {
statusCode += 1;
}
// 保存拖轮状态key是拖轮的值value是状态前端根据不同的状态码显示不同的颜色这个颜色也可以后台计算完之后返回给前端直接使用
tugStatusMap.put(tug, statusCode);
break;
}
}
}
}
}
// 新加一个字段用于保存拖轮状态不要直接覆盖原来的这个字段可以不保存到数据库里
record.put("tug_status", tugStatusMap);
}
page.setRecords(records);
return Result.ok(page);
}
/**
* 模拟查询数据可以根据父ID查询可以分页
*
* @param dataList 数据列表
* @param parentId 父ID
* @param pageNo 页码
* @param pageSize 页大小
* @return
*/
private IPage<JSONObject> queryDataPage(JSONArray dataList, String parentId, Integer pageNo, Integer pageSize) {
// 根据父级id查询子级
JSONArray dataDB = dataList;
if (StringUtils.isNotBlank(parentId)) {
JSONArray results = new JSONArray();
List<String> parentIds = Arrays.asList(parentId.split(","));
this.queryByParentId(dataDB, parentIds, results);
dataDB = results;
}
// 模拟分页实际中应用SQL自带的分页
List<JSONObject> records = new ArrayList<>();
IPage<JSONObject> page;
long beginIndex, endIndex;
// 如果任意一个参数为null则不分页
if (pageNo == null || pageSize == null) {
page = new Page<>(0, dataDB.size());
beginIndex = 0;
endIndex = dataDB.size();
} else {
page = new Page<>(pageNo, pageSize);
beginIndex = page.offset();
endIndex = page.offset() + page.getSize();
}
for (long i = beginIndex; (i < endIndex && i < dataDB.size()); i++) {
JSONObject data = dataDB.getJSONObject((int) i);
data = JSON.parseObject(data.toJSONString());
// 不返回 children
data.remove("children");
records.add(data);
}
page.setRecords(records);
page.setTotal(dataDB.size());
return page;
}
private void queryByParentId(JSONArray dataList, List<String> parentIds, JSONArray results) {
for (int i = 0; i < dataList.size(); i++) {
JSONObject data = dataList.getJSONObject(i);
JSONArray children = data.getJSONArray("children");
// 找到了该父级
if (parentIds.contains(data.getString("id"))) {
if (children != null) {
// addAll 的目的是将多个子表的数据合并在一起
results.addAll(children);
}
} else {
if (children != null) {
queryByParentId(children, parentIds, results);
}
}
}
results.addAll(new JSONArray());
}
private JSONArray readJsonData(String path) {
try {
InputStream stream = getClass().getClassLoader().getResourceAsStream(path.replace("classpath:", ""));
if (stream != null) {
String json = IOUtils.toString(stream, "UTF-8");
return JSON.parseArray(json);
}
} catch (IOException e) {
log.error(e.getMessage(), e);
}
return null;
}
}

View File

@ -0,0 +1,20 @@
package org.jeecg.modules.demo.mock.vxe.entity;
import lombok.Data;
/**
* 模拟实体
*/
@Data
public class MockEntity {
// id
private String id;
// 父级ID
private String parentId;
// 状态
private String status;
/* -- 省略其他字段 -- */
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,216 @@
package org.jeecg.modules.demo.mock.vxe.websocket;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.constant.VXESocketConst;
import org.springframework.stereotype.Component;
import javax.websocket.OnClose;
import javax.websocket.OnMessage;
import javax.websocket.OnOpen;
import javax.websocket.Session;
import javax.websocket.server.PathParam;
import javax.websocket.server.ServerEndpoint;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
/**
* vxe WebSocket用于实现实时无痕刷新的功能
*/
@Slf4j
@Component
@ServerEndpoint("/vxeSocket/{userId}/{pageId}")
public class VXESocket {
/**
* 当前 session
*/
private Session session;
/**
* 当前用户id
*/
private String userId;
/**
* 页面id用于标识同一用户不同页面的数据
*/
private String pageId;
/**
* 当前socket唯一id
*/
private String socketId;
/**
* 用户连接池包含单个用户的所有socket连接
* 因为一个用户可能打开多个页面多个页面就会有多个连接
* key是userIdvalue是Map对象子Map的key是pageIdvalue是VXESocket对象
*/
private static Map<String, Map<String, VXESocket>> userPool = new HashMap<>();
/**
* 连接池包含所有WebSocket连接
* key是socketIdvalue是VXESocket对象
*/
private static Map<String, VXESocket> socketPool = new HashMap<>();
/**
* 获取某个用户所有的页面
*/
public static Map<String, VXESocket> getUserPool(String userId) {
return userPool.computeIfAbsent(userId, k -> new HashMap<>());
}
/**
* 向当前用户发送消息
*
* @param message 消息内容
*/
public void sendMessage(String message) {
try {
this.session.getAsyncRemote().sendText(message);
} catch (Exception e) {
log.error("【vxeSocket】消息发送失败" + e.getMessage());
}
}
/**
* 封装消息json
*
* @param data 消息内容
*/
public static String packageMessage(String type, Object data) {
JSONObject message = new JSONObject();
message.put(VXESocketConst.TYPE, type);
message.put(VXESocketConst.DATA, data);
return message.toJSONString();
}
/**
* 向指定用户的所有页面发送消息
*
* @param userId 接收消息的用户ID
* @param message 消息内容
*/
public static void sendMessageTo(String userId, String message) {
Collection<VXESocket> values = getUserPool(userId).values();
if (values.size() > 0) {
for (VXESocket socketItem : values) {
socketItem.sendMessage(message);
}
} else {
log.warn("【vxeSocket】消息发送失败userId\"" + userId + "\"不存在或未在线!");
}
}
/**
* 向指定用户的指定页面发送消息
*
* @param userId 接收消息的用户ID
* @param message 消息内容
*/
public static void sendMessageTo(String userId, String pageId, String message) {
VXESocket socketItem = getUserPool(userId).get(pageId);
if (socketItem != null) {
socketItem.sendMessage(message);
} else {
log.warn("【vxeSocket】消息发送失败userId\"" + userId + "\"的pageId\"" + pageId + "\"不存在或未在线!");
}
}
/**
* 向多个用户的所有页面发送消息
*
* @param userIds 接收消息的用户ID数组
* @param message 消息内容
*/
public static void sendMessageTo(String[] userIds, String message) {
for (String userId : userIds) {
VXESocket.sendMessageTo(userId, message);
}
}
/**
* 向所有用户的所有页面发送消息
*
* @param message 消息内容
*/
public static void sendMessageToAll(String message) {
for (VXESocket socketItem : socketPool.values()) {
socketItem.sendMessage(message);
}
}
/**
* websocket 开启连接
*/
@OnOpen
public void onOpen(Session session, @PathParam("userId") String userId, @PathParam("pageId") String pageId) {
try {
this.userId = userId;
this.pageId = pageId;
this.socketId = userId + pageId;
this.session = session;
socketPool.put(this.socketId, this);
getUserPool(userId).put(this.pageId, this);
log.info("【vxeSocket】有新的连接总数为:" + socketPool.size());
} catch (Exception ignored) {
}
}
/**
* websocket 断开连接
*/
@OnClose
public void onClose() {
try {
socketPool.remove(this.socketId);
getUserPool(this.userId).remove(this.pageId);
log.info("【vxeSocket】连接断开总数为:" + socketPool.size());
} catch (Exception ignored) {
}
}
/**
* websocket 收到消息
*/
@OnMessage
public void onMessage(String message) {
// log.info("【vxeSocket】onMessage:" + message);
JSONObject json;
try {
json = JSON.parseObject(message);
} catch (Exception e) {
log.warn("【vxeSocket】收到不合法的消息:" + message);
return;
}
String type = json.getString(VXESocketConst.TYPE);
switch (type) {
// 心跳检测
case VXESocketConst.TYPE_HB:
this.sendMessage(VXESocket.packageMessage(type, true));
break;
// 更新form数据
case VXESocketConst.TYPE_UVT:
this.handleUpdateForm(json);
break;
default:
log.warn("【vxeSocket】收到不识别的消息类型:" + type);
break;
}
}
/**
* 处理 UpdateForm 事件
*/
private void handleUpdateForm(JSONObject json) {
// 将事件转发给所有人
JSONObject data = json.getJSONObject(VXESocketConst.DATA);
VXESocket.sendMessageToAll(VXESocket.packageMessage(VXESocketConst.TYPE_UVT, data));
}
}

View File

@ -0,0 +1,63 @@
package org.jeecg.modules.demo.test.controller;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.demo.test.entity.JeecgDemo;
import org.jeecg.modules.demo.test.service.IJeecgDemoService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import java.util.ArrayList;
import java.util.List;
/**
* @Description: 大屏预览入口
* @Author: scott
* @Date:2019-12-12
* @Version:V1.0
*/
@Slf4j
@Controller
@RequestMapping("/test/bigScreen/templat")
public class BigScreenTemplatController extends JeecgController<JeecgDemo, IJeecgDemoService> {
/**
* @param modelAndView
* @return
*/
@RequestMapping("/html")
public ModelAndView ftl(ModelAndView modelAndView) {
modelAndView.setViewName("demo3");
List<String> userList = new ArrayList<String>();
userList.add("admin");
userList.add("user1");
userList.add("user2");
log.info("--------------test--------------");
modelAndView.addObject("userList", userList);
return modelAndView;
}
/**
* 生产销售监控模版
* @param modelAndView
* @return
*/
@RequestMapping("/index1")
public ModelAndView index1(ModelAndView modelAndView) {
modelAndView.setViewName("/bigscreen/template1/index");
return modelAndView;
}
/**
* 智慧物流监控模版
* @param modelAndView
* @return
*/
@RequestMapping("/index2")
public ModelAndView index2(ModelAndView modelAndView) {
modelAndView.setViewName("/bigscreen/template2/index");
return modelAndView;
}
}

View File

@ -0,0 +1,295 @@
package org.jeecg.modules.demo.test.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.aspect.annotation.PermissionData;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.DateUtils;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.modules.demo.test.entity.JeecgDemo;
import org.jeecg.modules.demo.test.service.IJeecgDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
/**
* @Description: 单表示例
* @Author: jeecg-boot
* @Date:2018-12-29
* @Version:V2.0
*/
@Slf4j
@Api(tags = "单表DEMO")
@RestController
@RequestMapping("/test/jeecgDemo")
public class JeecgDemoController extends JeecgController<JeecgDemo, IJeecgDemoService> {
@Autowired
private IJeecgDemoService jeecgDemoService;
@Autowired
private RedisUtil redisUtil;
/**
* 分页列表查询
*
* @param jeecgDemo
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@ApiOperation(value = "获取Demo数据列表", notes = "获取所有Demo数据列表")
@GetMapping(value = "/list")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> list(JeecgDemo jeecgDemo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<JeecgDemo> queryWrapper = QueryGenerator.initQueryWrapper(jeecgDemo, req.getParameterMap());
Page<JeecgDemo> page = new Page<JeecgDemo>(pageNo, pageSize);
IPage<JeecgDemo> pageList = jeecgDemoService.page(page, queryWrapper);
log.info("查询当前页:" + pageList.getCurrent());
log.info("查询当前页数量:" + pageList.getSize());
log.info("查询结果数量:" + pageList.getRecords().size());
log.info("数据总数:" + pageList.getTotal());
return Result.OK(pageList);
}
/**
* 添加
*
* @param jeecgDemo
* @return
*/
@PostMapping(value = "/add")
@AutoLog(value = "添加测试DEMO")
@ApiOperation(value = "添加DEMO", notes = "添加DEMO")
public Result<?> add(@RequestBody JeecgDemo jeecgDemo) {
jeecgDemoService.save(jeecgDemo);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param jeecgDemo
* @return
*/
@PutMapping(value = "/edit")
@ApiOperation(value = "编辑DEMO", notes = "编辑DEMO")
@AutoLog(value = "编辑DEMO", operateType = CommonConstant.OPERATE_TYPE_3)
public Result<?> edit(@RequestBody JeecgDemo jeecgDemo) {
jeecgDemoService.updateById(jeecgDemo);
return Result.OK("更新成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "删除测试DEMO")
@DeleteMapping(value = "/delete")
@ApiOperation(value = "通过ID删除DEMO", notes = "通过ID删除DEMO")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
jeecgDemoService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@DeleteMapping(value = "/deleteBatch")
@ApiOperation(value = "批量删除DEMO", notes = "批量删除DEMO")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.jeecgDemoService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@GetMapping(value = "/queryById")
@ApiOperation(value = "通过ID查询DEMO", notes = "通过ID查询DEMO")
public Result<?> queryById(@ApiParam(name = "id", value = "示例id", required = true) @RequestParam(name = "id", required = true) String id) {
JeecgDemo jeecgDemo = jeecgDemoService.getById(id);
return Result.OK(jeecgDemo);
}
/**
* 导出excel
*
* @param request
*/
@RequestMapping(value = "/exportXls")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public ModelAndView exportXls(HttpServletRequest request, JeecgDemo jeecgDemo) {
return super.exportXls(request, jeecgDemo, JeecgDemo.class, "单表模型");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, JeecgDemo.class);
}
// =====Redis 示例===============================================================================================
/**
* redis操作 -- set
*/
@GetMapping(value = "/redisSet")
public void redisSet() {
redisUtil.set("name", "张三" + DateUtils.now());
}
/**
* redis操作 -- get
*/
@GetMapping(value = "/redisGet")
public String redisGet() {
return (String) redisUtil.get("name");
}
/**
* redis操作 -- setObj
*/
@GetMapping(value = "/redisSetObj")
public void redisSetObj() {
JeecgDemo p = new JeecgDemo();
p.setAge(10);
p.setBirthday(new Date());
p.setContent("hello");
p.setName("张三");
p.setSex("");
redisUtil.set("user-zdh", p);
}
/**
* redis操作 -- setObj
*/
@GetMapping(value = "/redisGetObj")
public Object redisGetObj() {
return redisUtil.get("user-zdh");
}
/**
* redis操作 -- get
*/
@GetMapping(value = "/redis/{id}")
public JeecgDemo redisGetJeecgDemo(@PathVariable("id") String id) {
JeecgDemo t = jeecgDemoService.getByIdCacheable(id);
log.info(t.toString());
return t;
}
// ===Freemaker示例================================================================================
/**
* freemaker方式 页面路径 src/main/resources/templates
*
* @param modelAndView
* @return
*/
@RequestMapping("/html")
public ModelAndView ftl(ModelAndView modelAndView) {
modelAndView.setViewName("demo3");
List<String> userList = new ArrayList<String>();
userList.add("admin");
userList.add("user1");
userList.add("user2");
log.info("--------------test--------------");
modelAndView.addObject("userList", userList);
return modelAndView;
}
// ==========================================动态表单 JSON接收测试===========================================
@PostMapping(value = "/testOnlineAdd")
public Result<?> testOnlineAdd(@RequestBody JSONObject json) {
log.info(json.toJSONString());
return Result.OK("添加成功!");
}
/*----------------------------------------外部获取权限示例------------------------------------*/
/**
* 数据权限示例 - 编程mybatisPlus java类方式加载权限
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@GetMapping(value = "/mpList")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> loadMpPermissonList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<JeecgDemo> queryWrapper = new QueryWrapper<JeecgDemo>();
//编程方式给queryWrapper装载数据权限规则
QueryGenerator.installAuthMplus(queryWrapper, JeecgDemo.class);
Page<JeecgDemo> page = new Page<JeecgDemo>(pageNo, pageSize);
IPage<JeecgDemo> pageList = jeecgDemoService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 数据权限示例 - 编程mybatis xml方式加载权限
*
* @param jeecgDemo
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@GetMapping(value = "/sqlList")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> loadSqlPermissonList(JeecgDemo jeecgDemo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
IPage<JeecgDemo> pageList = jeecgDemoService.queryListWithPermission(pageSize, pageNo);
return Result.OK(pageList);
}
/*----------------------------------------外部获取权限示例------------------------------------*/
}

View File

@ -0,0 +1,254 @@
package org.jeecg.modules.demo.test.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.test.entity.JeecgDemo;
import org.jeecg.modules.demo.test.entity.JeecgOrderCustomer;
import org.jeecg.modules.demo.test.entity.JeecgOrderMain;
import org.jeecg.modules.demo.test.entity.JeecgOrderTicket;
import org.jeecg.modules.demo.test.service.IJeecgDemoService;
import org.jeecg.modules.demo.test.service.IJeecgOrderCustomerService;
import org.jeecg.modules.demo.test.service.IJeecgOrderMainService;
import org.jeecg.modules.demo.test.service.IJeecgOrderTicketService;
import org.jeecg.modules.demo.test.vo.JeecgOrderMainPage;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
/**
* @Description: 一对多示例JEditableTable行编辑
* @Author: jeecg-boot
* @Date:2019-02-15
* @Version: V2.0
*/
@RestController
@RequestMapping("/test/jeecgOrderMain")
@Slf4j
public class JeecgOrderMainController extends JeecgController<JeecgOrderMain, IJeecgOrderMainService> {
@Autowired
private IJeecgOrderMainService jeecgOrderMainService;
@Autowired
private IJeecgOrderCustomerService jeecgOrderCustomerService;
@Autowired
private IJeecgOrderTicketService jeecgOrderTicketService;
/**
* 分页列表查询
*
* @param jeecgOrderMain
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@GetMapping(value = "/list")
public Result<?> queryPageList(JeecgOrderMain jeecgOrderMain, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
QueryWrapper<JeecgOrderMain> queryWrapper = QueryGenerator.initQueryWrapper(jeecgOrderMain, req.getParameterMap());
Page<JeecgOrderMain> page = new Page<JeecgOrderMain>(pageNo, pageSize);
IPage<JeecgOrderMain> pageList = jeecgOrderMainService.page(page, queryWrapper);
return Result.ok(pageList);
}
/**
* 添加
*
* @param jeecgOrderMainPage
* @return
*/
@PostMapping(value = "/add")
public Result<?> add(@RequestBody JeecgOrderMainPage jeecgOrderMainPage) {
JeecgOrderMain jeecgOrderMain = new JeecgOrderMain();
BeanUtils.copyProperties(jeecgOrderMainPage, jeecgOrderMain);
jeecgOrderMainService.saveMain(jeecgOrderMain, jeecgOrderMainPage.getJeecgOrderCustomerList(), jeecgOrderMainPage.getJeecgOrderTicketList());
return Result.ok("添加成功!");
}
/**
* 编辑
*
* @param jeecgOrderMainPage
* @return
*/
@PutMapping(value = "/edit")
public Result<?> eidt(@RequestBody JeecgOrderMainPage jeecgOrderMainPage) {
JeecgOrderMain jeecgOrderMain = new JeecgOrderMain();
BeanUtils.copyProperties(jeecgOrderMainPage, jeecgOrderMain);
jeecgOrderMainService.updateMain(jeecgOrderMain, jeecgOrderMainPage.getJeecgOrderCustomerList(), jeecgOrderMainPage.getJeecgOrderTicketList());
return Result.ok("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
jeecgOrderMainService.delMain(id);
return Result.ok("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.jeecgOrderMainService.delBatchMain(Arrays.asList(ids.split(",")));
return Result.ok("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
JeecgOrderMain jeecgOrderMain = jeecgOrderMainService.getById(id);
return Result.ok(jeecgOrderMain);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@GetMapping(value = "/queryOrderCustomerListByMainId")
public Result<?> queryOrderCustomerListByMainId(@RequestParam(name = "id", required = true) String id) {
List<JeecgOrderCustomer> jeecgOrderCustomerList = jeecgOrderCustomerService.selectCustomersByMainId(id);
return Result.ok(jeecgOrderCustomerList);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@GetMapping(value = "/queryOrderTicketListByMainId")
public Result<?> queryOrderTicketListByMainId(@RequestParam(name = "id", required = true) String id) {
List<JeecgOrderTicket> jeecgOrderTicketList = jeecgOrderTicketService.selectTicketsByMainId(id);
return Result.ok(jeecgOrderTicketList);
}
/**
* 导出excel
*
* @param request
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, JeecgOrderMain jeecgOrderMain) {
// Step.1 组装查询条件
QueryWrapper<JeecgOrderMain> queryWrapper = QueryGenerator.initQueryWrapper(jeecgOrderMain, request.getParameterMap());
//Step.2 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
//获取当前用户
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<JeecgOrderMainPage> pageList = new ArrayList<JeecgOrderMainPage>();
List<JeecgOrderMain> jeecgOrderMainList = jeecgOrderMainService.list(queryWrapper);
for (JeecgOrderMain orderMain : jeecgOrderMainList) {
JeecgOrderMainPage vo = new JeecgOrderMainPage();
BeanUtils.copyProperties(orderMain, vo);
// 查询机票
List<JeecgOrderTicket> jeecgOrderTicketList = jeecgOrderTicketService.selectTicketsByMainId(orderMain.getId());
vo.setJeecgOrderTicketList(jeecgOrderTicketList);
// 查询客户
List<JeecgOrderCustomer> jeecgOrderCustomerList = jeecgOrderCustomerService.selectCustomersByMainId(orderMain.getId());
vo.setJeecgOrderCustomerList(jeecgOrderCustomerList);
pageList.add(vo);
}
// 导出文件名称
mv.addObject(NormalExcelConstants.FILE_NAME, "一对多订单示例");
// 注解对象Class
mv.addObject(NormalExcelConstants.CLASS, JeecgOrderMainPage.class);
// 自定义表格参数
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("自定义导出Excel内容标题", "导出人:" + sysUser.getRealname(), "自定义Sheet名字"));
// 导出数据列表
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
return mv;
}
/**
* 通过excel导入数据
*
* @param request
* @param
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
MultipartFile file = entity.getValue();// 获取上传文件对象
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(2);
params.setNeedSave(true);
try {
List<JeecgOrderMainPage> list = ExcelImportUtil.importExcel(file.getInputStream(), JeecgOrderMainPage.class, params);
for (JeecgOrderMainPage page : list) {
JeecgOrderMain po = new JeecgOrderMain();
BeanUtils.copyProperties(page, po);
jeecgOrderMainService.saveMain(po, page.getJeecgOrderCustomerList(), page.getJeecgOrderTicketList());
}
return Result.ok("文件导入成功!");
} catch (Exception e) {
log.error(e.getMessage(), e);
return Result.error("文件导入失败:" + e.getMessage());
} finally {
try {
file.getInputStream().close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
return Result.error("文件导入失败!");
}
}

View File

@ -0,0 +1,267 @@
package org.jeecg.modules.demo.test.controller;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.test.entity.JeecgOrderCustomer;
import org.jeecg.modules.demo.test.entity.JeecgOrderMain;
import org.jeecg.modules.demo.test.entity.JeecgOrderTicket;
import org.jeecg.modules.demo.test.service.IJeecgOrderCustomerService;
import org.jeecg.modules.demo.test.service.IJeecgOrderMainService;
import org.jeecg.modules.demo.test.service.IJeecgOrderTicketService;
import org.jeecg.modules.demo.test.vo.JeecgOrderMainPage;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
/**
* @Description: 一对多示例ERP TAB风格
* @Author: ZhiLin
* @Date: 2019-02-20
* @Version: v2.0
*/
@Slf4j
@RestController
@RequestMapping("/test/order")
public class JeecgOrderTabMainController {
@Autowired
private IJeecgOrderMainService jeecgOrderMainService;
@Autowired
private IJeecgOrderCustomerService jeecgOrderCustomerService;
@Autowired
private IJeecgOrderTicketService jeecgOrderTicketService;
/**
* 分页列表查询
*
* @param jeecgOrderMain
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@GetMapping(value = "/orderList")
public Result<?> respondePagedData(JeecgOrderMain jeecgOrderMain,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<JeecgOrderMain> queryWrapper = QueryGenerator.initQueryWrapper(jeecgOrderMain, req.getParameterMap());
Page<JeecgOrderMain> page = new Page<JeecgOrderMain>(pageNo, pageSize);
IPage<JeecgOrderMain> pageList = jeecgOrderMainService.page(page, queryWrapper);
return Result.ok(pageList);
}
/**
* 添加
*
* @param jeecgOrderMainPage
* @return
*/
@PostMapping(value = "/add")
public Result<?> add(@RequestBody JeecgOrderMainPage jeecgOrderMainPage) {
JeecgOrderMain jeecgOrderMain = new JeecgOrderMain();
BeanUtils.copyProperties(jeecgOrderMainPage, jeecgOrderMain);
jeecgOrderMainService.save(jeecgOrderMain);
return Result.ok("添加成功!");
}
/**
* 编辑
*
* @param jeecgOrderMainPage
* @return
*/
@PutMapping("/edit")
public Result<?> edit(@RequestBody JeecgOrderMainPage jeecgOrderMainPage) {
JeecgOrderMain jeecgOrderMain = new JeecgOrderMain();
BeanUtils.copyProperties(jeecgOrderMainPage, jeecgOrderMain);
jeecgOrderMainService.updateById(jeecgOrderMain);
return Result.ok("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
jeecgOrderMainService.delMain(id);
return Result.ok("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.jeecgOrderMainService.removeByIds(Arrays.asList(ids.split(",")));
return Result.ok("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
JeecgOrderMain jeecgOrderMain = jeecgOrderMainService.getById(id);
return Result.ok(jeecgOrderMain);
}
/**
* 通过id查询
*
* @param jeecgOrderCustomer
* @return
*/
@GetMapping(value = "/listOrderCustomerByMainId")
public Result<?> queryOrderCustomerListByMainId(JeecgOrderCustomer jeecgOrderCustomer,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<JeecgOrderCustomer> queryWrapper = QueryGenerator.initQueryWrapper(jeecgOrderCustomer, req.getParameterMap());
Page<JeecgOrderCustomer> page = new Page<JeecgOrderCustomer>(pageNo, pageSize);
IPage<JeecgOrderCustomer> pageList = jeecgOrderCustomerService.page(page, queryWrapper);
return Result.ok(pageList);
}
/**
* 通过id查询
*
* @param jeecgOrderTicket
* @return
*/
@GetMapping(value = "/listOrderTicketByMainId")
public Result<?> queryOrderTicketListByMainId(JeecgOrderTicket jeecgOrderTicket,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<JeecgOrderTicket> queryWrapper = QueryGenerator.initQueryWrapper(jeecgOrderTicket, req.getParameterMap());
Page<JeecgOrderTicket> page = new Page<JeecgOrderTicket>(pageNo, pageSize);
IPage<JeecgOrderTicket> pageList = jeecgOrderTicketService.page(page, queryWrapper);
return Result.ok(pageList);
}
/**
* 添加
*
* @param jeecgOrderCustomer
* @return
*/
@PostMapping(value = "/addCustomer")
public Result<?> addCustomer(@RequestBody JeecgOrderCustomer jeecgOrderCustomer) {
jeecgOrderCustomerService.save(jeecgOrderCustomer);
return Result.ok("添加成功!");
}
/**
* 编辑
*
* @param jeecgOrderCustomer
* @return
*/
@PutMapping("/editCustomer")
public Result<?> editCustomer(@RequestBody JeecgOrderCustomer jeecgOrderCustomer) {
jeecgOrderCustomerService.updateById(jeecgOrderCustomer);
return Result.ok("添加成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@DeleteMapping(value = "/deleteCustomer")
public Result<?> deleteCustomer(@RequestParam(name = "id", required = true) String id) {
jeecgOrderCustomerService.removeById(id);
return Result.ok("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@DeleteMapping(value = "/deleteBatchCustomer")
public Result<?> deleteBatchCustomer(@RequestParam(name = "ids", required = true) String ids) {
this.jeecgOrderCustomerService.removeByIds(Arrays.asList(ids.split(",")));
return Result.ok("批量删除成功!");
}
/**
* 添加
*
* @param jeecgOrderTicket
* @return
*/
@PostMapping(value = "/addTicket")
public Result<?> addTicket(@RequestBody JeecgOrderTicket jeecgOrderTicket) {
jeecgOrderTicketService.save(jeecgOrderTicket);
return Result.ok("添加成功!");
}
/**
* 编辑
*
* @param jeecgOrderTicket
* @return
*/
@PutMapping("/editTicket")
public Result<?> editTicket(@RequestBody JeecgOrderTicket jeecgOrderTicket) {
jeecgOrderTicketService.updateById(jeecgOrderTicket);
return Result.ok("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@DeleteMapping(value = "/deleteTicket")
public Result<?> deleteTicket(@RequestParam(name = "id", required = true) String id) {
jeecgOrderTicketService.removeById(id);
return Result.ok("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@DeleteMapping(value = "/deleteBatchTicket")
public Result<?> deleteBatchTicket(@RequestParam(name = "ids", required = true) String ids) {
this.jeecgOrderTicketService.removeByIds(Arrays.asList(ids.split(",")));
return Result.ok("批量删除成功!");
}
}

View File

@ -0,0 +1,244 @@
package org.jeecg.modules.demo.test.controller;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.test.entity.JoaDemo;
import org.jeecg.modules.demo.test.service.IJoaDemoService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
/**
* @Description: 流程测试
* @Author: jeecg-boot
* @Date: 2019-05-14
* @Version: V1.0
*/
@RestController
@RequestMapping("/test/joaDemo")
@Slf4j
public class JoaDemoController {
@Autowired
private IJoaDemoService joaDemoService;
/**
* 分页列表查询
* @param joaDemo
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@GetMapping(value = "/list")
public Result<IPage<JoaDemo>> queryPageList(JoaDemo joaDemo,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
Result<IPage<JoaDemo>> result = new Result<IPage<JoaDemo>>();
QueryWrapper<JoaDemo> queryWrapper = QueryGenerator.initQueryWrapper(joaDemo, req.getParameterMap());
Page<JoaDemo> page = new Page<JoaDemo>(pageNo, pageSize);
IPage<JoaDemo> pageList = joaDemoService.page(page, queryWrapper);
result.setSuccess(true);
result.setResult(pageList);
return result;
}
/**
* 添加
* @param joaDemo
* @return
*/
@PostMapping(value = "/add")
public Result<JoaDemo> add(@RequestBody JoaDemo joaDemo) {
Result<JoaDemo> result = new Result<JoaDemo>();
try {
joaDemoService.save(joaDemo);
result.success("添加成功!");
} catch (Exception e) {
log.error(e.getMessage(),e);
result.error500("操作失败");
}
return result;
}
/**
* 编辑
* @param joaDemo
* @return
*/
@PutMapping(value = "/edit")
public Result<JoaDemo> edit(@RequestBody JoaDemo joaDemo) {
Result<JoaDemo> result = new Result<JoaDemo>();
JoaDemo joaDemoEntity = joaDemoService.getById(joaDemo.getId());
if(joaDemoEntity==null) {
result.error500("未找到对应实体");
}else {
boolean ok = joaDemoService.updateById(joaDemo);
//TODO 返回false说明什么
if(ok) {
result.success("修改成功!");
}
}
return result;
}
/**
* 通过id删除
* @param id
* @return
*/
@DeleteMapping(value = "/delete")
public Result<JoaDemo> delete(@RequestParam(name="id",required=true) String id) {
Result<JoaDemo> result = new Result<JoaDemo>();
JoaDemo joaDemo = joaDemoService.getById(id);
if(joaDemo==null) {
result.error500("未找到对应实体");
}else {
boolean ok = joaDemoService.removeById(id);
if(ok) {
result.success("删除成功!");
}
}
return result;
}
/**
* 批量删除
* @param ids
* @return
*/
@DeleteMapping(value = "/deleteBatch")
public Result<JoaDemo> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
Result<JoaDemo> result = new Result<JoaDemo>();
if(ids==null || "".equals(ids.trim())) {
result.error500("参数不识别!");
}else {
this.joaDemoService.removeByIds(Arrays.asList(ids.split(",")));
result.success("删除成功!");
}
return result;
}
/**
* 通过id查询
* @param id
* @return
*/
@GetMapping(value = "/queryById")
public Result<JoaDemo> queryById(@RequestParam(name="id",required=true) String id) {
Result<JoaDemo> result = new Result<JoaDemo>();
JoaDemo joaDemo = joaDemoService.getById(id);
if(joaDemo==null) {
result.error500("未找到对应实体");
}else {
result.setResult(joaDemo);
result.setSuccess(true);
}
return result;
}
/**
* 导出excel
*
* @param request
* @param response
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
// Step.1 组装查询条件
QueryWrapper<JoaDemo> queryWrapper = null;
try {
String paramsStr = request.getParameter("paramsStr");
if (oConvertUtils.isNotEmpty(paramsStr)) {
String deString = URLDecoder.decode(paramsStr, "UTF-8");
JoaDemo joaDemo = JSON.parseObject(deString, JoaDemo.class);
queryWrapper = QueryGenerator.initQueryWrapper(joaDemo, request.getParameterMap());
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
//Step.2 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
List<JoaDemo> pageList = joaDemoService.list(queryWrapper);
//导出文件名称
mv.addObject(NormalExcelConstants.FILE_NAME, "流程测试列表");
mv.addObject(NormalExcelConstants.CLASS, JoaDemo.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("流程测试列表数据", "导出人:Jeecg", "导出信息"));
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
return mv;
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
MultipartFile file = entity.getValue();// 获取上传文件对象
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
List<JoaDemo> listJoaDemos = ExcelImportUtil.importExcel(file.getInputStream(), JoaDemo.class, params);
for (JoaDemo joaDemoExcel : listJoaDemos) {
joaDemoService.save(joaDemoExcel);
}
return Result.ok("文件导入成功!数据行数:" + listJoaDemos.size());
} catch (Exception e) {
log.error(e.getMessage(),e);
return Result.error("文件导入失败:"+e.getMessage());
} finally {
try {
file.getInputStream().close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return Result.ok("文件导入失败!");
}
}

View File

@ -0,0 +1,78 @@
package org.jeecg.modules.demo.test.entity;
import java.io.Serializable;
import org.jeecg.common.system.base.entity.JeecgEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: jeecg 测试demo
* @Author: jeecg-boot
* @Date: 2018-12-29
* @Version:V1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="测试DEMO对象", description="测试DEMO")
@TableName("demo")
public class JeecgDemo extends JeecgEntity implements Serializable {
private static final long serialVersionUID = 1L;
/** 部门编码 */
@Excel(name="部门编码",width=25)
@ApiModelProperty(value = "部门编码")
private java.lang.String sysOrgCode;
/** 姓名 */
@Excel(name="姓名",width=25)
@ApiModelProperty(value = "姓名")
private java.lang.String name;
/** 关键词 */
@ApiModelProperty(value = "关键词")
@Excel(name="关键词",width=15)
private java.lang.String keyWord;
/** 打卡时间 */
@ApiModelProperty(value = "打卡时间")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name="打卡时间",width=20,format="yyyy-MM-dd HH:mm:ss")
private java.util.Date punchTime;
/** 工资 */
@ApiModelProperty(value = "工资",example = "0")
@Excel(name="工资",width=15)
private java.math.BigDecimal salaryMoney;
/** 奖金 */
@ApiModelProperty(value = "奖金",example = "0")
@Excel(name="奖金",width=15)
private java.lang.Double bonusMoney;
/** 性别 {男:1,女:2} */
@ApiModelProperty(value = "性别")
@Excel(name = "性别", width = 15, dicCode = "sex")
private java.lang.String sex;
/** 年龄 */
@ApiModelProperty(value = "年龄",example = "0")
@Excel(name="年龄",width=15)
private java.lang.Integer age;
/** 生日 */
@ApiModelProperty(value = "生日")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@Excel(name="生日",format="yyyy-MM-dd")
private java.util.Date birthday;
/** 邮箱 */
@ApiModelProperty(value = "邮箱")
@Excel(name="邮箱",width=30)
private java.lang.String email;
/** 个人简介 */
@ApiModelProperty(value = "个人简介")
private java.lang.String content;
}

View File

@ -0,0 +1,54 @@
package org.jeecg.modules.demo.test.entity;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* @Description: 订单客户
* @Author: jeecg-boot
* @Date: 2019-02-15
* @Version: V1.0
*/
@Data
@TableName("jeecg_order_customer")
public class JeecgOrderCustomer implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
private java.lang.String id;
/**客户名*/
@Excel(name="客户名字",width=15)
private java.lang.String name;
/**性别*/
private java.lang.String sex;
/**身份证号码*/
@Excel(name="身份证号码",width=15)
private java.lang.String idcard;
/**身份证扫描件*/
private java.lang.String idcardPic;
/**电话1*/
@Excel(name="电话",width=15)
private java.lang.String telphone;
/**外键*/
private java.lang.String orderId;
/**创建人*/
private java.lang.String createBy;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.util.Date createTime;
/**修改人*/
private java.lang.String updateBy;
/**修改时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.util.Date updateTime;
}

View File

@ -0,0 +1,50 @@
package org.jeecg.modules.demo.test.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
/**
* @Description: 订单
* @Author: jeecg-boot
* @Date: 2019-02-15
* @Version: V1.0
*/
@Data
@TableName("jeecg_order_main")
public class JeecgOrderMain implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
private java.lang.String id;
/**订单号*/
private java.lang.String orderCode;
/**订单类型*/
private java.lang.String ctype;
/**订单日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.util.Date orderDate;
/**订单金额*/
private java.lang.Double orderMoney;
/**订单备注*/
private java.lang.String content;
/**创建人*/
private java.lang.String createBy;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.util.Date createTime;
/**修改人*/
private java.lang.String updateBy;
/**修改时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.util.Date updateTime;
}

View File

@ -0,0 +1,48 @@
package org.jeecg.modules.demo.test.entity;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* @Description: 订单机票
* @Author: jeecg-boot
* @Date: 2019-02-15
* @Version: V1.0
*/
@Data
@TableName("jeecg_order_ticket")
public class JeecgOrderTicket implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
private java.lang.String id;
/**航班号*/
@Excel(name="航班号",width=15)
private java.lang.String ticketCode;
/**航班时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@Excel(name="航班时间",width=15,format = "yyyy-MM-dd")
private java.util.Date tickectDate;
/**外键*/
private java.lang.String orderId;
/**创建人*/
private java.lang.String createBy;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.util.Date createTime;
/**修改人*/
private java.lang.String updateBy;
/**修改时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.util.Date updateTime;
}

View File

@ -0,0 +1,67 @@
package org.jeecg.modules.demo.test.entity;
import java.io.Serializable;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
/**
* @Description: 流程测试
* @Author: jeecg-boot
* @Date: 2019-05-14
* @Version: V1.0
*/
@Data
@TableName("joa_demo")
public class JoaDemo implements Serializable {
private static final long serialVersionUID = 1L;
/**ID*/
@TableId(type = IdType.ASSIGN_ID)
private java.lang.String id;
/**请假人*/
@Excel(name = "请假人", width = 15)
private java.lang.String name;
/**请假天数*/
@Excel(name = "请假天数", width = 15)
private java.lang.Integer days;
/**开始时间*/
@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
private java.util.Date beginDate;
/**请假结束时间*/
@Excel(name = "请假结束时间", width = 20, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
private java.util.Date endDate;
/**请假原因*/
@Excel(name = "请假原因", width = 15)
private java.lang.String reason;
/**流程状态*/
@Excel(name = "流程状态", width = 15)
private java.lang.String bpmStatus;
/**创建人id*/
@Excel(name = "创建人id", width = 15)
private java.lang.String createBy;
/**创建时间*/
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.util.Date createTime;
/**修改时间*/
@Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.util.Date updateTime;
/**修改人id*/
@Excel(name = "修改人id", width = 15)
private java.lang.String updateBy;
}

View File

@ -0,0 +1,30 @@
package org.jeecg.modules.demo.test.mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.test.entity.JeecgDemo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
/**
* @Description: jeecg 测试demo
* @Author: jeecg-boot
* @Date: 2018-12-29
* @Version: V1.0
*/
public interface JeecgDemoMapper extends BaseMapper<JeecgDemo> {
public List<JeecgDemo> getDemoByName(@Param("name") String name);
/**
* 查询列表数据 直接传数据权限的sql进行数据过滤
* @param page
* @param permissionSql
* @return
*/
public IPage<JeecgDemo> queryListWithPermission(Page<JeecgDemo> page,@Param("permissionSql")String permissionSql);
}

View File

@ -0,0 +1,29 @@
package org.jeecg.modules.demo.test.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.test.entity.JeecgOrderCustomer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 订单客户
* @Author: jeecg-boot
* @Date: 2019-02-15
* @Version: V1.0
*/
public interface JeecgOrderCustomerMapper extends BaseMapper<JeecgOrderCustomer> {
/**
* 通过主表外键批量删除客户
* @param mainId
* @return
*/
@Delete("DELETE FROM JEECG_ORDER_CUSTOMER WHERE ORDER_ID = #{mainId}")
public boolean deleteCustomersByMainId(String mainId);
@Select("SELECT * FROM JEECG_ORDER_CUSTOMER WHERE ORDER_ID = #{mainId}")
public List<JeecgOrderCustomer> selectCustomersByMainId(String mainId);
}

View File

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.test.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.test.entity.JeecgOrderMain;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 订单
* @Author: jeecg-boot
* @Date: 2019-02-15
* @Version: V1.0
*/
public interface JeecgOrderMainMapper extends BaseMapper<JeecgOrderMain> {
}

View File

@ -0,0 +1,29 @@
package org.jeecg.modules.demo.test.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.test.entity.JeecgOrderTicket;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 订单机票
* @Author: jeecg-boot
* @Date: 2019-02-15
* @Version: V1.0
*/
public interface JeecgOrderTicketMapper extends BaseMapper<JeecgOrderTicket> {
/**
* 通过主表外键批量删除客户
* @param mainId
* @return
*/
@Delete("DELETE FROM JEECG_ORDER_TICKET WHERE ORDER_ID = #{mainId}")
public boolean deleteTicketsByMainId(String mainId);
@Select("SELECT * FROM JEECG_ORDER_TICKET WHERE ORDER_ID = #{mainId}")
public List<JeecgOrderTicket> selectTicketsByMainId(String mainId);
}

View File

@ -0,0 +1,15 @@
package org.jeecg.modules.demo.test.mapper;
import org.jeecg.modules.demo.test.entity.JoaDemo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 流程测试
* @Author: jeecg-boot
* @Date: 2019-05-14
* @Version: V1.0
*/
public interface JoaDemoMapper extends BaseMapper<JoaDemo> {
}

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.test.mapper.JeecgDemoMapper">
<!-- 根据用户名查询 -->
<select id="getDemoByName" resultType="org.jeecg.modules.demo.test.entity.JeecgDemo">
select * from demo where name = #{name}
</select>
<!-- 根据权限sql查询数据集 -->
<select id="queryListWithPermission" parameterType="Object" resultType="org.jeecg.modules.demo.test.entity.JeecgDemo">
select * from demo where 1=1 ${permissionSql}
</select>
</mapper>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.test.mapper.JeecgOrderCustomerMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.test.mapper.JeecgOrderMainMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.test.mapper.JeecgOrderTicketMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.test.mapper.JoaDemoMapper">
</mapper>

View File

@ -0,0 +1,27 @@
package org.jeecg.modules.demo.test.service;
import org.jeecg.common.system.base.service.JeecgService;
import org.jeecg.modules.demo.test.entity.JeecgDemo;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
* @Description: jeecg 测试demo
* @Author: jeecg-boot
* @Date: 2018-12-29
* @Version: V1.0
*/
public interface IJeecgDemoService extends JeecgService<JeecgDemo> {
public void testTran();
public JeecgDemo getByIdCacheable(String id);
/**
* 查询列表数据 在service中获取数据权限sql信息
* @param pageSize
* @param pageNo
* @return
*/
IPage<JeecgDemo> queryListWithPermission(int pageSize,int pageNo);
}

View File

@ -0,0 +1,18 @@
package org.jeecg.modules.demo.test.service;
import java.util.List;
import org.jeecg.modules.demo.test.entity.JeecgOrderCustomer;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 订单客户
* @Author: jeecg-boot
* @Date: 2019-02-15
* @Version: V1.0
*/
public interface IJeecgOrderCustomerService extends IService<JeecgOrderCustomer> {
public List<JeecgOrderCustomer> selectCustomersByMainId(String mainId);
}

View File

@ -0,0 +1,44 @@
package org.jeecg.modules.demo.test.service;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import org.jeecg.modules.demo.test.entity.JeecgOrderCustomer;
import org.jeecg.modules.demo.test.entity.JeecgOrderMain;
import org.jeecg.modules.demo.test.entity.JeecgOrderTicket;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 订单
* @Author: jeecg-boot
* @Date: 2019-02-15
* @Version: V1.0
*/
public interface IJeecgOrderMainService extends IService<JeecgOrderMain> {
/**
* 添加一对多
*
*/
public void saveMain(JeecgOrderMain jeecgOrderMain,List<JeecgOrderCustomer> jeecgOrderCustomerList,List<JeecgOrderTicket> jeecgOrderTicketList) ;
/**
* 修改一对多
*
*/
public void updateMain(JeecgOrderMain jeecgOrderMain,List<JeecgOrderCustomer> jeecgOrderCustomerList,List<JeecgOrderTicket> jeecgOrderTicketList);
/**
* 删除一对多
* @param jformOrderMain
*/
public void delMain (String id);
/**
* 批量删除一对多
* @param jformOrderMain
*/
public void delBatchMain (Collection<? extends Serializable> idList);
}

View File

@ -0,0 +1,18 @@
package org.jeecg.modules.demo.test.service;
import java.util.List;
import org.jeecg.modules.demo.test.entity.JeecgOrderTicket;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 订单机票
* @Author: jeecg-boot
* @Date: 2019-02-15
* @Version: V1.0
*/
public interface IJeecgOrderTicketService extends IService<JeecgOrderTicket> {
public List<JeecgOrderTicket> selectTicketsByMainId(String mainId);
}

View File

@ -0,0 +1,15 @@
package org.jeecg.modules.demo.test.service;
import org.jeecg.modules.demo.test.entity.JoaDemo;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 流程测试
* @Author: jeecg-boot
* @Date: 2019-05-14
* @Version: V1.0
*/
public interface IJoaDemoService extends IService<JoaDemo> {
}

View File

@ -0,0 +1,75 @@
package org.jeecg.modules.demo.test.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.constant.CacheConstant;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.test.entity.JeecgDemo;
import org.jeecg.modules.demo.test.mapper.JeecgDemoMapper;
import org.jeecg.modules.demo.test.service.IJeecgDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* @Description: jeecg 测试demo
* @Author: jeecg-boot
* @Date: 2018-12-29
* @Version: V1.0
*/
@Service
public class JeecgDemoServiceImpl extends ServiceImpl<JeecgDemoMapper, JeecgDemo> implements IJeecgDemoService {
@Autowired
JeecgDemoMapper jeecgDemoMapper;
/**
* 事务控制在service层面
* 加上注解@Transactional声明的方法就是一个独立的事务有异常DB操作全部回滚
*/
@Override
@Transactional
public void testTran() {
JeecgDemo pp = new JeecgDemo();
pp.setAge(1111);
pp.setName("测试事务 小白兔 1");
jeecgDemoMapper.insert(pp);
JeecgDemo pp2 = new JeecgDemo();
pp2.setAge(2222);
pp2.setName("测试事务 小白兔 2");
jeecgDemoMapper.insert(pp2);
Integer.parseInt("hello");//自定义异常
JeecgDemo pp3 = new JeecgDemo();
pp3.setAge(3333);
pp3.setName("测试事务 小白兔 3");
jeecgDemoMapper.insert(pp3);
return ;
}
/**
* 缓存注解测试 redis
*/
@Override
@Cacheable(cacheNames = CacheConstant.TEST_DEMO_CACHE, key = "#id")
public JeecgDemo getByIdCacheable(String id) {
JeecgDemo t = jeecgDemoMapper.selectById(id);
System.err.println("---未读缓存,读取数据库---");
System.err.println(t);
return t;
}
@Override
public IPage<JeecgDemo> queryListWithPermission(int pageSize,int pageNo) {
Page<JeecgDemo> page = new Page<>(pageNo, pageSize);
//编程方式获取当前请求的数据权限规则SQL片段
String sql = QueryGenerator.installAuthJdbc(JeecgDemo.class);
return this.baseMapper.queryListWithPermission(page, sql);
}
}

View File

@ -0,0 +1,30 @@
package org.jeecg.modules.demo.test.service.impl;
import java.util.List;
import org.jeecg.modules.demo.test.entity.JeecgOrderCustomer;
import org.jeecg.modules.demo.test.mapper.JeecgOrderCustomerMapper;
import org.jeecg.modules.demo.test.service.IJeecgOrderCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 订单客户
* @Author: jeecg-boot
* @Date: 2019-02-15
* @Version: V1.0
*/
@Service
public class JeecgOrderCustomerServiceImpl extends ServiceImpl<JeecgOrderCustomerMapper, JeecgOrderCustomer> implements IJeecgOrderCustomerService {
@Autowired
private JeecgOrderCustomerMapper jeecgOrderCustomerMapper;
@Override
public List<JeecgOrderCustomer> selectCustomersByMainId(String mainId) {
return jeecgOrderCustomerMapper.selectCustomersByMainId(mainId);
}
}

View File

@ -0,0 +1,96 @@
package org.jeecg.modules.demo.test.service.impl;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import org.jeecg.modules.demo.test.entity.JeecgOrderCustomer;
import org.jeecg.modules.demo.test.entity.JeecgOrderMain;
import org.jeecg.modules.demo.test.entity.JeecgOrderTicket;
import org.jeecg.modules.demo.test.mapper.JeecgOrderCustomerMapper;
import org.jeecg.modules.demo.test.mapper.JeecgOrderMainMapper;
import org.jeecg.modules.demo.test.mapper.JeecgOrderTicketMapper;
import org.jeecg.modules.demo.test.service.IJeecgOrderMainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 订单
* @Author: jeecg-boot
* @Date: 2019-02-15
* @Version: V1.0
*/
@Service
public class JeecgOrderMainServiceImpl extends ServiceImpl<JeecgOrderMainMapper, JeecgOrderMain> implements IJeecgOrderMainService {
@Autowired
private JeecgOrderMainMapper jeecgOrderMainMapper;
@Autowired
private JeecgOrderCustomerMapper jeecgOrderCustomerMapper;
@Autowired
private JeecgOrderTicketMapper jeecgOrderTicketMapper;
@Override
@Transactional
public void saveMain(JeecgOrderMain jeecgOrderMain, List<JeecgOrderCustomer> jeecgOrderCustomerList, List<JeecgOrderTicket> jeecgOrderTicketList) {
jeecgOrderMainMapper.insert(jeecgOrderMain);
if (jeecgOrderCustomerList != null) {
for (JeecgOrderCustomer entity : jeecgOrderCustomerList) {
entity.setOrderId(jeecgOrderMain.getId());
jeecgOrderCustomerMapper.insert(entity);
}
}
if (jeecgOrderTicketList != null) {
for (JeecgOrderTicket entity : jeecgOrderTicketList) {
entity.setOrderId(jeecgOrderMain.getId());
jeecgOrderTicketMapper.insert(entity);
}
}
}
@Override
@Transactional
public void updateMain(JeecgOrderMain jeecgOrderMain, List<JeecgOrderCustomer> jeecgOrderCustomerList, List<JeecgOrderTicket> jeecgOrderTicketList) {
jeecgOrderMainMapper.updateById(jeecgOrderMain);
//1.先删除子表数据
jeecgOrderTicketMapper.deleteTicketsByMainId(jeecgOrderMain.getId());
jeecgOrderCustomerMapper.deleteCustomersByMainId(jeecgOrderMain.getId());
//2.子表数据重新插入
if (jeecgOrderCustomerList != null) {
for (JeecgOrderCustomer entity : jeecgOrderCustomerList) {
entity.setOrderId(jeecgOrderMain.getId());
jeecgOrderCustomerMapper.insert(entity);
}
}
if (jeecgOrderTicketList != null) {
for (JeecgOrderTicket entity : jeecgOrderTicketList) {
entity.setOrderId(jeecgOrderMain.getId());
jeecgOrderTicketMapper.insert(entity);
}
}
}
@Override
@Transactional
public void delMain(String id) {
jeecgOrderMainMapper.deleteById(id);
jeecgOrderTicketMapper.deleteTicketsByMainId(id);
jeecgOrderCustomerMapper.deleteCustomersByMainId(id);
}
@Override
@Transactional
public void delBatchMain(Collection<? extends Serializable> idList) {
for(Serializable id:idList) {
jeecgOrderMainMapper.deleteById(id);
jeecgOrderTicketMapper.deleteTicketsByMainId(id.toString());
jeecgOrderCustomerMapper.deleteCustomersByMainId(id.toString());
}
}
}

View File

@ -0,0 +1,29 @@
package org.jeecg.modules.demo.test.service.impl;
import java.util.List;
import org.jeecg.modules.demo.test.entity.JeecgOrderTicket;
import org.jeecg.modules.demo.test.mapper.JeecgOrderTicketMapper;
import org.jeecg.modules.demo.test.service.IJeecgOrderTicketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 订单机票
* @Author: jeecg-boot
* @Date: 2019-02-15
* @Version: V1.0
*/
@Service
public class JeecgOrderTicketServiceImpl extends ServiceImpl<JeecgOrderTicketMapper, JeecgOrderTicket> implements IJeecgOrderTicketService {
@Autowired
private JeecgOrderTicketMapper jeecgOrderTicketMapper;
@Override
public List<JeecgOrderTicket> selectTicketsByMainId(String mainId) {
return jeecgOrderTicketMapper.selectTicketsByMainId(mainId);
}
}

View File

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.test.service.impl;
import org.jeecg.modules.demo.test.entity.JoaDemo;
import org.jeecg.modules.demo.test.mapper.JoaDemoMapper;
import org.jeecg.modules.demo.test.service.IJoaDemoService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 流程测试
* @Author: jeecg-boot
* @Date: 2019-05-14
* @Version: V1.0
*/
@Service
public class JoaDemoServiceImpl extends ServiceImpl<JoaDemoMapper, JoaDemo> implements IJoaDemoService {
}

View File

@ -0,0 +1,44 @@
package org.jeecg.modules.demo.test.vo;
import java.util.List;
import org.jeecg.modules.demo.test.entity.JeecgOrderCustomer;
import org.jeecg.modules.demo.test.entity.JeecgOrderTicket;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import lombok.Data;
@Data
public class JeecgOrderMainPage {
/**主键*/
private java.lang.String id;
/**订单号*/
@Excel(name="订单号",width=15)
private java.lang.String orderCode;
/**订单类型*/
private java.lang.String ctype;
/**订单日期*/
@Excel(name="订单日期",width=15,format = "yyyy-MM-dd")
private java.util.Date orderDate;
/**订单金额*/
@Excel(name="订单金额",width=15)
private java.lang.Double orderMoney;
/**订单备注*/
private java.lang.String content;
/**创建人*/
private java.lang.String createBy;
/**创建时间*/
private java.util.Date createTime;
/**修改人*/
private java.lang.String updateBy;
/**修改时间*/
private java.util.Date updateTime;
@ExcelCollection(name="客户")
private List<JeecgOrderCustomer> jeecgOrderCustomerList;
@ExcelCollection(name="机票")
private List<JeecgOrderTicket> jeecgOrderTicketList;
}

View File

@ -0,0 +1,230 @@
server:
tomcat:
max-swallow-size: -1
servlet:
context-path: /
compression:
enabled: true
min-response-size: 1024
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
management:
endpoints:
web:
exposure:
include: metrics,httptrace
spring:
servlet:
multipart:
max-file-size: 10MB
max-request-size: 10MB
mail:
host: smtp.163.com
username: jeecgos@163.com
password: ??
properties:
mail:
smtp:
auth: true
starttls:
enable: true
required: true
## quartz定时任务,采用数据库方式
quartz:
job-store-type: jdbc
initialize-schema: embedded
#设置自动启动,默认为 true
auto-startup: true
#启动时更新己存在的Job
overwrite-existing-jobs: true
properties:
org:
quartz:
scheduler:
instanceName: MyScheduler
instanceId: AUTO
jobStore:
class: org.quartz.impl.jdbcjobstore.JobStoreTX
driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
tablePrefix: QRTZ_
isClustered: true
misfireThreshold: 60000
clusterCheckinInterval: 10000
threadPool:
class: org.quartz.simpl.SimpleThreadPool
threadCount: 10
threadPriority: 5
threadsInheritContextClassLoaderOfInitializingThread: true
#json 时间戳统一转换
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
aop:
proxy-target-class: true
activiti:
check-process-definitions: false
#启用作业执行器
async-executor-activate: false
#启用异步执行器
job-executor-activate: false
jpa:
open-in-view: false
#配置freemarker
freemarker:
# 设置模板后缀名
suffix: .ftl
# 设置文档类型
content-type: text/html
# 设置页面编码格式
charset: UTF-8
# 设置页面缓存
cache: false
prefer-file-system-access: false
# 设置ftl文件路径
template-loader-path:
- classpath:/templates
# 设置静态文件路径js,css等
mvc:
static-path-pattern: /**
resource:
static-locations: classpath:/static/,classpath:/public/
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
druid:
stat-view-servlet:
enabled: true
loginUsername: admin
loginPassword: 123456
allow:
web-stat-filter:
enabled: true
dynamic:
druid: # 全局druid参数绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
# 连接池的配置信息
# 初始化大小,最小,最大
initial-size: 5
min-idle: 5
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
# 打开PSCache并且指定每个连接上PSCache的大小
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
# 配置监控统计拦截的filters去掉后监控界面sql无法统计'wall'用于防火墙
filters: stat,wall,slf4j
# 通过connectProperties属性来打开mergeSql功能慢SQL记录
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource:
master:
url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置
#multi-datasource1:
#url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
#username: root
#password: root
#driver-class-name: com.mysql.cj.jdbc.Driver
#redis 配置
redis:
database: 0
host: 127.0.0.1
lettuce:
pool:
max-active: 8 #最大连接数据库连接数,设 0 为没有限制
max-idle: 8 #最大等待连接中的数量,设 0 为没有限制
max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
shutdown-timeout: 100ms
password: ''
port: 6379
#mybatis plus 设置
mybatis-plus:
mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml
global-config:
# 关闭MP3.0自带的banner
banner: false
db-config:
#主键类型 0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
id-type: 4
# 默认数据库表下划线命名
table-underline: true
configuration:
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段
call-setters-on-nulls: true
#jeecg专用配置
jeecg :
# 本地local\Miniominio\阿里云alioss
uploadType: local
path :
#文件上传根目录 设置
upload: D://opt//upFiles
#webapp文件路径
webapp: D://opt//webapp
#短信秘钥
sms:
accessKeyId: LTAI4FgmzMSTfHUFWZVUgsjM
accessKeySecret: Ru4FYjh1gP0eLwVyf5qJNq4ckY38Lt
shiro:
excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
#阿里云oss存储配置
oss:
endpoint: oss-cn-beijing.aliyuncs.com
accessKey: LTAI4FgmzMSTfHUFWZVUgsjM
secretKey: Ru4FYjh1gP0eLwVyf5qJNq4ckY38Lt
bucketName: jeecgos
staticDomain: https://static.jeecg.com
# ElasticSearch 6设置
elasticsearch:
cluster-name: docker-cluster
cluster-nodes: 127.0.0.1:9200
check-enabled: false
# 表单设计器配置
desform:
# 主题颜色(仅支持 16进制颜色代码
theme-color: "#1890ff"
# 文件、图片上传方式可选项qiniu七牛云、system跟随系统配置
upload-type: system
# 在线预览文件服务器地址配置
file-view-domain: http://fileview.jeecg.com
# minio文件上传
minio:
minio_url: http://minio.jeecg.com
minio_name: admin
minio_pass: jeecg1357
bucketName: otatest
#大屏报表参数设置
jmreport:
#是否需要校验token
is_verify_token: false
#必须校验方法
verify_methods: remove,delete,save,add,update
#Wps在线文档
wps:
domain: https://wwo.wps.cn/office/
appid: ??
appsecret: ??
#Mybatis输出sql日志
logging:
level:
org.jeecg.modules.system.mapper : debug
#cas单点登录
cas:
prefixUrl: http://cas.example.org:8443/cas
#enable swagger
swagger:
enable: true

View File

@ -0,0 +1,30 @@
spring:
profiles:
active: dev
swagger:
production: false
basic:
enable: false
username: jeecg
password: jeecg1314
# 第三方登录
justauth:
enabled: true
type:
GITHUB:
client-id: 0277e675495f14a4a183
client-secret: 4681b5153f7158bcdb9b781d8374841d5f51af04
redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback
WECHAT_ENTERPRISE:
client-id: wwc2a8c8b19c201bcc
client-secret: Z6VtKLr3dSzuq8zxTaWacGexQW6qxVK8AHrI2ARDv9c
redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback
agent-id: 1000002
DINGTALK:
client-id: dingoa33vjqxrbyidnmgwo
client-secret: RK1020ctw9mRRElz7oMjfHY12BuYVvjP99iraxu76cq9CIB0gyqeb5FJw_OEBnXA
redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback
cache:
type: default
prefix: 'demo::'
timeout: 1h

View File

@ -0,0 +1,14 @@
server:
port: 7002
spring:
profiles:
active: dev
application:
name: jeecg-demo
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
feign:
sentinel:
enabled: true

View File

@ -0,0 +1,66 @@
body,html{width:100%;height:100%;margin:0px;padding:0px;font-size:12px;color:#555;background-color:#000;font-family:'微软雅黑'}
#main{width:4352px;height:1536px;display:inline-block; background:url(../images/screenbg_design1.jpg) left top no-repeat}
/*年月日文字*/
#currentYear{width:213px;height:107px;position:absolute;left:430px;top:100px;color:#FFF;font-size:36px; font-family:'微软雅黑';text-align:center}
#currentMonth{width:213px;height:107px;position:absolute;left:1504px;top:75px;color:#FFF;font-size:36px; font-family:'微软雅黑';text-align:center}
#currentDay{width:213px;height:107px;position:absolute;left:2574px;top:100px;color:#FFF;font-size:36px; font-family:'微软雅黑';text-align:center}
/*年的进度条*/
#y_gauge1{width:250px;height:250px;position:absolute;left:60px;top:200px;}
#y_gauge2{width:250px;height:250px;position:absolute;left:290px;top:200px;}
#y_gauge3{width:250px;height:250px;position:absolute;left:530px;top:200px;}
#y_gauge4{width:250px;height:250px;position:absolute;left:770px;top:200px;}
/*月的进度条*/
#m_gauge1{width:250px;height:250px;position:absolute;left:1140px;top:130px;}
#m_gauge2{width:250px;height:250px;position:absolute;left:1370px;top:130px;}
#m_gauge3{width:250px;height:250px;position:absolute;left:1610px;top:130px;}
#m_gauge4{width:250px;height:250px;position:absolute;left:1850px;top:130px;}
/*日的进度条*/
#d_gauge1{width:250px;height:250px;position:absolute;left:2210px;top:200px;}
#d_gauge2{width:250px;height:250px;position:absolute;left:2440px;top:200px;}
#d_gauge3{width:250px;height:250px;position:absolute;left:2680px;top:200px;}
#d_gauge4{width:250px;height:250px;position:absolute;left:2920px;top:200px;}
/*监控的仪表盘*/
#gauge1{width:250px;height:250px;position:absolute;left:2200px;top:1050px;}
#gauge2{width:250px;height:250px;position:absolute;left:2550px;top:1050px;}
#gauge3{width:250px;height:250px;position:absolute;left:2910px;top:1050px;}
#gauge4{width:250px;height:250px;position:absolute;left:2380px;top:1190px;}
#gauge5{width:250px;height:250px;position:absolute;left:2730px;top:1190px;}
/*仪表盘文字*/
.gaugeTitle{width:250px;height:40px;position:absolute;left:0px;top:200px;color:#B7E1FF;font-size:24px;display:inline-block;text-align:center;font-family:Arial;}
/*地图*/
#map{width:1100px;height:800px;position:absolute;left:0px;top:620px;display:inline-block;color:#E1E1E1;font-size:24px;}
#plan{width:900px;height:420px;position:absolute;left:1170px;top:520px;display:inline-block;color:#E1E1E1;font-size:24px;}
#quality{width:900px;height:420px;position:absolute;left:1170px;top:1030px;display:inline-block;color:#E1E1E1;font-size:24px;}
#orderTable{width:1000px;height:430px;position:absolute;left:2160px;top:930px;display:inline-block}
#orderTable table{width:100%;color:#666;font-size:24px}
#orderTable table td{text-align:center;}
#orderTable table .head{height:80px;font-size:24px;color:#FFF}
#orderTable table .row2{color:#000}
#orderTable table .row1{background-color:#CCC}
#orderMessage{width:800px;position:absolute;left:33px;top:1420px;display:inline-block;color:#E1E1E1;font-size:24px}
/*生产情况展示表*/
#produce{width:1000px;height:380px;position:absolute;left:2190px;top:600px;display:inline-block;color:#B7E2FF;font-size:24px;}
#produce table{width:100%;font-size:24px;}
#produce table td{text-align:center;border:1px solid #069}
#produce table .row1{}
#produce table .row2{}
/*视频*/
#video{width:960px;height:540px;position:absolute;left:3280px;top:140px;display:inline-block;}
/*监控视频*/
#Monitor{width:960px;height:540px;position:absolute;left:3280px;top:940px;display:inline-block;color:#E1E1E1;font-size:24px;}
/*刷新时间*/
#refresh{width:800px;position:absolute;left:3350px;top:40px;display:inline-block;color:#FFF;font-size:24px;}

View File

@ -0,0 +1,62 @@
body,html{width:100%;height:100%;margin:0px;padding:0px;font-size:12px;color:#555;background-color:#000;font-family:'微软雅黑'}
#main{width:4352px;height:1536px;display:inline-block; background:url(../images/war_room_main.jpg) left top no-repeat}
/*下钻按钮*/
.contentButton{width:218px;height:100px;position:absolute;}
.contentButton a{width:218px;height:100px;display:inline-block; background:url(../images/content_comm.png) no-repeat top left}
.contentButton a:hover{width:218px;height:100px;display:inline-block; background:url(../images/content_down.png) no-repeat top left}
.contentButton .a1{width:218px;height:100px;display:inline-block; background:url(../images/content_comm1.png) no-repeat top left}
.contentButton .a1:hover{width:218px;height:100px;display:inline-block; background:url(../images/content_down1.png) no-repeat top left}
/*弹出窗口*/
#popWindow{width:2200px;height:1000px;display:inline-block;position:absolute;top:240px;left:1070px;background-color:#06274A;border:1px solid #09f}
/*年的进度条*/
#y_gauge1{width:250px;height:250px;position:absolute;left:60px;top:200px;}
#y_gauge2{width:250px;height:250px;position:absolute;left:290px;top:200px;}
#y_gauge3{width:250px;height:250px;position:absolute;left:530px;top:200px;}
#y_gauge4{width:250px;height:250px;position:absolute;left:770px;top:200px;}
/*螺旋DNA*/
#orderStatus{width:1000px;height:320px;position:absolute;left:80px;top:460px;}
/*监控的仪表盘*/
#gauge1{width:250px;height:250px;position:absolute;left:2200px;top:280px;}
#gauge2{width:250px;height:250px;position:absolute;left:2550px;top:280px;}
#gauge3{width:250px;height:250px;position:absolute;left:2910px;top:280px;}
#gauge4{width:250px;height:250px;position:absolute;left:2380px;top:550px;}
#gauge5{width:250px;height:250px;position:absolute;left:2730px;top:550px;}
/*仪表盘文字*/
.gaugeTitle{width:250px;height:40px;position:absolute;left:0px;top:200px;color:#B7E1FF;font-size:24px;display:inline-block;text-align:center;font-family:Arial;}
/*地图*/
#map{width:1100px;height:800px;position:absolute;left:1080px;top:170px;display:inline-block;color:#E1E1E1;font-size:24px;}
#productPie{width:1000px;height:680px;position:absolute;left:2210px;top:260px;display:inline-block;color:#E1E1E1;font-size:24px;}
/*业务进展图*/
#businessProgress{width:1000px;height:640px;position:absolute;left:3330px;top:180px;display:inline-block;color:#E1E1E1;font-size:24px;}
/*计划完成情况*/
#plan{width:1000px;height:400px;position:absolute;left:80px;top:1020px;display:inline-block;color:#E1E1E1;font-size:24px;}
/*质量指标分析*/
#quality{width:1000px;height:400px;position:absolute;left:1170px;top:1020px;display:inline-block;color:#E1E1E1;font-size:24px;}
/*舆情文字云*/
#wordCloud{width:900px;height:420px;position:absolute;left:3330px;top:1000px;display:inline-block;color:#E1E1E1;font-size:24px;}
/*投诉情况展示表*/
#produce{width:900px;height:380px;position:absolute;left:2250px;top:1050px;display:inline-block;color:#B7E2FF;font-size:24px;}
#produce table{width:100%;font-size:24px;}
#produce table td{text-align:center;border:1px solid #069}
#produce table .row1{}
#produce table .row2{}
/*视频*/
#video{width:960px;height:540px;position:absolute;left:3280px;top:140px;display:inline-block;}
/*监控视频*/
#Monitor{width:960px;height:540px;position:absolute;left:3280px;top:940px;display:inline-block;color:#E1E1E1;font-size:24px;}
/*刷新时间*/
#refresh{width:800px;position:absolute;left:3350px;top:40px;display:inline-block;color:#FFF;font-size:24px;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 KiB

View File

@ -0,0 +1,836 @@
//计划完成表的当前所选
var indexnum = 0;
var color=['#F35331','#2499F8','#3DF098','#33B734'];
var fontColor='#FFF';
//定义进度条组件和属性
var y_gauge1 =null;
var y_gauge2 =null;
var y_gauge3 =null;
var y_gauge4 =null;
var m_gauge1 =null;
var m_gauge2 =null;
var m_gauge3 =null;
var m_gauge4 =null;
var d_gauge1 =null;
var d_gauge2 =null;
var d_gauge3 =null;
var d_gauge4 =null;
var option_Progress =null;
//定义仪表盘组件和属性
var gauge1 =null;
var gauge2 =null;
var gauge3 =null;
var gauge4 =null;
var gauge5 =null;
var option_gauge =null;
//生产质量堆积图组件和属性
var quality_chart = null;
var quality_option=null;
//生产计划折线图组件和属性
var plan_chart = null;
var plan_option=null;
//环形图的风格定义
var dataStyle = {
normal: {
label: {show:false},
labelLine: {show:false}
}
};
var placeHolderStyle = {
normal : {
color: 'rgba(0,0,0,0.1)',
label: {show:false},
labelLine: {show:false}
},
emphasis : {
color: 'rgba(0,0,0,0)'
}
};
//最大订单号
var lastOrderNumber=1;
$(document).ready(function ()
{
//环形进度条设置对象
option_Progress={
title : {
text: '目前进度',
subtext: '50%',
x: 'center',
y: 90,
itemGap: 10,
textStyle : {
color : '#B7E1FF',
fontWeight: 'normal',
fontFamily : '微软雅黑',
fontSize : 24
},
subtextStyle:{
color: '#B7E1FF',
fontWeight: 'bolder',
fontSize:24,
fontFamily : '微软雅黑'
}
},
series : [{
type : 'pie',
center : ['50%', '50%'],
radius : [75,90],
x: '0%',
tooltip:{show:false},
data : [{
name:'达成率',
value:79,
itemStyle:{color :'rgba(0,153,255,0.8)'},
hoverAnimation: false,
label : {
show : false,
position : 'center',
textStyle: {
fontFamily:'微软雅黑',
fontWeight: 'bolder',
color:'#B7E1FF',
fontSize:24
}
},
labelLine : {
show : false
}
},
{
name:'79%',
value:21,
itemStyle:{color: 'rgba(0,153,255,0.1)'},
hoverAnimation: false,
label : {
show : false,
position : 'center',
padding:20,
textStyle: {
fontFamily:'微软雅黑',
fontSize: 24,
color:'#B7E1FF'
}
},
labelLine : {
show : false
}
}]
},
{
type : 'pie',
center : ['50%', '50%'],
radius : [95,100],
x: '0%',
hoverAnimation: false,
data : [{
value:100,
itemStyle:{color :'rgba(0,153,255,0.3)'},
label : {show : false},
labelLine : {show : false}
}]
},
{
type : 'pie',
center : ['50%', '50%'],
radius : [69,70],
x: '0%',
hoverAnimation: false,
data : [{
value:100,
itemStyle:{color :'rgba(0,153,255,0.3)'},
label : {show : false},
labelLine : {show : false}
}]
}]
};
//年仪表盘
y_gauge1 = echarts.init(document.getElementById('y_gauge1'));
y_gauge2 = echarts.init(document.getElementById('y_gauge2'));
y_gauge3 = echarts.init(document.getElementById('y_gauge3'));
y_gauge4 = echarts.init(document.getElementById('y_gauge4'));
//月仪表盘
m_gauge1 = echarts.init(document.getElementById('m_gauge1'));
m_gauge2 = echarts.init(document.getElementById('m_gauge2'));
m_gauge3 = echarts.init(document.getElementById('m_gauge3'));
m_gauge4 = echarts.init(document.getElementById('m_gauge4'));
//日仪表盘
d_gauge1 = echarts.init(document.getElementById('d_gauge1'));
d_gauge2 = echarts.init(document.getElementById('d_gauge2'));
d_gauge3 = echarts.init(document.getElementById('d_gauge3'));
d_gauge4 = echarts.init(document.getElementById('d_gauge4'));
//监控仪表盘
option_gauge = {
title: {
text: '', //标题文本内容
},
toolbox: { //可视化的工具箱
show: false,
},
tooltip: { //弹窗组件
formatter: "{a} <br/>{b} : {c}%"
},
series: [{
type: 'gauge',
axisLine: {// 坐标轴线
lineStyle: { // 属性lineStyle控制线条样式
color: [
[0.2, color[0]],
[0.8, color[1]],
[1, color[2]]
],
width: 18
}
},
splitLine: { // 分隔线
show:true,
length: 18,
lineStyle: {
color: '#28292D',
width: 1
}
},
axisTick : { //刻度线样式及短线样式
show:false,
lineStyle: {
color: 'auto',
width: 1
},
length : 20
},
axisLabel : {
color:'#FFF',
fontSize:14,
fontFamily:'Verdana, Geneva, sans-serif'
},
title: {
textStyle: { // 其余属性默认使用全局文本样式详见TEXTSTYLE
fontWeight: 'bolder',
fontSize: 20,
color: '#FFF'
},
offsetCenter: [0, '30%']
},
pointer: {
width: 5,
color: '#F00',
shadowColor: '#FF0',
shadowBlur: 10
},
detail: {
show:false,
formatter:'{value}%',
textStyle:
{
fontFamily:'Arial',
color: '#000',
fontSize:'32px'
},
offsetCenter: [0, '90%']
},
data: [{value: 45, name: '水'}]
}]
};
gauge1 = echarts.init(document.getElementById('gauge1'));
gauge2 = echarts.init(document.getElementById('gauge2'));
gauge3 = echarts.init(document.getElementById('gauge3'));
gauge4 = echarts.init(document.getElementById('gauge4'));
gauge5 = echarts.init(document.getElementById('gauge5'));
option_gauge.series[0].axisLine.lineStyle.color=[[0.2, color[0]],[0.8, color[1]],[1, color[2]]];
option_gauge.series[0].data[0].value = (Math.random() * 100).toFixed(2) - 0;
option_gauge.series[0].data[0].name ="";
$('#vg1').html(option_gauge.series[0].data[0].value);
gauge1.setOption(option_gauge);
option_gauge.series[0].data[0].value = (Math.random() * 100).toFixed(2) - 0;
option_gauge.series[0].data[0].name ="";
$('#vg2').html(option_gauge.series[0].data[0].value);
gauge2.setOption(option_gauge);
option_gauge.series[0].data[0].value = (Math.random() * 100).toFixed(2) - 0;
option_gauge.series[0].data[0].name ="天然气";
$('#vg3').html(option_gauge.series[0].data[0].value);
gauge3.setOption(option_gauge);
option_gauge.series[0].data[0].value = (Math.random() * 100).toFixed(2) - 0;
option_gauge.series[0].data[0].name ="压缩空气";
$('#vg4').html(option_gauge.series[0].data[0].value);
gauge4.setOption(option_gauge);
option_gauge.series[0].data[0].value = (Math.random() * 100).toFixed(2) - 0;
option_gauge.series[0].data[0].name ="蒸汽";
$('#vg5').html(option_gauge.series[0].data[0].value);
gauge5.setOption(option_gauge);
//生产质量堆积图
quality_chart = echarts.init(document.getElementById('quality'));
quality_option={
title: {
show:false,
text: 'AUDIT',
left: 'center',
textStyle: {
color: '#F00',
fontSize:32
}
},
xAxis: {
data: ['1月10日','2月10日','3月10日','4月10日','5月10日','6月10日'],
axisLabel: {
textStyle: {
color: '#B7E1FF',
fontSize:24
}
},
axisLine:{
lineStyle:{
color:'#09F'
}
},
axisTick:{
lineStyle:{
color:'#09F'
}
}
},
yAxis: {
inverse: false,
splitArea: {show: false},
axisLine: {show: false},
axisTick: {show: false},
axisLabel: {
textStyle: {
color: '#B7E1FF',
fontSize:24,
fontFamily:'Arial',
}
},
splitLine :{
lineStyle:{
color:'#09F'
}
}
},
grid: {
left: 100
},
tooltip: {
trigger: 'item',
textStyle: {
color: '#B7E1FF',
fontSize:24
}
},
legend:{
show:false,
top: 'bottom',
textStyle: {
color: '#F00',
fontSize:24,
fontFamily:'微软雅黑'
},
data:['AUDIT分数1','AUDIT分数']
},
series: [
{
name: 'AUDIT分数1',
type: 'bar',
stack: 'one',
itemStyle:
{
normal: {color: color[1]}
},
barWidth : 60,
data:[2200,2900,3680,2200,2900,3680]
},
{
name: 'AUDIT分数',
type: 'bar',
stack: 'one',
itemStyle: {
normal: {
color: '#F90',
label: {
show: true,
position: 'insideTop',
textStyle: {
color: '#000',
fontSize:24
}
}
}
},
barWidth : 50,
data: [1800,1100,320,1800,1100,320]
}
]
};
quality_chart.setOption(quality_option);
//生产计划折线图
var plan_data1=[];
var plan_data2=[];
var plan_xAxis=[];
for (var i = 1; i <= 7; i++) {
plan_xAxis.push("3月"+i+"");
plan_data1.push(Math.round(Math.random() * 100));
plan_data2.push(Math.round(Math.random() * 100));
}
plan_chart = echarts.init(document.getElementById('plan'));
plan_option={
xAxis: {
data:plan_xAxis,
axisLabel: {
textStyle: {
color: '#B7E1FF',
fontSize:24
}
},
axisLine:{
lineStyle:{
color:'#09F'
}
},
axisTick:{
lineStyle:{
color:'#09F'
}
}
},
yAxis: {
inverse: false,
splitArea: {show: false},
axisLine: {show: false},
axisTick: {show: false},
axisLabel: {
textStyle: {
color: '#B7E1FF',
fontSize:24,
fontFamily:'Arial',
}
},
splitLine :{
lineStyle:{
color:'#09F'
}
}
},
tooltip: {
trigger: 'axis',
textStyle: {
color: '#FFF',
fontSize:24
}
},
grid: {
left: 100
},
legend:{
show:false,
top: 'bottom',
textStyle: {
color: '#F00',
fontSize:24
},
data:['计划完成数','实际完成数']
},
series: [
{
name: '计划完成数',
type: 'bar',
itemStyle:
{
normal: {color: color[1]},
emphasis: {color: color[2]}
},
barWidth : 40,
data:plan_data1
},
{
name: '实际完成数',
type: 'line',
itemStyle: {
normal: {
color: '#F90',
label: {
show: true,
position: 'top',
textStyle: {
color: '#CCC',
fontSize:24
}
},
lineStyle:{
color:'#F90',
width:4
}
},
emphasis: {
color: '#FF0'
}
},
symbolSize: 24,
data: plan_data2
}
]
};
plan_chart.setOption(plan_option);
//轮番显示tips
function clock(){
showToolTip_highlight(plan_chart);
}
setInterval(clock, 5000);
//地图开始
var map_chart = echarts.init(document.getElementById('map'));
var CCData = [
[{name:'长春'}, {name:'上海',value:95}],
[{name:'长春'}, {name:'广州',value:90}],
[{name:'长春'}, {name:'大连',value:80}],
[{name:'长春'}, {name:'南宁',value:70}],
[{name:'长春'}, {name:'南昌',value:60}],
[{name:'长春'}, {name:'拉萨',value:50}],
[{name:'长春'}, {name:'长春',value:40}],
[{name:'长春'}, {name:'包头',value:30}],
[{name:'长春'}, {name:'重庆',value:20}],
[{name:'长春'}, {name:'北京',value:10}]
];
var series = [];
[['长春', CCData]].forEach(function (item, i) {
series.push({
name: '一汽汽车销售',
type: 'lines',
zlevel: 1,
effect: {
show: true,
period: 6,
trailLength: 0.7,
color: '#FF0',
symbolSize: 3
},
lineStyle: {
normal: {
color: '#000',
width: 0,
curveness: 0.2
}
},
data: convertData(item[1])
},
{
name: '一汽汽车销售',
type: 'lines',
zlevel: 2,
symbol: ['none', 'arrow'],
symbolSize: 10,
lineStyle: {
normal: {
color: '#FF0',
width: 1,
opacity: 0.6,
curveness: 0.2
}
},
data: convertData(item[1])
},
{
name: '一汽汽车销售',
type: 'effectScatter',
coordinateSystem: 'geo',
zlevel: 2,
rippleEffect: {
brushType: 'stroke'
},
label: {
normal: {
show: true,
position: 'right',
formatter: '{b}'
}
},
symbolSize: function (val) {
return 15;
},
itemStyle: {
normal: {
color: '#FFF',
label: {
show: true,
position: 'top',
textStyle: {
color: '#FFF',
fontSize:24
}
}
}
},
data: item[1].map(function (dataItem) {
return {
name: dataItem[1].name,
value: geoCoordMap[dataItem[1].name].concat([dataItem[1].value])
};
})
});
});
map_option = {
backgroundColor: '',
title : {
show:false,
text: '一汽汽车销售地域分布示意图',
subtext: '截至2018年05月04日',
left: 'center',
top:10,
textStyle : {
color: '#09F',
fontSize:32
},
subtextStyle:{
color: '#09F',
fontSize:24
}
},
tooltip : {
trigger: 'item'
},
legend: {
show:false,
orient: 'vertical',
top: 'bottom',
left: 'right',
data:['一汽汽车销售'],
textStyle: {
color: '#000'
},
selectedMode: 'single'
},
geo: {
map: 'china',
label: {
emphasis: {
show: false
}
},
roam: true,
itemStyle: {
normal: {
areaColor: '#09F',
borderColor: '#09F',
opacity:0.5
},
emphasis: {
areaColor: '#09F',
borderColor: '#09F',
opacity:0.8
}
}
},
series: series
};
map_chart.setOption(map_option, true);
resresh();
//开始定时刷新
setInterval(resresh, 5*1000);
});
var convertData = function (data) {
var res = [];
for (var i = 0; i < data.length; i++) {
var dataItem = data[i];
var fromCoord = geoCoordMap[dataItem[0].name];
var toCoord = geoCoordMap[dataItem[1].name];
if (fromCoord && toCoord) {
res.push({
fromName: dataItem[0].name,
toName: dataItem[1].name,
coords: [fromCoord, toCoord]
});
}
}
return res;
};
function showToolTip_highlight(mychart)
{
var echartObj = mychart;
// 高亮当前图形
var highlight =setInterval(function()
{
echartObj.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: indexnum
});
echartObj.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: indexnum
});
clearInterval(highlight);
indexnum = indexnum + 1;
if(indexnum>=7) indexnum=0;
},1000);
}
//定时刷新数据
function resresh()
{
var myDate = new Date();
// $('#refresh').html("<img src=\"images/wait.gif\" align=\"absmiddle\"><span>数据刷新中...</span>");
//年月日刷新
$('#currentYear').html(myDate.getFullYear()+"");
$('#currentMonth').html(insertZero(myDate.getMonth()+1)+"");
$('#currentDay').html(insertZero(myDate.getDate())+"");
$('#currentDate').html(myDate.getFullYear()+"/"+insertZero(myDate.getMonth()+1)+"/"+insertZero(myDate.getDate()));
option_gauge.series[0].axisLabel.show=true;
option_gauge.series[0].axisLine.lineStyle.color=[[0.2, color[0]],[0.8, color[1]],[1, color[2]]]
var maxg=Math.round(Math.random()*500)+400;
var n1=Math.round(Math.random()*(maxg-100))+100;
var n2=Math.round(Math.random()*(n1-50))+50;
var n3=(n2/maxg*100).toFixed(2);
//年进度条
option_Progress.title.text ="计划生产";
option_Progress.series[0].data[0].value = maxg;
option_Progress.title.subtext =maxg+"";
option_Progress.series[0].data[1].value =0;
y_gauge1.setOption(option_Progress);
option_Progress.title.text ="已接订单";
option_Progress.series[0].data[0].value = n1;
option_Progress.title.subtext =n1+"";
option_Progress.series[0].data[1].value =(maxg-n1);
y_gauge2.setOption(option_Progress);
option_Progress.title.text ="已经完成";
option_Progress.series[0].data[0].value = n2;
option_Progress.title.subtext =n2+"";
option_Progress.series[0].data[1].value =(maxg-n2);
y_gauge3.setOption(option_Progress);
option_Progress.title.text ="计划完成率";
option_Progress.series[0].data[0].value = n3;
option_Progress.title.subtext =n3+"%";
option_Progress.series[0].data[1].value =(100-n3);
y_gauge4.setOption(option_Progress);
//月进度条
maxg=Math.round(Math.random()*maxg)+1;
n1=Math.round(Math.random()*maxg)+1;
n2=Math.round(Math.random()*n1);
n3=(n2/maxg*100).toFixed(2);
option_Progress.title.text ="计划生产";
option_Progress.series[0].data[0].value = maxg;
option_Progress.title.subtext =maxg+"";
option_Progress.series[0].data[1].value =0;
m_gauge1.setOption(option_Progress);
option_Progress.title.text ="已接订单";
option_Progress.series[0].data[0].value = n1;
option_Progress.title.subtext =n1+"";
option_Progress.series[0].data[1].value =(maxg-n1);
m_gauge2.setOption(option_Progress);
option_Progress.title.text ="已经完成";
option_Progress.series[0].data[0].value = n2;
option_Progress.title.subtext =n2+"";
option_Progress.series[0].data[1].value =(maxg-n2);
m_gauge3.setOption(option_Progress);
option_Progress.title.text ="计划完成率";
option_Progress.series[0].data[0].value = n3;
option_Progress.title.subtext =n3+"%";
option_Progress.series[0].data[1].value =(100-n3);
m_gauge4.setOption(option_Progress);
//日进度条
maxg=Math.round(Math.random()*maxg)+1;
n1=Math.round(Math.random()*maxg)+1;
n2=Math.round(Math.random()*n1);
n3=(n2/maxg*100).toFixed(2);
option_Progress.title.text ="计划生产";
option_Progress.series[0].data[0].value = maxg;
option_Progress.title.subtext =maxg+"";
option_Progress.series[0].data[1].value =0;
d_gauge1.setOption(option_Progress);
option_Progress.title.text ="已接订单";
option_Progress.series[0].data[0].value = n1;
option_Progress.title.subtext =n1+"";
option_Progress.series[0].data[1].value =(maxg-n1);
d_gauge2.setOption(option_Progress);
option_Progress.title.text ="已经完成";
option_Progress.series[0].data[0].value = n2;
option_Progress.title.subtext =n2+"";
option_Progress.series[0].data[1].value =(maxg-n2);
d_gauge3.setOption(option_Progress);
option_Progress.title.text ="计划完成率";
option_Progress.series[0].data[0].value = n3;
option_Progress.title.subtext =n3+"%";
option_Progress.series[0].data[1].value =(100-n3);
d_gauge4.setOption(option_Progress);
//仪表盘刷新
option_gauge.series[0].axisLine.lineStyle.color=[[0.2, color[0]],[0.8, color[1]],[1, color[0]]];
option_gauge.series[0].data[0].value = (Math.random() * 100).toFixed(2) - 0;
option_gauge.series[0].data[0].name ="";
$('#vg1').html(option_gauge.series[0].data[0].value);
gauge1.setOption(option_gauge);
option_gauge.series[0].data[0].value = (Math.random() * 100).toFixed(2) - 0;
option_gauge.series[0].data[0].name ="";
$('#vg2').html(option_gauge.series[0].data[0].value);
gauge2.setOption(option_gauge);
option_gauge.series[0].data[0].value = (Math.random() * 100).toFixed(2) - 0;
option_gauge.series[0].data[0].name ="天然气";
$('#vg3').html(option_gauge.series[0].data[0].value);
gauge3.setOption(option_gauge);
option_gauge.series[0].data[0].value = (Math.random() * 100).toFixed(2) - 0;
option_gauge.series[0].data[0].name ="压缩空气";
$('#vg4').html(option_gauge.series[0].data[0].value);
gauge4.setOption(option_gauge);
option_gauge.series[0].data[0].value = (Math.random() * 100).toFixed(2) - 0;
option_gauge.series[0].data[0].name ="蒸汽";
$('#vg5').html(option_gauge.series[0].data[0].value);
gauge5.setOption(option_gauge);
//显示最后更新时间
$('#refresh').html("<span id=\"refreshTime\">最后刷新时间:"+myDate.toLocaleDateString()+" "+myDate.toLocaleTimeString()+"</span>");
}
//生成订单号
function getOrderNumber(n)
{
var no="000000"+n.toString();
return no.substring(no.length-6);
}
//前面补0
function insertZero(n)
{
var no="000000"+n.toString();
return no.substring(no.length-2);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,116 @@
var geoCoordMap = {
'上海': [121.4648,31.2891],
'东莞': [113.8953,22.901],
'东营': [118.7073,37.5513],
'中山': [113.4229,22.478],
'临汾': [111.4783,36.1615],
'临沂': [118.3118,35.2936],
'丹东': [124.541,40.4242],
'丽水': [119.5642,28.1854],
'乌鲁木齐': [87.9236,43.5883],
'佛山': [112.8955,23.1097],
'保定': [115.0488,39.0948],
'兰州': [103.5901,36.3043],
'包头': [110.3467,41.4899],
'北京': [116.4551,40.2539],
'北海': [109.314,21.6211],
'南京': [118.8062,31.9208],
'南宁': [108.479,23.1152],
'南昌': [116.0046,28.6633],
'南通': [121.1023,32.1625],
'厦门': [118.1689,24.6478],
'台州': [121.1353,28.6688],
'合肥': [117.29,32.0581],
'呼和浩特': [111.4124,40.4901],
'咸阳': [108.4131,34.8706],
'哈尔滨': [127.9688,45.368],
'唐山': [118.4766,39.6826],
'嘉兴': [120.9155,30.6354],
'大同': [113.7854,39.8035],
'大连': [122.2229,39.4409],
'天津': [117.4219,39.4189],
'太原': [112.3352,37.9413],
'威海': [121.9482,37.1393],
'宁波': [121.5967,29.6466],
'宝鸡': [107.1826,34.3433],
'宿迁': [118.5535,33.7775],
'常州': [119.4543,31.5582],
'广州': [113.5107,23.2196],
'廊坊': [116.521,39.0509],
'延安': [109.1052,36.4252],
'张家口': [115.1477,40.8527],
'徐州': [117.5208,34.3268],
'德州': [116.6858,37.2107],
'惠州': [114.6204,23.1647],
'成都': [103.9526,30.7617],
'扬州': [119.4653,32.8162],
'承德': [117.5757,41.4075],
'拉萨': [91.1865,30.1465],
'无锡': [120.3442,31.5527],
'日照': [119.2786,35.5023],
'昆明': [102.9199,25.4663],
'杭州': [119.5313,29.8773],
'枣庄': [117.323,34.8926],
'柳州': [109.3799,24.9774],
'株洲': [113.5327,27.0319],
'武汉': [114.3896,30.6628],
'汕头': [117.1692,23.3405],
'江门': [112.6318,22.1484],
'沈阳': [123.1238,42.1216],
'沧州': [116.8286,38.2104],
'河源': [114.917,23.9722],
'泉州': [118.3228,25.1147],
'泰安': [117.0264,36.0516],
'泰州': [120.0586,32.5525],
'济南': [117.1582,36.8701],
'济宁': [116.8286,35.3375],
'海口': [110.3893,19.8516],
'淄博': [118.0371,36.6064],
'淮安': [118.927,33.4039],
'深圳': [114.5435,22.5439],
'清远': [112.9175,24.3292],
'温州': [120.498,27.8119],
'渭南': [109.7864,35.0299],
'湖州': [119.8608,30.7782],
'湘潭': [112.5439,27.7075],
'滨州': [117.8174,37.4963],
'潍坊': [119.0918,36.524],
'烟台': [120.7397,37.5128],
'玉溪': [101.9312,23.8898],
'珠海': [113.7305,22.1155],
'盐城': [120.2234,33.5577],
'盘锦': [121.9482,41.0449],
'石家庄': [114.4995,38.1006],
'福州': [119.4543,25.9222],
'秦皇岛': [119.2126,40.0232],
'绍兴': [120.564,29.7565],
'聊城': [115.9167,36.4032],
'肇庆': [112.1265,23.5822],
'舟山': [122.2559,30.2234],
'苏州': [120.6519,31.3989],
'莱芜': [117.6526,36.2714],
'菏泽': [115.6201,35.2057],
'营口': [122.4316,40.4297],
'葫芦岛': [120.1575,40.578],
'衡水': [115.8838,37.7161],
'衢州': [118.6853,28.8666],
'西宁': [101.4038,36.8207],
'西安': [109.1162,34.2004],
'贵阳': [106.6992,26.7682],
'连云港': [119.1248,34.552],
'邢台': [114.8071,37.2821],
'邯郸': [114.4775,36.535],
'郑州': [113.4668,34.6234],
'鄂尔多斯': [108.9734,39.2487],
'重庆': [107.7539,30.1904],
'金华': [120.0037,29.1028],
'铜川': [109.0393,35.1947],
'银川': [106.3586,38.1775],
'镇江': [119.4763,31.9702],
'长春': [125.8154,44.2584],
'长沙': [113.0823,28.2568],
'长治': [112.8625,36.4746],
'阳泉': [113.4778,38.0951],
'青岛': [120.4651,36.3373],
'韶关': [113.7964,24.7028]
};

View File

@ -0,0 +1,28 @@
window.onresize = function() {
setAppScale();
};
function setAppScale() {
var ratioY = $(window).height()/1536;
var ratioX = $(window).width()/4352;
var screenWidth = window.screen.width;
var screenHeigth = window.screen.height;
if (screenWidth >= 960) {
ratioX = 0.62
}
if(screenHeigth <= 1080){
ratioY = 0.62
}
$("body").css({
transform: "scale("+ ratioX+","+ ratioY+")",
transformOrigin: "left top",
overflow:"visible"
});
}
$().ready(function(){
//初始化时调整大小
setAppScale();
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1001 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1015 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 709 B

Some files were not shown because too many files have changed in this diff Show More