admin
2024-10-15 6d313a4a6f9f9d7ea65ec50ab0d4491e595edb97
-打印bug修改
已修改2个文件
83 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/stationTerminal/index.vue 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java
@@ -86,6 +86,19 @@
    @PostMapping("/deviceResultFeedback")
    public AjaxResult deviceResultFeedback(@RequestBody ParentVO parentVO)
    {
//        if(parentVO.getStationCode().contains("POP360")){
//            String softwareNumberOne = parentVO.getCheckList().get(31).getItemValue();
//            String softwareNumberTwo = parentVO.getCheckList().get(32).getItemValue();
//            String hardwareNumberOne = parentVO.getCheckList().get(33).getItemValue();
//            String hardwareNumberTwo = parentVO.getCheckList().get(34).getItemValue();
//
//            parentVO.getCheckList().get(31).setItemValue("SSW00"+softwareNumberOne+".00"+softwareNumberTwo);
//            parentVO.getCheckList().get(33).setItemValue("HHW00"+hardwareNumberOne+".00"+hardwareNumberTwo);
//
//            parentVO.getCheckList().remove(32);
//            parentVO.getCheckList().remove(33);
//        }
        ObjectMapper mapper = new ObjectMapper();
        List<ChildVO> li = parentVO.getCheckList();
        String s = null;
@@ -129,7 +142,7 @@
    }
    @GetMapping("/productionWorkOrderRequest")
    public AjaxResult productionWorkOrderRequest(){
    public AjaxResult productionWorkOrderRequest(@RequestParam String productNum){
        List<RestFulOrder> restFulOrders = new ArrayList<>();
//        try{
//            CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
@@ -148,7 +161,24 @@
//        }catch (Exception e){
//            System.out.println(e.getMessage());
//        }
        return AjaxResult.success(restFulOrders);
        String result = "";
        try {
            String reportResult = RestfulService.getWorkReportResultFeedback(productNum, "POP230", format.format(new Date()));
            JSONObject jsonObject = new JSONObject(reportResult);
            String code = jsonObject.getStr("code");
            String resultCode = jsonObject.getJSONObject("data").getStr("resultCode");
            if("success".equals(code)&&"S".equals(resultCode)){
                //如果成功,执行报工成功方法,修改是否报工为1,添加报工时间
                result = "成功";
            }else{
                //解析工厂mes返回结果,如果失败,执行报工失败方法,修改是否报工为2,添加报工时间
                result = "try失败";
            }
        }catch (Exception e){
            e.printStackTrace();
            result = "catch失败";
        }
        return AjaxResult.success(result);
    }
    @GetMapping("/getQualityData")
jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -97,9 +97,15 @@
         </el-row>
         <el-row v-show="offlineFlag" style="margin-top: 20px">
           <el-button id="print" v-print="'#printMe'" type="primary">打印三联码</el-button>
           <el-button id="printBack" v-print="'#printMeBack'" type="primary">打印一联码</el-button><br>
           <el-button style="margin-top: 20px" id="print" v-print="'#printMe'" type="primary">打印三联码</el-button>
           <el-button style="display: none" @click="test1">生成二维码</el-button>
           <el-button style="display: none" @click="test2">生成
             <span style="font-size: 10px;margin-left: 52px">MADE IN CHINA</span><br>
             <br>
             <br>二维码</el-button>
           <el-button style="display: none" @click="test4">生成二维码</el-button>
           <el-button style="display: none" @click="test5">生成
             <span style="font-size: 10px;margin-left: 52px">MADE IN CHINA</span><br>
             <br>
             <br>二维码</el-button>
@@ -128,6 +134,19 @@
               <br>
               <br>
               <div ref="canvasWrapper" id="canvasWrapper2" style="display: flex;justify-content: center;margin-top: -27px"></div>
               <span style="font-size: 10px;word-break: break-all;display: flex;justify-content: center;width: 155px;margin-left: 20px;margin-top: 3px">P{{printInfoData.partNumber}}#T{{headContent.sfcCode}}#V{{printInfoData.supplierCode}}#S{{printInfoData.softwareVersion}}#H{{printInfoData.hardwareVersion}}#NBMS#</span>
             </div>
           </div>
           <div style="display: none">
             <div  id="printMeBack">
               <br>
               <br>
               <div ref="canvasWrapper" id="canvasWrapper4" style="display: flex;justify-content: center;margin-top: -27px"></div>
               <span style="font-size: 10px;word-break: break-all;display: flex;justify-content: center;width: 155px;margin-left: 20px;margin-top: 3px">P{{printInfoData.partNumber}}#T{{headContent.sfcCode}}#V{{printInfoData.supplierCode}}#S{{printInfoData.softwareVersion}}#H{{printInfoData.hardwareVersion}}#NBMS#</span>
               <br>
               <br>
               <div ref="canvasWrapper" id="canvasWrapper5" style="display: flex;justify-content: center;margin-top: -27px"></div>
               <span style="font-size: 10px;word-break: break-all;display: flex;justify-content: center;width: 155px;margin-left: 20px;margin-top: 3px">P{{printInfoData.partNumber}}#T{{headContent.sfcCode}}#V{{printInfoData.supplierCode}}#S{{printInfoData.softwareVersion}}#H{{printInfoData.hardwareVersion}}#NBMS#</span>
             </div>
           </div>
@@ -544,6 +563,32 @@
        }
      )
    },
    test4(){
      document.getElementById('canvasWrapper4').innerHTML = '';
      this.$nextTick(() => {
          let qrCode = new QRCode('canvasWrapper4',{
            width: 120,
            height: 120,
            text: 'P'+this.printInfoData.partNumber+'#T'+ this.headContent.sfcCode +'#V'+this.printInfoData.supplierCode+'#S'+this.printInfoData.softwareVersion+'#H'+this.printInfoData.hardwareVersion+'#NBMS#',
            colorDark: '#000',
            colorLight: '#fff'
          })
        }
      )
    },
    test5(){
      document.getElementById('canvasWrapper5').innerHTML = '';
      this.$nextTick(() => {
          let qrCode = new QRCode('canvasWrapper5',{
            width: 120,
            height: 120,
            text: 'P'+this.printInfoData.partNumber+'#T'+ this.headContent.sfcCode +'#V'+this.printInfoData.supplierCode+'#S'+this.printInfoData.softwareVersion+'#H'+this.printInfoData.hardwareVersion+'#NBMS#',
            colorDark: '#000',
            colorLight: '#fff'
          })
        }
      )
    },
    print1() {
      // 使用插件打印方式
      // this.$print(this.$refs.printMe)
@@ -731,6 +776,8 @@
      if(this.headContent.processesCode === 'POP430'){
        this.test1()
        this.test2()
        this.test4()
        this.test5()
      }
      this.getListFormulaChild()
      // this.addOverStationCollection()