| | |
| | | // è¿æ»¤è¯·æ± |
| | | .authorizeRequests() |
| | | // 对äºç»å½login 注åregister éªè¯ç captchaImage å
许å¿åè®¿é® |
| | | .antMatchers("/login", "/register", "/captchaImage","/websocket/**","/postWebsocket/**","/em/inspectionPlanTask/**","/em/inspectionPlanItemsProject/**").permitAll() |
| | | .antMatchers("/login", "/register", "/captchaImage","/websocket/**","/postWebsocket/**","/em/inspectionPlanTask/**","/em/inspectionPlanItemsProject/**","/jcdmMes/**").permitAll() |
| | | // éæèµæºï¼å¯å¿åè®¿é® |
| | | .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() |
| | | .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() |
| | |
| | | BsFormulaChildInfo checkInfo = new BsFormulaChildInfo(); |
| | | checkInfo.setProcessesCode(bsFormulaChildInfo.getLocationCode()); |
| | | checkInfo.setProductCode(bsFormulaChildInfo.getProductCode()); |
| | | checkInfo.setMaterialCode(bsFormulaChildInfo.getScanBarcode()); |
| | | // bsFormulaChildInfo.setMaterialCode(bsFormulaChildInfo.getScanBarcode().substring(1,2)); |
| | | // checkInfo.setMaterialCode(bsFormulaChildInfo.getScanBarcode()); |
| | | bsFormulaChildInfo.setMaterialCode(bsFormulaChildInfo.getScanBarcode().substring(1,2)); |
| | | List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(checkInfo); |
| | | if(bsFormulaChildInfos.size()>0){ |
| | | String spareField4 = bsFormulaChildInfos.get(0).getSpareField4(); |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ´æ¢æ»æå· |
| | | */ |
| | | @PostMapping("/replaceAssemblyCode") |
| | | public void replaceAssemblyCode(@RequestBody DaParamCollection daParamCollection) |
| | | { |
| | | daParamCollectionService.replaceAssemblyCode(daParamCollection); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤äº§åè¿ç¨åæ°éé |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:paramCollection:edit')") |
| | |
| | | package com.jcdm.main.da.paramCollection.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.BaseEntity; |
| | | import lombok.Data; |
| | |
| | | @Excel(name = "ç±»å") |
| | | private String type; |
| | | |
| | | @TableField(exist = false) |
| | | private String model; |
| | | |
| | | @TableField(exist = false) |
| | | private String productBarcode; |
| | | |
| | | @TableField(exist = false) |
| | | private String tightenTheArray; |
| | | |
| | | @TableField(exist = false) |
| | | private String productModel; |
| | | |
| | | @TableField(exist = false) |
| | | private String yzSfcCode; |
| | | |
| | | public String getTightenTheArray() { |
| | | return tightenTheArray; |
| | | } |
| | |
| | | |
| | | void insertBatch(List<DaParamCollection> confList); |
| | | |
| | | void replaceAssemblyCode(DaParamCollection daParamCollection); |
| | | } |
| | |
| | | @Resource |
| | | private SqlSessionFactory sqlSessionFactory; |
| | | |
| | | @Autowired |
| | | private IDaParamCollectionService daParamCollectionService; |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void replaceAssemblyCode(DaParamCollection daParamCollection) { |
| | | List<DaParamCollection> list = daParamCollectionService.list(new LambdaQueryWrapper<DaParamCollection>() |
| | | .eq(DaParamCollection::getSfcCode, daParamCollection.getSfcCode()) |
| | | .eq(DaParamCollection::getLocationCode, daParamCollection.getLocationCode()) |
| | | ); |
| | | if(list.size() > 0){ |
| | | for (DaParamCollection paramCollection : list) { |
| | | paramCollection.setSfcCode(daParamCollection.getYzSfcCode()); |
| | | daParamCollectionService.saveOrUpdate(paramCollection); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
ÎļþÃû´Ó jcdm-main/src/main/java/com/jcdm/main/restful/controller/testClass.java ÐÞ¸Ä |
| | |
| | | package com.jcdm.main.restful.controller; |
| | | package com.jcdm.main.restful.factoryMes.controller; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Timer; |
ÎļþÃû´Ó jcdm-main/src/main/java/com/jcdm/main/restful/service/RestfulService.java ÐÞ¸Ä |
| | |
| | | package com.jcdm.main.restful.service; |
| | | package com.jcdm.main.restful.factoryMes.service; |
| | | |
| | | import cn.hutool.http.HttpRequest; |
| | | import cn.hutool.http.HttpResponse; |
| | |
| | | <result property="paramLower" column="param_lower" /> |
| | | <result property="paramStandard" column="param_standard" /> |
| | | <result property="collectionTime" column="collection_time" /> |
| | | <result property="spareField1" column="spare_field_1" /> |
| | | <result property="spareField2" column="spare_field_2" /> |
| | | <result property="spareField1" column="spare_field1" /> |
| | | <result property="spareField2" column="spare_field2" /> |
| | | <result property="createUser" column="create_user" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectDaParamCollectionVo"> |
| | | select id, work_order_no, sfc_code, product_code, production_line, location_code, equipment_no, param_code, param_value, param_upper, param_lower, param_standard, collection_time, spare_field_1, spare_field_2, create_user, create_time, update_user, update_time, state, param_name, unit, type from da_param_collection |
| | | select id, work_order_no, sfc_code, product_code, production_line, location_code, equipment_no, param_code, param_value, param_upper, param_lower, param_standard, collection_time, spare_field1, spare_field2, create_user, create_time, update_user, update_time, state, param_name, unit, type from da_param_collection |
| | | </sql> |
| | | |
| | | <select id="selectDaParamCollectionList" parameterType="DaParamCollection" resultMap="DaParamCollectionResult"> |
| | |
| | | <if test="paramLower != null">param_lower,</if> |
| | | <if test="paramStandard != null">param_standard,</if> |
| | | <if test="collectionTime != null">collection_time,</if> |
| | | <if test="spareField1 != null">spare_field_1,</if> |
| | | <if test="spareField2 != null">spare_field_2,</if> |
| | | <if test="spareField1 != null">spare_field1,</if> |
| | | <if test="spareField2 != null">spare_field2,</if> |
| | | <if test="createUser != null">create_user,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | |
| | | }) |
| | | } |
| | | |
| | | // 线边æ»ææ¢æ»æç |
| | | export function replaceAssemblyCode(data) { |
| | | return request({ |
| | | url: '/main/paramCollection/replaceAssemblyCode', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢è®¾å¤äº§åè¿ç¨åæ°éé saveCampaignTimeParameters |
| | | export function saveCampaignTimeParameters(data) { |
| | | return request({ |
| | |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | <el-row style="margin-top: 20px"> |
| | | <el-button @click="Release" type="primary">æ¾è¡</el-button> |
| | | <el-col></el-col> |
| | | <span style="width: 130px;" class="head-font">é¢è£
æ»æå· : {{headContent.yzSfcCode}}</span> |
| | | </el-row> |
| | | <el-row style="margin-top: 20px"> |
| | | <!-- <el-button @click="Release" type="primary">ç»å®</el-button>--> |
| | | <el-button @click="bindYzSfc" type="primary">ç»å®</el-button> |
| | | |
| | | </el-row> |
| | | </el-card> |
| | | |
| | |
| | | addBasicParameters, |
| | | addParamCollection, |
| | | addTighteningParameters, |
| | | saveCampaignTimeParameters |
| | | saveCampaignTimeParameters, |
| | | replaceAssemblyCode, |
| | | } from "@/api/main/da/paramCollection/paramCollection"; |
| | | |
| | | export default { |
| | |
| | | processesCode: 'OP1010', |
| | | processesName: 'è´´æ æº-è´´ç ', |
| | | sfcCode: '', |
| | | yzSfcCode: '', |
| | | }, |
| | | workpieceInformation: { |
| | | workOrderNo: null, |
| | |
| | | }, |
| | | content: '', |
| | | activeName: 'first', |
| | | url: "ws://192.168.1.100:8080/websocket/message/", |
| | | url: "ws://192.168.1.106:8080/websocket/message/", |
| | | message: "", |
| | | text_content: "", |
| | | ws: null, |
| | |
| | | methods: { |
| | | serialLink() { |
| | | this.open1 = true |
| | | }, |
| | | bindYzSfc(){ |
| | | if(this.headContent.sfcCode!==""&&this.headContent.yzSfcCode!==""){ |
| | | let param = { |
| | | sfcCode: this.headContent.sfcCode, |
| | | locationCode: this.headContent.processesCode, |
| | | yzSfcCode: this.headContent.yzSfcCode |
| | | } |
| | | this.$message('å¯ä»¥ç»å®ï¼'); |
| | | replaceAssemblyCode(param).then(response => { |
| | | |
| | | }); |
| | | } |
| | | }, |
| | | Release(){ |
| | | // this.$message('portsListï¼'+this.portsList.length); |
| | |
| | | else { |
| | | const scanValue = this.myserialport.hex2atostr(value).replace(/[\r\n]/g, ''); |
| | | console.log("串å£æ¶å°æ°æ®-------------------"+scanValue) |
| | | // if(this.cakeLamp.InPlace=== 1){ |
| | | if(this.headContent.sfcCode !== ''){ |
| | | |
| | | if(this.headContent.sfcCode !== ''){ |
| | | if(scanValue.includes("SS")){ |
| | | this.headContent.yzSfcCode = scanValue |
| | | }else { |
| | | this.$message('æ«æç©æç¼ç '+scanValue); |
| | | console.log(scanValue) |
| | | this.serialPortMethod(scanValue) |
| | | }else { |
| | | this.$message('æ«ç è¯å«äº§ååºåå·'+scanValue); |
| | | this.headContent.sfcCode = scanValue; |
| | | this.queryParams.productNum = scanValue; |
| | | this.getList() |
| | | // this.getListFormulaChild() |
| | | this.cakeLamp.scanFinish = 1 |
| | | this.cakeLamp.startWork = 1 |
| | | } |
| | | // }else { |
| | | // this.$message('工件æªå°ä½ç¦æ¢æ«ç ï¼'); |
| | | // } |
| | | } else { |
| | | this.$message('æ«ç è¯å«äº§ååºåå·'+scanValue); |
| | | this.headContent.sfcCode = scanValue; |
| | | this.queryParams.productNum = scanValue; |
| | | this.getList() |
| | | this.cakeLamp.scanFinish = 1 |
| | | this.cakeLamp.startWork = 1 |
| | | } |
| | | |
| | | } |
| | | }, |
| | | clearHistory() { |