Commit 8ef76d85 authored by neo's avatar neo

Merge branch 'dev_oracle' of code.tech.tax.asia.pwcinternal.com:root/atms into neo_jpa_withoutgen

parents eb4a077c d3c9c6c5
...@@ -258,16 +258,16 @@ public class EnterpriseAccountManagerController { ...@@ -258,16 +258,16 @@ public class EnterpriseAccountManagerController {
@ResponseBody @ResponseBody
@ApiOperation(value = "按组织机构查找") @ApiOperation(value = "按组织机构查找")
@RequestMapping(value = "getEnterpriseAccountSetListByOrgId", method = RequestMethod.GET) @RequestMapping(value = "getEnterpriseAccountSetListByOrgID", method = RequestMethod.GET)
public List<EnterpriseAccountSetDto> getEnterpriseAccountSetListByOrgId(@RequestParam String orgId) { public List<EnterpriseAccountSetDto> getEnterpriseAccountSetListByOrgId(@RequestParam(name="orgID") String orgId) {
return enterpriseAccountService.getEnterpriseAccountSetListByOrgId(orgId); return enterpriseAccountService.getEnterpriseAccountSetListByOrgId(orgId);
} }
@ResponseBody @ResponseBody
@ApiOperation(value = "科目对应列表") @ApiOperation(value = "科目对应列表")
@RequestMapping(value = "getEnterpriseAccountList", method = RequestMethod.GET) @RequestMapping(value = "getEnterpriseAccountList", method = RequestMethod.GET)
public List<EnterpriseAccountDto> getEnterpriseAccountList(@RequestParam String espId, public List<EnterpriseAccountDto> getEnterpriseAccountList(@RequestParam(name="espID") String espId,
@RequestParam String orgId, @RequestParam(name="orgID") String orgId,
@RequestParam String filterType) { @RequestParam String filterType) {
return enterpriseAccountService.getList(espId, orgId, filterType); return enterpriseAccountService.getList(espId, orgId, filterType);
} }
......
...@@ -232,7 +232,7 @@ public class OrganizationController { ...@@ -232,7 +232,7 @@ public class OrganizationController {
@ApiOperation(value = "获取机构树信息", notes = "科目对应>复制对应关系>弹出层") @ApiOperation(value = "获取机构树信息", notes = "科目对应>复制对应关系>弹出层")
@RequestMapping(value = "getOrgIvhTreeList", method = RequestMethod.GET) @RequestMapping(value = "getOrgIvhTreeList", method = RequestMethod.GET)
public List<DevTreeDto> getOrgIvhTreeList(@RequestParam("useType") Integer useType, public List<DevTreeDto> getOrgIvhTreeList(@RequestParam("useType") Integer useType,
@RequestParam("orgSetId") String orgSetId) { @RequestParam("orgSetID") String orgSetId) {
return organizationService.getOrgIvhTreeList(useType, orgSetId); return organizationService.getOrgIvhTreeList(useType, orgSetId);
} }
......
...@@ -35,7 +35,7 @@ public class PermissionController { ...@@ -35,7 +35,7 @@ public class PermissionController {
} }
@ApiOperation(value = "通过传入的角色Id列表获取树形结构权限") @ApiOperation(value = "通过传入的角色Id列表获取树形结构权限")
@RequestMapping(value = "getIvhTreePermissionsByRoleIdList", method = RequestMethod.POST) @RequestMapping(value = "getIvhTreePermissionsByRoleIDList", method = RequestMethod.POST)
public @ResponseBody List<DevTreeDto> getIvhTreePermissionsByRoleIdList(@RequestBody List<String> roleIdList, public @ResponseBody List<DevTreeDto> getIvhTreePermissionsByRoleIdList(@RequestBody List<String> roleIdList,
@RequestParam String serviceType) { @RequestParam String serviceType) {
return permissionService.getIvhTreePermissionsByRoleIdList(roleIdList, serviceType); return permissionService.getIvhTreePermissionsByRoleIdList(roleIdList, serviceType);
......
...@@ -22,7 +22,7 @@ public class StdAccountController extends BaseController { ...@@ -22,7 +22,7 @@ public class StdAccountController extends BaseController {
@ResponseBody @ResponseBody
@ApiOperation(value = "获取科目层级") @ApiOperation(value = "获取科目层级")
@RequestMapping(value = "stdAccountHierarchy", method = RequestMethod.GET) @RequestMapping(value = "stdAccountHierarchy", method = RequestMethod.GET)
public List<StdAccountFancyTreeDto> getStdAccountHierarchy(@RequestParam String orgId) { public List<StdAccountFancyTreeDto> getStdAccountHierarchy(@RequestParam(name="orgID") String orgId) {
if (StringUtils.isBlank(orgId)) { if (StringUtils.isBlank(orgId)) {
return Collections.emptyList(); return Collections.emptyList();
} }
......
...@@ -41,7 +41,7 @@ public class TemplateController extends BaseController { ...@@ -41,7 +41,7 @@ public class TemplateController extends BaseController {
@RequestMapping(value = "get", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "get", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody public @ResponseBody
List<TemplateDto> get(@RequestParam Long templateGroupId, @RequestParam String reportType) { List<TemplateDto> get(@RequestParam(name="templateGroupID") Long templateGroupId, @RequestParam(name="reportType") String reportType) {
if (!isParamValid(templateGroupId)) { if (!isParamValid(templateGroupId)) {
return Collections.emptyList(); return Collections.emptyList();
} }
...@@ -56,7 +56,7 @@ public class TemplateController extends BaseController { ...@@ -56,7 +56,7 @@ public class TemplateController extends BaseController {
@RequestMapping(value = "getTemplateJson", method = RequestMethod.POST, produces = MediaType.APPLICATION_OCTET_STREAM_VALUE) @RequestMapping(value = "getTemplateJson", method = RequestMethod.POST, produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
public @ResponseBody public @ResponseBody
void getTemplateBlob(@RequestParam Long templateId, HttpServletResponse response) throws URISyntaxException { void getTemplateBlob(@RequestParam(name="templateID") Long templateId, HttpServletResponse response) throws URISyntaxException {
MyAsserts.assertTrue(isParamValid(templateId), new BadParameterException()); MyAsserts.assertTrue(isParamValid(templateId), new BadParameterException());
String filePath; String filePath;
File templateFile; File templateFile;
......
...@@ -59,12 +59,12 @@ public class EnterpriseAccountDao { ...@@ -59,12 +59,12 @@ public class EnterpriseAccountDao {
public List<EnterpriseAccountDto> getAccountMappingResult(String accountSetId, int ruleId, String industryId) { public List<EnterpriseAccountDto> getAccountMappingResult(String accountSetId, int ruleId, String industryId) {
//amk.IndustryId倒序排列可以保证在结果集中,同一个COA,本行业的匹配结果在通用关键字匹配结果之前出现 //amk.IndustryId倒序排列可以保证在结果集中,同一个COA,本行业的匹配结果在通用关键字匹配结果之前出现
String sql = "SELECT a.Code, a.IsLeaf, sa.Code StdCode,a.FullName as AccountFullName, amk.FullName as MappingFullName,amk.IndustryId" String sql = "SELECT a.Code, a.Is_Leaf, sa.Code StdCode,a.Full_Name as AccountFullName, amk.Full_Name as MappingFullName,amk.Industry_Id"
+ " FROM (select * from AccountMappingKeyword where IndustryId=?) amk " + " FROM (select * from Account_Mapping_Keyword where Industry_Id=?) amk "
+ " INNER JOIN (select * from StandardAccount where IndustryId=?) sa ON amk.StandardCode = sa.Code" + " INNER JOIN (select * from Standard_Account where Industry_Id=?) sa ON amk.Standard_Code = sa.Code"
+ " INNER JOIN EnterpriseAccount a on a.FullName like amk.FullName" + " INNER JOIN Enterprise_Account a on a.Full_Name like amk.Full_Name"
+ " WHERE amk.RuleType = ? AND sa.IsLeaf = 1 AND a.EnterpriseAccountSetId=?" + " WHERE amk.Rule_Type = ? AND sa.Is_Leaf = 1 AND a.Enterprise_Account_Set_Id=?"
+ " ORDER BY a.Code,amk.IndustryId DESC"; + " ORDER BY a.Code,amk.Industry_Id DESC";
List<Map<String, Object>> queryList = jdbcTemplate.queryForList(sql, industryId, industryId, ruleId, accountSetId); List<Map<String, Object>> queryList = jdbcTemplate.queryForList(sql, industryId, industryId, ruleId, accountSetId);
List<EnterpriseAccountDto> list = Lists.newArrayList(); List<EnterpriseAccountDto> list = Lists.newArrayList();
...@@ -94,35 +94,35 @@ public class EnterpriseAccountDao { ...@@ -94,35 +94,35 @@ public class EnterpriseAccountDao {
List<String> whereList = Lists.newArrayList(); List<String> whereList = Lists.newArrayList();
String sql = "SELECT * FROM ( " + String sql = "SELECT * FROM ( " +
"SELECT CASE IsLeaf WHEN 0 THEN '+' ELSE '' END IsEx,Code, Name, FullName, " + "SELECT CASE Is_Leaf WHEN 0 THEN '+' ELSE '' END IsEx,Code, Name, Full_Name, " +
"CASE Direction WHEN 1 THEN N'借方' WHEN -1 THEN N'贷方' END Direction, " + "CASE Direction WHEN 1 THEN N'借方' WHEN -1 THEN N'贷方' END Direction, " +
"CASE StdAccountCode WHEN '0000' THEN '-' ELSE StdAccountCode END StdCode," + "CASE Std_Account_Code WHEN '0000' THEN '-' ELSE Std_Account_Code END Std_Code," +
"CASE StdAccountCode WHEN '0000' THEN '-' ELSE StdName END StdName, " + "CASE Std_Account_Code WHEN '0000' THEN '-' ELSE Std_Name END Std_Name, " +
"CASE StdAccountCode WHEN '0000' THEN '-' ELSE StdAccountCode + '/' + StdFullName END StdCodeName, " + "CASE Std_Account_Code WHEN '0000' THEN '-' ELSE CONCAT(CONCAT(STD_ACCOUNT_CODE,'/'), STD_FULL_NAME) END Std_Code_Name, " +
"CASE StdAccountCode WHEN '0000' THEN '-' ELSE CASE StdDirection WHEN 1 THEN N'借方' WHEN -1 THEN N'贷方' END END StdDirection, " + "CASE Std_Account_Code WHEN '0000' THEN '-' ELSE CASE Std_Direction WHEN 1 THEN '借方' WHEN -1 THEN '贷方' END END Std_Direction, " +
"CASE WHEN AcctProp<>StdAcctProp THEN 1 ELSE 0 END IsAcctPropDiff," + "CASE WHEN Acct_Prop<>Std_Acct_Prop THEN 1 ELSE 0 END Is_Acct_Prop_Diff," +
"CASE WHEN StdAccountCode IS NULL THEN 0 ELSE 1 END MappingStatus, " + "CASE WHEN Std_Account_Code IS NULL THEN 0 ELSE 1 END Mapping_Status, " +
"CASE WHEN StdAccountCode IS NULL THEN AcctProp ELSE StdAcctProp END AcctProp, ParentCode, AcctLevel, StdAccountCode AcctStdCode, IsLeaf " + "CASE WHEN Std_Account_Code IS NULL THEN Acct_Prop ELSE Std_Acct_Prop END Acct_Prop, Parent_Code, Acct_Level, Std_Account_Code Acct_Std_Code, Is_Leaf " +
" FROM (SELECT id,Code,Name,FullName,Direction,AcctProp,ParentCode,AcctLevel,IsLeaf FROM EnterpriseAccount WHERE EnterpriseAccountSetId=?) ea " + " FROM (SELECT id,Code,\"NAME\",Full_Name,Direction,Acct_Prop,Parent_Code,Acct_Level,Is_Leaf FROM Enterprise_Account WHERE Enterprise_Account_Set_Id=?) ea " +
"LEFT JOIN (SELECT EnterpriseAccountCode ,StandardAccountCode FROM AccountMapping WHERE OrganizationId=? AND IndustryId=?) am ON ea.Code=am.EnterpriseAccountCode " + "LEFT JOIN (SELECT Enterprise_Account_Code ,Standard_Account_Code FROM Account_Mapping WHERE Organization_Id=? AND Industry_Id=?) am ON ea.Code=am.Enterprise_Account_Code " +
"LEFT JOIN (SELECT id StdId, Code StdAccountCode, Name StdName, FullName StdFullName,Direction StdDirection,AcctProp StdAcctProp FROM StandardAccount WHERE IndustryId=?) sa ON am.StandardAccountCode=sa.StdAccountCode ) T"; "LEFT JOIN (SELECT id as Std_Id, Code as Std_Account_Code, \"NAME\" as Std_Name, Full_Name as Std_Full_Name,Direction Std_Direction,Acct_Prop Std_Acct_Prop FROM Standard_Account WHERE Industry_Id=?) sa ON am.Standard_Account_Code=sa.Std_Account_Code ) T";
List<Object> params = Lists.newArrayList(accountSetId, organizationId, industryId, industryId); List<Object> params = Lists.newArrayList(accountSetId, organizationId, industryId, industryId);
if (iAcctProp != EnterpriseAccountConstant.InvalidId) { if (iAcctProp != EnterpriseAccountConstant.InvalidId) {
sql += "AcctProp = ?"; sql += "Acct_Prop = ?";
params.add(iAcctProp); params.add(iAcctProp);
} }
if (iIsMapped == AccountMappingConstant.Status.UNMAPPED.getCode()) { if (iIsMapped == AccountMappingConstant.Status.UNMAPPED.getCode()) {
sql += "StdCode IS NULL"; sql += "Std_Code IS NULL";
} else if (iIsMapped == AccountMappingConstant.Status.MAPPED.getCode()) { } else if (iIsMapped == AccountMappingConstant.Status.MAPPED.getCode()) {
sql += "StdCode IS NOT NULL"; sql += "Std_Code IS NOT NULL";
} else if (iIsMapped == AccountMappingConstant.Status.DIRECTION_DIFFERENT.getCode()) { } else if (iIsMapped == AccountMappingConstant.Status.DIRECTION_DIFFERENT.getCode()) {
sql += "StdCode IS NOT NULL AND Direction<>StdDirection"; sql += "Std_Code IS NOT NULL AND Direction<>Std_Direction";
} else if (iIsMapped == AccountMappingConstant.Status.ACCOUNT_TYPE_DIFFERENT.getCode()) { } else if (iIsMapped == AccountMappingConstant.Status.ACCOUNT_TYPE_DIFFERENT.getCode()) {
sql += "StdCode IS NOT NULL AND IsAcctPropDiff=1"; sql += "Std_Code IS NOT NULL AND Is_Acct_Prop_Diff=1";
} }
if (iLevel != EnterpriseAccountConstant.InvalidId) { if (iLevel != EnterpriseAccountConstant.InvalidId) {
sql += "AcctLevel = ?"; sql += "Acct_Level = ?";
params.add(iLevel); params.add(iLevel);
} }
......
...@@ -15,8 +15,8 @@ public class KeyValueConfigDisplayDto { ...@@ -15,8 +15,8 @@ public class KeyValueConfigDisplayDto {
private String scopeSummary; private String scopeSummary;
private String serviceTypes; private String serviceTypes;
private String industrys; private String industrys;
private List<String> serviceTypeIds; private List<String> serviceTypeIDs;
private List<String> industryIds; private List<String> industryIDs;
private Integer keyValueType; private Integer keyValueType;
private String dataSource; private String dataSource;
private Map<Integer, Integer> scopeCount; private Map<Integer, Integer> scopeCount;
...@@ -86,20 +86,20 @@ public class KeyValueConfigDisplayDto { ...@@ -86,20 +86,20 @@ public class KeyValueConfigDisplayDto {
this.industrys = industrys; this.industrys = industrys;
} }
public List<String> getServiceTypeIds() { public List<String> getServiceTypeIDs() {
return serviceTypeIds; return serviceTypeIDs;
} }
public void setServiceTypeIds(List<String> serviceTypeIds) { public void setServiceTypeIDs(List<String> serviceTypeIDs) {
this.serviceTypeIds = serviceTypeIds; this.serviceTypeIDs = serviceTypeIDs;
} }
public List<String> getIndustryIds() { public List<String> getIndustryIDs() {
return industryIds; return industryIDs;
} }
public void setIndustryIds(List<String> industryIds) { public void setIndustryIDs(List<String> industryIDs) {
this.industryIds = industryIds; this.industryIDs = industryIDs;
} }
public Integer getKeyValueType() { public Integer getKeyValueType() {
......
...@@ -46,8 +46,8 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal ...@@ -46,8 +46,8 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
CommonUtils.copyProperties(keyValueConfig, dtoObj); CommonUtils.copyProperties(keyValueConfig, dtoObj);
dtoObj.setServiceTypes(getNamesByIds(keyValueConfig.getServiceTypeIds(), serviceType)); dtoObj.setServiceTypes(getNamesByIds(keyValueConfig.getServiceTypeIds(), serviceType));
dtoObj.setIndustrys(getNamesByIds(keyValueConfig.getIndustryIds(), industryList)); dtoObj.setIndustrys(getNamesByIds(keyValueConfig.getIndustryIds(), industryList));
dtoObj.setIndustryIds(Arrays.asList(keyValueConfig.getIndustryIds().split(","))); dtoObj.setIndustryIDs(Arrays.asList(keyValueConfig.getIndustryIds().split(",")));
dtoObj.setServiceTypeIds(Arrays.asList(keyValueConfig.getServiceTypeIds().split(","))); dtoObj.setServiceTypeIDs(Arrays.asList(keyValueConfig.getServiceTypeIds().split(",")));
List<KeyValueReference> selectScopeList = scopes.stream().filter(item -> item.getKeyValueConfigId().equals(keyValueConfig.getId())).collect(Collectors.toList()); List<KeyValueReference> selectScopeList = scopes.stream().filter(item -> item.getKeyValueConfigId().equals(keyValueConfig.getId())).collect(Collectors.toList());
List<Integer> selectScopes = selectScopeList.stream().map(KeyValueReference::getScope).distinct().collect(Collectors.toList()); List<Integer> selectScopes = selectScopeList.stream().map(KeyValueReference::getScope).distinct().collect(Collectors.toList());
Map<Integer, Integer> scopeCount = new HashMap<>(); Map<Integer, Integer> scopeCount = new HashMap<>();
...@@ -208,7 +208,7 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal ...@@ -208,7 +208,7 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
CommonUtils.copyProperties(item, dtoObj); CommonUtils.copyProperties(item, dtoObj);
dtoObj.setServiceTypes(getNamesByIds(item.getServiceTypeIds(), serviceType)); dtoObj.setServiceTypes(getNamesByIds(item.getServiceTypeIds(), serviceType));
dtoObj.setIndustrys(getNamesByIds(item.getIndustryIds(), industryList)); dtoObj.setIndustrys(getNamesByIds(item.getIndustryIds(), industryList));
dtoObj.setIndustryIds(new ArrayList<>(Arrays.asList(item.getIndustryIds().split(",")))); dtoObj.setIndustryIDs(new ArrayList<>(Arrays.asList(item.getIndustryIds().split(","))));
List<Integer> selectScopes = scopes.stream().filter(a -> a.getKeyValueConfigId().equals(item.getId())) List<Integer> selectScopes = scopes.stream().filter(a -> a.getKeyValueConfigId().equals(item.getId()))
.map(KeyValueReference::getScope).collect(Collectors.toList()); .map(KeyValueReference::getScope).collect(Collectors.toList());
dtoObj.setScopeSummary(jointToString(selectScopes)); dtoObj.setScopeSummary(jointToString(selectScopes));
......
...@@ -1065,7 +1065,7 @@ public class OrganizationServiceImpl implements OrganizationService { ...@@ -1065,7 +1065,7 @@ public class OrganizationServiceImpl implements OrganizationService {
newDto.setClientCode(rawDto.getClientCode()); newDto.setClientCode(rawDto.getClientCode());
newDto.setCode(rawDto.getCode()); newDto.setCode(rawDto.getCode());
newDto.setParentId(rawDto.getParentId()); newDto.setParentId(rawDto.getParentId());
newDto.setpLevel(rawDto.getpLevel()); newDto.setPLevel(rawDto.getPLevel());
newDto.setTaxPayerNumber(rawDto.getTaxPayerNumber()); newDto.setTaxPayerNumber(rawDto.getTaxPayerNumber());
// OrganizationDto newDto = CommonUtils.copyProperties(rawDto, new // OrganizationDto newDto = CommonUtils.copyProperties(rawDto, new
...@@ -1499,7 +1499,7 @@ public class OrganizationServiceImpl implements OrganizationService { ...@@ -1499,7 +1499,7 @@ public class OrganizationServiceImpl implements OrganizationService {
private OrgDisplayDto convertToOrgDisplayDto(OrganizationDto from) { private OrgDisplayDto convertToOrgDisplayDto(OrganizationDto from) {
OrgDisplayDto to = copyProperties(from, new OrgDisplayDto()); OrgDisplayDto to = copyProperties(from, new OrgDisplayDto());
to.setPLevel(from.getpLevel()); to.setPLevel(from.getPLevel());
to.setOrgName(from.getName()); to.setOrgName(from.getName());
to.setOrgId(from.getId()); to.setOrgId(from.getId());
to.setPLevel(Optional.ofNullable(to.getPLevel()).orElse(0)); to.setPLevel(Optional.ofNullable(to.getPLevel()).orElse(0));
...@@ -1892,14 +1892,14 @@ public class OrganizationServiceImpl implements OrganizationService { ...@@ -1892,14 +1892,14 @@ public class OrganizationServiceImpl implements OrganizationService {
} }
if (Objects.equals(orgDto.getParentId(), OrganizationConstant.NoParentId)) { if (Objects.equals(orgDto.getParentId(), OrganizationConstant.NoParentId)) {
orgDto.setParentId(null); orgDto.setParentId(null);
orgDto.setpLevel(0); orgDto.setPLevel(0);
} else { } else {
// 机构添加层级 // 机构添加层级
Organization query = null; Organization query = null;
query = orgDto.getParentId() != null ? organizationMapper.selectByPrimaryKey(orgDto.getParentId()) query = orgDto.getParentId() != null ? organizationMapper.selectByPrimaryKey(orgDto.getParentId())
: null; : null;
if (query != null) { if (query != null) {
orgDto.setpLevel(query.getpLevel() + 1); orgDto.setPLevel(query.getpLevel() + 1);
} }
} }
...@@ -1924,7 +1924,7 @@ public class OrganizationServiceImpl implements OrganizationService { ...@@ -1924,7 +1924,7 @@ public class OrganizationServiceImpl implements OrganizationService {
} }
Organization org = copyProperties(orgDto, new Organization()); Organization org = copyProperties(orgDto, new Organization());
org.setpLevel(orgDto.getpLevel()); org.setpLevel(orgDto.getPLevel());
organizationMapper.insert(org); organizationMapper.insert(org);
OperationResultDto<Object> validateSetRet = validateEnterpriseAccountSetDateTimeOverlap( OperationResultDto<Object> validateSetRet = validateEnterpriseAccountSetDateTimeOverlap(
orgDto.getEnterpriseAccountSetOrgList()); orgDto.getEnterpriseAccountSetOrgList());
...@@ -2894,6 +2894,7 @@ public class OrganizationServiceImpl implements OrganizationService { ...@@ -2894,6 +2894,7 @@ public class OrganizationServiceImpl implements OrganizationService {
for (Organization subOrg : subOrgList) { for (Organization subOrg : subOrgList) {
children.add(generateIvhTreeDto(subOrg, orgList, serviceList, useType)); children.add(generateIvhTreeDto(subOrg, orgList, serviceList, useType));
} }
result.setId(parentOrg.getId());
result.setLabel(parentOrgDto.getName()); result.setLabel(parentOrgDto.getName());
result.setValue(parentOrgDto); result.setValue(parentOrgDto);
result.setChildren(children); result.setChildren(children);
......
...@@ -6,6 +6,7 @@ import java.util.Date; ...@@ -6,6 +6,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -47,17 +48,19 @@ public class RuleEngineeConfigServiceImpl extends AbstractService implements Rul ...@@ -47,17 +48,19 @@ public class RuleEngineeConfigServiceImpl extends AbstractService implements Rul
List<TaxPayerReportRule> filterRules = new ArrayList<>(); List<TaxPayerReportRule> filterRules = new ArrayList<>();
for (TaxPayerReportRule rule : rules) { for (TaxPayerReportRule rule : rules) {
String[] selectedOrgIds = rule.getOrganizationId().split(","); if (StringUtils.isNotBlank(rule.getOrganizationId())) {
boolean isAtLeastOrgExisted = false; String[] selectedOrgIds = rule.getOrganizationId().split(",");
boolean isAtLeastOrgExisted = false;
for (String selectedOrgId : selectedOrgIds) {
if (orgIds.contains(selectedOrgId)) { for (String selectedOrgId : selectedOrgIds) {
isAtLeastOrgExisted = true; if (orgIds.contains(selectedOrgId)) {
isAtLeastOrgExisted = true;
}
} }
}
if (isAtLeastOrgExisted || rule.getIsDefault()) { if (isAtLeastOrgExisted || rule.getIsDefault()) {
filterRules.add(rule); filterRules.add(rule);
}
} }
} }
......
...@@ -108,6 +108,6 @@ public interface EnterpriseAccountMapper extends MyMapper { ...@@ -108,6 +108,6 @@ public interface EnterpriseAccountMapper extends MyMapper {
*/ */
int updateByPrimaryKey(EnterpriseAccount record); int updateByPrimaryKey(EnterpriseAccount record);
List<EnterpriseAccountDto> getDto(@Param("epAccountSetId") String epAccountSetId, List<EnterpriseAccountDto> getDto(@Param("epAccountSetID") String epAccountSetId,
@Param("orgId") String orgId, @Param("industryId") String industryId); @Param("orgId") String orgId, @Param("industryId") String industryId);
} }
\ No newline at end of file
...@@ -110,11 +110,11 @@ public interface KeyValueReferenceMapper extends MyMapper { ...@@ -110,11 +110,11 @@ public interface KeyValueReferenceMapper extends MyMapper {
*/ */
int updateByPrimaryKey(KeyValueReference record); int updateByPrimaryKey(KeyValueReference record);
int deleteKeyValueReferenceByCellTemplate(@Param("templateDbId") Long templateDbId); int deleteKeyValueReferenceByCellTemplate(@Param("templateDbID") Long templateDbId);
List<FinancialStatementDetail> getFinancialStatementDetails(@Param("configurationId") String configurationId); List<FinancialStatementDetail> getFinancialStatementDetails(@Param("configurationID") String configurationId);
List<TaxReturnDetail> getTaxReturnDetails(@Param("configurationId") String configurationId); List<TaxReturnDetail> getTaxReturnDetails(@Param("configurationID") String configurationId);
List<AnalyticsModelDetail> getAnalyticsModelDetails(@Param("configurationId") String configurationId); List<AnalyticsModelDetail> getAnalyticsModelDetails(@Param("configurationID") String configurationId);
} }
\ No newline at end of file
...@@ -112,7 +112,7 @@ public interface OrganizationMapper extends MyMapper { ...@@ -112,7 +112,7 @@ public interface OrganizationMapper extends MyMapper {
*/ */
int updateByPrimaryKey(Organization record); int updateByPrimaryKey(Organization record);
@Select("SELECT id, ParentID from Organization") @Select("SELECT id, Parent_ID from Organization")
List<OrganizationDto> selectOnlyIdAndParentId(); List<OrganizationDto> selectOnlyIdAndParentId();
List<Organization> selectByExampleWithAssociation(OrganizationExample example); List<Organization> selectByExampleWithAssociation(OrganizationExample example);
......
...@@ -111,7 +111,7 @@ public interface TaxRuleSettingMapper extends MyMapper { ...@@ -111,7 +111,7 @@ public interface TaxRuleSettingMapper extends MyMapper {
*/ */
int updateByPrimaryKey(TaxRuleSetting record); 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.ORGANIZATION_ID" @Select("SELECT TRS.GROUP_NAME as groupName,TRS.ID as id,TRS.IS_DEFAULT as isDefault,TRS.NAME as name,TRS.TAX_BASE as taxBase,TRS.TAX_RATE*100 AS taxRate,TRSO.ORGANIZATION_ID as organizationId"
+ " FROM TAX_RULE_SETTING TRS " + " FROM TAX_RULE_SETTING TRS "
+ "LEFT JOIN TAX_RULE_SETTING_ORGANIZATION TRSO ON TRS.ID=TRSO.TAX_SETTING_ID") + "LEFT JOIN TAX_RULE_SETTING_ORGANIZATION TRSO ON TRS.ID=TRSO.TAX_SETTING_ID")
List<TaxRuleSettingDto> GetTaxRuleSetting(); List<TaxRuleSettingDto> GetTaxRuleSetting();
......
...@@ -390,11 +390,11 @@ public class OrganizationDto { ...@@ -390,11 +390,11 @@ public class OrganizationDto {
this.level = level; this.level = level;
} }
public Integer getpLevel() { public Integer getPLevel() {
return pLevel; return pLevel;
} }
public void setpLevel(Integer pLevel) { public void setPLevel(Integer pLevel) {
this.pLevel = pLevel; this.pLevel = pLevel;
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<result column="IS_CONSTANT" jdbcType="DECIMAL" property="isConstant" /> <result column="IS_CONSTANT" jdbcType="DECIMAL" property="isConstant" />
<result column="CALCULATE_STATUS" jdbcType="DECIMAL" property="calculateStatus" /> <result column="CALCULATE_STATUS" jdbcType="DECIMAL" property="calculateStatus" />
<result column="RESULT_TYPE" jdbcType="DECIMAL" property="resultType" /> <result column="RESULT_TYPE" jdbcType="DECIMAL" property="resultType" />
<result column="SERVICE_TYPE_IDS" jdbcType="VARCHAR" property="serviceTypeIds" /> <result column="SERVICE_TYPE_IDS" jdbcType="VARCHAR" property="serviceTypeIDs" />
<result column="INDUSTRY_IDS" jdbcType="VARCHAR" property="industryIds" /> <result column="INDUSTRY_IDS" jdbcType="VARCHAR" property="industryIds" />
<result column="DESCRIPTION" jdbcType="VARCHAR" property="description" /> <result column="DESCRIPTION" jdbcType="VARCHAR" property="description" />
<result column="CREATOR" jdbcType="VARCHAR" property="creator" /> <result column="CREATOR" jdbcType="VARCHAR" property="creator" />
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
DATA_SOURCE) DATA_SOURCE)
values (#{id,jdbcType=VARCHAR}, #{keyCode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, values (#{id,jdbcType=VARCHAR}, #{keyCode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{keyValueType,jdbcType=DECIMAL}, #{formula,jdbcType=VARCHAR}, #{isConstant,jdbcType=DECIMAL}, #{keyValueType,jdbcType=DECIMAL}, #{formula,jdbcType=VARCHAR}, #{isConstant,jdbcType=DECIMAL},
#{calculateStatus,jdbcType=DECIMAL}, #{resultType,jdbcType=DECIMAL}, #{serviceTypeIds,jdbcType=VARCHAR}, #{calculateStatus,jdbcType=DECIMAL}, #{resultType,jdbcType=DECIMAL}, #{serviceTypeIDs,jdbcType=VARCHAR},
#{industryIds,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR}, #{industryIds,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updator,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{updator,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{dataSource,jdbcType=VARCHAR}) #{dataSource,jdbcType=VARCHAR})
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
<if test="resultType != null"> <if test="resultType != null">
RESULT_TYPE, RESULT_TYPE,
</if> </if>
<if test="serviceTypeIds != null"> <if test="serviceTypeIDs != null">
SERVICE_TYPE_IDS, SERVICE_TYPE_IDS,
</if> </if>
<if test="industryIds != null"> <if test="industryIds != null">
...@@ -243,8 +243,8 @@ ...@@ -243,8 +243,8 @@
<if test="resultType != null"> <if test="resultType != null">
#{resultType,jdbcType=DECIMAL}, #{resultType,jdbcType=DECIMAL},
</if> </if>
<if test="serviceTypeIds != null"> <if test="serviceTypeIDs != null">
#{serviceTypeIds,jdbcType=VARCHAR}, #{serviceTypeIDs,jdbcType=VARCHAR},
</if> </if>
<if test="industryIds != null"> <if test="industryIds != null">
#{industryIds,jdbcType=VARCHAR}, #{industryIds,jdbcType=VARCHAR},
...@@ -310,8 +310,8 @@ ...@@ -310,8 +310,8 @@
<if test="record.resultType != null"> <if test="record.resultType != null">
RESULT_TYPE = #{record.resultType,jdbcType=DECIMAL}, RESULT_TYPE = #{record.resultType,jdbcType=DECIMAL},
</if> </if>
<if test="record.serviceTypeIds != null"> <if test="record.serviceTypeIDs != null">
SERVICE_TYPE_IDS = #{record.serviceTypeIds,jdbcType=VARCHAR}, SERVICE_TYPE_IDS = #{record.serviceTypeIDs,jdbcType=VARCHAR},
</if> </if>
<if test="record.industryIds != null"> <if test="record.industryIds != null">
INDUSTRY_IDS = #{record.industryIds,jdbcType=VARCHAR}, INDUSTRY_IDS = #{record.industryIds,jdbcType=VARCHAR},
...@@ -353,7 +353,7 @@ ...@@ -353,7 +353,7 @@
IS_CONSTANT = #{record.isConstant,jdbcType=DECIMAL}, IS_CONSTANT = #{record.isConstant,jdbcType=DECIMAL},
CALCULATE_STATUS = #{record.calculateStatus,jdbcType=DECIMAL}, CALCULATE_STATUS = #{record.calculateStatus,jdbcType=DECIMAL},
RESULT_TYPE = #{record.resultType,jdbcType=DECIMAL}, RESULT_TYPE = #{record.resultType,jdbcType=DECIMAL},
SERVICE_TYPE_IDS = #{record.serviceTypeIds,jdbcType=VARCHAR}, SERVICE_TYPE_IDS = #{record.serviceTypeIDs,jdbcType=VARCHAR},
INDUSTRY_IDS = #{record.industryIds,jdbcType=VARCHAR}, INDUSTRY_IDS = #{record.industryIds,jdbcType=VARCHAR},
DESCRIPTION = #{record.description,jdbcType=VARCHAR}, DESCRIPTION = #{record.description,jdbcType=VARCHAR},
CREATOR = #{record.creator,jdbcType=VARCHAR}, CREATOR = #{record.creator,jdbcType=VARCHAR},
...@@ -393,8 +393,8 @@ ...@@ -393,8 +393,8 @@
<if test="resultType != null"> <if test="resultType != null">
RESULT_TYPE = #{resultType,jdbcType=DECIMAL}, RESULT_TYPE = #{resultType,jdbcType=DECIMAL},
</if> </if>
<if test="serviceTypeIds != null"> <if test="serviceTypeIDs != null">
SERVICE_TYPE_IDS = #{serviceTypeIds,jdbcType=VARCHAR}, SERVICE_TYPE_IDS = #{serviceTypeIDs,jdbcType=VARCHAR},
</if> </if>
<if test="industryIds != null"> <if test="industryIds != null">
INDUSTRY_IDS = #{industryIds,jdbcType=VARCHAR}, INDUSTRY_IDS = #{industryIds,jdbcType=VARCHAR},
...@@ -433,7 +433,7 @@ ...@@ -433,7 +433,7 @@
IS_CONSTANT = #{isConstant,jdbcType=DECIMAL}, IS_CONSTANT = #{isConstant,jdbcType=DECIMAL},
CALCULATE_STATUS = #{calculateStatus,jdbcType=DECIMAL}, CALCULATE_STATUS = #{calculateStatus,jdbcType=DECIMAL},
RESULT_TYPE = #{resultType,jdbcType=DECIMAL}, RESULT_TYPE = #{resultType,jdbcType=DECIMAL},
SERVICE_TYPE_IDS = #{serviceTypeIds,jdbcType=VARCHAR}, SERVICE_TYPE_IDS = #{serviceTypeIDs,jdbcType=VARCHAR},
INDUSTRY_IDS = #{industryIds,jdbcType=VARCHAR}, INDUSTRY_IDS = #{industryIds,jdbcType=VARCHAR},
DESCRIPTION = #{description,jdbcType=VARCHAR}, DESCRIPTION = #{description,jdbcType=VARCHAR},
CREATOR = #{creator,jdbcType=VARCHAR}, CREATOR = #{creator,jdbcType=VARCHAR},
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
ON ON
org.INDUSTRY_ID = i.ID org.INDUSTRY_ID = i.ID
WHERE WHERE
org.INDUSTRY_ID_= #{industryID,jdbcType=VARCHAR} org.INDUSTRY_ID = #{industryID,jdbcType=VARCHAR}
AND ST.ID = #{serviceTypeID,jdbcType=VARCHAR} AND ST.ID = #{serviceTypeID,jdbcType=VARCHAR}
ORDER BY ORDER BY
m.CODE m.CODE
......
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