-
懒羊羊
2024-03-28 1df825000b911e5f7b1ad33fc6d0de95793f071a
-
已修改4个文件
61 ■■■■■ 文件已修改
jcdm-framework/src/main/java/com/jcdm/framework/config/SecurityConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/controller/EmInspectionPlanItemsProjectController.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/stationTerminal/index.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-framework/src/main/java/com/jcdm/framework/config/SecurityConfig.java
@@ -111,7 +111,7 @@
                // 过滤请求
                .authorizeRequests()
                // 对于登录login 注册register 验证码captchaImage 允许匿名访问
                .antMatchers("/login", "/register", "/captchaImage","/websocket/**","/postWebsocket/**","/em/inspectionPlanTask/noPageList","/em/inspectionPlanItemsProject/findPlanItemsProjectByPlanId").permitAll()
                .antMatchers("/login", "/register", "/captchaImage","/websocket/**","/postWebsocket/**","/em/inspectionPlanTask/noPageList","/em/inspectionPlanItemsProject/**").permitAll()
                // 静态资源,可匿名访问
                .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
                .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java
@@ -222,6 +222,7 @@
                //更新过站记录表出站时间
                DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
                daPassingStationCollection.setWorkOrderNo(daParamCollection.getWorkOrderNo());
                daPassingStationCollection.setLocationCode(daParamCollection.getLocationCode());
                List<DaPassingStationCollection> daPassingStationCollections = daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection);
                daPassingStationCollections.get(0).setOutboundTime(new Date());
                int i = daPassingStationCollectionMapper.updateDaPassingStationCollection(daPassingStationCollections.get(0));
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/controller/EmInspectionPlanItemsProjectController.java
@@ -1,10 +1,16 @@
package com.jcdm.main.em.inspectionPlanItemsProject.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jcdm.framework.websocket.WebSocketUsers;
import com.jcdm.main.em.inspectionPlanTask.domain.EmInspectionPlanTask;
import com.jcdm.main.em.inspectionPlanTask.service.IEmInspectionPlanTaskService;
import org.aspectj.weaver.loadtime.Aj;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
@@ -31,15 +37,47 @@
    @Autowired
    private IEmInspectionPlanItemsProjectService emInspectionPlanItemsProjectService;
    @Autowired
    private IEmInspectionPlanTaskService emInspectionPlanTaskService;
    @GetMapping("/findPlanItemsProjectByPlanId")
    public AjaxResult list2(EmInspectionPlanItemsProject emInspectionPlanItemsProject)
    {
        EmInspectionPlanTask byId = emInspectionPlanTaskService.getById(emInspectionPlanItemsProject.getPlanTaskId());
        List<EmInspectionPlanItemsProject> planTaskIdList = emInspectionPlanItemsProjectService
                .list(new LambdaQueryWrapper<EmInspectionPlanItemsProject>()
                        .eq(EmInspectionPlanItemsProject::getPlanTaskId,emInspectionPlanItemsProject.getPlanTaskId()));
        return AjaxResult.success(planTaskIdList);
                        .eq(EmInspectionPlanItemsProject::getPlanTaskId,emInspectionPlanItemsProject.getPlanTaskId())
                        .eq(EmInspectionPlanItemsProject::getItemsType,emInspectionPlanItemsProject.getItemsType()));
        Map<String,Object> resultMap = new HashMap<>();
        resultMap.put("planItemsProject", planTaskIdList);
        resultMap.put("planTask",byId);
        return AjaxResult.success(resultMap);
    }
    @PostMapping("/updateItemsProjectResults")
    public AjaxResult updateItemsProjectResults(@RequestBody EmInspectionPlanItemsProject emInspectionPlanItemsProject)
    {
        EmInspectionPlanItemsProject itemsProject = emInspectionPlanItemsProjectService.getById(emInspectionPlanItemsProject.getId());
        itemsProject.setResults(emInspectionPlanItemsProject.getResults());
        emInspectionPlanItemsProjectService.saveOrUpdate(itemsProject);
        List<EmInspectionPlanItemsProject> list = emInspectionPlanItemsProjectService.list(new LambdaQueryWrapper<EmInspectionPlanItemsProject>()
                .eq(EmInspectionPlanItemsProject::getPlanTaskId, itemsProject.getPlanTaskId()));
        List<String> collect = list.stream().map(EmInspectionPlanItemsProject::getResults).collect(Collectors.toList());
        if(collect.stream().noneMatch(s -> s.equals("0"))){
            EmInspectionPlanTask planTaskById = emInspectionPlanTaskService.getById(itemsProject.getPlanTaskId());
            planTaskById.setResults("1");
            emInspectionPlanTaskService.saveOrUpdate(planTaskById);
        }
        return AjaxResult.success();
    }
    /**
     * 查询点检任务-项目列表
     */
jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -360,7 +360,7 @@
      },
      content: '',
      activeName: 'first',
      url: "ws://192.168.10.21:8080/websocket/message/",
      url: "ws://192.168.10.198:8080/websocket/message/",
      message: "",
      text_content: "",
      ws: null,
@@ -499,7 +499,15 @@
        this.formulaChildList = response.rows;
      });
    },
    endClear(){
      this.cakeLamp.InPlace= 0 //工件到位
      this.cakeLamp.scanFinish= 0
      this.cakeLamp.startWork= 0
      this.cakeLamp.release= 0 //允许放行
      this.formulaChildList = []
      this.headContent.sfcCode = null
    },
    changeMenu(tab, event) {
      console.log(tab, event);
    },
@@ -562,6 +570,7 @@
        alert("未连接到服务器");
      }
    },
    initStation: async function () {
      await getIpv4().then(response => {
        this.StationConfQueryParams.ipAddress = response.msg
@@ -603,6 +612,7 @@
          }
          saveCampaignTimeParameters(param).then(response => {});
          self.cakeLamp.release = 1;
          self.endClear()
        } else if (event.data.includes("[")) {
          let formulaChilds = "";
@@ -635,6 +645,8 @@
      };
    },
    //接受数据的回调
    callBack(value) {
      if (this.form1.isShowHistory) this.form1.desc = this.readLi().join("");
@@ -643,9 +655,11 @@
        console.log("串口收到数据-------------------"+scanValue)
        // if(this.cakeLamp.InPlace=== 1){
          if(this.headContent.sfcCode !== ''){
            this.$message('扫描物料编码'+scanValue);
            console.log(scanValue)
            this.serialPortMethod(scanValue)
          }else {
            this.$message('扫码识别产品序列号'+scanValue);
            this.headContent.sfcCode = scanValue;
            this.queryParams.productNum = scanValue;
            this.getList()