|
|
@ -44,81 +44,40 @@ public class PdaServiceImpl implements PdaService { |
|
|
|
private AcsToWmsService acsToWmsService; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PdaResponseVo yclck(JSONObject param) { |
|
|
|
param.put("request_medthod_code","YCLCKTask"); |
|
|
|
param.put("request_medthod_name","原材料出库"); |
|
|
|
acsToWmsService.acsApply(param); |
|
|
|
return PdaResponseVo.pdaResultOk("原材料出库成功"); |
|
|
|
public PdaResponseVo dwzt(JSONObject param) { |
|
|
|
acsToWmsService.notify(param); |
|
|
|
return PdaResponseVo.pdaResultOk("回温状态查询成功"); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public PdaResponseVo hwcl(JSONObject param) { |
|
|
|
param.put("device_code",param.getString("point_code")); |
|
|
|
if(!param.getString("point_code").startsWith("TBX")){ |
|
|
|
throw new BadRequestException("非涂板线禁止补空架!"); |
|
|
|
} |
|
|
|
param.put("request_medthod_code","TBXBKJTask"); |
|
|
|
param.put("request_medthod_name","涂板线补空架"); |
|
|
|
public PdaResponseVo yclrk(JSONObject param) { |
|
|
|
param.put("request_medthod_code", "YCLRKTask"); |
|
|
|
param.put("request_medthod_name", "原材料入库"); |
|
|
|
acsToWmsService.acsApply(param); |
|
|
|
return PdaResponseVo.pdaResultOk("涂板线补空架"); |
|
|
|
return PdaResponseVo.pdaResultOk("原材料入库成功"); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public PdaResponseVo fbccl(JSONObject param) { |
|
|
|
//根据载具编码寻找点位,并且将它更新掉
|
|
|
|
String vehicleCode=param.getString("vehicle_code"); |
|
|
|
SchBaseVehiclematerialgroup groupEntity = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>() |
|
|
|
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode) |
|
|
|
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status, |
|
|
|
GroupBindMaterialStatusEnum.BOUND.getValue())); |
|
|
|
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 pointObj=pointService.getById(groupEntity.getPoint_code()); |
|
|
|
if(pointObj.getVehicle_code().contains(",")){ |
|
|
|
vehicleCode+=','; |
|
|
|
} |
|
|
|
pointObj.setVehicle_code(pointObj.getVehicle_code().replace(vehicleCode,"")); |
|
|
|
pointObj.setVehicle_qty(pointObj.getVehicle_qty()-1); |
|
|
|
pointService.update(pointObj); |
|
|
|
//清空组盘表的信息
|
|
|
|
return PdaResponseVo.pdaResultOk("清空物料信息请求成功"); |
|
|
|
} |
|
|
|
@Override |
|
|
|
public PdaResponseVo ktphs(JSONObject param) { |
|
|
|
if(!param.getString("point_code").startsWith("BP")){ |
|
|
|
throw new BadRequestException("非包片机禁止叫料!"); |
|
|
|
} |
|
|
|
param.put("device_code",param.getString("point_code")); |
|
|
|
param.put("request_medthod_code","BPSLTask"); |
|
|
|
param.put("request_medthod_name","包片上料"); |
|
|
|
public PdaResponseVo yclck(JSONObject param) { |
|
|
|
param.put("request_medthod_code", "YCLCKTask"); |
|
|
|
param.put("request_medthod_name", "原材料出库"); |
|
|
|
acsToWmsService.acsApply(param); |
|
|
|
return PdaResponseVo.pdaResultOk("呼叫物料请求成功"); |
|
|
|
return PdaResponseVo.pdaResultOk("原材料出库成功"); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public PdaResponseVo ktpck(JSONObject param) { |
|
|
|
if(!param.getString("point_code").startsWith("BP")){ |
|
|
|
throw new BadRequestException("非包片机禁止叫料!"); |
|
|
|
} |
|
|
|
param.put("device_code",param.getString("point_code")); |
|
|
|
param.put("request_medthod_code","BPSLTask"); |
|
|
|
param.put("request_medthod_name","包片上料"); |
|
|
|
public PdaResponseVo task(JSONObject param) { |
|
|
|
param.put("request_medthod_code", "PONITTask"); |
|
|
|
param.put("request_medthod_name", "点对点任务"); |
|
|
|
acsToWmsService.acsApply(param); |
|
|
|
return PdaResponseVo.pdaResultOk("呼叫物料请求成功"); |
|
|
|
return PdaResponseVo.pdaResultOk("任务生成成功"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public PdaResponseVo zpjb(JSONObject param) { |
|
|
|
if(!param.getString("point_code").startsWith("BP")){ |
|
|
|
throw new BadRequestException("非包片机禁止叫料!"); |
|
|
|
} |
|
|
|
param.put("device_code",param.getString("point_code")); |
|
|
|
param.put("request_medthod_code","BPSLTask"); |
|
|
|
param.put("request_medthod_name","包片上料"); |
|
|
|
param.put("request_medthod_code", "PONITTask"); |
|
|
|
param.put("request_medthod_name", "点对点任务"); |
|
|
|
acsToWmsService.acsApply(param); |
|
|
|
return PdaResponseVo.pdaResultOk("呼叫物料请求成功"); |
|
|
|
return PdaResponseVo.pdaResultOk("组盘解绑成功"); |
|
|
|
} |
|
|
|
} |
|
|
|