Exemplo n.º 1
0
        public async Task <IActionResult> QcSentMailDtrFgtResult(string stage, string modelNo, string article, string labNo, string remark, string type, string reason)
        {
            _logger.LogInformation(String.Format(@"******DTRController SentMailF340PpdByArticle fired!! ******"));
            ModelDah modelDah = _modelDahDAO.FindSingle(
                x => x.MODELNO.Trim() == modelNo.Trim() && x.FACTORYID.Trim() == labNo.Substring(0, 1));
            var season = modelDah.SEASON;

            var toMails = new List <string>();
            List <BasicCodeDto> list017 = await _dKSDAO.GetBasicCodeDto("017");    //017 = 開發小組

            BasicCodeDto teamId = list017.FirstOrDefault(x => x.Key == modelDah.DEVTEAMID.Trim());

            if (stage == "CR2" || stage == "SMS" || stage == "CS1")    //mail to DEV
            {
                toMails = teamId.MemoZh3.Split(";").Where(x => x.Length > 5).ToList();
            }
            else if (stage == "CS2" || stage == "CS3")      //mail to COMM
            {
                toMails = teamId.MemoZh4.Split(";").Where(x => x.Length > 5).ToList();
            }

            var content = string.Format(@"Hi Team: 
{0} Test report has been evaluated from pass to fail or deleted, please check with QC team.
(Model name: {1}, Season: {2}, Model No: {3}, Article: {4})
Type: {5}。  Reason: {6}。 Remark: {7}
", stage, modelDah.MODELNAME, season, modelNo, article, type, reason, remark);

            await _sendMailService.SendListMailAsync(toMails, null, string.Format(@"Test report change result (Season: {0}, Stage: {1}, Model Name: {2}, Model No:{3}, Art:{4})", season, stage, modelDah.MODELNAME, modelNo, article), content, null);

            return(Ok());
        }
Exemplo n.º 2
0
        public async Task <IActionResult> SentMailF340PpdByArticle(SF340PPDSchedule sF340PPDSchedule)
        {
            _logger.LogInformation(String.Format(@"******DKSController SentMailF340PpdByArticle fired!! ******"));

            //var dksSignature = _config.GetSection("DksSignatureLine").Value;
            var dksSignature = "";
            var content      = string.Format(@"The Article : {0} Added Memo please check it in F340-PPD of the below website.{1}", sF340PPDSchedule.article, dksSignature);

            var toMails = new List <string>();
            var users   = await _dksDao.GetUsersByRole("GM0000000038");

            users.ForEach(x =>
            {
                toMails.Add(x.EMAIL);
            });
            await _sendMailService.SendListMailAsync(toMails, null, "This Article Add Memo Please check it in F340-PPD !", content, null);

            return(Ok());
        }