Commit 12093ef8 authored by HP's avatar HP

Merge branch 'dev_oracle' of

http://code.tech.tax.asia.pwcinternal.com/root/atms.git into dev_oracle

Conflicts:
	atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/OrganizationExtendsMapper.xml
parents e4684c1c f0ad0ce5
......@@ -111,9 +111,9 @@ public interface ProjectMapper extends MyMapper {
int updateByPrimaryKey(Project record);
@Select("<script>" +
"SELECT distinct " +
"SELECT DISTINCT " +
" p.CREATE_TIME AS CreateTime, " +
" p.IS_ACTIVE AS IsActive, " +
" p.IS_ACTIVE AS IsActive, " +
" p.ORGANIZATION_ID AS OrganizationID, " +
" p.Name AS Name, " +
" p.Code AS Code, " +
......@@ -123,41 +123,41 @@ public interface ProjectMapper extends MyMapper {
" p.REGION_ID AS RegionID, " +
" region.SHORT_NAME AS RegionName, " +
" p.RULE_TYPE AS RuleType, " +
" PROJECT_SERVICE_TYPE.SERVICE_TYPE_ID AS ServiceTypeID, " +
" projectServiceType.SERVICE_TYPE_ID AS ServiceTypeID, " +
" p.UPDATE_TIME AS UpdateTime, " +
" SERVICE_TYPE.Name AS ServiceTypeName, " +
" serviceType.Name AS ServiceTypeName, " +
" organization.Name AS OrganizationName, " +
" industry.Name AS IndustryName, " +
" PROJECT_SERVICE_TYPE.TemplateGroupID AS TemplateGroupID, " +
" TEMPLATE_GROUP.Name AS TemplateGroupName, " +
" projectServiceType.Template_Group_ID AS TemplateGroupID, " +
" templateGroup.Name AS TemplateGroupName, " +
" p.CLIENT_CODE AS ClientCode, " +
" p.DB_NAME AS DbName, " +
" TRUE AS HaveCreateProject, " +
" 1 AS HaveCreateProject, " +
" p.ENTERPRISE_ACCOUNT_SET_ID AS EnterpriseAccountSetID, " +
" p.START_PERIOD AS StartPeriod, " +
" p.END_PERIOD AS EndPeriod " +
"FROM " +
" Project p " +
" JOIN " +
" Organization org ON p.OrganizationID = org.id " +
" Organization org ON p.ORGANIZATION_ID = org.id " +
" JOIN " +
" PROJECT_SERVICE_TYPE projectServiceType ON p.id = projectServiceType.ProjectID " +
" PROJECT_SERVICE_TYPE projectServiceType ON p.id = projectServiceType.PROJECT_ID " +
" JOIN " +
" Organization organization ON p.OrganizationID = organization.id " +
" Organization organization ON p.ORGANIZATION_ID = organization.id " +
" JOIN " +
" ServiceType serviceType ON projectServiceType.ServiceTypeID = serviceType.id " +
" SERVICE_TYPE serviceType ON projectServiceType.SERVICE_TYPE_ID = serviceType.id " +
" JOIN " +
" Industry industry ON p.IndustryID = industry.id " +
" Industry industry ON p.INDUSTRY_ID = industry.id " +
" JOIN " +
" TEMPLATE_GROUP templateGroup ON projectServiceType.TemplateGroupID = templateGroup.id " +
" TEMPLATE_GROUP templateGroup ON projectServiceType.TEMPLATE_GROUP_ID = templateGroup.id " +
" JOIN " +
" Region region ON p.RegionID = region.id " +
" Region region ON p.REGION_ID = region.id " +
" JOIN " +
" ENTERPRISE_ACCOUNT_SET_ORG enterOrg ON p.EnterpriseAccountSetID = enterOrg.EnterpriseAccountSetID " +
" ENTERPRISE_ACCOUNT_SET_ORG enterOrg ON p.ENTERPRISE_ACCOUNT_SET_ID = enterOrg.ENTERPRISE_ACCOUNT_SET_ID" +
" <where>" +
" p.IS_ACTIVE=1 and serviceType.IS_ACTIVE=1 and p.ORGANIZATION_ID = enterOrg.ORGANIZATION_ID" +
" <if test=\"orgID != null and orgID !='' \">AND org.id=#{orgId}</if>" +
" <if test=\"serverID != null and serverID !='' \">AND p.serviceType=#{serverId}</if>" +
" <if test=\"orgId != null and orgId !='' \">AND org.id=#{orgId}</if>" +
" <if test=\"serverId != null and serverId !='' \">AND p.serviceType=#{serverId}</if>" +
" <if test=\"projectYear != null\">AND p.Year=#{projectYear}</if>" +
" </where>" +
"</script>")
......@@ -174,51 +174,51 @@ public interface ProjectMapper extends MyMapper {
List<ProjectStatusManage> getProjectSatusListByDbName(String dbName);
@Select("<script>" +
"SELECT " +
" now() AS CreateTime, " +
" TRUE AS IsActive, " +
" org.id AS OrganizationID, " +
" org.Name AS Name, " +
" org.Code AS Code, " +
" UUID() AS id, " +
" org.IndustryID AS IndustryID, " +
" 0 AS Year, " +
" org.REGION_ID AS RegionID, " +
" 0 AS RuleType, " +
" st.id AS ServiceTypeID, " +
" reg.ShortName AS RegionName, " +
" now() AS UpdateTime, " +
" st.Name AS ServiceTypeName, " +
" org.Name AS OrganizationName, " +
" ind.Name AS IndustryName, " +
" ostg.TEMPLATE_GROUP_ID AS TemplateGroupID, " +
" '' AS TemplateGroupName, " +
" org.ClientCode AS ClientCode, " +
" '' AS DbName, " +
" FALSE AS HaveCreateProject, " +
" ea.EnterpriseAccountSetID AS EnterpriseAccountSetID, " +
" 1 AS StartPeriod, " +
" 12 AS EndPeriod, " +
" ea.EFFECTIVE_DATE AS EffectiveDate, " +
" ea.EXPIRED_DATE AS ExpiredDate " +
"FROM " +
" ORGANIZATION org " +
" JOIN " +
" ENTERPRISE_ACCOUNT_SET_ORG ea ON org.id = ea.OrganizationID " +
" JOIN " +
" ORGANIZATION_SERVICE_TEMPLATE_GROUP ostg ON org.id = ostg.ORGANIZATION_ID " +
" JOIN " +
" SERVICE_TYPE st ON ostg.SERVICE_TYPE_ID = st.id " +
" JOIN " +
" INDUSTRY ind ON org.IndustryID = ind.id " +
" JOIN " +
" REGION reg ON org.RegionID = reg.id " +
"SELECT " +
" SYSDATE AS CreateTime, " +
" 1 AS IsActive, " +
" org.id AS OrganizationID, " +
" org.Name AS Name, " +
" org.Code AS Code, " +
" SYS_GUID() AS id, " +
" org.Industry_ID AS IndustryID, " +
" 0 AS Year, " +
" org.REGION_ID AS RegionID, " +
" 0 AS RuleType, " +
" st.id AS ServiceTypeID, " +
" reg.Short_Name AS RegionName, " +
" SYSDATE AS UpdateTime, " +
" st.Name AS ServiceTypeName, " +
" org.Name AS OrganizationName, " +
" ind.Name AS IndustryName, " +
" ostg.TEMPLATE_GROUP_ID AS TemplateGroupID, " +
" '' AS TemplateGroupName, " +
" org.Client_Code AS ClientCode, " +
" '' AS DbName, " +
" 0 AS HaveCreateProject, " +
" ea.Enterprise_Account_Set_ID AS EnterpriseAccountSetID, " +
" 1 AS StartPeriod, " +
" 12 AS EndPeriod, " +
" ea.EFFECTIVE_DATE AS EffectiveDate, " +
" ea.EXPIRED_DATE AS ExpiredDate " +
"FROM " +
" ORGANIZATION org " +
" JOIN " +
" ENTERPRISE_ACCOUNT_SET_ORG ea ON org.id = ea.Organization_ID " +
" JOIN " +
" ORG_SERVICE_TEMPLATE_GROUP ostg ON org.id = ostg.ORGANIZATION_ID " +
" JOIN " +
" SERVICE_TYPE st ON ostg.SERVICE_TYPE_ID = st.id " +
" JOIN " +
" INDUSTRY ind ON org.Industry_ID = ind.id " +
" JOIN " +
" REGION reg ON org.Region_ID = reg.id " +
"WHERE " +
" 1=1" +
" <if test=\"orgID != null and orgID !='' \">AND org.id=#{orgId}</if>" +
" AND org.IsActive = 1 " +
" AND st.IsActive = 1 " +
" <if test=\"serviceID != null and serviceID !='' \">AND ostg.ServiceTypeID=#{serviceId}</if>" +
" <if test=\"orgId != null and orgId !='' \">AND org.id=#{orgId}</if>" +
" AND org.Is_Active = 1 " +
" AND st.Is_Active = 1 " +
" <if test=\"serviceId != null and serviceId !='' \">AND ostg.Service_Type_ID=#{serviceId}</if>" +
"ORDER BY ea.EFFECTIVE_DATE,org.Code" +
"</script>")
List<ProjectDisplayDto> getProjectFromEnterpriseAccountSetOrg(@Param("orgId") String orgId, @Param("serviceId") String serviceId);
......
......@@ -42,7 +42,7 @@
<select id="selectIndBusiunitAreaOrgstrctReg" parameterType="map" resultMap="OrgBasicDto">
SELECT
org.ID AS ID,
ORG.ID AS ID,
org.PARENT_ID AS PARENT_ID,
org.CODE AS CODE,
org.NAME AS NAME,
......@@ -59,25 +59,25 @@
reg.MERGER_NAME AS REGION_NAME,
org.IS_ACTIVE AS IS_ACTIVE
FROM
ORGANIZATION org
ORGANIZATION AS ORG
LEFT JOIN
INDUSTRY ind
INDUSTRY AS IND
on
org.INDUSTRY_ID = ind.ID
LEFT JOIN
BUSINESS_UNIT bu
BUSINESS_UNIT AS BU
on
org.BUSINESS_UNIT_ID = bu.ID
LEFT JOIN
AREA area
AREA AS AREA
on
org.AREA_ID = area.ID
left JOIN
ORGANIZATION_STRUCTURE os
ORGANIZATION_STRUCTURE AS OS
on
org.STRUCTURE_ID = os.ID
left JOIN
REGION reg
REGION AS REG
on
org.REGION_ID = reg.ID
<if test="orgIsActive != null and orgIsActive == true">
......
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