| | |
| | | import com.jcdm.main.da.testDeviceInterface.service.IDaTestDeviceInterfaceService; |
| | | import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; |
| | | import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService; |
| | | 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.restful.qingYan.doman.*; |
| | | import org.aspectj.weaver.loadtime.Aj; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @Autowired |
| | | private IBsFormulaChildInfoService bsFormulaChildInfoService; |
| | | |
| | | private IDaPassingStationCollectionService passingStationCollectionService; |
| | | |
| | | |
| | | String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | |
| | | @GetMapping("/productionWorkOrderRequest") |
| | | public AjaxResult productionWorkOrderRequest(){ |
| | | List<OmProductionOrdeInfo> list = omProductionOrdeInfoService.list(); |
| | | |
| | | return AjaxResult.success(list); |
| | | List<RestFulOrder> restFulOrders = new ArrayList<>(); |
| | | for (OmProductionOrdeInfo omProductionOrdeInfo : list) { |
| | | RestFulOrder order = new RestFulOrder(); |
| | | order.setProductionOrderNum(omProductionOrdeInfo.getWorkOrderNo()); |
| | | order.setProductNum(omProductionOrdeInfo.getProductNum()); |
| | | order.setMaterialCode(omProductionOrdeInfo.getMaterialCode()); |
| | | order.setStationCode(omProductionOrdeInfo.getStationCode()); |
| | | // order.setPlanQty(omProductionOrdeInfo.getPlanQty()); |
| | | restFulOrders.add(order); |
| | | } |
| | | return AjaxResult.success(restFulOrders); |
| | | } |
| | | |
| | | @GetMapping("/getQualityData") |
| | | public AjaxResult getQualityData(){ |
| | | List<DaPassingStationCollection> qualified = daPassingStationCollectionService.list(new LambdaQueryWrapper<DaPassingStationCollection>().eq(DaPassingStationCollection::getOutRsSign, "1")); |
| | | List<DaPassingStationCollection> unQualified = daPassingStationCollectionService.list(new LambdaQueryWrapper<DaPassingStationCollection>().eq(DaPassingStationCollection::getOutRsSign, "2")); |
| | | Map<String,Integer> map = new HashMap<>(); |
| | | map.put("qualified",qualified.size()); |
| | | map.put("unQualified",unQualified.size()); |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping("/productionOrderComponentRequest") |
| | | public AjaxResult productionOrderComponentRequest(BsFormulaChildInfo bsFormulaChildInfo){ |
| | |
| | | .eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getProcessesCode()) |
| | | .eq(BsFormulaChildInfo::getOperationType, "2") |
| | | ); |
| | | List<String> materialCode = list.stream().map(BsFormulaChildInfo::getMaterialCode).collect(Collectors.toList()); |
| | | List<String> operationSteps = list.stream().map(BsFormulaChildInfo::getOperationSteps).collect(Collectors.toList()); |
| | | map.put("materialCode",materialCode); |
| | | map.put("operationSteps",operationSteps); |
| | | return AjaxResult.success(map); |
| | | List<ProductionOrderComponentRequest> requests = new ArrayList<>(); |
| | | for (BsFormulaChildInfo info : list) { |
| | | ProductionOrderComponentRequest request = new ProductionOrderComponentRequest(); |
| | | request.setMaterialCode(info.getMaterialCode()); |
| | | request.setOperationSteps(info.getOperationSteps()); |
| | | requests.add(request); |
| | | } |
| | | return AjaxResult.success(requests); |
| | | } |
| | | |
| | | |