| | |
| | | import cn.hutool.json.JSONObject; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.example.springboot.service.*; |
| | | |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import com.example.springboot.entity.Flowcard; |
| | | import com.example.springboot.entity.Glass; |
| | | import com.example.springboot.entity.GlassInfo; |
| | | import com.example.springboot.entity.MeasureSetting; |
| | | import com.example.springboot.entity.Out_slice; |
| | |
| | | // 是否需要人工确认上片玻璃 |
| | | jsonObject.append("isConfirm", isConfirm); |
| | | // 查询当前铝框信息 |
| | | Out_slice CurrentFrame = outSliceServive.SelectCurrentFrame(); |
| | | jsonObject.append("CurrentFrame", CurrentFrame); |
| | | // Out_slice CurrentFrame = outSliceServive.SelectCurrentFrame(); |
| | | // jsonObject.append("CurrentFrame", CurrentFrame); |
| | | |
| | | // 读取DB105区文件 |
| | | PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), |
| | | (short) 0); |
| | | } |
| | | // System.out.println("PlcRequest:" + PlcRequest+"MesSend:" + MesSend+"width:" + width+"height:" + height); |
| | | |
| | | // System.out.println("PlcRequest:" + PlcRequest+"MesSend:" + MesSend+"width:" + |
| | | // width+"height:" + height); |
| | | |
| | | if ("1".equals(PlcRequest) && "0".equals(MesSend)) { |
| | | boolean is = HomeService.Normal(width, height, "1"); |
| | | if (is && istest) { |
| | | // 测量成功 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), |
| | | (short) 1); |
| | | |
| | | } |
| | | else if (istest) { |
| | | } else if (istest) { |
| | | // 重新测量 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), |
| | | (short) 4); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | List<StorageTask> StoragTaskeTaskOut = storageCageService.SelectStorageTask(1); |
| | | jsonObject.append("StoragTaskeTaskOut", StoragTaskeTaskOut); |
| | | |
| | | // 查询所有玻璃厚度和膜系 |
| | | List<GlassInfo> SelectMeasure = storageCageService.SelectMeasure(); |
| | | jsonObject.append("SelectMeasure", SelectMeasure); |
| | | // 查询当前膜系厚度 |
| | | MeasureSetting SelectSetting = storageCageService.SelectSetting(); |
| | | jsonObject.append("SelectSetting", SelectSetting); |
| | | // 查询现在的玻璃厚度和膜系 |
| | | Map StorageCageForm = storageCageService.StorageCageForm(); |
| | | jsonObject.append("StorageCageForm", StorageCageForm); |
| | | |
| | | // //查询当前订单任务 |
| | | List<Flowcard> OrderTask = storageCageService.SelectOrderTask(); |
| | | jsonObject.append("OrderTask", OrderTask); |