Commit 929845ef authored by 黄奎's avatar 黄奎

页面修改

parent 9625dace
......@@ -99,6 +99,11 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public List<RB_Course_Preferential_Extend> PreferentialList { get; set; }
/// <summary>
/// 开课时间
/// </summary>
public string OpenTimeStr { get; set; }
/// <summary>
/// 开班开始时间
/// </summary>
......
......@@ -10,6 +10,11 @@ namespace Edu.Model.ViewModel.StudyAbroad
/// </summary>
public class RB_StudyAbroad_ViewModel : RB_StudyAbroad
{
/// <summary>
/// 校区名称
/// </summary>
public string SchoolName { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
......
......@@ -3,6 +3,7 @@ using Edu.Cache.User;
using Edu.Common.API;
using Edu.Common.Enum;
using Edu.Common.Enum.Course;
using Edu.Common.Enum.Sale;
using Edu.Common.Plugin;
using Edu.Model.CacheModel;
using Edu.Model.ViewModel.Course;
......@@ -28,30 +29,37 @@ namespace Edu.Module.Course
/// 订单
/// </summary>
private readonly RB_OrderRepository orderRepository = new RB_OrderRepository();
/// <summary>
/// 订单备注
/// </summary>
private readonly RB_Order_RemarkRepository order_RemarkRepository = new RB_Order_RemarkRepository();
/// <summary>
/// 客人
/// </summary>
private readonly RB_Order_GuestRepository order_GuestRepository = new RB_Order_GuestRepository();
/// <summary>
/// 用户日志
/// </summary>
private readonly RB_User_ChangeLogRepository changeLogRepository = new RB_User_ChangeLogRepository();
/// <summary>
/// 班级
/// </summary>
private readonly RB_ClassRepository classRepository = new RB_ClassRepository();
/// <summary>
/// 阶梯价格
/// </summary>
private readonly RB_Class_StepPriceRepository class_StepPriceRepository = new RB_Class_StepPriceRepository();
/// <summary>
/// 订单阶梯价格
/// </summary>
private readonly RB_Order_StepPriceRepository order_StepPriceRepository = new RB_Order_StepPriceRepository();
/// <summary>
/// 课程计划
/// </summary>
......@@ -61,14 +69,17 @@ namespace Edu.Module.Course
/// 教师
/// </summary>
private readonly RB_TeacherRepository teacherRepository = new RB_TeacherRepository();
/// <summary>
/// 助教
/// </summary>
private readonly RB_AssistRepository assistRepository = new RB_AssistRepository();
/// <summary>
/// 学生
/// </summary>
private readonly RB_StudentRepository studentRepository = new RB_StudentRepository();
/// <summary>
/// 学生关联
/// </summary>
......@@ -78,6 +89,7 @@ namespace Edu.Module.Course
/// 账号
/// </summary>
private readonly RB_AccountRepository accountRepository = new RB_AccountRepository();
/// <summary>
/// 合同
/// </summary>
......@@ -88,6 +100,11 @@ namespace Edu.Module.Course
/// </summary>
private readonly RB_StudyAbroadRepository studyAbroadRepository = new RB_StudyAbroadRepository();
/// <summary>
/// 报价单仓储层对象
/// </summary>
private readonly RB_Course_OfferRepository course_OfferRepository = new RB_Course_OfferRepository();
#region 日语培训
......@@ -646,20 +663,39 @@ namespace Edu.Module.Course
/// <param name="orderId"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public bool CancelClassOrder(int orderId, UserInfo userInfo)
[TransactionCallHandler]
public virtual bool CancelClassOrder(int orderId, UserInfo userInfo)
{
Dictionary<string, object> keyValues = new Dictionary<string, object>() {
var orderModel = orderRepository.GetEntity(orderId);
Dictionary<string, object> keyValues = new Dictionary<string, object>()
{
{ nameof(RB_Order_ViewModel.OrderState),OrderStateEnum.Cancel}
};
List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Order_ViewModel.OrderId),
FiledValue=orderId,
OperatorEnum=OperatorEnum.Equal
if (orderModel.OfferId > 0)
{
keyValues.Add(nameof(RB_Order_ViewModel.OfferId), 0);
}
List<WhereHelper> wheres = new List<WhereHelper>()
{
new WhereHelper()
{
FiledName=nameof(RB_Order_ViewModel.OrderId),
FiledValue=orderId,
OperatorEnum=OperatorEnum.Equal
}
};
bool flag = orderRepository.Update(keyValues, wheres);
if (flag) {
if (flag)
{
if (orderModel.OfferId > 0)
{
Dictionary<string, object> offerFileds = new Dictionary<string, object>()
{
{ nameof(RB_Course_Offer_ViewModel.CustomerStatus),(int)CustomerStatusEnum.Cancel},
{ nameof(RB_Course_Offer_ViewModel.OrderId),0},
};
flag= course_OfferRepository.Update(offerFileds, new WhereHelper(nameof(RB_Course_Offer_ViewModel.Id), orderModel.OfferId));
}
//记录日志信息
changeLogRepository.Insert(new Model.Entity.Log.RB_User_ChangeLog()
{
......
......@@ -119,8 +119,6 @@ namespace Edu.Module.Finance
costlist = costtypeRepository.GetList(new RB_Costtype_Extend() { CostIds = string.Join(",", fdlist.Select(x => x.CostTypeId ?? 0)) });
}
walist = Finance_TemplateRepository.GetAgreeOrWaitList(new Rb_Workflow_Auditrecord() { AuditStatus = WFRrocessStatus.NotAudit }, fridStr);
// tclist = GetTCIDANDTCNUMForBatch(list.Select(x => x.FrID).ToList());
volist = voucherRepository.GetList(new RB_Voucher_Extend() { FrIdStr = fridStr });
}
......
......@@ -142,6 +142,7 @@ namespace Edu.Module.StudyAbroad
{ nameof(RB_StudyAbroad_ViewModel.SupplierId),model.SupplierId},
{ nameof(RB_StudyAbroad_ViewModel.SupplierContract),model.SupplierContract},
{ nameof(RB_StudyAbroad_ViewModel.Remark),model.Remark},
{ nameof(RB_StudyAbroad_ViewModel.School_Id),model.School_Id},
};
flag = studyAbroadRepository.Update(fileds, new WhereHelper(nameof(RB_StudyAbroad_ViewModel.Id), model.Id));
}
......
......@@ -410,7 +410,7 @@ where {where}
orderBy = " o.CreateTime desc";
}
string sql = $@"
SELECT o.*,C.`Name` AS StudyName
SELECT o.*,C.`Name` AS StudyName,C.School_Id AS ClassSchoolId
FROM RB_Order o LEFT JOIN rb_studyabroad c ON o.SourceId = c.Id
WHERE {where} ORDER BY {orderBy}
";
......
......@@ -29,8 +29,9 @@ namespace Edu.Repository.StudyAbroad
var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*,IFNULL(B.`Name`,'') AS SupplierName,IFNULL(B.ContractUrl,'') AS ContractUrl
SELECT A.*,IFNULL(B.`Name`,'') AS SupplierName,IFNULL(B.ContractUrl,'') AS ContractUrl,IFNULL(c.SName,'') AS SchoolName
FROM RB_StudyAbroad AS A LEFT JOIN rb_supplier AS B ON A.SupplierId=B.Id
LEFT JOIN rb_school AS C ON A.School_Id=C.SId
WHERE 1=1
");
builder.AppendFormat(" AND A.{0}={1}", nameof(RB_StudyAbroad_ViewModel.Status), (int)DateStateEnum.Normal);
......
......@@ -471,10 +471,10 @@ namespace Edu.WebApi.Controllers.Course
var userInfo = base.UserInfo;
JObject prams = JObject.Parse(RequestParm.Msg.ToString());
int OrderId = prams.GetInt("OrderId", 0);
if (OrderId <= 0) {
if (OrderId <= 0)
{
return ApiResult.ParamIsNull("订单号不存在");
}
bool flag = orderModule.CancelClassOrder(OrderId, userInfo);
if (flag)
{
......
......@@ -245,6 +245,8 @@ namespace Edu.WebApi.Controllers.StudyAbroad
item.Name,
item.SupplierId,
item.SupplierName,
item.School_Id,
item.SchoolName,
SupplierContract=item.ContractUrl,
item.SuggestPrice,
item.SellPrice,
......@@ -471,6 +473,7 @@ namespace Edu.WebApi.Controllers.StudyAbroad
extModel.Name,
extModel.SupplierId,
extModel.SupplierName,
extModel.School_Id,
SupplierContract= extModel.ContractUrl,
extModel.SuggestPrice,
extModel.SellPrice,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment