#V3重大更新,升级JDK17,升级SpirngBoot3.5.1
| | |
| | | <parent> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-parent</artifactId> |
| | | <version>2.5.14</version> |
| | | <version>3.5.10</version> |
| | | <relativePath/> <!-- lookup parent from repository --> |
| | | </parent> |
| | | <groupId>com.zy</groupId> |
| | |
| | | <packaging>war</packaging> |
| | | |
| | | <properties> |
| | | <java.version>1.8</java.version> |
| | | <mysql-driver.version>5.1.47</mysql-driver.version> |
| | | <mybatis-plus.version>2.3.2</mybatis-plus.version> |
| | | <java.version>17</java.version> |
| | | <maven.compiler.release>${java.version}</maven.compiler.release> |
| | | <mybatis-plus.version>3.5.14</mybatis-plus.version> |
| | | <fastjson.version>1.2.83</fastjson.version> |
| | | <springfox.version>2.7.0</springfox.version> |
| | | <ortools.version>9.10.4067</ortools.version> |
| | | <lombok.version>1.18.38</lombok.version> |
| | | <mssql-jdbc.version>12.10.0.jre11</mssql-jdbc.version> |
| | | <swagger-annotations.version>1.6.16</swagger-annotations.version> |
| | | <springdoc.version>2.8.9</springdoc.version> |
| | | <spring-ai.version>1.1.2</spring-ai.version> |
| | | </properties> |
| | | |
| | | <dependencyManagement> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>org.springframework.ai</groupId> |
| | | <artifactId>spring-ai-bom</artifactId> |
| | | <version>${spring-ai.version}</version> |
| | | <type>pom</type> |
| | | <scope>import</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | </dependencyManagement> |
| | | |
| | | <dependencies> |
| | | <dependency> |
| | |
| | | <artifactId>spring-boot-starter-data-redis</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>mysql</groupId> |
| | | <artifactId>mysql-connector-java</artifactId> |
| | | <version>5.1.46</version> |
| | | <groupId>com.mysql</groupId> |
| | | <artifactId>mysql-connector-j</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.microsoft.sqlserver</groupId> |
| | | <artifactId>mssql-jdbc</artifactId> |
| | | <version>8.2.2.jre8</version> |
| | | <version>${mssql-jdbc.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.baomidou</groupId> |
| | | <artifactId>mybatis-plus-boot-starter</artifactId> |
| | | <artifactId>mybatis-plus-spring-boot3-starter</artifactId> |
| | | <version>${mybatis-plus.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.baomidou</groupId> |
| | | <artifactId>mybatis-plus-jsqlparser</artifactId> |
| | | <version>${mybatis-plus.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | |
| | | <version>${fastjson.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger2</artifactId> |
| | | <version>${springfox.version}</version> |
| | | <groupId>org.springdoc</groupId> |
| | | <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId> |
| | | <version>${springdoc.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger-ui</artifactId> |
| | | <version>${springfox.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.github.xiaoymin</groupId> |
| | | <artifactId>swagger-bootstrap-ui</artifactId> |
| | | <version>1.8.9</version> |
| | | <groupId>io.swagger</groupId> |
| | | <artifactId>swagger-annotations</artifactId> |
| | | <version>${swagger-annotations.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.zxing</groupId> |
| | |
| | | <dependency> |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | <version>1.16.22</version> |
| | | <version>${lombok.version}</version> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | <dependency> |
| | |
| | | <artifactId>spring-boot-starter-actuator</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.ai</groupId> |
| | | <artifactId>spring-ai-openai</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.ortools</groupId> |
| | | <artifactId>ortools-java</artifactId> |
| | | <version>${ortools.version}</version> |
| | |
| | | <finalName>wcs</finalName> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-compiler-plugin</artifactId> |
| | | <configuration> |
| | | <release>${maven.compiler.release}</release> |
| | | <annotationProcessorPaths> |
| | | <path> |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | <version>${lombok.version}</version> |
| | | </path> |
| | | </annotationProcessorPaths> |
| | | </configuration> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-war-plugin</artifactId> |
| | | <configuration> |
| | | <failOnMissingWebXml>false</failOnMissingWebXml> |
| | | </configuration> |
| | | <!-- <configuration>--> |
| | | <!-- <webResources>--> |
| | | <!-- <resource>--> |
| | |
| | | package com.core.config; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.PaginationInterceptor; |
| | | import com.baomidou.mybatisplus.annotation.DbType; |
| | | import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; |
| | | import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.core.common.SpringUtils; |
| | | import org.springframework.context.annotation.Bean; |
| | |
| | | public class CoolBaseConfig { |
| | | |
| | | @Bean |
| | | public PaginationInterceptor paginationInterceptor() { |
| | | return new PaginationInterceptor(); |
| | | public MybatisPlusInterceptor mybatisPlusInterceptor() { |
| | | MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); |
| | | interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); |
| | | return interceptor; |
| | | } |
| | | |
| | | @Bean |
| | |
| | | String jdbcUrl = url; |
| | | switch (sqlOsType) { |
| | | case MYSQL: |
| | | Class.forName("com.mysql.jdbc.Driver"); |
| | | Class.forName("com.mysql.cj.jdbc.Driver"); |
| | | if (!jdbcUrl.startsWith("jdbc:mysql://")) { |
| | | jdbcUrl = "jdbc:mysql://" + jdbcUrl; |
| | | } |
| | |
| | | imports.add("import com.core.common.SpringUtils;"); |
| | | } |
| | | if (hasTableId) { |
| | | imports.add("import com.baomidou.mybatisplus.annotations.TableId;"); |
| | | imports.add("import com.baomidou.mybatisplus.enums.IdType;"); |
| | | imports.add("import com.baomidou.mybatisplus.annotation.TableId;"); |
| | | imports.add("import com.baomidou.mybatisplus.annotation.IdType;"); |
| | | } |
| | | if (hasTableLogic) { |
| | | imports.add("import com.baomidou.mybatisplus.annotations.TableLogic;"); |
| | | imports.add("import com.baomidou.mybatisplus.annotation.TableLogic;"); |
| | | } |
| | | if (hasTableField) { |
| | | imports.add("import com.baomidou.mybatisplus.annotations.TableField;"); |
| | | imports.add("import com.baomidou.mybatisplus.annotation.TableField;"); |
| | | } |
| | | if (hasDate) { |
| | | imports.add("import java.text.SimpleDateFormat;"); |
| | |
| | | builder.append(" ").append(column.getForeignKey()).append("Service service = SpringUtils.getBean(") |
| | | .append(column.getForeignKey()).append("Service.class);\n"); |
| | | builder.append(" ").append(column.getForeignKey()).append(" ") |
| | | .append(GeneratorUtils.firstCharConvert(column.getForeignKey())).append(" = service.selectById(this.") |
| | | .append(GeneratorUtils.firstCharConvert(column.getForeignKey())).append(" = service.getById(this.") |
| | | .append(field).append(");\n"); |
| | | builder.append(" if (!Cools.isEmpty(").append(GeneratorUtils.firstCharConvert(column.getForeignKey())) |
| | | .append(")){\n"); |
| | |
| | | |
| | | @EnableAsync |
| | | @EnableScheduling |
| | | @SpringBootApplication |
| | | @SpringBootApplication(scanBasePackages = {"com.zy", "com.core"}) |
| | | public class Boot extends SpringBootServletInitializer { |
| | | |
| | | public static void main(String[] args) { |
| | |
| | | package com.zy.ai.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.R; |
| | | import com.zy.ai.entity.LlmCallLog; |
| | |
| | | @RequestParam(required = false) Integer success, |
| | | @RequestParam(required = false) Long routeId, |
| | | @RequestParam(required = false) String traceId) { |
| | | EntityWrapper<LlmCallLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<LlmCallLog> wrapper = new QueryWrapper<>(); |
| | | if (!isBlank(scene)) { |
| | | wrapper.eq("scene", scene.trim()); |
| | | } |
| | |
| | | if (!isBlank(traceId)) { |
| | | wrapper.eq("trace_id", traceId.trim()); |
| | | } |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(llmCallLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderBy(true, false, "id"); |
| | | return R.ok(llmCallLogService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | @PostMapping("/delete/auth") |
| | |
| | | if (id == null) { |
| | | return R.error("id不能为空"); |
| | | } |
| | | llmCallLogService.deleteById(id); |
| | | llmCallLogService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/clear/auth") |
| | | @ManagerAuth |
| | | public R clear() { |
| | | llmCallLogService.delete(new EntityWrapper<LlmCallLog>()); |
| | | llmCallLogService.remove(new QueryWrapper<LlmCallLog>()); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | package com.zy.ai.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.R; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | |
| | | @GetMapping("/list/auth") |
| | | @ManagerAuth |
| | | public R list() { |
| | | EntityWrapper<LlmRouteConfig> wrapper = new EntityWrapper<>(); |
| | | wrapper.orderBy("priority", true).orderBy("id", true); |
| | | List<LlmRouteConfig> list = llmRouteConfigService.selectList(wrapper); |
| | | QueryWrapper<LlmRouteConfig> wrapper = new QueryWrapper<>(); |
| | | wrapper.orderBy(true, true, "priority").orderBy(true, true, "id"); |
| | | List<LlmRouteConfig> list = llmRouteConfigService.list(wrapper); |
| | | return R.ok(list); |
| | | } |
| | | |
| | |
| | | |
| | | if (config.getId() == null) { |
| | | llmRoutingService.fillAndNormalize(config, true); |
| | | llmRouteConfigService.insert(config); |
| | | llmRouteConfigService.save(config); |
| | | } else { |
| | | LlmRouteConfig db = llmRouteConfigService.selectById(config.getId()); |
| | | LlmRouteConfig db = llmRouteConfigService.getById(config.getId()); |
| | | if (db == null) { |
| | | return R.error("配置不存在"); |
| | | } |
| | |
| | | if (id == null) { |
| | | return R.error("id不能为空"); |
| | | } |
| | | llmRouteConfigService.deleteById(id); |
| | | llmRouteConfigService.removeById(id); |
| | | llmRoutingService.evictCache(); |
| | | return R.ok(); |
| | | } |
| | |
| | | if (id == null) { |
| | | return R.error("id不能为空"); |
| | | } |
| | | LlmRouteConfig cfg = llmRouteConfigService.selectById(id); |
| | | LlmRouteConfig cfg = llmRouteConfigService.getById(id); |
| | | if (cfg == null) { |
| | | return R.error("配置不存在"); |
| | | } |
| | |
| | | } |
| | | Map<String, Object> data = llmRoutingService.testRoute(config); |
| | | if (Boolean.TRUE.equals(data.get("ok")) && config.getId() != null) { |
| | | LlmRouteConfig db = llmRouteConfigService.selectById(config.getId()); |
| | | LlmRouteConfig db = llmRouteConfigService.getById(config.getId()); |
| | | if (db != null) { |
| | | db.setCooldownUntil(null); |
| | | db.setConsecutiveFailCount(0); |
| | |
| | | @GetMapping("/export/auth") |
| | | @ManagerAuth |
| | | public R exportConfig() { |
| | | EntityWrapper<LlmRouteConfig> wrapper = new EntityWrapper<>(); |
| | | wrapper.orderBy("priority", true).orderBy("id", true); |
| | | List<LlmRouteConfig> list = llmRouteConfigService.selectList(wrapper); |
| | | QueryWrapper<LlmRouteConfig> wrapper = new QueryWrapper<>(); |
| | | wrapper.orderBy(true, true, "priority").orderBy(true, true, "id"); |
| | | List<LlmRouteConfig> list = llmRouteConfigService.list(wrapper); |
| | | List<Map<String, Object>> routes = new ArrayList<>(); |
| | | if (list != null) { |
| | | for (LlmRouteConfig cfg : list) { |
| | |
| | | } |
| | | |
| | | if (replace) { |
| | | llmRouteConfigService.delete(new EntityWrapper<LlmRouteConfig>()); |
| | | llmRouteConfigService.remove(new QueryWrapper<LlmRouteConfig>()); |
| | | } |
| | | |
| | | HashMap<Long, LlmRouteConfig> dbById = new HashMap<>(); |
| | | if (!replace) { |
| | | List<LlmRouteConfig> current = llmRouteConfigService.selectList(new EntityWrapper<>()); |
| | | List<LlmRouteConfig> current = llmRouteConfigService.list(new QueryWrapper<>()); |
| | | if (current != null) { |
| | | for (LlmRouteConfig item : current) { |
| | | if (item != null && item.getId() != null) { |
| | |
| | | cfg.setLastUsedTime(null); |
| | | cfg.setLastError(null); |
| | | llmRoutingService.fillAndNormalize(cfg, true); |
| | | llmRouteConfigService.insert(cfg); |
| | | llmRouteConfigService.save(cfg); |
| | | inserted++; |
| | | } |
| | | |
| | |
| | | package com.zy.ai.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | |
| | | package com.zy.ai.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | |
| | | package com.zy.ai.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.ai.entity.LlmCallLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.ai.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.ai.entity.LlmRouteConfig; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import jakarta.annotation.PostConstruct; |
| | | import java.util.*; |
| | | |
| | | @Slf4j |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.ai.entity.DeviceConfigsData; |
| | | import com.zy.ai.log.AiLogAppender; |
| | | import com.zy.ai.mcp.service.WcsDataFacade; |
| | |
| | | @Override |
| | | public Object getCrnDeviceStatus(JSONObject args) { |
| | | List<Integer> deviceNoList = optIntList(args, "crnNos"); |
| | | EntityWrapper<BasCrnp> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasCrnp> wrapper = new QueryWrapper<>(); |
| | | if (deviceNoList != null && deviceNoList.size() > 0) { |
| | | wrapper.in("crn_no", deviceNoList); |
| | | } |
| | | JSONObject data = new JSONObject(); |
| | | |
| | | List<Object> deviceList = new ArrayList<>(); |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(wrapper); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(wrapper); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, basCrnp.getCrnNo()); |
| | | if (crnThread == null) { |
| | |
| | | |
| | | @Override |
| | | public Object getStationDeviceStatus(JSONObject args) { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<>()); |
| | | JSONObject data = new JSONObject(); |
| | | |
| | | List<Object> stationList = new ArrayList<>(); |
| | |
| | | @Override |
| | | public Object getRgvDeviceStatus(JSONObject args) { |
| | | List<Integer> deviceNoList = optIntList(args, "rgvNos"); |
| | | EntityWrapper<BasRgv> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasRgv> wrapper = new QueryWrapper<>(); |
| | | if (deviceNoList != null && deviceNoList.size() > 0) { |
| | | wrapper.in("rgv_no", deviceNoList); |
| | | } |
| | | JSONObject data = new JSONObject(); |
| | | |
| | | List<Object> deviceList = new ArrayList<>(); |
| | | List<BasRgv> basRgvs = basRgvService.selectList(wrapper); |
| | | List<BasRgv> basRgvs = basRgvService.list(wrapper); |
| | | for (BasRgv basRgv : basRgvs) { |
| | | RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, basRgv.getRgvNo()); |
| | | if (rgvThread == null) { |
| | |
| | | List<Integer> taskNos = optIntList(args, "taskNos"); |
| | | int limit = optInt(args, "limit", 200); |
| | | |
| | | EntityWrapper<WrkMast> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<WrkMast> wrapper = new QueryWrapper<>(); |
| | | if (taskNos != null && taskNos.size() > 0) { |
| | | wrapper.in("wrk_no", taskNos); |
| | | } |
| | |
| | | wrapper.eq("rgv_no", rgvNo); |
| | | } |
| | | |
| | | List<WrkMast> tasks = wrkMastService.selectList(wrapper); |
| | | List<WrkMast> tasks = wrkMastService.list(wrapper); |
| | | JSONObject data = new JSONObject(); |
| | | data.put("tasks", tasks); |
| | | return data; |
| | |
| | | List<DeviceConfigsData> deviceConfigsDataList = new ArrayList<>(); |
| | | |
| | | List<Integer> crnNoList = optIntList(args, "crnNos"); |
| | | EntityWrapper<BasCrnp> crnWrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasCrnp> crnWrapper = new QueryWrapper<>(); |
| | | if (crnNoList != null && crnNoList.size() > 0) { |
| | | crnWrapper.in("crn_no", crnNoList); |
| | | } |
| | | |
| | | List<Integer> rgvNoList = optIntList(args, "rgvNos"); |
| | | EntityWrapper<BasRgv> rgvWrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasRgv> rgvWrapper = new QueryWrapper<>(); |
| | | if (rgvNoList != null && rgvNoList.size() > 0) { |
| | | rgvWrapper.in("rgv_no", rgvNoList); |
| | | } |
| | | |
| | | List<Integer> devpNoList = optIntList(args, "devpNos"); |
| | | EntityWrapper<BasDevp> devpWrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDevp> devpWrapper = new QueryWrapper<>(); |
| | | if (devpNoList != null && devpNoList.size() > 0) { |
| | | devpWrapper.in("devp_no", devpNoList); |
| | | } |
| | | |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(crnWrapper); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(crnWrapper); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | DeviceConfigsData deviceConfigsData = new DeviceConfigsData(); |
| | | deviceConfigsData.setDeviceNo(basCrnp.getCrnNo()); |
| | |
| | | deviceConfigsDataList.add(deviceConfigsData); |
| | | } |
| | | |
| | | List<BasRgv> basRgvs = basRgvService.selectList(rgvWrapper); |
| | | List<BasRgv> basRgvs = basRgvService.list(rgvWrapper); |
| | | for (BasRgv basRgv : basRgvs) { |
| | | DeviceConfigsData deviceConfigsData = new DeviceConfigsData(); |
| | | deviceConfigsData.setDeviceNo(basRgv.getRgvNo()); |
| | |
| | | deviceConfigsDataList.add(deviceConfigsData); |
| | | } |
| | | |
| | | List<BasDevp> basDevps = basDevpService.selectList(devpWrapper); |
| | | List<BasDevp> basDevps = basDevpService.list(devpWrapper); |
| | | for (BasDevp basDevp : basDevps) { |
| | | DeviceConfigsData deviceConfigsData = new DeviceConfigsData(); |
| | | deviceConfigsData.setDeviceNo(basDevp.getDevpNo()); |
| | |
| | | @Override |
| | | public Object getSystemConfig(JSONObject args) { |
| | | JSONObject data = new JSONObject(); |
| | | List<Config> systemConfigList = configService.selectList(new EntityWrapper<Config>().notIn("dingdingReportUrl")); |
| | | List<Config> systemConfigList = configService.list(new QueryWrapper<Config>().ne("code", "dingdingReportUrl")); |
| | | data.put("systemConfigs", systemConfigList); |
| | | return data; |
| | | } |
| | |
| | | } |
| | | return list; |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.zy.ai.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.ai.entity.LlmCallLog; |
| | | |
| | | public interface LlmCallLogService extends IService<LlmCallLog> { |
| | |
| | | import com.zy.ai.entity.LlmRouteConfig; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.ai.openai.api.OpenAiApi; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestClientResponseException; |
| | | import org.springframework.web.reactive.function.client.WebClient; |
| | | import org.springframework.web.reactive.function.client.WebClientResponseException; |
| | | import reactor.core.publisher.Flux; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | import java.util.Objects; |
| | | import java.util.UUID; |
| | | import java.util.concurrent.LinkedBlockingQueue; |
| | | import java.util.concurrent.TimeUnit; |
| | |
| | | drain.setDaemon(true); |
| | | drain.start(); |
| | | |
| | | streamFlux(route, routeReq).subscribe(payload -> { |
| | | boolean springAiStreaming = canUseSpringAi(routeReq); |
| | | Flux<String> streamSource = springAiStreaming ? streamFluxWithSpringAi(route, routeReq) : streamFlux(route, routeReq); |
| | | streamSource.subscribe(payload -> { |
| | | if (payload == null || payload.isEmpty()) return; |
| | | if (springAiStreaming) { |
| | | queue.offer(payload); |
| | | appendLimited(outputBuffer, payload); |
| | | return; |
| | | } |
| | | String[] events = payload.split("\\r?\\n\\r?\\n"); |
| | | for (String part : events) { |
| | | String s = part; |
| | |
| | | .doOnError(ex -> log.error("调用 LLM 流式失败, route={}", route.tag(), ex)); |
| | | } |
| | | |
| | | private Flux<String> streamFluxWithSpringAi(ResolvedRoute route, ChatCompletionRequest req) { |
| | | OpenAiApi api = buildOpenAiApi(route); |
| | | OpenAiApi.ChatCompletionRequest springReq = buildSpringAiRequest(route, req, true); |
| | | return api.chatCompletionStream(springReq) |
| | | .flatMapIterable(chunk -> chunk == null || chunk.choices() == null ? List.<OpenAiApi.ChatCompletionChunk.ChunkChoice>of() : chunk.choices()) |
| | | .map(OpenAiApi.ChatCompletionChunk.ChunkChoice::delta) |
| | | .filter(Objects::nonNull) |
| | | .map(this::extractSpringAiContent) |
| | | .filter(text -> text != null && !text.isEmpty()) |
| | | .doOnError(ex -> log.error("调用 Spring AI 流式失败, route={}", route.tag(), ex)); |
| | | } |
| | | |
| | | private CompletionCallResult callCompletion(ResolvedRoute route, ChatCompletionRequest req) { |
| | | if (canUseSpringAi(req)) { |
| | | return callCompletionWithSpringAi(route, req); |
| | | } |
| | | return callCompletionWithWebClient(route, req); |
| | | } |
| | | |
| | | private CompletionCallResult callCompletionWithWebClient(ResolvedRoute route, ChatCompletionRequest req) { |
| | | WebClient client = WebClient.builder().baseUrl(route.baseUrl).build(); |
| | | RawCompletionResult raw = client.post() |
| | | .uri("/chat/completions") |
| | |
| | | throw new LlmRouteException(raw.statusCode, raw.payload); |
| | | } |
| | | return new CompletionCallResult(raw.statusCode, raw.payload, parseCompletion(raw.payload)); |
| | | } |
| | | |
| | | private CompletionCallResult callCompletionWithSpringAi(ResolvedRoute route, ChatCompletionRequest req) { |
| | | OpenAiApi api = buildOpenAiApi(route); |
| | | OpenAiApi.ChatCompletionRequest springReq = buildSpringAiRequest(route, req, false); |
| | | ResponseEntity<OpenAiApi.ChatCompletion> entity = api.chatCompletionEntity(springReq); |
| | | OpenAiApi.ChatCompletion body = entity.getBody(); |
| | | return new CompletionCallResult(entity.getStatusCode().value(), |
| | | body == null ? null : JSON.toJSONString(body), |
| | | toLegacyResponse(body)); |
| | | } |
| | | |
| | | private ChatCompletionRequest applyRoute(ChatCompletionRequest req, ResolvedRoute route, boolean stream) { |
| | |
| | | return quota ? route.switchOnQuota : route.switchOnError; |
| | | } |
| | | |
| | | private boolean canUseSpringAi(ChatCompletionRequest req) { |
| | | return req != null && (req.getTools() == null || req.getTools().isEmpty()); |
| | | } |
| | | |
| | | private void markSuccess(ResolvedRoute route) { |
| | | if (route.id != null) { |
| | | llmRoutingService.markSuccess(route.id); |
| | |
| | | } |
| | | return "status=" + e.statusCode + ", body=" + body; |
| | | } |
| | | if (ex instanceof RestClientResponseException) { |
| | | RestClientResponseException e = (RestClientResponseException) ex; |
| | | String body = e.getResponseBodyAsString(); |
| | | if (body != null && body.length() > 240) { |
| | | body = body.substring(0, 240); |
| | | } |
| | | return "status=" + e.getStatusCode().value() + ", body=" + body; |
| | | } |
| | | if (ex instanceof WebClientResponseException) { |
| | | WebClientResponseException e = (WebClientResponseException) ex; |
| | | String body = e.getResponseBodyAsString(); |
| | | if (body != null && body.length() > 240) { |
| | | body = body.substring(0, 240); |
| | | } |
| | | return "status=" + e.getStatusCode().value() + ", body=" + body; |
| | | } |
| | | return ex.getMessage() == null ? ex.toString() : ex.getMessage(); |
| | | } |
| | | |
| | | private boolean isQuotaExhausted(Throwable ex) { |
| | | if (!(ex instanceof LlmRouteException)) return false; |
| | | LlmRouteException e = (LlmRouteException) ex; |
| | | if (e.statusCode == 429) return true; |
| | | String text = (e.body == null ? "" : e.body).toLowerCase(); |
| | | Integer status = statusCodeOf(ex); |
| | | if (status != null && status == 429) { |
| | | return true; |
| | | } |
| | | String text = responseBodyOf(ex); |
| | | text = text == null ? "" : text.toLowerCase(Locale.ROOT); |
| | | return text.contains("insufficient_quota") |
| | | || text.contains("quota") |
| | | || text.contains("余额") |
| | |
| | | if (ex instanceof LlmRouteException) { |
| | | return ((LlmRouteException) ex).statusCode; |
| | | } |
| | | if (ex instanceof RestClientResponseException) { |
| | | return ((RestClientResponseException) ex).getStatusCode().value(); |
| | | } |
| | | if (ex instanceof WebClientResponseException) { |
| | | return ((WebClientResponseException) ex).getStatusCode().value(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | private String responseBodyOf(Throwable ex) { |
| | | if (ex instanceof LlmRouteException) { |
| | | return cut(((LlmRouteException) ex).body, LOG_TEXT_LIMIT); |
| | | } |
| | | if (ex instanceof RestClientResponseException) { |
| | | return cut(((RestClientResponseException) ex).getResponseBodyAsString(), LOG_TEXT_LIMIT); |
| | | } |
| | | if (ex instanceof WebClientResponseException) { |
| | | return cut(((WebClientResponseException) ex).getResponseBodyAsString(), LOG_TEXT_LIMIT); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | return ex == null ? null : ex.getClass().getSimpleName(); |
| | | } |
| | | |
| | | private OpenAiApi buildOpenAiApi(ResolvedRoute route) { |
| | | return OpenAiApi.builder() |
| | | .baseUrl(route.baseUrl) |
| | | .apiKey(route.apiKey) |
| | | .build(); |
| | | } |
| | | |
| | | private OpenAiApi.ChatCompletionRequest buildSpringAiRequest(ResolvedRoute route, |
| | | ChatCompletionRequest req, |
| | | boolean stream) { |
| | | HashMap<String, Object> extraBody = new HashMap<>(); |
| | | if (route.thinkingEnabled || req.getThinking() != null) { |
| | | HashMap<String, Object> thinking = new HashMap<>(); |
| | | thinking.put("type", req.getThinking() != null && req.getThinking().getType() != null |
| | | ? req.getThinking().getType() |
| | | : "enable"); |
| | | extraBody.put("thinking", thinking); |
| | | } |
| | | return new OpenAiApi.ChatCompletionRequest( |
| | | toSpringAiMessages(req.getMessages()), |
| | | route.model, |
| | | null, |
| | | null, |
| | | null, |
| | | null, |
| | | null, |
| | | null, |
| | | req.getMax_tokens(), |
| | | null, |
| | | 1, |
| | | null, |
| | | null, |
| | | null, |
| | | null, |
| | | null, |
| | | null, |
| | | null, |
| | | stream, |
| | | stream ? OpenAiApi.ChatCompletionRequest.StreamOptions.INCLUDE_USAGE : null, |
| | | req.getTemperature(), |
| | | null, |
| | | null, |
| | | null, |
| | | null, |
| | | null, |
| | | null, |
| | | null, |
| | | null, |
| | | null, |
| | | null, |
| | | extraBody.isEmpty() ? null : extraBody |
| | | ); |
| | | } |
| | | |
| | | private List<OpenAiApi.ChatCompletionMessage> toSpringAiMessages(List<ChatCompletionRequest.Message> messages) { |
| | | ArrayList<OpenAiApi.ChatCompletionMessage> result = new ArrayList<>(); |
| | | if (messages == null) { |
| | | return result; |
| | | } |
| | | for (ChatCompletionRequest.Message message : messages) { |
| | | if (message == null) { |
| | | continue; |
| | | } |
| | | result.add(new OpenAiApi.ChatCompletionMessage( |
| | | message.getContent(), |
| | | toSpringAiRole(message.getRole()) |
| | | )); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | private OpenAiApi.ChatCompletionMessage.Role toSpringAiRole(String role) { |
| | | if (role == null) { |
| | | return OpenAiApi.ChatCompletionMessage.Role.USER; |
| | | } |
| | | switch (role.trim().toLowerCase(Locale.ROOT)) { |
| | | case "system": |
| | | return OpenAiApi.ChatCompletionMessage.Role.SYSTEM; |
| | | case "assistant": |
| | | return OpenAiApi.ChatCompletionMessage.Role.ASSISTANT; |
| | | case "tool": |
| | | return OpenAiApi.ChatCompletionMessage.Role.TOOL; |
| | | default: |
| | | return OpenAiApi.ChatCompletionMessage.Role.USER; |
| | | } |
| | | } |
| | | |
| | | private ChatCompletionResponse toLegacyResponse(OpenAiApi.ChatCompletion completion) { |
| | | if (completion == null) { |
| | | return null; |
| | | } |
| | | ChatCompletionResponse response = new ChatCompletionResponse(); |
| | | response.setId(completion.id()); |
| | | response.setCreated(completion.created()); |
| | | response.setObjectName(completion.object()); |
| | | if (completion.usage() != null) { |
| | | ChatCompletionResponse.Usage usage = new ChatCompletionResponse.Usage(); |
| | | usage.setPromptTokens(completion.usage().promptTokens()); |
| | | usage.setCompletionTokens(completion.usage().completionTokens()); |
| | | usage.setTotalTokens(completion.usage().totalTokens()); |
| | | response.setUsage(usage); |
| | | } |
| | | if (completion.choices() != null) { |
| | | ArrayList<ChatCompletionResponse.Choice> choices = new ArrayList<>(); |
| | | for (OpenAiApi.ChatCompletion.Choice choice : completion.choices()) { |
| | | ChatCompletionResponse.Choice item = new ChatCompletionResponse.Choice(); |
| | | item.setIndex(choice.index()); |
| | | if (choice.finishReason() != null) { |
| | | item.setFinishReason(choice.finishReason().name().toLowerCase(Locale.ROOT)); |
| | | } |
| | | item.setMessage(toLegacyMessage(choice.message())); |
| | | choices.add(item); |
| | | } |
| | | response.setChoices(choices); |
| | | } |
| | | return response; |
| | | } |
| | | |
| | | private ChatCompletionRequest.Message toLegacyMessage(OpenAiApi.ChatCompletionMessage message) { |
| | | if (message == null) { |
| | | return null; |
| | | } |
| | | ChatCompletionRequest.Message result = new ChatCompletionRequest.Message(); |
| | | result.setContent(extractSpringAiContent(message)); |
| | | if (message.role() != null) { |
| | | result.setRole(message.role().name().toLowerCase(Locale.ROOT)); |
| | | } |
| | | result.setName(message.name()); |
| | | result.setTool_call_id(message.toolCallId()); |
| | | return result; |
| | | } |
| | | |
| | | private String extractSpringAiContent(OpenAiApi.ChatCompletionMessage message) { |
| | | if (message == null || message.rawContent() == null) { |
| | | return null; |
| | | } |
| | | Object content = message.rawContent(); |
| | | if (content instanceof String) { |
| | | return (String) content; |
| | | } |
| | | if (content instanceof List) { |
| | | try { |
| | | @SuppressWarnings("unchecked") |
| | | List<OpenAiApi.ChatCompletionMessage.MediaContent> media = |
| | | (List<OpenAiApi.ChatCompletionMessage.MediaContent>) content; |
| | | return OpenAiApi.getTextContent(media); |
| | | } catch (ClassCastException ignore) { |
| | | } |
| | | } |
| | | return String.valueOf(content); |
| | | } |
| | | |
| | | private String cut(String text, int maxLen) { |
| | | if (text == null) return null; |
| | | String clean = text.replace("\r", " "); |
| | |
| | | package com.zy.ai.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.ai.entity.LlmRouteConfig; |
| | | |
| | | public interface LlmRouteConfigService extends IService<LlmRouteConfig> { |
| | |
| | | package com.zy.ai.service; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.ai.entity.LlmRouteConfig; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | public void markSuccess(Long routeId) { |
| | | if (routeId == null) return; |
| | | try { |
| | | LlmRouteConfig db = llmRouteConfigService.selectById(routeId); |
| | | LlmRouteConfig db = llmRouteConfigService.getById(routeId); |
| | | if (db == null) return; |
| | | db.setSuccessCount(nvl(db.getSuccessCount()) + 1); |
| | | db.setConsecutiveFailCount(0); |
| | |
| | | public void markFailure(Long routeId, String errorText, boolean enterCooldown, Integer cooldownSeconds) { |
| | | if (routeId == null) return; |
| | | try { |
| | | LlmRouteConfig db = llmRouteConfigService.selectById(routeId); |
| | | LlmRouteConfig db = llmRouteConfigService.getById(routeId); |
| | | if (db == null) return; |
| | | Date now = new Date(); |
| | | db.setFailCount(nvl(db.getFailCount()) + 1); |
| | |
| | | if (now < cacheExpireAt && allRouteCache != null) { |
| | | return allRouteCache; |
| | | } |
| | | EntityWrapper<LlmRouteConfig> wrapper = new EntityWrapper<>(); |
| | | wrapper.orderBy("priority", true).orderBy("id", true); |
| | | List<LlmRouteConfig> list = llmRouteConfigService.selectList(wrapper); |
| | | QueryWrapper<LlmRouteConfig> wrapper = new QueryWrapper<>(); |
| | | wrapper.orderBy(true, true, "priority").orderBy(true, true, "id"); |
| | | List<LlmRouteConfig> list = llmRouteConfigService.list(wrapper); |
| | | if (list == null) { |
| | | allRouteCache = Collections.emptyList(); |
| | | } else { |
| | |
| | | package com.zy.ai.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.ai.entity.LlmCallLog; |
| | | import com.zy.ai.mapper.LlmCallLogMapper; |
| | | import com.zy.ai.service.LlmCallLogService; |
| | |
| | | return; |
| | | } |
| | | try { |
| | | insert(logItem); |
| | | save(logItem); |
| | | } catch (Exception e) { |
| | | String msg = e.getMessage() == null ? "" : e.getMessage(); |
| | | if (msg.contains("doesn't exist") || msg.contains("不存在")) { |
| | |
| | | package com.zy.ai.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.ai.entity.LlmRouteConfig; |
| | | import com.zy.ai.mapper.LlmRouteConfigMapper; |
| | | import com.zy.ai.service.LlmRouteConfigService; |
| | |
| | | package com.zy.ai.utils; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.ai.entity.DeviceConfigsData; |
| | | import com.zy.ai.entity.DeviceRealTimeData; |
| | | import com.zy.ai.entity.WcsDiagnosisRequest; |
| | |
| | | List<String> logs = AiLogAppender.getRecentLogs(logLimit); |
| | | request.setLogs(logs); |
| | | |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<>()); |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<>()); |
| | | request.setTasks(wrkMasts); |
| | | |
| | | List<DeviceRealTimeData> deviceRealTimeDataList = new ArrayList<>(); |
| | | List<DeviceConfigsData> deviceConfigsDataList = new ArrayList<>(); |
| | | |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, basCrnp.getCrnNo()); |
| | | if (crnThread == null) { |
| | |
| | | deviceConfigsDataList.add(deviceConfigsData); |
| | | } |
| | | |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | | if (stationThread == null) { |
| | |
| | | request.setDeviceRealtimeData(deviceRealTimeDataList); |
| | | request.setDeviceConfigs(deviceConfigsDataList); |
| | | |
| | | List<Config> systemConfigList = configService.selectList(new EntityWrapper<Config>().notIn("dingdingReportUrl")); |
| | | List<Config> systemConfigList = configService.list(new QueryWrapper<Config>().ne("code", "dingdingReportUrl")); |
| | | request.setSystemConfigs(systemConfigList); |
| | | |
| | | return request; |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | @RequestMapping(value = "/apiLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(apiLogService.selectById(String.valueOf(id))); |
| | | return R.ok(apiLogService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/apiLog/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<ApiLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<ApiLog> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(ApiLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { |
| | | wrapper.orderBy("create_time", false); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} else { |
| | | wrapper.orderBy(true, false, "create_time"); |
| | | } |
| | | return R.ok(apiLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | return R.ok(apiLogService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/apiLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(ApiLog apiLog) { |
| | | apiLogService.insert(apiLog); |
| | | apiLogService.save(apiLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | apiLogService.deleteById(id); |
| | | apiLogService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/apiLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<ApiLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<ApiLog> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("apiLog")); |
| | | convert(map, wrapper); |
| | | List<ApiLog> list = apiLogService.selectList(wrapper); |
| | | List<ApiLog> list = apiLogService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/apiLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<ApiLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<ApiLog> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("uuid", condition); |
| | | Page<ApiLog> page = apiLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<ApiLog> page = apiLogService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (ApiLog apiLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/apiLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<ApiLog> wrapper = new EntityWrapper<ApiLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != apiLogService.selectOne(wrapper)){ |
| | | QueryWrapper<ApiLog> wrapper = new QueryWrapper<ApiLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != apiLogService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(ApiLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasCrnp; |
| | | import com.zy.asrs.service.BasCrnpService; |
| | |
| | | @RequestMapping(value = "/basCrnp/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basCrnpService.selectById(String.valueOf(id))); |
| | | return R.ok(basCrnpService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnp/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasCrnp> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasCrnp> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasCrnp.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basCrnpService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(basCrnpService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basCrnp/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasCrnp basCrnp) { |
| | | basCrnpService.insert(basCrnp); |
| | | basCrnpService.save(basCrnp); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basCrnpService.deleteById(id); |
| | | basCrnpService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basCrnp/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasCrnp> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasCrnp> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basCrnp")); |
| | | convert(map, wrapper); |
| | | List<BasCrnp> list = basCrnpService.selectList(wrapper); |
| | | List<BasCrnp> list = basCrnpService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnpQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasCrnp> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasCrnp> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("crn_no", condition); |
| | | Page<BasCrnp> page = basCrnpService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasCrnp> page = basCrnpService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasCrnp basCrnp : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basCrnp/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasCrnp> wrapper = new EntityWrapper<BasCrnp>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basCrnpService.selectOne(wrapper)){ |
| | | QueryWrapper<BasCrnp> wrapper = new QueryWrapper<BasCrnp>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basCrnpService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasCrnp.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasCrnpErr; |
| | | import com.zy.asrs.service.BasCrnpErrService; |
| | |
| | | @RequestMapping(value = "/basCrnpErr/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basCrnpErrService.selectById(String.valueOf(id))); |
| | | return R.ok(basCrnpErrService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnpErr/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasCrnpErr> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasCrnpErr> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasCrnpErr.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basCrnpErrService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(basCrnpErrService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basCrnpErr/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasCrnpErr basCrnpErr) { |
| | | basCrnpErrService.insert(basCrnpErr); |
| | | basCrnpErrService.save(basCrnpErr); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basCrnpErrService.deleteById(id); |
| | | basCrnpErrService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basCrnpErr/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasCrnpErr> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasCrnpErr> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basCrnpErr")); |
| | | convert(map, wrapper); |
| | | List<BasCrnpErr> list = basCrnpErrService.selectList(wrapper); |
| | | List<BasCrnpErr> list = basCrnpErrService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnpErrQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasCrnpErr> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasCrnpErr> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasCrnpErr> page = basCrnpErrService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasCrnpErr> page = basCrnpErrService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasCrnpErr basCrnpErr : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basCrnpErr/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasCrnpErr> wrapper = new EntityWrapper<BasCrnpErr>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basCrnpErrService.selectOne(wrapper)){ |
| | | QueryWrapper<BasCrnpErr> wrapper = new QueryWrapper<BasCrnpErr>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basCrnpErrService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasCrnpErr.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasCrnpErrLog; |
| | | import com.zy.asrs.service.BasCrnpErrLogService; |
| | |
| | | @RequestMapping(value = "/basCrnpErrLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basCrnpErrLogService.selectById(String.valueOf(id))); |
| | | return R.ok(basCrnpErrLogService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnpErrLog/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasCrnpErrLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasCrnpErrLog> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasCrnpErrLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basCrnpErrLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(basCrnpErrLogService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basCrnpErrLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasCrnpErrLog basCrnpErrLog) { |
| | | basCrnpErrLogService.insert(basCrnpErrLog); |
| | | basCrnpErrLogService.save(basCrnpErrLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basCrnpErrLogService.deleteById(id); |
| | | basCrnpErrLogService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basCrnpErrLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasCrnpErrLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasCrnpErrLog> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basCrnpErrLog")); |
| | | convert(map, wrapper); |
| | | List<BasCrnpErrLog> list = basCrnpErrLogService.selectList(wrapper); |
| | | List<BasCrnpErrLog> list = basCrnpErrLogService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnpErrLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasCrnpErrLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasCrnpErrLog> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasCrnpErrLog> page = basCrnpErrLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasCrnpErrLog> page = basCrnpErrLogService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasCrnpErrLog basCrnpErrLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basCrnpErrLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasCrnpErrLog> wrapper = new EntityWrapper<BasCrnpErrLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basCrnpErrLogService.selectOne(wrapper)){ |
| | | QueryWrapper<BasCrnpErrLog> wrapper = new QueryWrapper<BasCrnpErrLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basCrnpErrLogService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasCrnpErrLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasCrnpOpt; |
| | | import com.zy.asrs.service.BasCrnpOptService; |
| | |
| | | @RequestMapping(value = "/basCrnpOpt/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basCrnpOptService.selectById(String.valueOf(id))); |
| | | return R.ok(basCrnpOptService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnpOpt/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasCrnpOpt> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasCrnpOpt> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasCrnpOpt.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | wrapper.orderBy("send_time", false); |
| | | return R.ok(basCrnpOptService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | wrapper.orderBy(true, false, "send_time"); |
| | | return R.ok(basCrnpOptService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basCrnpOpt/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasCrnpOpt basCrnpOpt) { |
| | | basCrnpOptService.insert(basCrnpOpt); |
| | | basCrnpOptService.save(basCrnpOpt); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids) { |
| | | basCrnpOptService.deleteById(id); |
| | | basCrnpOptService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basCrnpOpt/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasCrnpOpt> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasCrnpOpt> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basCrnpOpt")); |
| | | convert(map, wrapper); |
| | | List<BasCrnpOpt> list = basCrnpOptService.selectList(wrapper); |
| | | List<BasCrnpOpt> list = basCrnpOptService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnpOptQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasCrnpOpt> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasCrnpOpt> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasCrnpOpt> page = basCrnpOptService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasCrnpOpt> page = basCrnpOptService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasCrnpOpt basCrnpOpt : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basCrnpOpt/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasCrnpOpt> wrapper = new EntityWrapper<BasCrnpOpt>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basCrnpOptService.selectOne(wrapper)){ |
| | | QueryWrapper<BasCrnpOpt> wrapper = new QueryWrapper<BasCrnpOpt>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basCrnpOptService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasCrnpOpt.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.domain.param.InitDevpStationParam; |
| | | import com.zy.asrs.entity.BasDevp; |
| | |
| | | @RequestMapping(value = "/basDevp/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basDevpService.selectById(String.valueOf(id))); |
| | | return R.ok(basDevpService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevp/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasDevp> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDevp> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasDevp.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basDevpService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(basDevpService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basDevp/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasDevp basDevp) { |
| | | basDevpService.insert(basDevp); |
| | | basDevpService.save(basDevp); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basDevpService.deleteById(id); |
| | | basDevpService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basDevp/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasDevp> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDevp> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basDevp")); |
| | | convert(map, wrapper); |
| | | List<BasDevp> list = basDevpService.selectList(wrapper); |
| | | List<BasDevp> list = basDevpService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevpQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasDevp> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDevp> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasDevp> page = basDevpService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasDevp> page = basDevpService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasDevp basDevp : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basDevp/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasDevp> wrapper = new EntityWrapper<BasDevp>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDevpService.selectOne(wrapper)){ |
| | | QueryWrapper<BasDevp> wrapper = new QueryWrapper<BasDevp>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDevpService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasDevp.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | return R.error("参数不能为空"); |
| | | } |
| | | |
| | | BasDevp basDevp = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("devp_no", param.getDevpNo())); |
| | | BasDevp basDevp = basDevpService.getOne(new QueryWrapper<BasDevp>().eq("devp_no", param.getDevpNo())); |
| | | if(Cools.isEmpty(basDevp)){ |
| | | return R.error("设备不存在"); |
| | | } |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasDualCrnp; |
| | | import com.zy.asrs.service.BasDualCrnpService; |
| | |
| | | @RequestMapping(value = "/basDualCrnp/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basDualCrnpService.selectById(String.valueOf(id))); |
| | | return R.ok(basDualCrnpService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnp/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasDualCrnp> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDualCrnp> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasDualCrnp.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basDualCrnpService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(basDualCrnpService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basDualCrnp/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasDualCrnp basDualCrnp) { |
| | | basDualCrnpService.insert(basDualCrnp); |
| | | basDualCrnpService.save(basDualCrnp); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basDualCrnpService.deleteById(id); |
| | | basDualCrnpService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basDualCrnp/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasDualCrnp> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDualCrnp> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basDualCrnp")); |
| | | convert(map, wrapper); |
| | | List<BasDualCrnp> list = basDualCrnpService.selectList(wrapper); |
| | | List<BasDualCrnp> list = basDualCrnpService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasDualCrnp> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDualCrnp> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("crn_no", condition); |
| | | Page<BasDualCrnp> page = basDualCrnpService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasDualCrnp> page = basDualCrnpService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasDualCrnp basDualCrnp : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basDualCrnp/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasDualCrnp> wrapper = new EntityWrapper<BasDualCrnp>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDualCrnpService.selectOne(wrapper)){ |
| | | QueryWrapper<BasDualCrnp> wrapper = new QueryWrapper<BasDualCrnp>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDualCrnpService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasDualCrnp.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasDualCrnpErr; |
| | | import com.zy.asrs.service.BasDualCrnpErrService; |
| | |
| | | @RequestMapping(value = "/basDualCrnpErr/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basDualCrnpErrService.selectById(String.valueOf(id))); |
| | | return R.ok(basDualCrnpErrService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErr/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasDualCrnpErr> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDualCrnpErr> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasDualCrnpErr.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basDualCrnpErrService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(basDualCrnpErrService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basDualCrnpErr/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasDualCrnpErr basDualCrnpErr) { |
| | | basDualCrnpErrService.insert(basDualCrnpErr); |
| | | basDualCrnpErrService.save(basDualCrnpErr); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basDualCrnpErrService.deleteById(id); |
| | | basDualCrnpErrService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basDualCrnpErr/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasDualCrnpErr> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDualCrnpErr> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basDualCrnpErr")); |
| | | convert(map, wrapper); |
| | | List<BasDualCrnpErr> list = basDualCrnpErrService.selectList(wrapper); |
| | | List<BasDualCrnpErr> list = basDualCrnpErrService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErrQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasDualCrnpErr> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDualCrnpErr> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasDualCrnpErr> page = basDualCrnpErrService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasDualCrnpErr> page = basDualCrnpErrService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasDualCrnpErr basDualCrnpErr : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basDualCrnpErr/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasDualCrnpErr> wrapper = new EntityWrapper<BasDualCrnpErr>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDualCrnpErrService.selectOne(wrapper)){ |
| | | QueryWrapper<BasDualCrnpErr> wrapper = new QueryWrapper<BasDualCrnpErr>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDualCrnpErrService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasDualCrnpErr.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasDualCrnpErrLog; |
| | | import com.zy.asrs.service.BasDualCrnpErrLogService; |
| | |
| | | @RequestMapping(value = "/basDualCrnpErrLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basDualCrnpErrLogService.selectById(String.valueOf(id))); |
| | | return R.ok(basDualCrnpErrLogService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErrLog/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasDualCrnpErrLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDualCrnpErrLog> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasDualCrnpErrLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basDualCrnpErrLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(basDualCrnpErrLogService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basDualCrnpErrLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasDualCrnpErrLog basDualCrnpErrLog) { |
| | | basDualCrnpErrLogService.insert(basDualCrnpErrLog); |
| | | basDualCrnpErrLogService.save(basDualCrnpErrLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basDualCrnpErrLogService.deleteById(id); |
| | | basDualCrnpErrLogService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basDualCrnpErrLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasDualCrnpErrLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDualCrnpErrLog> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basDualCrnpErrLog")); |
| | | convert(map, wrapper); |
| | | List<BasDualCrnpErrLog> list = basDualCrnpErrLogService.selectList(wrapper); |
| | | List<BasDualCrnpErrLog> list = basDualCrnpErrLogService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErrLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasDualCrnpErrLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDualCrnpErrLog> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasDualCrnpErrLog> page = basDualCrnpErrLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasDualCrnpErrLog> page = basDualCrnpErrLogService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasDualCrnpErrLog basDualCrnpErrLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basDualCrnpErrLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasDualCrnpErrLog> wrapper = new EntityWrapper<BasDualCrnpErrLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDualCrnpErrLogService.selectOne(wrapper)){ |
| | | QueryWrapper<BasDualCrnpErrLog> wrapper = new QueryWrapper<BasDualCrnpErrLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDualCrnpErrLogService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasDualCrnpErrLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasDualCrnpOpt; |
| | | import com.zy.asrs.service.BasDualCrnpOptService; |
| | |
| | | @RequestMapping(value = "/basDualCrnpOpt/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basDualCrnpOptService.selectById(String.valueOf(id))); |
| | | return R.ok(basDualCrnpOptService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpOpt/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasDualCrnpOpt> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDualCrnpOpt> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasDualCrnpOpt.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | wrapper.orderBy("send_time", false); |
| | | return R.ok(basDualCrnpOptService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | wrapper.orderBy(true, false, "send_time"); |
| | | return R.ok(basDualCrnpOptService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basDualCrnpOpt/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasDualCrnpOpt basDualCrnpOpt) { |
| | | basDualCrnpOptService.insert(basDualCrnpOpt); |
| | | basDualCrnpOptService.save(basDualCrnpOpt); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basDualCrnpOptService.deleteById(id); |
| | | basDualCrnpOptService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basDualCrnpOpt/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasDualCrnpOpt> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDualCrnpOpt> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basDualCrnpOpt")); |
| | | convert(map, wrapper); |
| | | List<BasDualCrnpOpt> list = basDualCrnpOptService.selectList(wrapper); |
| | | List<BasDualCrnpOpt> list = basDualCrnpOptService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpOptQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasDualCrnpOpt> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasDualCrnpOpt> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasDualCrnpOpt> page = basDualCrnpOptService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasDualCrnpOpt> page = basDualCrnpOptService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasDualCrnpOpt basDualCrnpOpt : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basDualCrnpOpt/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasDualCrnpOpt> wrapper = new EntityWrapper<BasDualCrnpOpt>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDualCrnpOptService.selectOne(wrapper)){ |
| | | QueryWrapper<BasDualCrnpOpt> wrapper = new QueryWrapper<BasDualCrnpOpt>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDualCrnpOptService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasDualCrnpOpt.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | @RequestMapping(value = "/basLocSts/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basLocStsService.selectById(id)); |
| | | return R.ok(basLocStsService.getById(id)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basLocSts/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<BasLocSts> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasLocSts> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basLocStsService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(basLocStsService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == basLocSts.getLocSts()){ |
| | | basLocStsService.insert(basLocSts); |
| | | basLocStsService.save(basLocSts); |
| | | } else { |
| | | basLocStsService.updateById(basLocSts); |
| | | } |
| | |
| | | basLocSts.setModiTime(new Date()); |
| | | basLocSts.setAppeUser(getUserId()); |
| | | basLocSts.setAppeTime(new Date()); |
| | | basLocStsService.insert(basLocSts); |
| | | basLocStsService.save(basLocSts); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | return R.error(); |
| | | } |
| | | for (BasLocSts entity : list){ |
| | | basLocStsService.delete(new EntityWrapper<>(entity)); |
| | | basLocStsService.remove(new QueryWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @ManagerAuth(memo = "库位状态导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasLocSts> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasLocSts> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basLocSts")); |
| | | convert(map, wrapper); |
| | | List<BasLocSts> list = basLocStsService.selectList(wrapper); |
| | | List<BasLocSts> list = basLocStsService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basLocStsQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasLocSts> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasLocSts> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("loc_desc", condition); |
| | | Page<BasLocSts> page = basLocStsService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasLocSts> page = basLocStsService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasLocSts basLocSts : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basLocSts/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasLocSts> wrapper = new EntityWrapper<BasLocSts>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basLocStsService.selectOne(wrapper)){ |
| | | QueryWrapper<BasLocSts> wrapper = new QueryWrapper<BasLocSts>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basLocStsService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasLocSts.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.serializer.SerializerFeature; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.BasMap; |
| | |
| | | @RequestMapping(value = "/basMap/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basMapService.selectById(String.valueOf(id))); |
| | | return R.ok(basMapService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basMap/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasMap> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasMap> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasMap.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | wrapper.orderBy("lev"); |
| | | return R.ok(basMapService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | wrapper.orderBy(true, true, "lev"); |
| | | return R.ok(basMapService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basMap/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasMap basMap) { |
| | | basMapService.insert(basMap); |
| | | basMapService.save(basMap); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basMapService.deleteById(id); |
| | | basMapService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basMap/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasMap> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasMap> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basMap")); |
| | | convert(map, wrapper); |
| | | List<BasMap> list = basMapService.selectList(wrapper); |
| | | List<BasMap> list = basMapService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basMapQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasMap> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasMap> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasMap> page = basMapService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasMap> page = basMapService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasMap basMap : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basMap/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasMap> wrapper = new EntityWrapper<BasMap>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basMapService.selectOne(wrapper)){ |
| | | QueryWrapper<BasMap> wrapper = new QueryWrapper<BasMap>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basMapService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasMap.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | @GetMapping("/basMap/lev/{lev}/auth") |
| | | @ManagerAuth |
| | | public R getByLev(@PathVariable("lev") Integer lev) { |
| | | BasMap basMap = basMapService.selectOne(new EntityWrapper<BasMap>().eq("lev", lev)); |
| | | BasMap basMap = basMapService.getOne(new QueryWrapper<BasMap>().eq("lev", lev)); |
| | | if (basMap == null){ |
| | | return R.error("地图不存在"); |
| | | } |
| | |
| | | dataList.add(arrayList); |
| | | } |
| | | |
| | | BasMap basMap = basMapService.selectOne(new EntityWrapper<BasMap>().eq("lev", lev)); |
| | | BasMap basMap = basMapService.getOne(new QueryWrapper<BasMap>().eq("lev", lev)); |
| | | if (basMap == null) { |
| | | basMap = new BasMap(); |
| | | } |
| | |
| | | basMap.setCreateTime(new Date()); |
| | | basMap.setUpdateTime(new Date()); |
| | | basMap.setLev(lev); |
| | | basMapService.insertOrUpdate(basMap); |
| | | basMapService.saveOrUpdate(basMap); |
| | | } |
| | | |
| | | basStationService.delete(new EntityWrapper<>()); |
| | | basStationService.remove(new QueryWrapper<>()); |
| | | |
| | | deviceStationMap.forEach((deviceNo, stationList) -> { |
| | | BasDevp basDevp = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("devp_no", deviceNo)); |
| | | BasDevp basDevp = basDevpService.getOne(new QueryWrapper<BasDevp>().eq("devp_no", deviceNo)); |
| | | if (basDevp == null) { |
| | | basDevp = new BasDevp(); |
| | | basDevp.setDevpNo(deviceNo); |
| | |
| | | |
| | | basDevp.setStationList(JSON.toJSONString(stationList, SerializerFeature.DisableCircularReferenceDetect)); |
| | | basDevp.setUpdateTime(new Date()); |
| | | basDevpService.insertOrUpdate(basDevp); |
| | | basDevpService.saveOrUpdate(basDevp); |
| | | |
| | | DeviceConfig deviceConfig = deviceConfigService.selectOne(new EntityWrapper<DeviceConfig>().eq("device_no", deviceNo).eq("device_type", String.valueOf(SlaveType.Devp))); |
| | | DeviceConfig deviceConfig = deviceConfigService.getOne(new QueryWrapper<DeviceConfig>().eq("device_no", deviceNo).eq("device_type", String.valueOf(SlaveType.Devp))); |
| | | if (deviceConfig != null) { |
| | | deviceConfig.setFakeInitStatus(JSON.toJSONString(stationList)); |
| | | deviceConfigService.updateById(deviceConfig); |
| | |
| | | basStation.setStationLev(stationObjModel.getStationLev()); |
| | | basStation.setCreateTime(new Date()); |
| | | basStation.setStatus(1); |
| | | basStationService.insert(basStation); |
| | | basStationService.save(basStation); |
| | | } |
| | | }); |
| | | } catch (Exception e) { |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.BasDevp; |
| | |
| | | Map<String, Object> data = new HashMap<>(); |
| | | |
| | | List<Integer> stationIds = new ArrayList<>(); |
| | | List<BasDevp> devps = basDevpService.selectList(new EntityWrapper<BasDevp>().eq("status", 1)); |
| | | List<BasDevp> devps = basDevpService.list(new QueryWrapper<BasDevp>().eq("status", 1)); |
| | | for (BasDevp devp : devps) { |
| | | for (StationObjModel stationObjModel : devp.getOutStationList$()) { |
| | | stationIds.add(stationObjModel.getStationId()); |
| | |
| | | } |
| | | List<BasStation> stations = stationIds.isEmpty() |
| | | ? new ArrayList<>() |
| | | : basStationService.selectList(new EntityWrapper<BasStation>().in("station_id", stationIds)); |
| | | : basStationService.list(new QueryWrapper<BasStation>().in("station_id", stationIds)); |
| | | data.put("stations", stations); |
| | | |
| | | List<BasOutArea> areas = basOutAreaService.selectList(new EntityWrapper<>()); |
| | | List<BasOutArea> areas = basOutAreaService.list(new QueryWrapper<>()); |
| | | data.put("areas", areas); |
| | | |
| | | List<BasOutStationArea> relations = basOutStationAreaService.selectList(new EntityWrapper<>()); |
| | | List<BasOutStationArea> relations = basOutStationAreaService.list(new QueryWrapper<>()); |
| | | data.put("relations", relations); |
| | | |
| | | return R.ok(data); |
| | |
| | | JSONArray areas = payload.getJSONArray("areas"); |
| | | JSONArray relations = payload.getJSONArray("relations"); |
| | | |
| | | basOutAreaService.delete(new EntityWrapper<>()); |
| | | basOutStationAreaService.delete(new EntityWrapper<>()); |
| | | basOutAreaService.remove(new QueryWrapper<>()); |
| | | basOutStationAreaService.remove(new QueryWrapper<>()); |
| | | |
| | | if (areas != null && !areas.isEmpty()) { |
| | | List<BasOutArea> areaList = new ArrayList<>(); |
| | |
| | | areaList.add(a); |
| | | } |
| | | if (!areaList.isEmpty()) { |
| | | basOutAreaService.insertBatch(areaList); |
| | | basOutAreaService.saveBatch(areaList); |
| | | } |
| | | } |
| | | |
| | |
| | | relList.add(r); |
| | | } |
| | | if (!relList.isEmpty()) { |
| | | basOutStationAreaService.insertBatch(relList); |
| | | basOutStationAreaService.saveBatch(relList); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasRgv; |
| | | import com.zy.asrs.service.BasRgvService; |
| | |
| | | @RequestMapping(value = "/basRgv/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basRgvService.selectById(String.valueOf(id))); |
| | | return R.ok(basRgvService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgv/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasRgv> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasRgv> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasRgv.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basRgvService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(basRgvService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basRgv/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasRgv basRgv) { |
| | | basRgvService.insert(basRgv); |
| | | basRgvService.save(basRgv); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basRgvService.deleteById(id); |
| | | basRgvService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basRgv/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasRgv> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasRgv> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basRgv")); |
| | | convert(map, wrapper); |
| | | List<BasRgv> list = basRgvService.selectList(wrapper); |
| | | List<BasRgv> list = basRgvService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasRgv> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasRgv> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("rgv_no", condition); |
| | | Page<BasRgv> page = basRgvService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasRgv> page = basRgvService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasRgv basRgv : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basRgv/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasRgv> wrapper = new EntityWrapper<BasRgv>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basRgvService.selectOne(wrapper)){ |
| | | QueryWrapper<BasRgv> wrapper = new QueryWrapper<BasRgv>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basRgvService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasRgv.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasRgvErr; |
| | | import com.zy.asrs.service.BasRgvErrService; |
| | |
| | | @RequestMapping(value = "/basRgvErr/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basRgvErrService.selectById(String.valueOf(id))); |
| | | return R.ok(basRgvErrService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvErr/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasRgvErr> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasRgvErr> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasRgvErr.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basRgvErrService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(basRgvErrService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basRgvErr/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasRgvErr basRgvErr) { |
| | | basRgvErrService.insert(basRgvErr); |
| | | basRgvErrService.save(basRgvErr); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basRgvErrService.deleteById(id); |
| | | basRgvErrService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basRgvErr/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasRgvErr> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasRgvErr> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basRgvErr")); |
| | | convert(map, wrapper); |
| | | List<BasRgvErr> list = basRgvErrService.selectList(wrapper); |
| | | List<BasRgvErr> list = basRgvErrService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvErrQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasRgvErr> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasRgvErr> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasRgvErr> page = basRgvErrService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasRgvErr> page = basRgvErrService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasRgvErr basRgvErr : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basRgvErr/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasRgvErr> wrapper = new EntityWrapper<BasRgvErr>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basRgvErrService.selectOne(wrapper)){ |
| | | QueryWrapper<BasRgvErr> wrapper = new QueryWrapper<BasRgvErr>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basRgvErrService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasRgvErr.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasRgvErrLog; |
| | | import com.zy.asrs.service.BasRgvErrLogService; |
| | |
| | | @RequestMapping(value = "/basRgvErrLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basRgvErrLogService.selectById(String.valueOf(id))); |
| | | return R.ok(basRgvErrLogService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvErrLog/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasRgvErrLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasRgvErrLog> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasRgvErrLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basRgvErrLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(basRgvErrLogService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basRgvErrLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasRgvErrLog basRgvErrLog) { |
| | | basRgvErrLogService.insert(basRgvErrLog); |
| | | basRgvErrLogService.save(basRgvErrLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basRgvErrLogService.deleteById(id); |
| | | basRgvErrLogService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basRgvErrLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasRgvErrLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasRgvErrLog> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basRgvErrLog")); |
| | | convert(map, wrapper); |
| | | List<BasRgvErrLog> list = basRgvErrLogService.selectList(wrapper); |
| | | List<BasRgvErrLog> list = basRgvErrLogService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvErrLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasRgvErrLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasRgvErrLog> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasRgvErrLog> page = basRgvErrLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasRgvErrLog> page = basRgvErrLogService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasRgvErrLog basRgvErrLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basRgvErrLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasRgvErrLog> wrapper = new EntityWrapper<BasRgvErrLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basRgvErrLogService.selectOne(wrapper)){ |
| | | QueryWrapper<BasRgvErrLog> wrapper = new QueryWrapper<BasRgvErrLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basRgvErrLogService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasRgvErrLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasRgvOpt; |
| | | import com.zy.asrs.service.BasRgvOptService; |
| | |
| | | @RequestMapping(value = "/basRgvOpt/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basRgvOptService.selectById(String.valueOf(id))); |
| | | return R.ok(basRgvOptService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvOpt/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasRgvOpt> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasRgvOpt> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasRgvOpt.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | wrapper.orderBy("send_time", false); |
| | | return R.ok(basRgvOptService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | wrapper.orderBy(true, false, "send_time"); |
| | | return R.ok(basRgvOptService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basRgvOpt/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasRgvOpt basRgvOpt) { |
| | | basRgvOptService.insert(basRgvOpt); |
| | | basRgvOptService.save(basRgvOpt); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basRgvOptService.deleteById(id); |
| | | basRgvOptService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basRgvOpt/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasRgvOpt> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasRgvOpt> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basRgvOpt")); |
| | | convert(map, wrapper); |
| | | List<BasRgvOpt> list = basRgvOptService.selectList(wrapper); |
| | | List<BasRgvOpt> list = basRgvOptService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvOptQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasRgvOpt> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasRgvOpt> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasRgvOpt> page = basRgvOptService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasRgvOpt> page = basRgvOptService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasRgvOpt basRgvOpt : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basRgvOpt/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasRgvOpt> wrapper = new EntityWrapper<BasRgvOpt>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basRgvOptService.selectOne(wrapper)){ |
| | | QueryWrapper<BasRgvOpt> wrapper = new QueryWrapper<BasRgvOpt>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basRgvOptService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasRgvOpt.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasStation; |
| | | import com.zy.asrs.service.BasStationService; |
| | |
| | | @RequestMapping(value = "/basStation/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basStationService.selectById(String.valueOf(id))); |
| | | return R.ok(basStationService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basStation/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasStation> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasStation> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasStation.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basStationService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(basStationService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basStation/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasStation basStation) { |
| | | basStationService.insert(basStation); |
| | | basStationService.save(basStation); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basStationService.deleteById(id); |
| | | basStationService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basStation/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasStation> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasStation> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basStation")); |
| | | convert(map, wrapper); |
| | | List<BasStation> list = basStationService.selectList(wrapper); |
| | | List<BasStation> list = basStationService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basStationQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasStation> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasStation> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("station_id", condition); |
| | | Page<BasStation> page = basStationService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasStation> page = basStationService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasStation basStation : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basStation/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasStation> wrapper = new EntityWrapper<BasStation>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basStationService.selectOne(wrapper)){ |
| | | QueryWrapper<BasStation> wrapper = new QueryWrapper<BasStation>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basStationService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasStation.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.asrs.entity.BasCrnp; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.BasDualCrnp; |
| | |
| | | @RequestMapping("/list/auth") |
| | | @ManagerAuth |
| | | public R list() { |
| | | return R.ok(basStationDeviceService.selectList(new EntityWrapper<>())); |
| | | return R.ok(basStationDeviceService.list(new QueryWrapper<>())); |
| | | } |
| | | |
| | | @RequestMapping("/save/auth") |
| | |
| | | |
| | | // However, to be safer, we should probably only delete for the stations involved or delete all if it's a full save. |
| | | // Let's assume the UI sends the full current state of configuration. |
| | | basStationDeviceService.delete(new EntityWrapper<>()); |
| | | basStationDeviceService.remove(new QueryWrapper<>()); |
| | | if (list != null && !list.isEmpty()) { |
| | | basStationDeviceService.insertBatch(list); |
| | | basStationDeviceService.saveBatch(list); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | Map<String, Object> data = new HashMap<>(); |
| | | |
| | | List<Integer> stationList = new ArrayList<>(); |
| | | List<BasDevp> devps = basDevpService.selectList(new EntityWrapper<BasDevp>().eq("status", 1)); |
| | | List<BasDevp> devps = basDevpService.list(new QueryWrapper<BasDevp>().eq("status", 1)); |
| | | for (BasDevp devp : devps) { |
| | | for (StationObjModel stationObjModel : devp.getBarcodeStationList$()) { |
| | | stationList.add(stationObjModel.getStationId()); |
| | | } |
| | | } |
| | | |
| | | List<BasStation> stations = basStationService.selectList(new EntityWrapper<BasStation>().in("station_id", stationList)); |
| | | List<BasStation> stations = basStationService.list(new QueryWrapper<BasStation>().in("station_id", stationList)); |
| | | data.put("stations", stations); |
| | | |
| | | // Get Devices (Crn and DualCrn) |
| | | List<Map<String, Object>> devices = new ArrayList<>(); |
| | | |
| | | List<BasCrnp> crns = basCrnpService.selectList(new EntityWrapper<BasCrnp>().eq("status", 1)); |
| | | List<BasCrnp> crns = basCrnpService.list(new QueryWrapper<BasCrnp>().eq("status", 1)); |
| | | for (BasCrnp crn : crns) { |
| | | Map<String, Object> d = new HashMap<>(); |
| | | d.put("deviceNo", crn.getCrnNo()); |
| | |
| | | devices.add(d); |
| | | } |
| | | |
| | | List<BasDualCrnp> dualCrns = basDualCrnpService.selectList(new EntityWrapper<BasDualCrnp>().eq("status", 1)); |
| | | List<BasDualCrnp> dualCrns = basDualCrnpService.list(new QueryWrapper<BasDualCrnp>().eq("status", 1)); |
| | | for (BasDualCrnp dualCrn : dualCrns) { |
| | | Map<String, Object> d = new HashMap<>(); |
| | | d.put("deviceNo", dualCrn.getCrnNo()); |
| | |
| | | data.put("devices", devices); |
| | | |
| | | // Get existing relations |
| | | List<BasStationDevice> relations = basStationDeviceService.selectList(new EntityWrapper<>()); |
| | | List<BasStationDevice> relations = basStationDeviceService.list(new QueryWrapper<>()); |
| | | data.put("relations", relations); |
| | | |
| | | return R.ok(data); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasStationOpt; |
| | | import com.zy.asrs.service.BasStationOptService; |
| | |
| | | @RequestMapping(value = "/basStationOpt/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basStationOptService.selectById(String.valueOf(id))); |
| | | return R.ok(basStationOptService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basStationOpt/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasStationOpt> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasStationOpt> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasStationOpt.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | wrapper.orderBy("send_time", false); |
| | | return R.ok(basStationOptService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | wrapper.orderBy(true, false, "send_time"); |
| | | return R.ok(basStationOptService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/basStationOpt/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasStationOpt basStationOpt) { |
| | | basStationOptService.insert(basStationOpt); |
| | | basStationOptService.save(basStationOpt); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basStationOptService.deleteById(id); |
| | | basStationOptService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/basStationOpt/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasStationOpt> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasStationOpt> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basStationOpt")); |
| | | convert(map, wrapper); |
| | | List<BasStationOpt> list = basStationOptService.selectList(wrapper); |
| | | List<BasStationOpt> list = basStationOptService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basStationOptQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasStationOpt> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasStationOpt> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasStationOpt> page = basStationOptService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasStationOpt> page = basStationOptService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasStationOpt basStationOpt : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basStationOpt/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasStationOpt> wrapper = new EntityWrapper<BasStationOpt>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basStationOptService.selectOne(wrapper)){ |
| | | QueryWrapper<BasStationOpt> wrapper = new QueryWrapper<BasStationOpt>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basStationOptService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasStationOpt.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | @RequestMapping(value = "/basWrkIotype/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(basWrkIotypeService.selectById(String.valueOf(id))); |
| | | return R.ok(basWrkIotypeService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWrkIotype/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<BasWrkIotype> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasWrkIotype> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basWrkIotypeService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(basWrkIotypeService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == basWrkIotype.getIoType()){ |
| | | basWrkIotypeService.insert(basWrkIotype); |
| | | basWrkIotypeService.save(basWrkIotype); |
| | | } else { |
| | | basWrkIotypeService.updateById(basWrkIotype); |
| | | } |
| | |
| | | basWrkIotype.setModiTime(new Date()); |
| | | basWrkIotype.setAppeUser(getUserId()); |
| | | basWrkIotype.setAppeTime(new Date()); |
| | | basWrkIotypeService.insert(basWrkIotype); |
| | | basWrkIotypeService.save(basWrkIotype); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | return R.error(); |
| | | } |
| | | for (BasWrkIotype entity : list){ |
| | | basWrkIotypeService.delete(new EntityWrapper<>(entity)); |
| | | basWrkIotypeService.remove(new QueryWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @ManagerAuth(memo = "入出库类型导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasWrkIotype> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasWrkIotype> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basWrkIotype")); |
| | | convert(map, wrapper); |
| | | List<BasWrkIotype> list = basWrkIotypeService.selectList(wrapper); |
| | | List<BasWrkIotype> list = basWrkIotypeService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWrkIotypeQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasWrkIotype> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasWrkIotype> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("io_desc", condition); |
| | | Page<BasWrkIotype> page = basWrkIotypeService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasWrkIotype> page = basWrkIotypeService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasWrkIotype basWrkIotype : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basWrkIotype/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasWrkIotype> wrapper = new EntityWrapper<BasWrkIotype>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basWrkIotypeService.selectOne(wrapper)){ |
| | | QueryWrapper<BasWrkIotype> wrapper = new QueryWrapper<BasWrkIotype>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basWrkIotypeService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasWrkIotype.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | @RequestMapping(value = "/basWrkStatus/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(basWrkStatusService.selectById(String.valueOf(id))); |
| | | return R.ok(basWrkStatusService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWrkStatus/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<BasWrkStatus> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasWrkStatus> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basWrkStatusService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(basWrkStatusService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == basWrkStatus.getWrkSts()){ |
| | | basWrkStatusService.insert(basWrkStatus); |
| | | basWrkStatusService.save(basWrkStatus); |
| | | } else { |
| | | basWrkStatusService.updateById(basWrkStatus); |
| | | } |
| | |
| | | basWrkStatus.setModiTime(new Date()); |
| | | basWrkStatus.setAppeUser(getUserId()); |
| | | basWrkStatus.setAppeTime(new Date()); |
| | | basWrkStatusService.insert(basWrkStatus); |
| | | basWrkStatusService.save(basWrkStatus); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | return R.error(); |
| | | } |
| | | for (BasWrkStatus entity : list){ |
| | | basWrkStatusService.delete(new EntityWrapper<>(entity)); |
| | | basWrkStatusService.remove(new QueryWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @ManagerAuth(memo = "工作状态导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasWrkStatus> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasWrkStatus> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basWrkStatus")); |
| | | convert(map, wrapper); |
| | | List<BasWrkStatus> list = basWrkStatusService.selectList(wrapper); |
| | | List<BasWrkStatus> list = basWrkStatusService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWrkStatusQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasWrkStatus> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<BasWrkStatus> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("wrk_desc", condition); |
| | | Page<BasWrkStatus> page = basWrkStatusService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasWrkStatus> page = basWrkStatusService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasWrkStatus basWrkStatus : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/basWrkStatus/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasWrkStatus> wrapper = new EntityWrapper<BasWrkStatus>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basWrkStatusService.selectOne(wrapper)){ |
| | | QueryWrapper<BasWrkStatus> wrapper = new QueryWrapper<BasWrkStatus>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basWrkStatusService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasWrkStatus.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | |
| | | public R stationLatestData() { |
| | | List<StationLatestDataVo> vos = new ArrayList<>(); |
| | | |
| | | WrkLastno inTaskRange = wrkLastnoService.selectById(WrkIoType.IN.id); |
| | | WrkLastno outTaskRange = wrkLastnoService.selectById(WrkIoType.OUT.id); |
| | | WrkLastno inTaskRange = wrkLastnoService.getById(WrkIoType.IN.id); |
| | | WrkLastno outTaskRange = wrkLastnoService.getById(WrkIoType.OUT.id); |
| | | |
| | | List<DeviceConfig> devpList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> devpList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Devp))); |
| | | for (DeviceConfig deviceConfig : devpList) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, |
| | |
| | | public R crnLatestData() { |
| | | List<CrnLatestDataVo> vos = new ArrayList<>(); |
| | | |
| | | List<DeviceConfig> crnList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> crnList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Crn))); |
| | | for (DeviceConfig deviceConfig : crnList) { |
| | | // 获取堆垛机信息 |
| | |
| | | vo.setCrnStatus(CrnStatusType.MACHINE_ERROR); |
| | | } else { |
| | | if (crnProtocol.getTaskNo() > 0) { |
| | | WrkMast wrkMast = wrkMastService.selectById(crnProtocol.getTaskNo()); |
| | | WrkMast wrkMast = wrkMastService.getById(crnProtocol.getTaskNo()); |
| | | if (wrkMast != null) { |
| | | vo.setCrnStatus(CrnStatusType.process(wrkMast.getIoType())); |
| | | } else { |
| | |
| | | @ManagerAuth(memo = "双工位堆垛机实时数据") |
| | | public R dualCrnLatestData() { |
| | | List<CrnLatestDataVo> vos = new ArrayList<>(); |
| | | List<DeviceConfig> dualCrnList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> dualCrnList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.DualCrn))); |
| | | for (DeviceConfig deviceConfig : dualCrnList) { |
| | | DualCrnThread crnThread = (DualCrnThread) SlaveConnection.get(SlaveType.DualCrn, deviceConfig.getDeviceNo()); |
| | |
| | | @ManagerAuth(memo = "RGV实时数据") |
| | | public R rgvLatestData(){ |
| | | List<RgvLatestDataVo> vos = new ArrayList<>(); |
| | | List<DeviceConfig> rgvList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> rgvList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Rgv))); |
| | | for (DeviceConfig deviceConfig : rgvList) { |
| | | RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, deviceConfig.getDeviceNo()); |
| | |
| | | } |
| | | CrnDetailVo vo = new CrnDetailVo(); |
| | | |
| | | DeviceConfig deviceConfig = deviceConfigService.selectOne(new EntityWrapper<DeviceConfig>() |
| | | DeviceConfig deviceConfig = deviceConfigService.getOne(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Crn)) |
| | | .eq("device_no", crnNo)); |
| | | |
| | |
| | | vo.setCrnStatus(crnProtocol.getStatusType().desc); |
| | | |
| | | if (crnProtocol.getAlarm() > 0) { |
| | | BasCrnpErr crnError = basCrnpErrService.selectById(crnProtocol.getAlarm()); |
| | | BasCrnpErr crnError = basCrnpErrService.getById(crnProtocol.getAlarm()); |
| | | vo.setError(crnError == null ? "未知异常" : crnError.getErrName()); |
| | | } |
| | | |
| | | if (crnProtocol.getTaskNo() > 0) { |
| | | WrkMast wrkMast = wrkMastService.selectById(crnProtocol.getTaskNo()); |
| | | WrkMast wrkMast = wrkMastService.getById(crnProtocol.getTaskNo()); |
| | | if (wrkMast != null) { |
| | | vo.setSourceStaNo(String.valueOf(wrkMast.getSourceStaNo())); |
| | | vo.setStaNo(String.valueOf(wrkMast.getStaNo())); |
| | |
| | | } |
| | | |
| | | private List<List<HashMap<String, Object>>> buildLocMapBase() { |
| | | BasMap basMap = basMapService.selectOne(new EntityWrapper<BasMap>().eq("lev", 1)); |
| | | BasMap basMap = basMapService.getOne(new QueryWrapper<BasMap>().eq("lev", 1)); |
| | | if (Cools.isEmpty(basMap) || Cools.isEmpty(basMap.getData())) { |
| | | return null; |
| | | } |
| | |
| | | JSONArray data = JSON.parseArray(object.toString()); |
| | | return R.ok().add(data); |
| | | } |
| | | EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<LocMast> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("lev1", 1); |
| | | List<LocMast> locMasts = locMastService.selectList(wrapper); |
| | | List<LocMast> locMasts = locMastService.list(wrapper); |
| | | redisUtil.set(RedisKeyType.LOC_MAST_MAP_LIST.key, JSON.toJSONString(locMasts), 60 * 60 * 24); |
| | | return R.ok().add(locMasts); |
| | | } |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | |
| | | @ManagerAuth(memo = "堆垛机信息表") |
| | | public R crnStateTable() { |
| | | List<CrnStateTableVo> list = new ArrayList<>(); |
| | | List<BasCrnp> crnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().orderBy("crn_no")); |
| | | List<BasCrnp> crnps = basCrnpService.list(new QueryWrapper<BasCrnp>().orderBy(true, true, "crn_no")); |
| | | for (BasCrnp basCrnp : crnps) { |
| | | // 表格行 |
| | | CrnStateTableVo vo = new CrnStateTableVo(); |
| | |
| | | } |
| | | |
| | | if (crnProtocol.getTaskNo() > 0) { |
| | | WrkMast wrkMast = wrkMastService.selectById(crnProtocol.getTaskNo()); |
| | | WrkMast wrkMast = wrkMastService.getById(crnProtocol.getTaskNo()); |
| | | if (wrkMast != null) { |
| | | vo.setSourceStaNo(String.valueOf(wrkMast.getSourceStaNo())); // 源站 |
| | | vo.setStaNo(String.valueOf(wrkMast.getStaNo())); // 目标站 |
| | |
| | | |
| | | vo.setWarnCode(String.valueOf(crnProtocol.getAlarm())); |
| | | if (crnProtocol.getAlarm() > 0) { |
| | | BasCrnpErr crnError = basCrnpErrService.selectById(crnProtocol.getAlarm()); |
| | | BasCrnpErr crnError = basCrnpErrService.getById(crnProtocol.getAlarm()); |
| | | vo.setAlarm(crnError == null ? "未知异常" : crnError.getErrName()); |
| | | vo.setDeviceStatus("ERROR"); |
| | | } |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | | import com.zy.asrs.service.DeviceConfigService; |
| | |
| | | @RequestMapping(value = "/deviceConfig/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(deviceConfigService.selectById(String.valueOf(id))); |
| | | return R.ok(deviceConfigService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/deviceConfig/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<DeviceConfig> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<DeviceConfig> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(DeviceConfig.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(deviceConfigService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(deviceConfigService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @ManagerAuth |
| | | public R add(DeviceConfig deviceConfig) { |
| | | deviceConfig.setCreateTime(new Date()); |
| | | deviceConfigService.insert(deviceConfig); |
| | | deviceConfigService.save(deviceConfig); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | deviceConfigService.deleteById(id); |
| | | deviceConfigService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/deviceConfig/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<DeviceConfig> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<DeviceConfig> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("deviceConfig")); |
| | | convert(map, wrapper); |
| | | List<DeviceConfig> list = deviceConfigService.selectList(wrapper); |
| | | List<DeviceConfig> list = deviceConfigService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/deviceConfigQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<DeviceConfig> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<DeviceConfig> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<DeviceConfig> page = deviceConfigService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<DeviceConfig> page = deviceConfigService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (DeviceConfig deviceConfig : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/deviceConfig/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<DeviceConfig> wrapper = new EntityWrapper<DeviceConfig>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != deviceConfigService.selectOne(wrapper)){ |
| | | QueryWrapper<DeviceConfig> wrapper = new QueryWrapper<DeviceConfig>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != deviceConfigService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(DeviceConfig.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Path; |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | |
| | | @ManagerAuth(memo = "双工位堆垛机信息表") |
| | | public R dualCrnStateTable() { |
| | | List<DualCrnStateTableVo> list = new ArrayList<>(); |
| | | List<BasDualCrnp> crnps = basDualCrnpService.selectList(new EntityWrapper<BasDualCrnp>().orderBy("crn_no")); |
| | | List<BasDualCrnp> crnps = basDualCrnpService.list(new QueryWrapper<BasDualCrnp>().orderBy(true, true, "crn_no")); |
| | | for (BasDualCrnp basDualCrnp : crnps) { |
| | | DualCrnStateTableVo vo = new DualCrnStateTableVo(); |
| | | vo.setCrnNo(basDualCrnp.getCrnNo()); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.HttpRequestLog; |
| | | import com.zy.asrs.service.HttpRequestLogService; |
| | |
| | | @RequestMapping(value = "/httpRequestLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(httpRequestLogService.selectById(String.valueOf(id))); |
| | | return R.ok(httpRequestLogService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/httpRequestLog/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<HttpRequestLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<HttpRequestLog> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(HttpRequestLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | wrapper.orderBy("create_time desc"); |
| | | return R.ok(httpRequestLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | wrapper.orderBy(true, false, "create_time"); |
| | | return R.ok(httpRequestLogService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/httpRequestLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(HttpRequestLog httpRequestLog) { |
| | | httpRequestLogService.insert(httpRequestLog); |
| | | httpRequestLogService.save(httpRequestLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | httpRequestLogService.deleteById(id); |
| | | httpRequestLogService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/httpRequestLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<HttpRequestLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<HttpRequestLog> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("httpRequestLog")); |
| | | convert(map, wrapper); |
| | | List<HttpRequestLog> list = httpRequestLogService.selectList(wrapper); |
| | | List<HttpRequestLog> list = httpRequestLogService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/httpRequestLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<HttpRequestLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<HttpRequestLog> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<HttpRequestLog> page = httpRequestLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<HttpRequestLog> page = httpRequestLogService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (HttpRequestLog httpRequestLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/httpRequestLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<HttpRequestLog> wrapper = new EntityWrapper<HttpRequestLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != httpRequestLogService.selectOne(wrapper)){ |
| | | QueryWrapper<HttpRequestLog> wrapper = new QueryWrapper<HttpRequestLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != httpRequestLogService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(HttpRequestLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | @RequestMapping(value = "/locMast/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(locMastService.selectById(String.valueOf(id))); |
| | | return R.ok(locMastService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locMast/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<LocMast> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(locMastService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(locMastService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | return R.error(); |
| | | } |
| | | for (LocMast entity : list){ |
| | | locMastService.delete(new EntityWrapper<>(entity)); |
| | | locMastService.remove(new QueryWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @ManagerAuth(memo = "库位导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<LocMast> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("locMast")); |
| | | convert(map, wrapper); |
| | | List<LocMast> list = locMastService.selectList(wrapper); |
| | | List<LocMast> list = locMastService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locMastQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<LocMast> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("loc_no", condition); |
| | | Page<LocMast> page = locMastService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<LocMast> page = locMastService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (LocMast locMast : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/locMast/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<LocMast> wrapper = new EntityWrapper<LocMast>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != locMastService.selectOne(wrapper)){ |
| | | QueryWrapper<LocMast> wrapper = new QueryWrapper<LocMast>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != locMastService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(LocMast.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | @ManagerAuth(memo = "初始化库位") |
| | | @Transactional |
| | | public R locMastInit(@RequestParam Integer lev) { |
| | | BasMap basMap = basMapService.selectOne(new EntityWrapper<BasMap>().eq("lev", 1)); |
| | | BasMap basMap = basMapService.getOne(new QueryWrapper<BasMap>().eq("lev", 1)); |
| | | if (Cools.isEmpty(basMap)){ |
| | | return R.error("请先初始化地图"); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | locMastService.delete(new EntityWrapper<LocMast>()); |
| | | locMastService.remove(new QueryWrapper<LocMast>()); |
| | | |
| | | for (int i = 1; i <= lev; i++) { |
| | | int finalLev = i; |
| | |
| | | locMast.setLocType(Utils.getLocNo(mapX, mapY, finalLev)); |
| | | locMast.setStatus(1); |
| | | locMast.setAppeTime(new Date()); |
| | | locMastService.insert(locMast); |
| | | locMastService.save(locMast); |
| | | }); |
| | | } |
| | | |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | |
| | | result.put("notifyEndpoint", endpoint); |
| | | result.put("queueCount", loadQueueRecords(null, null).size()); |
| | | if (!Cools.isEmpty(endpoint)) { |
| | | result.put("logCount", httpRequestLogService.selectCount(new EntityWrapper<HttpRequestLog>().eq("name", endpoint))); |
| | | result.put("logCount", httpRequestLogService.count(new QueryWrapper<HttpRequestLog>().eq("name", endpoint))); |
| | | } else { |
| | | result.put("logCount", 0); |
| | | } |
| | |
| | | @RequestParam(required = false) Integer result, |
| | | @RequestParam(required = false) String condition) { |
| | | String endpoint = buildNotifyEndpoint(getConfigValue("notifyUri"), getConfigValue("notifyUriPath")); |
| | | EntityWrapper<HttpRequestLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<HttpRequestLog> wrapper = new QueryWrapper<>(); |
| | | if (!Cools.isEmpty(endpoint)) { |
| | | wrapper.eq("name", endpoint); |
| | | } else { |
| | |
| | | wrapper.like("request", "\"device\":" + device); |
| | | } |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.andNew().like("request", condition).or().like("response", condition); |
| | | wrapper.and(q -> q.like("request", condition).or().like("response", condition)); |
| | | } |
| | | if (result != null) { |
| | | wrapper.eq("result", result); |
| | | } |
| | | wrapper.orderBy("create_time", false); |
| | | wrapper.orderBy(true, false, "create_time"); |
| | | |
| | | Page<HttpRequestLog> logPage = httpRequestLogService.selectPage(new Page<>(curr, limit), wrapper); |
| | | Page<HttpRequestLog> logPage = httpRequestLogService.page(new Page<>(curr, limit), wrapper); |
| | | Page<NotifyReportVo> resultPage = new Page<>(curr, limit); |
| | | resultPage.setTotal(logPage.getTotal()); |
| | | |
| | |
| | | detail.put("sourceType", "log"); |
| | | detail.put("logId", logId); |
| | | |
| | | HttpRequestLog log = httpRequestLogService.selectById(logId); |
| | | HttpRequestLog log = httpRequestLogService.getById(logId); |
| | | if (log == null) { |
| | | detail.put("success", false); |
| | | detail.put("message", "通知日志不存在"); |
| | |
| | | } |
| | | |
| | | private String getConfigValue(String code) { |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", code)); |
| | | Config config = configService.getOne(new QueryWrapper<Config>().eq("code", code)); |
| | | return config == null ? null : config.getValue(); |
| | | } |
| | | |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | // 获取堆垛机数据 |
| | | ArrayList<CrnProtocol> crnProtocols = new ArrayList<>(); |
| | | List<DeviceConfig> crnList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> crnList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Crn))); |
| | | for (DeviceConfig device : crnList) { |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, device.getDeviceNo()); |
| | |
| | | |
| | | // 获取RGV数据 |
| | | ArrayList<RgvProtocol> rgvProtocols = new ArrayList<>(); |
| | | List<DeviceConfig> rgvList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> rgvList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Rgv))); |
| | | for (DeviceConfig device : rgvList) { |
| | | RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, device.getDeviceNo()); |
| | |
| | | |
| | | // 获取双工位堆垛机数据 |
| | | ArrayList<DualCrnProtocol> dualCrnProtocols = new ArrayList<>(); |
| | | List<DeviceConfig> dualCrnList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> dualCrnList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.DualCrn))); |
| | | for (DeviceConfig device : dualCrnList) { |
| | | DualCrnThread dualCrnThread = (DualCrnThread) SlaveConnection.get(SlaveType.DualCrn, device.getDeviceNo()); |
| | |
| | | |
| | | // 获取输送站点数据 |
| | | ArrayList<StationProtocol> stationProtocols = new ArrayList<>(); |
| | | List<DeviceConfig> stationList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> stationList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Devp))); |
| | | for (DeviceConfig device : stationList) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, device.getDeviceNo()); |
| | |
| | | public R getStationStatus(@RequestBody GetStationStatusParam param) { |
| | | // 获取输送站点数据 |
| | | List<StationProtocol> stationProtocols = new ArrayList<>(); |
| | | List<DeviceConfig> devpList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> devpList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Devp)) |
| | | ); |
| | | for (DeviceConfig device : devpList) { |
| | |
| | | @OpenApiLog(memo = "获取全部库位信息") |
| | | public R getAllLocInformation(@RequestBody GetAllLocInformationParam param) { |
| | | List<HashMap<String, Object>> list = new ArrayList<>(); |
| | | EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<LocMast> wrapper = new QueryWrapper<>(); |
| | | |
| | | if (!Cools.isEmpty(param.getRow())) { |
| | | wrapper.eq("row1", param.getRow()); |
| | |
| | | wrapper.eq("lev1", param.getLev()); |
| | | } |
| | | |
| | | List<LocMast> locMasts = locMastService.selectList(wrapper); |
| | | List<LocMast> locMasts = locMastService.list(wrapper); |
| | | if (locMasts.isEmpty()) { |
| | | return R.ok().add(list); |
| | | } |
| | |
| | | @PostMapping("/queryTask") |
| | | @OpenApiLog(memo = "查询任务") |
| | | public R queryTask(@RequestBody QueryTaskParam param) { |
| | | EntityWrapper<WrkMast> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<WrkMast> wrapper = new QueryWrapper<>(); |
| | | if (param.getTaskNo() != null) { |
| | | wrapper.eq("wms_wrk_no", param.getTaskNo()); |
| | | } |
| | |
| | | } |
| | | wrapper.eq("io_type", ioType.id); |
| | | } |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(wrapper); |
| | | List<WrkMast> wrkMasts = wrkMastService.list(wrapper); |
| | | return R.ok().add(wrkMasts); |
| | | } |
| | | |
| | |
| | | if (mainProcessPlugin.contains("Fake")) { |
| | | map.put("running", false); |
| | | map.put("isFake", true); |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "enableFake")); |
| | | Config config = configService.getOne(new QueryWrapper<Config>().eq("code", "enableFake")); |
| | | if (config != null) { |
| | | if (config.getValue().equals("Y")) { |
| | | map.put("running", true); |
| | |
| | | @PostMapping("/startFakeSystem") |
| | | @OpenApiLog(memo = "启动仿真模拟") |
| | | public R startFakeSystem() { |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "enableFake")); |
| | | Config config = configService.getOne(new QueryWrapper<Config>().eq("code", "enableFake")); |
| | | if (config != null) { |
| | | config.setValue("Y"); |
| | | configService.updateById(config); |
| | |
| | | @PostMapping("/stopFakeSystem") |
| | | @OpenApiLog(memo = "停止仿真模拟") |
| | | public R stopFakeSystem() { |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "enableFake")); |
| | | Config config = configService.getOne(new QueryWrapper<Config>().eq("code", "enableFake")); |
| | | if (config != null) { |
| | | config.setValue("N"); |
| | | configService.updateById(config); |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | |
| | | @ManagerAuth(memo = "RGV信息表") |
| | | public R rgvStateTable() { |
| | | List<RgvStateTableVo> list = new ArrayList<>(); |
| | | List<BasRgv> rgvs = basRgvService.selectList(new EntityWrapper<BasRgv>().orderBy("rgv_no")); |
| | | List<BasRgv> rgvs = basRgvService.list(new QueryWrapper<BasRgv>().orderBy(true, true, "rgv_no")); |
| | | for (BasRgv basRgv : rgvs) { |
| | | RgvStateTableVo vo = new RgvStateTableVo(); |
| | | vo.setRgvNo(basRgv.getRgvNo()); |
| | |
| | | |
| | | vo.setWarnCode(String.valueOf(rgvProtocol.getAlarm())); |
| | | if (rgvProtocol.getAlarm() != null && rgvProtocol.getAlarm() > 0) { |
| | | BasRgvErr err = basRgvErrService.selectById(rgvProtocol.getAlarm()); |
| | | BasRgvErr err = basRgvErrService.getById(rgvProtocol.getAlarm()); |
| | | vo.setAlarm(err == null ? "未知异常" : err.getErrName()); |
| | | vo.setDeviceStatus("ERROR"); |
| | | } |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.asrs.domain.param.StationCommandBarcodeParam; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | |
| | | return R.error("当前系统未启用仿真插件"); |
| | | } |
| | | |
| | | Config enableFakeConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "enableFake")); |
| | | Config enableFakeConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "enableFake")); |
| | | if (enableFakeConfig == null || !"Y".equals(enableFakeConfig.getValue())) { |
| | | return R.error("当前非仿真运行模式,禁止修改条码"); |
| | | } |
| | |
| | | } |
| | | |
| | | Integer devpNo = finalStation.getDeviceNo(); |
| | | DeviceConfig deviceConfig = deviceConfigService.selectOne(new EntityWrapper<DeviceConfig>() |
| | | DeviceConfig deviceConfig = deviceConfigService.getOne(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_no", devpNo) |
| | | .eq("device_type", String.valueOf(SlaveType.Devp))); |
| | | if (deviceConfig == null || deviceConfig.getFake() == null || deviceConfig.getFake() != 1) { |
| | |
| | | return null; |
| | | } |
| | | |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<BasDevp>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<BasDevp>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | List<StationObjModel> list = basDevp.getStationList$(); |
| | | for (StationObjModel entity : list) { |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | @RequestMapping(value = "/wrkLastno/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(wrkLastnoService.selectById(String.valueOf(id))); |
| | | return R.ok(wrkLastnoService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkLastno/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<WrkLastno> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<WrkLastno> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(wrkLastnoService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(wrkLastnoService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | wrkLastno.setModiTime(new Date()); |
| | | wrkLastno.setAppeUser(getUserId()); |
| | | wrkLastno.setAppeTime(new Date()); |
| | | wrkLastnoService.insert(wrkLastno); |
| | | wrkLastnoService.save(wrkLastno); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | return R.error(); |
| | | } |
| | | for (WrkLastno entity : list){ |
| | | wrkLastnoService.delete(new EntityWrapper<>(entity)); |
| | | wrkLastnoService.remove(new QueryWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @ManagerAuth(memo = "工作序号导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<WrkLastno> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<WrkLastno> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("wrkLastno")); |
| | | convert(map, wrapper); |
| | | List<WrkLastno> list = wrkLastnoService.selectList(wrapper); |
| | | List<WrkLastno> list = wrkLastnoService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkLastnoQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<WrkLastno> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<WrkLastno> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("wrk_mk", condition); |
| | | Page<WrkLastno> page = wrkLastnoService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<WrkLastno> page = wrkLastnoService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WrkLastno wrkLastno : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/wrkLastno/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WrkLastno> wrapper = new EntityWrapper<WrkLastno>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkLastnoService.selectOne(wrapper)){ |
| | | QueryWrapper<WrkLastno> wrapper = new QueryWrapper<WrkLastno>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkLastnoService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkLastno.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<WrkMast> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<WrkMast> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | allLike(WrkMast.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){ |
| | | if (orderByField.endsWith("$")){ |
| | | orderByField = orderByField.substring(0, orderByField.length()-1); |
| | | } |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField)); |
| | | }else { |
| | | wrapper.orderBy("io_time", false); |
| | | wrapper.orderBy(true, false, "io_time"); |
| | | } |
| | | return R.ok(wrkMastService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | return R.ok(wrkMastService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | @RequestMapping(value = "/wrkMastLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(wrkMastLogService.selectById(String.valueOf(id))); |
| | | return R.ok(wrkMastLogService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/list/auth") |
| | |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<WrkMastLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<WrkMastLog> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | allLike(WrkMastLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){ |
| | | if (orderByField.endsWith("$")){ |
| | | orderByField = orderByField.substring(0, orderByField.length()-1); |
| | | } |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField)); |
| | | }else { |
| | | wrapper.orderBy("modi_time", false); |
| | | wrapper.orderBy(true, false, "modi_time"); |
| | | } |
| | | return R.ok(wrkMastLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | return R.ok(wrkMastLogService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/wrkMastLog/add/auth") |
| | | @ManagerAuth(memo = "工作历史档添加") |
| | | public R add(WrkMastLog wrkMastLog) { |
| | | wrkMastLogService.insert(wrkMastLog); |
| | | wrkMastLogService.save(wrkMastLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | return R.error(); |
| | | } |
| | | for (WrkMastLog entity : list){ |
| | | wrkMastLogService.delete(new EntityWrapper<>(entity)); |
| | | wrkMastLogService.remove(new QueryWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @ManagerAuth(memo = "工作历史档导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<WrkMastLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<WrkMastLog> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("wrkMastLog")); |
| | | convert(map, wrapper); |
| | | List<WrkMastLog> list = wrkMastLogService.selectList(wrapper); |
| | | List<WrkMastLog> list = wrkMastLogService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<WrkMastLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<WrkMastLog> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<WrkMastLog> page = wrkMastLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<WrkMastLog> page = wrkMastLogService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WrkMastLog wrkMastLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/wrkMastLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WrkMastLog> wrapper = new EntityWrapper<WrkMastLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkMastLogService.selectOne(wrapper)){ |
| | | QueryWrapper<WrkMastLog> wrapper = new QueryWrapper<WrkMastLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkMastLogService.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkMastLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.core.common.Cools; |
| | | import com.zy.core.model.StationObjModel; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | import com.zy.system.entity.User; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | |
| | | public String getWrkSts$(){ |
| | | BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); |
| | | BasWrkStatus basWrkStatus = service.selectById(this.wrkSts); |
| | | BasWrkStatus basWrkStatus = service.getById(this.wrkSts); |
| | | if (!Cools.isEmpty(basWrkStatus)){ |
| | | return String.valueOf(basWrkStatus.getWrkDesc()); |
| | | } |
| | |
| | | |
| | | public String getIoType$(){ |
| | | BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class); |
| | | BasWrkIotype basWrkIotype = service.selectById(this.ioType); |
| | | BasWrkIotype basWrkIotype = service.getById(this.ioType); |
| | | if (!Cools.isEmpty(basWrkIotype)){ |
| | | return String.valueOf(basWrkIotype.getIoDesc()); |
| | | } |
| | |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | import com.core.common.Cools; |
| | | import com.zy.core.model.StationObjModel; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | |
| | | public String getWrkSts$(){ |
| | | BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); |
| | | BasWrkStatus basWrkStatus = service.selectById(this.wrkSts); |
| | | BasWrkStatus basWrkStatus = service.getById(this.wrkSts); |
| | | if (!Cools.isEmpty(basWrkStatus)){ |
| | | return String.valueOf(basWrkStatus.getWrkDesc()); |
| | | } |
| | |
| | | |
| | | public String getIoType$(){ |
| | | BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class); |
| | | BasWrkIotype basWrkIotype = service.selectById(this.ioType); |
| | | BasWrkIotype basWrkIotype = service.getById(this.ioType); |
| | | if (!Cools.isEmpty(basWrkIotype)){ |
| | | return String.valueOf(basWrkIotype.getIoDesc()); |
| | | } |
| | |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | import com.zy.system.entity.User; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | |
| | | public String getWrkSts$(){ |
| | | BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); |
| | | BasWrkStatus basWrkStatus = service.selectById(this.wrkSts); |
| | | BasWrkStatus basWrkStatus = service.getById(this.wrkSts); |
| | | if (!Cools.isEmpty(basWrkStatus)){ |
| | | return String.valueOf(basWrkStatus.getWrkDesc()); |
| | | } |
| | |
| | | |
| | | public String getIoType$(){ |
| | | BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class); |
| | | BasWrkIotype basWrkIotype = service.selectById(this.ioType); |
| | | BasWrkIotype basWrkIotype = service.getById(this.ioType); |
| | | if (!Cools.isEmpty(basWrkIotype)){ |
| | | return String.valueOf(basWrkIotype.getIoDesc()); |
| | | } |
| | |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasLocStsService; |
| | |
| | | |
| | | public String getLocSts$(){ |
| | | BasLocStsService service = SpringUtils.getBean(BasLocStsService.class); |
| | | BasLocSts basLocSts = service.selectById(this.locSts); |
| | | BasLocSts basLocSts = service.getById(this.locSts); |
| | | if (!Cools.isEmpty(basLocSts)){ |
| | | return String.valueOf(basLocSts.getLocDesc()); |
| | | } |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.FieldStrategy; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.FieldStrategy; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.mapper.BasWrkIotypeMapper; |
| | |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机号") |
| | | @TableField(value = "crn_no",strategy = FieldStrategy.IGNORED) |
| | | @TableField(value = "crn_no", insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS) |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 双工位堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value= "双工位堆垛机号") |
| | | @TableField(value = "dual_crn_no",strategy = FieldStrategy.IGNORED) |
| | | @TableField(value = "dual_crn_no", insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS) |
| | | private Integer dualCrnNo; |
| | | |
| | | /** |
| | | * RGV号 |
| | | */ |
| | | @ApiModelProperty(value= "RGV号") |
| | | @TableField(value = "rgv_no",strategy = FieldStrategy.IGNORED) |
| | | @TableField(value = "rgv_no", insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS) |
| | | private Integer rgvNo; |
| | | |
| | | /** |
| | |
| | | |
| | | public String getLocNo$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.locNo); |
| | | LocMast locMast = service.getById(this.locNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | |
| | | |
| | | public String getSourceLocNo$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.sourceLocNo); |
| | | LocMast locMast = service.getById(this.sourceLocNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.mapper.BasWrkIotypeMapper; |
| | |
| | | |
| | | public String getWrkNo$(){ |
| | | WrkMastService service = SpringUtils.getBean(WrkMastService.class); |
| | | WrkMast wrkMast = service.selectById(this.wrkNo); |
| | | WrkMast wrkMast = service.getById(this.wrkNo); |
| | | if (!Cools.isEmpty(wrkMast)){ |
| | | return String.valueOf(wrkMast.getWrkNo()); |
| | | } |
| | |
| | | |
| | | public String getLocNo$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.locNo); |
| | | LocMast locMast = service.getById(this.locNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | |
| | | |
| | | public String getSourceLocNo$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.sourceLocNo); |
| | | LocMast locMast = service.getById(this.sourceLocNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.ApiLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasCrnpErrLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasCrnpErr; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasCrnp; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasCrnpOpt; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnpErrLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnpErr; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnp; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnpOpt; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasLocSts; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasMap; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasOutArea; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasOutStationArea; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasRgvErrLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasRgvErr; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasRgv; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasRgvOpt; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasStationDevice; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasStation; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasStationOpt; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasWrkIotype; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasWrkStatus; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.DeviceDataLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.HttpRequestLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.WrkLastno; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.WrkMastLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import org.apache.ibatis.annotations.*; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.ApiLog; |
| | | |
| | | public interface ApiLogService extends IService<ApiLog> { |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasCrnpErrLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasCrnpErrLogService extends IService<BasCrnpErrLog> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasCrnpErr; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasCrnpErrService extends IService<BasCrnpErr> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasCrnpOpt; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasCrnpOptService extends IService<BasCrnpOpt> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasCrnp; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasCrnpService extends IService<BasCrnp> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasDevpService extends IService<BasDevp> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnpErrLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasDualCrnpErrLogService extends IService<BasDualCrnpErrLog> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnpErr; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasDualCrnpErrService extends IService<BasDualCrnpErr> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnpOpt; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasDualCrnpOptService extends IService<BasDualCrnpOpt> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnp; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasDualCrnpService extends IService<BasDualCrnp> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.BasLocSts; |
| | | |
| | | public interface BasLocStsService extends IService<BasLocSts> { |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasMapService extends IService<BasMap> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.BasOutArea; |
| | | |
| | | public interface BasOutAreaService extends IService<BasOutArea> { |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.BasOutStationArea; |
| | | |
| | | public interface BasOutStationAreaService extends IService<BasOutStationArea> { |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasRgvErrLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasRgvErrLogService extends IService<BasRgvErrLog> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasRgvErr; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasRgvErrService extends IService<BasRgvErr> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasRgvOpt; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasRgvOptService extends IService<BasRgvOpt> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasRgv; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasRgvService extends IService<BasRgv> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.BasStationDevice; |
| | | |
| | | public interface BasStationDeviceService extends IService<BasStationDevice> { |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasStationOpt; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasStationOptService extends IService<BasStationOpt> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasStation; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasStationService extends IService<BasStation> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.BasWrkIotype; |
| | | |
| | | public interface BasWrkIotypeService extends IService<BasWrkIotype> { |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.BasWrkStatus; |
| | | |
| | | public interface BasWrkStatusService extends IService<BasWrkStatus> { |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface DeviceConfigService extends IService<DeviceConfig> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.DeviceDataLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface DeviceDataLogService extends IService<DeviceDataLog> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.HttpRequestLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface HttpRequestLogService extends IService<HttpRequestLog> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.LocMast; |
| | | |
| | | import java.util.List; |
| | |
| | | result.setMessage("通知异常: " + e.getMessage()); |
| | | } finally { |
| | | httpRequestLog.setResult(result.isSuccess() ? 1 : 0); |
| | | httpRequestLogService.insert(httpRequestLog); |
| | | httpRequestLogService.save(httpRequestLog); |
| | | } |
| | | |
| | | if (!result.isSuccess() && updateRetryState && key != null) { |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.WrkLastno; |
| | | |
| | | public interface WrkLastnoService extends IService<WrkLastno> { |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.WrkMastLog; |
| | | |
| | | public interface WrkMastLogService extends IService<WrkMastLog> { |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | |
| | | import java.util.List; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.zy.asrs.entity.ApiLog; |
| | | import com.zy.asrs.mapper.ApiLogMapper; |
| | |
| | | null, // 修改时间 |
| | | null // 备注 |
| | | ); |
| | | if (!this.insert(apiLog)) { |
| | | if (!this.save(apiLog)) { |
| | | log.error("接口调用日志保存失败!"); |
| | | } |
| | | } |
| | |
| | | import com.zy.asrs.mapper.BasCrnpErrLogMapper; |
| | | import com.zy.asrs.entity.BasCrnpErrLog; |
| | | import com.zy.asrs.service.BasCrnpErrLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basCrnpErrLogService") |
| | |
| | | import com.zy.asrs.mapper.BasCrnpErrMapper; |
| | | import com.zy.asrs.entity.BasCrnpErr; |
| | | import com.zy.asrs.service.BasCrnpErrService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basCrnpErrService") |
| | |
| | | import com.zy.asrs.mapper.BasCrnpOptMapper; |
| | | import com.zy.asrs.entity.BasCrnpOpt; |
| | | import com.zy.asrs.service.BasCrnpOptService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basCrnpOptService") |
| | |
| | | import com.zy.asrs.mapper.BasCrnpMapper; |
| | | import com.zy.asrs.entity.BasCrnp; |
| | | import com.zy.asrs.service.BasCrnpService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basCrnpService") |
| | |
| | | import com.zy.asrs.mapper.BasDevpMapper; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basDevpService") |
| | |
| | | import com.zy.asrs.mapper.BasDualCrnpErrLogMapper; |
| | | import com.zy.asrs.entity.BasDualCrnpErrLog; |
| | | import com.zy.asrs.service.BasDualCrnpErrLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basDualCrnpErrLogService") |
| | |
| | | import com.zy.asrs.mapper.BasDualCrnpErrMapper; |
| | | import com.zy.asrs.entity.BasDualCrnpErr; |
| | | import com.zy.asrs.service.BasDualCrnpErrService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basDualCrnpErrService") |
| | |
| | | import com.zy.asrs.mapper.BasDualCrnpOptMapper; |
| | | import com.zy.asrs.entity.BasDualCrnpOpt; |
| | | import com.zy.asrs.service.BasDualCrnpOptService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basDualCrnpOptService") |
| | |
| | | import com.zy.asrs.mapper.BasDualCrnpMapper; |
| | | import com.zy.asrs.entity.BasDualCrnp; |
| | | import com.zy.asrs.service.BasDualCrnpService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basDualCrnpService") |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasLocSts; |
| | | import com.zy.asrs.mapper.BasLocStsMapper; |
| | | import com.zy.asrs.service.BasLocStsService; |
| | |
| | | import com.zy.asrs.mapper.BasMapMapper; |
| | | import com.zy.asrs.entity.BasMap; |
| | | import com.zy.asrs.service.BasMapService; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | |
| | | @Override |
| | | public List<Integer> getLevList() { |
| | | return this.baseMapper.selectList(new EntityWrapper<>()).stream().map(BasMap::getLev).collect(Collectors.toList()); |
| | | return this.baseMapper.selectList(new QueryWrapper<>()).stream().map(BasMap::getLev).collect(Collectors.toList()); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasOutArea; |
| | | import com.zy.asrs.mapper.BasOutAreaMapper; |
| | | import com.zy.asrs.service.BasOutAreaService; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasOutStationArea; |
| | | import com.zy.asrs.mapper.BasOutStationAreaMapper; |
| | | import com.zy.asrs.service.BasOutStationAreaService; |
| | |
| | | import com.zy.asrs.mapper.BasRgvErrLogMapper; |
| | | import com.zy.asrs.entity.BasRgvErrLog; |
| | | import com.zy.asrs.service.BasRgvErrLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basRgvErrLogService") |
| | |
| | | import com.zy.asrs.mapper.BasRgvErrMapper; |
| | | import com.zy.asrs.entity.BasRgvErr; |
| | | import com.zy.asrs.service.BasRgvErrService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basRgvErrService") |
| | |
| | | import com.zy.asrs.mapper.BasRgvOptMapper; |
| | | import com.zy.asrs.entity.BasRgvOpt; |
| | | import com.zy.asrs.service.BasRgvOptService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basRgvOptService") |
| | |
| | | import com.zy.asrs.mapper.BasRgvMapper; |
| | | import com.zy.asrs.entity.BasRgv; |
| | | import com.zy.asrs.service.BasRgvService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basRgvService") |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasStationDevice; |
| | | import com.zy.asrs.mapper.BasStationDeviceMapper; |
| | | import com.zy.asrs.service.BasStationDeviceService; |
| | |
| | | import com.zy.asrs.mapper.BasStationOptMapper; |
| | | import com.zy.asrs.entity.BasStationOpt; |
| | | import com.zy.asrs.service.BasStationOptService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basStationOptService") |
| | |
| | | import com.zy.asrs.mapper.BasStationMapper; |
| | | import com.zy.asrs.entity.BasStation; |
| | | import com.zy.asrs.service.BasStationService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basStationService") |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasWrkIotype; |
| | | import com.zy.asrs.mapper.BasWrkIotypeMapper; |
| | | import com.zy.asrs.service.BasWrkIotypeService; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasWrkStatus; |
| | | import com.zy.asrs.mapper.BasWrkStatusMapper; |
| | | import com.zy.asrs.service.BasWrkStatusService; |
| | |
| | | import com.zy.asrs.mapper.DeviceConfigMapper; |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | | import com.zy.asrs.service.DeviceConfigService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("deviceConfigService") |
| | |
| | | import com.zy.asrs.mapper.DeviceDataLogMapper; |
| | | import com.zy.asrs.entity.DeviceDataLog; |
| | | import com.zy.asrs.service.DeviceDataLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("deviceDataLogService") |
| | |
| | | import com.zy.asrs.mapper.HttpRequestLogMapper; |
| | | import com.zy.asrs.entity.HttpRequestLog; |
| | | import com.zy.asrs.service.HttpRequestLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("httpRequestLogService") |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.mapper.LocMastMapper; |
| | | import com.zy.asrs.service.LocMastService; |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.asrs.entity.BasCrnp; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.WrkMast; |
| | |
| | | public JSONObject calculateAndSaveSchedule() { |
| | | ArrayList<HashMap<String, Object>> crnDataList = new ArrayList<>(); |
| | | |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().eq("status", 1)); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<BasCrnp>().eq("status", 1)); |
| | | Map<Integer, StationObjModel> stationIndex = new HashMap<>(); |
| | | Map<Integer, String> stationCrnCodeIndex = new HashMap<>(); |
| | | |
| | |
| | | CrnProtocol p = crnThread.getStatus(); |
| | | Integer tNo = p.getTaskNo(); |
| | | if (tNo != null && tNo > 0) { |
| | | WrkMast task = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", tNo)); |
| | | WrkMast task = wrkMastService.getOne(new QueryWrapper<WrkMast>().eq("wrk_no", tNo)); |
| | | if (task != null) { |
| | | // Calculate current X, Y |
| | | double curX = (p.getBay() == null ? 0 : p.getBay()) * bayWidth; |
| | |
| | | } |
| | | |
| | | ArrayList<HashMap<String, Object>> taskDataList = new ArrayList<>(); |
| | | List<WrkMast> outTasks = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.NEW_OUTBOUND.sts)); |
| | | List<WrkMast> outTasks = wrkMastService.list(new QueryWrapper<WrkMast>().eq("wrk_sts", WrkStsType.NEW_OUTBOUND.sts)); |
| | | for (WrkMast wrkMast : outTasks) { |
| | | HashMap<String, Object> t = new HashMap<>(); |
| | | t.put("taskId", wrkMast.getWrkNo()); |
| | |
| | | taskDataList.add(t); |
| | | } |
| | | |
| | | List<WrkMast> moveTasks = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.NEW_LOC_MOVE.sts)); |
| | | List<WrkMast> moveTasks = wrkMastService.list(new QueryWrapper<WrkMast>().eq("wrk_sts", WrkStsType.NEW_LOC_MOVE.sts)); |
| | | for (WrkMast wrkMast : moveTasks) { |
| | | HashMap<String, Object> t = new HashMap<>(); |
| | | t.put("taskId", wrkMast.getWrkNo()); |
| | |
| | | taskDataList.add(t); |
| | | } |
| | | |
| | | List<WrkMast> inTasks = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.INBOUND_DEVICE_RUN.sts)); |
| | | List<WrkMast> inTasks = wrkMastService.list(new QueryWrapper<WrkMast>().eq("wrk_sts", WrkStsType.INBOUND_DEVICE_RUN.sts)); |
| | | for (WrkMast wrkMast : inTasks) { |
| | | HashMap<String, Object> t = new HashMap<>(); |
| | | t.put("taskId", wrkMast.getWrkNo()); |
| | |
| | | result = null; |
| | | } |
| | | } else { |
| | | Config uriCfg = configService.selectOne(new EntityWrapper<Config>().eq("code", "plannerSolverUri")); |
| | | Config pathCfg = configService.selectOne(new EntityWrapper<Config>().eq("code", "plannerSolverPath")); |
| | | Config uriCfg = configService.getOne(new QueryWrapper<Config>().eq("code", "plannerSolverUri")); |
| | | Config pathCfg = configService.getOne(new QueryWrapper<Config>().eq("code", "plannerSolverPath")); |
| | | if (uriCfg == null || pathCfg == null || uriCfg.getValue() == null || pathCfg.getValue() == null) { |
| | | // 如果是服务调用,这里无法直接返回R.error,返回null或者empty json |
| | | return null; |
| | |
| | | |
| | | private Double getDoubleConfig(String code, Double def) { |
| | | try { |
| | | Config c = configService.selectOne(new EntityWrapper<Config>().eq("code", code)); |
| | | Config c = configService.getOne(new QueryWrapper<Config>().eq("code", code)); |
| | | if (c != null && c.getValue() != null && c.getValue().trim().length() > 0) { |
| | | return Double.parseDouble(c.getValue().trim()); |
| | | } |
| | |
| | | |
| | | private Integer getIntConfig(String code, Integer def) { |
| | | try { |
| | | Config c = configService.selectOne(new EntityWrapper<Config>().eq("code", code)); |
| | | Config c = configService.getOne(new QueryWrapper<Config>().eq("code", code)); |
| | | if (c != null && c.getValue() != null && c.getValue().trim().length() > 0) { |
| | | String v = c.getValue().trim(); |
| | | if (v.endsWith("%")) v = v.substring(0, v.length() - 1); |
| | |
| | | |
| | | private Boolean getBoolConfig(String code, Boolean def) { |
| | | try { |
| | | Config c = configService.selectOne(new EntityWrapper<Config>().eq("code", code)); |
| | | Config c = configService.getOne(new QueryWrapper<Config>().eq("code", code)); |
| | | if (c != null && c.getValue() != null) { |
| | | String v = c.getValue().trim().toUpperCase(); |
| | | if ("Y".equals(v) || "TRUE".equals(v)) return true; |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.asrs.domain.vo.StationCycleCapacityVo; |
| | | import com.zy.asrs.domain.vo.StationCycleLoopVo; |
| | | import com.zy.asrs.entity.BasDevp; |
| | |
| | | } |
| | | |
| | | private void appendExcludeStationsFromDeviceConfig(Set<Integer> excludeStationSet) { |
| | | List<BasDevp> basDevpList = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevpList = basDevpService.list(new QueryWrapper<>()); |
| | | if (basDevpList == null || basDevpList.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | |
| | | private Map<Integer, Integer> buildStationWorkNoMap() { |
| | | Map<Integer, Integer> workNoMap = new HashMap<>(); |
| | | List<DeviceConfig> devpList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> devpList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Devp))); |
| | | if (devpList == null || devpList.isEmpty()) { |
| | | return workNoMap; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.WrkLastno; |
| | | import com.zy.asrs.mapper.WrkLastnoMapper; |
| | | import com.zy.asrs.service.WrkLastnoService; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.entity.WrkMastLog; |
| | | import com.zy.asrs.mapper.WrkMastLogMapper; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.mapper.WrkMastMapper; |
| | | import com.zy.asrs.service.WrkMastService; |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.asrs.domain.NotifyDto; |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | | import com.zy.asrs.service.DeviceConfigService; |
| | |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | public synchronized void notifyShuttle() { |
| | | List<DeviceConfig> deviceList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> deviceList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Crn))); |
| | | for (DeviceConfig device : deviceList) { |
| | | notifyMsg(String.valueOf(SlaveType.Crn), device.getDeviceNo()); |
| | |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | public synchronized void notifyForkLift() { |
| | | List<DeviceConfig> deviceList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> deviceList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Rgv))); |
| | | for (DeviceConfig device : deviceList) { |
| | | notifyMsg(String.valueOf(SlaveType.Rgv), device.getDeviceNo()); |
| | |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | public synchronized void notifyStation() { |
| | | List<DeviceConfig> deviceList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> deviceList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Devp))); |
| | | for (DeviceConfig device : deviceList) { |
| | | notifyMsg(String.valueOf(SlaveType.Devp), device.getDeviceNo()); |
| | |
| | | } |
| | | |
| | | private synchronized void notifyMsg(String notifyType, Integer device) { |
| | | Config notifyEnableConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "notifyEnable")); |
| | | Config notifyEnableConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "notifyEnable")); |
| | | if (notifyEnableConfig == null) { |
| | | return; |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | Config notifyUriConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "notifyUri")); |
| | | Config notifyUriConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "notifyUri")); |
| | | if (notifyUriConfig == null) { |
| | | return; |
| | | } |
| | | String notifyUri = notifyUriConfig.getValue(); |
| | | |
| | | Config notifyUriPathConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "notifyUriPath")); |
| | | Config notifyUriPathConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "notifyUriPath")); |
| | | if (notifyUriPathConfig == null) { |
| | | return; |
| | | } |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.asrs.service.PlannerService; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.service.ConfigService; |
| | |
| | | public void schedulePlanner() { |
| | | try { |
| | | String crnRunMethod = "normal"; |
| | | Config crnRunMethodConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "crnRunMethod")); |
| | | Config crnRunMethodConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "crnRunMethod")); |
| | | if(crnRunMethodConfig != null) { |
| | | crnRunMethod = crnRunMethodConfig.getValue(); |
| | | } |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.asrs.domain.enums.NotifyMsgType; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.WrkMast; |
| | |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | @Transactional |
| | | public void executeIn(){ |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.COMPLETE_INBOUND.sts)); |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>().eq("wrk_sts", WrkStsType.COMPLETE_INBOUND.sts)); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | log.info("保存工作历史档[workNo={}]失败", wrkMast.getWrkNo()); |
| | | } |
| | | // 删除工作主档 |
| | | if (!wrkMastService.deleteById(wrkMast)) { |
| | | if (!wrkMastService.removeById(wrkMast.getWrkNo())) { |
| | | log.info("删除工作主档[workNo={}]失败", wrkMast.getWrkNo()); |
| | | } |
| | | |
| | |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | @Transactional |
| | | public void executeOut(){ |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.COMPLETE_OUTBOUND.sts)); |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>().eq("wrk_sts", WrkStsType.COMPLETE_OUTBOUND.sts)); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | log.info("保存工作历史档[workNo={}]失败", wrkMast.getWrkNo()); |
| | | } |
| | | // 删除工作主档 |
| | | if (!wrkMastService.deleteById(wrkMast)) { |
| | | if (!wrkMastService.removeById(wrkMast.getWrkNo())) { |
| | | log.info("删除工作主档[workNo={}]失败", wrkMast.getWrkNo()); |
| | | } |
| | | |
| | |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | @Transactional |
| | | public void executeLocMove(){ |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.COMPLETE_LOC_MOVE.sts)); |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>().eq("wrk_sts", WrkStsType.COMPLETE_LOC_MOVE.sts)); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | log.info("保存工作历史档[workNo={}]失败", wrkMast.getWrkNo()); |
| | | } |
| | | // 删除工作主档 |
| | | if (!wrkMastService.deleteById(wrkMast)) { |
| | | if (!wrkMastService.removeById(wrkMast.getWrkNo())) { |
| | | log.info("删除工作主档[workNo={}]失败", wrkMast.getWrkNo()); |
| | | } |
| | | |
| | |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | @Transactional |
| | | public void executeCancelTask(){ |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("mk", "taskCancel")); |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>().eq("mk", "taskCancel")); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | log.info("保存工作历史档[workNo={}]失败", wrkMast.getWrkNo()); |
| | | } |
| | | // 删除工作主档 |
| | | if (!wrkMastService.deleteById(wrkMast)) { |
| | | if (!wrkMastService.removeById(wrkMast.getWrkNo())) { |
| | | log.info("删除工作主档[workNo={}]失败", wrkMast.getWrkNo()); |
| | | } |
| | | |
| | |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | @Transactional |
| | | public void processOutStationRun(){ |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.STATION_RUN.sts)); |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>().eq("wrk_sts", WrkStsType.STATION_RUN.sts)); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | package com.zy.asrs.utils; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.zy.asrs.domain.NotifyDto; |
| | | import com.zy.asrs.domain.enums.NotifyMsgType; |
| | |
| | | |
| | | private boolean append(String notifyType, Integer device, String taskNo, String superTaskNo, NotifyMsgType msgType, String data) { |
| | | boolean notifyEnable = true; |
| | | Config notifyEnableConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "notifyEnable")); |
| | | Config notifyEnableConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "notifyEnable")); |
| | | if (notifyEnableConfig != null) { |
| | | notifyEnable = notifyEnableConfig.getValue().equals("Y"); |
| | | } |
| | |
| | | dto.setSuperTaskNo(superTaskNo); |
| | | |
| | | //重试次数 |
| | | Config notifyFailTimesConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "notifyFailTimes")); |
| | | Config notifyFailTimesConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "notifyFailTimes")); |
| | | if (notifyFailTimesConfig != null) { |
| | | dto.setFailTimes(Integer.parseInt(notifyFailTimesConfig.getValue())); |
| | | } |
| | | |
| | | //重试间隔 |
| | | Config notifyRetryTimeConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "notifyRetryTime")); |
| | | Config notifyRetryTimeConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "notifyRetryTime")); |
| | | if (notifyRetryTimeConfig != null) { |
| | | dto.setRetryTime(Integer.parseInt(notifyRetryTimeConfig.getValue())); |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Arith; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | |
| | | BasCrnpService basCrnpService = SpringUtils.getBean(BasCrnpService.class); |
| | | BasStationDeviceService basStationDeviceService = SpringUtils.getBean(BasStationDeviceService.class); |
| | | |
| | | List<BasStationDevice> stationDevices = basStationDeviceService.selectList(new EntityWrapper<BasStationDevice>().eq("station_id", stationId)); |
| | | List<BasStationDevice> stationDevices = basStationDeviceService.list(new QueryWrapper<BasStationDevice>().eq("station_id", stationId)); |
| | | boolean hasConfig = !stationDevices.isEmpty(); |
| | | List<Integer> allowedCrnNos = new ArrayList<>(); |
| | | if (hasConfig) { |
| | |
| | | currentCircleTaskCrnNo = Integer.parseInt(String.valueOf(object)); |
| | | } |
| | | |
| | | Wrapper<BasCrnp> wrapper = new EntityWrapper<BasCrnp>() |
| | | QueryWrapper<BasCrnp> wrapper = new QueryWrapper<BasCrnp>() |
| | | .eq("in_enable", "Y") |
| | | .eq("status", 1); |
| | | |
| | | if (currentCircleTaskCrnNo != null) { |
| | | currentCircleTaskCrnNo = currentCircleTaskCrnNo + 1; |
| | | BasCrnp basCrnp = basCrnpService.selectOne(new EntityWrapper<BasCrnp>() |
| | | BasCrnp basCrnp = basCrnpService.getOne(new QueryWrapper<BasCrnp>() |
| | | .eq("crn_no", currentCircleTaskCrnNo) |
| | | .eq("in_enable", "Y") |
| | | .eq("status", 1) |
| | | ); |
| | | List<WrkMast> currentCrnTask = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> currentCrnTask = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("crn_no", currentCircleTaskCrnNo) |
| | | ); |
| | | if (currentCrnTask.size() <= 1) { |
| | |
| | | } |
| | | |
| | | HashMap<Integer, Integer> map = new HashMap<>(); |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<>()); |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(wrapper); |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<>()); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(wrapper); |
| | | |
| | | List<BasCrnp> baseList = new ArrayList<>(); |
| | | List<BasCrnp> extraList = new ArrayList<>(); |
| | |
| | | continue; |
| | | } |
| | | |
| | | List<WrkMast> inWrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> inWrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("crn_no", basCrnp.getCrnNo()) |
| | | .eq("io_type", WrkIoType.IN.id) |
| | | ); |
| | |
| | | BasDualCrnpService basDualCrnpService = SpringUtils.getBean(BasDualCrnpService.class); |
| | | BasStationDeviceService basStationDeviceService = SpringUtils.getBean(BasStationDeviceService.class); |
| | | |
| | | List<BasStationDevice> stationDevices = basStationDeviceService.selectList(new EntityWrapper<BasStationDevice>().eq("station_id", stationId)); |
| | | List<BasStationDevice> stationDevices = basStationDeviceService.list(new QueryWrapper<BasStationDevice>().eq("station_id", stationId)); |
| | | boolean hasConfig = !stationDevices.isEmpty(); |
| | | List<Integer> allowedCrnNos = new ArrayList<>(); |
| | | if (hasConfig) { |
| | |
| | | } |
| | | } |
| | | |
| | | Wrapper<BasDualCrnp> wrapper = new EntityWrapper<BasDualCrnp>() |
| | | QueryWrapper<BasDualCrnp> wrapper = new QueryWrapper<BasDualCrnp>() |
| | | .eq("in_enable", "Y") |
| | | .eq("status", 1); |
| | | |
| | | HashMap<Integer, Integer> map = new HashMap<>(); |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<>()); |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.selectList(wrapper); |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<>()); |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.list(wrapper); |
| | | |
| | | List<BasDualCrnp> baseList = new ArrayList<>(); |
| | | List<BasDualCrnp> extraList = new ArrayList<>(); |
| | |
| | | continue; |
| | | } |
| | | |
| | | List<WrkMast> inWrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> inWrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("dual_crn_no", basDualCrnp.getCrnNo()) |
| | | .eq("io_type", WrkIoType.IN.id) |
| | | ); |
| | |
| | | return rowList; |
| | | } |
| | | |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>()); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<BasCrnp>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | String deepRowsStr = basCrnp.getDeepRows(); |
| | | if(!Cools.isEmpty(deepRowsStr)){ |
| | |
| | | } |
| | | } |
| | | |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.selectList(new EntityWrapper<BasDualCrnp>()); |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.list(new QueryWrapper<BasDualCrnp>()); |
| | | for (BasDualCrnp basDualCrnp : basDualCrnps) { |
| | | String deepRowsStr = basDualCrnp.getDeepRows(); |
| | | if(!Cools.isEmpty(deepRowsStr)){ |
| | |
| | | } |
| | | |
| | | List<Integer> controlRowList = null; |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | List<List<Integer>> rowList = basCrnp.getControlRows$(); |
| | | for (List<Integer> rows : rowList) { |
| | |
| | | } |
| | | |
| | | List<Integer> controlRowList = null; |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.list(new QueryWrapper<>()); |
| | | for (BasDualCrnp basDualCrnp : basDualCrnps) { |
| | | List<List<Integer>> rowList = basDualCrnp.getControlRows$(); |
| | | for (List<Integer> rows : rowList) { |
| | |
| | | |
| | | List<Integer> controlRowList = null; |
| | | List<Integer> deepRowList = null; |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | List<List<Integer>> rowList = basCrnp.getControlRows$(); |
| | | for (List<Integer> rows : rowList) { |
| | |
| | | |
| | | List<Integer> controlRowList = null; |
| | | List<Integer> deepRowList = null; |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.list(new QueryWrapper<>()); |
| | | for (BasDualCrnp basDualCrnp : basDualCrnps) { |
| | | List<List<Integer>> rowList = basDualCrnp.getControlRows$(); |
| | | for (List<Integer> rows : rowList) { |
| | |
| | | return null; |
| | | } |
| | | |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | List<List<Integer>> controlRows = basCrnp.getControlRows$(); |
| | | for (List<Integer> list : controlRows) { |
| | |
| | | } |
| | | } |
| | | |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.list(new QueryWrapper<>()); |
| | | for (BasDualCrnp basDualCrnp : basDualCrnps) { |
| | | List<List<Integer>> controlRows = basDualCrnp.getControlRows$(); |
| | | for (List<Integer> list : controlRows) { |
| | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.websocket.*; |
| | | import javax.websocket.server.ServerEndpoint; |
| | | import jakarta.websocket.*; |
| | | import jakarta.websocket.server.ServerEndpoint; |
| | | import java.io.IOException; |
| | | import java.util.concurrent.CopyOnWriteArraySet; |
| | | |
| | |
| | | package com.zy.common.config; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | import org.springframework.lang.Nullable; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.method.HandlerMethod; |
| | | import org.springframework.web.servlet.HandlerInterceptor; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletRequest; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.lang.reflect.Method; |
| | | |
| | | /** |
| | | * Created by vincent on 2019-06-13 |
| | | */ |
| | | @Component |
| | | public class AdminInterceptor extends HandlerInterceptorAdapter { |
| | | public class AdminInterceptor implements HandlerInterceptor { |
| | | |
| | | @Value("${super.pwd}") |
| | | private String superPwd; |
| | |
| | | // if (obj instanceof OperateLog) { |
| | | // OperateLog operate = (OperateLog) obj; |
| | | // operate.setResponse(String.valueOf(response.getStatus())); |
| | | // operateLogService.insert(operate); |
| | | // operateLogService.save(operate); |
| | | // } |
| | | } |
| | | |
| | | private boolean check(HttpServletRequest request, HttpServletResponse response, String memo) { |
| | | try { |
| | | String token = request.getHeader("token"); |
| | | UserLogin userLogin = userLoginService.selectOne(new EntityWrapper<UserLogin>().eq("token", token).eq("system_type", "WCS")); |
| | | UserLogin userLogin = userLoginService.getOne(new QueryWrapper<UserLogin>().eq("token", token).eq("system_type", "WCS")); |
| | | if (null == userLogin){ |
| | | Http.response(response, BaseRes.DENIED); |
| | | return false; |
| | | } |
| | | User user = userService.selectById(userLogin.getUserId()); |
| | | User user = userService.getById(userLogin.getUserId()); |
| | | String deToken = Cools.deTokn(token, user.getPassword()); |
| | | long timestamp = Long.parseLong(deToken.substring(0, 13)); |
| | | // 1天后过期 |
| | |
| | | operateLog.setUserId(user.getId()); |
| | | operateLog.setRequest(JSON.toJSONString(request.getParameterMap())); |
| | | operateLog.setResponse(JSON.toJSONString(request.getRequestURI())); |
| | | operateLogService.insert(operateLog); |
| | | operateLogService.save(operateLog); |
| | | // 请求缓存 |
| | | request.setAttribute("userId", user.getId()); |
| | | // request.setAttribute("operateLog", operateLog); |
| | |
| | | Permission permission = new Permission(); |
| | | permission.setAction(action); |
| | | permission.setStatus((short) 1); |
| | | Permission one = permissionService.selectOne(new EntityWrapper<>(permission)); |
| | | Permission one = permissionService.getOne(new QueryWrapper<>(permission)); |
| | | if (!Cools.isEmpty(one)) { |
| | | RolePermission rolePermission = rolePermissionService.selectOne(new EntityWrapper<>(new RolePermission(user.getRoleId(), permission.getId()))); |
| | | RolePermission rolePermission = rolePermissionService.getOne(new QueryWrapper<>(new RolePermission(user.getRoleId(), permission.getId()))); |
| | | return !Cools.isEmpty(rolePermission); |
| | | } |
| | | return true; |
| | |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletRequest; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.lang.reflect.Method; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | |
| | | } |
| | | |
| | | private void saveLog(ProceedingJoinPoint joinPoint, HttpServletRequest request, Object result, String memo) { |
| | | apiLogService.insert(new ApiLog( |
| | | apiLogService.save(new ApiLog( |
| | | null, |
| | | memo, |
| | | request != null ? Optional.ofNullable(String.valueOf(request.getRequestURI())).orElse(null) : null, |
| | |
| | | |
| | | private void saveErrLog(ProceedingJoinPoint joinPoint, HttpServletRequest request, Object response, Throwable ex, |
| | | String memo) { |
| | | apiLogService.insert(new ApiLog( |
| | | apiLogService.save(new ApiLog( |
| | | null, |
| | | memo, |
| | | request != null ? Optional.ofNullable(String.valueOf(request.getRequestURI())).orElse(null) : null, |
| | |
| | | import com.fasterxml.jackson.annotation.JsonAutoDetect; |
| | | import com.fasterxml.jackson.annotation.PropertyAccessor; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator; |
| | | import org.springframework.cache.annotation.CachingConfigurerSupport; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | |
| | | // 指定要序列化的域,field,get和set,以及修饰符范围,ANY是都有包括private和public |
| | | om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
| | | // 指定序列化输入的类型,类必须是非final修饰的,final修饰的类,比如String,Integer等会跑出异常 |
| | | om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
| | | om.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL); |
| | | jacksonSerializer.setObjectMapper(om); |
| | | |
| | | // 值采用json序列化 |
| | |
| | | package com.zy.common.entity; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.Config; |
| | |
| | | */ |
| | | public static Parameter reset() { |
| | | ConfigService configService = SpringUtils.getBean(ConfigService.class); |
| | | List<Config> configs = configService.selectList(new EntityWrapper<Config>().eq("status", "1")); |
| | | List<Config> configs = configService.list(new QueryWrapper<Config>().eq("status", "1")); |
| | | Map<String, Object> data = new HashMap<>(); |
| | | for (Config config : configs) { |
| | | if (config.getType() == 1) { |
| | |
| | | import com.core.common.Cools; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; |
| | | import org.springframework.web.servlet.HandlerInterceptor; |
| | | |
| | | import javax.servlet.http.Cookie; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.Cookie; |
| | | import jakarta.servlet.http.HttpServletRequest; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.Locale; |
| | | |
| | | @Component |
| | | public class RequestLocaleInterceptor extends HandlerInterceptorAdapter { |
| | | public class RequestLocaleInterceptor implements HandlerInterceptor { |
| | | |
| | | public static final String LANG_COOKIE_NAME = "wcs_lang"; |
| | | |
| | |
| | | package com.zy.common.service; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.domain.param.*; |
| | |
| | | * @return workNo(工作号) |
| | | */ |
| | | public synchronized int getWorkNo(Integer wrkMk) { |
| | | WrkLastno wrkLastno = wrkLastnoService.selectById(wrkMk); |
| | | WrkLastno wrkLastno = wrkLastnoService.getById(wrkMk); |
| | | if (Cools.isEmpty(wrkLastno)) { |
| | | throw new CoolException("数据异常,请联系管理员"); |
| | | } |
| | |
| | | |
| | | if(wrkNo == null) { |
| | | if (!Cools.isEmpty(taskNo)) { |
| | | wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wms_wrk_no", taskNo)); |
| | | wrkMast = wrkMastService.getOne(new QueryWrapper<WrkMast>().eq("wms_wrk_no", taskNo)); |
| | | } |
| | | }else { |
| | | wrkMast = wrkMastService.selectByWorkNo(wrkNo); |
| | |
| | | |
| | | if(wrkNo == null) { |
| | | if (!Cools.isEmpty(taskNo)) { |
| | | wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wms_wrk_no", taskNo)); |
| | | wrkMast = wrkMastService.getOne(new QueryWrapper<WrkMast>().eq("wms_wrk_no", taskNo)); |
| | | } |
| | | }else { |
| | | wrkMast = wrkMastService.selectByWorkNo(wrkNo); |
| | |
| | | throw new CoolException("未知设备类型"); |
| | | } |
| | | |
| | | boolean res = wrkMastService.insert(wrkMast); |
| | | boolean res = wrkMastService.save(wrkMast); |
| | | if (!res) { |
| | | News.error("移库任务 --- 保存工作档失败!"); |
| | | throw new CoolException("保存工作档失败"); |
| | |
| | | throw new CoolException("未知设备类型"); |
| | | } |
| | | |
| | | boolean res = wrkMastService.insert(wrkMast); |
| | | boolean res = wrkMastService.save(wrkMast); |
| | | if (!res) { |
| | | News.error("入库任务 --- 保存工作档失败!"); |
| | | throw new CoolException("保存工作档失败"); |
| | |
| | | } |
| | | |
| | | if(Cools.isEmpty(staNo)) { |
| | | List<BasOutStationArea> areaList = basOutStationAreaService.selectList(new EntityWrapper<BasOutStationArea>().eq("area_code", outArea)); |
| | | List<BasOutStationArea> areaList = basOutStationAreaService.list(new QueryWrapper<BasOutStationArea>().eq("area_code", outArea)); |
| | | if (areaList.isEmpty()) { |
| | | throw new CoolException("出库区域不存在"); |
| | | } |
| | |
| | | } |
| | | |
| | | if (findCrnResult.getCrnType().equals(SlaveType.Crn)) { |
| | | BasCrnp basCrnp = basCrnpService.selectOne(new EntityWrapper<BasCrnp>().eq("crn_no", crnNo)); |
| | | BasCrnp basCrnp = basCrnpService.getOne(new QueryWrapper<BasCrnp>().eq("crn_no", crnNo)); |
| | | if(basCrnp == null) { |
| | | throw new CoolException("未找到对应堆垛机数据"); |
| | | } |
| | | List<WrkMast> outWrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> outWrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("crn_no", crnNo) |
| | | .eq("io_type", WrkIoType.OUT.id) |
| | | ); |
| | |
| | | |
| | | wrkMast.setCrnNo(findCrnResult.getCrnNo()); |
| | | } else if (findCrnResult.getCrnType().equals(SlaveType.DualCrn)) { |
| | | BasDualCrnp basDualCrnp = basDualCrnpService.selectOne(new EntityWrapper<BasDualCrnp>().eq("crn_no", crnNo)); |
| | | BasDualCrnp basDualCrnp = basDualCrnpService.getOne(new QueryWrapper<BasDualCrnp>().eq("crn_no", crnNo)); |
| | | if(basDualCrnp == null) { |
| | | throw new CoolException("未找到对应双工位堆垛机数据"); |
| | | } |
| | | List<WrkMast> outWrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> outWrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("dual_crn_no", crnNo) |
| | | .eq("io_type", WrkIoType.OUT.id) |
| | | ); |
| | |
| | | throw new CoolException("未知设备类型"); |
| | | } |
| | | |
| | | boolean res = wrkMastService.insert(wrkMast); |
| | | boolean res = wrkMastService.save(wrkMast); |
| | | if (!res) { |
| | | News.error("出库任务 --- 保存工作档失败!"); |
| | | throw new CoolException("保存工作档失败"); |
| | |
| | | } |
| | | |
| | | public FindCrnNoResult findCrnNoByLocNo(String locNo) { |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | List<List<Integer>> rowList = basCrnp.getControlRows$(); |
| | | for (List<Integer> rows : rowList) { |
| | |
| | | } |
| | | } |
| | | |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.list(new QueryWrapper<>()); |
| | | for (BasDualCrnp basDualCrnp : basDualCrnps) { |
| | | List<List<Integer>> rowList = basDualCrnp.getControlRows$(); |
| | | for (List<Integer> rows : rowList) { |
| | |
| | | List<StationObjModel> stationList = new ArrayList<>(); |
| | | Integer crnNo = findCrnNoResult.getCrnNo(); |
| | | if (findCrnNoResult.getCrnType().equals(SlaveType.Crn)) { |
| | | BasCrnp basCrnp = basCrnpService.selectOne(new EntityWrapper<BasCrnp>().eq("crn_no", crnNo)); |
| | | BasCrnp basCrnp = basCrnpService.getOne(new QueryWrapper<BasCrnp>().eq("crn_no", crnNo)); |
| | | if(basCrnp == null) { |
| | | return null; |
| | | } |
| | | stationList = basCrnp.getInStationList$(); |
| | | } else if (findCrnNoResult.getCrnType().equals(SlaveType.DualCrn)) { |
| | | BasDualCrnp basDualCrnp = basDualCrnpService.selectOne(new EntityWrapper<BasDualCrnp>().eq("crn_no", crnNo)); |
| | | BasDualCrnp basDualCrnp = basDualCrnpService.getOne(new QueryWrapper<BasDualCrnp>().eq("crn_no", crnNo)); |
| | | if(basDualCrnp == null) { |
| | | return null; |
| | | } |
| | |
| | | List<StationObjModel> stationList = new ArrayList<>(); |
| | | Integer crnNo = findCrnNoResult.getCrnNo(); |
| | | if (findCrnNoResult.getCrnType().equals(SlaveType.Crn)) { |
| | | BasCrnp basCrnp = basCrnpService.selectOne(new EntityWrapper<BasCrnp>().eq("crn_no", crnNo)); |
| | | BasCrnp basCrnp = basCrnpService.getOne(new QueryWrapper<BasCrnp>().eq("crn_no", crnNo)); |
| | | if(basCrnp == null) { |
| | | return null; |
| | | } |
| | | stationList = basCrnp.getOutStationList$(); |
| | | } else if (findCrnNoResult.getCrnType().equals(SlaveType.DualCrn)) { |
| | | BasDualCrnp basDualCrnp = basDualCrnpService.selectOne(new EntityWrapper<BasDualCrnp>().eq("crn_no", crnNo)); |
| | | BasDualCrnp basDualCrnp = basDualCrnpService.getOne(new QueryWrapper<BasDualCrnp>().eq("crn_no", crnNo)); |
| | | if(basDualCrnp == null) { |
| | | return null; |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.core.common.R; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.PrintWriter; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.SpringUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasMap; |
| | |
| | | |
| | | public List<List<NavigateNode>> getStationMap(int lev) { |
| | | BasMapService basMapService = SpringUtils.getBean(BasMapService.class); |
| | | BasMap basMap = basMapService.selectOne(new EntityWrapper<BasMap>().eq("lev", lev)); |
| | | BasMap basMap = basMapService.getOne(new QueryWrapper<BasMap>().eq("lev", lev)); |
| | | if (basMap == null) { |
| | | throw new CoolException("地图不存在"); |
| | | } |
| | |
| | | |
| | | public List<List<NavigateNode>> getRgvTrackMap(int lev) { |
| | | BasMapService basMapService = SpringUtils.getBean(BasMapService.class); |
| | | BasMap basMap = basMapService.selectOne(new EntityWrapper<BasMap>().eq("lev", lev)); |
| | | BasMap basMap = basMapService.getOne(new QueryWrapper<BasMap>().eq("lev", lev)); |
| | | if (basMap == null) { |
| | | throw new CoolException("地图不存在"); |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.SpringUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.common.model.NavigateNode; |
| | |
| | | private BasStationService basStationService; |
| | | |
| | | public synchronized List<NavigateNode> calcByStationId(Integer startStationId, Integer endStationId) { |
| | | BasStation startStation = basStationService.selectById(startStationId); |
| | | BasStation startStation = basStationService.getById(startStationId); |
| | | if (startStation == null) { |
| | | throw new CoolException("未找到该 起点 对应的站点数据"); |
| | | } |
| | |
| | | try { |
| | | DeviceConfigService deviceConfigService = SpringUtils.getBean(DeviceConfigService.class); |
| | | if (deviceConfigService != null) { |
| | | List<DeviceConfig> devpList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> devpList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Devp))); |
| | | for (DeviceConfig deviceConfig : devpList) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, deviceConfig.getDeviceNo()); |
| | |
| | | try { |
| | | ConfigService configService = SpringUtils.getBean(ConfigService.class); |
| | | if (configService != null) { |
| | | Config cfgLen = configService.selectOne(new EntityWrapper<Config>().eq("code", "stationPathLenWeightPercent")); |
| | | Config cfgLen = configService.getOne(new QueryWrapper<Config>().eq("code", "stationPathLenWeightPercent")); |
| | | if (cfgLen != null && cfgLen.getValue() != null) { |
| | | String v = cfgLen.getValue().trim(); |
| | | if (v.endsWith("%")) v = v.substring(0, v.length() - 1); |
| | | try { lenWeightPercent = Double.parseDouble(v); } catch (Exception ignore) {} |
| | | } |
| | | Config cfgCong = configService.selectOne(new EntityWrapper<Config>().eq("code", "stationPathCongWeightPercent")); |
| | | Config cfgCong = configService.getOne(new QueryWrapper<Config>().eq("code", "stationPathCongWeightPercent")); |
| | | if (cfgCong != null && cfgCong.getValue() != null) { |
| | | String v = cfgCong.getValue().trim(); |
| | | if (v.endsWith("%")) v = v.substring(0, v.length() - 1); |
| | |
| | | package com.zy.common.utils; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.awt.*; |
| | | import java.awt.image.BufferedImage; |
| | | import java.util.Map; |
| | |
| | | package com.zy.common.web; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | res.put("token", Cools.enToken(System.currentTimeMillis() + mobile, superPwd)); |
| | | return R.ok(res); |
| | | } |
| | | EntityWrapper<User> userWrapper = new EntityWrapper<>(); |
| | | QueryWrapper<User> userWrapper = new QueryWrapper<>(); |
| | | userWrapper.eq("mobile", mobile); |
| | | User user = userService.selectOne(userWrapper); |
| | | User user = userService.getOne(userWrapper); |
| | | if (Cools.isEmpty(user)){ |
| | | return new R(10001, i18nMessageService.getMessage("response.user.notFound")); |
| | | } |
| | |
| | | return new R(10003, i18nMessageService.getMessage("response.user.passwordMismatch")); |
| | | } |
| | | String token = Cools.enToken(System.currentTimeMillis() + mobile, user.getPassword()); |
| | | userLoginService.delete(new EntityWrapper<UserLogin>().eq("user_id", user.getId()).eq("system_type", "WCS")); |
| | | userLoginService.remove(new QueryWrapper<UserLogin>().eq("user_id", user.getId()).eq("system_type", "WCS")); |
| | | UserLogin userLogin = new UserLogin(); |
| | | userLogin.setUserId(user.getId()); |
| | | userLogin.setToken(token); |
| | | userLogin.setSystemType("WCS"); |
| | | userLoginService.insert(userLogin); |
| | | userLoginService.save(userLogin); |
| | | Map<String, Object> res = new HashMap<>(); |
| | | res.put("username", user.getUsername()); |
| | | res.put("token", token); |
| | |
| | | @RequestMapping("/user/detail/auth") |
| | | @ManagerAuth |
| | | public R userDetail(){ |
| | | return R.ok(userService.selectById(getUserId())); |
| | | return R.ok(userService.getById(getUserId())); |
| | | } |
| | | |
| | | @RequestMapping("/menu/auth") |
| | | @ManagerAuth(memo = "首页菜单") |
| | | public R menu(){ |
| | | // 获取所有一级菜单 |
| | | List<Resource> oneLevel = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 1).eq("status", 1).orderBy("sort")); |
| | | List<Resource> oneLevel = resourceService.list(new QueryWrapper<Resource>().eq("level", 1).eq("status", 1).orderBy(true, true, "sort")); |
| | | User user = null; |
| | | Wrapper<Resource> resourceWrapper; |
| | | QueryWrapper<Resource> resourceWrapper; |
| | | if (getUserId() == 9527) { |
| | | resourceWrapper = new EntityWrapper<Resource>().eq("level", 2).eq("status", 1).orderBy("sort"); |
| | | resourceWrapper = new QueryWrapper<Resource>().eq("level", 2).eq("status", 1).orderBy(true, true, "sort"); |
| | | } else { |
| | | // 获取当前用户的所有二级菜单 |
| | | user = userService.selectById(getUserId()); |
| | | List<RoleResource> roleResources = roleResourceService.selectList(new EntityWrapper<RoleResource>().eq("role_id", user.getRoleId())); |
| | | user = userService.getById(getUserId()); |
| | | List<RoleResource> roleResources = roleResourceService.list(new QueryWrapper<RoleResource>().eq("role_id", user.getRoleId())); |
| | | List<Long> resourceIds = new ArrayList<>(); |
| | | roleResources.forEach(roleResource -> resourceIds.add(roleResource.getResourceId())); |
| | | if (resourceIds.isEmpty()){ |
| | | return R.ok(); |
| | | } |
| | | resourceWrapper = new EntityWrapper<Resource>().in("id", resourceIds).eq("level", 2).eq("status", 1).orderBy("sort"); |
| | | resourceWrapper = new QueryWrapper<Resource>().in("id", resourceIds).eq("level", 2).eq("status", 1).orderBy(true, true, "sort"); |
| | | } |
| | | List<Resource> twoLevel = resourceService.selectList(resourceWrapper); |
| | | List<Resource> twoLevel = resourceService.list(resourceWrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Resource menu : oneLevel) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | |
| | | // 是否拥有查看权限 |
| | | if (getUserId() != 9527) { |
| | | Resource view = resourceService.selectOne(new EntityWrapper<Resource>().eq("resource_id", resource.getId()).like("code", "view")); |
| | | Resource view = resourceService.getOne(new QueryWrapper<Resource>().eq("resource_id", resource.getId()).like("code", "view")); |
| | | if (!Cools.isEmpty(view)){ |
| | | RoleResource param = new RoleResource(); |
| | | param.setResourceId(view.getId()); |
| | | param.setRoleId(user.getRoleId()); |
| | | if (null == roleResourceService.selectOne(new EntityWrapper<>(param))){ |
| | | if (null == roleResourceService.getOne(new QueryWrapper<>(param))){ |
| | | continue; |
| | | } |
| | | } |
| | |
| | | @RequestMapping("/power/list/auth") |
| | | @ManagerAuth |
| | | public R powerList(){ |
| | | List<Resource> oneLevels = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 1).eq("status", 1).orderBy("sort")); |
| | | List<Resource> oneLevels = resourceService.list(new QueryWrapper<Resource>().eq("level", 1).eq("status", 1).orderBy(true, true, "sort")); |
| | | List<Map> result = new ArrayList<>(); |
| | | // 一级 |
| | | for (Resource oneLevel : oneLevels){ |
| | |
| | | oneLevelMap.put("id", oneLevel.getId()); |
| | | oneLevelMap.put("spread", true); |
| | | oneLevelMap.put("children", twoLevelsList); |
| | | List<Resource> twoLevels = resourceService.selectList(new EntityWrapper<Resource>().eq("resource_id", oneLevel.getId()).eq("level", 2).eq("status", 1).orderBy("sort")); |
| | | List<Resource> twoLevels = resourceService.list(new QueryWrapper<Resource>().eq("resource_id", oneLevel.getId()).eq("level", 2).eq("status", 1).orderBy(true, true, "sort")); |
| | | // 二级 |
| | | for (Resource twoLevel : twoLevels){ |
| | | Map<String, Object> twoLevelMap = new HashMap<>(); |
| | |
| | | List<Map> threeLevelsList = new ArrayList<>(); |
| | | twoLevelMap.put("children", threeLevelsList); |
| | | // 三级 |
| | | List<Resource> threeLevels = resourceService.selectList(new EntityWrapper<Resource>().eq("resource_id", twoLevel.getId()).eq("level", 3).eq("status", 1).orderBy("sort")); |
| | | List<Resource> threeLevels = resourceService.list(new QueryWrapper<Resource>().eq("resource_id", twoLevel.getId()).eq("level", 3).eq("status", 1).orderBy(true, true, "sort")); |
| | | for (Resource threeLevel : threeLevels){ |
| | | Map<String, Object> threeLevelMap = new HashMap<>(); |
| | | threeLevelMap.put("title", localizeResourceName(threeLevel)); |
| | |
| | | functions.put("spread", true); |
| | | List<Map> funcs = new ArrayList<>(); |
| | | functions.put("children", funcs); |
| | | List<Permission> permissions = permissionService.selectList(new EntityWrapper<Permission>().eq("status", 1)); |
| | | List<Permission> permissions = permissionService.list(new QueryWrapper<Permission>().eq("status", 1)); |
| | | for (Permission permission : permissions) { |
| | | Map<String, Object> func = new HashMap<>(); |
| | | func.put("title", i18nMessageService.resolvePermissionText(permission.getName(), permission.getAction(), permission.getId())); |
| | |
| | | public R get(@PathVariable("roleId") Long roleId) { |
| | | List<Object> result = new ArrayList<>(); |
| | | // 菜单 |
| | | List<RoleResource> roleResources = roleResourceService.selectList(new EntityWrapper<RoleResource>().eq("role_id", roleId)); |
| | | List<RoleResource> roleResources = roleResourceService.list(new QueryWrapper<RoleResource>().eq("role_id", roleId)); |
| | | for (RoleResource roleResource : roleResources){ |
| | | Resource resource = resourceService.selectById(roleResource.getResourceId()); |
| | | Resource resource = resourceService.getById(roleResource.getResourceId()); |
| | | if (!Cools.isEmpty(resource)){ |
| | | if (resource.getLevel() == 3){ |
| | | result.add(resource.getId()); |
| | |
| | | } |
| | | } |
| | | // 功能 |
| | | List<RolePermission> rolePermissions = rolePermissionService.selectList(new EntityWrapper<RolePermission>().eq("role_id", roleId)); |
| | | List<RolePermission> rolePermissions = rolePermissionService.list(new QueryWrapper<RolePermission>().eq("role_id", roleId)); |
| | | for (RolePermission rolePermission : rolePermissions){ |
| | | Permission permission = permissionService.selectById(rolePermission.getPermissionId()); |
| | | Permission permission = permissionService.getById(rolePermission.getPermissionId()); |
| | | if (!Cools.isEmpty(permission)){ |
| | | result.add(permission.getAction()); |
| | | } |
| | |
| | | @ManagerAuth(memo = "授权") |
| | | @Transactional |
| | | public R power(Long roleId, String powers){ |
| | | Role role = roleService.selectById(roleId); |
| | | Role role = roleService.getById(roleId); |
| | | Long leaderId = role.getLeader(); |
| | | roleResourceService.delete(new EntityWrapper<RoleResource>().eq("role_id", roleId)); |
| | | rolePermissionService.delete(new EntityWrapper<RolePermission>().eq("role_id", roleId)); |
| | | roleResourceService.remove(new QueryWrapper<RoleResource>().eq("role_id", roleId)); |
| | | rolePermissionService.remove(new QueryWrapper<RolePermission>().eq("role_id", roleId)); |
| | | if (!Cools.isEmpty(powers)){ |
| | | List<PowerDto> dtos = JSON.parseArray(powers, PowerDto.class); |
| | | for (PowerDto dto : dtos) { |
| | | Resource resource = resourceService.selectOne(new EntityWrapper<Resource>().eq("id", dto.getTwo()).eq("level", 2)); |
| | | Resource resource = resourceService.getOne(new QueryWrapper<Resource>().eq("id", dto.getTwo()).eq("level", 2)); |
| | | if (!Cools.isEmpty(resource)) { |
| | | // 校验上级权限 |
| | | if (leaderId != null) { |
| | | RoleResource roleResource = roleResourceService.selectOne(new EntityWrapper<RoleResource>().eq("role_id", leaderId).eq("resource_id", resource.getId())); |
| | | RoleResource roleResource = roleResourceService.getOne(new QueryWrapper<RoleResource>().eq("role_id", leaderId).eq("resource_id", resource.getId())); |
| | | if (null == roleResource) { |
| | | throw new CoolException(resource.getName().concat("无法授权给").concat(role.getName())); |
| | | } |
| | |
| | | RoleResource roleResource = new RoleResource(); |
| | | roleResource.setRoleId(roleId); |
| | | roleResource.setResourceId(resource.getId()); |
| | | roleResourceService.insert(roleResource); |
| | | roleResourceService.save(roleResource); |
| | | } else { |
| | | Permission permission = permissionService.selectOne(new EntityWrapper<Permission>().eq("action", dto.getTwo())); |
| | | Permission permission = permissionService.getOne(new QueryWrapper<Permission>().eq("action", dto.getTwo())); |
| | | if (!Cools.isEmpty(permission)){ |
| | | RolePermission rolePermission = new RolePermission(); |
| | | rolePermission.setRoleId(roleId); |
| | | rolePermission.setPermissionId(permission.getId()); |
| | | rolePermissionService.insert(rolePermission); |
| | | rolePermissionService.save(rolePermission); |
| | | } |
| | | } |
| | | for (String three : dto.getThree()){ |
| | | Resource resource1 = resourceService.selectOne(new EntityWrapper<Resource>().eq("id", three).eq("level", 3)); |
| | | Resource resource1 = resourceService.getOne(new QueryWrapper<Resource>().eq("id", three).eq("level", 3)); |
| | | if (!Cools.isEmpty(resource1)) { |
| | | // 校验上级权限 |
| | | if (leaderId != null) { |
| | | RoleResource roleResource = roleResourceService.selectOne(new EntityWrapper<RoleResource>().eq("role_id", leaderId).eq("resource_id", resource1.getId())); |
| | | RoleResource roleResource = roleResourceService.getOne(new QueryWrapper<RoleResource>().eq("role_id", leaderId).eq("resource_id", resource1.getId())); |
| | | if (null == roleResource) { |
| | | throw new CoolException(resource.getName().concat("的").concat(resource1.getName().concat("无法授权给").concat(role.getName()))); |
| | | } |
| | |
| | | RoleResource roleResource = new RoleResource(); |
| | | roleResource.setRoleId(roleId); |
| | | roleResource.setResourceId(resource1.getId()); |
| | | roleResourceService.insert(roleResource); |
| | | roleResourceService.save(roleResource); |
| | | } |
| | | } |
| | | } |
| | |
| | | public R buttonResource(@PathVariable("resourceId") Long resourceId) { |
| | | List<Resource> resources; |
| | | if (getUserId() == 9527) { |
| | | resources = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 3).eq("resource_id", resourceId)); |
| | | resources = resourceService.list(new QueryWrapper<Resource>().eq("level", 3).eq("resource_id", resourceId)); |
| | | } else { |
| | | resources = roleResourceService.getMenuButtomResource(resourceId, getUserId()); |
| | | } |
| | |
| | | package com.zy.common.web; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.controller.AbstractBaseController; |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import jakarta.servlet.http.HttpServletRequest; |
| | | import java.lang.reflect.Field; |
| | | import java.lang.reflect.Modifier; |
| | | import java.util.ArrayList; |
| | |
| | | } |
| | | |
| | | protected User getUser(){ |
| | | User user = userService.selectById(getUserId()); |
| | | User user = userService.getById(getUserId()); |
| | | if (null == user) { |
| | | throw new CoolException(BaseRes.DENIED); |
| | | } |
| | |
| | | * @param set 排除字段集合 |
| | | * @param condition 搜索内容 |
| | | */ |
| | | protected <T> void allLike(Class<T> cls, Set<String> set, EntityWrapper<T> wrapper, String condition){ |
| | | protected <T> void allLike(Class<T> cls, Set<String> set, QueryWrapper<T> wrapper, String condition){ |
| | | if (Cools.isEmpty(condition)) { |
| | | return; |
| | | } |
| | |
| | | if (columns.isEmpty()) { |
| | | return; |
| | | } |
| | | for (int i=0;i<columns.size();i++){ |
| | | if (i==0){ |
| | | wrapper.andNew(); |
| | | } else { |
| | | wrapper.or(); |
| | | wrapper.and(q -> { |
| | | for (int i = 0; i < columns.size(); i++) { |
| | | q.like(columns.get(i), condition); |
| | | if (i < columns.size() - 1) { |
| | | q.or(); |
| | | } |
| | | } |
| | | wrapper.like(columns.get(i), condition); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | |
| | |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * Created by vincent on 2019-07-30 |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | import javax.annotation.PreDestroy; |
| | | import jakarta.annotation.PreDestroy; |
| | | |
| | | /** |
| | | * WCS主流程 |
| | |
| | | package com.zy.core; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | | import com.zy.asrs.service.DeviceConfigService; |
| | |
| | | |
| | | private void initMq(){ |
| | | // 初始化堆垛机mq |
| | | List<DeviceConfig> crnList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> crnList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Crn))); |
| | | for (DeviceConfig crn : crnList) { |
| | | MessageQueue.init(SlaveType.Crn, crn.getDeviceNo()); |
| | | } |
| | | // 初始化双工位堆垛机mq |
| | | List<DeviceConfig> dualCrnList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> dualCrnList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.DualCrn))); |
| | | for (DeviceConfig crn : dualCrnList) { |
| | | MessageQueue.init(SlaveType.DualCrn, crn.getDeviceNo()); |
| | | } |
| | | // 初始化Rgv小车mq |
| | | List<DeviceConfig> rgvList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> rgvList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Rgv))); |
| | | for (DeviceConfig rgv : rgvList) { |
| | | MessageQueue.init(SlaveType.Rgv, rgv.getDeviceNo()); |
| | | } |
| | | // 初始化输送线mq |
| | | List<DeviceConfig> devpList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> devpList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Devp))); |
| | | for (DeviceConfig devp : devpList) { |
| | | MessageQueue.init(SlaveType.Devp, devp.getDeviceNo()); |
| | | } |
| | | // 初始化条码扫描仪mq |
| | | List<DeviceConfig> barcodeList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> barcodeList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Barcode))); |
| | | for (DeviceConfig barcode : barcodeList) { |
| | | MessageQueue.init(SlaveType.Barcode, barcode.getDeviceNo()); |
| | | } |
| | | // 初始化Led灯mq |
| | | List<DeviceConfig> ledList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> ledList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Led))); |
| | | for (DeviceConfig led : ledList) { |
| | | MessageQueue.init(SlaveType.Led, led.getDeviceNo()); |
| | |
| | | } |
| | | |
| | | private void initThread(){ |
| | | List<DeviceConfig> crnList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> crnList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Crn))); |
| | | if(!crnList.isEmpty()) { |
| | | News.info("初始化堆垛机........................................................"); |
| | |
| | | } |
| | | } |
| | | |
| | | List<DeviceConfig> dualCrnList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> dualCrnList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.DualCrn))); |
| | | if(!dualCrnList.isEmpty()) { |
| | | News.info("初始化双工位堆垛机........................................................"); |
| | |
| | | } |
| | | } |
| | | |
| | | List<DeviceConfig> devpList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> devpList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Devp))); |
| | | if(!devpList.isEmpty()) { |
| | | News.info("初始化输送站........................................................"); |
| | |
| | | } |
| | | } |
| | | |
| | | List<DeviceConfig> rgvList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> rgvList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Rgv))); |
| | | if(!rgvList.isEmpty()) { |
| | | News.info("初始化RGV........................................................"); |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import jakarta.annotation.PostConstruct; |
| | | import java.util.HashMap; |
| | | |
| | | @Component |
| | |
| | | |
| | | @PostConstruct |
| | | public void init() { |
| | | WrkLastno wrkLastno = wrkLastnoService.selectById(WrkIoType.FAKE_TASK_NO.id); |
| | | WrkLastno wrkLastno = wrkLastnoService.getById(WrkIoType.FAKE_TASK_NO.id); |
| | | if (Cools.isEmpty(wrkLastno)) { |
| | | throw new CoolException("数据异常,请联系管理员"); |
| | | } |
| | |
| | | package com.zy.core.config; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.common.utils.RedisUtil; |
| | | import com.zy.core.enums.RedisKeyType; |
| | | import com.zy.system.entity.Config; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import jakarta.annotation.PostConstruct; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | |
| | | public void init() { |
| | | HashMap<String, String> systemConfigMap = new HashMap<>(); |
| | | |
| | | List<Config> configList = configService.selectList(new EntityWrapper<>()); |
| | | List<Config> configList = configService.list(new QueryWrapper<>()); |
| | | for (Config config : configList) { |
| | | systemConfigMap.put(config.getCode(), config.getValue()); |
| | | } |
| | |
| | | List<NavigateNode> targetNavigateNodes = new ArrayList<>(); |
| | | |
| | | try { |
| | | BasStation startStation = basStationService.selectById(stationId); |
| | | BasStation startStation = basStationService.getById(stationId); |
| | | if (startStation == null) { |
| | | return; |
| | | } |
| | | |
| | | BasStation targetStation = basStationService.selectById(targetStationId); |
| | | BasStation targetStation = basStationService.getById(targetStationId); |
| | | if (targetStation == null) { |
| | | return; |
| | | } |
| | |
| | | 1, // 下发状态{0:未下发,1:已下发} |
| | | JSON.toJSONString(response) // 响应 |
| | | ); |
| | | bean.insert(basRgvOpt); |
| | | bean.save(basRgvOpt); |
| | | } |
| | | return response; |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.BasDevp; |
| | |
| | | } |
| | | |
| | | BasDevp basDevp = basDevpService |
| | | .selectOne(new EntityWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo())); |
| | | .getOne(new QueryWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo())); |
| | | if (basDevp == null) { |
| | | return Collections.emptyList(); |
| | | } |
| | |
| | | import HslCommunication.Profinet.Siemens.SiemensS7Net; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.BasDevp; |
| | |
| | | } |
| | | |
| | | BasDevp basDevp = basDevpService |
| | | .selectOne(new EntityWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo())); |
| | | .getOne(new QueryWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo())); |
| | | if (basDevp == null) { |
| | | return Collections.emptyList(); |
| | | } |
| | |
| | | import HslCommunication.Profinet.Siemens.SiemensS7Net; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.BasDevp; |
| | |
| | | } |
| | | |
| | | BasDevp basDevp = basDevpService |
| | | .selectOne(new EntityWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo())); |
| | | .getOne(new QueryWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo())); |
| | | if (basDevp == null) { |
| | | return Collections.emptyList(); |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.serializer.SerializerFeature; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.domain.param.CreateInTaskParam; |
| | | import com.zy.asrs.domain.param.CreateOutTaskParam; |
| | |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | | Config enableFakeConfig = configService |
| | | .selectOne(new EntityWrapper<Config>().eq("code", "enableFake")); |
| | | .getOne(new QueryWrapper<Config>().eq("code", "enableFake")); |
| | | if (enableFakeConfig != null) { |
| | | enableFake = enableFakeConfig.getValue(); |
| | | } |
| | | |
| | | Config fakeRealTaskRequestWmsConfig = configService |
| | | .selectOne(new EntityWrapper<Config>().eq("code", "fakeRealTaskRequestWms")); |
| | | .getOne(new QueryWrapper<Config>().eq("code", "fakeRealTaskRequestWms")); |
| | | if (fakeRealTaskRequestWmsConfig != null) { |
| | | fakeRealTaskRequestWms = fakeRealTaskRequestWmsConfig.getValue(); |
| | | } |
| | | |
| | | Config fakeGenerateInTaskConfig = configService |
| | | .selectOne(new EntityWrapper<Config>().eq("code", "fakeGenerateInTask")); |
| | | .getOne(new QueryWrapper<Config>().eq("code", "fakeGenerateInTask")); |
| | | if (fakeGenerateInTaskConfig != null) { |
| | | fakeGenerateInTask = fakeGenerateInTaskConfig.getValue(); |
| | | } |
| | | |
| | | Config fakeGenerateOutTaskConfig = configService |
| | | .selectOne(new EntityWrapper<Config>().eq("code", "fakeGenerateOutTask")); |
| | | .getOne(new QueryWrapper<Config>().eq("code", "fakeGenerateOutTask")); |
| | | if (fakeGenerateOutTaskConfig != null) { |
| | | fakeGenerateOutTask = fakeGenerateOutTaskConfig.getValue(); |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | | if (stationThread == null) { |
| | |
| | | return; |
| | | } |
| | | |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | | if (stationThread == null) { |
| | |
| | | |
| | | // 检测任务是否生成 |
| | | List<WrkMast> wrkMasts = wrkMastService |
| | | .selectList(new EntityWrapper<WrkMast>().eq("barcode", stationProtocol.getBarcode())); |
| | | .list(new QueryWrapper<WrkMast>().eq("barcode", stationProtocol.getBarcode())); |
| | | if (!wrkMasts.isEmpty()) { |
| | | continue; |
| | | } |
| | | |
| | | List<LocMast> locMastList = locMastService |
| | | .selectList(new EntityWrapper<LocMast>().eq("loc_sts", String.valueOf(LocStsType.O))); |
| | | .list(new QueryWrapper<LocMast>().eq("loc_sts", String.valueOf(LocStsType.O))); |
| | | if (locMastList.isEmpty()) { |
| | | continue; |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | | if (stationThread == null) { |
| | |
| | | && !stationProtocol.isLoading() |
| | | && stationProtocol.getTaskNo() == 0) { |
| | | List<LocMast> locMastList = locMastService |
| | | .selectList(new EntityWrapper<LocMast>().eq("loc_sts", String.valueOf(LocStsType.F))); |
| | | .list(new QueryWrapper<LocMast>().eq("loc_sts", String.valueOf(LocStsType.F))); |
| | | if (locMastList.isEmpty()) { |
| | | continue; |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | | if (stationThread == null) { |
| | |
| | | |
| | | // 检测任务是否生成 |
| | | List<WrkMast> wrkMasts = wrkMastService |
| | | .selectList(new EntityWrapper<WrkMast>() |
| | | .list(new QueryWrapper<WrkMast>() |
| | | .eq("barcode", stationProtocol.getBarcode())); |
| | | if (!wrkMasts.isEmpty()) { |
| | | continue; |
| | |
| | | |
| | | // 计算所有站点停留时间 |
| | | public synchronized void calcAllStationStayTime() { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | | if (stationThread == null) { |
| | |
| | | |
| | | // 检测出库站点停留是否超时 |
| | | public synchronized void checkOutStationStayTimeOut() { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | List<StationObjModel> outStationList = basDevp.getOutStationList$(); |
| | | if (outStationList.isEmpty()) { |
| | |
| | | |
| | | // 检测入库站点堆垛机是否取走货物 |
| | | public synchronized void checkInStationCrnTake() { |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | List<StationObjModel> inStationList = basCrnp.getInStationList$(); |
| | | if (inStationList.isEmpty()) { |
| | |
| | | checkInStationListCrnTake(inStationList); |
| | | } |
| | | |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.list(new QueryWrapper<>()); |
| | | for (BasDualCrnp basDualCrnp : basDualCrnps) { |
| | | List<StationObjModel> inStationList = basDualCrnp.getInStationList$(); |
| | | if (inStationList.isEmpty()) { |
| | |
| | | |
| | | // 堆垛机任务执行完成 |
| | | public synchronized void crnIoExecuteFinish() { |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, basCrnp.getCrnNo()); |
| | | if (crnThread == null) { |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.domain.param.CreateInTaskParam; |
| | | import com.zy.asrs.entity.BasDevp; |
| | |
| | | return; |
| | | } |
| | | |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | | if (stationThread == null) { |
| | |
| | | |
| | | // 检测任务是否生成 |
| | | List<WrkMast> wrkMasts = wrkMastService |
| | | .selectList(new EntityWrapper<WrkMast>() |
| | | .list(new QueryWrapper<WrkMast>() |
| | | .eq("barcode", stationProtocol.getBarcode())); |
| | | if (!wrkMasts.isEmpty()) { |
| | | continue; |
| | |
| | | |
| | | //检测入库站是否有任务生成,并启动入库 |
| | | private synchronized void checkInStationHasTask() { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | | if(stationThread == null){ |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.domain.param.CreateInTaskParam; |
| | | import com.zy.asrs.entity.BasDevp; |
| | |
| | | return; |
| | | } |
| | | |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | | if (stationThread == null) { |
| | |
| | | |
| | | // 检测任务是否生成 |
| | | List<WrkMast> wrkMasts = wrkMastService |
| | | .selectList(new EntityWrapper<WrkMast>() |
| | | .list(new QueryWrapper<WrkMast>() |
| | | .eq("barcode", stationProtocol.getBarcode())); |
| | | if (!wrkMasts.isEmpty()) { |
| | | continue; |
| | |
| | | |
| | | //检测入库站是否有任务生成,并启动入库 |
| | | private synchronized void checkInStationHasTask() { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | | if(stationThread == null){ |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.BasMap; |
| | | import com.zy.asrs.service.BasMapService; |
| | |
| | | return; |
| | | } |
| | | |
| | | BasMap basMap = basMapService.selectOne(new EntityWrapper<BasMap>().eq("lev", 1)); |
| | | BasMap basMap = basMapService.getOne(new QueryWrapper<BasMap>().eq("lev", 1)); |
| | | if (Cools.isEmpty(basMap)){ |
| | | //缺少初始化库位地图 |
| | | return; |
| | |
| | | package com.zy.core.thread.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.BasRgv; |
| | |
| | | log.setStatus(1); |
| | | log.setCreateTime(new Date()); |
| | | log.setSystemStatus(JSON.toJSONString(rgvProtocol)); |
| | | errLogService.insert(log); |
| | | errLogService.save(log); |
| | | if (log.getId() != null) { |
| | | redisUtil.set(errFlagKey, log.getId(), 60 * 60 * 24); |
| | | } |
| | |
| | | |
| | | } |
| | | if (basRgvService != null) { |
| | | BasRgv basRgv = basRgvService.selectOne(new EntityWrapper<BasRgv>().eq("rgv_no", deviceConfig.getDeviceNo())); |
| | | BasRgv basRgv = basRgvService.getOne(new QueryWrapper<BasRgv>().eq("rgv_no", deviceConfig.getDeviceNo())); |
| | | if(basRgv == null) { |
| | | basRgv = new BasRgv(); |
| | | basRgv.setRgvNo(deviceConfig.getDeviceNo()); |
| | | basRgv.setStatus(1); |
| | | basRgv.setCreateTime(new Date()); |
| | | basRgvService.insert(basRgv); |
| | | basRgvService.save(basRgv); |
| | | } |
| | | } |
| | | } |
| | |
| | | JSON.toJSONString(response) |
| | | ); |
| | | if (bean != null) { |
| | | bean.insert(basRgvOpt); |
| | | bean.save(basRgvOpt); |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.zy.core.thread.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.BasCrnp; |
| | |
| | | |
| | | } |
| | | if (basCrnpService != null) { |
| | | BasCrnp basCrnp = basCrnpService.selectOne(new EntityWrapper<BasCrnp>().eq("crn_no", deviceConfig.getDeviceNo())); |
| | | BasCrnp basCrnp = basCrnpService.getOne(new QueryWrapper<BasCrnp>().eq("crn_no", deviceConfig.getDeviceNo())); |
| | | if(basCrnp == null) { |
| | | basCrnp = new BasCrnp(); |
| | | basCrnp.setCrnNo(deviceConfig.getDeviceNo()); |
| | |
| | | basCrnp.setMaxInTask(5); |
| | | basCrnp.setMaxOutTask(5); |
| | | basCrnp.setCreateTime(new Date()); |
| | | basCrnpService.insert(basCrnp); |
| | | basCrnpService.save(basCrnp); |
| | | } |
| | | } |
| | | } |
| | |
| | | log.setStatus(1); |
| | | log.setCreateTime(new Date()); |
| | | log.setSystemStatus(JSON.toJSONString(crnProtocol)); |
| | | errLogService.insert(log); |
| | | errLogService.save(log); |
| | | if (log.getId() != null) { |
| | | redisUtil.set(errFlagKey, log.getId(), 60 * 60 * 24); |
| | | } |
| | |
| | | JSON.toJSONString(response) |
| | | ); |
| | | if (bean != null) { |
| | | bean.insert(basCrnpOpt); |
| | | bean.save(basCrnpOpt); |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.zy.core.thread.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.*; |
| | |
| | | |
| | | } |
| | | if (basCrnpService != null) { |
| | | BasCrnp basCrnp = basCrnpService.selectOne(new EntityWrapper<BasCrnp>().eq("crn_no", deviceConfig.getDeviceNo())); |
| | | BasCrnp basCrnp = basCrnpService.getOne(new QueryWrapper<BasCrnp>().eq("crn_no", deviceConfig.getDeviceNo())); |
| | | if(basCrnp == null) { |
| | | basCrnp = new BasCrnp(); |
| | | basCrnp.setCrnNo(deviceConfig.getDeviceNo()); |
| | |
| | | basCrnp.setMaxInTask(5); |
| | | basCrnp.setMaxOutTask(5); |
| | | basCrnp.setCreateTime(new Date()); |
| | | basCrnpService.insert(basCrnp); |
| | | basCrnpService.save(basCrnp); |
| | | } |
| | | } |
| | | } |
| | |
| | | log.setStatus(1); |
| | | log.setCreateTime(new Date()); |
| | | log.setSystemStatus(JSON.toJSONString(crnProtocol)); |
| | | errLogService.insert(log); |
| | | errLogService.save(log); |
| | | if (log.getId() != null) { |
| | | redisUtil.set(errFlagKey, log.getId(), 60 * 60 * 24); |
| | | } |
| | |
| | | JSON.toJSONString(response) |
| | | ); |
| | | if (bean != null) { |
| | | bean.insert(basCrnpOpt); |
| | | bean.save(basCrnpOpt); |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.serializer.SerializerFeature; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.*; |
| | |
| | | |
| | | } |
| | | if (basDualCrnpService != null) { |
| | | BasDualCrnp basDualCrnp = basDualCrnpService.selectOne(new EntityWrapper<BasDualCrnp>().eq("crn_no", deviceConfig.getDeviceNo())); |
| | | BasDualCrnp basDualCrnp = basDualCrnpService.getOne(new QueryWrapper<BasDualCrnp>().eq("crn_no", deviceConfig.getDeviceNo())); |
| | | if(basDualCrnp == null) { |
| | | basDualCrnp = new BasDualCrnp(); |
| | | basDualCrnp.setCrnNo(deviceConfig.getDeviceNo()); |
| | |
| | | basDualCrnp.setMaxInTask(5); |
| | | basDualCrnp.setMaxOutTask(5); |
| | | basDualCrnp.setCreateTime(new Date()); |
| | | basDualCrnpService.insert(basDualCrnp); |
| | | basDualCrnpService.save(basDualCrnp); |
| | | } |
| | | } |
| | | } |
| | |
| | | log.setStatus(1); |
| | | log.setCreateTime(new Date()); |
| | | log.setSystemStatus(JSON.toJSONString(crnProtocol)); |
| | | errLogService.insert(log); |
| | | errLogService.save(log); |
| | | if (log.getId() != null) { |
| | | redisUtil.set(errFlagKey, log.getId(), 60 * 60 * 24); |
| | | } |
| | |
| | | JSON.toJSONString(response) |
| | | ); |
| | | if (bean != null) { |
| | | bean.insert(basDualCrnpOpt); |
| | | bean.save(basDualCrnpOpt); |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.zy.core.thread.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.service.BasDevpService; |
| | |
| | | } |
| | | |
| | | BasDevp basDevp = basDevpService |
| | | .selectOne(new EntityWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo())); |
| | | .getOne(new QueryWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo())); |
| | | if (basDevp == null) { |
| | | return; |
| | | } |
| | |
| | | JSON.toJSONString(commandResponse) |
| | | ); |
| | | if (optService != null) { |
| | | optService.insert(basStationOpt); |
| | | optService.save(basStationOpt); |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.serializer.SerializerFeature; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | |
| | | } |
| | | |
| | | BasDevp basDevp = basDevpService |
| | | .selectOne(new EntityWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo())); |
| | | .getOne(new QueryWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo())); |
| | | if (basDevp == null) { |
| | | return; |
| | | } |
| | |
| | | JSON.toJSONString(commandResponse) |
| | | ); |
| | | if (optService != null) { |
| | | optService.insert(basStationOpt); |
| | | optService.save(basStationOpt); |
| | | } |
| | | } |
| | | return commandResponse; |
| | |
| | | if (deviceConfigService == null) { |
| | | return null; |
| | | } |
| | | List<DeviceConfig> devpList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> devpList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Devp))); |
| | | for (DeviceConfig dc : devpList) { |
| | | com.zy.core.thread.StationThread t = (com.zy.core.thread.StationThread) SlaveConnection.get(SlaveType.Devp, dc.getDeviceNo()); |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.serializer.SerializerFeature; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | |
| | | } |
| | | |
| | | BasDevp basDevp = basDevpService |
| | | .selectOne(new EntityWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo())); |
| | | .getOne(new QueryWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo())); |
| | | if (basDevp == null) { |
| | | return; |
| | | } |
| | |
| | | JSON.toJSONString(commandResponse) |
| | | ); |
| | | if (optService != null) { |
| | | optService.insert(basStationOpt); |
| | | optService.save(basStationOpt); |
| | | } |
| | | } |
| | | return commandResponse; |
| | |
| | | if (deviceConfigService == null) { |
| | | return null; |
| | | } |
| | | List<DeviceConfig> devpList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | List<DeviceConfig> devpList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Devp))); |
| | | for (DeviceConfig dc : devpList) { |
| | | com.zy.core.thread.StationThread t = (com.zy.core.thread.StationThread) SlaveConnection.get(SlaveType.Devp, dc.getDeviceNo()); |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.serializer.SerializerFeature; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.domain.enums.NotifyMsgType; |
| | | import com.zy.asrs.domain.param.CreateLocMoveTaskParam; |
| | |
| | | |
| | | //入出库 ===>> 堆垛机入出库作业下发 |
| | | public synchronized void crnIoExecuteNormal() { |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, basCrnp.getCrnNo()); |
| | | if(crnThread == null){ |
| | |
| | | continue; |
| | | } |
| | | |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("crn_no", basCrnp.getCrnNo()) |
| | | .in("wrk_sts", WrkStsType.INBOUND_RUN.sts, WrkStsType.OUTBOUND_RUN.sts, WrkStsType.LOC_MOVE_RUN.sts) |
| | | .orderBy("batch_seq", false) |
| | | .orderBy(true, false, "batch_seq") |
| | | ); |
| | | if(!wrkMasts.isEmpty()){ |
| | | continue; |
| | |
| | | } |
| | | |
| | | // 获取库位信息 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | LocMast locMast = locMastService.getById(wrkMast.getLocNo()); |
| | | if (locMast == null) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "目标库位:{} 信息不存在", wrkMast.getLocNo()); |
| | | continue; |
| | |
| | | |
| | | Integer crnNo = basCrnp.getCrnNo(); |
| | | |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("crn_no", crnNo) |
| | | .eq("wrk_sts", WrkStsType.NEW_OUTBOUND.sts) |
| | | .orderBy("batch_seq", false) |
| | | .orderBy(true, false, "batch_seq") |
| | | ); |
| | | |
| | | for (WrkMast wrkMast : wrkMasts) { |
| | |
| | | } |
| | | |
| | | // 获取库位信息 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | LocMast locMast = locMastService.getById(wrkMast.getSourceLocNo()); |
| | | if (locMast == null) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "源库位:{} 信息不存在", wrkMast.getSourceLocNo()); |
| | | continue; |
| | |
| | | } |
| | | |
| | | // 获取库位信息 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | LocMast locMast = locMastService.getById(wrkMast.getLocNo()); |
| | | if (locMast == null) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "目标库位:{} 信息不存在", wrkMast.getLocNo()); |
| | | continue; |
| | |
| | | } |
| | | |
| | | // 获取库位信息 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | LocMast locMast = locMastService.getById(wrkMast.getSourceLocNo()); |
| | | if (locMast == null) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "源库位:{} 信息不存在", wrkMast.getSourceLocNo()); |
| | | continue; |
| | |
| | | |
| | | Integer crnNo = basCrnp.getCrnNo(); |
| | | |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("crn_no", crnNo) |
| | | .eq("wrk_sts", WrkStsType.NEW_LOC_MOVE.sts) |
| | | ); |
| | | |
| | | for (WrkMast wrkMast : wrkMasts) { |
| | | // 获取源库位信息 |
| | | LocMast sourceLocMast = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | LocMast sourceLocMast = locMastService.getById(wrkMast.getSourceLocNo()); |
| | | if (sourceLocMast == null) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "源库位:{} 信息不存在", wrkMast.getSourceLocNo()); |
| | | continue; |
| | |
| | | } |
| | | |
| | | // 获取库位信息 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | LocMast locMast = locMastService.getById(wrkMast.getLocNo()); |
| | | if (locMast == null) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "库位:{} 信息不存在", wrkMast.getLocNo()); |
| | | continue; |
| | |
| | | |
| | | //堆垛机任务执行完成 |
| | | public synchronized void crnIoExecuteFinish() { |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, basCrnp.getCrnNo()); |
| | | if(crnThread == null){ |
| | |
| | | |
| | | public synchronized void plannerExecute() { |
| | | int nowSec = (int) (System.currentTimeMillis() / 1000); |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | String key = RedisKeyType.PLANNER_SCHEDULE.key + "CRN-" + basCrnp.getCrnNo(); |
| | | List<Object> items = redisUtil.lGet(key, 0, -1); |
| | |
| | | if (crnProtocol == null) { |
| | | continue; |
| | | } |
| | | List<WrkMast> running = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> running = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("crn_no", basCrnp.getCrnNo()) |
| | | .in("wrk_sts", WrkStsType.INBOUND_RUN.sts, WrkStsType.OUTBOUND_RUN.sts, WrkStsType.LOC_MOVE_RUN.sts) |
| | | ); |
| | |
| | | } |
| | | |
| | | // 获取源库位信息 |
| | | LocMast sourceLocMast = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | LocMast sourceLocMast = locMastService.getById(wrkMast.getSourceLocNo()); |
| | | if (sourceLocMast == null) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "源库位:{} 信息不存在", wrkMast.getSourceLocNo()); |
| | | return false; |
| | |
| | | } |
| | | |
| | | // 获取库位信息 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | LocMast locMast = locMastService.getById(wrkMast.getLocNo()); |
| | | if (locMast == null) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "库位:{} 信息不存在", wrkMast.getLocNo()); |
| | | return false; |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.serializer.SerializerFeature; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.domain.enums.NotifyMsgType; |
| | | import com.zy.asrs.domain.param.CreateLocMoveTaskParam; |
| | |
| | | |
| | | //入出库 ===>> 双工位堆垛机入出库作业下发 |
| | | public synchronized void dualCrnIoExecute() { |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.list(new QueryWrapper<>()); |
| | | for (BasDualCrnp basDualCrnp : basDualCrnps) { |
| | | DualCrnThread dualCrnThread = (DualCrnThread) SlaveConnection.get(SlaveType.DualCrn, basDualCrnp.getCrnNo()); |
| | | if(dualCrnThread == null){ |
| | |
| | | continue; |
| | | } |
| | | |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("dual_crn_no", basDualCrnp.getCrnNo()) |
| | | .in("wrk_sts", WrkStsType.INBOUND_RUN.sts, WrkStsType.OUTBOUND_RUN.sts, WrkStsType.LOC_MOVE_RUN.sts) |
| | | ); |
| | |
| | | } |
| | | } |
| | | |
| | | if (taskList.isEmpty()) { |
| | | return list; |
| | | } |
| | | |
| | | // 获取任务 |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("dual_crn_no", basDualCrnp.getCrnNo()) |
| | | .in("wrk_no", taskList) |
| | | ); |
| | |
| | | return list; |
| | | } |
| | | |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("dual_crn_no", basDualCrnp.getCrnNo()) |
| | | .eq("wrk_sts", WrkStsType.NEW_OUTBOUND.sts) |
| | | ); |
| | |
| | | |
| | | private List<WrkMast> getLocMoveTaskList(BasDualCrnp basDualCrnp) { |
| | | List<WrkMast> list = new ArrayList<>(); |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("dual_crn_no", basDualCrnp.getCrnNo()) |
| | | .eq("wrk_sts", WrkStsType.NEW_LOC_MOVE.sts) |
| | | ); |
| | |
| | | } |
| | | |
| | | // 获取库位信息 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | LocMast locMast = locMastService.getById(wrkMast.getLocNo()); |
| | | if (locMast == null) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "目标库位:{} 信息不存在", wrkMast.getLocNo()); |
| | | return null; |
| | |
| | | } |
| | | |
| | | // 获取库位信息 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | LocMast locMast = locMastService.getById(wrkMast.getSourceLocNo()); |
| | | if (locMast == null) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "源库位:{} 信息不存在", wrkMast.getSourceLocNo()); |
| | | continue; |
| | |
| | | Integer crnNo = basDualCrnp.getCrnNo(); |
| | | |
| | | // 获取源库位信息 |
| | | LocMast sourceLocMast = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | LocMast sourceLocMast = locMastService.getById(wrkMast.getSourceLocNo()); |
| | | if (sourceLocMast == null) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "源库位:{} 信息不存在", wrkMast.getSourceLocNo()); |
| | | return null; |
| | |
| | | } |
| | | |
| | | // 获取库位信息 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | LocMast locMast = locMastService.getById(wrkMast.getLocNo()); |
| | | if (locMast == null) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "库位:{} 信息不存在", wrkMast.getLocNo()); |
| | | return null; |
| | |
| | | |
| | | //双工位堆垛机任务执行完成 |
| | | public synchronized void dualCrnIoExecuteFinish() { |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.selectList(new EntityWrapper<>()); |
| | | List<BasDualCrnp> basDualCrnps = basDualCrnpService.list(new QueryWrapper<>()); |
| | | for (BasDualCrnp basDualCrnp : basDualCrnps) { |
| | | DualCrnThread dualCrnThread = (DualCrnThread) SlaveConnection.get(SlaveType.DualCrn, basDualCrnp.getCrnNo()); |
| | | if(dualCrnThread == null){ |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.serializer.SerializerFeature; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.domain.enums.NotifyMsgType; |
| | |
| | | int[] currentStationTaskCountRef = new int[]{countCurrentStationTask()}; |
| | | LoadGuardState loadGuardState = buildLoadGuardState(limitConfig); |
| | | |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | | if (stationThread == null) { |
| | |
| | | && stationProtocol.getTaskNo() > 0 |
| | | ) { |
| | | //检测任务是否生成 |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("barcode", stationProtocol.getBarcode())); |
| | | WrkMast wrkMast = wrkMastService.getOne(new QueryWrapper<WrkMast>().eq("barcode", stationProtocol.getBarcode())); |
| | | if (wrkMast == null) { |
| | | continue; |
| | | } |
| | |
| | | int[] currentStationTaskCountRef = new int[]{countCurrentStationTask()}; |
| | | LoadGuardState loadGuardState = buildLoadGuardState(limitConfig); |
| | | |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("wrk_sts", WrkStsType.OUTBOUND_RUN_COMPLETE.sts) |
| | | .isNotNull("crn_no") |
| | | ); |
| | |
| | | //执行双工位堆垛机输送站点出库任务 |
| | | public synchronized void dualCrnStationOutExecute() { |
| | | try { |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .eq("wrk_sts", WrkStsType.OUTBOUND_RUN_COMPLETE.sts) |
| | | .isNotNull("dual_crn_no") |
| | | ); |
| | |
| | | //检测输送站点出库任务执行完成 |
| | | public synchronized void stationOutExecuteFinish() { |
| | | try { |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.STATION_RUN.sts)); |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>().eq("wrk_sts", WrkStsType.STATION_RUN.sts)); |
| | | for (WrkMast wrkMast : wrkMasts) { |
| | | Integer wrkNo = wrkMast.getWrkNo(); |
| | | Integer targetStaNo = wrkMast.getStaNo(); |
| | | |
| | | boolean complete = false; |
| | | BasStation basStation = basStationService.selectOne(new EntityWrapper<BasStation>().eq("station_id", targetStaNo)); |
| | | BasStation basStation = basStationService.getOne(new QueryWrapper<BasStation>().eq("station_id", targetStaNo)); |
| | | if (basStation == null) { |
| | | continue; |
| | | } |
| | |
| | | // 检测任务转完成 |
| | | public synchronized void checkTaskToComplete() { |
| | | try { |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.STATION_RUN_COMPLETE.sts)); |
| | | List<WrkMast> wrkMasts = wrkMastService.list(new QueryWrapper<WrkMast>().eq("wrk_sts", WrkStsType.STATION_RUN_COMPLETE.sts)); |
| | | for (WrkMast wrkMast : wrkMasts) { |
| | | Integer wrkNo = wrkMast.getWrkNo(); |
| | | Integer targetStaNo = wrkMast.getStaNo(); |
| | |
| | | } |
| | | |
| | | boolean complete = false; |
| | | BasStation basStation = basStationService.selectOne(new EntityWrapper<BasStation>().eq("station_id", targetStaNo)); |
| | | BasStation basStation = basStationService.getOne(new QueryWrapper<BasStation>().eq("station_id", targetStaNo)); |
| | | if (basStation == null) { |
| | | continue; |
| | | } |
| | |
| | | //检测输送站点是否运行堵塞 |
| | | public synchronized void checkStationRunBlock() { |
| | | try { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | | if (stationThread == null) { |
| | |
| | | |
| | | // 检测出库排序 |
| | | public synchronized void checkStationOutOrder() { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<BasDevp>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<BasDevp>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getId()); |
| | | if (stationThread == null) { |
| | |
| | | continue; |
| | | } |
| | | |
| | | List<WrkMast> batchWrkList = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | List<WrkMast> batchWrkList = wrkMastService.list(new QueryWrapper<WrkMast>() |
| | | .notIn("wrk_sts", WrkStsType.STATION_RUN_COMPLETE.sts, WrkStsType.COMPLETE_OUTBOUND.sts) |
| | | .eq("batch", wrkMast.getBatch()) |
| | | .orderBy("batch") |
| | | .orderBy(true, true, "batch") |
| | | ); |
| | | if (batchWrkList.isEmpty()) { |
| | | continue; |
| | |
| | | |
| | | // 监控绕圈站点 |
| | | public synchronized void watchCircleStation() { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<BasDevp>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<BasDevp>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getId()); |
| | | if (stationThread == null) { |
| | |
| | | |
| | | public List<Integer> getAllOutOrderList() { |
| | | List<Integer> list = new ArrayList<>(); |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<BasDevp>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<BasDevp>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | List<Integer> orderList = basDevp.getOutOrderIntList(); |
| | | list.addAll(orderList); |
| | |
| | | |
| | | HashMap<String, Integer> batchMap = new HashMap<>(); |
| | | for (Integer station : checkList) { |
| | | BasStation basStation = basStationService.selectOne(new EntityWrapper<BasStation>().eq("station_id", station)); |
| | | BasStation basStation = basStationService.getOne(new QueryWrapper<BasStation>().eq("station_id", station)); |
| | | if (basStation == null) { |
| | | continue; |
| | | } |
| | |
| | | |
| | | private int countCurrentStationTask() { |
| | | int currentStationTaskCount = 0; |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<BasDevp>()); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<BasDevp>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | | if (stationThread == null) { |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasCrnp; |
| | |
| | | int result = 0; |
| | | try { |
| | | BasStation basStation = basStationService |
| | | .selectOne(new EntityWrapper<BasStation>().eq("station_id", sourceStaNo)); |
| | | .getOne(new QueryWrapper<BasStation>().eq("station_id", sourceStaNo)); |
| | | if (basStation == null) { |
| | | News.error("站点{}不存在", sourceStaNo); |
| | | return null; |
| | |
| | | httpRequestLog.setResponse(response); |
| | | httpRequestLog.setCreateTime(new Date()); |
| | | httpRequestLog.setResult(result); |
| | | httpRequestLogService.insert(httpRequestLog); |
| | | httpRequestLogService.save(httpRequestLog); |
| | | } |
| | | return response; |
| | | } |
| | |
| | | // 申请任务重新分配库位 |
| | | public synchronized String applyReassignTaskLocNo(Integer taskNo, Integer stationId) { |
| | | String wmsUrl = null; |
| | | Config wmsSystemUriConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "wmsSystemUri")); |
| | | Config wmsSystemUriConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "wmsSystemUri")); |
| | | if (wmsSystemUriConfig != null) { |
| | | wmsUrl = wmsSystemUriConfig.getValue(); |
| | | } |
| | |
| | | |
| | | String wmsSystemReassignInTaskUrl = null; |
| | | Config wmsSystemReassignInTaskUrlConfig = configService |
| | | .selectOne(new EntityWrapper<Config>().eq("code", "wmsSystemReassignInTaskUrl")); |
| | | .getOne(new QueryWrapper<Config>().eq("code", "wmsSystemReassignInTaskUrl")); |
| | | if (wmsSystemReassignInTaskUrlConfig != null) { |
| | | wmsSystemReassignInTaskUrl = wmsSystemReassignInTaskUrlConfig.getValue(); |
| | | } |
| | |
| | | httpRequestLog.setResponse(response); |
| | | httpRequestLog.setCreateTime(new Date()); |
| | | httpRequestLog.setResult(result); |
| | | httpRequestLogService.insert(httpRequestLog); |
| | | httpRequestLogService.save(httpRequestLog); |
| | | } |
| | | return response; |
| | | } |
| | |
| | | // 申请在库库位更换库位 |
| | | public synchronized String applyChangeLocNo(String locNo) { |
| | | String wmsUrl = null; |
| | | Config wmsSystemUriConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "wmsSystemUri")); |
| | | Config wmsSystemUriConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "wmsSystemUri")); |
| | | if (wmsSystemUriConfig != null) { |
| | | wmsUrl = wmsSystemUriConfig.getValue(); |
| | | } |
| | |
| | | |
| | | String wmsSystemChangeLocNoUrl = null; |
| | | Config wmsSystemChangeLocNoUrlConfig = configService |
| | | .selectOne(new EntityWrapper<Config>().eq("code", "wmsSystemChangeLocNoUrl")); |
| | | .getOne(new QueryWrapper<Config>().eq("code", "wmsSystemChangeLocNoUrl")); |
| | | if (wmsSystemChangeLocNoUrlConfig != null) { |
| | | wmsSystemChangeLocNoUrl = wmsSystemChangeLocNoUrlConfig.getValue(); |
| | | } |
| | |
| | | List<Integer> crnRows = new ArrayList<>(); |
| | | |
| | | if (findCrnNoResult.getCrnType().equals(SlaveType.Crn)) { |
| | | BasCrnp basCrnp = basCrnpService.selectOne(new EntityWrapper<BasCrnp>().eq("crn_no", crnNo)); |
| | | BasCrnp basCrnp = basCrnpService.getOne(new QueryWrapper<BasCrnp>().eq("crn_no", crnNo)); |
| | | if (basCrnp == null) { |
| | | return null; |
| | | } |
| | |
| | | } |
| | | } else if (findCrnNoResult.getCrnType().equals(SlaveType.DualCrn)) { |
| | | BasDualCrnp basDualCrnp = basDualCrnpService |
| | | .selectOne(new EntityWrapper<BasDualCrnp>().eq("crn_no", crnNo)); |
| | | .getOne(new QueryWrapper<BasDualCrnp>().eq("crn_no", crnNo)); |
| | | if (basDualCrnp == null) { |
| | | return null; |
| | | } |
| | |
| | | httpRequestLog.setResponse(response); |
| | | httpRequestLog.setCreateTime(new Date()); |
| | | httpRequestLog.setResult(result); |
| | | httpRequestLogService.insert(httpRequestLog); |
| | | httpRequestLogService.save(httpRequestLog); |
| | | } |
| | | return response; |
| | | } |
| | |
| | | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import jakarta.annotation.PostConstruct; |
| | | import javax.sql.DataSource; |
| | | import java.sql.Connection; |
| | | import java.sql.DatabaseMetaData; |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/api/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(apiService.selectById(String.valueOf(id))); |
| | | return R.ok(apiService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/api/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<Api> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Api> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(apiService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderBy(true, false, "id"); |
| | | return R.ok(apiService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == api.getId()){ |
| | | apiService.insert(api); |
| | | apiService.save(api); |
| | | } else { |
| | | apiService.updateById(api); |
| | | } |
| | |
| | | @RequestMapping(value = "/api/add/auth") |
| | | @ManagerAuth |
| | | public R add(Api api) { |
| | | apiService.insert(api); |
| | | apiService.save(api); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | apiService.deleteBatchIds(Arrays.asList(ids)); |
| | | apiService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Api> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Api> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("api")); |
| | | convert(map, wrapper); |
| | | List<Api> list = apiService.selectList(wrapper); |
| | | List<Api> list = apiService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/apiQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Api> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Api> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<Api> page = apiService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<Api> page = apiService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Api api : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @ManagerAuth |
| | | public R refreshCache(){ |
| | | HashMap<String, String> systemConfigMap = new HashMap<>(); |
| | | List<Config> configList = configService.selectList(new EntityWrapper<>()); |
| | | List<Config> configList = configService.list(new QueryWrapper<>()); |
| | | for (Config config : configList) { |
| | | systemConfigMap.put(config.getCode(), config.getValue()); |
| | | } |
| | |
| | | @RequestMapping(value = "/config/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(configService.selectById(String.valueOf(id))); |
| | | return R.ok(configService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/config/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<Config> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Config> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(configService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderBy(true, false, "id"); |
| | | return R.ok(configService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/config/listAll/auth") |
| | | @ManagerAuth |
| | | public R listAll(){ |
| | | EntityWrapper<Config> wrapper = new EntityWrapper<>(); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(configService.selectList(wrapper)); |
| | | QueryWrapper<Config> wrapper = new QueryWrapper<>(); |
| | | wrapper.orderBy(true, false, "id"); |
| | | return R.ok(configService.list(wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | for (ConfigUpdateBatchParam param : params) { |
| | | String code = param.getCode(); |
| | | String value = param.getValue(); |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", code)); |
| | | Config config = configService.getOne(new QueryWrapper<Config>().eq("code", code)); |
| | | if (config == null) { |
| | | continue; |
| | | } |
| | |
| | | } |
| | | } |
| | | if (null == config.getId()){ |
| | | configService.insert(config); |
| | | configService.save(config); |
| | | } else { |
| | | configService.updateById(config); |
| | | Parameter.reset(); |
| | |
| | | return R.error("json解析失败"); |
| | | } |
| | | } |
| | | configService.insert(config); |
| | | configService.save(config); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | configService.deleteBatchIds(Arrays.asList(ids)); |
| | | configService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Config> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Config> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("config")); |
| | | convert(map, wrapper); |
| | | List<Config> list = configService.selectList(wrapper); |
| | | List<Config> list = configService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/configQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Config> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Config> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<Config> page = configService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<Config> page = configService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Config config : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestMapping(value = "/config/getSelectTypes") |
| | | @ManagerAuth |
| | | public R getSelectTypes() { |
| | | EntityWrapper<Config> wrapper = new EntityWrapper<>(); |
| | | wrapper.setSqlSelect("DISTINCT select_type as selectType"); |
| | | QueryWrapper<Config> wrapper = new QueryWrapper<>(); |
| | | wrapper.select("DISTINCT select_type as selectType"); |
| | | wrapper.isNotNull("select_type"); |
| | | List<Map<String, Object>> maps = configService.selectMaps(wrapper); |
| | | List<Map<String, Object>> maps = configService.listMaps(wrapper); |
| | | List<String> types = new ArrayList<>(); |
| | | for (Map<String, Object> map : maps) { |
| | | if (map != null && map.get("selectType") != null) { |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Arith; |
| | | import com.core.common.R; |
| | |
| | | @RequestMapping("/top") |
| | | @ManagerAuth |
| | | public R top(){ |
| | | int logTotal = operateLogService.selectCount(new EntityWrapper<>()); |
| | | long logTotal = operateLogService.count(new QueryWrapper<>()); |
| | | int logWeek = operateLogService.selectCountByCurrentWeek(); |
| | | int userTotal = userService.selectCount(new EntityWrapper<>()); |
| | | long userTotal = userService.count(new QueryWrapper<>()); |
| | | int loginWeek = userLoginService.selectCountByCurrentWeek(); |
| | | |
| | | Map<String, Object> result = new HashMap<>(); |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/host/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(hostService.selectById(String.valueOf(id))); |
| | | return R.ok(hostService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/host/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<Host> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Host> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(hostService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderBy(true, false, "id"); |
| | | return R.ok(hostService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == host.getId()){ |
| | | hostService.insert(host); |
| | | hostService.save(host); |
| | | } else { |
| | | hostService.updateById(host); |
| | | } |
| | |
| | | @RequestMapping(value = "/host/add/auth") |
| | | @ManagerAuth |
| | | public R add(Host host) { |
| | | hostService.insert(host); |
| | | hostService.save(host); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | hostService.deleteBatchIds(Arrays.asList(ids)); |
| | | hostService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Host> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Host> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("host")); |
| | | convert(map, wrapper); |
| | | List<Host> list = hostService.selectList(wrapper); |
| | | List<Host> list = hostService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/hostQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Host> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Host> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("name", condition); |
| | | Page<Host> page = hostService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<Host> page = hostService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Host host : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | licenseInfos.setLicenseTime(formatLicenseTime(install)); |
| | | licenseInfos.setRequestCode(LicenseUtils.buildRequestCode(licenseSubject)); |
| | | licenseInfos.setCreateTime(new Date()); |
| | | if (!licenseInfosService.insert(licenseInfos)) { |
| | | if (!licenseInfosService.save(licenseInfos)) { |
| | | return R.error("许可证保存失败"); |
| | | } |
| | | |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/operateLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(operateLogService.selectById(String.valueOf(id))); |
| | | return R.ok(operateLogService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/operateLog/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<OperateLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<OperateLog> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(operateLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderBy(true, false, "id"); |
| | | return R.ok(operateLogService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == operateLog.getId()){ |
| | | operateLogService.insert(operateLog); |
| | | operateLogService.save(operateLog); |
| | | } else { |
| | | operateLogService.updateById(operateLog); |
| | | } |
| | |
| | | @RequestMapping(value = "/operateLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(OperateLog operateLog) { |
| | | operateLogService.insert(operateLog); |
| | | operateLogService.save(operateLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | operateLogService.deleteBatchIds(Arrays.asList(ids)); |
| | | operateLogService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<OperateLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<OperateLog> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("operateLog")); |
| | | convert(map, wrapper); |
| | | List<OperateLog> list = operateLogService.selectList(wrapper); |
| | | List<OperateLog> list = operateLogService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/operateLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<OperateLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<OperateLog> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<OperateLog> page = operateLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<OperateLog> page = operateLogService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (OperateLog operateLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/permission/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(permissionService.selectById(String.valueOf(id))); |
| | | return R.ok(permissionService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/permission/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<Permission> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Permission> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(permissionService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderBy(true, false, "id"); |
| | | return R.ok(permissionService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == permission.getId()){ |
| | | permissionService.insert(permission); |
| | | permissionService.save(permission); |
| | | } else { |
| | | permissionService.updateById(permission); |
| | | } |
| | |
| | | @RequestMapping(value = "/permission/add/auth") |
| | | @ManagerAuth |
| | | public R add(Permission permission) { |
| | | permissionService.insert(permission); |
| | | permissionService.save(permission); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | permissionService.deleteBatchIds(Arrays.asList(ids)); |
| | | permissionService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Permission> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Permission> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("permission")); |
| | | convert(map, wrapper); |
| | | List<Permission> list = permissionService.selectList(wrapper); |
| | | List<Permission> list = permissionService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/permissionQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Permission> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Permission> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("name", condition); |
| | | Page<Permission> page = permissionService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<Permission> page = permissionService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Permission permission : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/resource/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(resourceService.selectById(String.valueOf(id))); |
| | | return R.ok(resourceService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/resource/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<Resource> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Resource> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(resourceService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderBy(true, false, "id"); |
| | | return R.ok(resourceService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | if (resource.getSort() == null){ |
| | | resource.setSort(999); |
| | | } |
| | | resourceService.insert(resource); |
| | | resourceService.save(resource); |
| | | } else { |
| | | resourceService.updateById(resource); |
| | | } |
| | |
| | | @RequestMapping(value = "/resource/add/auth") |
| | | @ManagerAuth(memo = "菜单添加") |
| | | public R add(Resource resource) { |
| | | resourceService.insert(resource); |
| | | resourceService.save(resource); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth(memo = "菜单删除") |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | resourceService.deleteById(id); |
| | | resourceService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @ManagerAuth(memo = "菜单导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Resource> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Resource> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("resource")); |
| | | convert(map, wrapper); |
| | | List<Resource> list = resourceService.selectList(wrapper); |
| | | List<Resource> list = resourceService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/resourceQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Resource> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Resource> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("name", condition); |
| | | Page<Resource> page = resourceService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<Resource> page = resourceService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Resource resource : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<Resource> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Resource> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | else { |
| | | wrapper.orderBy("sort"); |
| | | wrapper.orderBy(true, true, "sort"); |
| | | } |
| | | List<Resource> resources = resourceService.selectList(wrapper); |
| | | List<Resource> resources = resourceService.list(wrapper); |
| | | for (Resource resource : resources) { |
| | | resource.setName(i18nMessageService.resolveResourceText(resource.getName(), resource.getCode(), resource.getId())); |
| | | } |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/role/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(roleService.selectById(String.valueOf(id))); |
| | | return R.ok(roleService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/role/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<Role> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Role> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | wrapper.orderBy(true, false, "id"); |
| | | |
| | | if (9527 == getUserId()) { |
| | | return R.ok(roleService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | return R.ok(roleService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | Long roleId = getUser().getRoleId(); |
| | | Role role = roleService.selectById(roleId); |
| | | Role role = roleService.getById(roleId); |
| | | Long leaderId = role.getLeader(); |
| | | if (null != leaderId) { |
| | | List<Long> leaderIds = new ArrayList<>(); |
| | | leaderIds.add(roleId); |
| | | while (leaderId != null) { |
| | | Role leader = roleService.selectById(leaderId); |
| | | Role leader = roleService.getById(leaderId); |
| | | leaderIds.add(leader.getId()); |
| | | leaderId = leader.getLeader(); |
| | | } |
| | |
| | | // if (null != role.getLevel()) { |
| | | // wrapper.gt("level", role.getLevel()); |
| | | // } |
| | | return R.ok(roleService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | return R.ok(roleService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == role.getId()){ |
| | | roleService.insert(role); |
| | | roleService.save(role); |
| | | } else { |
| | | roleService.updateById(role); |
| | | } |
| | |
| | | @RequestMapping(value = "/role/add/auth") |
| | | @ManagerAuth(memo = "角色添加") |
| | | public R add(Role role) { |
| | | roleService.insert(role); |
| | | roleService.save(role); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | roleService.deleteBatchIds(Arrays.asList(ids)); |
| | | roleService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth(memo = "角色导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Role> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Role> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("role")); |
| | | convert(map, wrapper); |
| | | List<Role> list = roleService.selectList(wrapper); |
| | | List<Role> list = roleService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/roleQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Role> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Role> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("name", condition); |
| | | // 上下级管理 |
| | | if (9527 != getUserId()) { |
| | | Long roleId = getUser().getRoleId(); |
| | | Role role = roleService.selectById(roleId); |
| | | Role role = roleService.getById(roleId); |
| | | Long leaderId = role.getLeader(); |
| | | if (null != leaderId) { |
| | | List<Long> leaderIds = new ArrayList<>(); |
| | | while (leaderId != null) { |
| | | Role leader = roleService.selectById(leaderId); |
| | | Role leader = roleService.getById(leaderId); |
| | | leaderIds.add(leader.getId()); |
| | | leaderId = leader.getLeader(); |
| | | } |
| | |
| | | // } |
| | | } |
| | | |
| | | Page<Role> page = roleService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<Role> page = roleService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Role role : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/user/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(userService.selectById(String.valueOf(id))); |
| | | return R.ok(userService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/user/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<User> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<User> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | wrapper.orderBy(true, false, "id"); |
| | | if (9527 == getUserId()) { |
| | | return R.ok(userService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | return R.ok(userService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | Long roleId = getUser().getRoleId(); |
| | | Role role = roleService.selectById(roleId); |
| | | Role role = roleService.getById(roleId); |
| | | Long leaderId = role.getLeader(); |
| | | if (null != leaderId) { |
| | | List<Long> leaderIds = new ArrayList<>(); |
| | | leaderIds.add(role.getId()); |
| | | while (leaderId != null) { |
| | | Role leader = roleService.selectById(leaderId); |
| | | Role leader = roleService.getById(leaderId); |
| | | leaderIds.add(leader.getId()); |
| | | leaderId = leader.getLeader(); |
| | | } |
| | | wrapper.notIn("role_id", leaderIds); |
| | | } |
| | | |
| | | return R.ok(userService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | return R.ok(userService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == user.getId()){ |
| | | userService.insert(user); |
| | | userService.save(user); |
| | | } else { |
| | | userService.updateById(user); |
| | | } |
| | |
| | | @RequestMapping(value = "/user/add/auth") |
| | | @ManagerAuth(memo = "系统用户添加") |
| | | public R add(User user) { |
| | | userService.insert(user); |
| | | userService.save(user); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(user) || null==user.getId()){ |
| | | return R.error(); |
| | | } |
| | | User entity = userService.selectById(user.getId()); |
| | | User entity = userService.getById(user.getId()); |
| | | if (user.getPassword()!=null) { |
| | | entity.setPassword(user.getPassword()); |
| | | } |
| | |
| | | @ManagerAuth(memo = "系统用户删除") |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | userService.deleteById(id); |
| | | userService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @ManagerAuth(memo = "系统用户导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<User> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<User> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("user")); |
| | | convert(map, wrapper); |
| | | List<User> list = userService.selectList(wrapper); |
| | | List<User> list = userService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/userQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<User> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<User> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("username", condition); |
| | | Page<User> page = userService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<User> page = userService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (User user : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/userLogin/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(userLoginService.selectById(String.valueOf(id))); |
| | | return R.ok(userLoginService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/userLogin/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<UserLogin> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<UserLogin> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(userLoginService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderBy(true, false, "id"); |
| | | return R.ok(userLoginService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == userLogin.getId()){ |
| | | userLoginService.insert(userLogin); |
| | | userLoginService.save(userLogin); |
| | | } else { |
| | | userLoginService.updateById(userLogin); |
| | | } |
| | |
| | | @RequestMapping(value = "/userLogin/add/auth") |
| | | @ManagerAuth |
| | | public R add(UserLogin userLogin) { |
| | | userLoginService.insert(userLogin); |
| | | userLoginService.save(userLogin); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | userLoginService.deleteBatchIds(Arrays.asList(ids)); |
| | | userLoginService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<UserLogin> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<UserLogin> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("userLogin")); |
| | | convert(map, wrapper); |
| | | List<UserLogin> list = userLoginService.selectList(wrapper); |
| | | List<UserLogin> list = userLoginService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/userLoginQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<UserLogin> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<UserLogin> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("token", condition); |
| | | Page<UserLogin> page = userLoginService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<UserLogin> page = userLoginService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (UserLogin userLogin : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | |
| | | |
| | | public String getUserId$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.userId); |
| | | User user = service.getById(this.userId); |
| | | if (!Cools.isEmpty(user)){ |
| | | return user.getUsername(); |
| | | } |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.ResourceService; |
| | |
| | | |
| | | public String getResourceName(){ |
| | | ResourceService service = SpringUtils.getBean(ResourceService.class); |
| | | Resource resource = service.selectById(this.resourceId); |
| | | Resource resource = service.getById(this.resourceId); |
| | | if (!Cools.isEmpty(resource)){ |
| | | return resource.getName(); |
| | | } |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.ResourceService; |
| | |
| | | |
| | | public String getResourceName(){ |
| | | ResourceService service = SpringUtils.getBean(ResourceService.class); |
| | | Resource resource = service.selectById(this.resourceId); |
| | | Resource resource = service.getById(this.resourceId); |
| | | if (!Cools.isEmpty(resource)){ |
| | | return resource.getName(); |
| | | } |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.RoleService; |
| | |
| | | |
| | | public String getLeader$(){ |
| | | RoleService service = SpringUtils.getBean(RoleService.class); |
| | | Role role = service.selectById(this.leader); |
| | | Role role = service.getById(this.leader); |
| | | if (!Cools.isEmpty(role)){ |
| | | return String.valueOf(role.getName()); |
| | | } |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.PermissionService; |
| | |
| | | |
| | | public String getRoleName(){ |
| | | RoleService service = SpringUtils.getBean(RoleService.class); |
| | | Role role = service.selectById(this.roleId); |
| | | Role role = service.getById(this.roleId); |
| | | if (!Cools.isEmpty(role)){ |
| | | return role.getName(); |
| | | } |
| | |
| | | |
| | | public String getPermissionName(){ |
| | | PermissionService service = SpringUtils.getBean(PermissionService.class); |
| | | Permission permission = service.selectById(this.permissionId); |
| | | Permission permission = service.getById(this.permissionId); |
| | | if (!Cools.isEmpty(permission)){ |
| | | return permission.getName(); |
| | | } |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.HostService; |
| | |
| | | |
| | | public String getHostName() { |
| | | HostService service = SpringUtils.getBean(HostService.class); |
| | | Host host = service.selectById(this.hostId); |
| | | Host host = service.getById(this.hostId); |
| | | if (!Cools.isEmpty(host)){ |
| | | return host.getName(); |
| | | } |
| | |
| | | |
| | | public String getRoleName(){ |
| | | RoleService service = SpringUtils.getBean(RoleService.class); |
| | | Role role = service.selectById(this.roleId); |
| | | Role role = service.getById(this.roleId); |
| | | if (!Cools.isEmpty(role)){ |
| | | return role.getName(); |
| | | } |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | |
| | | |
| | | public String getUserUsername(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.userId); |
| | | User user = service.getById(this.userId); |
| | | if (!Cools.isEmpty(user)){ |
| | | return user.getUsername(); |
| | | } |
| | |
| | | licenseInfos.setLicenseTime(formatLicenseTime(install)); |
| | | licenseInfos.setRequestCode(requestCode); |
| | | licenseInfos.setCreateTime(new Date()); |
| | | licenseInfosService.insert(licenseInfos); |
| | | licenseInfosService.save(licenseInfos); |
| | | } catch (Exception ignored) { |
| | | } |
| | | } |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.Api; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.Config; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.Host; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.zy.system.entity.LicenseInfos; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.OperateLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.Permission; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.Resource; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.Role; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.RolePermission; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.Resource; |
| | | import com.zy.system.entity.RoleResource; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.UserLogin; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.User; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.Api; |
| | | |
| | | public interface ApiService extends IService<Api> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.Config; |
| | | |
| | | public interface ConfigService extends IService<Config> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.Host; |
| | | |
| | | public interface HostService extends IService<Host> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.zy.system.entity.LicenseInfos; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface LicenseInfosService extends IService<LicenseInfos> { |
| | | |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.OperateLog; |
| | | |
| | | import java.util.List; |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.Permission; |
| | | |
| | | public interface PermissionService extends IService<Permission> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.Resource; |
| | | |
| | | public interface ResourceService extends IService<Resource> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.RolePermission; |
| | | |
| | | public interface RolePermissionService extends IService<RolePermission> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.Resource; |
| | | import com.zy.system.entity.RoleResource; |
| | | |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.Role; |
| | | |
| | | public interface RoleService extends IService<Role> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.UserLogin; |
| | | |
| | | public interface UserLoginService extends IService<UserLogin> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.User; |
| | | |
| | | public interface UserService extends IService<User> { |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.Api; |
| | | import com.zy.system.mapper.ApiMapper; |
| | | import com.zy.system.service.ApiService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.mapper.ConfigMapper; |
| | | import com.zy.system.service.ConfigService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.Host; |
| | | import com.zy.system.mapper.HostMapper; |
| | | import com.zy.system.service.HostService; |
| | |
| | | import com.zy.system.mapper.LicenseInfosMapper; |
| | | import com.zy.system.entity.LicenseInfos; |
| | | import com.zy.system.service.LicenseInfosService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("licenseInfosService") |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.zy.system.entity.OperateLog; |
| | | import com.zy.system.mapper.OperateLogMapper; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.Permission; |
| | | import com.zy.system.mapper.PermissionMapper; |
| | | import com.zy.system.service.PermissionService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.Resource; |
| | | import com.zy.system.mapper.ResourceMapper; |
| | | import com.zy.system.service.ResourceService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.RolePermission; |
| | | import com.zy.system.mapper.RolePermissionMapper; |
| | | import com.zy.system.service.RolePermissionService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.Resource; |
| | | import com.zy.system.entity.RoleResource; |
| | | import com.zy.system.mapper.RoleResourceMapper; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.Role; |
| | | import com.zy.system.mapper.RoleMapper; |
| | | import com.zy.system.service.RoleService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.UserLogin; |
| | | import com.zy.system.mapper.UserLoginMapper; |
| | | import com.zy.system.service.UserLoginService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.mapper.UserMapper; |
| | | import com.zy.system.service.UserService; |
| | |
| | | licenseInfos.setCreateTime(new Date()); |
| | | licenseInfos.setLicenseTime(response.getString("licenseTime")); |
| | | licenseInfos.setRequestCode(requestCode); |
| | | licenseInfosService.insert(licenseInfos); |
| | | licenseInfosService.save(licenseInfos); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | # 系统版本信息 |
| | | app: |
| | | version: 1.0.5.3 |
| | | version: 3.0.0.0 |
| | | version-type: dev # prd 或 dev |
| | | i18n: |
| | | default-locale: zh-CN |
| | |
| | | hikari: |
| | | validation-timeout: 3000 |
| | | connection-test-query: select 1 |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://127.0.0.1:3306/wcs?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: root |
| | | mvc: |
| | | static-path-pattern: /** |
| | | redis: |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | database: 0 |
| | | # password: 123456 |
| | | data: |
| | | redis: |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | database: 0 |
| | | # password: 123456 |
| | | task: |
| | | scheduling: |
| | | pool: |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.core.domain.KeyValueVo; |
| | | import @{COMPANYNAME}.entity.@{ENTITYNAME}; |
| | |
| | | @RequestMapping(value = "/@{SIMPLEENTITYNAME}/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(@{SIMPLEENTITYNAME}Service.selectById(String.valueOf(id))); |
| | | return R.ok(@{SIMPLEENTITYNAME}Service.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/@{SIMPLEENTITYNAME}/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<@{ENTITYNAME}> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<@{ENTITYNAME}> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(@{ENTITYNAME}.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(@{SIMPLEENTITYNAME}Service.selectPage(new Page<>(curr, limit), wrapper)); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | return R.ok(@{SIMPLEENTITYNAME}Service.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | |
| | | @RequestMapping(value = "/@{SIMPLEENTITYNAME}/add/auth") |
| | | @ManagerAuth |
| | | public R add(@{ENTITYNAME} @{SIMPLEENTITYNAME}) { |
| | | @{SIMPLEENTITYNAME}Service.insert(@{SIMPLEENTITYNAME}); |
| | | @{SIMPLEENTITYNAME}Service.save(@{SIMPLEENTITYNAME}); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") @{PRIMARYKEYTYPE}[] ids){ |
| | | for (@{PRIMARYKEYTYPE} id : ids){ |
| | | @{SIMPLEENTITYNAME}Service.deleteById(id); |
| | | @{SIMPLEENTITYNAME}Service.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping(value = "/@{SIMPLEENTITYNAME}/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<@{ENTITYNAME}> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<@{ENTITYNAME}> wrapper = new QueryWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("@{SIMPLEENTITYNAME}")); |
| | | convert(map, wrapper); |
| | | List<@{ENTITYNAME}> list = @{SIMPLEENTITYNAME}Service.selectList(wrapper); |
| | | List<@{ENTITYNAME}> list = @{SIMPLEENTITYNAME}Service.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/@{SIMPLEENTITYNAME}Query/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<@{ENTITYNAME}> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<@{ENTITYNAME}> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("@{MAJORCOLUMN}", condition); |
| | | Page<@{ENTITYNAME}> page = @{SIMPLEENTITYNAME}Service.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<@{ENTITYNAME}> page = @{SIMPLEENTITYNAME}Service.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (@{ENTITYNAME} @{SIMPLEENTITYNAME} : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @ManagerAuth |
| | | public R getDataKV(@RequestParam(required = false) String condition) { |
| | | List<KeyValueVo> vos = new ArrayList<>(); |
| | | EntityWrapper<@{ENTITYNAME}> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<@{ENTITYNAME}> wrapper = new QueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like("@{MAJORCOLUMN}", condition); |
| | | } |
| | | @{SIMPLEENTITYNAME}Service.selectPage(new Page<>(1, 30), wrapper).getRecords() |
| | | @{SIMPLEENTITYNAME}Service.page(new Page<>(1, 30), wrapper).getRecords() |
| | | .forEach(item -> vos.add(new KeyValueVo(String.valueOf(item.get@{UPCASEMARJORCOLUMN}()), item.get@{PRIMARYKEYCOLUMN}()))); |
| | | return R.ok().add(vos); |
| | | } |
| | |
| | | @RequestMapping(value = "/@{SIMPLEENTITYNAME}/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<@{ENTITYNAME}> wrapper = new EntityWrapper<@{ENTITYNAME}>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != @{SIMPLEENTITYNAME}Service.selectOne(wrapper)){ |
| | | QueryWrapper<@{ENTITYNAME}> wrapper = new QueryWrapper<@{ENTITYNAME}>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != @{SIMPLEENTITYNAME}Service.getOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(@{ENTITYNAME}.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | @{ENTITYIMPORT} |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | package @{COMPANYNAME}.mapper; |
| | | |
| | | import @{COMPANYNAME}.entity.@{ENTITYNAME}; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package @{COMPANYNAME}.service; |
| | | |
| | | import @{COMPANYNAME}.entity.@{ENTITYNAME}; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface @{ENTITYNAME}Service extends IService<@{ENTITYNAME}> { |
| | | |
| | |
| | | import @{COMPANYNAME}.mapper.@{ENTITYNAME}Mapper; |
| | | import @{COMPANYNAME}.entity.@{ENTITYNAME}; |
| | | import @{COMPANYNAME}.service.@{ENTITYNAME}Service; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("@{SIMPLEENTITYNAME}Service") |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/element/element.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script src="../../static/js/marked.min.js"></script> |
| | | <script src="../../static/js/purify.min.js"></script> |
| | | <script> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/element/element.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script> |
| | | new Vue({ |
| | | el: '#app', |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/apiLog/apiLog.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basCrnp/basCrnp.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basCrnp/basCrnp.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basCrnpErr/basCrnpErr.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basCrnpErr/basCrnpErr.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basCrnpErrLog/basCrnpErrLog.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basCrnpErrLog/basCrnpErrLog.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basCrnpOpt/basCrnpOpt.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basCrnpOpt/basCrnpOpt.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basDevp/basDevp.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basDevp/basDevp.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basDualCrnp/basDualCrnp.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basDualCrnp/basDualCrnp.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basDualCrnpErr/basDualCrnpErr.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basDualCrnpErr/basDualCrnpErr.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basDualCrnpErrLog/basDualCrnpErrLog.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basDualCrnpErrLog/basDualCrnpErrLog.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basDualCrnpOpt/basDualCrnpOpt.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basDualCrnpOpt/basDualCrnpOpt.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basLocSts/basLocSts.js" charset="utf-8"></script> |
| | | |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basLocSts/basLocSts.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basMap/basMap.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body>da |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basMap/basMap.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/element/element.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basOutStationArea/basOutStationArea.js"></script> |
| | | </body> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basRgv/basRgv.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basRgv/basRgv.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basRgvErr/basRgvErr.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basRgvErr/basRgvErr.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basRgvErrLog/basRgvErrLog.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basRgvErrLog/basRgvErrLog.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basRgvOpt/basRgvOpt.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basRgvOpt/basRgvOpt.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basStation/basStation.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basStation/basStation.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/element/element.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basStationDevice/basStationDevice.js"></script> |
| | | </body> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basStationOpt/basStationOpt.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basStationOpt/basStationOpt.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basWrkIotype/basWrkIotype.js" charset="utf-8"></script> |
| | | |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basWrkIotype/basWrkIotype.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basWrkStatus/basWrkStatus.js" charset="utf-8"></script> |
| | | |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basWrkStatus/basWrkStatus.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/config/config.js" charset="utf-8"></script> |
| | | |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/config/config.js" charset="utf-8"></script> |
| | | |
| | |
| | | <title>调试参数</title> |
| | | <link rel="stylesheet" href="../../static/vue/element/element.css"> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1"></script> |
| | | <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/element/element.js"></script> |
| | | <style> |
| | |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../static/layui/css/layui.css" media="all"> |
| | | <script type="text/javascript" src="../static/js/common.js"></script> |
| | | <script type="text/javascript" src="../static/js/common.js?v=20260309_i18n_fix1"></script> |
| | | <style> |
| | | body { |
| | | background-color: #fff; |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/deviceConfig/deviceConfig.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/deviceConfig/deviceConfig.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | </div> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script src="../../static/vue/js/vue.min.js"></script> |
| | | <script src="../../static/vue/element/element.js"></script> |
| | | <script src="../../components/MonitorCardKit.js"></script> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/httpRequestLog/httpRequestLog.js" charset="utf-8"></script> |
| | | </body> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/httpRequestLog/httpRequestLog.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/js/layer/layer.js"></script> |
| | | <script type="text/javascript" src="../static/js/common.js"></script> |
| | | <script type="text/javascript" src="../static/js/common.js?v=20260309_i18n_fix1"></script> |
| | | <script type="text/javascript" src="../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../static/vue/element/element.js"></script> |
| | | <script> |
| | |
| | | script = frameDocument.createElement("script"); |
| | | script.id = "wcs-i18n-bridge-script"; |
| | | script.type = "text/javascript"; |
| | | script.src = baseUrl + "/static/js/common.js"; |
| | | script.src = baseUrl + "/static/js/common.js?v=20260309_i18n_fix1"; |
| | | script.onload = applyFrameI18n; |
| | | frameDocument.head.appendChild(script); |
| | | }, |
| | |
| | | <title>库位地图</title> |
| | | <link rel="stylesheet" href="../../static/vue/element/element.css"> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1"></script> |
| | | <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/element/element.js"></script> |
| | | <script src="../../static/js/gsap.min.js"></script> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/locMast/locMast.js" charset="utf-8"></script> |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/locMast/locMast.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | <link rel="icon" type="image/x-icon" href="../static/images/wcs_logo.png" /> |
| | | <link rel="stylesheet" href="../static/css/animate.min.css"> |
| | | <script type="text/javascript" src="../static/layui/layui.js"></script> |
| | | <script type="text/javascript" src="../static/js/common.js"></script> |
| | | <script type="text/javascript" src="../static/js/common.js?v=20260309_i18n_fix1"></script> |
| | | <style> |
| | | html{ |
| | | height: 100%; |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/element/element.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script> |
| | | new Vue({ |
| | | el: '#app', |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/operateLog/operateLog.js" charset="utf-8"></script> |
| | | |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/operateLog/operateLog.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/js/tools/md5.js"></script> |
| | | <script type="text/javascript" src="../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script src="../static/layui/layui.js"></script> |
| | | <script> |
| | | layui.use(['form'], function() { |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/permission/permission.js" charset="utf-8"></script> |
| | | |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/permission/permission.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | </script> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | |
| | | <script> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/role/role.js" charset="utf-8"></script> |
| | | |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/role/role.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1"></script> |
| | | <script type="text/javascript" src="../../static/js/role/rolePower.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/tools/md5.js"></script> |
| | | <script type="text/javascript" src="../../static/js/user/user.js" charset="utf-8"></script> |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/tools/md5.js"></script> |
| | | <script type="text/javascript" src="../../static/js/user/user.js" charset="utf-8"></script> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/userLogin/userLogin.js" charset="utf-8"></script> |
| | | |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/userLogin/userLogin.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1"></script> |
| | | <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/element/element.js"></script> |
| | | <script src="../../static/js/gsap.min.js"></script> |
| | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1"></script> |
| | | <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/element/element.js"></script> |
| | | </head> |
| | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1"></script> |
| | | <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/element/element.js"></script> |
| | | <script src="../../static/js/gsap.min.js"></script> |
| | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/element/element.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/watch/stationColorConfig.js" charset="utf-8"></script> |
| | | </body> |
| | | </html> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkLastno/wrkLastno.js" charset="utf-8"></script> |
| | | |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkLastno/wrkLastno.js" charset="utf-8"></script> |
| | | </html> |
| | |
| | | <link rel="stylesheet" href="../../static/vue/element/element.css"> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1"></script> |
| | | <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/element/element.js"></script> |
| | | <style> |
| | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkMastLog/wrkMastLog.js" charset="utf-8"></script> |
| | | |
| | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkMastLog/wrkMastLog.js" charset="utf-8"></script> |
| | | </html> |