| | |
| | | url: jdbc:sqlserver://127.0.0.1:1433;DataBaseName=Jcdm042-Mes |
| | | username: sa |
| | | # password: JCDM@2023 |
| | | password: admin@123 |
| | | # password: 1!deshine |
| | | # password: admin@123 |
| | | password: 1!deshine |
| | | # password: 123456 |
| | | |
| | | |
| | |
| | | package com.jcdm.main.bs.formulaChild.controller; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | @GetMapping("/fistSetpNumber") |
| | | public AjaxResult fistSetpNumber(BsFormulaChildInfo bsFormulaChildInfo) |
| | | { |
| | | // try { |
| | | // String str = "PACK."+bsFormulaChildInfo.getProcessesCode()+".MStepNumber"; |
| | | // miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(str).value(1).build()); |
| | | // } catch (Exception e) { |
| | | // throw new RuntimeException(e); |
| | | // } |
| | | Integer stepNumber = 1; |
| | | try { |
| | | List<BsFormulaChildInfo> op260 = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>().eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getProcessesCode())); |
| | |
| | | .filter(obj -> obj.getResults() != null && !obj.getResults().isEmpty()) |
| | | .collect(Collectors.toList()); |
| | | if(filteredList.size() > 0){ |
| | | stepNumber = Integer.valueOf(filteredList.get(filteredList.size()-1).getStepSort())+1; |
| | | if("1".equals(bsFormulaChildInfo.getArtificialNgFlag())){ |
| | | stepNumber = Integer.valueOf(filteredList.get(filteredList.size()-1).getStepSort()); |
| | | }else { |
| | | stepNumber = Integer.valueOf(filteredList.get(filteredList.size()-1).getStepSort())+1; |
| | | } |
| | | } |
| | | |
| | | String str = "PACK."+bsFormulaChildInfo.getProcessesCode()+".MStepNumber"; |
| | |
| | | /** |
| | | * 查询配方配置子信息列表 |
| | | */ |
| | | // @GetMapping("/noPageListFormulaChild") |
| | | // public TableDataInfo noPageListFormulaChild(BsFormulaChildInfo bsFormulaChildInfo) |
| | | // { |
| | | // |
| | | // List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>() |
| | | // .eq(BsFormulaChildInfo::getProductCode,bsFormulaChildInfo.getProductCode()) |
| | | // .eq(BsFormulaChildInfo::getProcessesCode,bsFormulaChildInfo.getProcessesCode()) |
| | | // ); |
| | | // if (CollUtil.isNotEmpty(list)){ |
| | | // List<BsFormulaChildInfo> collect1 = list.stream().filter(x -> Constants.OK.equals(x.getResults())).collect(Collectors.toList()); |
| | | // List<BsFormulaChildInfo> collect2 = list.stream().filter(x -> !Constants.OK.equals(x.getResults())).collect(Collectors.toList()); |
| | | // list = collect1; |
| | | // list.addAll(collect2); |
| | | // } |
| | | // |
| | | // if("1".equals(bsFormulaChildInfo.getArtificialNgFlag())){ |
| | | // List<BsFormulaChildInfoTemp> tempList = bsFormulaChildInfoTempService.list(new LambdaQueryWrapper<BsFormulaChildInfoTemp>() |
| | | // .eq(BsFormulaChildInfoTemp::getProcessesCode, bsFormulaChildInfo.getProcessesCode()) |
| | | // .eq(BsFormulaChildInfoTemp::getProductCode, bsFormulaChildInfo.getProductCode()) |
| | | // .eq(BsFormulaChildInfoTemp::getSfcCode, bsFormulaChildInfo.getSfcBarcode())); |
| | | // |
| | | // for (int i = 0; i < list.size(); i++) { |
| | | // BsFormulaChildInfo formulaChildInfo = list.get(i); |
| | | // if(i < tempList.size()){ |
| | | // BsFormulaChildInfoTemp childInfoTemp = tempList.get(i); |
| | | // if(ObjectUtil.isNotEmpty(childInfoTemp)){ |
| | | // formulaChildInfo.setResults(childInfoTemp.getResults()); |
| | | // formulaChildInfo.setCollectData(childInfoTemp.getCollectData()); |
| | | // bsFormulaChildInfoService.saveOrUpdate(formulaChildInfo); |
| | | // } |
| | | // } |
| | | // if(formulaChildInfo.getCollectData()!=null&& !"".equals(formulaChildInfo.getCollectData())){ |
| | | // if(formulaChildInfo.getCollectData().contains("[")){ |
| | | // String data = formulaChildInfo.getCollectData(); |
| | | // data = data.replace("[", "").replace("]", "").replace(" ", ""); |
| | | // String[] tightenDataParts = data.split(","); |
| | | // formulaChildInfo.setCollectData("扭矩"+tightenDataParts[0]+"角度"+tightenDataParts[1]+"扭矩结果"+tightenDataParts[2]+"角度结果"+tightenDataParts[3]); |
| | | // } |
| | | // } |
| | | // } |
| | | // |
| | | // //给plc写ng工步 |
| | | // BsFormulaChildInfoTemp lastTemp = tempList.get(tempList.size()-1); |
| | | // try { |
| | | // Integer stepSort = Integer.valueOf(lastTemp.getStepSort()+1); |
| | | // logger.info("ng工件给plc写工步为:{}---工位{}---pack码{}",stepSort,lastTemp.getProcessesCode(),lastTemp.getSfcCode()); |
| | | // String str = "PACK."+bsFormulaChildInfo.getProcessesCode()+".MStepNumber"; |
| | | // miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(str).value(stepSort+1).build()); |
| | | // } catch (Exception e) { |
| | | // throw new RuntimeException(e); |
| | | // } |
| | | // |
| | | // //清除工单标记 |
| | | // LambdaUpdateWrapper<OmProductionOrdeInfo> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | // updateWrapper.set(OmProductionOrdeInfo::getArtificialNgFlag, ""); |
| | | // updateWrapper.eq(OmProductionOrdeInfo::getProductNum, lastTemp.getSfcCode()); |
| | | // boolean update = omProductionOrdeInfoService.update(new OmProductionOrdeInfo(), updateWrapper); |
| | | // }else { |
| | | // for (BsFormulaChildInfo formulaChildInfo : list) { |
| | | // if(formulaChildInfo.getCollectData()!=null&& !"".equals(formulaChildInfo.getCollectData())){ |
| | | // if(formulaChildInfo.getCollectData().contains("[")){ |
| | | // String data = formulaChildInfo.getCollectData(); |
| | | // data = data.replace("[", "").replace("]", "").replace(" ", ""); |
| | | // String[] tightenDataParts = data.split(","); |
| | | // formulaChildInfo.setCollectData("扭矩"+tightenDataParts[0]+"角度"+tightenDataParts[1]+"扭矩结果"+tightenDataParts[2]+"角度结果"+tightenDataParts[3]); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // return getDataTable(list); |
| | | // } |
| | | |
| | | @GetMapping("/noPageListFormulaChild") |
| | | public TableDataInfo noPageListFormulaChild(BsFormulaChildInfo bsFormulaChildInfo) |
| | | { |
| | | if("1".equals(bsFormulaChildInfo.getArtificialNgFlag())){ |
| | | List<BsFormulaChildInfoTemp> tempList = bsFormulaChildInfoTempService.list(new LambdaQueryWrapper<BsFormulaChildInfoTemp>() |
| | | .eq(BsFormulaChildInfoTemp::getProcessesCode, bsFormulaChildInfo.getProcessesCode()) |
| | | .eq(BsFormulaChildInfoTemp::getProductCode, bsFormulaChildInfo.getProductCode()) |
| | | .eq(BsFormulaChildInfoTemp::getSfcCode, bsFormulaChildInfo.getSfcBarcode())); |
| | | |
| | | List<Long> ids = new ArrayList<>(); |
| | | for (int i = 0; i < tempList.size(); i++) { |
| | | BsFormulaChildInfoTemp childInfoTemp = tempList.get(i); |
| | | LambdaUpdateWrapper <BsFormulaChildInfo> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper.set( BsFormulaChildInfo::getResults, childInfoTemp.getResults()); |
| | | updateWrapper.set( BsFormulaChildInfo::getCollectData, childInfoTemp.getCollectData()); |
| | | updateWrapper.eq( BsFormulaChildInfo::getId, childInfoTemp.getChildId()); |
| | | bsFormulaChildInfoService.update(new BsFormulaChildInfo(),updateWrapper); |
| | | |
| | | if(i == tempList.size()-1){ |
| | | LambdaUpdateWrapper<OmProductionOrdeInfo> orderInfoUpdateWrapper = new LambdaUpdateWrapper<>(); |
| | | orderInfoUpdateWrapper.set(OmProductionOrdeInfo::getArtificialNgFlag, ""); |
| | | orderInfoUpdateWrapper.eq(OmProductionOrdeInfo::getProductNum, childInfoTemp.getSfcCode()); |
| | | boolean update = omProductionOrdeInfoService.update(new OmProductionOrdeInfo(), orderInfoUpdateWrapper); |
| | | } |
| | | |
| | | ids.add(childInfoTemp.getId()); |
| | | } |
| | | bsFormulaChildInfoTempService.removeByIds(ids); |
| | | } |
| | | |
| | | List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>() |
| | | .eq(BsFormulaChildInfo::getProductCode,bsFormulaChildInfo.getProductCode()) |
| | | .eq(BsFormulaChildInfo::getProcessesCode,bsFormulaChildInfo.getProcessesCode()) |
| | | .eq(BsFormulaChildInfo::getProductCode,bsFormulaChildInfo.getProductCode()) |
| | | .eq(BsFormulaChildInfo::getProcessesCode,bsFormulaChildInfo.getProcessesCode()) |
| | | ); |
| | | if (CollUtil.isNotEmpty(list)){ |
| | | List<BsFormulaChildInfo> collect1 = list.stream().filter(x -> Constants.OK.equals(x.getResults())).collect(Collectors.toList()); |
| | |
| | | list = collect1; |
| | | list.addAll(collect2); |
| | | } |
| | | |
| | | for (BsFormulaChildInfo formulaChildInfo : list) { |
| | | if(formulaChildInfo.getCollectData()!=null&& !"".equals(formulaChildInfo.getCollectData())){ |
| | | if(formulaChildInfo.getCollectData().contains("[")){ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | // @GetMapping("/noPageListFormulaChild") |
| | | // public TableDataInfo noPageListFormulaChild(BsFormulaChildInfo bsFormulaChildInfo) |
| | | // { |
| | | // |
| | | // List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>() |
| | | // .eq(BsFormulaChildInfo::getProductCode,bsFormulaChildInfo.getProductCode()) |
| | | // .eq(BsFormulaChildInfo::getProcessesCode,bsFormulaChildInfo.getProcessesCode()) |
| | | // ); |
| | | // if (CollUtil.isNotEmpty(list)){ |
| | | // List<BsFormulaChildInfo> collect1 = list.stream().filter(x -> Constants.OK.equals(x.getResults())).collect(Collectors.toList()); |
| | | // List<BsFormulaChildInfo> collect2 = list.stream().filter(x -> !Constants.OK.equals(x.getResults())).collect(Collectors.toList()); |
| | | // list = collect1; |
| | | // list.addAll(collect2); |
| | | // } |
| | | // for (BsFormulaChildInfo formulaChildInfo : list) { |
| | | // if(formulaChildInfo.getCollectData()!=null&& !"".equals(formulaChildInfo.getCollectData())){ |
| | | // if(formulaChildInfo.getCollectData().contains("[")){ |
| | | // String data = formulaChildInfo.getCollectData(); |
| | | // data = data.replace("[", "").replace("]", "").replace(" ", ""); |
| | | // String[] tightenDataParts = data.split(","); |
| | | // formulaChildInfo.setCollectData("扭矩"+tightenDataParts[0]+"角度"+tightenDataParts[1]+"扭矩结果"+tightenDataParts[2]+"角度结果"+tightenDataParts[3]); |
| | | // } |
| | | // } |
| | | // } |
| | | // return getDataTable(list); |
| | | // } |
| | | |
| | | /** |
| | | * 查询配方配置子信息列表 |
| | | */ |
| | |
| | | bsFormulaChildInfo.setResults("NG"); |
| | | bsFormulaChildInfo.setCollectData(bsFormulaChildInfo.getTightenTheArray()); |
| | | |
| | | // Integer ngTimes = bsFormulaChildInfo.getNgTimes(); |
| | | // bsFormulaChildInfo.setNgTimes(ngTimes+1); |
| | | // bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfo); |
| | | // |
| | | // if(bsFormulaChildInfo.getNgTimes() > 3){ |
| | | // this.recordNgTighteningData(bsFormulaChildInfo.getLocationCode(), bsFormulaChildInfo.getProductCode(), bsFormulaChildInfo.getProductBarcode()); |
| | | // WebSocketUsers.sendMessageToUserByText(map.get(bsFormulaChildInfo.getLocationCode()), "NG"); |
| | | // return AjaxResult.error("超过三次拧紧 pack NG下线!"); |
| | | // } |
| | | Integer ngTimes = bsFormulaChildInfo.getNgTimes(); |
| | | bsFormulaChildInfo.setNgTimes(ngTimes+1); |
| | | bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfo); |
| | | |
| | | if(bsFormulaChildInfo.getNgTimes() > 3){ |
| | | this.recordNgTighteningData(bsFormulaChildInfo.getLocationCode(), bsFormulaChildInfo.getProductCode(), bsFormulaChildInfo.getProductBarcode()); |
| | | WebSocketUsers.sendMessageToUserByText(map.get(bsFormulaChildInfo.getLocationCode()), "NG"); |
| | | return AjaxResult.error("超过三次拧紧 pack NG下线!"); |
| | | } |
| | | return AjaxResult.error("拧紧结果NG,请重新拧紧!"); |
| | | }else { |
| | | //List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery); |
| | |
| | | String originalString = bsFormulaChildInfo.getTightenTheArray(); |
| | | String modifiedString = originalString.replaceFirst("OK", "NG"); |
| | | bsFormulaChildInfo.setCollectData(modifiedString); |
| | | // bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfo); |
| | | |
| | | Integer ngTimes = bsFormulaChildInfo.getNgTimes(); |
| | | bsFormulaChildInfo.setNgTimes(ngTimes+1); |
| | | bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfo); |
| | | |
| | | if(bsFormulaChildInfo.getNgTimes() > 3){ |
| | | this.recordNgTighteningData(bsFormulaChildInfo.getLocationCode(), bsFormulaChildInfo.getProductCode(), bsFormulaChildInfo.getProductBarcode()); |
| | | WebSocketUsers.sendMessageToUserByText(map.get(bsFormulaChildInfo.getLocationCode()), "NG"); |
| | | return AjaxResult.error("超过三次拧紧 pack NG下线!"); |
| | | } |
| | | return AjaxResult.error("拧紧结果NG,请重新拧紧!"); |
| | | } |
| | | |
| | |
| | | childInfoTemp.setProcessesCode(childInfo.getProcessesCode()); |
| | | childInfoTemp.setProductCode(childInfo.getProductCode()); |
| | | childInfoTemp.setStepSort(childInfo.getStepSort()); |
| | | // childInfoTemp.setLineCode(childInfo.getId()); |
| | | childInfoTemp.setChildId(childInfo.getId()); |
| | | bsFormulaChildInfoTempService.save(childInfoTemp); |
| | | } |
| | | } |
| | |
| | | package com.jcdm.main.bs.formulaChildInfoTemp.domain; |
| | | |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.jcdm.common.annotation.Excel; |
| | |
| | | * @author Yi |
| | | * @date 2024-07-15 |
| | | */ |
| | | @Data |
| | | public class BsFormulaChildInfoTemp extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | |
| | | /** 总成码 */ |
| | | @Excel(name = "总成码") |
| | | private Long childId; |
| | | |
| | | /** 总成码 */ |
| | | @Excel(name = "总成码") |
| | | private String sfcCode; |
| | | |
| | | /** 产线 */ |
| | |
| | | public void pushGeelycvMesFeedback(String packID, String stationCode) { |
| | | logger.info("进入人工工位推送工厂MES数据方法-pushGeelycvMesFeedback-工位{}-pack码{}",stationCode,packID); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | | // String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | | // String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | | String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | | String totalResult = "0"; |
| | | List<DaParamCollectionTemp> paramList = daParamCollectionTempService.list(new LambdaQueryWrapper<DaParamCollectionTemp>().eq(DaParamCollectionTemp::getSfcCode, packID).eq(DaParamCollectionTemp::getLocationCode, stationCode)); |
| | | if(paramList.size() > 0){ |
| | |
| | | public void automaticWorkstationPushGeelycvMesFeedback(String packID, String stationCode,List<DaParamCollection> paramList) { |
| | | logger.info("进入工位{}-工厂MES推送数据方法automaticWorkstationPushGeelycvMesFeedback",stationCode); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | | // String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | | // String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | | String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | | String totalResult = "0"; |
| | | if(paramList.size() > 0){ |
| | | logger.info("进入工位{}-拼数据",stationCode); |
| | |
| | | @Override |
| | | public void enterWeighing(DaParamCollection daParamCollection) { |
| | | String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | | // String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | | long timestampMillis = Instant.now().toEpochMilli(); |
| | | ParentVO parentVO = new ParentVO(); |
| | | ChildVO childVO = new ChildVO(); |
| | |
| | | |
| | | public SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | //新自动工站 |
| | | public List<String> automaticList = Arrays.asList("POP270","POP282", "POP281", "POP283", "POP285", "POP286", "POP290","OP365","POP300", "POP320", "POP400"); |
| | | public List<String> automaticList = Arrays.asList("POP270", "POP281", "POP283", "POP285", "POP286", "POP290","OP365","POP300", "POP320", "POP400"); |
| | | |
| | | //采集模组工位 ModuleCode |
| | | public List<String> moduleCodeList = Arrays.asList("POP281","POP282","POP283","POP285","OP365", "POP286", "POP284"); |
| | |
| | | public List<String> agvId = Arrays.asList("POP290", "POP320", "POP400","POP270"); |
| | | |
| | | //测试设备手动工位 |
| | | public List<String> testList = Arrays.asList("POP360-1","POP360-2","POP360-3","POP360-4","POP410-1","POP410-2","POP410-3","POP370","POP420-1","POP420-2","POP420-3"); |
| | | public List<String> testList = Arrays.asList("POP360-1","POP360-2","POP360-3","POP360-4","POP410-1","POP410-2","POP410-3","POP370","POP420-1","POP420-2","POP420-3","POP282"); |
| | | |
| | | //空的 |
| | | public List<String> nullList = Arrays.asList("OP250","OP260"); |
| | |
| | | System.out.println("resultCode: " + resultCode); |
| | | } |
| | | |
| | | public static final String getRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration"; |
| | | // |
| | | public static final String postRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/interface"; |
| | | // public static final String getRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration"; |
| | | //// |
| | | // public static final String postRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/interface"; |
| | | |
| | | // public static final String getRealmName = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration"; |
| | | public static final String getRealmName = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration"; |
| | | |
| | | // public static final String postRealmName = "https://imes-group.geelycv.com/api/mom-open/restful/interface"; |
| | | public static final String postRealmName = "https://imes-group.geelycv.com/api/mom-open/restful/interface"; |
| | | |
| | | public static final String siteCode = "3983"; |
| | | |
| | |
| | | daTestDeviceInterface.setCheckList(s); |
| | | daTestDeviceInterface.setCreateTime(new Date()); |
| | | daTestDeviceInterfaceService.save(daTestDeviceInterface); |
| | | if(parentVO.getStationCode().contains("OP480")){ |
| | | if(parentVO.getStationCode().contains("POP410")){ |
| | | if(StringUtils.isNotBlank(parentVO.getProductNum())){ |
| | | OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum, parentVO.getProductNum())); |
| | | if(ObjectUtil.isNotNull(one)){ |
| | |
| | | <result property="ngTimes" column="ng_times" /> |
| | | <result property="ngCollectData" column="ng_collect_data" /> |
| | | <result property="ngResults" column="ng_results" /> |
| | | <result property="childId" column="child_id" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsFormulaChildInfoTempVo"> |
| | | select id, sfc_code, line_code, processes_code, product_code, operation_steps, tech_requirement, operation_type, step_sort, param_code, material_code, formula_code, picture, remarks, create_user, create_time, update_user, update_time, spare_field1, spare_field2, spare_field3, spare_field4, collect_data, results, ng_times, ng_collect_data, ng_results from bs_formula_child_info_temp |
| | | select id, sfc_code, child_id,line_code, processes_code, product_code, operation_steps, tech_requirement, operation_type, step_sort, param_code, material_code, formula_code, picture, remarks, create_user, create_time, update_user, update_time, spare_field1, spare_field2, spare_field3, spare_field4, collect_data, results, ng_times, ng_collect_data, ng_results from bs_formula_child_info_temp |
| | | </sql> |
| | | |
| | | <select id="selectBsFormulaChildInfoTempList" parameterType="BsFormulaChildInfoTemp" resultMap="BsFormulaChildInfoTempResult"> |
| | |
| | | <if test="ngTimes != null">ng_times,</if> |
| | | <if test="ngCollectData != null">ng_collect_data,</if> |
| | | <if test="ngResults != null">ng_results,</if> |
| | | </trim> |
| | | <if test="childId != null">child_id,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="sfcCode != null">#{sfcCode},</if> |
| | | <if test="lineCode != null">#{lineCode},</if> |
| | |
| | | <if test="ngTimes != null">#{ngTimes},</if> |
| | | <if test="ngCollectData != null">#{ngCollectData},</if> |
| | | <if test="ngResults != null">#{ngResults},</if> |
| | | </trim> |
| | | <if test="childId != null">#{childId},</if> |
| | | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateBsFormulaChildInfoTemp" parameterType="BsFormulaChildInfoTemp"> |
| | |
| | | <if test="ngTimes != null">ng_times = #{ngTimes},</if> |
| | | <if test="ngCollectData != null">ng_collect_data = #{ngCollectData},</if> |
| | | <if test="ngResults != null">ng_results = #{ngResults},</if> |
| | | <if test="childId != null">child_id = #{childId},</if> |
| | | |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | import {listWorkReport} from "@/api/main/om/workReport/workReport"; |
| | | import {listStationConf,getIpv4} from "@/api/main/sc/stationConf"; |
| | | import { |
| | | clearWorkpieceRelease, |
| | | clearWorkpieceRelease, inPlaceInspection, |
| | | jrmUpdateResults, jrmWorkpieceRelease, |
| | | listFormulaChild, |
| | | noPageListFormulaChild, |
| | |
| | | content: '', |
| | | activeName: 'first', |
| | | // url: "ws://192.168.2.248:8080/websocket/message/", |
| | | url: "ws://10.103.210.248:8080/websocket/message/", |
| | | // url: "ws://192.168.2.76:8080/websocket/message/", |
| | | // url: "ws://10.103.210.248:8080/websocket/message/", |
| | | url: "ws://192.168.2.76:8080/websocket/message/", |
| | | message: "", |
| | | text_content: "", |
| | | ws: null, |
| | |
| | | } |
| | | this.headContent.processesName = rows.processesName |
| | | this.headContent.processesCode = rows.processesCode |
| | | if(this.headContent.processesCode === 'OP240'){ |
| | | this.onLineBinDing = true |
| | | } |
| | | if(this.headContent.processesCode === 'OP260'){ |
| | | this.showInput = true |
| | | } |
| | | |
| | | inPlaceInspection({processesCode: this.headContent.processesCode}).then(response => { |
| | | console.log(response) |
| | | this.cakeLamp.InPlace = response.data |
| | | }); |
| | | |
| | | console.log('设置工位编码' + this.headContent.processesCode) |
| | | }); |
| | |
| | | console.log("串口收到数据-------------------"+scanValue) |
| | | |
| | | if(this.headContent.module !== ''){ |
| | | console.log('this.headContent.module !== \'\' true') |
| | | this.$message('扫码模组物料码'+scanValue); |
| | | this.serialPortMethod(scanValue) |
| | | } else { |
| | | if(scanValue.includes("ORSM")){ |
| | | console.log('this.headContent.module !== \'\' false') |
| | | if(scanValue.includes("0RSMB")){ |
| | | this.headContent.module = scanValue; |
| | | this.$message('扫码识别产品序列号'+scanValue); |
| | | this.getList() |
| | | // this.cakeLamp.InPlace = 1 |
| | | this.cakeLamp.scanFinish = 1 |
| | | this.cakeLamp.startWork = 1 |
| | | }else { |
| | | this.$message.error('扫码识别错误的产品序列号'+scanValue+'请重新扫码'); |
| | | } |
| | | } |
| | | } |
| | |
| | | content: '', |
| | | activeName: 'first', |
| | | // url: "ws://192.168.2.248:8080/websocket/message/", |
| | | url: "ws://10.103.210.248:8080/websocket/message/", |
| | | // url: "ws://192.168.2.76:8080/websocket/message/", |
| | | // url: "ws://10.103.210.248:8080/websocket/message/", |
| | | url: "ws://192.168.2.76:8080/websocket/message/", |
| | | message: "", |
| | | text_content: "", |
| | | ws: null, |
| | |
| | | originalArray: [], |
| | | yzSfcFlag: 1, |
| | | endYz: false, |
| | | artificialNgFlag: null, |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | // this.formulaChildList = [] |
| | | this.formulaChildParams.productCode = this.workpieceInformation.productCode |
| | | this.formulaChildParams.processesCode = this.headContent.processesCode |
| | | console.log(this.artificialNgFlag) |
| | | if(this.artificialNgFlag !== null){ |
| | | this.formulaChildParams.artificialNgFlag = this.artificialNgFlag |
| | | if(this.formulaChildParams.artificialNgFlag !== null){ |
| | | this.formulaChildParams.sfcBarcode = this.headContent.sfcCode |
| | | } |
| | | console.log(this.formulaChildParams) |
| | | console.log("getListFormulaChild"+this.formulaChildParams.artificialNgFlag) |
| | | noPageListFormulaChild(this.formulaChildParams).then(response => { |
| | | this.formulaChildList = response.rows; |
| | | if (this.formulaChildList.length >0){ |
| | |
| | | this.workpieceInformation.productModel = rowsData.productModel; |
| | | this.workpieceInformation.productName = rowsData.productName; |
| | | this.headContent.cardCode = rowsData.trolleyYard; |
| | | this.artificialNgFlag = rowsData.artificialNgFlag; |
| | | this.formulaChildParams.artificialNgFlag = rowsData.artificialNgFlag; |
| | | }); |
| | | this.getListFormulaChild() |
| | | // this.addOverStationCollection() |
| | | this.workpieceInformation.inboundTime = this.getCurrentTime() |
| | | const param = { |
| | | processesCode: this.headContent.processesCode, |
| | | productCode: this.workpieceInformation.productCode |
| | | } |
| | | fistSetpNumber(param).then(response => { |
| | | console.log("fistSetpNumber------"+response.msg) |
| | |
| | | self.$message('未找到参数码,请检查参数码是否正确'); |
| | | return; |
| | | } |
| | | self.formulaChildParams.artificialNgFlag = null |
| | | console.log("self.formulaChildParams.artificialNgFlag"+self.formulaChildParams.artificialNgFlag) |
| | | if(self.headContent.sfcCode!==null||self.headContent.sfcCode!==''){ |
| | | updateTighteningFormula(param).then(response => { |
| | | //addTighteningParameters(param).then(response => {}); |