package com.hzya.frame.plugin.incomeInvoiceData.dao.impl;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.plugin.incomeInvoiceData.dao.IIncomeInvoiceDao;
import com.hzya.frame.plugin.incomeInvoiceData.entity.IncomeInvoiceEntity;

import java.util.List;


/**
 *
 * @author makejava
 * @since 2024-06-21 13:52:35
 */
public class IncomeInvoiceDaoImpl extends MybatisGenericDao<IncomeInvoiceEntity, String> implements IIncomeInvoiceDao {

    @Override
    public List<JSONObject> queryData(JSONObject saveData) {
        List<JSONObject> o = (List<JSONObject>) super.selectList(getSqlIdPrifx() + "queryData", saveData);
        return o;
    }
    @Override
    public int saveData(JSONObject saveData) {
        return super.insert(getSqlIdPrifx() + "saveData", saveData);
    }
    @Override
    public int saveDetailData(JSONObject saveData) {
        return super.insert(getSqlIdPrifx() + "saveDetailData", saveData);
    }

    @DS("#entity.dataSourceCode")
    @Override
    public List<IncomeInvoiceEntity> queryOaZb(IncomeInvoiceEntity entity) {
        List<IncomeInvoiceEntity> o = (List<IncomeInvoiceEntity>) super.selectList(getSqlIdPrifx() + "queryOaZb", entity);
        return o;
    }
    @DS("#entity.dataSourceCode")
    @Override
    public List<IncomeInvoiceEntity> queryOaFp(IncomeInvoiceEntity entity) {
        List<IncomeInvoiceEntity> o = (List<IncomeInvoiceEntity>) super.selectList(getSqlIdPrifx() + "queryOaFp", entity);
        return o;
    }
    @DS("#entity.dataSourceCode")
    @Override
    public List<IncomeInvoiceEntity> queryOaMx(IncomeInvoiceEntity entity) {
        List<IncomeInvoiceEntity> o = (List<IncomeInvoiceEntity>) super.selectList(getSqlIdPrifx() + "queryOaMx", entity);
        return o;
    }
    @DS("#entity.dataSourceCode")
    @Override
    public int updateMx(IncomeInvoiceEntity entity) {
        return super.update(getSqlIdPrifx() + "updateMx", entity);
    }
    @DS("#entity.dataSourceCode")
    @Override
    public int updateFP(IncomeInvoiceEntity entity) {
        return super.update(getSqlIdPrifx() + "updateFP", entity);
    }
    @DS("#entity.dataSourceCode")
    @Override
    public int saveMx(IncomeInvoiceEntity entity) {
        return super.insert(getSqlIdPrifx() + "saveMx", entity);
    }

    @DS("#entity.dataSourceCode")
    @Override
    public List<IncomeInvoiceEntity> queryZtzz(IncomeInvoiceEntity entity) {
        List<IncomeInvoiceEntity> o = (List<IncomeInvoiceEntity>) super.selectList(getSqlIdPrifx() + "queryZtzz", entity);
        return o;
    }

    @DS("#entity.dataSourceCode")
    @Override
    public List<JSONObject> queryByAloneId(IncomeInvoiceEntity entity) {
        List<JSONObject> o = (List<JSONObject>) super.selectList(getSqlIdPrifx() + "queryByAloneId", entity);
        return o;
    }
    @DS("htBip")
    @Override
    public List<JSONObject> queryAccount(IncomeInvoiceEntity jnentity) {
        List<JSONObject> o = (List<JSONObject>) super.selectList(getSqlIdPrifx() + "queryAccountByZq", jnentity);
        return o;
    }
}

