update restropect chaincode

parent e7d540c7
......@@ -2,5 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/src/bean" vcs="Git" />
</component>
</project>
\ No newline at end of file
......@@ -2,7 +2,13 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="de83b181-e854-4be8-81f5-73a2fdb02762" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/bean" beforeDir="false" afterPath="$PROJECT_DIR$/src/bean" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/bean/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/bean/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/bean/bean.go" beforeDir="false" afterPath="$PROJECT_DIR$/src/bean/supply_chain.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/bean/bean_test.go" beforeDir="false" afterPath="$PROJECT_DIR$/src/bean/supply_chain_test.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/medical_chain/medical.go" beforeDir="false" afterPath="$PROJECT_DIR$/src/medical_chain/medical.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/retrospect_chain/restropect_test.go" beforeDir="false" afterPath="$PROJECT_DIR$/src/retrospect_chain/restropect_test.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/retrospect_chain/retrospect.go" beforeDir="false" afterPath="$PROJECT_DIR$/src/retrospect_chain/retrospect.go" afterDir="false" />
</list>
......@@ -15,77 +21,67 @@
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor />
<second_editor />
<entry file="file://$PROJECT_DIR$/src/bean/supply_chain.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="968">
<caret line="50" selection-start-line="50" selection-end-line="50" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/medical_chain/medical.go">
<entry file="file://$PROJECT_DIR$/src/retrospect_chain/restropect_test.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3276">
<caret line="189" column="14" selection-start-line="189" selection-start-column="14" selection-end-line="189" selection-end-column="14" />
<folding>
<element signature="e#14#170#0" expanded="true" />
</folding>
<state relative-caret-position="176">
<caret line="13" column="11" selection-start-line="13" selection-start-column="11" selection-end-line="13" selection-end-column="11" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/retrospect_chain/retrospect.go">
<entry file="file://$PROJECT_DIR$/src/testcc/testcc.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="10080">
<caret line="567" column="51" selection-start-line="567" selection-start-column="51" selection-end-line="567" selection-end-column="51" />
<state relative-caret-position="682">
<caret line="35" column="5" selection-start-line="35" selection-start-column="5" selection-end-line="35" selection-end-column="5" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/medical_chain/medical_test.go">
<entry file="file://$PROJECT_DIR$/src/testcc/testcc_test.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="450">
<caret line="30" column="25" selection-start-line="30" selection-start-column="25" selection-end-line="30" selection-end-column="25" />
<folding>
<element signature="e#14#112#0" expanded="true" />
</folding>
<state relative-caret-position="352">
<caret line="20" selection-start-line="20" selection-end-line="20" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/retrospect_chain/restropect_test.go">
<entry file="file://$PROJECT_DIR$/src/retrospect_chain/retrospect.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396">
<caret line="27" column="144" selection-start-line="27" selection-start-column="144" selection-end-line="27" selection-end-column="144" />
<state relative-caret-position="22">
<caret line="1306" column="50" lean-forward="true" selection-start-line="1306" selection-start-column="50" selection-end-line="1306" selection-end-column="50" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/medical_chain/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="126">
<caret line="7" selection-start-line="7" selection-end-line="7" />
</first_editor>
<second_editor />
<entry file="file://$PROJECT_DIR$/src/bean/supply_chain_test.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3146">
<caret line="150" column="5" selection-start-line="140" selection-end-line="150" selection-end-column="5" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/retrospect_chain/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="18">
<caret line="1" selection-start-line="1" selection-end-line="7" />
</first_editor>
<second_editor />
<entry file="file://$PROJECT_DIR$/src/medical_chain/medical.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3146">
<caret line="150" column="19" selection-start-line="150" selection-start-column="10" selection-end-line="150" selection-end-column="19" />
<folding>
<element signature="e#14#170#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
......@@ -93,7 +89,7 @@
<file pinned="false" current-in-tab="false">
<entry file="file:///usr/local/go/src/builtin/builtin.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="4680">
<state relative-caret-position="5720">
<caret line="260" column="4" selection-start-line="260" selection-start-column="4" selection-end-line="260" selection-end-column="4" />
</state>
</provider>
......@@ -102,7 +98,7 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/github.com/gongxianghui_framework/leadger.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="162">
<state relative-caret-position="198">
<caret line="9" selection-start-line="9" selection-end-line="9" />
</state>
</provider>
......@@ -111,7 +107,7 @@
<file pinned="false" current-in-tab="false">
<entry file="file:///usr/local/go/src/testing/testing.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="14940">
<state relative-caret-position="18238">
<caret line="846" selection-start-line="846" selection-end-line="846" />
</state>
</provider>
......@@ -200,16 +196,21 @@
<option value="$PROJECT_DIR$/src/github.com/gongxianghui_framework/gongxianghui.go" />
<option value="$PROJECT_DIR$/src/retrospect_chain/README.md" />
<option value="$PROJECT_DIR$/src/medical_chain/README.md" />
<option value="$PROJECT_DIR$/src/bean/bean.go" />
<option value="$PROJECT_DIR$/src/bean/supply_chain_test.go" />
<option value="$PROJECT_DIR$/src/medical_chain/medical.go" />
<option value="$PROJECT_DIR$/src/testcc/testcc.go" />
<option value="$PROJECT_DIR$/src/testcc/testcc_test.go" />
<option value="$PROJECT_DIR$/src/retrospect_chain/restropect_test.go" />
<option value="$PROJECT_DIR$/src/retrospect_chain/retrospect.go" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<component name="ProjectFrameBounds" extendedState="4">
<option name="x" value="71" />
<option name="y" value="33" />
<option name="width" value="629" />
<option name="height" value="450" />
<option name="y" value="31" />
<option name="width" value="1885" />
<option name="height" value="1937" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
......@@ -217,7 +218,6 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
......@@ -234,7 +234,7 @@
<item name="chaincode" type="b2602c69:ProjectViewProjectNode" />
<item name="chaincode" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="medical_chain" type="462c0819:PsiDirectoryNode" />
<item name="bean" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="chaincode" type="b2602c69:ProjectViewProjectNode" />
......@@ -242,10 +242,17 @@
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="retrospect_chain" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="chaincode" type="b2602c69:ProjectViewProjectNode" />
<item name="chaincode" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="testcc" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
......@@ -255,7 +262,7 @@
<property name="go.gopath.indexing.explicitly.defined" value="true" />
<property name="go.import.settings.migrated" value="true" />
<property name="go.sdk.automatically.set" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/retrospect_chain" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../example-event-solidity2go-master" />
<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" />
......@@ -279,7 +286,7 @@
</list>
</option>
</component>
<component name="RunManager">
<component name="RunManager" selected="Go Test.TestAddActivityInfo in github.com/hyperledger/chaincode/src/retrospect_chain">
<configuration name="TestAddActivityInfo in github.com/hyperledger/chaincode/src/retrospect_chain" type="GoTestRunConfiguration" factoryName="Go Test" temporary="true" nameIsGenerated="true">
<module name="chaincode" />
<working_directory value="$PROJECT_DIR$/src/retrospect_chain" />
......@@ -291,25 +298,37 @@
<pattern value="^TestAddActivityInfo$" />
<method v="2" />
</configuration>
<configuration name="TestBeanChainCode_Invoke in github.com/hyperledger/chaincode/src/bean" type="GoTestRunConfiguration" factoryName="Go Test" temporary="true" nameIsGenerated="true">
<module name="chaincode" />
<working_directory value="$PROJECT_DIR$/src/bean" />
<framework value="gotest" />
<kind value="PACKAGE" />
<package value="github.com/hyperledger/chaincode/src/bean" />
<directory value="$PROJECT_DIR$/" />
<filePath value="$PROJECT_DIR$/" />
<pattern value="^TestBeanChainCode_Invoke$" />
<method v="2" />
</configuration>
<configuration name="TestBeanChainCode_Invoke in github.com/hyperledger/chaincode/src/testcc" type="GoTestRunConfiguration" factoryName="Go Test" temporary="true" nameIsGenerated="true">
<module name="chaincode" />
<working_directory value="$PROJECT_DIR$/src/testcc" />
<framework value="gotest" />
<kind value="PACKAGE" />
<package value="github.com/hyperledger/chaincode/src/testcc" />
<directory value="$PROJECT_DIR$/" />
<filePath value="$PROJECT_DIR$/" />
<pattern value="^TestBeanChainCode_Invoke$" />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Go Test.TestAddActivityInfo in github.com/hyperledger/chaincode/src/retrospect_chain" />
<item itemvalue="Go Test.TestBeanChainCode_Invoke in github.com/hyperledger/chaincode/src/testcc" />
<item itemvalue="Go Test.TestBeanChainCode_Invoke in github.com/hyperledger/chaincode/src/bean" />
</list>
</recent_temporary>
</component>
<component name="TestHistory">
<history-entry file="TestBackUpCheck_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui2_0 - 2020.04.01 at 16h 41m 47s.xml">
<configuration name="TestBackUpCheck in github.com/hyperledger/chaincode/src/github.com/gongxianghui2.0" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestFieldCheck_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_framework - 2020.04.03 at 16h 28m 41s.xml">
<configuration name="TestFieldCheck in github.com/hyperledger/chaincode/src/github.com/gongxianghui_framework" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestFieldCheck_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_framework - 2020.04.03 at 16h 29m 34s.xml">
<configuration name="TestFieldCheck in github.com/hyperledger/chaincode/src/github.com/gongxianghui_framework" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestFieldCheck_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_framework - 2020.04.03 at 16h 29m 59s.xml">
<configuration name="TestFieldCheck in github.com/hyperledger/chaincode/src/github.com/gongxianghui_framework" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestFieldCheck_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_framework - 2020.04.03 at 16h 32m 30s.xml">
<configuration name="TestFieldCheck in github.com/hyperledger/chaincode/src/github.com/gongxianghui_framework" configurationId="GoTestRunConfiguration" />
</history-entry>
......@@ -328,6 +347,18 @@
<history-entry file="TestAddActivityInfo_in_github_com_hyperledger_chaincode_src_retrospect_chain - 2020.12.03 at 10h 23m 01s.xml">
<configuration name="TestAddActivityInfo in github.com/hyperledger/chaincode/src/retrospect_chain" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestBeanChainCode_Invoke_in_github_com_hyperledger_chaincode_src_bean - 2020.12.08 at 10h 39m 15s.xml">
<configuration name="TestBeanChainCode_Invoke in github.com/hyperledger/chaincode/src/bean" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestBeanChainCode_Invoke_in_github_com_hyperledger_chaincode_src_testcc - 2021.03.02 at 11h 52m 38s.xml">
<configuration name="TestBeanChainCode_Invoke in github.com/hyperledger/chaincode/src/testcc" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestBeanChainCode_Invoke_in_github_com_hyperledger_chaincode_src_testcc - 2021.03.02 at 11h 54m 23s.xml">
<configuration name="TestBeanChainCode_Invoke in github.com/hyperledger/chaincode/src/testcc" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestAddActivityInfo_in_github_com_hyperledger_chaincode_src_retrospect_chain - 2021.03.08 at 14h 27m 21s.xml">
<configuration name="TestAddActivityInfo in github.com/hyperledger/chaincode/src/retrospect_chain" configurationId="GoTestRunConfiguration" />
</history-entry>
</component>
<component name="TodoView">
<todo-panel id="selected-file">
......@@ -339,24 +370,24 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="71" y="31" width="2489" height="1279" extended-state="6" />
<frame x="71" y="31" width="1885" height="1937" extended-state="4" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.17673653" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.12192455" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" weight="0.3294849" />
<window_info anchor="bottom" id="Run" order="2" weight="0.39786857" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.39875665" />
<window_info active="true" anchor="bottom" id="Find" order="1" visible="true" weight="0.32903588" />
<window_info anchor="bottom" id="Run" order="2" weight="0.39742154" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.39865622" />
<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.32980227" />
<window_info anchor="bottom" id="TODO" order="6" weight="0.3294849" />
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" order="8" />
<window_info anchor="bottom" id="Version Control" order="8" weight="0.3294849" />
<window_info anchor="bottom" id="Database Changes" order="9" />
<window_info anchor="bottom" id="Statistic" order="10" />
<window_info active="true" anchor="bottom" id="Terminal" order="11" visible="true" weight="0.29307282" />
<window_info anchor="bottom" id="Statistic" order="10" weight="0.3294849" />
<window_info anchor="bottom" id="Terminal" order="11" weight="0.29283315" />
<window_info anchor="bottom" id="Event Log" order="12" side_tool="true" />
<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" />
......@@ -381,16 +412,15 @@
<line>384</line>
<option name="timeStamp" value="9" />
</line-breakpoint>
<line-breakpoint enabled="true" type="DlvLineBreakpoint">
<url>file://$PROJECT_DIR$/src/testcc/testcc_test.go</url>
<line>15</line>
<option name="timeStamp" value="10" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/../fabric/protos/peer/chaincode_event.pb.go" />
<entry file="file://$PROJECT_DIR$/../fabric/protos/peer/chaincode_shim.pb.go" />
<entry file="file://$PROJECT_DIR$/../fabric/core/chaincode/shim/handler.go" />
<entry file="file://$PROJECT_DIR$/../fabric/core/chaincode/shim/chaincode.go" />
<entry file="file://$PROJECT_DIR$/../fabric/core/chaincode/lib/cid/interfaces.go" />
<entry file="file://$PROJECT_DIR$/../fabric/core/chaincode/shim/ext/cid/interfaces.go" />
<entry file="file://$PROJECT_DIR$/../fabric/protos/peer/proposal.pb.go" />
<entry file="file://$PROJECT_DIR$/../fabric/core/endorser/mocks/support.go" />
<entry file="file://$PROJECT_DIR$/../fabric/core/endorser/endorser.go">
......@@ -550,9 +580,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../fabric/core/chaincode/shim/interfaces.go" />
<entry file="file://$PROJECT_DIR$/../fabric/core/chaincode/shim/response.go" />
<entry file="file://$PROJECT_DIR$/../fabric/protos/peer/proposal_response.pb.go" />
<entry file="file://$PROJECT_DIR$/src/github.com/gongxianghui_framework/schema.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1530">
......@@ -589,23 +616,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/medical_chain/medical.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3276">
<caret line="189" column="14" selection-start-line="189" selection-start-column="14" selection-end-line="189" selection-end-column="14" />
<folding>
<element signature="e#14#170#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/retrospect_chain/retrospect.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="10080">
<caret line="567" column="51" selection-start-line="567" selection-start-column="51" selection-end-line="567" selection-end-column="51" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/medical_chain/medical_test.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="450">
......@@ -636,31 +646,111 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../fabric/core/scc/loadsysccs_test.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="720">
<caret line="53" column="30" selection-start-line="53" selection-start-column="30" selection-end-line="53" selection-end-column="30" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../fabric/core/chaincode/shim/interfaces.go">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret line="92" column="4" selection-start-line="92" selection-start-column="4" selection-end-line="92" selection-end-column="4" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../fabric/core/chaincode/shim/response.go">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret line="34" column="18" selection-start-line="34" selection-start-column="14" selection-end-line="34" selection-end-column="22" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../fabric/protos/peer/proposal_response.pb.go">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret line="109" column="5" selection-start-line="109" selection-start-column="5" selection-end-line="109" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../fabric/core/chaincode/shim/handler.go">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret line="282" column="20" selection-start-line="282" selection-start-column="8" selection-end-line="282" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/bean/supply_chain.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="968">
<caret line="50" selection-start-line="50" selection-end-line="50" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/testcc/testcc.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="682">
<caret line="35" column="5" selection-start-line="35" selection-start-column="5" selection-end-line="35" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/testcc/testcc_test.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="352">
<caret line="20" selection-start-line="20" selection-end-line="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/bean/supply_chain_test.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3146">
<caret line="150" column="5" selection-start-line="140" selection-end-line="150" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/medical_chain/medical.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3146">
<caret line="150" column="19" selection-start-line="150" selection-start-column="10" selection-end-line="150" selection-end-column="19" />
<folding>
<element signature="e#14#170#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file:///usr/local/go/src/builtin/builtin.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="4680">
<state relative-caret-position="5720">
<caret line="260" column="4" selection-start-line="260" selection-start-column="4" selection-end-line="260" selection-end-column="4" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/github.com/gongxianghui_framework/leadger.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="162">
<state relative-caret-position="198">
<caret line="9" selection-start-line="9" selection-end-line="9" />
</state>
</provider>
</entry>
<entry file="file:///usr/local/go/src/testing/testing.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="14940">
<state relative-caret-position="18238">
<caret line="846" selection-start-line="846" selection-end-line="846" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/retrospect_chain/restropect_test.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396">
<caret line="27" column="144" selection-start-line="27" selection-start-column="144" selection-end-line="27" selection-end-column="144" />
<state relative-caret-position="176">
<caret line="13" column="11" selection-start-line="13" selection-start-column="11" selection-end-line="13" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/retrospect_chain/retrospect.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="22">
<caret line="1306" column="50" lean-forward="true" selection-start-line="1306" selection-start-column="50" selection-end-line="1306" selection-end-column="50" />
</state>
</provider>
</entry>
......
......@@ -21,14 +21,14 @@ type Medical struct {
}
/*
公司信息
公司信息
*/
type CompanyInfo struct {
Id uint64`json:"id"`
BusinessLicense string `json:"businessLicense"`
Cname string `json:"cname"`
CmpanyAddress string `json:"cmpanyAddress"`
CompanyDesc string `json:"companyDesc"`
CompanyDesc string `json:"companyDesc"`/**/
CompanyType string `json:"companyType"`
ContactPhone string `json:"contactPhone"`
Contacts string `json:"contacts"`
......@@ -234,7 +234,7 @@ func AddBusinessInfo(args []string,stub shim.ChaincodeStubInterface) pb.Response
}
/*
技术人员添加使用信息
技术人员添加使用信息
*/
func AddUseInfo(args []string,stub shim.ChaincodeStubInterface) pb.Response{
if len(args) > 1 {
......@@ -394,4 +394,7 @@ func main() {
if err != nil {
fmt.Printf("Error starting medical chaincode: %s", err)
}
}
\ No newline at end of file
}
......@@ -43,7 +43,8 @@ var(
packagingInfo =`{"packid":"1101","cid":"1101","baseId":"baseId","plotId":"plotId","sid":"1101","bno":"1102","packInfo":"packInfo","bizType":"bizType","pno":"bizType","packCount":0,"packUnit":"packUnit","packDate":"packUnit","packPics":["speciesDesc","speciesDesc"],"principalId":"packUnit","principal":"packUnit"}`
salesInfo =`{"id":"1101","cid":"1101","baseId":"baseId","plotId":"plotId","sid":"sid","bno":"1101","saleInfo":"saleInfo","bizType":"bizType","sno":"1101","customer":"customer","saleCount":0,"packingSize":"customer","saleDate":"saleDate","salePics":"salePics","trackingNo":"trackingNo","logisticsName":"logisticsName","did":0,"principalId":"principalId","principal":"principalId","commissionRatio":0}`
qrcode =`{"p_no":"1102","start_number":0,"count":100,"product_show":{"product_name":true,"pick_date":true,"expiration_date":10,"product_type":true,"product_no":true,"stoage_mode":"低温保存","product_des":true,"product_files":["speciesDesc","speciesDesc"]},"retrospect_show":{"base_name":"1101","polt_name":"1101","species_name":"1101","plant_activity":"1101","plant_test":"1101","plant_pick":"1101",
"quality_test":"1101","packaging":"1101","sale_info":"1101","logistics_info":false,"base_files":["speciesDesc","speciesDesc"]},"quality_test_show":{"qtId":"1101","detection":false,"detection_mode":false,"detection_tiem":false,"detection_result":false,"detection_people":false,"write_detection_paper":false,"air_detection_paper":false},"company_show":{"cid":"1101","company_name":false,"company_person":false,"company_address":false,"company_intro":false,"business_license":false}}`
"quality_test":"1101","packaging":"1101","sale_info":"1101","logistics_info":false,"base_files":["speciesDesc","speciesDesc"]},"quality_test_show":{"qtId":"1101","detection":false,"detection_mode":false,"detection_tiem":false,"detection_result":false,"detection_people":false,"detection_paper":false,"land_detection_paper":false,"write_detection_paper":false,"air_detection_paper":false},"company_show":
{"cid":"1101","principal":false,"principal_phone":false,"company_name":false,"company_person":false,"company_address":false,"company_intro":false,"business_license":false}}`
)
func TestAddActivityInfo(t *testing.T) {
......
......@@ -435,12 +435,12 @@ type QualityTestShow struct {
QtId string `json:"qtId"` //质检信息ID 当前这一批次对应的质检信息ID
Detection bool `json:"detection"` //检测机构
DetectionMode bool `json:"detection_mode"` //检测方式
DetectionTiem bool `json:"detection_tiem"` //检测时间
DetectionTime bool `json:"detection_time"` //检测时间
DetectionResult bool `json:"detection_result"` //检测结果
DetectionPeople bool `json:"detection_people"` //检测人
DetectionPaper bool `json:"detection_paper"` //质量检测报告
WaterDetectionPaper bool `json:"write_detection_paper"` //水检测报告
LandDetectionPaper bool `json:"detection_paper"` //土地检测报告
LandDetectionPaper bool `json:"land_detection_paper"` //土地检测报告
AirDetectionPaper bool `json:"air_detection_paper"` //空气检测报告
}
......@@ -451,7 +451,7 @@ type CompanyShow struct {
Cid string `json:"cid"` //企业Id 当前这一批次对应的企业信息ID
CompanyName bool `json:"company_name"`
Principal bool `json:"principal"` //负责人
PrincipalPhone bool `json:"principal"` //负责人联系电话
PrincipalPhone bool `json:"principal_phone"` //负责人联系电话
CompanyPerson bool `json:"company_person"` //公司法人
CompanyAddress bool `json:"company_address"` //公司地址
CompanyIntro bool `json:"company_intro"` //公司简介
......@@ -533,7 +533,7 @@ func (ret *Retrospect) Invoke(stub shim.ChaincodeStubInterface) pb.Response {
case "addsaleInfo": //增加销售信息
return AddsaleInfo( args, stub)
case "searchRespectInfo": //查询溯源信息
return SearchRespectInfo( args, stub)
return SearchRespectInfo(args, stub)
case "testCheck": //测试接口
return TestCheck(args, stub)
default:
......
package main
import (
"fmt"
"github.com/hyperledger/fabric/core/chaincode/shim"
pb "github.com/hyperledger/fabric/protos/peer"
)
type TestCC struct {
}
func (ret *TestCC) Init(stub shim.ChaincodeStubInterface) pb.Response {
return shim.Success([]byte("retrospect chain init success"))
}
// Invoke is called to update or query the ledger in a proposal transaction.
// Updated state variables are not committed to the ledger until the
// transaction is committed.
func (ret *TestCC) Invoke(stub shim.ChaincodeStubInterface) pb.Response {
functionName, args := stub.GetFunctionAndParameters()
switch functionName {
case "testCheck": //测试接口
return TestCheck(args, stub)
default:
return shim.Error(fmt.Sprintf("%s Unsupported function name ", functionName))
}
return pb.Response{}
}
func TestCheck(args []string, stub shim.ChaincodeStubInterface) pb.Response {
if len(args) == 0 {
return shim.Success([]byte("参数内容为空"))
}
return shim.Success([]byte(args[0]))
}
func main() {
err := shim.Start(&TestCC{})
if err != nil {
fmt.Printf("Error starting medical chaincode: %s", err)
}
}
package main
import (
"fmt"
"github.com/hyperledger/fabric/core/chaincode/shim"
"testing"
)
func TestBeanChainCode_Invoke(t *testing.T) {
cc := new(TestCC)
stub := shim.NewMockStub("BeanCC", cc)
stub.MockInit("init", nil)
fmt.Println("========================================invoke FinancingInfoBean Management getFinancingById============================================")
responseByAddFin := stub.MockInvoke("invoke1", [][]byte{[]byte("testCheck")})
if responseByAddFin.Status != 200 {
t.Error(fmt.Printf("Invoke status %d,message %s and payload %s\n", responseByAddFin.Status, responseByAddFin.Message, string(responseByAddFin.Payload)))
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment