fix:叫料
This commit is contained in:
@@ -153,10 +153,6 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
||||
throw new BadRequestException("设备【" + pointCode + "】不存在!");
|
||||
}
|
||||
|
||||
if(StringUtils.isBlank(outPoint.getVehicle_code())){
|
||||
throw new BadRequestException("设备【" + pointCode + "】不存在料桶,请核对!");
|
||||
}
|
||||
|
||||
if(!"1".equals(outPoint.getPoint_type())){
|
||||
throw new BadRequestException("设备【" + dto.getStruct_code() + "】有误,请传入作业区设备!");
|
||||
}
|
||||
@@ -200,6 +196,11 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
||||
if (ObjectUtil.isEmpty(groupPlate)) {
|
||||
throw new BadRequestException("托盘[" + outStructAttr.getStoragevehicle_code() + "]组盘信息不存在!");
|
||||
}
|
||||
|
||||
if(!"1".equals(outPoint.getPoint_status())){
|
||||
throw new BadRequestException("设备【" + dto.getStruct_code() + "】有托盘或有料,请执行下空桶上满料!");
|
||||
}
|
||||
|
||||
// 1、创建出库单、明细、分配明细
|
||||
JSONObject insertInvObj = new JSONObject();
|
||||
JSONArray tableData = new JSONArray();
|
||||
@@ -272,6 +273,11 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
||||
outBillService.allSetPoint(taskParam);
|
||||
return MesResponse.requestOk();
|
||||
} else if("2".equals(dto.getTask_type())){
|
||||
|
||||
if(StringUtils.isBlank(outPoint.getVehicle_code())){
|
||||
throw new BadRequestException("设备【" + pointCode + "】不存在料桶,请核对!");
|
||||
}
|
||||
|
||||
//下空桶上满料 4个点 需要拆成2个任务,组装成一组
|
||||
log.info("下空桶上满料叫料,请求参数:【{}】", JSONObject.toJSONString(dto));
|
||||
|
||||
@@ -314,6 +320,9 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
||||
if (ObjectUtil.isEmpty(materialbase)) {
|
||||
throw new BadRequestException("物料【" + dto.getMaterial_code() + "】不存在!");
|
||||
}
|
||||
if("1".equals(outPoint.getPoint_status())){
|
||||
throw new BadRequestException("设备【" + dto.getStruct_code() + "】是空位,请执行单独上料!");
|
||||
}
|
||||
GroupPlate groupPlate = iMdPbGroupplateService.getOne(new LambdaQueryWrapper<GroupPlate>()
|
||||
.eq(GroupPlate::getStoragevehicle_code, outStructAttr.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getStatus, "02"));
|
||||
@@ -378,7 +387,6 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
||||
outBillService.manualDiv(param);
|
||||
|
||||
// 创建任务
|
||||
|
||||
JSONObject taskParam = new JSONObject();
|
||||
taskParam.put("iostorinv_id", invId);
|
||||
taskParam.put("point_code", dto.getStruct_code());
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
;
|
||||
@@ -178,7 +179,7 @@ public class SeparateMaterialTask extends AbstractTask {
|
||||
//更改点位的托盘信息,空托盘的点位 2为空托盘放置点位
|
||||
pointService.update(new LambdaUpdateWrapper<SchBasePoint>()
|
||||
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
|
||||
.set(SchBasePoint::getPoint_status, "2")
|
||||
.set(SchBasePoint::getPoint_status, "3")
|
||||
.set(SchBasePoint::getVehicle_qty, 1)
|
||||
.set(SchBasePoint::getUpdate_id, SecurityUtils.getCurrentUserId())
|
||||
.set(SchBasePoint::getUpdate_name, SecurityUtils.getCurrentNickName())
|
||||
@@ -194,6 +195,9 @@ public class SeparateMaterialTask extends AbstractTask {
|
||||
.set(Structattr::getUpdate_time, DateUtil.now())
|
||||
.eq(Structattr::getStruct_code, taskObj.getPoint_code1()));
|
||||
|
||||
//删除
|
||||
iMdPbGroupplateService.delete(Collections.singleton(taskObj.getGroup_id()));
|
||||
|
||||
//反馈到MES系统
|
||||
if("自动".equals(taskObj.getCreate_mode())){
|
||||
JSONObject jsonObject=new JSONObject();
|
||||
|
||||
@@ -1003,7 +1003,9 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
}
|
||||
pointService.updateBatchById(Arrays.asList(inPoint, outPoint));
|
||||
} else if (StatusEnum.IOBILL_TYPE_OUT.code("单独上料出库").equals(ioStorInv.getBill_type())) {
|
||||
// 单独上料出库
|
||||
// 单独上料出库,这个业务中 point_code2是出库点位
|
||||
point_code = whereJson.getString("point_code2");
|
||||
|
||||
SchBasePoint rkPoint = pointService.getById(whereJson.getString("point_code2"));
|
||||
if (ObjectUtil.isEmpty(rkPoint)) {
|
||||
throw new BadRequestException("点位不存在");
|
||||
@@ -1022,6 +1024,8 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
rkPoint.setPoint_status("3");
|
||||
pointService.updateById(rkPoint);
|
||||
} else if (StatusEnum.IOBILL_TYPE_OUT.code("下空桶上满料出库").equals(ioStorInv.getBill_type())) {
|
||||
//这个业务中 point_code3是出库点位
|
||||
point_code = whereJson.getString("point_code3");
|
||||
//需要建设2个任务,2个任务组成一个组,增加序号
|
||||
//第三个点位,获取载具号用
|
||||
String taskGroupId = IdUtil.getStringId();
|
||||
|
||||
Reference in New Issue
Block a user