jcdm-framework/src/main/java/com/jcdm/framework/config/SecurityConfig.java
@@ -115,6 +115,7 @@ // 静态资源,可匿名访问 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() .antMatchers("/bs/technologyRouteChild/ttest").permitAll() .antMatchers("/websocket/**").anonymous() // 除上面外的所有请求全部需要鉴权认证 .anyRequest().authenticated() jcdm-main/src/main/java/com/jcdm/main/bs/technologyRouteChild/controller/BsTechnologyRouteChildInfoController.java
@@ -3,6 +3,7 @@ import com.jcdm.common.annotation.Log; import com.jcdm.common.core.controller.BaseController; import com.jcdm.common.core.domain.AjaxResult; import com.jcdm.common.core.domain.R; import com.jcdm.common.core.page.TableDataInfo; import com.jcdm.common.enums.BusinessType; import com.jcdm.common.utils.poi.ExcelUtil; @@ -95,4 +96,11 @@ { return toAjax(bsTechnologyRouteChildInfoService.deleteBsTechnologyRouteChildInfoByIds(ids)); } @GetMapping("/ttest") public R Test(){ String code = "191S"; List<BsTechnologyRouteChildInfo> bsTechnologyRouteChildInfos = bsTechnologyRouteChildInfoService.selectAllTechnologyRouteByProductCode(code); return R.ok(bsTechnologyRouteChildInfos); } } jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -155,8 +155,8 @@ Object SNCodeObject = miloService.readFromOpcUa(parts[0] + "." + parts[1] + ".Code").getValue(); if(null != SNCodeObject) { String SNCode=SNCodeObject.toString(); String a=passingStationCollectionServiceImpl.SelectSN(SNCode,parts[1]); // String a="1"; // String a=passingStationCollectionServiceImpl.SelectSN(SNCode,parts[1]); String a="1"; // 1:OK可生产 2:NG不可生产 3:NG可返工 4:PC检索失败(无记录)5:PC检索失败(软件) if (StrUtil.isNotBlank(a)){ int input = Integer.parseInt(a); @@ -175,7 +175,7 @@ } ReadWriteEntity entity2 = new ReadWriteEntity(parts[0]+"."+parts[1]+".OrderNumber", orderNum); miloService.writeToOpcByte(entity2); miloService.writeToOpcUa(entity2); } //如果是返修工位需要传输返修工位号 if (OPCElement.OP465_ZZ_CODE_CHECK.equals(Node) || OPCElement.OP355_ZZ_CODE_CHECK.equals(Node)){ @@ -245,6 +245,7 @@ List<DaCollectionParamConf> list; DaCollectionParamConf daCollectionParamConf = new DaCollectionParamConf(); daCollectionParamConf.setGatherAddress(parts[0] + "." + parts[1]); daCollectionParamConf.setRemarks("1"); list = collectionParamConfService.selectDaCollectionParamConfList(daCollectionParamConf); List<String> nodeIdList = list.stream().map(info -> { @@ -256,8 +257,8 @@ List<ReadWriteEntity> readWriteEntityList = miloService.readFromOpcUa(nodeIdList); List<DaParamCollection> daParamCollectionlist = new ArrayList<>(); for(int i=0;i<nodeIdList.size();i++){ DaParamCollection ParamCollection = new DaParamCollection(); if(!readWriteEntityList.get(i).getValue().toString().equals("0.0")){ DaParamCollection ParamCollection = new DaParamCollection(); ParamCollection.setParamCode(readWriteEntityList.get(i).getIdentifier().toString().split("[.]")[2]); ParamCollection.setLocationCode(parts[1]); ParamCollection.setParamValue(readWriteEntityList.get(i).getValue().toString()); @@ -272,6 +273,7 @@ daParamCollectionlist.add(ParamCollection); } } System.out.println("11111111111111"); daParamCollectionService.saveBeachDaParamCollection(daParamCollectionlist); } jcdm-main/src/main/resources/mapper/bs/technologyRouteChild/BsTechnologyRouteChildInfoMapper.xml
@@ -164,12 +164,14 @@ <select id="selectAllTechnologyRouteByProductCode" parameterType="String" resultMap="BsTechnologyRouteChildInfoResult"> <include refid="selectBsTechnologyRouteChildInfoVo"/> left join bs_technology_route_info on bs_technology_route_info.route_code = bs_technology_route_child_info.route_code SELECT c.* FROM bs_technology_route_child_info c LEFT JOIN bs_technology_route_info i ON i.route_code = c.route_code <where> <if test="productCode != null and productCode != ''"> and bs_technology_route_info.product_code = #{productCode} and i.product_code = #{productCode} </if> </where> </select> jcdm-main/src/main/resources/mapper/da/collectionParamConf/DaCollectionParamConfMapper.xml
@@ -48,6 +48,7 @@ <if test="collectParameterType != null and collectParameterType != ''"> and collect_parameter_type like concat('%', #{collectParameterType}, '%')</if> <if test="productCode != null and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if> <if test="gatherAddress != null and gatherAddress != ''"> and gather_address like concat('%', #{gatherAddress}, '%')</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> </where> </select>