|
|
|
@ -54,6 +54,9 @@ def add_update_drug_form():
|
|
|
|
|
setattr(obj, 'is_del', 0)
|
|
|
|
|
bll_obj.update(obj)
|
|
|
|
|
else:
|
|
|
|
|
count_num = bll_obj.execute(
|
|
|
|
|
"select count(id) count_num from rms_medicament_extend").fetchone()
|
|
|
|
|
if count_num.count_num < 30:
|
|
|
|
|
obj = EntityMedicamentExtend()
|
|
|
|
|
for i in finds:
|
|
|
|
|
setattr(obj, i, request.values.get(i))
|
|
|
|
@ -62,6 +65,8 @@ def add_update_drug_form():
|
|
|
|
|
setattr(obj, "sort_index", int(sort_index.sort_index or '0') + 1)
|
|
|
|
|
bll_obj.insert(obj)
|
|
|
|
|
return jsonify(Utils.true_return())
|
|
|
|
|
else:
|
|
|
|
|
return jsonify(Utils.false_return())
|
|
|
|
|
|
|
|
|
|
@drug_form_router.route("/del", methods=["GET", "POST"])
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|