35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
async def specification_template_update(ns={}):
|
|
"""
|
|
规格模板删
|
|
:param ns:
|
|
:return:
|
|
"""
|
|
ns_template = {
|
|
'id': ns.get('id')
|
|
}
|
|
db = DBPools()
|
|
async with db.sqlorContext('kboss') as sor:
|
|
try:
|
|
if ns.get('orgid'):
|
|
ns_template['orgid'] = ns.get('orgid')
|
|
if ns.get('patternname'):
|
|
ns_template['patternname'] = ns.get('patternname')
|
|
if ns.get('productid'):
|
|
ns_template['productid'] = ns.get('productid')
|
|
if ns.get('spec_pattern'):
|
|
ns_template['spec_pattern'] = ns.get('spec_pattern')
|
|
|
|
await sor.U('specification',ns)
|
|
return {
|
|
"status": True,
|
|
"msg": "delete specification template success"
|
|
}
|
|
except Exception as e:
|
|
raise e
|
|
return {
|
|
"status": False,
|
|
"msg": "delete specification template failed"
|
|
}
|
|
|
|
ret = await specification_template_update(params_kw)
|
|
return ret |