Commit a0e7c4b0 authored by neo's avatar neo

[dev] fixed column name in mapper annotaiton

parent d6207295
......@@ -107,5 +107,5 @@ public interface DimensionMapper extends MyMapper {
*/
int updateByPrimaryKey(Dimension record);
List<OrganizationDto> getBusinessUnitListJoinDimensionResult(@Param("dimensionId")String dimensionId, @Param("orgI Active") Boolean orgIsActive);
List<OrganizationDto> getBusinessUnitListJoinDimensionResult(@Param("dimensionId")String dimensionId, @Param("orgIsActive") Boolean orgIsActive);
}
\ No newline at end of file
......@@ -112,36 +112,36 @@ public interface ProjectMapper extends MyMapper {
@Select("<script>" +
"SELECT distinct " +
" p.CreateTime AS CreateTime, " +
" p.IsActive AS IsActive, " +
" p.OrganizationID AS OrganizationID, " +
" p.CREATE_TIME AS CreateTime, " +
" p.IS_ACTIVE AS IsActive, " +
" p.ORGANIZATION_ID AS OrganizationID, " +
" p.Name AS Name, " +
" p.Code AS Code, " +
" p.id AS id, " +
" p.IndustryID AS IndustryID, " +
" p.INDUSTRY_ID AS IndustryID, " +
" p.Year AS Year, " +
" p.RegionID AS RegionID, " +
" region.ShortName AS RegionName, " +
" p.RuleType AS RuleType, " +
" projectServiceType.ServiceTypeID AS ServiceTypeID, " +
" p.UpdateTime AS UpdateTime, " +
" serviceType.Name AS ServiceTypeName, " +
" p.REGION_ID AS RegionID, " +
" region.SHORT_NAME AS RegionName, " +
" p.RULE_TYPE AS RuleType, " +
" PROJECT_SERVICE_TYPE.SERVICE_TYPE_ID AS ServiceTypeID, " +
" p.UPDATE_TIME AS UpdateTime, " +
" SERVICE_TYPE.Name AS ServiceTypeName, " +
" organization.Name AS OrganizationName, " +
" industry.Name AS IndustryName, " +
" projectServiceType.TemplateGroupID AS TemplateGroupID, " +
" templateGroup.Name AS TemplateGroupName, " +
" p.ClientCode AS ClientCode, " +
" p.DbName AS DbName, " +
" PROJECT_SERVICE_TYPE.TemplateGroupID AS TemplateGroupID, " +
" TEMPLATE_GROUP.Name AS TemplateGroupName, " +
" p.CLIENT_CODE AS ClientCode, " +
" p.DB_NAME AS DbName, " +
" TRUE AS HaveCreateProject, " +
" p.EnterpriseAccountSetID AS EnterpriseAccountSetID, " +
" p.StartPeriod AS StartPeriod, " +
" p.EndPeriod AS EndPeriod " +
" 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 " +
" JOIN " +
" ProjectServiceType projectServiceType ON p.id = projectServiceType.ProjectID " +
" PROJECT_SERVICE_TYPE projectServiceType ON p.id = projectServiceType.ProjectID " +
" JOIN " +
" Organization organization ON p.OrganizationID = organization.id " +
" JOIN " +
......@@ -149,13 +149,13 @@ public interface ProjectMapper extends MyMapper {
" JOIN " +
" Industry industry ON p.IndustryID = industry.id " +
" JOIN " +
" template_group templateGroup ON projectServiceType.TemplateGroupID = templateGroup.id " +
" TEMPLATE_GROUP templateGroup ON projectServiceType.TemplateGroupID = templateGroup.id " +
" JOIN " +
" Region region ON p.RegionID = region.id " +
" JOIN " +
" EnterpriseAccountSetOrg enterOrg ON p.EnterpriseAccountSetID = enterOrg.EnterpriseAccountSetID " +
" ENTERPRISE_ACCOUNT_SET_ORG enterOrg ON p.EnterpriseAccountSetID = enterOrg.EnterpriseAccountSetID " +
" <where>" +
" p.IsActive=1 and serviceType.isActive=1 and p.OrganizationID = enterOrg.OrganizationID" +
" 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=\"projectYear != null\">AND p.Year=#{projectYear}</if>" +
......@@ -165,12 +165,12 @@ public interface ProjectMapper extends MyMapper {
@Param("projectYear") Integer projectYear);
@Select("SELECT " +
" p.PeriodId, p.Status " +
" p.PERIOD_ID, p.Status " +
"FROM " +
" ProjectStatusManage p " +
" PROJECT_STATUS_MANAGE p " +
"WHERE " +
" p.DbName = #{dbName} " +
"ORDER BY PeriodId , Status")
" p.DB_NAME = #{dbName} " +
"ORDER BY PERIOD_ID , Status")
List<ProjectStatusManage> getProjectSatusListByDbName(String dbName);
@Select("<script>" +
......@@ -183,7 +183,7 @@ public interface ProjectMapper extends MyMapper {
" UUID() AS id, " +
" org.IndustryID AS IndustryID, " +
" 0 AS Year, " +
" org.RegionID AS RegionID, " +
" org.REGION_ID AS RegionID, " +
" 0 AS RuleType, " +
" st.id AS ServiceTypeID, " +
" reg.ShortName AS RegionName, " +
......@@ -191,7 +191,7 @@ public interface ProjectMapper extends MyMapper {
" st.Name AS ServiceTypeName, " +
" org.Name AS OrganizationName, " +
" ind.Name AS IndustryName, " +
" ostg.template_group_id AS TemplateGroupID, " +
" ostg.TEMPLATE_GROUP_ID AS TemplateGroupID, " +
" '' AS TemplateGroupName, " +
" org.ClientCode AS ClientCode, " +
" '' AS DbName, " +
......@@ -199,48 +199,48 @@ public interface ProjectMapper extends MyMapper {
" ea.EnterpriseAccountSetID AS EnterpriseAccountSetID, " +
" 1 AS StartPeriod, " +
" 12 AS EndPeriod, " +
" ea.EffectiveDate AS EffectiveDate, " +
" ea.ExpiredDate AS ExpiredDate " +
" ea.EFFECTIVE_DATE AS EffectiveDate, " +
" ea.EXPIRED_DATE AS ExpiredDate " +
"FROM " +
" Organization org " +
" ORGANIZATION org " +
" JOIN " +
" EnterpriseAccountSetOrg ea ON org.id = ea.OrganizationID " +
" ENTERPRISE_ACCOUNT_SET_ORG ea ON org.id = ea.OrganizationID " +
" JOIN " +
" organization_service_template_group ostg ON org.id = ostg.organization_id " +
" ORGANIZATION_SERVICE_TEMPLATE_GROUP ostg ON org.id = ostg.ORGANIZATION_ID " +
" JOIN " +
" ServiceType st ON ostg.service_type_id = st.id " +
" SERVICE_TYPE st ON ostg.SERVICE_TYPE_ID = st.id " +
" JOIN " +
" Industry ind ON org.IndustryID = ind.id " +
" INDUSTRY ind ON org.IndustryID = ind.id " +
" JOIN " +
" Region reg ON org.RegionID = reg.id " +
" REGION reg ON org.RegionID = 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>" +
"ORDER BY ea.EffectiveDate,org.Code" +
"ORDER BY ea.EFFECTIVE_DATE,org.Code" +
"</script>")
List<ProjectDisplayDto> getProjectFromEnterpriseAccountSetOrg(@Param("orgId") String orgId, @Param("serviceId") String serviceId);
@Select("SELECT " +
" PeriodId,Status " +
" PERIOD_ID,Status " +
"FROM " +
" ProjectStatusManage p " +
" PROJECT_STATUS_MANAGE p " +
"WHERE " +
" p.DbName = #{dbName} " +
"ORDER BY PeriodId , Status")
" p.DB_NAME = #{dbName} " +
"ORDER BY PERIOD_ID , STATUS")
List<ProjectStatusManage> selectProjectAllStatus(String dbName);
@Select("SELECT max(DbName) as DbName FROM Project WHERE Year=#{year}")
@Select("SELECT max(DB_NAME) as DbName FROM Project WHERE Year=#{year}")
String maxDbName(Integer year);
@Select("SELECT " +
" template_group_id " +
"FROM Project a " +
" JOIN organization_service_template_group b " +
" ON a.organizationid = b.organization_id " +
"WHERE a.id = #{projectId} " +
" AND b.service_type_id = #{serviceType}")
" TEMPLATE_GROUP_ID " +
"FROM PROJECT a " +
" JOIN ORGANIZATION_SERVICE_TEMPLATE_GROUP b " +
" ON a.ORGANIZATION_ID = b.ORGANIZATION_ID " +
"WHERE a.ID = #{projectId} " +
" AND b.SERVICE_TYPE_ID = #{serviceType}")
Long getTemplateGroupIdByProject(@Param("projectId") String projectId, @Param("serviceType") Integer serviceType);
}
\ No newline at end of file
......@@ -111,17 +111,8 @@ public interface TaxRuleSettingMapper extends MyMapper {
*/
int updateByPrimaryKey(TaxRuleSetting record);
@Select("select trs.group_name,trs.id,trs.is_default,trs.name,trs.tax_base,trs.tax_rate*100 as tax_rate,trso.organzation_id"
+ " from tax_rule_setting trs "
+ "left join tax_rule_setting_organization trso on trs.id=trso.tax_setting_id")
@Results({
@Result(id = true, column = "id", property = "id"),
@Result(column = "group_name", property = "GroupName"),
@Result(column = "is_default", property = "IsDefault"),
@Result(column = "name", property = "Name"),
@Result(column = "tax_base", property = "TaxBase"),
@Result(column = "tax_rate", property = "TaxRate"),
@Result(column = "organization_id", property = "OrganizationID"),
})
@Select("SELECT TRS.GROUP_NAME,TRS.ID,TRS.IS_DEFAULT,TRS.NAME,TRS.TAX_BASE,TRS.TAX_RATE*100 AS TAX_RATE,TRSO.ORGANZATION_ID"
+ " FROM TAX_RULE_SETTING TRS "
+ "LEFT JOIN TAX_RULE_SETTING_ORGANIZATION TRSO ON TRS.ID=TRSO.TAX_SETTING_ID")
List<TaxRuleSettingDto> GetTaxRuleSetting();
}
\ No newline at end of file
......@@ -111,8 +111,8 @@ public interface UserDimensionValueRoleMapper extends MyMapper {
List<UserOrgRoleDto> getUserDimensionValueRoleList();
@Select("SELECT UserDimensionValue.UserID from UserDimensionValueRole "
+ "JOIN UserDimensionValue ON UserDimensionValueRole.UserDimensionValueID = UserDimensionValue.id "
+ "WHERE UserDimensionValueRole.RoleID=#{roleId}")
@Select("SELECT USER_DIMENSION_VALUE_ROLE.USERID FROM USER_DIMENSION_VALUE_ROLE "
+ "JOIN USER_DIMENSION_VALUE ON USER_DIMENSION_VALUE_ROLE.USER_DIMENSION_VALUE_ID = USER_DIMENSION_VALUE.ID "
+ "WHERE USER_DIMENSION_VALUE_ROLE.ROLE_ID=#{ROLEID}")
List<String> getUserIdByUserDimensionValueRole(@Param("roleId") String roleId);
}
\ No newline at end of file
......@@ -141,57 +141,26 @@ public interface UserMapper extends MyMapper {
/**
* select one user record with its related organization information by user id
*/
@Select("select u.UserName as UserName, o.id as OrganizationID, o.Name as OrganizationName, "
+ "u.Email as Email, u.Status as Status, u.AttemptTimes as AttemptTimes, u.CreateTime as CreateTime, "
+ "u.ExpirationDate as ExpirationDate, u.IsAdmin as IsAdmin, u.id as id, u.LockedTime as LockedTime, "
+ "u.LoginType as LoginType, u.Password as Password, u.PasswordUpdateTime as PasswordUpdateTime, u.UpdateT me as UpdateTime from User as u "
+ "left join Organization as o on u.OrganizationID = o.id "
+ "where u.id = #{userId}")
@Results({
@Result(id = true, column = "id", property = "id"),
@Result(column = "UserName", property = "userName"),
@Result(column = "OrganizationID", property = "organizationID"),
@Result(column = "OrganizationName", property = "organizationName"),
@Result(column = "Email", property = "email"),
@Result(column = "Status", property = "status"),
@Result(column = "AttemptTimes", property = "attemptTimes"),
@Result(column = "CreateTime", property = "createTime"),
@Result(column = "ExpirationDate", property = "expirationDate"),
@Result(column = "IsAdmin", property = "isAdmin"),
@Result(column = "LockedTime", property = "lockedTime"),
@Result(column = "LoginType", property = "loginType"),
@Result(column = "Password", property = "password"),
@Result(column = "PasswordUpdateTime", property = "passwordUpdateTime"),
@Result(column = "UpdateTime", property = "updateTime")
})
@Select("select u.USER_NAME as UserName, o.id as Organization_ID, o.Name as OrganizationName, "
+ "u.EMAIL as Email, u.STATUS as Status, u.ATTEMPT_TIMES as AttemptTimes, u.CREATE_TIME as CreateTime, "
+ "u.EXPIRATION_DATE as ExpirationDate, u.IS_ADMIN as IsAdmin, u.ID as id, u.LOCKED_TIME as LockedTime, "
+ "u.LOGIN_TYPE as LoginType, u.PASSWORD as Password, u.PASSWORD_UPDATETIME as Password_UpdateTime, u.UPDATE_TIME as UpdateTime from USER as u "
+ "left join ORGANIZATION as o on u.ORGANIZATIONID = o.id "
+ "where u.ID = #{userId}")
List<UserDto> selectUserWithOrgInfoById(@Param(value = "userId") String userId);
@Select("select r.id as id, r.Name as Name from UserRole as u "
+ "join Role as r on u.RoleID = r.id "
+ "where u.UserID = #{userId}")
@Results({
@Result(id = true, column = "id", property = "id"),
@Result(column = "Name", property = "name")
})
@Select("select R.ID AS id, R.NAME AS name FROM USER_ROLE AS U "
+ "JOIN ROLE AS R ON U.ROLE_ID = R.ID "
+ "WHERE U.USER_ID = #{userId}")
List<RoleInfo> selectUserRoleInfoById(@Param(value = "userId") String userId);
@Select("select udv.RoleID as RoleID, r.Name as RoleName, udv.UserDimensionValueID as id "
+ "from UserDimensionValueRole as udv "
+ "join Role as r on udv.RoleID = r.id")
@Results({
@Result(id = true, column = "id", property = "id"),
@Result(column = "RoleID", property = "roleID"),
@Result(column = "RoleName", property = "roleName")
})
@Select("select udv.ROLE_ID as roleID, r.NAME as roleName, udv.USER_DIMENSION_VALUE_ID as id "
+ "FROM USER_DIMENSION_VALUE_ROLE AS UDV "
+ "JOIN ROLE AS R ON UDV.ROLE_ID = R.ID")
List<UserOrgRoleDto> selectUserDimensionValueRole();
@Select("select q.RoleID as RoleID, r.Name as RoleName, q.UserOrganizationID as id "
+ "from UserOrganizationRole as q "
+ "join Role as r on q.RoleID = r.id")
@Results({
@Result(id = true, column = "id", property = "id"),
@Result(column = "RoleID", property = "roleID"),
@Result(column = "RoleName", property = "roleName")
})
@Select("select q.ROLE_ID as roleID, r.NAME as roleName, q.USER_ORGANIZATION_ID as id "
+ "from USER_ORGANIZATION_ROLE as q "
+ "join ROLE as r on q.ROLEID = r.id")
List<UserOrgRoleDto> selectUserOrganizationRole();
}
\ No newline at end of file
......@@ -111,8 +111,8 @@ public interface UserOrganizationRoleMapper extends MyMapper {
List<UserOrgRoleDto> getUserOrganizationRoleList();
@Select("SELECT UserOrganization.UserID from UserOrganizationRole "
+ "JOIN UserOrganization ON UserOrganizationRole.UserOrganizationID = UserOrganization.id "
+ "WHERE UserOrganizationRole.RoleID=#{roleId}")
@Select("SELECT USER_ORGANIZATION.USERID FROM USER_ORGANIZATION_ROLE "
+ "JOIN USER_ORGANIZATION ON USER_ORGANIZATION_ROLE.USER_ORGANIZATION_ID = USER_ORGANIZATION.ID "
+ "WHERE USER_ORGANIZATION_ROLE.ROLEID=#{ROLEID}")
List<String> getUserIdByUserOrganizationRole(@Param("roleId") String roleId);
}
\ No newline at end of file
......@@ -108,14 +108,6 @@ public interface AssetsListMapper extends MyVatMapper {
*/
int updateByPrimaryKey(AssetsList record);
List<AssetsList> selectByExampleWithBLOBsWithRowbounds(AssetsListExample example, RowBounds rowBounds);
List<AssetsList> selectByExampleWithBLOBs(AssetsListExample example);
int updateByExampleWithBLOBs(@Param("record") AssetsList record, @Param("example") AssetsListExample example);
int updateByPrimaryKeyWithBLOBs(AssetsList record);
List<AssetDetailResultDto> getAssetDetialResult(@Param("dbName") String dbName, @Param("assetType") Integer assetType,
@Param("assetDetailType") Integer assetDetailType);
}
\ No newline at end of file
......@@ -112,16 +112,16 @@ public interface CellDataMapper extends MyVatMapper {
@Select("<script>" +
"SELECT " +
" r.period, c.cell_template_id as cellTemplateId, data " +
" R.PERIOD, C.CELL_TEMPLATE_ID AS CELLTEMPLATEID, DATA " +
"FROM " +
" cell_data c, " +
" report r " +
" CELL_DATA C, " +
" REPORT R " +
"WHERE " +
" c.report_id = r.id AND " +
" C.REPORT_ID = R.ID AND " +
" " +
" <foreach item=\"item\" index=\"index\" collection=\"list\"" +
" open=\"(\" separator=\"OR\" close=\")\">" +
" ( r.period=#{item.period} and c.cell_template_id=#{item.cellTemplateId} )" +
" ( R.PERIOD=#{item.period} AND C.CELL_TEMPLATE_ID=#{item.cellTemplateId} )" +
" </foreach>" +
"</script>")
List<PCTEntity> queryByPCTs(@Param("list") Set<PCTEntity> parameter);
......
......@@ -115,73 +115,73 @@ public interface OutputVatInvoiceMapper extends MyVatMapper {
List<OutputVATInvoiceInfoDto> selectOutputVATInvoiceInfoLeftJoinItem(@Param("queryDto") QueryOutputDto queryDto);
@Select("SELECT " +
" o.PeriodID, " +
" o.InvoiceType, " +
" o.ClassCode, " +
" o.InvoiceNumber, " +
" o.BuyerName, " +
" o.BuyerTaxNumber, " +
" o.BankAccount, " +
" o.PhoneNum, " +
" o.InvoiceDate, " +
" oi.CodeVersion, " +
" oi.ProductName, " +
" oi.DocumentNum, " +
" oi.ProductStandard, " +
" oi.Unit, " +
" oi.Quantity, " +
" oi.UnitPrice, " +
" oi.Amount, " +
" oi.TaxRate, " +
" oi.TaxAmount, " +
" oi.TaxClassCode " +
" o.PERIOD_ID as periodId, " +
" o.INVOICE_TYPE as invoiceType, " +
" o.CLASS_CODE as classCode, " +
" o.INVOICE_NUMBER as invoiceNumber, " +
" o.BUYER_NAME as buyerName, " +
" o.BUYER_TAX_NUMBER as buyerTaxNumber, " +
" o.BANK_ACCOUNT as bankAccount, " +
" o.PHONE_NUM as phoneNum, " +
" o.INVOICE_DATE as invoiceDate, " +
" oi.CODE_VERSION as codeVersion, " +
" oi.PRODUCT_NAME as productName, " +
" oi.DOCUMENT_NUM as documentNum, " +
" oi.PRODUCT_STANDARD as productStandard, " +
" oi.UNIT as unit, " +
" oi.QUANTITY as quantity, " +
" oi.UNIT_PRICE as unitPrice, " +
" oi.AMOUNT as amount, " +
" oi.TAX_RATE as taxRate, " +
" oi.TAX_AMOUNT as taxAmount, " +
" oi.TAX_CLASS_CODE as taxClassCode " +
"FROM " +
" OutputVATInvoice o, " +
" OutputVATInvoiceItem oi, " +
" OUTPUT_VAT_INVOICE o, " +
" OUTPUT_VAT_INVOICE_ITEM oi, " +
" (SELECT " +
" InvoiceID, MIN(SeqNo) minSeqNo " +
" INVOICE_ID, MIN(SeqNo) MIN_SEQ_NO " +
" FROM " +
" OutputVATInvoiceItem " +
" OUTPUT_VAT_INVOICE_ITEM " +
" GROUP BY InvoiceID) m " +
"WHERE " +
" o.InvoiceID = oi.InvoiceID " +
" AND o.InvoiceID = m.InvoiceID " +
" AND oi.SeqNo = m.minSeqNo " +
" AND o.PeriodID = #{period}" +
" o.INVOICE_ID = oi.INVOICE_ID " +
" AND o.INVOICE_ID = m.INVOICE_ID " +
" AND oi.SEQ_NO = m.MIN_SEQ_NO " +
" AND o.PERIOD_ID = #{period}" +
" UNION SELECT " +
" o2.PeriodID, " +
" NULL AS InvoiceType, " +
" '' AS ClassCode, " +
" '' AS InvoiceNumber, " +
" '' AS BuyerName, " +
" '' AS BuyerTaxNumber, " +
" '' AS BankAccount, " +
" '' AS PhoneNum, " +
" NULL AS InvoiceDate, " +
" oi2.CodeVersion, " +
" oi2.ProductName, " +
" oi2.DocumentNum, " +
" oi2.ProductStandard, " +
" oi2.Unit, " +
" oi2.Quantity, " +
" oi2.UnitPrice, " +
" oi2.Amount, " +
" oi2.TaxRate, " +
" oi2.TaxAmount, " +
" oi2.TaxClassCode " +
" o2.periodID, " +
" NULL AS invoiceType, " +
" '' AS classCode, " +
" '' AS invoiceNumber, " +
" '' AS buyerName, " +
" '' AS buyerTaxNumber, " +
" '' AS bankAccount, " +
" '' AS phoneNum, " +
" NULL AS invoiceDate, " +
" oi2.codeVersion, " +
" oi2.productName, " +
" oi2.documentNum, " +
" oi2.productStandard, " +
" oi2.unit, " +
" oi2.quantity, " +
" oi2.unitPrice, " +
" oi2.amount, " +
" oi2.taxRate, " +
" oi2.taxAmount, " +
" oi2.taxClassCode " +
"FROM " +
" OutputVATInvoice o2, " +
" OutputVATInvoiceItem oi2, " +
" OUTPUT_VAT_INVOICE o2, " +
" OUTPUT_VAT_INVOICE_ITEM oi2, " +
" (SELECT " +
" InvoiceID, MIN(SeqNo) minSeqNo " +
" INVOICE_ID, MIN(SEQ_NO) MIN_SEQ_NO " +
" FROM " +
" OutputVATInvoiceItem " +
" GROUP BY InvoiceID) m2 " +
" OUTPUT_VAT_INVOICE_ITEM " +
" GROUP BY INVOICE_ID) m2 " +
"WHERE " +
" o2.InvoiceID = oi2.InvoiceID " +
" AND o2.InvoiceID = m2.InvoiceID " +
" AND oi2.SeqNo != m2.minSeqNo " +
" AND o2.PeriodID = #{period}" +
" o2.INVOICE_ID = oi2.INVOICE_ID " +
" AND o2.INVOICE_ID = m2.INVOICE_ID " +
" AND oi2.SEQ_NO != m2.MIN_SEQ_NO " +
" AND o2.PERIOD_ID = #{period}" +
" ")
List<OutputVATInvoiceInfoDto> queryOutputDetailWithItem(Integer period);
......
......@@ -115,73 +115,73 @@ public interface OutputVatInvoiceMapper extends MyVatMapper {
List<OutputVATInvoiceInfoDto> selectOutputVATInvoiceInfoLeftJoinItem(@Param("queryDto") QueryOutputDto queryDto);
@Select("SELECT " +
" o.PeriodID, " +
" o.InvoiceType, " +
" o.ClassCode, " +
" o.InvoiceNumber, " +
" o.BuyerName, " +
" o.BuyerTaxNumber, " +
" o.BankAccount, " +
" o.PhoneNum, " +
" o.InvoiceDate, " +
" oi.CodeVersion, " +
" oi.ProductName, " +
" oi.DocumentNum, " +
" oi.ProductStandard, " +
" oi.Unit, " +
" oi.Quantity, " +
" oi.UnitPrice, " +
" oi.Amount, " +
" oi.TaxRate, " +
" oi.TaxAmount, " +
" oi.TaxClassCode " +
" o.PERIOD_ID as periodId, " +
" o.INVOICE_TYPE as invoiceType, " +
" o.CLASS_CODE as classCode, " +
" o.INVOICE_NUMBER as invoiceNumber, " +
" o.BUYER_NAME as buyerName, " +
" o.BUYER_TAX_NUMBER as buyerTaxNumber, " +
" o.BANK_ACCOUNT as bankAccount, " +
" o.PHONE_NUM as phoneNum, " +
" o.INVOICE_DATE as invoiceDate, " +
" oi.CODE_VERSION as codeVersion, " +
" oi.PRODUCT_NAME as productName, " +
" oi.DOCUMENT_NUM as documentNum, " +
" oi.PRODUCT_STANDARD as productStandard, " +
" oi.UNIT as unit, " +
" oi.QUANTITY as quantity, " +
" oi.UNIT_PRICE as unitPrice, " +
" oi.AMOUNT as amount, " +
" oi.TAX_RATE as taxRate, " +
" oi.TAX_AMOUNT as taxAmount, " +
" oi.TAX_CLASS_CODE as taxClassCode " +
"FROM " +
" OutputVATInvoice o, " +
" OutputVATInvoiceItem oi, " +
" OUTPUT_VAT_INVOICE o, " +
" OUTPUT_VAT_INVOICE_ITEM oi, " +
" (SELECT " +
" InvoiceID, MIN(SeqNo) minSeqNo " +
" INVOICE_ID, MIN(SeqNo) MIN_SEQ_NO " +
" FROM " +
" OutputVATInvoiceItem " +
" OUTPUT_VAT_INVOICE_ITEM " +
" GROUP BY InvoiceID) m " +
"WHERE " +
" o.InvoiceID = oi.InvoiceID " +
" AND o.InvoiceID = m.InvoiceID " +
" AND oi.SeqNo = m.minSeqNo " +
" AND o.PeriodID = #{period}" +
" o.INVOICE_ID = oi.INVOICE_ID " +
" AND o.INVOICE_ID = m.INVOICE_ID " +
" AND oi.SEQ_NO = m.MIN_SEQ_NO " +
" AND o.PERIOD_ID = #{period}" +
" UNION SELECT " +
" o2.PeriodID, " +
" NULL AS InvoiceType, " +
" '' AS ClassCode, " +
" '' AS InvoiceNumber, " +
" '' AS BuyerName, " +
" '' AS BuyerTaxNumber, " +
" '' AS BankAccount, " +
" '' AS PhoneNum, " +
" NULL AS InvoiceDate, " +
" oi2.CodeVersion, " +
" oi2.ProductName, " +
" oi2.DocumentNum, " +
" oi2.ProductStandard, " +
" oi2.Unit, " +
" oi2.Quantity, " +
" oi2.UnitPrice, " +
" oi2.Amount, " +
" oi2.TaxRate, " +
" oi2.TaxAmount, " +
" oi2.TaxClassCode " +
" o2.periodID, " +
" NULL AS invoiceType, " +
" '' AS classCode, " +
" '' AS invoiceNumber, " +
" '' AS buyerName, " +
" '' AS buyerTaxNumber, " +
" '' AS bankAccount, " +
" '' AS phoneNum, " +
" NULL AS invoiceDate, " +
" oi2.codeVersion, " +
" oi2.productName, " +
" oi2.documentNum, " +
" oi2.productStandard, " +
" oi2.unit, " +
" oi2.quantity, " +
" oi2.unitPrice, " +
" oi2.amount, " +
" oi2.taxRate, " +
" oi2.taxAmount, " +
" oi2.taxClassCode " +
"FROM " +
" OutputVATInvoice o2, " +
" OutputVATInvoiceItem oi2, " +
" OUTPUT_VAT_INVOICE o2, " +
" OUTPUT_VAT_INVOICE_ITEM oi2, " +
" (SELECT " +
" InvoiceID, MIN(SeqNo) minSeqNo " +
" INVOICE_ID, MIN(SEQ_NO) MIN_SEQ_NO " +
" FROM " +
" OutputVATInvoiceItem " +
" GROUP BY InvoiceID) m2 " +
" OUTPUT_VAT_INVOICE_ITEM " +
" GROUP BY INVOICE_ID) m2 " +
"WHERE " +
" o2.InvoiceID = oi2.InvoiceID " +
" AND o2.InvoiceID = m2.InvoiceID " +
" AND oi2.SeqNo != m2.minSeqNo " +
" AND o2.PeriodID = #{period}" +
" o2.INVOICE_ID = oi2.INVOICE_ID " +
" AND o2.INVOICE_ID = m2.INVOICE_ID " +
" AND oi2.SEQ_NO != m2.MIN_SEQ_NO " +
" AND o2.PERIOD_ID = #{period}" +
" ")
List<OutputVATInvoiceInfoDto> queryOutputDetailWithItem(Integer period);
......
......@@ -111,54 +111,54 @@ public interface ValidationInfoMapper extends MyVatMapper {
int updateByPrimaryKey(ValidationInfo record);
@Select("SELECT " +
" c.AcctCode as AccountCode, COUNT(1) as Count " +
" c.ACCT_CODE as AccountCode, COUNT(1) as Count " +
"FROM " +
" CompanyBalance c " +
" COMPANY_BALANCE c " +
" LEFT JOIN " +
" EnterpriseAccount a ON c.AcctCode = a.AcctCode " +
" ENTERPRISE_ACCOUNT a ON c.ACCT_CODE = a.ACCT_CODE " +
"WHERE " +
" a.IsDummy != 1 " +
" AND (c.AcctCode != '' AND c.AcctCode != NULL) " +
"GROUP BY c.AcctCode")
" a.IS_DUMMY != 1 " +
" AND (c.ACCT_CODE != '' AND c.ACCT_CODE != NULL) " +
"GROUP BY c.ACCT_CODE")
List<VoucherAccountMto> getCompanyBalanceAcctChecks();
@Select("SELECT " +
" c.AcctCode as AccountCode, COUNT(1) as Count " +
" c.ACCT_CODE as AccountCode, COUNT(1) as Count " +
"FROM " +
" Voucher c " +
" VOUCHER c " +
" LEFT JOIN " +
" EnterpriseAccount a ON c.AcctCode = a.AcctCode " +
" ENTERPRISE_ACCOUNT a ON c.ACCT_CODE = a.AcctCode " +
"WHERE " +
" a.IsDummy != 1 " +
" AND (c.AcctCode != '' AND c.AcctCode != NULL) " +
"GROUP BY c.AcctCode")
" a.IS_DUMMY != 1 " +
" AND (c.ACCT_CODE != '' AND c.ACCT_CODE != NULL) " +
"GROUP BY c.ACCT_CODE")
List<VoucherAccountMto> getVoucherAccountChecks();
@Select("SELECT " +
" vv.VID, " +
" vv.Group, " +
" vv.Period, " +
" vv.CustomerCode, " +
" vv.Summary, " +
" vv.AcctCode, " +
" vv.Debit, " +
" vv.Credit, " +
" vv.ItemID " +
" VV.VID, " +
" VV.GROUP, " +
" VV.PERIOD, " +
" VV.CUSTOMER_CODE, " +
" VV.SUMMARY, " +
" VV.ACCT_CODE, " +
" VV.DEBIT, " +
" VV.CREDIT, " +
" VV.ITEMID " +
"FROM " +
" Voucher vv " +
" VOUCHER VV " +
" JOIN " +
" (SELECT " +
" v.VID, " +
" v.Period, " +
" v.Group, " +
" MAX(v.Date) AS `Date`, " +
" SUM(v.Debit) AS Debit, " +
" SUM(v.Credit) AS Credit " +
" V.VID, " +
" V.PERIOD, " +
" V.GROUP, " +
" MAX(V.DATE) AS `DATE`, " +
" SUM(V.DEBIT) AS DEBIT, " +
" SUM(V.CREDIT) AS CREDIT " +
" FROM " +
" Voucher v " +
" GROUP BY v.VID , v.Period , v.Group " +
" HAVING Debit != Credit) q ON vv.VID = q.VID AND vv.Period = q.Period " +
" AND vv.Group = q.Group " +
" VOUCHER V " +
" GROUP BY V.VID , V.PERIOD , V.GROUP " +
" HAVING DEBIT != CREDIT) Q ON VV.VID = Q.VID AND VV.PERIOD = Q.PERIOD " +
" AND VV.GROUP = Q.GROUP " +
"")
List<VoucherBalanceDto> getSingleVoucherCheck();
}
\ No newline at end of file
git checkout -- atms-dao/src/main/java/pwc/taxtech/atms/dao/BusinessUnitMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/DimensionMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/DimensionValueOrgMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/EnterpriseAccountSetMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/KeyValueConfigMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/ModelConfigMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/OrganizationStructureMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/UserDimensionValueMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/UserOrganizationMapper.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/CompanyBalanceMapper.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodFormulaBlockMapper.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/VoucherMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/AreaRegionMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/CellTemplateMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/DimensionValueMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/EnterpriseAccountMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/EnterpriseAccountSetOrgMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/IndustryMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/OrganizationServiceTemplateGroupMapper.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodTaxRuleSettingMapper.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodTemplateMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/RolePermissionMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/UserRoleMapper.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/BalanceStdManualMapper.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodCellTemplateMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/CellTemplateConfigMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/KeyValueReferenceMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/OperationLogBasicDataMapper.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/BalanceMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/TemplateMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/UserDimensionValueRoleMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/UserOrganizationRoleMapper.java atms-dao/src/main/java/pwc/taxtech/atms/entity/Region.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodCellTemplateConfigMapper.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/AssetsListMapper.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/InputVATInvoiceMapper.java atms-dao/src/main/java/pwc/taxtech/atms/entity/EnterpriseAccountSetOrg.java atms-dao/src/main/java/pwc/taxtech/atms/dao/TaxRuleSettingMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/OrganizationMapper.java atms-dao/src/main/java/pwc/taxtech/atms/entity/AreaRegion.java atms-dao/src/main/java/pwc/taxtech/atms/entity/RolePermission.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/CellDataMapper.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/DataSourceMapper.java atms-dao/src/main/java/pwc/taxtech/atms/entity/Organization.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/ValidationInfoMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/UserMapper.java atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/OutputVATInvoiceMapper.java atms-dao/src/main/java/pwc/taxtech/atms/dao/ProjectMapper.java
\ No newline at end of file
git checkout --
atms-dao/src/main/java/pwc/taxtech/atms/dao/BusinessUnitMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/DimensionMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/DimensionValueOrgMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/EnterpriseAccountSetMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/KeyValueConfigMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/ModelConfigMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/OrganizationStructureMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/UserDimensionValueMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/UserOrganizationMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/CompanyBalanceMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodFormulaBlockMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/VoucherMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/AreaRegionMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/CellTemplateMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/DimensionValueMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/EnterpriseAccountMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/EnterpriseAccountSetOrgMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/IndustryMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/OrganizationServiceTemplateGroupMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodTaxRuleSettingMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodTemplateMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/RolePermissionMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/UserRoleMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/BalanceStdManualMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodCellTemplateMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/CellTemplateConfigMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/KeyValueReferenceMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/OperationLogBasicDataMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/BalanceMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/TemplateMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/UserDimensionValueRoleMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/UserOrganizationRoleMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/entity/Region.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodCellTemplateConfigMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/AssetsListMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/InputVATInvoiceMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/entity/EnterpriseAccountSetOrg.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/TaxRuleSettingMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/OrganizationMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/entity/AreaRegion.java
atms-dao/src/main/java/pwc/taxtech/atms/entity/RolePermission.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/CellDataMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/DataSourceMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/entity/Organization.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/ValidationInfoMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/UserMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/OutputVATInvoiceMapper.java
atms-dao/src/main/java/pwc/taxtech/atms/dao/ProjectMapper.java
\ No newline at end of file
{
"config": {
"chainId": 10,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"alloc": {
"0x7c357530174275dd30e46319b89f71186256e4f7": {
"balance": 9e+22
}
},
"committee": [
{
"address": "0x76ea2f3a002431fede1141b660dbb75c26ba6d97",
"publickey": "0x04044308742b61976de7344edb8662d6d10be1c477dd46e8e4c433c1288442a79183480894107299ff7b0706490f1fb9c9b7c9e62ae62d57bd84a1e469460d8ac1"
}
],
"coinbase": "0x0000000000000000000000000000000000000000",
"difficulty": "0x100",
"extraData": "",
"gasLimit": "0x5400000",
"nonce": "0x0000000000000042",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x00"
}
\ No newline at end of file
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