12345678910111213141516171819 |
- from utils.executeQuery import executeQuery,IseUpDelQuery
- from utils.ClssSql import ClassSqls
- def uptz(tz_no):
- # 更新已生产量
- ZyUpFin = ClassSqls.ZyUpFin.format(tz_no)
- IseUpDelQuery(ZyUpFin)
- # 查询数据
- ZySelfz = ClassSqls.ZySelfz.format(tz_no)
- fz_result = executeQuery(ZySelfz)[0]
- print(fz_result['qty_fin'],fz_result['qty'])
- if fz_result['qty'] <= fz_result['qty_fin']:
- # 成立更新结案标识
- Zyupclose = ClassSqls.ZyUpClose.format(tz_no)
- IseUpDelQuery(Zyupclose)
- else:
- # 成立更新结案标识
- Zyupclose = ClassSqls.ZyUpNoClose.format(tz_no)
- IseUpDelQuery(Zyupclose)
|