var system = require("../../system")
var settings = require("../../../config/settings");
const CtlBase = require("../ctl.base");
const uuidv4 = require('uuid/v4');
const md5 = require("MD5");
const moment = require("moment");

const uiconfig = system.getUiConfig2(settings.wxconfig.appId);
class EsettleofflineitemCtl extends CtlBase {
  constructor() {
    super(CtlBase.getServiceName(EsettleofflineitemCtl));
  }

  async itemList(queryobj, qobj, req) {
    try {
      var params = qobj.search || {};
      if(!params.esettleoffline_id) {
        return system.getErrResult2({total:0, rows:[]});
      }

      var page = await this.service.pageByCondition(params);
      return system.getResult2(page);
    } catch (e) {
      console.log(e);
      return system.getErrResult2("您的网络不稳, 请稍后重试");
    }
  }

}
module.exports = EsettleofflineitemCtl;