Beispiel #1
0
 def add_new_asset_info(self, data):
     asset_type = data['asset_type']
     from itdblib.common.type_info_utils import consumeList, phoneList
     data['store_state'] = '库存'
     if asset_type in consumeList():
         acs = AssetConsumeService()
         ret, msg = acs.store_new_consume_info(data)
     elif asset_type in phoneList():
         # 电话号码类存数
         ret, msg = AssetInfoService().validate_phone_is_single(data)
         if ret:
             acd = AssetInfoChNameToId()
             data = acd.get_asset_info_common_data(data)
             ret, msg = AssetPhoneInfoDal().store_new_phone_data(data)
             return ret, msg
     else:
         # 固定资产类存数
         data = self.transform_web_data(data)
         ret, msg = AssetInfoService().validate_add_new_asset_info(data)
         if ret:
             ret, msg = AssetInfoDal().add_new_asset_info(msg)
             return ret, msg
     return ret, msg
Beispiel #2
0
def show_advanced_asset_info():
    start = request.values['iDisplayStart']
    count = request.values['iDisplayLength']
    acs = AssetConsumeService()
    params = request.values
    return acs.get_asset_consume_info_advanced_search_show(params, start, count)
Beispiel #3
0
def get_operate_infos(consume_id):
    from itdblib.dal.operation_info_dal import OperationInfoDal

    operInfos = OperationInfoDal().get_all_oper_info_by_asset_id(consume_id)
    aps = AssetConsumeService()
    return aps.get_consume_operate_json(operInfos)
Beispiel #4
0
def show_asset_consume_info_by_id(consume_id):
    acs = AssetConsumeService()
    return acs.get_asset_consume_info_by_id(consume_id)
Beispiel #5
0
def show_asset_phone_info_by_all(id):
    start = request.values['iDisplayStart']
    count = request.values['iDisplayLength']
    acs = AssetConsumeService()
    return acs.get_asset_consume_info_search_show(id, start, count)
Beispiel #6
0
def get_consume_num():
    params = request.form
    acs = AssetConsumeService()
    return acs.get_prov_model_place_num(params)
Beispiel #7
0
def show_asset_info():
    start = request.form['iDisplayStart']
    count = request.form['iDisplayLength']
    acs = AssetConsumeService()
    return acs.get_asset_consume_info_all_show(start, count)
Beispiel #8
0
def get_consume_in_num():
    params = request.form
    acs = AssetConsumeService()
    params = acs.get_prov_model_user_name_num(params)
    return params
Beispiel #9
0
def show_asset_consume_info_by_id():
    search_val = request.form["return_val"]
    acs = AssetConsumeService()
    return acs.get_asset_consume_info_by_rtx_id(search_val)