5
0
Prechádzať zdrojové kódy

出入库完善, 重构

Kevin 6 rokov pred
rodič
commit
4d1ac5f162

+ 99 - 141
Gene_point_Service/.idea/workspace.xml

@@ -3,8 +3,9 @@
   <component name="ChangeListManager">
     <list default="true" id="83c812bd-fdcd-4344-b866-5ecaac02b490" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/dashoo.cn/api/business/converseService/converse.go" beforeDir="false" afterPath="$PROJECT_DIR$/src/dashoo.cn/api/business/converseService/converse.go" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/src/dashoo.cn/api/business/converseService/converseService.go" beforeDir="false" afterPath="$PROJECT_DIR$/src/dashoo.cn/api/business/converseService/converseService.go" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/dashoo.cn/api/main.go" beforeDir="false" afterPath="$PROJECT_DIR$/src/dashoo.cn/api/main.go" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/dashoo.cn/api/controllers/converse/converse.go" beforeDir="false" afterPath="$PROJECT_DIR$/src/dashoo.cn/api/controllers/converse/converse.go" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
@@ -17,11 +18,11 @@
   </component>
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
-      <file pinned="false" current-in-tab="false">
+      <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/main.go">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-1541">
-              <caret line="22" selection-start-line="22" selection-end-line="22" />
+            <state relative-caret-position="184">
+              <caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
             </state>
           </provider>
         </entry>
@@ -29,17 +30,20 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/controllers/converse/converse.go">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="3680">
-              <caret line="169" selection-start-line="169" selection-end-line="169" />
+            <state relative-caret-position="1206">
+              <caret line="205" lean-forward="true" selection-start-line="205" selection-end-line="205" />
+              <folding>
+                <element signature="e#18#194#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
+      <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/business/converseService/converseService.go">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="708">
-              <caret line="674" column="21" selection-start-line="674" selection-start-column="21" selection-end-line="674" selection-end-column="21" />
+            <state relative-caret-position="333">
+              <caret line="715" column="57" selection-start-line="715" selection-start-column="52" selection-end-line="715" selection-end-column="57" />
               <folding>
                 <element signature="e#25#163#0" expanded="true" />
               </folding>
@@ -47,20 +51,11 @@
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://E:/DASHOO/common/base_dashoo_common/src/dashoo.cn/utils/db/serviceBase.go">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="874">
-              <caret line="46" column="31" selection-start-line="46" selection-start-column="22" selection-end-line="46" selection-end-column="31" />
-            </state>
-          </provider>
-        </entry>
-      </file>
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/business/converseService/converse.go">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="3634">
-              <caret line="160" column="4" selection-start-line="160" selection-start-column="4" selection-end-line="160" selection-end-column="4" />
+            <state relative-caret-position="-1602">
+              <caret line="18" column="6" selection-start-line="18" selection-start-column="6" selection-end-line="18" selection-end-column="6" />
             </state>
           </provider>
         </entry>
@@ -88,6 +83,17 @@
       <find>SampleStatusModify</find>
       <find>fmt</find>
       <find>GetReason</find>
+      <find>rack_ret</find>
+      <find>BarCode</find>
+      <find>rack_</find>
+      <find>retr</find>
+      <find>SamplePartsStatusModify</find>
+      <find>ModifySampleALLSuccessStatus</find>
+      <find>handleSingleList</find>
+      <find>SampleAllStatusModify</find>
+      <find>ModifySampleALLFailedStatus</find>
+      <find>ModifySampleAllRejectStatus</find>
+      <find>retre</find>
     </findStrings>
   </component>
   <component name="GOROOT" path="D:\Development\GO" />
@@ -115,12 +121,12 @@
         <option value="$PROJECT_DIR$/src/dashoo.cn/api/conf/app.conf" />
         <option value="$PROJECT_DIR$/src/dashoo.cn/api/business/converseService/converse.go" />
         <option value="$PROJECT_DIR$/src/dashoo.cn/api/controllers/converse/converse.go" />
-        <option value="$PROJECT_DIR$/src/dashoo.cn/api/main.go" />
         <option value="$PROJECT_DIR$/src/dashoo.cn/api/business/converseService/converseService.go" />
+        <option value="$PROJECT_DIR$/src/dashoo.cn/api/main.go" />
       </list>
     </option>
   </component>
-  <component name="ProjectFrameBounds" extendedState="7">
+  <component name="ProjectFrameBounds" extendedState="6">
     <option name="x" value="2335" />
     <option name="width" value="1292" />
     <option name="height" value="688" />
@@ -190,15 +196,6 @@
               <item name="api" type="462c0819:PsiDirectoryNode" />
               <item name="controllers" type="462c0819:PsiDirectoryNode" />
             </path>
-            <path>
-              <item name="Gene_point_Service" type="b2602c69:ProjectViewProjectNode" />
-              <item name="Gene_point_Service" type="462c0819:PsiDirectoryNode" />
-              <item name="src" type="462c0819:PsiDirectoryNode" />
-              <item name="dashoo.cn" type="462c0819:PsiDirectoryNode" />
-              <item name="api" type="462c0819:PsiDirectoryNode" />
-              <item name="controllers" type="462c0819:PsiDirectoryNode" />
-              <item name="converse" type="462c0819:PsiDirectoryNode" />
-            </path>
             <path>
               <item name="Gene_point_Service" type="b2602c69:ProjectViewProjectNode" />
               <item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
@@ -216,7 +213,7 @@
     <property name="configurable.Project.GOPATH.is.expanded" value="true" />
     <property name="go.gopath.indexing.explicitly.defined" value="true" />
     <property name="go.sdk.automatically.set" value="true" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/../../mcs/lab_mms" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/src/dashoo.cn/api" />
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
     <property name="nodejs_package_manager_path" value="npm" />
@@ -241,43 +238,16 @@
       </list>
     </option>
   </component>
-  <component name="RunManager" selected="Go Build.GENEPOINT_SERVICE">
-    <configuration name="GENEPOINT_SERVICE" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true">
-      <module name="Gene_point_Service" />
-      <working_directory value="E:\DASHOO2\genepoint_service\Gene_point_Service\src\dashoo.cn\api" />
-      <kind value="DIRECTORY" />
-      <filePath value="$PROJECT_DIR$/src/dashoo.cn/api/main.go" />
-      <directory value="E:\DASHOO2\genepoint_service\Gene_point_Service\src\dashoo.cn\api" />
-      <method v="2" />
-    </configuration>
-    <configuration name="go build api/" type="GoApplicationRunConfiguration" factoryName="Go Application" nameIsGenerated="true">
+  <component name="RunManager">
+    <configuration name="GENEPOINT" type="GoApplicationRunConfiguration" factoryName="Go Application">
       <module name="Gene_point_Service" />
-      <working_directory value="E:\DASHOO2\Gene_point_Service\src\dashoo.cn\api" />
+      <working_directory value="E:\DASHOO\genepoint_service\Gene_point_Service\src\dashoo.cn\api" />
       <go_parameters value="-i" />
       <kind value="DIRECTORY" />
       <filePath value="$PROJECT_DIR$/" />
-      <directory value="E:\DASHOO2\Gene_point_Service\src\dashoo.cn\api" />
+      <directory value="E:\DASHOO\genepoint_service\Gene_point_Service\src\dashoo.cn\api" />
       <method v="2" />
     </configuration>
-    <configuration name="go build dashoo.cn/api" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
-      <module name="Gene_point_Service" />
-      <working_directory value="E:\DASHOO2\genepoint_service\Gene_point_Service\src\dashoo.cn\api" />
-      <kind value="DIRECTORY" />
-      <filePath value="$PROJECT_DIR$/src/dashoo.cn/api/main.go" />
-      <directory value="E:\DASHOO2\genepoint_service\Gene_point_Service\src\dashoo.cn\api" />
-      <method v="2" />
-    </configuration>
-    <list>
-      <item itemvalue="Go Build.go build api/" />
-      <item itemvalue="Go Build.GENEPOINT_SERVICE" />
-      <item itemvalue="Go Build.go build dashoo.cn/api" />
-    </list>
-    <recent_temporary>
-      <list>
-        <item itemvalue="Go Build.GENEPOINT_SERVICE" />
-        <item itemvalue="Go Build.GENEPOINT_SERVICE" />
-      </list>
-    </recent_temporary>
   </component>
   <component name="TodoView">
     <todo-panel id="selected-file">
@@ -292,13 +262,13 @@
     <frame x="1912" y="-8" width="2576" height="1056" extended-state="6" />
     <editor active="true" />
     <layout>
-      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.49766356" visible="true" weight="0.2601432" />
+      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.49766356" visible="true" weight="0.13632813" />
       <window_info id="Structure" order="1" sideWeight="0.50233644" side_tool="true" weight="0.14701195" />
       <window_info id="Favorites" order="2" sideWeight="0.50233644" side_tool="true" weight="0.14701195" />
       <window_info anchor="bottom" id="Message" order="0" />
       <window_info anchor="bottom" id="Find" order="1" sideWeight="0.49960256" weight="0.0" />
-      <window_info anchor="bottom" id="Run" order="2" weight="0.61915886" />
-      <window_info anchor="bottom" id="Debug" order="3" sideWeight="0.89467406" weight="0.5317919" />
+      <window_info anchor="bottom" id="Run" order="2" weight="0.6182432" />
+      <window_info active="true" anchor="bottom" id="Debug" order="3" sideWeight="0.89467406" visible="true" weight="0.11261261" />
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
       <window_info anchor="bottom" id="TODO" order="6" weight="0.32943925" />
@@ -312,27 +282,6 @@
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
       <window_info anchor="right" id="Database" order="3" weight="0.32932693" />
     </layout>
-    <layout-to-restore>
-      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.49766356" visible="true" weight="0.0867144" />
-      <window_info id="Structure" order="1" sideWeight="0.50233644" side_tool="true" weight="0.14701195" />
-      <window_info id="Favorites" order="2" sideWeight="0.50233644" side_tool="true" weight="0.14701195" />
-      <window_info anchor="bottom" id="Message" order="0" />
-      <window_info anchor="bottom" id="Find" order="1" sideWeight="0.49960256" weight="0.0" />
-      <window_info anchor="bottom" id="Run" order="2" weight="0.61915886" />
-      <window_info anchor="bottom" id="Debug" order="3" sideWeight="0.89467406" weight="0.33641618" />
-      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
-      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
-      <window_info anchor="bottom" id="TODO" order="6" weight="0.32943925" />
-      <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
-      <window_info anchor="bottom" id="Database Changes" order="8" />
-      <window_info anchor="bottom" id="Version Control" order="9" weight="0.32827103" />
-      <window_info anchor="bottom" id="Terminal" order="10" sideWeight="0.49519232" weight="0.25549132" />
-      <window_info anchor="bottom" id="Event Log" order="11" sideWeight="0.5048077" side_tool="true" weight="0.26359338" />
-      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
-      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
-      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
-      <window_info anchor="right" id="Database" order="3" weight="0.32932693" />
-    </layout-to-restore>
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     <option name="version" value="1" />
@@ -373,36 +322,35 @@
     </option>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/mydb/mySessionBase.go" />
     <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/mydb/myServiceBase.go" />
-    <entry file="file://E:/DASHOO/base_go/src/github.com/go-xorm/core/dialect.go">
+    <entry file="file://$PROJECT_DIR$/../../base_go/src/github.com/go-xorm/core/dialect.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="249">
           <caret line="28" column="20" lean-forward="true" selection-start-line="28" selection-start-column="20" selection-end-line="28" selection-end-column="20" />
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/base_go/src/github.com/astaxie/beego/controller.go">
+    <entry file="file://$PROJECT_DIR$/../../base_go/src/github.com/astaxie/beego/controller.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="686">
           <caret line="87" column="5" selection-start-line="87" selection-start-column="5" selection-end-line="87" selection-end-column="5" />
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/common/base_dashoo_common/src/dashoo.cn/utils/.gitignore">
+    <entry file="file://$PROJECT_DIR$/../../common/base_dashoo_common/src/dashoo.cn/utils/.gitignore">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="-171" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/controllers/converse/converse_test.go" />
-    <entry file="file://E:/DASHOO/common/base_dashoo_common/src/dashoo.cn/utils/db/sessionBase.go">
+    <entry file="file://$PROJECT_DIR$/../../common/base_dashoo_common/src/dashoo.cn/utils/db/sessionBase.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="23">
           <caret line="50" column="5" selection-start-line="50" selection-start-column="5" selection-end-line="50" selection-end-column="5" />
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/base_go/src/github.com/Unknwon/goconfig/read.go">
+    <entry file="file://$PROJECT_DIR$/../../base_go/src/github.com/Unknwon/goconfig/read.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="204">
           <caret line="229" column="32" selection-start-line="229" selection-start-column="32" selection-end-line="229" selection-end-column="32" />
@@ -493,7 +441,7 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/base_go/src/github.com/astaxie/beego/config/fake.go">
+    <entry file="file://$PROJECT_DIR$/../../base_go/src/github.com/astaxie/beego/config/fake.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="244">
           <caret line="131" selection-start-line="131" selection-end-line="131" />
@@ -507,28 +455,28 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/base_go/src/github.com/astaxie/beego/parser.go">
+    <entry file="file://$PROJECT_DIR$/../../base_go/src/github.com/astaxie/beego/parser.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="192">
           <caret line="76" selection-start-line="76" selection-end-line="76" />
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/base_go/src/github.com/astaxie/beego/config.go">
+    <entry file="file://$PROJECT_DIR$/../../base_go/src/github.com/astaxie/beego/config.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="238">
           <caret line="152" selection-start-line="152" selection-end-line="152" />
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/base_go/src/github.com/astaxie/beego/utils/file.go">
+    <entry file="file://$PROJECT_DIR$/../../base_go/src/github.com/astaxie/beego/utils/file.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="180">
           <caret line="40" selection-start-line="40" selection-end-line="40" />
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/base_go/src/github.com/Unknwon/com/file.go">
+    <entry file="file://$PROJECT_DIR$/../../base_go/src/github.com/Unknwon/com/file.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="267">
           <caret line="143" selection-start-line="143" selection-end-line="143" />
@@ -552,7 +500,7 @@
     <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/conf/auth_model.conf">
       <provider selected="true" editor-type-id="text-editor" />
     </entry>
-    <entry file="file://E:/DASHOO/common/base_dashoo_common/src/dashoo.cn/utils/utils.go">
+    <entry file="file://$PROJECT_DIR$/../../common/base_dashoo_common/src/dashoo.cn/utils/utils.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="115">
           <caret line="28" column="1" lean-forward="true" selection-start-line="28" selection-start-column="1" selection-end-line="28" selection-end-column="1" />
@@ -587,7 +535,7 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/base_go/src/github.com/robfig/cron/cron.go">
+    <entry file="file://$PROJECT_DIR$/../../base_go/src/github.com/robfig/cron/cron.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="1748">
           <caret line="76" column="5" selection-start-line="76" selection-start-column="5" selection-end-line="76" selection-end-column="5" />
@@ -604,13 +552,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/base_go/src/github.com/gorilla/websocket/json.go">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="164">
-          <caret line="22" column="15" selection-start-line="22" selection-start-column="15" selection-end-line="22" selection-end-column="15" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/controllers/base.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="161">
@@ -618,20 +559,13 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/common/base_dashoo_common/src/dashoo.cn/utils/dbEngine.go">
+    <entry file="file://$PROJECT_DIR$/../../common/base_dashoo_common/src/dashoo.cn/utils/dbEngine.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="754">
           <caret line="67" column="36" selection-start-line="67" selection-start-column="36" selection-end-line="67" selection-end-column="36" />
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/base_go/src/github.com/gorilla/websocket/conn.go">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="209">
-          <caret line="1023" column="15" selection-start-line="1023" selection-start-column="15" selection-end-line="1023" selection-end-column="15" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://D:/Development/GO/src/builtin/builtin.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="220">
@@ -639,14 +573,7 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://D:/Development/GO/src/strings/strings.go">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="168">
-          <caret line="97" column="5" selection-start-line="97" selection-start-column="5" selection-end-line="97" selection-end-column="5" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://E:/DASHOO/base_go/src/github.com/go-xorm/xorm/session_find.go">
+    <entry file="file://$PROJECT_DIR$/../../base_go/src/github.com/go-xorm/xorm/session_find.go">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="239">
           <caret line="24" column="24" selection-start-line="24" selection-start-column="24" selection-end-line="24" selection-end-column="24" />
@@ -660,57 +587,88 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/main.go">
+    <entry file="file://$PROJECT_DIR$/../../base_go/src/github.com/go-xorm/xorm/session_get.go">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-1541">
+        <state relative-caret-position="322">
           <caret line="22" selection-start-line="22" selection-end-line="22" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/controllers/converse/converse.go">
+    <entry file="file://$PROJECT_DIR$/../../base_go/src/github.com/go-xorm/xorm/engine.go">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="3680">
-          <caret line="169" selection-start-line="169" selection-end-line="169" />
+        <state relative-caret-position="7774">
+          <caret line="355" selection-start-line="355" selection-end-line="355" />
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/base_go/src/github.com/go-xorm/xorm/session_get.go">
+    <entry file="file://$PROJECT_DIR$/../../base_go/src/github.com/gorilla/websocket/conn.go">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="322">
-          <caret line="22" selection-start-line="22" selection-end-line="22" />
+        <state relative-caret-position="275">
+          <caret line="497" column="15" selection-start-line="497" selection-start-column="15" selection-end-line="497" selection-end-column="15" />
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/base_go/src/github.com/go-xorm/xorm/engine.go">
+    <entry file="file://$PROJECT_DIR$/../../base_go/src/github.com/gorilla/websocket/json.go">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="7774">
-          <caret line="355" selection-start-line="355" selection-end-line="355" />
+        <state relative-caret-position="298">
+          <caret line="23" column="20" lean-forward="true" selection-start-line="23" selection-start-column="20" selection-end-line="23" selection-end-column="20" />
         </state>
       </provider>
     </entry>
-    <entry file="file://E:/DASHOO/common/base_dashoo_common/src/dashoo.cn/utils/db/serviceBase.go">
+    <entry file="file://D:/Development/GO/src/encoding/json/encode.go">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="874">
-          <caret line="46" column="31" selection-start-line="46" selection-start-column="22" selection-end-line="46" selection-end-column="31" />
+        <state relative-caret-position="275">
+          <caret line="156" column="5" selection-start-line="156" selection-start-column="5" selection-end-line="156" selection-end-column="5" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://D:/Development/GO/src/strings/strings.go">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="236">
+          <caret line="97" column="5" selection-start-line="97" selection-start-column="5" selection-end-line="97" selection-end-column="5" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/../../common/base_dashoo_common/src/dashoo.cn/utils/db/serviceBase.go">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="209">
+          <caret line="84" column="22" selection-start-line="84" selection-start-column="22" selection-end-line="84" selection-end-column="22" />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/business/converseService/converse.go">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="3634">
-          <caret line="160" column="4" selection-start-line="160" selection-start-column="4" selection-end-line="160" selection-end-column="4" />
+        <state relative-caret-position="-1602">
+          <caret line="18" column="6" selection-start-line="18" selection-start-column="6" selection-end-line="18" selection-end-column="6" />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/business/converseService/converseService.go">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="708">
-          <caret line="674" column="21" selection-start-line="674" selection-start-column="21" selection-end-line="674" selection-end-column="21" />
+        <state relative-caret-position="333">
+          <caret line="715" column="57" selection-start-line="715" selection-start-column="52" selection-end-line="715" selection-end-column="57" />
           <folding>
             <element signature="e#25#163#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/controllers/converse/converse.go">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="1206">
+          <caret line="205" lean-forward="true" selection-start-line="205" selection-end-line="205" />
+          <folding>
+            <element signature="e#18#194#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/dashoo.cn/api/main.go">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="184">
+          <caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
+        </state>
+      </provider>
+    </entry>
   </component>
 </project>

BIN
Gene_point_Service/pkg/windows_amd64/dashoo.cn/api/business/converseService.a


BIN
Gene_point_Service/pkg/windows_amd64/dashoo.cn/api/controllers/converse.a


+ 45 - 15
Gene_point_Service/src/dashoo.cn/api/business/converseService/converse.go

@@ -13,6 +13,12 @@ const SUCCESS = 5
 const RUNNING = 6
 const REJECT = 7
 
+const SAMPLE_STATUS_OUT = 5
+const SAMPLE_STATUS_IN  = 2
+const TASK_TUBE_STORING = 1
+const TASK_TUBE_RETREIVING = 2
+
+
 type RequestEntity struct {
 	Request string      `json:"request"`
 	Time    string      `json:"time"`
@@ -132,22 +138,22 @@ type Target struct {
 //}
 
 type Tube struct {
-	No int    `json:"no,omitempty"`
-	Id string `json:"id,omitempty"`
-	T_no int	`json:"t_no,omitempty"`
-	S_no int	`json:"s_no,omitempty"`
-	Oper bool 	`json:"oper,omitempty"`
+	No 		int   		`json:"no,omitempty"`
+	Id 		string 		`json:"id,omitempty"`
+	T_no 	int			`json:"t_no,omitempty"`
+	S_no 	int			`json:"s_no,omitempty"`
+	Oper 	bool 		`json:"oper,omitempty"`
 }
 
 type Single struct {
-	Rack   		int    `json:"rack,omitempty"`
-	Tube   	 	int    `json:"tube,omitempty"`
-	Id 			string `json:"id,omitempty"`
-	Rack_id 	string `json:"rack_id,omitempty"`
-	Source  	Source `json:"source,omitempty"`
-	Target  	Target `json:"target,omitempty"`
-	Tubes   	[]Tube `json:"tubes"`
-	Exceptions 	[]int  `json:"exceptions,omitempty"`
+	Rack   		int    	`json:"rack,omitempty"`
+	Tube   	 	int    	`json:"tube,omitempty"`
+	Id 			string 	`json:"id,omitempty"`
+	Rack_id 	string 	`json:"rack_id,omitempty"`
+	Source  	Source	`json:"source,omitempty"`
+	Target  	Target 	`json:"target,omitempty"`
+	Tubes   	[]Tube 	`json:"tubes"`
+	Exceptions 	[]int  	`json:"exceptions,omitempty"`
 
 }
 
@@ -225,7 +231,7 @@ type Bank_Apply_Detail struct {
 	ShelfId        int       `xorm:"INT(10)"`
 	BoxId          int       `xorm:"INT(10)"`
 	Position       string    `xorm:"VARCHAR(50)"` //位置 冻存盒的 X代表第几列 Y代表第几行  X;
-	PositionInfo      string    `xorm:"VARCHAR(100)"` //列表中显示的位置信息(容器+层+盒+position)
+	PositionInfo   string    `xorm:"VARCHAR(100)"` //列表中显示的位置信息(容器+层+盒+position)
 	CHUserId       int       `xorm:"INT(10)"`
 	CHUserBy       string    `xorm:"VARCHAR(50)"`
 	CancelId       int       `xorm:"INT(10)"`
@@ -239,8 +245,32 @@ type Bank_Apply_Detail struct {
 	ModifiedBy     string    `xorm:"VARCHAR(50)"`
 	RecoveryId     int       `xorm:INT(10)`
 	DetailId       int       `xorm:INT(10)`
-	IsLocked       int        `xorm:INT(10)`
+	IsLocked       int       `xorm:INT(10)`
+
+}
 
+type Bank_Apply_Main struct {
+	Id             int       `xorm:"not null pk autoincr INT(10)"`
+	EntryNo        string    `xorm:"VARCHAR(50)"`
+	ApplyType      int       `xorm:"int(10)"`
+	ApplyStatus    int       `xorm:"int(10)"`
+	OperationBy    string    `xorm:"VARCHAR(50)"`
+	Section        string    `xorm:"VARCHAR(50)"`
+	EntryTime      time.Time `xorm:"DATETIME"`
+	ConUserId      int       `xorm:"int(10)"`
+	ConUserBy      string    `xorm:"VARCHAR(50)"`
+	ConTime        time.Time `xorm:"DATETIME"`
+	Remark         string    `xorm:"VARCHAR(255)"`
+	Exception 	   string	 `xorm:"VARCHAR(512)"`
+	AuditorRemark  string    `xorm:"VARCHAR(255)"`
+	CreateOn       time.Time `xorm:"DATETIME created"` //创建时间
+	CreateUserId   int       `xorm:"INT(10)"`
+	CreateBy       string    `xorm:"VARCHAR(50)"` //创建人
+	ModifiedOn     time.Time `xorm:"DATETIME updated"`
+	ModifiedUserId int       `xorm:"INT(10)"`
+	ModifiedBy     string    `xorm:"VARCHAR(50)"`
+	TaskStatus	   int		 `xorm:"INT(10)"`
+	Reason         int		 `xorm:"INT(10)"`
 }
 
 type Equipment struct {

+ 140 - 38
Gene_point_Service/src/dashoo.cn/api/business/converseService/converseService.go

@@ -412,16 +412,16 @@ func (this *ConverseService) SampleApplyStatusModify(statusCode int, entryNo str
 //}
 
 //修改全部样本执行成功状态
-func (this *ConverseService)ModifySampleALLSuccessStatus(res ResponseEntity){
-	tubeIds := handleSingleList(res.Data.Actual_data)
-	this.handleSampleSuccess(tubeIds, res.Response)
-}
+//func (this *ConverseService)ModifySampleALLSuccessStatus(res ResponseEntity){
+//	tubeIds := handleSingleList(res.Data.Actual_data)
+//	this.handleSampleSuccess(tubeIds, res.Response)
+//}
 
 //修改全部样本执行失败状态
-func (this *ConverseService)ModifySampleALLFailedStatus(res ResponseEntity){
-	tubeIds := handleSingleList(res.Data.Actual_data)
-	this.handleSampleFailed(tubeIds, res.Response)
-}
+//func (this *ConverseService)ModifySampleALLFailedStatus(res ResponseEntity){
+//	tubeIds := handleSingleList(res.Data.Actual_data)
+//	this.handleSampleFailed(tubeIds, res.Response)
+//}
 
 //任务执行驳回, 修改全部样本失败状态
 func (this *ConverseService)ModifySampleAllRejectStatus(res ResponseEntity) error{
@@ -436,52 +436,52 @@ func (this *ConverseService)ModifySampleAllRejectStatus(res ResponseEntity) erro
 }
 
 //修改部分样本执行成功部分样本执行失败状态
-func (this *ConverseService)SampleApplyDetailStatusPartsModify(res ResponseEntity){
-
-	tubeIds := handleSingleList(res.Data.Actual_data)
-	this.handleSampleSuccess(tubeIds, res.Response)
-	tubeIds = handleSingleList(res.Data.Abnormal_data.Tubes)
-	this.handleSampleFailed(tubeIds, res.Response)
-
-}
+//func (this *ConverseService)SampleApplyDetailStatusPartsModify(res ResponseEntity){
+//
+//	tubeIds := handleSingleList(res.Data.Actual_data)
+//	this.handleSampleSuccess(tubeIds, res.Response)
+//	tubeIds = handleSingleList(res.Data.Abnormal_data.Tubes)
+//	this.handleSampleFailed(tubeIds, res.Response)
+//
+//}
 
 //处理single切片
-func handleSingleList(singles []Single) string{
-	var tubeIds []string
-	for _, data := range singles {
-		for _, tube := range data.Tubes {
-			if tube.Oper == true {
-				tubeIds = append(tubeIds,tube.Id)
-			}
-		}
-	}
-	//id拼接成","隔开的字符串
-	  idStr := "'" + strings.Join(tubeIds,"','") + "'"
-	return idStr
-}
+//func handleSingleList(singles []Single) string{
+//	var tubeIds []string
+//	for _, data := range singles {
+//		for _, tube := range data.Tubes {
+//			if tube.Oper == true {
+//				tubeIds = append(tubeIds,tube.Id)
+//			}
+//		}
+//	}
+//	//id拼接成","隔开的字符串
+//	  idStr := "'" + strings.Join(tubeIds,"','") + "'"
+//	return idStr
+//}
 
 
 
 
 //修改样本失败状态
-func (this *ConverseService)handleSampleFailed(idsStr string, response string) {
-	updatesql := "UPDATE " + TABLE_APPLY_DETAIL + " SET taskstatus = '" + strconv.Itoa(FAILED) + "' WHERE barcode IN (" + idsStr + ")"
+func (this *ConverseService)handleSampleFailed(idsStr string, response string, parentId int) {
+	updatesql := "UPDATE " + TABLE_APPLY_DETAIL + " SET taskstatus = '" + strconv.Itoa(FAILED) + "' WHERE barcode IN (" + idsStr + ")" + " AND parentid = '" + strconv.Itoa(parentId) + "'"
 	this.DBE.Exec(updatesql)
 }
 
 //处理样本执行成功状态
-func (this *ConverseService)handleSampleSuccess(idsStr string, response string) {
+func (this *ConverseService)handleSampleSuccess(idsStr string, response string, applyMainId int ) {
 	if strings.Contains(response,"_storing")  {
-		this.sampleRKSuccessDBModify(idsStr)
+		this.sampleRKSuccessDBModify(idsStr, applyMainId)
 	}else if strings.Contains(response,"_retrieving") {
-		this.sampleCKSuccessDBModify(idsStr)
+		this.sampleCKSuccessDBModify(idsStr, applyMainId)
 	}
 
 }
 
 //入库成功, 修改样本数据库状态信息
-func (this *ConverseService)sampleRKSuccessDBModify(idsStr string) error{
-	updatesql := "UPDATE " + TABLE_APPLY_DETAIL + " SET IsLocked = '" + STATUS_UNLOCK + "', taskstatus = '" + strconv.Itoa(SUCCESS) + "' WHERE barcode IN (" + idsStr + ")"
+func (this *ConverseService)sampleRKSuccessDBModify(idsStr string, parentId int) error{
+	updatesql := "UPDATE " + TABLE_APPLY_DETAIL + " SET IsLocked = '" + STATUS_UNLOCK + "', taskstatus = '" + strconv.Itoa(SUCCESS) + "' WHERE barcode IN (" + idsStr + ")" + " AND parentid = '" + strconv.Itoa(parentId) + "'"
 	updatesql2 := "UPDATE " + TABLE_SAMPLE + " SET IsLocked = '" + STATUS_UNLOCK + "', IState = '" + RK_PASS + "' WHERE barcode IN (" + idsStr + ")"
 	_,err := this.DBE.Exec(updatesql)
 	_,err = this.DBE.Exec(updatesql2)
@@ -489,7 +489,7 @@ func (this *ConverseService)sampleRKSuccessDBModify(idsStr string) error{
 }
 
 //出库成功, 修改样本数据库状态信息
-func (this *ConverseService) sampleCKSuccessDBModify (idsStr string) error{
+func (this *ConverseService) sampleCKSuccessDBModify (idsStr string, parentId int) error{
 	var list []Bank_Apply_Detail
 	var onHold []string
 	var done []string
@@ -504,13 +504,115 @@ func (this *ConverseService) sampleCKSuccessDBModify (idsStr string) error{
 
 	sql := "UPDATE " + TABLE_SAMPLE + " SET istate = '" + CK_PASS_ONHOLD + "', islocked = '" + STATUS_UNLOCK + "' WHERE barcode IN ('" + strings.Join(onHold,"','") + "')"
 	sql2 := "UPDATE " + TABLE_SAMPLE + " SET istate = '" + CK_PASS_DONE + "', islocked = '" + STATUS_UNLOCK + "' WHERE barcode IN ('" + strings.Join(done,"','") + "')"
-	sql3 := "UPDATE " + TABLE_APPLY_DETAIL + " SET IsLocked = '" + STATUS_UNLOCK + "', taskstatus = '" + strconv.Itoa(SUCCESS) + "' WHERE barcode IN (" + idsStr + ")"
+	sql3 := "UPDATE " + TABLE_APPLY_DETAIL + " SET IsLocked = '" + STATUS_UNLOCK + "', taskstatus = '" + strconv.Itoa(SUCCESS) + "' WHERE barcode IN (" + idsStr + ")" + " AND parentid = '" + strconv.Itoa(parentId) + "'"
 	_,err = this.DBE.Exec(sql)
 	_,err = this.DBE.Exec(sql2)
 	_,err = this.DBE.Exec(sql3)
 	return err
 }
 
+//获取出入库单信息
+func (this *ConverseService) GetApplyMain(entryNo string) Bank_Apply_Main{
+	where := "entryNo = '" + entryNo + "'"
+	var entity  Bank_Apply_Main
+	this.GetEntity(&entity, where)
+	return entity
+}
+
+//根据出入库单信息判断任务信息, 并修改样本状态
+func (this *ConverseService) ModifySampleStatusByApplyMainInfo(entryNo string, resp string, entity ResponseEntity){
+
+	applyMain := this.GetApplyMain(entryNo)
+	var operaIds,abnormalIds,taskType string
+	if applyMain.ApplyType == TASK_TUBE_STORING && strings.Contains(resp,"_storing") {
+		taskType = "tube_storing"
+		operaIds,abnormalIds = this.getOperaSampleIdsStr(applyMain.ApplyType,applyMain.Id,resp,entity)
+	}else if applyMain.ApplyType == TASK_TUBE_RETREIVING && strings.Contains(resp,"_storing") {
+		taskType = "tube_retrieving"
+		//todo
+	}else {
+		return
+	}
+
+	this.handleSampleSuccess(operaIds,taskType,applyMain.Id)
+	if entity.Data.Type == "abnormal_end" {
+		this.handleSampleFailed(abnormalIds,taskType, applyMain.Id)
+	}
+}
+
+//获取当前操作样本的id, 正常和异常的
+func (this *ConverseService) getOperaSampleIdsStr(applyType, parentId int, resp string, entity ResponseEntity) (actualIds string, abnormalIds string){
+
+	//获取出入库单中所有样本信息
+	var list []Bank_Apply_Detail
+	where := " parentid = '" + strconv.Itoa(parentId) + "'"
+	this.GetEntitysByWhere(TABLE_DETAIL, where,&list)
+	var sampleIds []string
+	for _, detail := range list {
+		sampleIds = append(sampleIds, detail.BarCode)
+	}
+
+	//获取反馈报文中的所有成功样本Id列表
+	var actualTubeIds []string
+	for _, single := range entity.Data.Actual_data {
+		for _, tube := range single.Tubes {
+			actualTubeIds = append(actualTubeIds,tube.Id)
+		}
+	}
+
+	//获取反馈报文中的所有异常样本Id列表
+	var abnormalTubeIds []string
+	for _, single := range entity.Data.Abnormal_data.Tubes {
+		abnormalTubeIds = append(abnormalTubeIds,single.Id)
+	}
+
+	var operaTubeIds []string
+	var failTubeIds []string
+	if applyType == TASK_TUBE_STORING {
+		for _, sampleId := range sampleIds {
+			//操作成功样本Id
+			for _, tubeId := range actualTubeIds {
+				if sampleId ==tubeId {
+					operaTubeIds = append(operaTubeIds, tubeId)
+					break
+				}
+			}
+
+			//操作失败样本Id
+			for _,tubeId := range abnormalTubeIds {
+				if sampleId == tubeId{
+					failTubeIds = append(failTubeIds, tubeId)
+					break
+				}
+			}
+
+		}
+	}
+
+	if applyType == TASK_TUBE_RETREIVING {
+		for _, sampleId := range sampleIds {
+			//操作成功样本Id
+			for index, tubeId := range actualTubeIds {
+				if index == len(actualTubeIds) && tubeId != sampleId {
+					operaTubeIds = append(operaTubeIds, tubeId)
+				}
+			}
+
+			//操作失败样本Id
+			for _,tubeId := range abnormalTubeIds {
+				if sampleId == tubeId{
+					failTubeIds = append(failTubeIds, tubeId)
+					break
+				}
+			}
+		}
+	}
+
+	actualIds = "'" + strings.Join(operaTubeIds,"','") + "'"
+	abnormalIds = "'" + strings.Join(failTubeIds,",") + "'"
+	return
+}
+
 ////样本状态修改
 //func (this *ConverseService)SampleStatusModify(statusCode int , res ResponseEntity){
 //	if statusCode == SUCCESS {

+ 31 - 23
Gene_point_Service/src/dashoo.cn/api/controllers/converse/converse.go

@@ -16,8 +16,6 @@ type ConverseController struct {
 }
 
 
-
-
 func (this *ConverseController) SearchDatabase() map[string]*RequestEntity{
 	svc := GetConverseService(utils.DBE)
 	tasks := svc.ScanNewTaskDetail()
@@ -89,35 +87,38 @@ func (this *ConverseController) StatusModify(statusCode int , task_id string) er
 }
 
 //修改部分执行成功样本状态
-func (this *ConverseController)SamplePartsStatusModify(res ResponseEntity){
-	svc :=  GetConverseService(utils.DBE)
-	svc.SampleApplyDetailStatusPartsModify(res)
-}
+//func (this *ConverseController)SamplePartsStatusModify(res ResponseEntity){
+//	svc :=  GetConverseService(utils.DBE)
+//	svc.SampleApplyDetailStatusPartsModify(res)
+//}
 
 //修改全部执行成功或失败样本状态
-func (this *ConverseController)SampleAllStatusModify(res ResponseEntity, statusCode int){
-	svc := GetConverseService(utils.DBE)
-	if statusCode == SUCCESS {
-		svc.ModifySampleALLSuccessStatus(res)
-	}else if statusCode == FAILED {
-		svc.ModifySampleALLFailedStatus(res)
-	}else if statusCode == REJECT {
-		svc.ModifySampleAllRejectStatus(res)
-	}
-}
+//func (this *ConverseController)SampleAllStatusModify(res ResponseEntity, statusCode int){
+//	svc := GetConverseService(utils.DBE)
+//	if statusCode == SUCCESS {
+//		svc.ModifySampleALLSuccessStatus(res)
+//	}else if statusCode == FAILED {
+//		svc.ModifySampleALLFailedStatus(res)
+//	}else if statusCode == REJECT {
+//		svc.ModifySampleAllRejectStatus(res)
+//	}
+//}
 
 //处理读到的信息
 func (this *ConverseController) HandleMessage(n int, message []byte){
 	var res ResponseEntity
 	json.Unmarshal(message,&res)
-	//调试临时用, 把设备信息打印忽略
-	if res.Response != "report_data" {
-		log.Println("res:",&res)
-	}
+
+	resp := res.Response
 	result := res.Result
 	taskId := res.Data.Task_id
 	isEnd := res.Data.Is_end
 	taskType := res.Data.Type
+
+	//调试临时用, 把设备信息打印忽略
+	//if resp != "report_data" {
+	//	log.Println("res:",&res)
+	//}
 	//response := res.Response
 
 	//处理设备状态数据
@@ -133,7 +134,10 @@ func (this *ConverseController) HandleMessage(n int, message []byte){
 			if isEnd {
 				err = this.StatusModify(SUCCESS,taskId)
 			}
-			this.SampleAllStatusModify(res,SUCCESS)
+			svc := GetConverseService(utils.DBE)
+			svc.ModifySampleStatusByApplyMainInfo(taskId,resp,res)
+
+			//this.SampleAllStatusModify(res,SUCCESS)
 		}else if  taskType== "abnormal_end" {
 			if isEnd {
 				log.Println("----------修改失败状态----------")
@@ -141,7 +145,9 @@ func (this *ConverseController) HandleMessage(n int, message []byte){
 				this.SaveExcepMsg(res, taskId)
 				err = this.StatusModify(FAILED, taskId)
 			}
-			this.SamplePartsStatusModify(res)
+			svc := GetConverseService(utils.DBE)
+			svc.ModifySampleStatusByApplyMainInfo(taskId,resp,res)
+			//this.SamplePartsStatusModify(res)
 		}else if taskType == "task_activate" {
 			log.Println(">>>>>>>>>>修改激活状态>>>>>>>>>>")
 			err = this.StatusModify(ACTIVE,taskId)
@@ -157,7 +163,9 @@ func (this *ConverseController) HandleMessage(n int, message []byte){
 				//保存异常信息
 				this.SaveExcepMsg(res,taskId)
 				err = this.StatusModify(REJECT,taskId)
-				this.SampleAllStatusModify(res,REJECT)
+				//this.SampleAllStatusModify(res,REJECT)
+				svc := GetConverseService(utils.DBE)
+				svc.ModifySampleAllRejectStatus(res)
 	}
 
 	if err != nil {