no message

main
奥德彪本彪\92525 2024-08-25 18:08:26 +08:00
parent 3766b2f940
commit 3f135b7633
9 changed files with 62 additions and 49 deletions

View File

@ -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;

View File

@ -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>

View File

@ -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 添加文件路径,方便 killkill `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);

View File

@ -20,6 +20,6 @@ public class BindStock {
String pointCode; String pointCode;
@ApiModelProperty(value = "箱号") @ApiModelProperty(value = "箱号")
List boxNumbers; List<String> boxNumbers;
} }

View File

@ -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();//点位编号

View File

@ -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();
} }

View File

@ -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);

View File

@ -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
**/ **/

View File

@ -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>