no message
parent
3766b2f940
commit
3f135b7633
|
|
@ -16,10 +16,10 @@
|
||||||
package com.youchain.aspect;
|
package com.youchain.aspect;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.youchain.utils.RequestHolder;
|
|
||||||
import com.youchain.utils.StringUtils;
|
|
||||||
import com.youchain.annotation.Limit;
|
import com.youchain.annotation.Limit;
|
||||||
import com.youchain.exception.BadRequestException;
|
import com.youchain.exception.BadRequestException;
|
||||||
|
import com.youchain.utils.RequestHolder;
|
||||||
|
import com.youchain.utils.StringUtils;
|
||||||
import org.aspectj.lang.ProceedingJoinPoint;
|
import org.aspectj.lang.ProceedingJoinPoint;
|
||||||
import org.aspectj.lang.annotation.Around;
|
import org.aspectj.lang.annotation.Around;
|
||||||
import org.aspectj.lang.annotation.Aspect;
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
|
|
@ -31,6 +31,7 @@ import org.springframework.data.redis.core.RedisTemplate;
|
||||||
import org.springframework.data.redis.core.script.DefaultRedisScript;
|
import org.springframework.data.redis.core.script.DefaultRedisScript;
|
||||||
import org.springframework.data.redis.core.script.RedisScript;
|
import org.springframework.data.redis.core.script.RedisScript;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,14 @@
|
||||||
<skipTests>true</skipTests>
|
<skipTests>true</skipTests>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>8</source>
|
||||||
|
<target>8</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2020 Zheng Jie
|
* Copyright 2019-2020 Jie
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -15,24 +15,17 @@
|
||||||
*/
|
*/
|
||||||
package com.youchain;
|
package com.youchain;
|
||||||
|
|
||||||
import cn.hutool.json.JSONUtil;
|
|
||||||
import com.youchain.annotation.rest.AnonymousGetMapping;
|
import com.youchain.annotation.rest.AnonymousGetMapping;
|
||||||
import com.youchain.modules.license.LicenseValidate;
|
|
||||||
import com.youchain.modules.system.service.ApiDictService;
|
|
||||||
import com.youchain.utils.SpringContextHolder;
|
import com.youchain.utils.SpringContextHolder;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
|
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
|
||||||
import org.springframework.boot.context.ApplicationPidFileWriter;
|
import org.springframework.boot.context.ApplicationPidFileWriter;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
|
||||||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
||||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
|
||||||
import org.springframework.scheduling.annotation.EnableAsync;
|
import org.springframework.scheduling.annotation.EnableAsync;
|
||||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
@ -55,8 +48,6 @@ public class AppRun {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication springApplication = new SpringApplication(AppRun.class);
|
SpringApplication springApplication = new SpringApplication(AppRun.class);
|
||||||
// 监控应用的PID,启动时可指定PID路径:--spring.pid.file=/home/eladmin/app.pid
|
|
||||||
// 或者在 application.yml 添加文件路径,方便 kill,kill `cat /home/eladmin/app.pid`
|
|
||||||
springApplication.addListeners(new ApplicationPidFileWriter());
|
springApplication.addListeners(new ApplicationPidFileWriter());
|
||||||
springApplication.addListeners(new MyApiDictListener());
|
springApplication.addListeners(new MyApiDictListener());
|
||||||
springApplication.run(args);
|
springApplication.run(args);
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,6 @@ public class BindStock {
|
||||||
String pointCode;
|
String pointCode;
|
||||||
|
|
||||||
@ApiModelProperty(value = "箱号")
|
@ApiModelProperty(value = "箱号")
|
||||||
List boxNumbers;
|
List<String> boxNumbers;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ public class BydAppController {
|
||||||
@AnonymousAccess
|
@AnonymousAccess
|
||||||
public ResponseEntity<Object> materialIn(@RequestBody BindStock bindStock) {
|
public ResponseEntity<Object> materialIn(@RequestBody BindStock bindStock) {
|
||||||
try {
|
try {
|
||||||
//P:A17A;V:148795;M:10441666-00/PCS;B:240512JFET;Lot:20240427;S:124051200181132;PO:5913490946/00020;Q:36/20/32;D:2024-04-27;SN:;YX:2025-04-26;DN:D12405120005031AS
|
//P:A17A;V:148795;M:10441666-00/PCS;B:240512;Lot:20240427;S:124051200181132;PO:5913490946/00020;Q:36/20/32;D:2024-04-27;SN:;YX:2025-04-26;DN:D12405120005031AS
|
||||||
String stockCode = bindStock.getStockCode();//容器编号
|
String stockCode = bindStock.getStockCode();//容器编号
|
||||||
List<String> boxNumbers = bindStock.getBoxNumbers();//箱号集合
|
List<String> boxNumbers = bindStock.getBoxNumbers();//箱号集合
|
||||||
String pointCode = bindStock.getPointCode();//点位编号
|
String pointCode = bindStock.getPointCode();//点位编号
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2020 Zheng Jie
|
* Copyright 2019-2020 Jie
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -97,25 +97,20 @@ public interface StockService {
|
||||||
/**
|
/**
|
||||||
* dto转实体
|
* dto转实体
|
||||||
*
|
*
|
||||||
* @param stockDto
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Stock toEntity(StockDto stockDto);
|
Stock toEntity(StockDto stockDto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有数据不分页
|
* 查询所有数据不分页
|
||||||
*
|
*
|
||||||
* @param code 条件参数
|
* @param code 编号
|
||||||
* @return List<Stock>
|
|
||||||
*/
|
*/
|
||||||
List<Stock> findByKyStockList(String code);
|
List<Stock> findByKyStockList(String code);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据code查找容器
|
|
||||||
*
|
*
|
||||||
* @param code
|
* @param code 容器
|
||||||
* @param status
|
* @param status 状态
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Stock findByCode(String code, String status);
|
Stock findByCode(String code, String status);
|
||||||
|
|
||||||
|
|
@ -124,89 +119,94 @@ public interface StockService {
|
||||||
/**
|
/**
|
||||||
* 容器入场JSON
|
* 容器入场JSON
|
||||||
*
|
*
|
||||||
* @param containerCode
|
* @param containerCode 容器
|
||||||
* @param position
|
* @param position 点位
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String containerInJson(String containerCode, String position);
|
String containerInJson(String containerCode, String position);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 容器出场JSON
|
* 容器出场JSON
|
||||||
*
|
*
|
||||||
* @param containerCode-容器编号
|
* @param containerCode 容器
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String containerOutJson(String containerCode);
|
String containerOutJson(String containerCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 容器入场
|
* 容器入场
|
||||||
*
|
*
|
||||||
* @param containerCode
|
* @param containerCode 容器
|
||||||
* @param position
|
* @param position 点位
|
||||||
*/
|
*/
|
||||||
void containerIn(String containerCode, String position);
|
void containerIn(String containerCode, String position);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 容器出场
|
* 容器出场
|
||||||
*
|
*
|
||||||
* @param containerCode
|
* @param containerCode 容器
|
||||||
*/
|
*/
|
||||||
void containerOut(String containerCode);
|
void containerOut(String containerCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务放行
|
* 任务放行
|
||||||
*
|
*
|
||||||
* @param Code
|
* @param Code 编号
|
||||||
*/
|
*/
|
||||||
void operationFeedback(String Code);
|
void operationFeedback(String Code);
|
||||||
|
|
||||||
|
|
||||||
Map<String, Stock> findByCodes(Set stockCodes);
|
/**
|
||||||
|
* 批量查询箱号
|
||||||
|
* @param stockCodes 箱号集合
|
||||||
|
*/
|
||||||
|
Map<String, Stock> findByCodes(Set<String> stockCodes);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原材料入库
|
* 原材料入库
|
||||||
*
|
*
|
||||||
* @param stockCode
|
* @param stockCode 托盘
|
||||||
* @param boxNumbers
|
* @param boxNumbers 箱号
|
||||||
* @param pointCode
|
* @param pointCode 点位
|
||||||
*/
|
*/
|
||||||
void materialIn(String stockCode, List boxNumbers, String pointCode);
|
void materialIn(String stockCode, List<String> boxNumbers, String pointCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扫描托盘
|
* 扫描托盘
|
||||||
*
|
*
|
||||||
* @param stockCode
|
* @param stockCode 托盘
|
||||||
*/
|
*/
|
||||||
ReturnTaskVo scanStock(String stockCode);
|
ReturnTaskVo scanStock(String stockCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 翻包拣货
|
* 翻包拣货
|
||||||
*
|
*
|
||||||
* @param taskId
|
* @param taskId 任务ID
|
||||||
* @param orderNumber
|
* @param orderNumber 箱号
|
||||||
* @param dstStockCode
|
* @param dstStockCode 目标托盘
|
||||||
*/
|
*/
|
||||||
void fbPicking(Long taskId, String orderNumber, String dstStockCode);
|
void fbPicking(Long taskId, String orderNumber, String dstStockCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搬运任务
|
* 搬运任务
|
||||||
*
|
*
|
||||||
* @param transTask
|
* @param transTask 搬运任务
|
||||||
*/
|
*/
|
||||||
void moveStock(TransTask transTask);
|
void moveStock(TransTask transTask);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解绑容器
|
* 解绑容器
|
||||||
* @param stockCode
|
* @param stockCode 容器
|
||||||
*/
|
*/
|
||||||
void unBindContainer(String stockCode);
|
void unBindContainer(String stockCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下发叫料任务
|
* 下发叫料任务
|
||||||
* @param pick
|
* @param pick 出库单
|
||||||
*/
|
*/
|
||||||
void callJlTask(Pick pick);
|
void callJlTask(Pick pick);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息推送
|
||||||
|
*/
|
||||||
String stockMsg();
|
String stockMsg();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2020 Zheng Jie
|
* Copyright 2019-2020 Jie
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -60,7 +60,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author liuxue
|
* @author liuxue
|
||||||
* @website https://eladmin.vip
|
* @website <a href="https://eladmin.vip">...</a>
|
||||||
* @description 服务实现
|
* @description 服务实现
|
||||||
* @date 2023-07-28
|
* @date 2023-07-28
|
||||||
**/
|
**/
|
||||||
|
|
@ -261,7 +261,7 @@ public class StockServiceImpl implements StockService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void materialIn(String stockCode, List boxNumbers, String pointCode) {
|
public void materialIn(String stockCode, List<String> boxNumbers, String pointCode) {
|
||||||
/**验证容器*/
|
/**验证容器*/
|
||||||
Stock stock = validateStock(stockCode);
|
Stock stock = validateStock(stockCode);
|
||||||
|
|
||||||
|
|
@ -840,7 +840,7 @@ public class StockServiceImpl implements StockService {
|
||||||
private void updateStockAndPoints(Stock stock, Point srcPoint, Point endPoint) {
|
private void updateStockAndPoints(Stock stock, Point srcPoint, Point endPoint) {
|
||||||
stock.setStatus(BaseStatus.USED);
|
stock.setStatus(BaseStatus.USED);
|
||||||
stock.setPoint(srcPoint);
|
stock.setPoint(srcPoint);
|
||||||
update(stock);
|
stockRepository.save(stock);
|
||||||
|
|
||||||
endPoint.setStatus(BaseStatus.USED);
|
endPoint.setStatus(BaseStatus.USED);
|
||||||
pointRepository.save(endPoint);
|
pointRepository.save(endPoint);
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author huojin
|
* @author huojin
|
||||||
* @website https://eladmin.vip
|
* @website <a href="https://eladmin.vip">...</a>
|
||||||
* @description /
|
* @description /
|
||||||
* @date 2024-06-11
|
* @date 2024-06-11
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="jpa" name="JPA">
|
||||||
|
<configuration>
|
||||||
|
<setting name="validation-enabled" value="true" />
|
||||||
|
<setting name="provider-name" value="Hibernate" />
|
||||||
|
<datasource-mapping />
|
||||||
|
<naming-strategy-map />
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
Loading…
Reference in New Issue