|
|
@ -22,9 +22,11 @@ import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService; |
|
|
|
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup; |
|
|
|
import org.nl.wms.sch.point.service.ISchBasePointService; |
|
|
|
import org.nl.wms.sch.point.service.dao.SchBasePoint; |
|
|
|
import org.nl.wms.sch.point.service.dao.mapper.SchBasePointMapper; |
|
|
|
import org.nl.wms.sch.task.service.ISchBaseTaskService; |
|
|
|
import org.nl.wms.sch.task.service.dao.SchBaseTask; |
|
|
|
import org.nl.wms.sch.task_manage.AbstractTask; |
|
|
|
import org.nl.wms.sch.task_manage.GeneralDefinition; |
|
|
|
import org.nl.wms.sch.task_manage.enums.GroupBindMaterialStatusEnum; |
|
|
|
import org.nl.wms.sch.task_manage.enums.NoticeTypeEnum; |
|
|
|
import org.nl.wms.sch.task_manage.enums.PointStatusEnum; |
|
|
@ -42,11 +44,13 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
import javax.annotation.PostConstruct; |
|
|
|
import java.lang.reflect.InvocationTargetException; |
|
|
|
import java.lang.reflect.Method; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Author: lyd |
|
|
@ -74,6 +78,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { |
|
|
|
@Autowired |
|
|
|
private PointMapper pointMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private SchBasePointMapper schBasePointMapper; |
|
|
|
|
|
|
|
// 初始化反射方法
|
|
|
|
@PostConstruct |
|
|
|
public void initCacheMethod() { |
|
|
@ -168,10 +175,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { |
|
|
|
Integer type = param.getInteger("type"); |
|
|
|
String device_code = param.getString("device_code"); |
|
|
|
String state = param.getString("state"); |
|
|
|
String ghs_device_code; |
|
|
|
switch (type) { |
|
|
|
case 1: |
|
|
|
//自动门反馈设备状态,将对应十个固化室工位的状态修改为传入状态
|
|
|
|
String ghs_device_code="GHS"+device_code.substring(device_code.length()-2); |
|
|
|
ghs_device_code = "GHS" + device_code.substring(device_code.length() - 2); |
|
|
|
pointMapper.updatePointStatus(ghs_device_code, state); |
|
|
|
break; |
|
|
|
case 2: |
|
|
@ -183,6 +191,35 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { |
|
|
|
//正极板空架缓存区人工搬走后显示更新无货
|
|
|
|
pointMapper.updatePointVehicleQty(device_code, state); |
|
|
|
break; |
|
|
|
case 4: |
|
|
|
//自动门反馈全部人工出库,将对应十个固化室工位的物料状态清空,组盘表解绑
|
|
|
|
ghs_device_code = "GHS" + device_code.substring(device_code.length() - 2); |
|
|
|
List<SchBasePoint> schBasePointList = schBasePointMapper.selectList(new LambdaQueryWrapper<SchBasePoint>() |
|
|
|
.like(SchBasePoint::getPoint_code, ghs_device_code)); |
|
|
|
for (SchBasePoint schBasePoint : schBasePointList) { |
|
|
|
List<String> vehicleCodeList = Arrays.stream(schBasePoint.getVehicle_code().split(",")).collect(Collectors.toList()); |
|
|
|
//组盘全部解绑
|
|
|
|
for (String vehicleCode : vehicleCodeList) { |
|
|
|
SchBaseVehiclematerialgroup groupEntity = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>() |
|
|
|
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode) |
|
|
|
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status, |
|
|
|
GroupBindMaterialStatusEnum.BOUND.getValue())); |
|
|
|
if (ObjectUtil.isNotEmpty(groupEntity)) { |
|
|
|
groupEntity.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue()); |
|
|
|
groupEntity.setUpdate_id(GeneralDefinition.ACS_ID); |
|
|
|
groupEntity.setUpdate_name(GeneralDefinition.ACS_NAME); |
|
|
|
groupEntity.setUpdate_time(DateUtil.now()); |
|
|
|
vehiclematerialgroupService.update(groupEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
//清空点位
|
|
|
|
schBasePoint.setVehicle_type(""); |
|
|
|
schBasePoint.setVehicle_code(""); |
|
|
|
schBasePoint.setVehicle_qty(0); |
|
|
|
schBasePoint.setUpdate_time(DateUtil.now()); |
|
|
|
pointService.update(schBasePoint); |
|
|
|
} |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
@ -192,7 +229,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { |
|
|
|
/** |
|
|
|
* 任务阶段反馈最新点位 |
|
|
|
* todo |
|
|
|
* */ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public BaseResponse feedbackState(JSONObject param) { |
|
|
|