Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -119,8 +119,9 @@ public class NotCarToWmsServiceImpl implements NotCarToWmsService {
|
||||
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
||||
try {
|
||||
if (tryLock) {
|
||||
|
||||
|
||||
JSONObject data = whereJson.getJSONObject("data");
|
||||
String statusType = data.getString("statusType");
|
||||
// 前往点位
|
||||
} else {
|
||||
log.info("无人车到达输出参数:{}", NoCarResponse.requestError("当前任务正在执行中,请稍后在试...").toString());
|
||||
return NoCarResponse.requestError("当前任务正在执行中,请稍后在试...");
|
||||
@@ -130,7 +131,7 @@ public class NotCarToWmsServiceImpl implements NotCarToWmsService {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
log.info("无人车到达输出参数:{}", NoCarResponse.responseOk().toString());
|
||||
// log.info("无人车到达输出参数:{}", NoCarResponse.responseOk().toString());
|
||||
return NoCarResponse.responseOk();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.pda.general_management.service.NotCarService;
|
||||
import org.nl.wms.pda.general_management.service.PdaNotCarService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -27,10 +27,10 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/notCar")
|
||||
@Slf4j
|
||||
public class NotCarController {
|
||||
public class PdaNotCarController {
|
||||
|
||||
@Autowired
|
||||
private NotCarService notCarService;
|
||||
private PdaNotCarService notCarService;
|
||||
|
||||
@PostMapping("/queryXhRegion")
|
||||
@Log("无人车卸货 - 查询卸货区下拉框")
|
||||
@@ -11,7 +11,7 @@ import org.nl.wms.pda.util.PdaResponse;
|
||||
* @author Liuxy
|
||||
* @since 2026-01-06
|
||||
*/
|
||||
public interface NotCarService {
|
||||
public interface PdaNotCarService {
|
||||
|
||||
/**
|
||||
* 无人车卸货 - 查询卸货区下拉框
|
||||
@@ -261,6 +261,7 @@ public class PdaCommonServiceImpl implements PdaCommonService {
|
||||
List<String> pointCodeList = pointDaoList.stream()
|
||||
.map(SchBasePoint::getPoint_code)
|
||||
.collect(Collectors.toList());
|
||||
pointCodeList.add(IOSConstant.AGVZJZ001);
|
||||
|
||||
// 查询当前正在执行的任务
|
||||
List<SchBaseTask> taskList = taskService.list(
|
||||
@@ -279,7 +280,7 @@ public class PdaCommonServiceImpl implements PdaCommonService {
|
||||
json.put("vehicle_qty", pointDao.getVehicle_qty());
|
||||
// 查询待堆叠数量
|
||||
List<SchBaseTask> collectQtyList = taskList.stream()
|
||||
.filter(row -> row.getPoint_code2().equals(pointDao.getPoint_code()))
|
||||
.filter(row -> row.getPoint_code3().equals(pointDao.getPoint_code()))
|
||||
.collect(Collectors.toList());
|
||||
json.put("execution_task", ObjectUtil.isNotEmpty(collectQtyList) ? collectQtyList.size() : 0);
|
||||
// 计算剩余可堆叠数量
|
||||
@@ -312,7 +313,8 @@ public class PdaCommonServiceImpl implements PdaCommonService {
|
||||
// 生成任务
|
||||
JSONObject jsonTask = new JSONObject();
|
||||
jsonTask.put("point_code1", whereJson.getString("point_code"));
|
||||
jsonTask.put("point_code2", row.getString("point_code"));
|
||||
jsonTask.put("point_code2", IOSConstant.AGVZJZ001);
|
||||
jsonTask.put("point_code3", row.getString("point_code"));
|
||||
empStackPlatesTask.create(jsonTask);
|
||||
return PdaResponse.requestOk();
|
||||
}
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
package org.nl.wms.pda.general_management.service.impl;
|
||||
|
||||
import cn.hutool.http.HttpStatus;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.JSONObjectOf;
|
||||
import org.nl.wms.ext.service.WmsToNotCarService;
|
||||
import org.nl.wms.ext.util.BaseResponse;
|
||||
import org.nl.wms.pda.general_management.service.NotCarService;
|
||||
import org.nl.wms.pda.general_management.service.PdaNotCarService;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
import org.nl.wms.sch_manage.service.ISchBaseRegionService;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
||||
@@ -31,7 +28,7 @@ import java.util.List;
|
||||
* @since 2026-01-06
|
||||
*/
|
||||
@Service
|
||||
public class NotCarServiceImpl implements NotCarService {
|
||||
public class PdaNotCarServiceImpl implements PdaNotCarService {
|
||||
|
||||
/**
|
||||
* 区域服务
|
||||
@@ -127,7 +124,7 @@ public class NotCarServiceImpl implements NotCarService {
|
||||
.eq(SchBasePoint::getRegion_code, region_code)
|
||||
.eq(SchBasePoint::getIs_used, IOSConstant.ONE)
|
||||
.and(row -> row.isNull(SchBasePoint::getIng_task_code)
|
||||
.or().eq(SchBasePoint::getIng_task_code,"")
|
||||
.or().eq(SchBasePoint::getIng_task_code, "")
|
||||
)
|
||||
.orderByAsc(SchBasePoint::getPoint_code)
|
||||
);
|
||||
@@ -192,8 +192,9 @@ public class PdaPackagingServiceImpl implements PdaPackagingService {
|
||||
jsonTask.put("point_code1", whereJson.getString("point_code"));
|
||||
// 判断点位是否需要二次配送
|
||||
SchBasePoint endPoint = iSchBasePointService.getById(whereJson.getString("in_point_code"));
|
||||
jsonTask.put("point_code2", endPoint.getIs_auto() ? whereJson.getString("in_point_code") : IOSConstant.AGVZJZ001);
|
||||
jsonTask.put("point_code3", whereJson.getString("in_point_code"));
|
||||
jsonTask.put("point_code2", IOSConstant.AGVZJZ001);
|
||||
jsonTask.put("point_code3", endPoint.getIs_auto() ? whereJson.getString("in_point_code") : "");
|
||||
jsonTask.put("point_code4", whereJson.getString("in_point_code"));
|
||||
jsonTask.put("material_id", rows.get(0).getString("material_id"));
|
||||
jsonTask.put("material_qty", whereJson.getString("total_qty"));
|
||||
packagingMiddleTask.create(jsonTask);
|
||||
|
||||
@@ -51,6 +51,11 @@
|
||||
AND
|
||||
pack.point_code = #{param.out_point}
|
||||
</if>
|
||||
|
||||
<if test="param.material_code != null and param.material_code != ''">
|
||||
AND
|
||||
mater.material_code = #{param.material_code}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY pack.create_time Desc
|
||||
</select>
|
||||
|
||||
@@ -56,6 +56,7 @@ public class EmpStackPlatesTask extends AbstractTask {
|
||||
task.setConfig_code(EmpStackPlatesTask.class.getSimpleName());
|
||||
task.setPoint_code1(json.getString("point_code1"));
|
||||
task.setPoint_code2(json.getString("point_code2"));
|
||||
task.setPoint_code3(json.getString("point_code3"));
|
||||
task.setVehicle_code(json.getString("vehicle_code"));
|
||||
task.setMaterial_id(json.getString("material_id"));
|
||||
task.setMaterial_qty(json.getBigDecimal("material_qty"));
|
||||
@@ -144,10 +145,20 @@ public class EmpStackPlatesTask extends AbstractTask {
|
||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||
taskObj.setRemark("已完成");
|
||||
taskService.updateById(taskObj);
|
||||
// 更新当前点位载具数量
|
||||
SchBasePoint pointDao = iSchBasePointService.getById(taskObj.getPoint_code2());
|
||||
pointDao.setVehicle_qty(NumberUtil.add(pointDao.getVehicle_qty(), Integer.valueOf(1)).intValue());
|
||||
iSchBasePointService.updateById(pointDao);
|
||||
// 判断是否是中间站点
|
||||
if (taskObj.getPoint_code2().equals(IOSConstant.AGVZJZ001)) {
|
||||
// 生成二段任务
|
||||
JSONObject jsonTask = new JSONObject();
|
||||
jsonTask.put("point_code1", IOSConstant.AGVZJZ001);
|
||||
jsonTask.put("point_code2", taskObj.getPoint_code3());
|
||||
jsonTask.put("point_code3", taskObj.getPoint_code3());
|
||||
this.create(jsonTask);
|
||||
} else {
|
||||
// 更新当前点位载具数量
|
||||
SchBasePoint pointDao = iSchBasePointService.getById(taskObj.getPoint_code3());
|
||||
pointDao.setVehicle_qty(NumberUtil.add(pointDao.getVehicle_qty(), Integer.valueOf(1)).intValue());
|
||||
iSchBasePointService.updateById(pointDao);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
||||
@@ -57,6 +57,7 @@ public class PackagingMiddleTask extends AbstractTask {
|
||||
task.setPoint_code1(json.getString("point_code1"));
|
||||
task.setPoint_code2(json.getString("point_code2"));
|
||||
task.setPoint_code3(json.getString("point_code3"));
|
||||
task.setPoint_code4(json.getString("point_code4"));
|
||||
task.setVehicle_code(json.getString("vehicle_code"));
|
||||
task.setMaterial_id(json.getString("material_id"));
|
||||
task.setMaterial_qty(json.getBigDecimal("material_qty"));
|
||||
@@ -145,12 +146,36 @@ public class PackagingMiddleTask extends AbstractTask {
|
||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||
taskObj.setRemark("已完成");
|
||||
taskService.updateById(taskObj);
|
||||
// 跟更新库存点位
|
||||
iMdPdmPackagingService.update(
|
||||
new UpdateWrapper<MdPdmPackaging>().lambda()
|
||||
.eq(MdPdmPackaging::getPoint_code, taskObj.getPoint_code1())
|
||||
.set(MdPdmPackaging::getPoint_code, taskObj.getPoint_code3())
|
||||
);
|
||||
if (taskObj.getPoint_code2().equals(IOSConstant.AGVZJZ001)) {
|
||||
// 判断point_code3是否有值
|
||||
if (ObjectUtil.isEmpty(taskObj.getPoint_code3())) {
|
||||
// 更新库存
|
||||
iMdPdmPackagingService.update(
|
||||
new UpdateWrapper<MdPdmPackaging>().lambda()
|
||||
.eq(MdPdmPackaging::getPoint_code, taskObj.getPoint_code1())
|
||||
.set(MdPdmPackaging::getPoint_code, taskObj.getPoint_code4())
|
||||
);
|
||||
} else {
|
||||
// 生成任务
|
||||
JSONObject jsonTask = new JSONObject();
|
||||
jsonTask.put("point_code1", IOSConstant.AGVZJZ001);
|
||||
jsonTask.put("point_code2", taskObj.getPoint_code3());
|
||||
// 储存第一条任务的起点
|
||||
jsonTask.put("point_code3", taskObj.getPoint_code1());
|
||||
// 储存最终终点
|
||||
jsonTask.put("point_code4", taskObj.getPoint_code3());
|
||||
jsonTask.put("material_id", taskObj.getMaterial_id());
|
||||
jsonTask.put("material_qty", taskObj.getMaterial_qty());
|
||||
this.create(jsonTask);
|
||||
}
|
||||
} else {
|
||||
// 更新库存
|
||||
iMdPdmPackagingService.update(
|
||||
new UpdateWrapper<MdPdmPackaging>().lambda()
|
||||
.eq(MdPdmPackaging::getPoint_code, taskObj.getPoint_code3())
|
||||
.set(MdPdmPackaging::getPoint_code, taskObj.getPoint_code4())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
||||
@@ -290,7 +290,7 @@ export default {
|
||||
LODOP.SET_PRINT_STYLEA(0, 'FontSize', 10)
|
||||
LODOP.ADD_PRINT_TEXT('37.17mm', '4.74mm', '42.44mm', '5.69mm', '物 料 批 号 及 代 码')
|
||||
LODOP.SET_PRINT_STYLEA(0, 'FontSize', 10)
|
||||
LODOP.ADD_PRINT_TEXT('40.9mm', '4.74mm', '86.1mm', '5.69mm', 'Material Batch No. and Code: ' + row.pcsn + '')
|
||||
LODOP.ADD_PRINT_TEXT('40.9mm', '4.74mm', '86.1mm', '5.69mm', 'Material Batch No. and Code: ' + row.pcsn + '-' + row.material_code)
|
||||
LODOP.ADD_PRINT_TEXT('46.78mm', '4.47mm', '41.65mm', '5.69mm', '桶 号 Barrel No.: ' + row.bucket_code + '')
|
||||
LODOP.ADD_PRINT_TEXT('46.78mm', '48.13mm', '43.5mm', '5.69mm', '皮 重 Tare Weight: ' + row.bucket_weight + '')
|
||||
LODOP.ADD_PRINT_TEXT('51.81mm', '48.13mm', '44.03mm', '5.69mm', '总 重 Total Weight: ')
|
||||
|
||||
@@ -362,7 +362,7 @@ export default {
|
||||
LODOP.SET_PRINT_STYLEA(0, 'FontSize', 8)
|
||||
LODOP.ADD_PRINT_TEXT('31.64mm', '4.87mm', '87.95mm', '5.69mm', '物 料 名 称 Material Name: ' + row.material_name + '')
|
||||
LODOP.ADD_PRINT_TEXT('37.17mm', '4.74mm', '42.44mm', '5.69mm', '物 料 批 号 及 代 码')
|
||||
LODOP.ADD_PRINT_TEXT('40.9mm', '4.74mm', '86.1mm', '5.69mm', 'Material Batch No. and Code: ' + row.pcsn + '')
|
||||
LODOP.ADD_PRINT_TEXT('40.9mm', '4.74mm', '86.1mm', '5.69mm', 'Material Batch No. and Code: ' + row.pcsn + '-' + row.material_code)
|
||||
LODOP.ADD_PRINT_TEXT('46.78mm', '4.47mm', '27.09mm', '5.69mm', '有 效 期 至 口')
|
||||
LODOP.ADD_PRINT_TEXT('46.78mm', '47.33mm', '27.62mm', '5.69mm', '复 验 期 至 口')
|
||||
LODOP.ADD_PRINT_TEXT('51.01mm', '47.33mm', '21.54mm', '5.69mm', 'Expory Date')
|
||||
|
||||
Reference in New Issue
Block a user