209 lines
6.2 KiB
C#
209 lines
6.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using dccdc.DAL;
|
|
using dccdc.Models;
|
|
|
|
namespace dccdc.BLL
|
|
{
|
|
public class MedicalAppointmentBll
|
|
{
|
|
private readonly MedicalAppointmentDal _dal = new MedicalAppointmentDal();
|
|
public string Add(MedicalAppointment model)
|
|
{
|
|
return _dal.Add(model);
|
|
}
|
|
public object getYYRS()
|
|
{
|
|
return _dal.getYYRS();
|
|
}
|
|
public object getYYLX()
|
|
{
|
|
return _dal.getYYLX();
|
|
}
|
|
|
|
public MedicalAppointment getMedicalModel(String openid,String yyrq)
|
|
{
|
|
return _dal.getMedicalModel(openid, yyrq);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据主键给缴费字段做处理
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
public bool ChargePay(string id)
|
|
{
|
|
return _dal.ChargePay(id);
|
|
}
|
|
/// <summary>
|
|
/// 根据主键更新微信订单号
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <param name="zFcode"></param>
|
|
/// <returns></returns>
|
|
public bool UpdateZfCode(string id, string zFcode)
|
|
{
|
|
var m = _dal.GetModel(id);
|
|
if (m.ZFZT != 1)
|
|
{
|
|
m.ZFCode = zFcode;
|
|
}
|
|
return _dal.Update(m);
|
|
}
|
|
/// <summary>
|
|
/// 支付成功修改支付状态
|
|
/// </summary>
|
|
/// <param name="codeid"></param>
|
|
/// <returns></returns>
|
|
public bool UpdateZfzt(string codeid)
|
|
{
|
|
var m = _dal.GetModelByzfcode(codeid);
|
|
m.ZFZT = 1;
|
|
new DAL.chargeDal().addYYCharge(m);
|
|
return _dal.Update(m);
|
|
}
|
|
public List<dicsModel> GetSjd(string yyrq, string jgid)
|
|
{
|
|
return _dal.GetSjd(yyrq, jgid);
|
|
}
|
|
|
|
public List<MedicalAppointment> GetModelByOpenid(string openid)
|
|
{
|
|
return _dal.GetModelByOpenid(openid);
|
|
}
|
|
public MedicalAppointment GetModel(string id)
|
|
{
|
|
return _dal.GetModel(id);
|
|
}
|
|
public int getAllMedicalAppointmentcount(MedicalAppointment model)
|
|
{
|
|
return _dal.getAllMedicalAppointmentcount(model);
|
|
}
|
|
public List<MedicalAppointment> getAllMedicalAppointment(int page, int pagesize, MedicalAppointment model)
|
|
{
|
|
return _dal.getAllMedicalAppointment(page, pagesize, model);
|
|
}
|
|
|
|
|
|
|
|
public MedicalAppointment WXYY(MedicalAppointment ma, int YYType = 1)
|
|
{
|
|
//throw new NotImplementedException();
|
|
return _dal.WXYY(ma, YYType);
|
|
}
|
|
|
|
public int getyyCount(string xm, string yyrq, string yylx,int jgid,int ijgid)
|
|
{
|
|
//throw new NotImplementedException();
|
|
return _dal.getyyCount(xm, yyrq, yylx,jgid,ijgid);
|
|
}
|
|
|
|
public int getTjztCount(string tm)
|
|
{
|
|
return _dal.getTjztCount(tm);
|
|
}
|
|
public ProfessionalExamRegisterModel getTjztXm(string tm)
|
|
{
|
|
return _dal.getTjztXm(tm);
|
|
}
|
|
/// <summary>
|
|
/// 获取预约列表
|
|
/// </summary>
|
|
/// <param name="xm"></param>
|
|
/// <param name="yyrq"></param>
|
|
/// <param name="yylx"></param>
|
|
/// <param name="page"></param>
|
|
/// <param name="pagesize"></param>
|
|
/// <returns></returns>
|
|
public List<Models.MedicalAppointment> getYYList(string xm, string yyrq, string yylx, int page, int pagesize,int jgid,int ijgid)
|
|
{
|
|
//throw new NotImplementedException();
|
|
return _dal.getYYList(xm, yyrq, yylx, page, pagesize,jgid,ijgid);
|
|
}
|
|
|
|
public List<Models.yyqxjlModel> getYYList2(string xm, int page, int pagesize)
|
|
{
|
|
return _dal.getYYList2(xm, page, pagesize);
|
|
}
|
|
|
|
public int getqxyyCount(string xm)
|
|
{
|
|
return _dal.getqxyyCount(xm);
|
|
}
|
|
public List<ExaminationProcessModel> getTjztList(string tm)
|
|
{
|
|
return _dal.getTjztList(tm);
|
|
}
|
|
/// <summary>
|
|
/// 当天是否可预约
|
|
/// </summary>
|
|
/// <param name="date"></param>
|
|
/// <returns></returns>
|
|
public List<WeiXinDate> canSelected(string date, string endtime,string jgid,string CYFA)
|
|
{
|
|
//throw new NotImplementedException();
|
|
return _dal.canSelected(date, endtime,jgid,CYFA);
|
|
}
|
|
/// <summary>
|
|
/// 是否可预约
|
|
/// </summary>
|
|
/// <param name="aDate"></param>
|
|
/// <param name="iDCard"></param>
|
|
/// <returns></returns>
|
|
public OperationResult canYY(DateTime aDate, string iDCard, int cyfa,int jgid=49)
|
|
{
|
|
return _dal.canYY(aDate, iDCard, cyfa,jgid);
|
|
}
|
|
|
|
public int getBKYYCount(string key)
|
|
{
|
|
//throw new NotImplementedException();
|
|
return _dal.getBKYYCount(key);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据日期获取不可预约日期列表
|
|
/// </summary>
|
|
/// <param name="page"></param>
|
|
/// <param name="pagesize"></param>
|
|
/// <param name="key"></param>
|
|
/// <returns></returns>
|
|
public object getBKYYList(int page, int pagesize, string key)
|
|
{
|
|
return _dal.getBKYYList(page, pagesize, key);
|
|
}
|
|
|
|
public object saveBKYYRQ(BKYYRQ bkyy)
|
|
{
|
|
//throw new NotImplementedException();
|
|
return _dal.saveBKYYRQ(bkyy);
|
|
}
|
|
|
|
public object getYYQKTJ(string b, string e)
|
|
{
|
|
//hrow new NotImplementedException();
|
|
var rows = _dal.getYYQKTJ(b, e);
|
|
return new { Rows = rows, Total = rows.Count };
|
|
}
|
|
|
|
public object getYYListDT(string xm, string yyrq, string yylx, string jgid)
|
|
{
|
|
return _dal.getYYListDT(xm, yyrq, yylx, jgid);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据id删除不可预约日期
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
public object delRqlist(string id)
|
|
{
|
|
return _dal.del(id);
|
|
}
|
|
}
|
|
}
|