//平台审核发票申请失败 1010  但执行的状态是 1000
const system = require("../../../system");
const common = require("./common");
module.exports.auditFailForCustomer=async function (params){
  console.log("第一次未审批 状态 1000");
  let _apply = await common.applyVerification(params);
  if(_apply.status==-1){return _apply;}
  params.nextStatus = common.trim(params.nextStatus);
  params.remark = common.trim(params.remark);
  _apply.status = params.nextStatus;
  _apply.customerStatus = params.nextStatus;
  _apply.remark = params.remark;
  if (params.nextStatus != "1010") {
    return system.getResult(-1,`参数错误 请核对状态码`);
  }
  try {
    await _apply.save();
    return system.getResultSuccess();
  } catch (error) {
    return system.getResult(null, `系统错误 错误信息 ${error}`);
  }
}