| | |
| | | import HslCommunication.Profinet.Siemens.SiemensS7Net; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.BasDevp; |
| | |
| | | } |
| | | |
| | | BasDevp basDevp = basDevpService |
| | | .selectOne(new EntityWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo())); |
| | | .getOne(new QueryWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo())); |
| | | if (basDevp == null) { |
| | | return Collections.emptyList(); |
| | | } |
| | |
| | | OperateResult writeConfirm = siemensNet.Write("DB23." + (enableCommandIdx * taskAddressLength + 46), (short) 1); |
| | | |
| | | if(writeTask.IsSuccess && writeData.IsSuccess && writeConfirm.IsSuccess) { |
| | | log.error("写入输送线命令成功。任务号={},站点数据={}", command.getTaskNo(), JSON.toJSON(command)); |
| | | log.info("写入输送线命令成功。任务号={},站点数据={}", command.getTaskNo(), JSON.toJSON(command)); |
| | | commandResponse.setResult(true); |
| | | }else { |
| | | log.error("写入输送线命令失败。站点编号={},站点数据={}", command.getTaskNo(), JSON.toJSON(command)); |