Exemple #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());
        }
Exemple #2
0
        public async Task <IActionResult> GetBasicCodeDto(string typeNo)
        {
            _logger.LogInformation(String.Format(@"****** CommonController GetBasicCodeDto fired!! ******"));
            var data = await _dKSDAO.GetBasicCodeDto(typeNo);

            return(Ok(data));
        }