修改中心调研
parent
7e518bf3ab
commit
ce3bfaeb5c
|
@ -28,9 +28,9 @@
|
||||||
"SystemEmailSendConfig": {
|
"SystemEmailSendConfig": {
|
||||||
"Port": 465,
|
"Port": 465,
|
||||||
"Host": "smtp.qiye.aliyun.com",
|
"Host": "smtp.qiye.aliyun.com",
|
||||||
"FromEmail": "test@extimaging.com",
|
"FromEmail": "test-study@extimaging.com",
|
||||||
"FromName": "Test_IRC",
|
"FromName": "Test_Study",
|
||||||
"AuthorizationCode": "SHzyyl2021"
|
"AuthorizationCode": "zhanying123"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,9 +28,9 @@
|
||||||
"SystemEmailSendConfig": {
|
"SystemEmailSendConfig": {
|
||||||
"Port": 465,
|
"Port": 465,
|
||||||
"Host": "smtp.qiye.aliyun.com",
|
"Host": "smtp.qiye.aliyun.com",
|
||||||
"FromEmail": "test@extimaging.com",
|
"FromEmail": "uat-study@extimaging.com",
|
||||||
"FromName": "Test_IRC",
|
"FromName": "Uat_Study",
|
||||||
"AuthorizationCode": "SHzyyl2021"
|
"AuthorizationCode": "zhanying123"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,6 +167,29 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TrialSiteSurveySelectView
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public TrialSiteSurveyEnum State { get; set; }
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
public bool IsDeleted { get; set; }
|
||||||
|
|
||||||
|
public string Phone { get; set; } = string.Empty;
|
||||||
|
public string Email { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string UserName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TrialSiteSurveySelectquery
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public Guid SiteId { get; set; }
|
||||||
|
|
||||||
|
public Guid TrialSiteSurveyId { get;set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
///<summary>TrialSiteSurveyQuery 列表查询参数模型</summary>
|
///<summary>TrialSiteSurveyQuery 列表查询参数模型</summary>
|
||||||
|
|
|
@ -16,6 +16,7 @@ using MimeKit;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
|
using Microsoft.VisualBasic;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Contracts
|
namespace IRaCIS.Core.Application.Contracts
|
||||||
{
|
{
|
||||||
|
@ -293,6 +294,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
copy.State = TrialSiteSurveyEnum.ToSubmit;
|
copy.State = TrialSiteSurveyEnum.ToSubmit;
|
||||||
|
|
||||||
copy.Email = userInfo.EmailOrPhone;
|
copy.Email = userInfo.EmailOrPhone;
|
||||||
|
copy.Id = Guid.Empty;
|
||||||
|
copy.CreateTime = DateAndTime.Now;
|
||||||
|
|
||||||
if (userInfo.ReplaceUserEmailOrPhone != userInfo.EmailOrPhone)
|
if (userInfo.ReplaceUserEmailOrPhone != userInfo.EmailOrPhone)
|
||||||
{
|
{
|
||||||
|
@ -301,19 +304,24 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
copy.Id = Guid.Empty;
|
|
||||||
copy.TrialSiteEquipmentSurveyList.ForEach(t => t.Id = Guid.Empty);
|
copy.TrialSiteEquipmentSurveyList = currentLatest.TrialSiteEquipmentSurveyList.Clone();
|
||||||
copy.TrialSiteUserSurveyList.ForEach(t => { t.Id = Guid.Empty; t.IsGenerateSuccess = false; });
|
copy.TrialSiteEquipmentSurveyList.ForEach(t => { t.Id = Guid.Empty;t.CreateTime = DateTime.Now; });
|
||||||
|
|
||||||
|
copy.TrialSiteUserSurveyList = currentLatest.TrialSiteUserSurveyList.Clone();
|
||||||
|
copy.TrialSiteUserSurveyList.ForEach(t => { t.Id = Guid.Empty; t.IsGenerateSuccess = false; t.CreateTime = DateTime.Now; });
|
||||||
|
|
||||||
currentEntity = await _trialSiteSurveyRepository.AddAsync(copy);
|
currentEntity = await _trialSiteSurveyRepository.AddAsync(copy);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//删除验证码历史记录
|
//删除验证码历史记录
|
||||||
await _repository.BatchDeleteAsync<VerificationCode>(t => t.EmailOrPhone == userInfo.EmailOrPhone && t.Code == userInfo.verificationCode && t.CodeType == userInfo.verificationType);
|
await _repository.BatchDeleteAsync<VerificationCode>(t => t.EmailOrPhone == userInfo.EmailOrPhone && t.Code == userInfo.verificationCode && t.CodeType == userInfo.verificationType);
|
||||||
|
|
||||||
await _repository.SaveChangesAsync();
|
await _trialSiteSurveyRepository.SaveChangesAsync();
|
||||||
|
|
||||||
return ResponseOutput.Ok(new
|
return ResponseOutput.Ok(new
|
||||||
{
|
{
|
||||||
|
@ -428,6 +436,16 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
return await trialSiteSurveyQueryable.ToPagedListAsync(surveyQueryDTO.PageIndex, surveyQueryDTO.PageSize, surveyQueryDTO.SortField, surveyQueryDTO.Asc);
|
return await trialSiteSurveyQueryable.ToPagedListAsync(surveyQueryDTO.PageIndex, surveyQueryDTO.PageSize, surveyQueryDTO.SortField, surveyQueryDTO.Asc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<TrialSiteSurveySelectView>> GetTrialSiteSurveySelectList(TrialSiteSurveySelectquery inQuery)
|
||||||
|
{
|
||||||
|
var trialSiteSurveyQueryable = _trialSiteSurveyRepository
|
||||||
|
.Where(t=>t.Id!=inQuery.TrialSiteSurveyId)
|
||||||
|
.Where(t => t.TrialId == inQuery.TrialId && t.SiteId == inQuery.SiteId).IgnoreQueryFilters()
|
||||||
|
.ProjectTo<TrialSiteSurveySelectView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
|
return await trialSiteSurveyQueryable.ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 项目Site调研用户列表 所有site的调研用户 最新的调研表的记录的用户 new
|
/// 项目Site调研用户列表 所有site的调研用户 最新的调研表的记录的用户 new
|
||||||
|
|
|
@ -46,24 +46,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
//---已锁定,不允许操作
|
//---已锁定,不允许操作
|
||||||
return ResponseOutput.NotOk(_localizer["TrialSiteUser_Locked"]);
|
return ResponseOutput.NotOk(_localizer["TrialSiteUser_Locked"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addOrEditTrialSiteUserSurvey.UserTypeId != null && ( _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM))
|
|
||||||
{
|
|
||||||
var existSysUser = await _repository.Where<User>(t => t.EMail == addOrEditTrialSiteUserSurvey.Email && t.UserTypeId == addOrEditTrialSiteUserSurvey.UserTypeId).Include(d=>d.UserTypeRole).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
|
|
||||||
if (existSysUser != null)
|
|
||||||
{
|
|
||||||
if (existSysUser.LastName != addOrEditTrialSiteUserSurvey.LastName || existSysUser.FirstName != addOrEditTrialSiteUserSurvey.FirstName)
|
|
||||||
{
|
|
||||||
//$"该用户在系统中账户名为:{existSysUser.LastName + " / " + existSysUser.FirstName} ,与填写信息存在不一致项, 现将界面信息修改为与系统一致,可进行保存"
|
|
||||||
return ResponseOutput.NotOk(_localizer["TrialSiteUser_InconsistentInfo", existSysUser.UserTypeRole.UserTypeShortName, existSysUser.EMail, existSysUser.LastName + " / " + existSysUser.FirstName,existSysUser.Phone],
|
|
||||||
new { existSysUser.LastName, existSysUser.FirstName, existSysUser.Phone,existSysUser.IsTestUser,existSysUser.IsZhiZhun }, ApiResponseCodeEnum.NeedTips);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (addOrEditTrialSiteUserSurvey.IsGenerateAccount )
|
if (addOrEditTrialSiteUserSurvey.IsGenerateAccount )
|
||||||
{
|
{
|
||||||
|
@ -107,14 +90,39 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
var verifyExp1 = new EntityVerifyExp<TrialSiteUserSurvey>()
|
var verifyExp1 = new EntityVerifyExp<TrialSiteUserSurvey>()
|
||||||
{
|
{
|
||||||
VerifyExp = u => u.UserTypeId == addOrEditTrialSiteUserSurvey.UserTypeId && u.Email == addOrEditTrialSiteUserSurvey.Email,
|
VerifyExp = u => u.UserTypeId == addOrEditTrialSiteUserSurvey.UserTypeId && u.Email == addOrEditTrialSiteUserSurvey.Email && u.TrialSiteSurveyId==addOrEditTrialSiteUserSurvey.TrialSiteSurveyId,
|
||||||
VerifyMsg = "同一邮箱同一用户类型,生成账号的数据只允许存在一条!",
|
VerifyMsg = "同一邮箱同一用户类型,生成账号的数据只允许存在一条!",
|
||||||
IsVerify=addOrEditTrialSiteUserSurvey.IsGenerateAccount
|
IsVerify=addOrEditTrialSiteUserSurvey.IsGenerateAccount
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (addOrEditTrialSiteUserSurvey.UserTypeId != null)
|
||||||
|
{
|
||||||
|
var existSysUser = await _repository.Where<User>(t => t.EMail == addOrEditTrialSiteUserSurvey.Email && t.UserTypeId == addOrEditTrialSiteUserSurvey.UserTypeId).Include(d => d.UserTypeRole).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
||||||
|
if (existSysUser != null)
|
||||||
|
{
|
||||||
|
if (existSysUser.LastName != addOrEditTrialSiteUserSurvey.LastName || existSysUser.FirstName != addOrEditTrialSiteUserSurvey.FirstName)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
var optEntity = await _trialSiteUserSurveyRepository.InsertOrUpdateAsync(addOrEditTrialSiteUserSurvey, true, verifyExp1);
|
||||||
|
|
||||||
|
//$"该用户在系统中账户名为:{existSysUser.LastName + " / " + existSysUser.FirstName} ,与填写信息存在不一致项, 现将界面信息修改为与系统一致,可进行保存"
|
||||||
|
return ResponseOutput.NotOk(_localizer["TrialSiteUser_InconsistentInfo", existSysUser.UserTypeRole.UserTypeShortName, existSysUser.EMail, existSysUser.LastName + " / " + existSysUser.FirstName, existSysUser.Phone],
|
||||||
|
new { Id= optEntity.Id, existSysUser.LastName, existSysUser.FirstName, existSysUser.Phone, existSysUser.IsTestUser, existSysUser.IsZhiZhun }, ApiResponseCodeEnum.NeedTips);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var entity = await _trialSiteUserSurveyRepository.InsertOrUpdateAsync(addOrEditTrialSiteUserSurvey, true, verifyExp1);
|
var entity = await _trialSiteUserSurveyRepository.InsertOrUpdateAsync(addOrEditTrialSiteUserSurvey, true, verifyExp1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,8 @@ namespace IRaCIS.Core.Application.AutoMapper
|
||||||
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.Site.SiteName))
|
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.Site.SiteName))
|
||||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode));
|
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode));
|
||||||
|
|
||||||
|
CreateMap<TrialSiteSurvey, TrialSiteSurveySelectView>();
|
||||||
|
|
||||||
var isEn_Us = false;
|
var isEn_Us = false;
|
||||||
CreateMap<TrialSiteUserSurvey, TrialSiteUserSurveyView>()
|
CreateMap<TrialSiteUserSurvey, TrialSiteUserSurveyView>()
|
||||||
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName))
|
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName))
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: dotnet-core-app-test-study
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: docker-build
|
||||||
|
image: docker
|
||||||
|
pull: if-not-exists
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
- name: cached_nuget_packages
|
||||||
|
path: /drone/nuget_packages
|
||||||
|
commands:
|
||||||
|
- date +%H:%M:%S
|
||||||
|
- pwd
|
||||||
|
- docker build -t Test.Study .
|
||||||
|
- date +%H:%M:%S
|
||||||
|
|
||||||
|
- name: docker-deploy
|
||||||
|
image: docker
|
||||||
|
pull: if-not-exists
|
||||||
|
depends_on:
|
||||||
|
- docker-build
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
commands:
|
||||||
|
- date +%H:%M:%S
|
||||||
|
- docker rm -f test-study-container
|
||||||
|
- docker run -itd -e TZ=Asia/Shanghai -e ASPNETCORE_ENVIRONMENT=Test_Study --restart=always --name test-study-container -p 8030:80 Test.Study
|
||||||
|
- date +%H:%M:%S
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: cached_nuget_packages
|
||||||
|
host:
|
||||||
|
path: /mnt/f/docker_publish/nuget_packages
|
||||||
|
- name: dockersock
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- Test.Study
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
type: ssh
|
||||||
|
name: default
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: windows
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
clone:
|
||||||
|
disable: true #禁用默认克隆
|
||||||
|
|
||||||
|
server:
|
||||||
|
host: 123.56.94.154
|
||||||
|
user: Administrator
|
||||||
|
password: WHxckj2019
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: test
|
||||||
|
commands:
|
||||||
|
- Start-Process -FilePath "C:\Users\Administrator\Desktop\win.bat"
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
Loading…
Reference in New Issue