| | |
| | | package com.jcdm.main.da.passingStationCollection.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.http.HttpRequest; |
| | | import cn.hutool.http.HttpResponse; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | //import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling; |
| | | //import com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper; |
| | | //import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService; |
| | | import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection; |
| | | import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper; |
| | | import com.jcdm.main.da.passingStationCollection.query.ProductOrderQuery; |
| | | import com.jcdm.main.da.passingStationCollection.query.ProductOrderVO; |
| | | import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService; |
| | | import com.jcdm.main.rm.repairRecord.domain.RmRepairRecord; |
| | | import com.jcdm.main.rm.repairRecord.mapper.RmRepairRecordMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private RmRepairRecordMapper rmRepairRecordMapper; |
| | | |
| | | |
| | | @Value("${orderLineUrl}") |
| | | private String orderLineUrl; |
| | | // @Autowired |
| | | // private BsOrderSchedulingMapper bsOrderSchedulingMapper; |
| | | // |
| | |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public ProductOrderVO queryMessFromLine(ProductOrderQuery query){ |
| | | ProductOrderVO vo = new ProductOrderVO(); |
| | | String jsonStr = JSONUtil.toJsonStr(query); |
| | | String url = orderLineUrl + "/productionWorkOrderRequest?siteCode="+query.getSiteCode()+"&stationCode="+query.getStationCode()+"&productNum="+query.getProductNum(); |
| | | // String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/productionWorkOrderRequest?siteCode=3983&stationCode=OP230&productNum=0RSPB001139E3AE5B0000011"; |
| | | HttpResponse execute = HttpRequest.get(url).execute(); |
| | | String body = execute.body(); |
| | | if (StrUtil.isNotBlank(body)){ |
| | | // JSONObject jsonObject = new JSONObject(body); |
| | | vo = JSON.parseObject(body, ProductOrderVO.class); |
| | | } |
| | | |
| | | return vo; |
| | | } |
| | | |
| | | @Override |
| | | public void insertBatch(List<DaPassingStationCollection> confList){ |
| | | try{ |
| | | this.saveBatch(confList); |
| | | }catch (Exception e){ |
| | | return; |
| | | } |
| | | |
| | | } |
| | | } |