| | |
| | | package com.jcdm; |
| | | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
| | |
| | | # 实例演示开关 |
| | | demoEnabled: true |
| | | # 文件路径 示例( Windows配置D:/jcdm/uploadPath,Linux配置 /home/jcdm/uploadPath) |
| | | profile: D:/ruoyi/uploadPath |
| | | profile: D:/uploadPath |
| | | # 获取ip地址开关 |
| | | addressEnabled: false |
| | | # 验证码类型 math 数字计算 char 字符验证 |
| | |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | LocalDateTime startTime = LocalDateTime.of(now.getYear(),now.getMonthValue(),now.getDayOfMonth(),8,0,0); |
| | | LocalDateTime endTime = LocalDateTime.of(now.getYear(),now.getMonthValue(),now.plusDays(1).getDayOfMonth(),22,0,0); |
| | | LocalDateTime endTime = LocalDateTime.of(now.getYear(),now.getMonthValue(),now.plusDays(1).getDayOfMonth(),23,0,0); |
| | | String s1 = startTime.format(formatter); |
| | | String s2 = endTime.format(formatter); |
| | | bsOrderScheduling.setStartTime(s1); |
| | |
| | | import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig; |
| | | import com.jcdm.main.da.opcuaconfig.domain.NodeEntity; |
| | | import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService; |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | import com.jcdm.main.da.paramCollection.mapper.DaParamCollectionMapper; |
| | | import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService; |
| | | import com.jcdm.main.plcserver.sub.OPCUaSubscription; |
| | | import com.kangaroohy.milo.model.ReadWriteEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | import static com.jcdm.main.plcserver.sub.OPCUaSubscription.miloService; |
| | | |
| | | /** |
| | | * 交互信号配置Controller |
| | | * |
| | |
| | | { |
| | | @Autowired |
| | | private IDaOpcuaConfigService daOpcuaConfigService; |
| | | private IDaParamCollectionService daParamCollectionService; |
| | | |
| | | /** |
| | | * 查询交互信号配置列表 |
| | |
| | | ReadWriteEntity entity = new ReadWriteEntity("CFL4HX."+locationCode+".SNCode", SNCode); |
| | | Boolean out= true; |
| | | try { |
| | | OPCUaSubscription.miloService.writeToOpcUa(entity);//写SN |
| | | miloService.writeToOpcUa(entity);//写SN |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return toAjax(out); |
| | | } |
| | | |
| | | /** |
| | | * 配瓦扫码 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:opcuaconfig:query')") |
| | | @GetMapping(value = "/barcode/{barcode}/{locationCode}") |
| | | public AjaxResult setBarcode(@PathVariable("barcode") String barcode,@PathVariable("locationCode") String locationCode) { |
| | | Boolean out= true; |
| | | try { |
| | | Object SNCodeObject = miloService.readFromOpcUa("CFL4HX."+locationCode+".Code1").getValue(); |
| | | if (null == SNCodeObject){ |
| | | SNCodeObject = miloService.readFromOpcUa("CFL4HX."+locationCode+ ".Code").getValue(); |
| | | } |
| | | if (null != SNCodeObject){ |
| | | String SNCode = SNCodeObject.toString(); |
| | | //插入数据 |
| | | DaParamCollection saveData = new DaParamCollection(); |
| | | saveData.setSfcCode(SNCode); |
| | | saveData.setParamValue(barcode); |
| | | saveData.setLocationCode(locationCode); |
| | | saveData.setParamCode("XTM"); |
| | | saveData.setParamName("曲轴码"); |
| | | daParamCollectionService.insertDaParamCollection(saveData); |
| | | } |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | lists, |
| | | rmRepairRecordService, |
| | | bsTechnologyRouteChildInfoService); |
| | | |
| | | |
| | | miloService.subscriptionFromOpcUa(collect,100,opcUaSubscription); |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | DaOpcuaConfig config = new DaOpcuaConfig(); |
| | | config.setState(0); |
| | | List<DaOpcuaConfig> list = iDaOpcuaConfigService.selectDaOpcuaConfigList(config); |
| | | // List<String> lists = new ArrayList<>(); |
| | | // if (CollUtil.isNotEmpty(list)){ |
| | | // lists = list.stream().map(DaOpcuaConfig::getNode).distinct().collect(Collectors.toList()); |
| | | // } |
| | | // List<String> lists = new ArrayList<>(); |
| | | //// lists.add(OPCElement.OP010_SaveRequest);//请求保存 |
| | | //// lists.add(OPCElement.OP010_CodeCheck);//请求检索条码 |
| | | //// lists.add(OPCElement.OP020_SaveRequest);//请求保存 |
| | | // lists.add(OPCElement.OP120_SaveRequestLast);//请求保存 |
| | | // lists.add(OPCElement.OP120_ZZ_CODE_CHECK);//请求保存 |
| | | return list; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling; |
| | | import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService; |
| | | import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService; |
| | | import com.jcdm.main.da.passingStationCollection.service.impl.DaPassingStationCollectionServiceImpl; |
| | | import com.jcdm.main.webservice.service.ReceivingServices; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | @Component("ryTask") |
| | | public class RyTask |
| | | { |
| | | @Autowired |
| | | private DaPassingStationCollectionServiceImpl passingStationCollectionServiceImpl; |
| | | @Autowired |
| | | private IBsOrderSchedulingService bsOrderSchedulingService; |
| | | private static final Logger logger = LoggerFactory.getLogger("sys-user"); |
| | | public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) |
| | | { |
| | |
| | | |
| | | public void ryNoParams() |
| | | { |
| | | System.out.println("执行无参方法"); |
| | | String a=passingStationCollectionServiceImpl.SelectSN("88","OP010"); |
| | | System.out.println("执行过程返回:" + a); |
| | | } |
| | | |
| | | @Autowired |
| | | private IBsOrderSchedulingService bsOrderSchedulingService; |
| | | String url = "http://podqapp.cfmoto.com.cn:50100/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_MES&receiverParty=&receiverService=&interface=SI_ZPP_CF_BC_001_SYN_OUT&interfaceNamespace=http://cfmoto.com/xi/MES"; |
| | | public void workReportingTasks(){ |
| | | report10(); |
| | |
| | | } |
| | | |
| | | // 查询交互信号配置详细 |
| | | export function setSNCode(SNCode,locationCode) { |
| | | export function setBarcode(barcode,locationCode) { |
| | | return request({ |
| | | url: '/da/opcuaconfig/SNCode/' + SNCode+'/'+locationCode, |
| | | url: '/da/opcuaconfig/barcode/' + barcode+'/'+locationCode, |
| | | method: 'get' |
| | | }) |
| | | } |
| | |
| | | left: 'left' // 标题位置 |
| | | }, |
| | | xAxis: { |
| | | data: ['8:00', '9:00', '10:00','11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00','21:00','22:00'], |
| | | data: ['8:00', '9:00', '10:00','11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00','21:00','22:00','23:00'], |
| | | boundaryGap: false, |
| | | axisTick: { |
| | | show: false |
| | |
| | | <el-form ref="form" :model="form" label-width="25%" > |
| | | <el-form-item prop="engineNo" style="margin-top: 16px"> |
| | | <span slot="label" style="font-size:22px;color:black;"><strong>曲轴码</strong></span> |
| | | <el-input style="font-size:20px" v-model="form.engineNo" placeholder="请扫描曲轴码" clearable @input="EngineNohandleChange"> |
| | | <el-input style="font-size:20px" v-model="form.barcode" placeholder="请扫描曲轴码" clearable @input="EngineNohandleChange"> |
| | | <el-button slot="append" plain type="info" @click="EngineNohandleChange" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | import { listOrderScheduling, getOrderScheduling, delOrderScheduling, addOrderScheduling, updateOrderScheduling } from "@/api/main/bs/orderScheduling/orderScheduling"; |
| | | import { listPassingStationCollection, getPassingStationCollection, delPassingStationCollection, addPassingStationCollection, updatePassingStationCollection } from "@/api/main/da/passingStationCollection/passingStationCollection"; |
| | | import {listLineInfo} from "@/api/main/bs/lineInfo/lineInfo"; |
| | | import { setSNCode } from "@/api/main/da/opcuaconfig/opcuaconfig"; |
| | | import { setBarcode } from "@/api/main/da/opcuaconfig/opcuaconfig"; |
| | | import {getIp, listStationConf} from "@/api/main/sc/stationConf"; |
| | | import QRCode from "qrcodejs2"; |
| | | |
| | |
| | | }, |
| | | // 表单参数 |
| | | form: { |
| | | engineNo: null, |
| | | barcode: null, |
| | | productType:null, |
| | | orderNo:null, |
| | | qualityStatus:null, |
| | |
| | | }, |
| | | reset() { |
| | | this.form = { |
| | | engineNo:null, |
| | | barcode:null, |
| | | productType:null, |
| | | orderNo:null, |
| | | qualityStatus:null, |
| | |
| | | this.resetForm("form"); |
| | | }, |
| | | EngineNohandleChange(){ |
| | | if(this.form.engineNo !== null && this.form.engineNo !== undefined){ |
| | | setSNCode(this.form.engineNo,this.locationCode) |
| | | |
| | | if(this.form.barcode !== null && this.form.barcode !== undefined){ |
| | | setBarcode(this.form.barcode,this.locationCode) |
| | | } |
| | | }, |
| | | parseQRCode(code) { |