wujian
2024-05-31 b26a2da3d454b93b496bc364a024f978f3edfd7e
jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java
@@ -19,10 +19,7 @@
import com.jcdm.main.restful.qingYan.doman.ParentVO;
import com.jcdm.main.restful.qingYan.doman.PostEntity;
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;
@@ -47,10 +44,46 @@
    String url = "https://imes-uat-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);
        }
//        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)
    {
        //保存
@@ -63,6 +96,7 @@
                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());