Commit eba1f972 authored by liguangyu06's avatar liguangyu06
Browse files

Merge remote-tracking branch 'origin/master'

parents ff9577e0 a0b1303f
loginusername1: loginusername1:
loginusername: 国药集团公司aVD9# loginusername: 国药集团公司!n0d(
goodsname: 一次性注射器NbfHr
import os
from ruamel import yaml
from common.db.db import dbOP
import datetime
curpath = os.path.dirname(os.path.realpath(__file__))
rootPath = os.path.split(curpath)[0]
# 数据读入和写入文件
class FileUtils(object):
def w_info(self, info,keyname):
module=info[2]
dict = {}
value = {}
value['username'] = info[0]
value['goodsname'] = info[1]
key=keyname
dict[key] = value
w_path=rootPath+os.sep+'data'+os.sep+module
# print(w_path)
yamlpath = os.path.join(w_path, "message")
# 写入到yaml文件
with open(yamlpath, "w", encoding="utf-8") as f:
yaml.dump(dict, f, Dumper=yaml.RoundTripDumper,allow_unicode=True)
def r_info(self, module,keyname):
w_path = rootPath + os.sep + 'data' + os.sep + module
yamlpath = os.path.join(w_path, "message")
file_value = open(yamlpath, 'r',encoding='utf-8')
result = yaml.load(file_value.read(), Loader=yaml.Loader)
if result is not None:
key = keyname
if key in result:
return result[key]
else:
return None
else:
return None
if __name__ == '__main__':
# info=("aaaa","bbbbbb","mdm3-pim")
# FileUtils().w_info(info,"产品新增")
aa=FileUtils().r_info("mdm3-pim","产品新增")
print(aa['username'])
loginusername1:
aaaa: aaaa
bbbbbb: bbbbbb
import os import os
from ruamel import yaml from ruamel import yaml
from common.db.db import dbOP from common.db.db import dbOP
import datetime import datetime
curpath = os.path.dirname(os.path.realpath(__file__)) curpath = os.path.dirname(os.path.realpath(__file__))
...@@ -23,10 +24,11 @@ class Rw: ...@@ -23,10 +24,11 @@ class Rw:
yaml.dump(dict, f, Dumper=yaml.RoundTripDumper) yaml.dump(dict, f, Dumper=yaml.RoundTripDumper)
return token return token
def w_info(self, username): def w_info(self, info):
dict = {} dict = {}
value = {} value = {}
value["loginusername"] = username value["loginusername"] = info[0]
value["goodsname"] = info[1]
key="loginusername1" key="loginusername1"
dict[key] = value dict[key] = value
yamlpath = os.path.join(curpath, "data") yamlpath = os.path.join(curpath, "data")
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
"updateById_url2": "/test2api/mdmService/goodsRegistBill/updateById" "updateById_url2": "/test2api/mdmService/goodsRegistBill/updateById"
"getGoodsRegistBillDetail_url": "/test2api/mdmService/goodsRegistBill/getGoodsRegistBillDetail/" "getGoodsRegistBillDetail_url": "/test2api/mdmService/goodsRegistBill/getGoodsRegistBillDetail/"
"handleAuditGoodsRegist_url": "/test2api/mdmService/goodsRegistBill/handleAuditGoodsRegist/" "handleAuditGoodsRegist_url": "/test2api/mdmService/goodsRegistBill/handleAuditGoodsRegist/"
"submitGoodsSpecsRegist_url": "/test2api/mdmService/goodsRegistBill/submitGoodsSpecsRegist/"
"username": "1679886114521" "username": "1679886114521"
"password": "a123456!" "password": "a123456!"
...@@ -301,7 +302,41 @@ json_headers2: { ...@@ -301,7 +302,41 @@ json_headers2: {
}, },
"version": 1 "version": 1
} }
"payload10": {
"pageNum": 1,
"pageSize": 20,
"queryObject": {
"pid": "",
"provId": "%s",
"goodsName": "%s",
"goodsMfrsName": "",
"isAbroad": "",
"purpose": "",
"mgrLevel": "",
"status": 0
}
}
"payload11": {
"registSourceProject": "h0347",
"goodsRegistVO": {
"id": "%s",
"goodsMfrsId": "p56a4",
"goodsName": "%s"
},
"goodsSpecsRegistVOList": [
{
"goodsGg": "20ml",
"miGoodsGg": "20ml",
"miGoodsXh": "20ml",
"goodsUseUnit": "支",
"mi27code": "123456789012243454",
"udiCode": "12345678901234",
"diType":"0",
"rowNum": 1
}
]
}
"name1": "一次性注射器" "name1": "一次性注射器"
checkDict: {"code": 0, "msg":None,"data": {"pageNum": 1, "pageSize": 20, "total": 0, "data": [], "totalInfo": None}} checkDict: {"code": 0, "msg":None,"data": {"pageNum": 1, "pageSize": 20, "total": 0, "data": [], "totalInfo": None}}
checkDict1: {"code": -2,"msg": "医院已被注册,请耐心等待审核通知!", "data": None} checkDict1: {"code": -2,"msg": "医院已被注册,请耐心等待审核通知!", "data": None}
......
产品新增:
username: 国药集团公司T)^Qj
goodsname: 一次性注射器uP^fo
...@@ -54,9 +54,9 @@ ...@@ -54,9 +54,9 @@
</tr> </tr>
<tr width="600"> <tr width="600">
<td class='details-col-elapsed'>2</td> <td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>2</td> <td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0分2</td> <td class='details-col-elapsed'>0分0</td>
<td class="details-col-elapsed">100.0%</td> <td class="details-col-elapsed">100.0%</td>
</tr> </tr>
</table> </table>
...@@ -72,16 +72,9 @@ ...@@ -72,16 +72,9 @@
</tr> </tr>
<tr width="600"> <tr width="600">
<td class="details-col-elapsed"><a href='../log/产品新增和审核通过/log.html' target='_blank'>产品新增和审核通过</a></td> <td class="details-col-elapsed"><a href='../log/产品规格申报/log.html' target='_blank'>产品规格申报</a></td>
<td class="success">成功</td> <td class="success">成功</td>
<td class="details-col-elapsed">2.548</td> <td class="details-col-elapsed">0.804</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/产品规格新增和审核通过/log.html' target='_blank'>产品规格新增和审核通过</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.002</td>
<td class="details-col-elapsed">xiaohesheng</td> <td class="details-col-elapsed">xiaohesheng</td>
</tr> </tr>
......
Supports Markdown
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