Compare commits
6 Commits
master
...
taiwan-tin
| Author | SHA1 | Date |
|---|---|---|
|
|
753f56a345 | 4 years ago |
|
|
f21442807b | 4 years ago |
|
|
f20a61d1ea | 4 years ago |
|
|
09de22e8f7 | 4 years ago |
|
|
ce5930cd54 | 4 years ago |
|
|
bb56c8e89f | 4 years ago |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,59 +0,0 @@
|
||||
package com.leaper.common.util;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
@Slf4j
|
||||
public class FileUtil {
|
||||
|
||||
public static void save(String text,String path){
|
||||
|
||||
//判断文件是否存在
|
||||
File file = new File(path);
|
||||
if (!file.exists()) {
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(file);
|
||||
fileOutputStream.write(text.getBytes());
|
||||
fileOutputStream.close();
|
||||
log.info("write text success :{}",text);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static String getText(String path){
|
||||
File file = new File(path);
|
||||
if(file.exists()){
|
||||
try {
|
||||
FileInputStream fileInputStream = new FileInputStream(file);
|
||||
byte[] bytes = new byte[1024];//定义字节长度
|
||||
int len = 0;
|
||||
String txt = null;
|
||||
while ((len = fileInputStream.read(bytes)) != -1) {//与文件读取出来的长度比较,内部有数据读完是-1,所以不等于-1
|
||||
txt = new String(bytes, 0, len);//从0取到有数据的末尾
|
||||
}
|
||||
|
||||
fileInputStream.close();
|
||||
return txt;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String path = "./lotnum_now";
|
||||
save("www",path);
|
||||
getText(path);
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,8 @@
|
||||
package com.leaper.common;
|
||||
package com.zhehekeji.common;
|
||||
|
||||
import com.leaper.common.properities.Md5Properity;
|
||||
import com.leaper.common.properities.RedisProperity;
|
||||
import com.leaper.common.util.MD5Util;
|
||||
import com.zhehekeji.common.properities.Md5Properity;
|
||||
import com.zhehekeji.common.properities.RedisProperity;
|
||||
import com.zhehekeji.common.util.MD5Util;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.common.constant;
|
||||
package com.zhehekeji.common.constant;
|
||||
|
||||
public abstract class CommonConstant {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.common.properities;
|
||||
package com.zhehekeji.common.properities;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.common.properities;
|
||||
package com.zhehekeji.common.properities;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.common.properities;
|
||||
package com.zhehekeji.common.properities;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.common.util;
|
||||
package com.zhehekeji.common.util;
|
||||
|
||||
import com.zhehekeji.core.util.Assert;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -1,6 +1,6 @@
|
||||
package com.leaper.common.util;
|
||||
package com.zhehekeji.common.util;
|
||||
|
||||
import com.leaper.common.properities.Md5Properity;
|
||||
import com.zhehekeji.common.properities.Md5Properity;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.common.util;
|
||||
package com.zhehekeji.common.util;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
import com.google.zxing.EncodeHintType;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.common.util;
|
||||
package com.zhehekeji.common.util;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.common.util;
|
||||
package com.zhehekeji.common.util;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.common.util;
|
||||
package com.zhehekeji.common.util;
|
||||
|
||||
import com.zhehekeji.core.util.Assert;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -1,29 +0,0 @@
|
||||
package encryptor;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public class Encryptor {
|
||||
public native static String encryptStr(String str);
|
||||
static
|
||||
{
|
||||
try{
|
||||
String path = System.getProperty("user.dir")+"\\libs\\encrypt";
|
||||
|
||||
System.setProperty("java.library.path", path);
|
||||
Field fieldSysPath = ClassLoader.class.getDeclaredField("sys_paths");
|
||||
fieldSysPath.setAccessible(true);
|
||||
fieldSysPath.set(null, null);
|
||||
|
||||
System.loadLibrary("Encryptor");
|
||||
}catch(Exception e)
|
||||
{
|
||||
System.out.println(e);
|
||||
}
|
||||
}
|
||||
public static void main(String[] args)
|
||||
{
|
||||
|
||||
String noEncrypt = "12345";
|
||||
String encrypt = Encryptor.encryptStr(noEncrypt);
|
||||
System.out.println(encrypt);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
package com.leaper.filter;
|
||||
|
||||
public interface FilterConstance {
|
||||
|
||||
}
|
||||
@ -1,99 +0,0 @@
|
||||
package com.leaper.filter.aspect;
|
||||
|
||||
import com.leaper.common.util.FileUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Scanner;
|
||||
|
||||
@Slf4j
|
||||
public class LPLicense {
|
||||
|
||||
private static LocalDateTime lastUpdate = null;
|
||||
|
||||
private static String lic_str = null;
|
||||
|
||||
private static String lic_path = "./lp.lic";
|
||||
|
||||
private static String key_path = "./lp.key";
|
||||
|
||||
private static String CPU_INFO = null;
|
||||
|
||||
private static String DISK_INFO = null;
|
||||
|
||||
/**
|
||||
* 初始的时候创建
|
||||
*/
|
||||
public static void createLicKeyIfNotExist(){
|
||||
File file = new File(key_path);
|
||||
if(!file.exists()){
|
||||
String cpu = getCpuInfo();
|
||||
CPU_INFO = cpu;
|
||||
String disk = getDiskInfo();
|
||||
DISK_INFO = disk;
|
||||
FileUtil.save(cpu+disk,key_path);
|
||||
}
|
||||
}
|
||||
|
||||
private static String getCpuInfo(){
|
||||
try {
|
||||
Process process = Runtime.getRuntime().exec(
|
||||
new String[] { "wmic", "cpu", "get", "ProcessorId" });
|
||||
process.getOutputStream().close();
|
||||
Scanner sc = new Scanner(process.getInputStream());
|
||||
String property = sc.next();
|
||||
String cpu = sc.next();
|
||||
return cpu;
|
||||
} catch (IOException e) {
|
||||
log.error("GET CPU error:{}",e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static String getDiskInfo(){
|
||||
try {
|
||||
Process process = Runtime.getRuntime().exec(
|
||||
new String[] { "wmic","diskdrive","where","index=0", "get", "serialnumber"});
|
||||
process.getOutputStream().close();
|
||||
Scanner sc = new Scanner(process.getInputStream());
|
||||
String property = sc.next();
|
||||
String disk = sc.next();
|
||||
return disk;
|
||||
} catch (IOException e) {
|
||||
log.error("Get DISK error:{}",e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static String getLic(){
|
||||
//每小时读取一次lic文件
|
||||
if(lastUpdate == null || LocalDateTime.now().toLocalTime().getHour() != lastUpdate.toLocalTime().getHour()){
|
||||
lastUpdate = LocalDateTime.now();
|
||||
lic_str = FileUtil.getText(lic_path);
|
||||
CPU_INFO = getCpuInfo();
|
||||
DISK_INFO = getDiskInfo();
|
||||
}
|
||||
return lic_str;
|
||||
}
|
||||
|
||||
public static boolean checkLic(String licStr){
|
||||
return CPU_INFO != null && DISK_INFO != null && licStr.equals(encryptor.Encryptor.encryptStr(CPU_INFO+DISK_INFO));
|
||||
}
|
||||
|
||||
public static boolean checkLic(){
|
||||
String licStr = getLic();
|
||||
if(StringUtils.isEmpty(licStr)){
|
||||
return false;
|
||||
}
|
||||
return checkLic(licStr);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
createLicKeyIfNotExist();
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package com.zhehekeji.filter;
|
||||
|
||||
public interface FilterConstance {
|
||||
|
||||
String HEADER = "token";
|
||||
|
||||
String JWT_KEY = "zhehekeji";
|
||||
|
||||
String SESSION_PREFIX = "session:";
|
||||
|
||||
Long SESSION_EXPIRE = 10800l;
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.zhehekeji.filter.aspect;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zhehekeji.common.util.HttpUtil;
|
||||
import com.zhehekeji.core.pojo.HttpStatus;
|
||||
import com.zhehekeji.core.pojo.Result;
|
||||
import com.zhehekeji.core.util.Assert;
|
||||
import com.zhehekeji.filter.FilterConstance;
|
||||
import com.zhehekeji.filter.pojo.CurrentUser;
|
||||
import com.zhehekeji.filter.pojo.SessionHandler;
|
||||
import com.zhehekeji.filter.pojo.UserType;
|
||||
import com.zhehekeji.filter.util.CurrentUserUtil;
|
||||
import com.zhehekeji.filter.util.JwtUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Before;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @Description Session切面
|
||||
* @Author wangyiming1031@aliyun.com
|
||||
* @Date 2019/10/28 19:26
|
||||
**/
|
||||
@Aspect
|
||||
@Component
|
||||
@Slf4j
|
||||
public class SessionAspect {
|
||||
|
||||
@Value("${zhehe.filter.enable}")
|
||||
private Boolean enable;
|
||||
@Value("${userUrl}")
|
||||
private String userUrl;
|
||||
|
||||
/**
|
||||
* zhehekeji..*.controller
|
||||
* 匹配zhehekeji 到controller多级目录
|
||||
*
|
||||
* @param sessionHandler
|
||||
*/
|
||||
@Before("execution(public * com.zhehekeji..*.controller.*.*(..))&&@annotation(sessionHandler)")
|
||||
public void handler(SessionHandler sessionHandler){
|
||||
if(!enable){
|
||||
return;
|
||||
}
|
||||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
String token = request.getHeader(FilterConstance.HEADER);
|
||||
CurrentUser currentUser = null;
|
||||
try {
|
||||
String res = HttpUtil.token(userUrl+"/api/account/checkToken",token);
|
||||
Result currentUserResult = JSONObject.parseObject(res,Result.class);
|
||||
if(currentUserResult != null && currentUserResult.getCode() == 200){
|
||||
currentUser = JSONObject.parseObject(JSONObject.toJSONString(currentUserResult.getData()),CurrentUser.class);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (sessionHandler.login()) {
|
||||
Assert.isTrue(currentUser != null, HttpStatus.UNAUTHORIZED.getCode(), HttpStatus.UNAUTHORIZED.getReasonPhrase());
|
||||
}
|
||||
if (sessionHandler.auth()) {
|
||||
//todo 权限检验
|
||||
}
|
||||
CurrentUserUtil.setCurrentUser(currentUser);
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.filter.pojo;
|
||||
package com.zhehekeji.filter.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@ -1,14 +1,22 @@
|
||||
package com.leaper.filter.pojo;
|
||||
package com.zhehekeji.filter.pojo;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface LicenseHandler {
|
||||
public @interface SessionHandler {
|
||||
|
||||
String value() default "";
|
||||
|
||||
UserType userType() default UserType.USER;
|
||||
|
||||
/**
|
||||
* 是否检验登录
|
||||
* @return true:检验 false:不检验
|
||||
*/
|
||||
boolean login() default true;
|
||||
|
||||
/**
|
||||
* 是否检验权限
|
||||
* @return true:检验 false:不检验 默认检验
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.filter.pojo;
|
||||
package com.zhehekeji.filter.pojo;
|
||||
|
||||
/**
|
||||
* @Description 用户分类
|
||||
@ -0,0 +1,30 @@
|
||||
package com.zhehekeji.filter.util;
|
||||
|
||||
import com.zhehekeji.filter.pojo.CurrentUser;
|
||||
|
||||
/**
|
||||
* @Description 当前操作人线程
|
||||
* @Author wangyiming1031@aliyun.com
|
||||
* @Date 2019/10/28 19:22
|
||||
**/
|
||||
public class CurrentUserUtil {
|
||||
|
||||
private static ThreadLocal<CurrentUser> currentUser = new ThreadLocal<>();
|
||||
|
||||
/**
|
||||
* 获取当前操作人
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static CurrentUser getCurrentUser() {
|
||||
return currentUser.get();
|
||||
}
|
||||
|
||||
public static void setCurrentUser(CurrentUser user) {
|
||||
currentUser.set(user);
|
||||
}
|
||||
|
||||
public static void delCurrentUser() {
|
||||
currentUser.remove();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,85 @@
|
||||
package com.zhehekeji.filter.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zhehekeji.filter.FilterConstance;
|
||||
import com.zhehekeji.filter.pojo.CurrentUser;
|
||||
import io.jsonwebtoken.Claims;
|
||||
import io.jsonwebtoken.JwtBuilder;
|
||||
import io.jsonwebtoken.Jwts;
|
||||
import io.jsonwebtoken.SignatureAlgorithm;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description JWTUtil
|
||||
* @Author wangyiming1031@aliyun.com
|
||||
* @Date 2019/10/28 19:11
|
||||
**/
|
||||
public class JwtUtil {
|
||||
|
||||
/**
|
||||
* 生成JWT
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static String createJWT(CurrentUser currentUser) {
|
||||
String userJson = JSONObject.toJSONString(currentUser);
|
||||
JwtBuilder builder = Jwts.builder()
|
||||
.setSubject(userJson)
|
||||
.setIssuedAt(new Date())
|
||||
.signWith(SignatureAlgorithm.HS256, FilterConstance.JWT_KEY);
|
||||
return builder.compact();
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析JWT
|
||||
* 抛出异常 则jwt错误
|
||||
* @param jwtStr
|
||||
* @return
|
||||
*/
|
||||
public static Claims parseJWT(String jwtStr) {
|
||||
return Jwts.parser()
|
||||
.setSigningKey(FilterConstance.JWT_KEY)
|
||||
.parseClaimsJws(jwtStr)
|
||||
.getBody();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前操作人
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
public static CurrentUser getUser(HttpServletRequest request) {
|
||||
String token = getToken(request);
|
||||
Claims claims;
|
||||
try {
|
||||
claims = parseJWT(token);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
String json = claims.getSubject();
|
||||
CurrentUser userInfo = JSONObject.parseObject(json, CurrentUser.class);
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
private static String getToken(HttpServletRequest request) {
|
||||
return request.getHeader(FilterConstance.HEADER);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成jwt,并将jwt放入返回头
|
||||
* 主要考虑的是 返回header 由用户过滤模块维护
|
||||
* @param response
|
||||
* @param currentUser
|
||||
* @return
|
||||
*/
|
||||
public static String createTokenAndHeader(HttpServletResponse response,CurrentUser currentUser){
|
||||
String jwt = createJWT(currentUser);
|
||||
response.setHeader(FilterConstance.HEADER,jwt);
|
||||
return jwt;
|
||||
}
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 360 KiB After Width: | Height: | Size: 360 KiB |
|
Before Width: | Height: | Size: 299 KiB After Width: | Height: | Size: 299 KiB |
@ -1,18 +0,0 @@
|
||||
@ECHO OFF
|
||||
|
||||
SET dbhost=127.0.0.1
|
||||
SET dbuser=root
|
||||
SET dbpasswd=Leaper@123
|
||||
SET dbName=test
|
||||
set sqlfile=C:\Users\Peter\Desktop\lia_duoji.sql
|
||||
|
||||
cd D:\hzleaper_auto_install\mysql-5.7.33-winx64\bin
|
||||
|
||||
::执行SQL脚本
|
||||
@ECHO Start!
|
||||
mysql -h%dbhost% -u%dbuser% -p%dbpasswd% < %sqlfile% --default-character-set=utf8
|
||||
|
||||
ECHO OK!
|
||||
PAUSE
|
||||
|
||||
@ECHO Done!
|
||||
@ -1,35 +0,0 @@
|
||||
package com.leaper.web.controller;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.leaper.web.pojo.stock.CheckLogSearch;
|
||||
import com.leaper.common.util.ValidatorUtil;
|
||||
import com.zhehekeji.core.pojo.Result;
|
||||
import com.leaper.web.entity.CheckLog;
|
||||
import com.leaper.web.service.CheckLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Api(tags = "盘点历史")
|
||||
@RequestMapping("/checkLog")
|
||||
@RestController
|
||||
public class CheckLogController {
|
||||
|
||||
@Resource
|
||||
private CheckLogService checkLogService;
|
||||
@Resource
|
||||
private ValidatorUtil validatorUtil;
|
||||
|
||||
@ApiOperation("盘点历史")
|
||||
@PostMapping("")
|
||||
public Result<PageInfo<CheckLog>> list(@RequestBody CheckLogSearch checkLogSearch){
|
||||
return Result.success(checkLogService.list(checkLogSearch));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
package com.leaper.web.controller;
|
||||
|
||||
import com.leaper.web.service.CommandHandler;
|
||||
import com.leaper.web.service.ksec.KsecInfo;
|
||||
import com.zhehekeji.core.pojo.Result;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(value = "monitor",tags = "监控接口 HTTP协议")
|
||||
@RestController
|
||||
@RequestMapping("/monitor")
|
||||
@Slf4j
|
||||
public class MonitorController {
|
||||
|
||||
@PostMapping("/task")
|
||||
public Result monitorTask(@RequestBody KsecInfo ksecInfo){
|
||||
CommandHandler.exec(ksecInfo);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
package com.leaper.web.controller;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.leaper.web.service.StockLogService;
|
||||
import com.leaper.common.util.ValidatorUtil;
|
||||
import com.zhehekeji.core.pojo.Result;
|
||||
import com.leaper.web.entity.StockLog;
|
||||
import com.leaper.web.pojo.stock.StockLogSearch;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Api(tags = "库存历史")
|
||||
@RequestMapping("/stockLog")
|
||||
@RestController
|
||||
public class StockLogController {
|
||||
|
||||
@Resource
|
||||
private StockLogService stockLogService;
|
||||
@Resource
|
||||
private ValidatorUtil validatorUtil;
|
||||
|
||||
@ApiOperation("库存历史")
|
||||
@PostMapping("")
|
||||
public Result<PageInfo<StockLog>> list(@RequestBody StockLogSearch stockLogSearch){
|
||||
return Result.success(stockLogService.page(stockLogSearch));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
package com.leaper.web.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.leaper.web.entity.StockLog;
|
||||
|
||||
public interface StockLogMapper extends BaseMapper<StockLog> {
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
package com.leaper.web.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.leaper.web.entity.Stock;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface StockMapper extends BaseMapper<Stock> {
|
||||
|
||||
void batchInsert(@Param("stocks") List<Stock> stocks);
|
||||
|
||||
void insertOrUpdate(@Param("req") Stock stock);
|
||||
|
||||
@Select("select * from stock where `street_id` = #{streetId} and `direction` = #{direction} and `side` = #{side} and `row` = #{row} and `column` = #{column} limit 1")
|
||||
Stock getByStreetAndDirectionAndSideAndRowColumn(@Param("streetId") Integer streetId,@Param("direction") Integer direction,@Param("side") Integer side,@Param("row") Integer row,@Param("column") Integer column);
|
||||
|
||||
void truncate();
|
||||
|
||||
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
package com.leaper.web.pojo.camera;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AreaCamera {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String rtcServer;
|
||||
|
||||
private Integer rtcServerPort;
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
package com.leaper.web.pojo.stock;
|
||||
|
||||
import com.alibaba.excel.converters.Converter;
|
||||
import com.alibaba.excel.enums.CellDataTypeEnum;
|
||||
import com.alibaba.excel.metadata.CellData;
|
||||
import com.alibaba.excel.metadata.GlobalConfiguration;
|
||||
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
||||
|
||||
public class StockDirectionConvert implements Converter<Integer> {
|
||||
@Override
|
||||
public Class supportJavaTypeKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CellDataTypeEnum supportExcelTypeKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CellData convertToExcelData(Integer integer, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
|
||||
if(integer == 1){
|
||||
return new CellData("左");
|
||||
}else {
|
||||
return new CellData("右");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,47 +0,0 @@
|
||||
package com.leaper.web.pojo.stock;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class StockExportExcel {
|
||||
|
||||
@ExcelProperty(index = 0, value = "巷道名称")
|
||||
private String streetName;
|
||||
|
||||
@ExcelProperty(index = 8, value = "盘点批次号")
|
||||
private String lotnum;
|
||||
|
||||
@ExcelProperty(index = 5, value = "条码")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty(index = 6, value = "WMS条码")
|
||||
private String wmsCode;
|
||||
|
||||
@ExcelProperty(index = 1, value = "左右",converter=StockDirectionConvert.class)
|
||||
private Integer direction;
|
||||
|
||||
@ExcelProperty(index = 2, value = "深浅",converter = StockSideConvert.class)
|
||||
private Integer side;
|
||||
|
||||
// @ExcelProperty(index = 1, value = "货架号")
|
||||
// private String shelveId;
|
||||
|
||||
// @ExcelProperty(index = 5, value = "数量")
|
||||
// private Integer count;
|
||||
|
||||
@ExcelProperty(index = 3, value = "行")
|
||||
private Integer row;
|
||||
|
||||
@ExcelProperty(index = 4, value = "列")
|
||||
private Integer column;
|
||||
|
||||
@ExcelProperty(index = 7, value = "盘点结果", converter = StockStatusConvert.class)
|
||||
private Integer status;
|
||||
|
||||
@ExcelProperty(index = 9, value = "时间", converter = LocalDateTimeConvert.class)
|
||||
private LocalDateTime exportTime;
|
||||
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
package com.leaper.web.pojo.stock;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StockLogSearch {
|
||||
|
||||
private Integer row;
|
||||
|
||||
private Integer column;
|
||||
|
||||
private Integer pageSize;
|
||||
|
||||
private Integer pageNum;
|
||||
|
||||
private Integer streetId;
|
||||
|
||||
private Integer direction;
|
||||
|
||||
private Integer side;
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
package com.leaper.web.pojo.stock;
|
||||
|
||||
import com.alibaba.excel.converters.Converter;
|
||||
import com.alibaba.excel.enums.CellDataTypeEnum;
|
||||
import com.alibaba.excel.metadata.CellData;
|
||||
import com.alibaba.excel.metadata.GlobalConfiguration;
|
||||
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
||||
|
||||
public class StockSideConvert implements Converter<Integer> {
|
||||
@Override
|
||||
public Class supportJavaTypeKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CellDataTypeEnum supportExcelTypeKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CellData convertToExcelData(Integer integer, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
|
||||
if(integer == 1){
|
||||
return new CellData("浅货位");
|
||||
}else {
|
||||
return new CellData("深货位");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
package com.leaper.web.service;
|
||||
|
||||
import com.leaper.common.util.FileUtil;
|
||||
import com.leaper.web.service.ksec.KsecDecoder;
|
||||
import com.leaper.web.service.ksec.KsecInfo;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.concurrent.ArrayBlockingQueue;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Slf4j
|
||||
public class CommandHandler {
|
||||
|
||||
private static ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(7,21,30, TimeUnit.MILLISECONDS,new ArrayBlockingQueue<>(20000));
|
||||
|
||||
static {
|
||||
String lotnum = FileUtil.getText("lastLotnum");
|
||||
if(lotnum != null){
|
||||
CommandRunnable.setLastLotnum(lotnum);
|
||||
}
|
||||
log.info("read lastLotnum:{}",lotnum);
|
||||
}
|
||||
|
||||
public static void exec(ChannelHandlerContext ctx, ByteBuf in){
|
||||
CommandRunnable commandRunnable = new CommandRunnable(in,ctx);
|
||||
threadPoolExecutor.execute(commandRunnable);
|
||||
}
|
||||
|
||||
public static void exec(KsecInfo ksecInfo){
|
||||
CommandRunnable commandRunnable = new CommandRunnable(ksecInfo);
|
||||
threadPoolExecutor.execute(commandRunnable);
|
||||
}
|
||||
}
|
||||
@ -1,128 +0,0 @@
|
||||
package com.leaper.web.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.leaper.web.config.ConfigProperties;
|
||||
import com.leaper.web.entity.LightSource;
|
||||
import com.leaper.web.mapper.LightSourceMapper;
|
||||
import com.leaper.web.service.damLightSource.JYDAMEquip;
|
||||
import com.leaper.web.service.damLightSource.JYDamHelper;
|
||||
import com.leaper.web.service.hikLightSource.HikControlSocket;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.math.BigInteger;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.time.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
@EnableScheduling
|
||||
@Slf4j
|
||||
public class CronTab {
|
||||
|
||||
@Resource
|
||||
private ConfigProperties configProperties;
|
||||
@Resource
|
||||
private LightSourceMapper lightSourceMapper;
|
||||
|
||||
private static LocalDateTime now;
|
||||
|
||||
private static Map<Integer,Long> lightTimeMap = new HashMap<>();
|
||||
|
||||
//10分钟
|
||||
private static BigInteger timeDIff = BigInteger.valueOf(10*60*1000);
|
||||
|
||||
private static int gByte = 1024* 1024 * 1024;
|
||||
|
||||
@Scheduled(cron = "0 0 0 * * ?")
|
||||
//@Scheduled(cron = "0 0/1 * * * *")
|
||||
public void file() {
|
||||
log.info(" corn delete file");
|
||||
now = LocalDateTime.now();
|
||||
File dir = new File(configProperties.getSavePath().getMediaPath());
|
||||
long space = dir.getFreeSpace() / gByte;
|
||||
log.info(" free space :{}",space);
|
||||
if(space > 150){
|
||||
return;
|
||||
}
|
||||
checkFileTime(dir,configProperties.getDeleteFileDays());
|
||||
File dir2 = new File(configProperties.getSavePath().getMp4Path());
|
||||
checkFileTime(dir2,configProperties.getDeleteFileDays());
|
||||
}
|
||||
|
||||
public static void putTime(Integer streetId){
|
||||
lightTimeMap.put(streetId,System.currentTimeMillis());
|
||||
}
|
||||
|
||||
@Scheduled(cron = "0 0/1 * * * ?")
|
||||
public void lightStatus() {
|
||||
log.debug(" lightStatus");
|
||||
long timeStamp = System.currentTimeMillis();
|
||||
|
||||
Iterator<Map.Entry<Integer, Long>> it = lightTimeMap.entrySet().iterator();
|
||||
while (it.hasNext()){
|
||||
Map.Entry<Integer, Long> entry = it.next();
|
||||
if((BigInteger.valueOf(timeStamp).subtract(BigInteger.valueOf(entry.getValue()))).compareTo(timeDIff) > 0){
|
||||
List<LightSource> lightSources = lightSourceMapper.selectList(new QueryWrapper<LightSource>().eq("street_id",entry.getKey()));
|
||||
lightSources.forEach(lightSource -> {
|
||||
if(configProperties.getLightSource().getType() == 1){
|
||||
|
||||
JYDAMEquip equip = JYDamHelper.Connect(lightSource.getIp(),lightSource.getPort());
|
||||
JYDamHelper.closeDO(equip,configProperties.getLightSource().getIndex());
|
||||
Integer status = JYDamHelper.ReadStatus(equip,configProperties.getLightSource().getNum(),configProperties.getLightSource().getIndex());
|
||||
log.info("ip:{},status:{}",lightSource.getIp(),status);
|
||||
equip.DisConnect();
|
||||
}else if(configProperties.getLightSource().getType() == 2){
|
||||
HikControlSocket.openLight(lightSource.getIp(),lightSource.getPort(),configProperties.getLightSource().getIndex(),0);
|
||||
}
|
||||
});
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void checkFileTime(File dir,int days) {
|
||||
if(!dir.exists()){
|
||||
return;
|
||||
}
|
||||
if (dir.isDirectory()) {
|
||||
String[] children = dir.list();
|
||||
if(children.length == 0){
|
||||
log.info("delete path:{}",dir.getPath());
|
||||
dir.delete();
|
||||
}
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
checkFileTime(new File(dir, children[i]),days);
|
||||
}
|
||||
}else {
|
||||
//判斷時間
|
||||
BasicFileAttributes attr = null;
|
||||
try {
|
||||
Path path = dir.toPath();
|
||||
attr = Files.readAttributes(path, BasicFileAttributes.class);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 创建时间
|
||||
Instant instant = attr.creationTime().toInstant();
|
||||
LocalDateTime createTime = LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
|
||||
Duration duration = Duration.between(createTime,now);
|
||||
if(days<=duration.toDays()){
|
||||
log.info("delete path:{}",dir.getPath());
|
||||
dir.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
package com.leaper.web.service.RFID;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class RFIDMap {
|
||||
|
||||
private static Map<Integer,RFIDSocket> socketMap = new HashMap<>();
|
||||
|
||||
|
||||
public static void put(Integer streetId,RFIDSocket rfidSocket){
|
||||
socketMap.put(streetId,rfidSocket);
|
||||
}
|
||||
|
||||
public static void remove(Integer streetId){
|
||||
socketMap.remove(streetId);
|
||||
}
|
||||
|
||||
public static RFIDSocket get(Integer streetId){
|
||||
return socketMap.get(streetId);
|
||||
}
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
package com.leaper.web.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.leaper.web.entity.StockLog;
|
||||
import com.leaper.web.mapper.StockLogMapper;
|
||||
import com.leaper.web.pojo.stock.StockLogSearch;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class StockLogService {
|
||||
|
||||
@Resource
|
||||
private StockLogMapper stockLogMapper;
|
||||
|
||||
public PageInfo<StockLog> page(StockLogSearch search){
|
||||
PageHelper.startPage(search.getPageNum(),search.getPageSize());
|
||||
List<StockLog> stockLogs =
|
||||
stockLogMapper.selectList(new QueryWrapper<StockLog>().eq("`row`",search.getRow()).eq("`column`",search.getColumn()).eq("street_id",search.getStreetId()).eq("direction",search.getDirection()).eq("side",search.getSide()));
|
||||
return new PageInfo<>(stockLogs);
|
||||
}
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
package com.leaper.web.service.ksec;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.handler.codec.MessageToByteEncoder;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* 昆船JSON版发送 首尾加上 < >
|
||||
*/
|
||||
public class KescEncoder extends MessageToByteEncoder<KsecInfo> {
|
||||
|
||||
|
||||
@Override
|
||||
protected void encode(ChannelHandlerContext channelHandlerContext, KsecInfo ksecInfo, ByteBuf byteBuf) throws Exception {
|
||||
String body = "<" + JSONObject.toJSONString(ksecInfo) + ">";
|
||||
byteBuf.writeBytes(body.getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
}
|
||||
@ -1,11 +1,12 @@
|
||||
package com.leaper.web;
|
||||
package com.zhehekeji.web;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
|
||||
@SpringBootApplication(scanBasePackages = {"com.leaper","com.zhehekeji.core"})
|
||||
@MapperScan("com.leaper.**.mapper.**")
|
||||
@SpringBootApplication(scanBasePackages = {"com.zhehekeji"})
|
||||
@MapperScan("com.zhehekeji.**.mapper.**")
|
||||
public class Application {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication springApplication = new SpringApplication(Application.class);
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.web.config;
|
||||
package com.zhehekeji.web.config;
|
||||
|
||||
import com.github.pagehelper.cache.GuavaCache;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.web.config;
|
||||
package com.zhehekeji.web.config;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.mybatis.spring.SqlSessionFactoryBean;
|
||||
@ -1,10 +1,10 @@
|
||||
package com.leaper.web.controller;
|
||||
package com.zhehekeji.web.controller;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zhehekeji.core.pojo.Result;
|
||||
import com.leaper.web.entity.Category;
|
||||
import com.leaper.web.pojo.category.PageSearch;
|
||||
import com.leaper.web.service.CategoryService;
|
||||
import com.zhehekeji.web.entity.Category;
|
||||
import com.zhehekeji.web.pojo.category.PageSearch;
|
||||
import com.zhehekeji.web.service.CategoryService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.web.controller;
|
||||
package com.zhehekeji.web.controller;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
package com.leaper.web.controller;
|
||||
package com.zhehekeji.web.controller;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.leaper.common.util.ValidatorUtil;
|
||||
import com.zhehekeji.common.util.ValidatorUtil;
|
||||
import com.zhehekeji.core.pojo.Result;
|
||||
import com.leaper.web.pojo.OrderSaveReq;
|
||||
import com.leaper.web.pojo.OrderSearch;
|
||||
import com.leaper.web.pojo.OrderVO;
|
||||
import com.leaper.web.service.OrderService;
|
||||
import com.leaper.web.service.PlcCmdInfo;
|
||||
import com.leaper.web.service.PlcService;
|
||||
import com.zhehekeji.web.pojo.OrderSaveReq;
|
||||
import com.zhehekeji.web.pojo.OrderSearch;
|
||||
import com.zhehekeji.web.pojo.OrderVO;
|
||||
import com.zhehekeji.web.service.OrderService;
|
||||
import com.zhehekeji.web.service.PlcCmdInfo;
|
||||
import com.zhehekeji.web.service.PlcService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
@ -1,14 +1,21 @@
|
||||
package com.leaper.web.controller;
|
||||
package com.zhehekeji.web.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zhehekeji.common.util.HttpUtil;
|
||||
import com.zhehekeji.core.pojo.Result;
|
||||
import com.leaper.web.service.sick.SickConnMap;
|
||||
import com.zhehekeji.core.util.Assert;
|
||||
import com.zhehekeji.web.pojo.IndexVO;
|
||||
import com.zhehekeji.web.service.sick.SickConnMap;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Api( tags = "传感器")
|
||||
@RequestMapping(value = "/sensor")
|
||||
@RestController()
|
||||
@ -0,0 +1,33 @@
|
||||
package com.zhehekeji.web.controller;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zhehekeji.common.util.ValidatorUtil;
|
||||
import com.zhehekeji.core.pojo.Result;
|
||||
import com.zhehekeji.web.entity.CheckLog;
|
||||
import com.zhehekeji.web.pojo.stock.CheckLogSearch;
|
||||
import com.zhehekeji.web.service.StockLogService;
|
||||
import com.zhehekeji.web.service.TestService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Api(tags = "盘点历史")
|
||||
@RequestMapping("/stockLog")
|
||||
@RestController
|
||||
public class StockLogController {
|
||||
|
||||
@Resource
|
||||
private StockLogService stockLogService;
|
||||
@Resource
|
||||
private ValidatorUtil validatorUtil;
|
||||
|
||||
@ApiOperation("盘点历史")
|
||||
@PostMapping("")
|
||||
public Result<PageInfo<CheckLog>> list(@RequestBody CheckLogSearch checkLogSearch){
|
||||
return Result.success(stockLogService.list(checkLogSearch));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,11 +1,11 @@
|
||||
package com.leaper.web.controller;
|
||||
package com.zhehekeji.web.controller;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.leaper.common.util.ValidatorUtil;
|
||||
import com.zhehekeji.common.util.ValidatorUtil;
|
||||
import com.zhehekeji.core.pojo.Result;
|
||||
import com.leaper.web.pojo.warn.WarnSearch;
|
||||
import com.leaper.web.pojo.warn.WarnVO;
|
||||
import com.leaper.web.service.WarnService;
|
||||
import com.zhehekeji.web.pojo.warn.WarnSearch;
|
||||
import com.zhehekeji.web.pojo.warn.WarnVO;
|
||||
import com.zhehekeji.web.service.WarnService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.web.entity;
|
||||
package com.zhehekeji.web.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.web.entity;
|
||||
package com.zhehekeji.web.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.web.entity;
|
||||
package com.zhehekeji.web.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.web.entity;
|
||||
package com.zhehekeji.web.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.web.entity;
|
||||
package com.zhehekeji.web.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
@ -0,0 +1,42 @@
|
||||
package com.zhehekeji.web.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@TableName
|
||||
@Data
|
||||
public class OrderLastMedia {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@TableField
|
||||
private String shelveId;
|
||||
|
||||
@TableField("`row`")
|
||||
private Integer row;
|
||||
|
||||
@TableField("`column`")
|
||||
private Integer column;
|
||||
|
||||
private String lastOrderNum;
|
||||
|
||||
// private String lastPutOrderNum;
|
||||
//
|
||||
// @ApiModelProperty("入库照片")
|
||||
// private String putPath;
|
||||
//
|
||||
// private String lastOutOrderNum;
|
||||
//
|
||||
// @ApiModelProperty("出库照片")
|
||||
// private String outPutPath;
|
||||
//
|
||||
//
|
||||
//
|
||||
// @ApiModelProperty("货位照片")
|
||||
// private String goodsPath;
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.web.entity;
|
||||
package com.zhehekeji.web.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.web.entity;
|
||||
package com.zhehekeji.web.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.web.entity;
|
||||
package com.zhehekeji.web.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.web.entity;
|
||||
package com.zhehekeji.web.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
@ -1,6 +1,6 @@
|
||||
package com.leaper.web.lib;
|
||||
package com.zhehekeji.web.lib;
|
||||
|
||||
import com.leaper.web.lib.joyware.NetSDKLib;
|
||||
import com.zhehekeji.web.lib.joyware.NetSDKLib;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -1,6 +1,6 @@
|
||||
package com.leaper.web.lib;
|
||||
package com.zhehekeji.web.lib;
|
||||
|
||||
import com.leaper.web.lib.joyware.NetSDKLib;
|
||||
import com.zhehekeji.web.lib.joyware.NetSDKLib;
|
||||
|
||||
public interface CameraControlLoginModule {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.web.lib;
|
||||
package com.zhehekeji.web.lib;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.leaper.web.lib;
|
||||
package com.zhehekeji.web.lib;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue