From 0d6aae2036feb77bb2796f6b484489d7ffcd99c2 Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期五, 10 五月 2024 22:19:25 +0800
Subject: [PATCH] 各bug修复

---
 framework/src/main/java/com/yuanchu/mom/pojo/IfsApi.java                               |   35 +++++++++++++++++
 user-server/src/main/resources/mapper/EnumMapper.xml                                   |    1 
 inspect-server/src/main/resources/mapper/InsSampleMapper.xml                           |    6 +-
 inspect-server/src/main/java/com/yuanchu/mom/pojo/InsOrder.java                        |    2 
 inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java |   14 +++----
 inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java                      |    3 +
 user-server/src/main/resources/mapper/UserMapper.xml                                   |    3 +
 user-server/src/main/java/com/yuanchu/mom/pojo/User.java                               |    6 +-
 8 files changed, 54 insertions(+), 16 deletions(-)

diff --git a/framework/src/main/java/com/yuanchu/mom/pojo/IfsApi.java b/framework/src/main/java/com/yuanchu/mom/pojo/IfsApi.java
new file mode 100644
index 0000000..2f26735
--- /dev/null
+++ b/framework/src/main/java/com/yuanchu/mom/pojo/IfsApi.java
@@ -0,0 +1,35 @@
+package com.yuanchu.mom.pojo;
+
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import java.io.Serializable;
+
+@Data
+@Slf4j
+@Component
+public class IfsApi implements Serializable {
+    /*娴嬭瘯搴搃p*/
+//    final String ip = "http://192.168.20.47:8008";
+//    final String ip2 = "http://192.168.20.47";
+//    final String ip3 = "http://192.168.20.47:8081";
+//
+//    final String contractKey = "x%2bvbGReagnsK%2fDr45xkVcGLOh%2fWWGODQ2inBGeNwbZw%3d";
+//    final String contractKeyPost = "x%2bvbGReagnsK%2fDr45xkVcGLOh%2fWWGODQ2inBGeNwbZw=";
+
+    /*姝e紡搴搃p*/
+    final String ip = "http://192.168.20.50:8008";
+    final String ip2 = "http://192.168.20.50";
+    final String ip3 = "http://192.168.20.50:8081";
+
+    final String contractKey = "x%2bvbGReagnsK%2fDr45xkVcGLOh%2fWWGODQ2inBGeNwbZw%3d";
+    final String contractKeyPost = "x%2bvbGReagnsK%2fDr45xkVcGLOh%2fWWGODQ2inBGeNwbZw=";
+
+    final String contract = "ZTZB";
+
+    final String userId = "MESUser";
+    //闆朵欢
+    final String PART = ip + "/PurchService.ashx?contract=" + contract + "&contractKey=" + contractKey + "&procedureName=QUERY_INVENTORY_PART_INFO_STD&userId=" + userId + "&inAttr=%7B%0D%0A%20%20%20%20%22MODIFY_DATE%22:%22%22%0D%0A%7D";
+
+}
\ No newline at end of file
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/pojo/InsOrder.java b/inspect-server/src/main/java/com/yuanchu/mom/pojo/InsOrder.java
index 7141bcc..537af85 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/pojo/InsOrder.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/pojo/InsOrder.java
@@ -196,7 +196,7 @@
 
     @ValueTableShow(value = 16, name = "鏉ユ牱鏂瑰紡")
     private String formType;
-    @TableField(exist = false)
+
     @ApiModelProperty("瀹℃牳鏃堕棿")
     private LocalDateTime examineTime;
 
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java b/inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java
index cc48233..6892a7f 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java
@@ -142,6 +142,9 @@
      */
     private String ask;
 
+    /**瑕佹眰鎻忚堪*/
+    private String tell;
+
     /**
      * 鏈�缁堝��
      */
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
index e2b7560..ca2a1a8 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -255,9 +255,7 @@
                 // 閫氳繃璁㈠崟id鏌ユ壘鎵�鏈夋牱鏈琲d
                 List<Integer> sampleIds = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId)).stream().map(InsSample::getId).collect(Collectors.toList());
                 // 閫氳繃妫�鏌ユ瘡涓�涓牱鏈琲d鏌ュ埌灞炰簬妫�楠岄」缁撹 is null鐨勬暟閲�
-                Long count = insProductMapper.selectCount(Wrappers.<InsProduct>lambdaQuery().in(InsProduct::getInsSampleId, sampleIds).isNull(InsProduct::getInsResult).eq(InsProduct::getSonLaboratory, insProduct.getSonLaboratory()));
-                // is null鐨勬暟閲忎负0鏄皢璁㈠崟鐘舵�佽〃鐨勭姸鎬佹敼涓哄凡妫�楠�
-                List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery().in(InsProduct::getInsSampleId, sampleIds).isNull(InsProduct::getInsResult).eq(InsProduct::getSonLaboratory, insProduct.getSonLaboratory()));
+                Long count = insProductMapper.selectCount(Wrappers.<InsProduct>lambdaQuery().in(InsProduct::getInsSampleId, sampleIds).isNull(InsProduct::getInsResult).eq(InsProduct::getSonLaboratory, insProduct.getSonLaboratory()).eq(InsProduct::getState, 1));
                 if (count == 0) {
                     insOrderStateMapper.update(new InsOrderState(), Wrappers.<InsOrderState>lambdaUpdate()
                             .eq(InsOrderState::getInsOrderId, orderId)
@@ -563,7 +561,7 @@
                 table.put("tableSize", tables.size() + 1);
             });
             List<Map<String, String>> deviceList = null;
-            if(deviceSet.size()!=0){
+            if (deviceSet.size() != 0) {
                 deviceList = insOrderMapper.selectDeviceList(deviceSet);
             }
             Map<String, String> codeStr = new HashMap<>();
@@ -630,7 +628,7 @@
                 FileInputStream stream = new FileInputStream(path);
                 XWPFDocument document = new XWPFDocument(stream);
                 List<XWPFTable> xwpfTables = document.getTables();
-                for (int i = 1; i < xwpfTables.size() - (deviceList==null?1:2); i++) {
+                for (int i = 1; i < xwpfTables.size() - (deviceList == null ? 1 : 2); i++) {
                     Set<String> set1 = new HashSet<>();
                     Map<String, Map<String, Integer>> maps = new HashMap<>();
                     for (int j = 0; j < xwpfTables.get(i).getRows().size(); j++) {
@@ -660,7 +658,7 @@
                             }
                         }
                     }
-                    maps.forEach((k,v)->{
+                    maps.forEach((k, v) -> {
                     });
                     List<String> list = new ArrayList<>();
                     for (String s : maps.keySet()) {
@@ -671,7 +669,7 @@
                         for (int j = 0; j < v.get("er") - v.get("sr") + 1; j++) {
                             TableTools.mergeCellsHorizonal(xwpfTables.get(i), v.get("sr") + j, v.get("sc"), v.get("ec"));
                         }
-                        if(v.get("er")>v.get("sr")){
+                        if (v.get("er") > v.get("sr")) {
                             TableTools.mergeCellsVertically(xwpfTables.get(i), v.get("sc"), v.get("sr"), v.get("er"));
                         }
                     }
@@ -720,7 +718,7 @@
         if (insProducts.size() > 0) {
             String str = "";
             for (InsProduct product : insProducts) {
-                str += product.getInspectionItem() + product.getInspectionItemSubclass() + "锛�";
+                str += product.getInspectionItem() + " " + product.getInspectionItemSubclass() + "锛�";
             }
             throw new ErrorException("浠ヤ笅鏄湭妫�楠岀殑椤圭洰锛�" + str);
         }
diff --git a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
index 11d9261..9acd36b 100644
--- a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
@@ -16,7 +16,6 @@
         <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/>
         <result property="sample" column="sample" jdbcType="VARCHAR"/>
         <result property="model" column="model" jdbcType="VARCHAR"/>
-        <result property="isLeave" column="is_leave" jdbcType="INTEGER"/>
         <result property="insState" column="ins_state" jdbcType="INTEGER"/>
         <result property="joinNum" column="join_num" jdbcType="INTEGER"/>
         <result property="remark" column="remark" jdbcType="VARCHAR"/>
@@ -152,7 +151,8 @@
                ipr.com_value,
                ipr.equip_value,
                ipr.equip_name,
-               ip.method_s
+               ip.method_s,
+               ip.tell
         from ins_sample isa
         left join ins_product ip on isa.id = ip.ins_sample_id
         left join ins_product_result ipr on ip.id = ipr.ins_product_id
@@ -177,7 +177,6 @@
         <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/>
         <result property="sample" column="sample" jdbcType="VARCHAR"/>
         <result property="model" column="model" jdbcType="VARCHAR"/>
-        <result property="isLeave" column="is_leave" jdbcType="INTEGER"/>
         <result property="insState" column="ins_state" jdbcType="INTEGER"/>
         <result property="joinNum" column="join_num" jdbcType="INTEGER"/>
         <result property="remark" column="remark" jdbcType="VARCHAR"/>
@@ -225,6 +224,7 @@
         <result property="updateTime" column="ip_update_time" jdbcType="TIMESTAMP"/>
         <result property="templateId" column="template_id" jdbcType="INTEGER"/>
         <result property="methodS" column="method_s"/>
+        <result property="tell" column="tell"/>
         <collection property="insProductResult" resultMap="insProductResult"/>
     </resultMap>
 
diff --git a/user-server/src/main/java/com/yuanchu/mom/pojo/User.java b/user-server/src/main/java/com/yuanchu/mom/pojo/User.java
index fa96e20..1a6fef4 100644
--- a/user-server/src/main/java/com/yuanchu/mom/pojo/User.java
+++ b/user-server/src/main/java/com/yuanchu/mom/pojo/User.java
@@ -35,9 +35,9 @@
     @ApiModelProperty(value = "濮撳悕")
     private String name;
 
-//    @ValueTableShow(2)
-//    @ApiModelProperty(value = "濮撳悕EN")
-//    private String nameEn;
+    @ValueTableShow(2)
+    @ApiModelProperty(value = "濮撳悕EN")
+    private String nameEn;
 
     @ValueTableShow(3)
     @ApiModelProperty(value = "鐘舵��")
diff --git a/user-server/src/main/resources/mapper/EnumMapper.xml b/user-server/src/main/resources/mapper/EnumMapper.xml
index 67d1afa..8886989 100644
--- a/user-server/src/main/resources/mapper/EnumMapper.xml
+++ b/user-server/src/main/resources/mapper/EnumMapper.xml
@@ -30,5 +30,6 @@
         select e.id,e.category,e.label,e.value,e.order_num,e.type
         from enums e
         where e.category=#{category}
+        order by e.order_num
     </select>
 </mapper>
diff --git a/user-server/src/main/resources/mapper/UserMapper.xml b/user-server/src/main/resources/mapper/UserMapper.xml
index 65cad3b..ecdc611 100644
--- a/user-server/src/main/resources/mapper/UserMapper.xml
+++ b/user-server/src/main/resources/mapper/UserMapper.xml
@@ -5,7 +5,8 @@
         select * from (
         select u1.id, u1.account, u1.name, u1.state, u1.create_time, u1.update_time, u1.create_user, u1.update_user,
         u1.age, u1.email, u1.phone, u1.department, u1.company, u1.address, u1.is_custom, u1.role_id, u2.name
-        create_user_name, u3.name update_user_name, r.name role_name,u1.signature_url,u1.picture_url,u1.depart_id
+        create_user_name, u3.name update_user_name, r.name role_name,u1.signature_url,u1.picture_url,u1.depart_id,
+        u1.name_en
         from user u1
         left join user u2 on u2.id = u1.create_user
         left join user u3 on u3.id = u1.update_user

--
Gitblit v1.9.3