| | |
| | | import java.util.Map;
|
| | |
|
| | | import com.example.springboot.service.*;
|
| | |
|
| | | import org.apache.ibatis.annotations.Result;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | |
|
| | | import com.example.springboot.entity.Glass;
|
| | |
| | |
|
| | | public static Boolean FeedState = false;
|
| | |
|
| | | public static StringBuilder feedglassid;
|
| | |
|
| | | // public Plchome() throws IOException {
|
| | | // config = new Configuration("config.properties");
|
| | | // }
|
| | |
| | | public void run() {
|
| | | while (this != null) {
|
| | | JSONObject jsonObject = new JSONObject();
|
| | | jsonObject.append("feedglassid", feedglassid);
|
| | | try {
|
| | | Thread.sleep(1000);
|
| | | // 注入mapper
|
| | |
| | | // }
|
| | | // // 获取铝框idDB106.DBW64,添加到出片队列
|
| | | // String frameno="X21763329601FB";
|
| | | String frameno = spianService.queGlassid("DB103.270", 14).toString();
|
| | | String frameno = spianService.queGlassid("DB103.270", 11).toString();
|
| | | if (!frameno.equals(Plchome.FrameNo)) {
|
| | | Plchome.FrameNo = frameno;
|
| | | try {
|
| | |
| | | // jsonObject.append("D01RequestState", D01RequestState);
|
| | | // 自动进片
|
| | | if (isConfirm == true && form3.getglassId() != null && form3.getglassId() != "") {
|
| | | if ((form3.getglassheight() < 380 || form3.getglasswidth() < 390
|
| | | || form3.getglassheight() > 1810
|
| | | || form3.getglasswidth() > 2760)
|
| | | || (form3.getglassheight() < 390 || form3.getglasswidth() < 380
|
| | | || form3.getglassheight() > 2760 || form3.getglasswidth() > 1810)) {
|
| | | double width = 0;
|
| | | double height = 0;
|
| | | if (form3.getglassheight() < form3.getglasswidth()) {
|
| | | height = form3.getglassheight();
|
| | | width = form3.getglasswidth();
|
| | | } else {
|
| | | height = form3.getglasswidth();
|
| | | width = form3.getglassheight();
|
| | | }
|
| | | if (height < 380 || width < 380 || height > 1810 || width > 2760) {
|
| | | FeedState = true;
|
| | | jsonObject.append("FeedState", FeedState);
|
| | | FeedState = false;
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | } catch (InterruptedException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | boolean dbconnected = false;
|
| | | try {
|
| | | dbserve.getConn();
|
| | |
| | |
|
| | | }
|
| | | }
|
| | | } catch (InterruptedException | SQLException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | }
|