Procházet zdrojové kódy

fix:修正日志反推排序

hmc před 6 měsíci
rodič
revize
34aeed7674

+ 5 - 4
zkqy-admin/src/main/resources/application.yml

@@ -120,9 +120,10 @@ mybatis:
 # PageHelper分页插件
 pagehelper:
   helperDialect: mysql
-  supportMethodsArguments: true
+  supportMethodsArguments: false
   params: count=countSql
 
+
 # Shiro
 shiro:
   user:
@@ -192,12 +193,12 @@ projectDownloadZip:
 OpenAuthorization2:
   MES:
     # 单点获取code、token、userinfo主机地址
-    URL: http://192.168.110.83:8066/oauth2
+    URL: http://192.168.2.127:8066/oauth2
     # 系统标识
     BASIC: mes
     # 重定向本系统主机地址
-    REDIRECT_URL: http://192.168.110.83:1025
+    REDIRECT_URL: http://192.168.2.127:1025
     # 回调地址
-    CALLBACK: http://192.168.110.83:8066/oauth/callback
+    CALLBACK: http://192.168.2.127:8066/oauth/callback
     #
     NAME: hmc

+ 1 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/RingScanInformationController.java

@@ -101,6 +101,7 @@ public class RingScanInformationController extends BaseController
             hashMap.put("Ugw",item.getStationName());
             hashMap.put("Stime",item.getScanningTime());
             hashMap.put("SContent",item.getContentInformation());
+            hashMap.put("Sresult",item.getExecutionMessage());
             list1.add(hashMap);
         });
         return AjaxResult.success(list1);

+ 56 - 29
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/RingScanInformation.java

@@ -22,38 +22,9 @@ public class RingScanInformation extends BaseEntity
     /** 主键 */
     private Long id;
 
-    private  Integer offset;
-
-    public Integer getOffset() {
-        return offset;
-    }
-
-    public void setOffset(Integer offset) {
-        this.offset = offset;
-    }
-
     /** 扫描人 */
     private String personnelName;
 
-    private int pageNum;
-
-    public int getPageNum() {
-        return pageNum;
-    }
-
-    public void setPageNum(int pageNum) {
-        this.pageNum = pageNum;
-    }
-
-    public int getPageSize() {
-        return pageSize;
-    }
-
-    public void setPageSize(int pageSize) {
-        this.pageSize = pageSize;
-    }
-
-    private  int pageSize;
 
     /** 设备编号 */
     @Excel(name = "设备编号")
@@ -102,6 +73,62 @@ public class RingScanInformation extends BaseEntity
     @Excel(name = "生成订单号")
     private String productionOrderNumber;
 
+    /** 扫描标记 */
+    @Excel(name = "扫描标记 1 成功 2 失败")
+    private String executionMark;
+
+    /** 扫描信息 */
+    @Excel(name = "扫描信息")
+    private String executionMessage;
+
+    public String getExecutionMark() {
+        return executionMark;
+    }
+
+    public void setExecutionMark(String executionMark) {
+        this.executionMark = executionMark;
+    }
+
+    public String getExecutionMessage() {
+        return executionMessage;
+    }
+
+    public void setExecutionMessage(String executionMessage) {
+        this.executionMessage = executionMessage;
+    }
+
+    /** 分页sql用到了*/
+    private  Integer offset;
+
+    /** 当前页*/
+    private int pageNum;
+
+    /** 每页显示多少条*/
+    private  int pageSize;
+
+
+    public int getPageNum() {
+        return pageNum;
+    }
+
+    public void setPageNum(int pageNum) {
+        this.pageNum = pageNum;
+    }
+
+    public int getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(int pageSize) {
+        this.pageSize = pageSize;
+    }
+    public Integer getOffset() {
+        return offset;
+    }
+
+    public void setOffset(Integer offset) {
+        this.offset = offset;
+    }
 
     public String getStationId() {
         return stationId;

+ 24 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/RingScanInformationVo.java

@@ -20,6 +20,30 @@ public class RingScanInformationVo extends RingScanInformation {
 
     private  String  stationName;
 
+    private  String executionMessage;
+
+    private String  executionMark;
+
+    @Override
+    public String getExecutionMessage() {
+        return executionMessage;
+    }
+
+    @Override
+    public void setExecutionMessage(String executionMessage) {
+        this.executionMessage = executionMessage;
+    }
+
+    @Override
+    public String getExecutionMark() {
+        return executionMark;
+    }
+
+    @Override
+    public void setExecutionMark(String executionMark) {
+        this.executionMark = executionMark;
+    }
+
     @Override
     public String getPersonnelName() {
         return personnelName;

+ 2 - 2
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/scheduling/ScheduledBean.java

@@ -75,7 +75,7 @@ public class ScheduledBean {
      * //        System.out.println(ajaxResult2);
      * //        System.out.println(Thread.currentThread().getName()+":run...");
      */
-    @Scheduled(cron = "0 0/5 * * * ?", zone = "Asia/Shanghai")
+//    @Scheduled(cron = "0 0/5 * * * ?", zone = "Asia/Shanghai")
     public void printLog1(){
         //物料基本数据
         AjaxResult ajaxResult = this.pullMaterialBaseInfo();
@@ -338,7 +338,7 @@ public class ScheduledBean {
 
 
     //============================焊接计划数据定时拉取============================
-    @Scheduled(cron = "0 0/10 * * * ?", zone = "Asia/Shanghai")
+//    @Scheduled(cron = "0 0/10 * * * ?", zone = "Asia/Shanghai")
     public void printLog2() {
         //金蝶工具key
         K3CloudApi api = new K3CloudApi();

+ 1 - 1
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/RingScanInformationServiceImpl.java

@@ -84,7 +84,6 @@ public class RingScanInformationServiceImpl implements IRingScanInformationServi
         return ringScanInformationMapper.selectRingScanInformationList(ringScanInformation);
     }
 
-
     /**
      * 新增指环王扫描日志信息
      * 
@@ -140,6 +139,7 @@ public class RingScanInformationServiceImpl implements IRingScanInformationServi
 
     @Override
     public int selectRingScanCount(RingScanInformation ringScanInformation1) {
+        System.out.println("😊");
         return ringScanInformationMapper.selectRingScanInformationListScfyCount(ringScanInformation1);
     }
 }

+ 28 - 14
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/StationInformationServiceImpl.java

@@ -871,7 +871,10 @@ public class StationInformationServiceImpl implements IStationInformationService
                     }
                     List<Map> mapListTotal = JSON.parseArray(resultJsonTotal, Map.class);
                     if(mapListTotal.size()<=0){
-                        return "扫码失败订单已关闭";
+                        ringScanInformation.setExecutionMark("1");//成功
+                        ringScanInformation.setExecutionMessage("扫描失败");
+                        int i2 = ringScanInformationMapper.insertRingScanInformation(ringScanInformation);
+                        return "订单已关闭-扫描失败";
                     }
                     Double totalAmount = mapListTotal.stream()
                             .filter(map1 -> map1.containsKey("FQty")) // 确保 map 中包含 "amount" 字段
@@ -1000,7 +1003,7 @@ public class StationInformationServiceImpl implements IStationInformationService
             stationInformation2.setPersonnelId(personneList[0]);//设备编号
             List<StationInformation> stationInformations1 = stationInformationMapper.selectStationInformationList(stationInformation2);
             System.out.println("工位:"+stationInformations1.get(0).getStationName()+"人员:"+stationInformations1.get(0).getPersonnelName());
-            return "工位:"+stationInformations1.get(0).getStationName()+",人员:"+stationInformations1.get(0).getPersonnelName()+"-手持设备绑定成功";
+            return stationInformations1.get(0).getStationName()+"-"+stationInformations1.get(0).getPersonnelName()+"-手持设备绑定成功";
         }else {
             //产品编码&mac地址
             String[] content = contentString.split("&");
@@ -1056,16 +1059,10 @@ public class StationInformationServiceImpl implements IStationInformationService
                 ringScanInformation.setStationId(stationInformations.get(0).getId().toString()); //工位id
                 ringScanInformation.setStationName(stationInformations.get(0).getStationName());//工位名称
             }else {//当前没有绑定Mac地址直接返回
-                return "当前手持机未绑定工位人员信息-请先扫描人员码信息";
-            }
-
-            //验证重复扫描
-            RingScanInformation prodOrderScanning=new RingScanInformation();
-            prodOrderScanning.setContentInformation(s1);
-            prodOrderScanning.setProcessName(ringScanInformation.getProcessName());
-            List<RingScanInformation> ringScanInformations = ringScanInformationMapper.selectRingScanInformationList(prodOrderScanning);
-            if(ringScanInformations.size()>0){
-                return "工位:"+stationInformations.get(0).getStationName()+","+"人员:"+stationInformations.get(0).getPersonnelName()+"-"+"当前产品工序以扫描,不能重复扫描";
+                ringScanInformation.setExecutionMark("2");//成功
+                ringScanInformation.setExecutionMessage("扫描失败");
+                int i2 = ringScanInformationMapper.insertRingScanInformation(ringScanInformation);
+                return "未绑定-人员-扫描失败";
             }
             String nativeNumber="";
             if(s1.contains("Z")){nativeNumber = s1.replace("Z", "");}
@@ -1089,7 +1086,22 @@ public class StationInformationServiceImpl implements IStationInformationService
                 ringScanInformation.setProductionOrderNumber(productionCardFlow1.getDemandDocumentNumber());
             }else {
                 System.out.println("erp未同步当前流转卡序列号");
-                return "请先同步-ERP数据";
+                ringScanInformation.setExecutionMark("2");//成功
+                ringScanInformation.setExecutionMessage("扫描失败");
+                int i2 = ringScanInformationMapper.insertRingScanInformation(ringScanInformation);
+                return "请先同步-ERP数据-扫描失败";
+            }
+
+            //验证重复扫描
+            RingScanInformation prodOrderScanning=new RingScanInformation();
+            prodOrderScanning.setContentInformation(s1);
+            prodOrderScanning.setProcessName(ringScanInformation.getProcessName());
+            List<RingScanInformation> ringScanInformations = ringScanInformationMapper.selectRingScanInformationList(prodOrderScanning);
+            if(ringScanInformations.size()>0){
+                ringScanInformation.setExecutionMark("2");//成功
+                ringScanInformation.setExecutionMessage("重复扫描");
+                int i2 = ringScanInformationMapper.insertRingScanInformation(ringScanInformation);
+                return stationInformations.get(0).getStationName()+"-"+stationInformations.get(0).getPersonnelName()+"-"+"重复扫描";
             }
 
             //查询生产订单日志里有没有这个生产订单有就不添加了
@@ -1196,8 +1208,10 @@ public class StationInformationServiceImpl implements IStationInformationService
                 }
             }
             //插入扫描日志信息
+            ringScanInformation.setExecutionMark("1");
+            ringScanInformation.setExecutionMessage("扫描成功");
             int i2 = ringScanInformationMapper.insertRingScanInformation(ringScanInformation);
-            return "工位:"+ringScanInformation.getStationName()+","+"人员:"+ringScanInformation.getPersonnelName()+"-"+"流转卡扫描成功";
+            return ringScanInformation.getStationName()+"-"+ringScanInformation.getPersonnelName()+"-"+"扫描成功";
         }
     }
 

+ 1 - 0
zkqy-fujian-amichi/src/main/resources/mapper/RingScanInformationFirstMapper.xml

@@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="inspectionQuantity != null  and inspectionQuantity != ''"> and inspection_quantity = #{inspectionQuantity}</if>
             <if test="totalQuantity != null  and totalQuantity != ''"> and total_quantity = #{totalQuantity}</if>
             <if test="packingOrInspection != null  and packingOrInspection != ''"> and packing_or_inspection = #{packingOrInspection}</if>
+
         </where>
     </select>
     

+ 15 - 2
zkqy-fujian-amichi/src/main/resources/mapper/RingScanInformationMapper.xml

@@ -12,9 +12,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="contentInformation"    column="content_information"    />
         <result property="stationName"    column="station_name"    />
         <result property="personnelName"    column="personnel_name"    />
+        <result property="executionMessage"    column="execution_message"/>
+        <result property="executionMark"    column="execution_mark"/>
     </resultMap>
     <select id="selectRingScanInformationListScfy" parameterType="com.zkqy.amichi.domain.RingScanInformation" resultMap="RingScanInformationResult">
-        select id, device_number, station_name, personnel_name,scanning_time, content_information from fjqydb.ring_scan_information
+        select id, device_number, station_name, personnel_name,scanning_time, content_information,execution_message,execution_mark from fjqydb.ring_scan_information
         <where>
             <if test="deviceNumber != null  and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
             and DATE(scanning_time) = CURDATE() order by scanning_time desc limit #{offset},#{pageSize}
@@ -62,6 +64,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="personnelName"    column="personnel_name"    />
         <result property="processName"    column="process_name"    />
         <result property="stationName"    column="station_name"    />
+        <result property="executionMessage"    column="execution_message"/>
+        <result property="executionMark"    column="execution_mark"/>
     </resultMap>
 
     <select id="selectRingScanInformationListVo" parameterType="com.zkqy.amichi.domain.RingScanInformation" resultMap="RingScanInformationResultNR">
@@ -95,7 +99,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         rsi.native_numbering,
         rsi.personnel_name,
         rsi.process_name,
-        rsi.station_name
+        rsi.station_name,
+        rsi.execution_mark,
+        rsi.execution_message
         FROM
         fjqydb.production_card_flow AS pcf
         LEFT JOIN fjqydb.plan_task_details AS ptd ON ptd.demand_document = pcf.demand_document_number
@@ -108,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="scanningTime != null "> and scanning_time = #{scanningTime}</if>
             <if test="contentInformation != null  and contentInformation != ''"> and content_information = #{contentInformation}</if>
             <if test="nativeNumbering != null  and nativeNumbering != ''"> and native_numbering = #{nativeNumbering}</if>
+            <if test="executionMark!=null and executionMark!=''">and execution_mark = #{executionMark}</if>
         </where>
         order by scanning_time desc
     </select>
@@ -202,6 +209,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         FROM
         fjqydb.ring_scan_information AS rsi
         LEFT JOIN fjqydb.procedure_list AS pl ON pl.procedur_name = rsi.process_name
+        where
+        rsi.execution_mark='1'
         GROUP BY
         rsi.production_order_number,
         rsi.process_name
@@ -239,6 +248,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="productionOrderNumber != null">production_order_number,</if>
             <if test="stationId != null">station_id,</if>
             <if test="stationName != null">station_name,</if>
+            <if test="executionMark != null">execution_mark,</if>
+            <if test="executionMessage != null">execution_message,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="deviceNumber != null">#{deviceNumber},</if>
@@ -253,6 +264,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="productionOrderNumber != null">#{productionOrderNumber},</if>
             <if test="stationId != null">#{stationId},</if>
             <if test="stationName != null">#{stationName},</if>
+            <if test="executionMark != null">#{executionMark},</if>
+            <if test="executionMessage != null">#{executionMessage},</if>
          </trim>
     </insert>
 

+ 2 - 2
zkqy-ui/.env.development

@@ -9,7 +9,7 @@ VUE_APP_BASE_API = '/dev-api'
 
 # 图片路径
 #VUE_APP_BASE_IMG_API = 'http://192.168.2.127:1024/dev-api'
-VUE_APP_BASE_IMG_API = 'http://192.168.110.83:1025/dev-api'
+VUE_APP_BASE_IMG_API = 'http://192.168.2.127:1025/dev-api'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
@@ -19,7 +19,7 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
 # VUE_APP_BASE_API1 = 'http://192.168.110.120:8066/'
 # VUE_APP_BASE_API1 = 'http://192.168.110.76:8066/'
 #VUE_APP_BASE_API1 = 'http://192.168.2.127:8066/'
-VUE_APP_BASE_API1 = 'http://192.168.110.83:8066/'
+VUE_APP_BASE_API1 = 'http://192.168.2.127:8066/'
 
 # ws地址
 VUE_APP_BASE_WS_API = '//127.0.0.1:8721'

+ 4 - 4
zkqy-ui/.env.production

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = 实验室信息管理系统
+VUE_APP_TITLE = 铨一生产协同管理系统
 
 # 生产环境配置
 ENV = 'production'
@@ -9,14 +9,14 @@ VUE_APP_BASE_API = '/prod-api'
 
 # 生产环境
 # VUE_APP_BASE_API1 = 'http://62.234.61.92:8055/'
-# VUE_APP_BASE_API1 = 'http://192.168.2.135:8066/'
+ VUE_APP_BASE_API1 = 'http://192.168.2.135:8066/'
 # VUE_APP_BASE_API1 = 'http://62.234.61.92:8066/'
 #VUE_APP_BASE_API1 = 'http://192.168.2.127:8066/'
-VUE_APP_BASE_API1 = 'http://192.168.128.171:8066/'
+#VUE_APP_BASE_API1 = 'http://192.168.3.17:8066/'
 
 
 # 图片路径
-VUE_APP_BASE_IMG_API = 'http://192.168.128.171:1025/prod-api'
+VUE_APP_BASE_IMG_API = 'http://192.168.2.135:1025/prod-api'
 
 #VUE_APP_BASE_IMG_API = 'http://62.234.61.92:1025/prod-api'
 

+ 18 - 1
zkqy-ui/src/views/amichi/ringScanInformation/index.vue

@@ -30,7 +30,12 @@
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-
+    <el-row >
+      <el-radio-group v-model="queryParams.executionMark" style="margin-bottom: 30px;float: right"  @change="tabHandleClick" >
+        <el-radio-button label="1">成功</el-radio-button>
+        <el-radio-button label="2">失败</el-radio-button>
+      </el-radio-group>
+    </el-row>
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
@@ -96,6 +101,12 @@
       <el-table-column label="物料编码" align="center" prop="materialCode" />
       <el-table-column label="物料名称" align="center" prop="materialName" />
       <el-table-column label="型号" align="center" prop="model" />
+<!--      <el-table-column label="扫描状态" align="center" prop="executionMark"  v-if="">-->
+<!--        <template  v-slot="scope">-->
+<!--          <dict-tag  :options="dict.type.smzt" :value="scope.row.executionMark"/>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+      <el-table-column label="扫描结果" align="center" prop="executionMessage" v-if="queryParams.executionMark==2"/>
     </el-table>
 
     <pagination
@@ -140,6 +151,8 @@ import { listInformation, getInformation, delInformation, addInformation, update
 
 export default {
   name: "Information",
+  dicts: ["smzt",],
+
   data() {
     return {
       // 遮罩层
@@ -162,6 +175,7 @@ export default {
       open: false,
       // 查询参数
       queryParams: {
+        executionMark:1,
         pageNum: 1,
         pageSize: 10,
         deviceNumber: null,
@@ -189,6 +203,9 @@ export default {
         this.loading = false;
       });
     },
+    tabHandleClick(){
+      this.getList();
+    },
     //下拉菜单点击事件
     handleCommand(command, row) {
       switch (command) {

+ 10 - 1
zkqy-ui/src/views/amichi/ringScanInformation/indexTwo.vue

@@ -38,7 +38,12 @@
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-
+    <el-row >
+      <el-radio-group v-model="queryParams.executionMark" style="margin-bottom: 30px;float: right"  @change="tabHandleClick" >
+        <el-radio-button label="1">成功</el-radio-button>
+        <el-radio-button label="2">失败</el-radio-button>
+      </el-radio-group>
+    </el-row>
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
@@ -168,6 +173,7 @@ export default {
       open: false,
       // 查询参数
       queryParams: {
+        executionMark:1,
         pageNum: 1,
         pageSize: 10,
         deviceNumber: null,
@@ -195,6 +201,9 @@ export default {
         this.loading = false;
       });
     },
+    tabHandleClick(){
+      this.getList();
+    },
     //下拉菜单点击事件
     handleCommand(command, row) {
       switch (command) {