opt:优化

This commit is contained in:
2025-11-05 10:52:30 +08:00
parent 68b2fe0199
commit 59985b602c
7 changed files with 18 additions and 16 deletions

View File

@@ -114,6 +114,8 @@
AND
ext.pcsn LIKE #{param.pcsn}
</if>
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.task_status <![CDATA[ < ]]> '5'
AND t.is_delete = '0' AND (t.vehicle_code = ext.storagevehicle_code OR t.vehicle_code2 = ext.storagevehicle_code))
</where>
ORDER BY ext.create_time Desc
</select>

View File

@@ -183,6 +183,10 @@ public class MesToWmsServiceImpl implements MesToWmsService {
throw new BadRequestException("只有料桶缓存库区的料才能被叫料!");
}
if(StringUtils.isBlank(outStructAttr.getStoragevehicle_code())){
throw new BadRequestException("仓位【" + groupPlate.getStruct_code() + "】上没有料,无法叫料!");
}
List<SchBaseTask> taskList = taskService.list(new QueryWrapper<SchBaseTask>().lambda()
.eq(SchBaseTask::getExt_task_code, dto.getTask_code()));
@@ -478,13 +482,18 @@ public class MesToWmsServiceImpl implements MesToWmsService {
throw new BadRequestException("设备" + dto.getDevice_code() + "不存在,请检验编码与LMS是否一致");
}
String pointCode = point.getPoint_code();
if(StringUtils.isBlank(point.getVehicle_code())){
throw new BadRequestException("机台" + dto.getDevice_code() + "上不存在料桶,请核对!");
}
//根据料桶号去载具表匹配料桶类型
MdPbStoragevehicleinfo mdPbStoragevehicleinfo = iMdPbStoragevehicleinfoService.getByCode(point.getVehicle_code());
if (mdPbStoragevehicleinfo == null) {
throw new BadRequestException("机台" + dto.getDevice_code() + "的载具不存在!");
throw new BadRequestException("机台" + dto.getDevice_code() + "不存在料桶,请核对!");
}
//通过料桶号的料桶类型,匹配确认入库库区
Dict dict = dictService.getDictByCodeAndValue("storagevehicle_type", mdPbStoragevehicleinfo.getStoragevehicle_type());
if (dict == null) {
@@ -536,6 +545,7 @@ public class MesToWmsServiceImpl implements MesToWmsService {
param.put("material_id", materDao.getMaterial_code());
param.put("material_code", materDao.getMaterial_code());
param.put("pcsn", groupPlate.getPcsn());
param.put("group_id", groupPlate.getGroup_id());
param.put("qty", dto.getQty());
param.put("qty_unit_name", groupPlate.getQty_unit_name());
param.put("stor_id", sectattr.getStor_id());

View File

@@ -644,8 +644,8 @@ public class PdaIosInServiceImpl implements PdaIosInService {
//更新组盘表状态
mdPbGroupplateMapper.update(new GroupPlate(), new LambdaUpdateWrapper<GroupPlate>()
.set(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库"))
.eq(GroupPlate::getStoragevehicle_code, whereJson.getString("storagevehicle_code"))
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("组盘")));
.set(GroupPlate::getQty,whereJson.getString("qty"))
.eq(GroupPlate::getGroup_id, whereJson.getString("group_id")));
return PdaResponse.requestOk();
}

View File

@@ -177,12 +177,6 @@ public class BackInTask extends AbstractTask {
.set(SchBasePoint::getIos_id, null)
);
//更新组盘表
iMdPbGroupplateService.update(new GroupPlate(), new LambdaUpdateWrapper<GroupPlate>()
.set(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库"))
.eq(GroupPlate::getStoragevehicle_code, taskObj.getVehicle_code())
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("组盘")));
// 更新任务
taskObj.setRemark("已完成");
taskObj.setTask_status(TaskStatus.FINISHED.getCode());

View File

@@ -192,6 +192,7 @@ public class SeparateMaterialTask extends AbstractTask {
pointService.update(new LambdaUpdateWrapper<SchBasePoint>()
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
.set(SchBasePoint::getPoint_status, "3")
.set(SchBasePoint::getIng_task_code,null)
.set(SchBasePoint::getVehicle_qty, 1)
.set(groupPlatesNotEmpty,SchBasePoint::getRemark,groupId)
.set(SchBasePoint::getUpdate_id, SecurityUtils.getCurrentUserId())

View File

@@ -9,7 +9,6 @@ public class MesManualBackMaterialRequestDto {
@NotBlank(message = "设备号不可为空")
private String device_code;
@NotBlank(message = "料桶号不可为空")
private String vehicle_code;
private String material_code;
@@ -17,7 +16,7 @@ public class MesManualBackMaterialRequestDto {
private String pcsn;
private String qty_unit_name;
private String qty;
private String supp_code;

View File

@@ -9,14 +9,13 @@ public class MesManualCallMaterialRequestDto {
@NotBlank(message = "设备号不可为空")
private String device_code;
@NotBlank(message = "货位号不可为空")
private String struct_code;
@NotBlank(message = "物料编码不可为空")
private String material_code;
private String vehicle_code;
private String storagevehicleext_id;
private String pcsn;
@@ -29,12 +28,9 @@ public class MesManualCallMaterialRequestDto {
private String task_code;
@NotBlank(message = "任务类型不可为空")
private String task_type;
@NotBlank(message = "供应商编码不可为空")
private String supp_code;
@NotBlank(message = "供应商名称不可为空")
private String supp_name;
/**