Commit 4e6aea16 authored by eddie.woo's avatar eddie.woo

modify

parent f5d391e6
......@@ -304,7 +304,7 @@ public class EnterpriseAccountManagerController {
} catch (Exception e) {
logger.error("mapAccount error.", e);
}
return OperationResultDto.error("动对应失败");
return OperationResultDto.error("动对应失败");
}
@ResponseBody
......
......@@ -5,31 +5,31 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
public class StandardAccountDto {
public String id;
public String code;
public String name;
public String parentCode;
public String fullName;
public int number;
public Boolean expanded;
public Integer acctProp;
public Integer subProp;
public Integer acctLevel;
public int direction;
public Boolean isLeaf;
public int ruleType;
public Boolean isActive;
public String englishName;
private String id;
private String code;
private String name;
private String parentCode;
private String fullName;
private int number;
private Boolean expanded;
private Integer acctProp;
private Integer subProp;
private Integer acctLevel;
private int direction;
private Boolean isLeaf;
private int ruleType;
private Boolean isActive;
private String englishName;
@JsonProperty("industryID")
public String industryId;
public String title;
public String etsName;
private String industryId;
private String title;
private String etsName;
public String etsCode;
private String etsCode;
public List<StandardAccountDto> children;
private List<StandardAccountDto> children;
public String treeLevel;
private String treeLevel;
/// <summary>
/// 父级科目名称
......@@ -37,7 +37,7 @@ public class StandardAccountDto {
/// <value>
/// The name of the parent.
/// </value>
public String parentName;
private String parentName;
/// <summary>
/// 父级科目全名
......@@ -45,7 +45,7 @@ public class StandardAccountDto {
/// <value>
/// The full name of the parent.
/// </value>
public String parentFullName;
private String parentFullName;
public String getId() {
return id;
......@@ -135,12 +135,12 @@ public class StandardAccountDto {
this.direction = direction;
}
public Boolean getLeaf() {
return isLeaf;
public Boolean getIsLeaf() {
return this.isLeaf;
}
public void setLeaf(Boolean leaf) {
isLeaf = leaf;
public void setIsLeaf(Boolean leaf) {
this.isLeaf = leaf;
}
public int getRuleType() {
......@@ -151,12 +151,12 @@ public class StandardAccountDto {
this.ruleType = ruleType;
}
public Boolean getActive() {
return isActive;
public Boolean getIsActive() {
return this.isActive;
}
public void setActive(Boolean active) {
isActive = active;
public void setIsActive(Boolean active) {
this.isActive = active;
}
public String getEnglishName() {
......@@ -230,4 +230,5 @@ public class StandardAccountDto {
public void setParentFullName(String parentFullName) {
this.parentFullName = parentFullName;
}
}
......@@ -726,7 +726,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService {
}).collect(Collectors.toList());
//获取叶子节点标准科目集合
List<StandardAccountDto> stdAccountLeafList = stdAccountDtoList.stream().filter(x -> x.isLeaf).collect(Collectors.toList());
List<StandardAccountDto> stdAccountLeafList = stdAccountDtoList.stream().filter(StandardAccountDto::getIsLeaf).collect(Collectors.toList());
List<AccountMappingManual> allAccountMappingManualList = mappingManualDao.getAll().get();
accountSet = enterpriseAccountSetMapper.selectByPrimaryKey(accountSetId);
......@@ -1354,7 +1354,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService {
/**
* Validates if there is any duplication account code in the list
*
* @param list
* @param epAccountList
* @return ValidateInfoDto
*/
private ValidateInfoDto getRepeatValidate(List<EnterpriseAccountDto> epAccountList) {
......@@ -1919,8 +1919,8 @@ public class EnterpriseAccountServiceImpl extends AbstractService {
/**
* Sets the acct level.
*
* @param current - The current
* @param validateList - The validate list
* @param currentDto - The current
* @param validateDtoList - The validate list
*/
private void setAcctLevel(EnterpriseAccountDto currentDto, List<EnterpriseAccountDto> validateDtoList) {
......@@ -1952,4 +1952,9 @@ public class EnterpriseAccountServiceImpl extends AbstractService {
}
}
public OperationResultDto hasMappedCheck(String[] orgIds, String orgSetId) {
//TODO 检查Mapping关系
return null;
}
}
......@@ -1878,8 +1878,9 @@ public class OrganizationServiceImpl {
}
orgDto.setId(CommonUtils.getUUID());
orgDto.setCreateTime(new Date());
orgDto.setUpdateTime(new Date());
Date now = new Date();
orgDto.setCreateTime(now);
orgDto.setUpdateTime(now);
OrganizationValidateDto vailOrgDto = new OrganizationValidateDto();
vailOrgDto.setId(orgDto.getId());
......@@ -1944,7 +1945,6 @@ public class OrganizationServiceImpl {
Integer newTaxPayerType = (templateGrp != null && templateGrp.getPayTaxType() != null)
? templateGrp.getPayTaxType() - 1
: VatTaxPayerTypeEnum.General.value();
Date now = new Date();
TaxPayerReportRule newRule = new TaxPayerReportRule();
newRule.setId(distributedIdService.nextId());
newRule.setIsDefault(false);
......
......@@ -9,14 +9,10 @@ import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.constant.ActiveStatus;
import pwc.taxtech.atms.constant.StandAccountConstant;
import pwc.taxtech.atms.constant.enums.StdAccountEnum;
import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.dao.StandardAccountDao;
import pwc.taxtech.atms.dao.StandardAccountMapper;
import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dto.stdaccount.StandardAccountDto;
import pwc.taxtech.atms.dto.stdaccount.StdAccountFancyTreeDto;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.StandardAccount;
import pwc.taxtech.atms.entity.StandardAccountExample;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.exception.ServiceException;
import java.util.*;
......@@ -32,6 +28,10 @@ public class StdAccountServiceImpl extends BaseService {
private OrganizationMapper organizationMapper;
@Autowired
private StandardAccountDao standardAccountDao;
@Autowired
private AccountMappingMapper accountMappingMapper;
@Autowired
private EnterpriseAccountMapper enterpriseAccountMapper;
public List<StdAccountFancyTreeDto> getStdAccountHierarchy(String orgId) throws ServiceException {
List<StdAccountFancyTreeDto> resultList;
......@@ -85,16 +85,35 @@ public class StdAccountServiceImpl extends BaseService {
if (organization == null) {
return Collections.emptyList();
}
String industryId = organization.getIndustryId();
String industryId = StringUtils.defaultString(organization.getIndustryId(), "0");
AccountMappingExample example = new AccountMappingExample();
example.createCriteria().andOrganizationIdEqualTo(orgId).andEnterpriseAccountSetIdEqualTo(accountSetId).andIndustryIdEqualTo(industryId);
List<AccountMapping> mappingList = accountMappingMapper.selectByExample(example);
List<StandardAccount> stdAccounts = standardAccountDao.getStdAccount(StdAccountEnum.RuleType.TWO, industryId, true, true);
if (CollectionUtils.isEmpty(stdAccounts)) {
stdAccounts = standardAccountDao.getStdAccount(StdAccountEnum.RuleType.TWO, "0", true, true);
if (CollectionUtils.isEmpty(mappingList)) {
return Collections.emptyList();
}
StandardAccountExample stdExample = new StandardAccountExample();
stdExample.createCriteria().andCodeIn(mappingList.stream().map(AccountMapping::getStandardAccountCode).collect(Collectors.toList()));
List<StandardAccount> stdList = standardAccountMapper.selectByExample(stdExample);
return Collections.emptyList();
EnterpriseAccountExample etExample = new EnterpriseAccountExample();
etExample.createCriteria().andEnterpriseAccountSetIdEqualTo(accountSetId).andCodeIn(mappingList.stream()
.map(AccountMapping::getEnterpriseAccountCode).collect(Collectors.toList()));
List<EnterpriseAccount> etList = enterpriseAccountMapper.selectByExample(etExample);
Map<String, AccountMapping> mappingMap = mappingList.stream().collect(Collectors.toMap(AccountMapping::getStandardAccountCode, a -> a, (k1, k2) -> k1));
Map<String, EnterpriseAccount> etMappingMap = etList.stream().collect(Collectors.toMap(EnterpriseAccount::getCode, a -> a, (k1, k2) -> k1));
return stdList.stream().map(o -> {
StandardAccountDto dto = new StandardAccountDto();
beanUtil.copyProperties(o, dto);
String etsCode = mappingMap.get(o.getCode()).getEnterpriseAccountCode();
dto.setEtsCode(etsCode);
dto.setEtsName(etMappingMap.get(etsCode).getName());
return dto;
}).collect(Collectors.toList());
}
public List<StandardAccountDto> getStdAccountByIndustry(String industryId) {
......
......@@ -42,7 +42,7 @@
<div id="enterprizeAccount" class="tab-pane active">
<div class="auto-mapping-div">
<!--自动对应-->
<button class="btn btn-primary " ng-disabled="!selectedOrg.isHaveEditPermission" ng-click="autoMap()" translate="EnterpriceAccountMapping"></button>
<!--<button class="btn btn-primary " ng-disabled="!selectedOrg.isHaveEditPermission" ng-click="autoMap()" translate="EnterpriceAccountMapping"></button>-->
<!--取消对应-->
<button class="btn btn-secondary " ng-disabled="!selectedOrg.isHaveEditPermission" ng-click="ClearMap()" translate="ClearMapping"></button>
<!--复制对应关系-->
......
......@@ -80,9 +80,10 @@
if (flag == 'detail') {
if (previousEspID === currentEspID && currentOrgID === previousOrgID) {
return;
}
//修改之后无法查看,直接查接口
// if (previousEspID === currentEspID && currentOrgID === previousOrgID) {
// return;
// }
scope.InitStdSubjectLinkEtsSubject();
......
......@@ -128,7 +128,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
//}
//客户代码是固定死的
$scope.editOrgModel.clientCode = $scope.projectClientName;
// $scope.editOrgModel.clientCode = $scope.projectClientName;
var editModel = $scope.editOrgModel;
//判断新增或修改
......
......@@ -44,26 +44,15 @@
</div>
</div>
<!--地区-->
<!--客户代码-->
<div class="form-group">
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'AdministrativeRegion' | translate}}:</label>
<div class="col-sm-9 row">
<div class="col-sm-6" style="padding-left: 0px;" ng-class="{'has-error':orgControlForm.selectProvince.$invalid && (orgControlForm.selectProvince.$dirty || orgControlForm.$submitted)}">
<select class="form-control" name="selectProvince" style="width: 120px; " ng-change="populateCities()" ng-model="selectProvince" ng-options="x.regionName for x in ProvinceList" required>
<option value="">{{pleaseSelect}}</option>
</select>
<p ng-show="orgControlForm.selectProvince.$error.required && (orgControlForm.selectProvince.$dirty || orgControlForm.$submitted)" class="has-error label" style="margin-left: -16px">{{resources.OrganizationMsgProvinceRequired}}</p>
</div>
<div class="col-sm-6" style="padding-left: 2px;" ng-class="{'has-error':orgControlForm.selectCity.$invalid && (orgControlForm.selectCity.$dirty || orgControlForm.$submitted)}">
<select class="form-control" name="selectCity" id="selectCity" style="width: 120px; " ng-model="selectRegionID" required>
<option value="">{{pleaseSelect}}</option>
<option ng-repeat="x in CityList" value="{{x.regionID}}" title="{{x.regionName}}">{{x.regionName | limitString:10}}</option>
</select>
<p ng-show="orgControlForm.selectCity.$error.required && (orgControlForm.selectCity.$dirty || orgControlForm.$submitted)" class="has-error label" style="margin-left: 30px">{{resources.OrganizationMsgCityRequired}}</p>
</div>
<label for="clientCode" class="col-sm-3 control-label"><span class="must-input">*</span>{{'OrganizationClientCode' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.clientCode.$invalid && (orgControlForm.clientCode.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="clientCode" id="clientCode" ng-model="editOrgModel.clientCode" placeholder="{{resources.OrganizationClientCode}}" maxlength="50" required>
<p ng-show="orgControlForm.clientCode.$error.required && (orgControlForm.clientCode.$dirty || orgControlForm.$submitted)" class="has-error label">{{resources.OrganizationMsgClientCodeRequired}}</p>
</div>
</div>
</div>
<div class="quarter-div rightUp">
......@@ -78,14 +67,7 @@
<p ng-show="orgControlForm.code.$error.codeUnique" class="has-error label">{{resources.OrganizationMsgCodeUnique}}</p>
</div>
</div>
<!--客户代码-->
<!--<div class="form-group">
<label for="clientCode" class="col-sm-3 control-label"><span class="must-input">*</span>{{'OrganizationClientCode' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.clientCode.$invalid && (orgControlForm.clientCode.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="clientCode" ng-disabled="true" id="clientCode" ng-model="editOrgModel.clientCode" placeholder="{{resources.OrganizationClientCode}}" maxlength="50" required>
<p ng-show="orgControlForm.clientCode.$error.required && (orgControlForm.clientCode.$dirty || orgControlForm.$submitted)" class="has-error label">{{resources.OrganizationMsgClientCodeRequired}}</p>
</div>
</div>-->
<!--纳税人识别号-->
<div class="form-group">
<label for="taxPayerNumber" class="col-sm-3 control-label">{{'TaxpayerIdentificationNumber' | translate}}:</label>
......@@ -147,7 +129,25 @@
</div>
</div>
<div class="quarter-div rightDown">
<!--地区-->
<div class="form-group">
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'AdministrativeRegion' | translate}}:</label>
<div class="col-sm-9 row">
<div class="col-sm-6" style="padding-left: 0px;" ng-class="{'has-error':orgControlForm.selectProvince.$invalid && (orgControlForm.selectProvince.$dirty || orgControlForm.$submitted)}">
<select class="form-control" name="selectProvince" style="width: 120px; " ng-change="populateCities()" ng-model="selectProvince" ng-options="x.regionName for x in ProvinceList" required>
<option value="">{{pleaseSelect}}</option>
</select>
<p ng-show="orgControlForm.selectProvince.$error.required && (orgControlForm.selectProvince.$dirty || orgControlForm.$submitted)" class="has-error label" style="margin-left: -16px">{{resources.OrganizationMsgProvinceRequired}}</p>
</div>
<div class="col-sm-6" style="padding-left: 2px;" ng-class="{'has-error':orgControlForm.selectCity.$invalid && (orgControlForm.selectCity.$dirty || orgControlForm.$submitted)}">
<select class="form-control" name="selectCity" id="selectCity" style="width: 120px; " ng-model="selectRegionID" required>
<option value="">{{pleaseSelect}}</option>
<option ng-repeat="x in CityList" value="{{x.regionID}}" title="{{x.regionName}}">{{x.regionName | limitString:10}}</option>
</select>
<p ng-show="orgControlForm.selectCity.$error.required && (orgControlForm.selectCity.$dirty || orgControlForm.$submitted)" class="has-error label" style="margin-left: 30px">{{resources.OrganizationMsgCityRequired}}</p>
</div>
</div>
</div>
<!--层级-->
<div class="form-group">
<label for="selectLevelType" class="col-sm-3 control-label"><span class="must-input">*</span>{{'OrganizationLevelType' | translate}}:</label>
......
......@@ -21,7 +21,7 @@ webservices.factory('stdAccountService', ['$http', 'apiConfig', function ($http,
return $http.get('/stdAccount/getsingle?id=' + id, apiConfig.create());
},
getStdAccountLinkEtsAccount: function (orgID, accountSetID) {
return $http.get('/stdAccount/getStdAccountLinkEtsAccount?orgID=' + orgID + '&accountSetID=' + accountSetID, apiConfig.create());
return $http.get('/stdAccount/getStdAccountLinkEtsAccount?orgId=' + orgID + '&accountSetId=' + accountSetID, apiConfig.create());
},
getStdAccountByOrgID: function (orgID) {
return $http.get('/stdAccount/getStdAccountByOrgID?orgID=' + orgID , apiConfig.create());
......
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