yl
2024-08-26 b28e8fbf2a78cc9ae5047d2fbe1820fe42850151
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using VueWebCoreApi.DLL.BLL;
using VueWebCoreApi.Models;
using VueWebCoreApi.Tools;
 
namespace VueWebCoreApi.Controllers
{
    [ApiExplorerSettings(GroupName = "App个人中心")]
    [ApiController]
    [Route("api/[controller]")]
    public class AppPersonalController : Controller
    {
        //定义全局信息返回变量
        ToMessage mes = new ToMessage();
        RedisCommon redis = new RedisCommon();
 
        #region[App个人计件工资]
        /// <summary>
        /// App个人计件工资
        /// </summary>
        /// <param name="compute">计算方式:末道计算、逐道计算</param>
        /// <param name="Ratetime">时间</param>
        /// <returns></returns>
        [Route(template: "PieceRateWage")]
        [HttpGet]
        public JsonResult PieceRateWage(string compute, string Ratetime)
        {
            var token = HttpContext.Request.Headers["Token"].ToString();
            User us = JwtTools.Denocode(token.ToString());
            string startopendate = "";  //开始时间
            string endclosedate = "";    //结束时间
            if (Ratetime != "" && Ratetime != null)
            {
                startopendate = Ratetime.Split('~')[0].ToString();
                endclosedate = Ratetime.Split('~')[1].ToString();
            }
            mes = AppPersonalBLL.PieceRateWage(compute, us, startopendate, endclosedate);
            return Json(mes);
        }
        #endregion
    }
}