no message

main
暴炳林 2025-07-14 14:28:26 +08:00
parent 73e87a20d3
commit 7c4a152594
5 changed files with 16 additions and 6 deletions

View File

@ -15,6 +15,7 @@
*/
package com.youchain.basicdata.repository;
import com.youchain.basicdata.domain.Item;
import com.youchain.basicdata.domain.LampLog;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.data.jpa.repository.JpaRepository;
@ -29,5 +30,6 @@ import java.util.List;
* @date 2023-11-14
**/
public interface LampLogRepository extends JpaRepository<LampLog, Long>, JpaSpecificationExecutor<LampLog> {
@Query(value = "SELECT l FROM LampLog l WHERE l.id=?1")
LampLog findId(Long id);
}

View File

@ -104,7 +104,7 @@ public class LampLogServiceImpl implements LampLogService {
lampLog.setOperationType("入库门");
lampLog.setRequestContent(rc);
lampLogRepository.save(lampLog);
// LampLog lampLog=lampLogRepository.getById(41739l);
// LampLog lampLog=lampLogRepository.findId(41913l);
return lampLog;
}

View File

@ -127,7 +127,7 @@ public class TaskServiceImpl implements TaskService {
public void deleteAll(Long[] ids) {
for (Long id : ids) {
Task task=taskRepository.getById(id);
if (task.getAgvTask()!=null){
if (task.getAgvTask()!=null&&!task.getAgvTask().getStatus().equals(BizStatus.UNUSUAL)){
throw new BadRequestException(HttpStatus.NOT_IMPLEMENTED, "ID:"+id+"已生成任务,请先取消入库");
}
if (task.getAsnDetail()!=null){
@ -336,7 +336,7 @@ public class TaskServiceImpl implements TaskService {
}
String propC1=rfid.substring(9, 11);
String propC2=rfid.substring(11, 13);
String propC3=rfid.substring(13, 19);// 系统单号
String propC3=rfid.substring(13, 19);// 计划单号
List<AsnDetail> asnDetailList=asnDetailRepository.findByItem(itemCode);
if(asnDetailList.size()<1){
return ApiResult.fail(500,"收货单中没有对应物料或入库单未激活",null);
@ -535,6 +535,14 @@ public class TaskServiceImpl implements TaskService {
pointEnd.setStorageType(storageType);
}
pointRepository.save(pointEnd);
/* 如果為成品區入库,先绑定容器*/
if (billTypeCode.equals(BizStatus.FC_RK)) {
AgvTask agvTask = addAgvTask(BizStatus.AGV_R, storageType, null, pointStart.getCode(), BizStatus.OPEN, BizStatus.ASN);
JSONObject resultJson = JSONObject.parseObject(sendAgvTaskImpl(agvTask));
if (!resultJson.getString("code").equals("0")) {
throw new BadRequestException("容器入场失败" + resultJson);
}
}
/*更新入库单状态*/
asnDetailService.receivingAsnDetail(asnDetail);

View File

@ -15,7 +15,7 @@ spring:
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://${DB_HOST:youchain-mysql}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
username: ${DB_USER:root}
password: ${DB_PWD:123456}
password: ${DB_PWD:Zncc@668108}
# password: ${DB_PWD:Youchain@56}
# 初始连接数
initial-size: 5

View File

@ -6,7 +6,7 @@ spring:
freemarker:
check-template-location: false
profiles:
active: dev
active: dock
jackson:
time-zone: GMT+8
data: