| | |
| | | import com.jcdm.main.restful.qingYan.doman.ChildVO; |
| | | import com.jcdm.main.restful.qingYan.doman.ParentVO; |
| | | import com.jcdm.main.restful.qingYan.doman.PostEntity; |
| | | import com.jcdm.main.work.domain.QingYanTestInfo; |
| | | import com.jcdm.main.work.service.QingYanTestInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.Field; |
| | |
| | | @Autowired |
| | | private IOmProductionOrdeInfoService productionOrdeInfoService; |
| | | |
| | | String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | | @Resource |
| | | private QingYanTestInfoService qingYanTestInfoService; |
| | | |
| | | String url = "https://imes-test-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | | |
| | | |
| | | @PostMapping("/deviceResultFeedback") |
| | | public AjaxResult qinYanDeviceData(@RequestBody ParentVO parentVO){ |
| | | //保存参数数据 |
| | | String productNum = parentVO.getProductNum(); |
| | | |
| | | //参数保存 |
| | | List<DaParamCollection> paramCollectionList = new ArrayList<>(); |
| | | List<ChildVO> checkList = parentVO.getCheckList(); |
| | | for (ChildVO childVO : checkList) { |
| | | DaParamCollection daParamCollection = new DaParamCollection(); |
| | | daParamCollection.setKeyCode(productNum); |
| | | daParamCollection.setProductCode(parentVO.getProductNum()); |
| | | daParamCollection.setLocationCode(parentVO.getStationCode()); |
| | | daParamCollection.setParamCode(childVO.getItemCode()); |
| | | daParamCollection.setParamValue(childVO.getItemValue()); |
| | | daParamCollection.setCollectionTime(new Date()); |
| | | daParamCollection.setParamName(childVO.getItemText()); |
| | | daParamCollection.setState(childVO.getCheckResult()); |
| | | paramCollectionList.add(daParamCollection); |
| | | } |
| | | if (CollUtil.isNotEmpty(paramCollectionList)){ |
| | | daParamCollectionService.insertBatch(paramCollectionList); |
| | | } |
| | | QingYanTestInfo qingYanTestInfo = new QingYanTestInfo(); |
| | | qingYanTestInfo.setKeyCode(productNum); |
| | | qingYanTestInfo.setStatus(parentVO.getTotalResult()); |
| | | qingYanTestInfo.setLocationCode(parentVO.getStationCode()); |
| | | qingYanTestInfoService.save(qingYanTestInfo); |
| | | HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute(); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/saveKeyCodeCheck") |
| | | public void saveKeyCodeCheckList(){ |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 导出点检任务列表 |
| | | */ |
| | | @PostMapping("/deviceResultFeedback") |
| | | @PostMapping("/deviceResultFeedback222") |
| | | public AjaxResult hdy(@RequestBody ParentVO parentVO) |
| | | { |
| | | //保存 |
| | |
| | | DaPassingStationCollection passingStationCollection = new DaPassingStationCollection(); |
| | | passingStationCollection.setWorkOrderNo(omProductionOrdeInfo.getWorkOrderNo()); |
| | | passingStationCollection.setSfcCode(productNum); |
| | | passingStationCollection.setKeyCode(productNum); |
| | | passingStationCollection.setProductCode(omProductionOrdeInfo.getProductCode()); |
| | | passingStationCollection.setLocationCode(parentVO.getStationCode()); |
| | | passingStationCollection.setOutRsSign(parentVO.getTotalResult()); |