opt:优化
This commit is contained in:
@@ -114,6 +114,8 @@
|
|||||||
AND
|
AND
|
||||||
ext.pcsn LIKE #{param.pcsn}
|
ext.pcsn LIKE #{param.pcsn}
|
||||||
</if>
|
</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>
|
</where>
|
||||||
ORDER BY ext.create_time Desc
|
ORDER BY ext.create_time Desc
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -183,6 +183,10 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
|||||||
throw new BadRequestException("只有料桶缓存库区的料才能被叫料!");
|
throw new BadRequestException("只有料桶缓存库区的料才能被叫料!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isBlank(outStructAttr.getStoragevehicle_code())){
|
||||||
|
throw new BadRequestException("仓位【" + groupPlate.getStruct_code() + "】上没有料,无法叫料!");
|
||||||
|
}
|
||||||
|
|
||||||
List<SchBaseTask> taskList = taskService.list(new QueryWrapper<SchBaseTask>().lambda()
|
List<SchBaseTask> taskList = taskService.list(new QueryWrapper<SchBaseTask>().lambda()
|
||||||
.eq(SchBaseTask::getExt_task_code, dto.getTask_code()));
|
.eq(SchBaseTask::getExt_task_code, dto.getTask_code()));
|
||||||
|
|
||||||
@@ -478,13 +482,18 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
|||||||
throw new BadRequestException("设备" + dto.getDevice_code() + "不存在,请检验编码与LMS是否一致!");
|
throw new BadRequestException("设备" + dto.getDevice_code() + "不存在,请检验编码与LMS是否一致!");
|
||||||
}
|
}
|
||||||
String pointCode = point.getPoint_code();
|
String pointCode = point.getPoint_code();
|
||||||
|
|
||||||
|
if(StringUtils.isBlank(point.getVehicle_code())){
|
||||||
|
throw new BadRequestException("机台" + dto.getDevice_code() + "上不存在料桶,请核对!");
|
||||||
|
}
|
||||||
//根据料桶号去载具表匹配料桶类型
|
//根据料桶号去载具表匹配料桶类型
|
||||||
MdPbStoragevehicleinfo mdPbStoragevehicleinfo = iMdPbStoragevehicleinfoService.getByCode(point.getVehicle_code());
|
MdPbStoragevehicleinfo mdPbStoragevehicleinfo = iMdPbStoragevehicleinfoService.getByCode(point.getVehicle_code());
|
||||||
|
|
||||||
if (mdPbStoragevehicleinfo == null) {
|
if (mdPbStoragevehicleinfo == null) {
|
||||||
throw new BadRequestException("机台" + dto.getDevice_code() + "上的载具不存在!");
|
throw new BadRequestException("机台" + dto.getDevice_code() + "上不存在料桶,请核对!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//通过料桶号的料桶类型,匹配确认入库库区
|
//通过料桶号的料桶类型,匹配确认入库库区
|
||||||
Dict dict = dictService.getDictByCodeAndValue("storagevehicle_type", mdPbStoragevehicleinfo.getStoragevehicle_type());
|
Dict dict = dictService.getDictByCodeAndValue("storagevehicle_type", mdPbStoragevehicleinfo.getStoragevehicle_type());
|
||||||
if (dict == null) {
|
if (dict == null) {
|
||||||
@@ -536,6 +545,7 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
|||||||
param.put("material_id", materDao.getMaterial_code());
|
param.put("material_id", materDao.getMaterial_code());
|
||||||
param.put("material_code", materDao.getMaterial_code());
|
param.put("material_code", materDao.getMaterial_code());
|
||||||
param.put("pcsn", groupPlate.getPcsn());
|
param.put("pcsn", groupPlate.getPcsn());
|
||||||
|
param.put("group_id", groupPlate.getGroup_id());
|
||||||
param.put("qty", dto.getQty());
|
param.put("qty", dto.getQty());
|
||||||
param.put("qty_unit_name", groupPlate.getQty_unit_name());
|
param.put("qty_unit_name", groupPlate.getQty_unit_name());
|
||||||
param.put("stor_id", sectattr.getStor_id());
|
param.put("stor_id", sectattr.getStor_id());
|
||||||
|
|||||||
@@ -644,8 +644,8 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
//更新组盘表状态
|
//更新组盘表状态
|
||||||
mdPbGroupplateMapper.update(new GroupPlate(), new LambdaUpdateWrapper<GroupPlate>()
|
mdPbGroupplateMapper.update(new GroupPlate(), new LambdaUpdateWrapper<GroupPlate>()
|
||||||
.set(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库"))
|
.set(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库"))
|
||||||
.eq(GroupPlate::getStoragevehicle_code, whereJson.getString("storagevehicle_code"))
|
.set(GroupPlate::getQty,whereJson.getString("qty"))
|
||||||
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("组盘")));
|
.eq(GroupPlate::getGroup_id, whereJson.getString("group_id")));
|
||||||
|
|
||||||
return PdaResponse.requestOk();
|
return PdaResponse.requestOk();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,12 +177,6 @@ public class BackInTask extends AbstractTask {
|
|||||||
.set(SchBasePoint::getIos_id, null)
|
.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.setRemark("已完成");
|
||||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||||
|
|||||||
@@ -192,6 +192,7 @@ public class SeparateMaterialTask extends AbstractTask {
|
|||||||
pointService.update(new LambdaUpdateWrapper<SchBasePoint>()
|
pointService.update(new LambdaUpdateWrapper<SchBasePoint>()
|
||||||
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
|
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
|
||||||
.set(SchBasePoint::getPoint_status, "3")
|
.set(SchBasePoint::getPoint_status, "3")
|
||||||
|
.set(SchBasePoint::getIng_task_code,null)
|
||||||
.set(SchBasePoint::getVehicle_qty, 1)
|
.set(SchBasePoint::getVehicle_qty, 1)
|
||||||
.set(groupPlatesNotEmpty,SchBasePoint::getRemark,groupId)
|
.set(groupPlatesNotEmpty,SchBasePoint::getRemark,groupId)
|
||||||
.set(SchBasePoint::getUpdate_id, SecurityUtils.getCurrentUserId())
|
.set(SchBasePoint::getUpdate_id, SecurityUtils.getCurrentUserId())
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ public class MesManualBackMaterialRequestDto {
|
|||||||
@NotBlank(message = "设备号不可为空")
|
@NotBlank(message = "设备号不可为空")
|
||||||
private String device_code;
|
private String device_code;
|
||||||
|
|
||||||
@NotBlank(message = "料桶号不可为空")
|
|
||||||
private String vehicle_code;
|
private String vehicle_code;
|
||||||
|
|
||||||
private String material_code;
|
private String material_code;
|
||||||
@@ -17,7 +16,7 @@ public class MesManualBackMaterialRequestDto {
|
|||||||
private String pcsn;
|
private String pcsn;
|
||||||
|
|
||||||
private String qty_unit_name;
|
private String qty_unit_name;
|
||||||
|
|
||||||
private String qty;
|
private String qty;
|
||||||
|
|
||||||
private String supp_code;
|
private String supp_code;
|
||||||
|
|||||||
@@ -9,14 +9,13 @@ public class MesManualCallMaterialRequestDto {
|
|||||||
@NotBlank(message = "设备号不可为空")
|
@NotBlank(message = "设备号不可为空")
|
||||||
private String device_code;
|
private String device_code;
|
||||||
|
|
||||||
@NotBlank(message = "货位号不可为空")
|
|
||||||
private String struct_code;
|
private String struct_code;
|
||||||
|
|
||||||
@NotBlank(message = "物料编码不可为空")
|
|
||||||
private String material_code;
|
private String material_code;
|
||||||
|
|
||||||
private String vehicle_code;
|
private String vehicle_code;
|
||||||
|
|
||||||
|
|
||||||
private String storagevehicleext_id;
|
private String storagevehicleext_id;
|
||||||
|
|
||||||
private String pcsn;
|
private String pcsn;
|
||||||
@@ -29,12 +28,9 @@ public class MesManualCallMaterialRequestDto {
|
|||||||
|
|
||||||
private String task_code;
|
private String task_code;
|
||||||
|
|
||||||
@NotBlank(message = "任务类型不可为空")
|
|
||||||
private String task_type;
|
private String task_type;
|
||||||
|
|
||||||
@NotBlank(message = "供应商编码不可为空")
|
|
||||||
private String supp_code;
|
private String supp_code;
|
||||||
@NotBlank(message = "供应商名称不可为空")
|
|
||||||
private String supp_name;
|
private String supp_name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user