Commit daef7105 authored by kevin's avatar kevin

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

# Conflicts:
#	atms-web/src/main/webapp/app/vat/reduction/vat-caculate-data/vat-caculate-data.ctrl.js
parents 5aeb1221 b27e0d44
......@@ -168,10 +168,15 @@ public class ReportController {
}
@RequestMapping("loadAttachList")
public PageInfo<PwcReportAttach> loadAttachList(@RequestBody ReportAttachDto reportAttachDto){
public List<PwcReportAttach> loadAttachList(@RequestBody ReportAttachDto reportAttachDto){
System.out.println("sdsdfsd");
return reportService.loadAttachList(reportAttachDto);
}
@RequestMapping("deleteAttach")
public OperationResultDto deleteAttach(Long id){
return reportService.deleteAttach(id);
}
}
\ No newline at end of file
......@@ -22,7 +22,7 @@ public class WrapPeriodJobDto {
public static final String STEP_UPDATE_CONFIG = "UpdateConfig";
public static PeriodJob createReportGenJob(String projectId, Integer period, List<Template> templates) {
public static PeriodJob createReportGenJob(String projectId, Integer period, List<Template> templates,List<String> dataValidateArray) {
MyAsserts.assertNotEmpty(templates, Exceptions.NOT_FOUND_TEMPLATE_EXCEPTION);
PeriodJob job = new PeriodJob();
job.setCreateTime(new Date());
......@@ -33,10 +33,12 @@ public class WrapPeriodJobDto {
job.setCurrentStep(STEP_UPDATE_CONFIG);
setStatus(job,STEP_UPDATE_CONFIG,STATUS_BEGIN);
StringBuilder builder = new StringBuilder(STEP_UPDATE_CONFIG);
dataValidateArray.forEach(m ->{
builder.append(",").append(m);
});
templates.forEach(m -> {
builder.append(",").append(m.getCode());
});
job.setStepsCode(builder.toString());
return job;
}
......
......@@ -7,6 +7,7 @@ import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.FormulaEvaluator;
import org.apache.poi.ss.usermodel.Workbook;
......@@ -278,12 +279,11 @@ public class ReportServiceImpl extends BaseService {
}
private void updateConfig(String projectId, Integer period, Boolean isMergeManualData, List<Template> templates, PeriodJob job) {
setStatus(job, STATUS_BEGIN);
periodJobMapper.updateByPrimaryKey(job);
List<Long> exceptTemplateIds = templateMapper.getIdsForExceptTemplate();
clearPeriodData(projectId, period, exceptTemplateIds, isMergeManualData);
copyTemplateAndConfigFromAdmin(projectId, templates, period);
setStatus(job, STATUS_END);
periodJobMapper.updateByPrimaryKey(job);
}
private List<Template> getTemplatesByProjectId(String projectId) {
......@@ -494,14 +494,21 @@ public class ReportServiceImpl extends BaseService {
return operationResultDto;
}
List<Template> templates = getTemplatesByProjectId(projectId);
PeriodJob genJob = WrapPeriodJobDto.createReportGenJob(projectId, periodParam, templates);
List<String> dataValidateArray= new ArrayList<String>();
/*dataValidateArray.add("DA001");
dataValidateArray.add("DA002");
dataValidateArray.add("DA003");*/
dataValidateArray.add("DA004");
PeriodJob genJob = WrapPeriodJobDto.createReportGenJob(projectId, periodParam, templates, dataValidateArray);
periodJobMapper.insert(genJob);
new Thread(new Runnable() {
@Override
public void run() {
try {
//进行数据校验
DataValidation(periodParam, projectId);
DataValidation(periodParam, projectId,genJob );
updateConfig(projectId, periodParam, isMergeManualData, templates, genJob);
......@@ -542,31 +549,59 @@ public class ReportServiceImpl extends BaseService {
private AdjustmentTableMapper adjustmentTableMapper;
@Autowired
private ProfitLossStatementMapper profitLossStatementMapper;
@Autowired
private JournalEntryMapper journalEntryMapper;
/* @Autowired
private CitJour*/
//数据校验
private void DataValidation(Integer periodParam, String projectId) {
private void DataValidation(Integer periodParam, String projectId, PeriodJob genJob) {
setStatus(genJob,"DA004", STATUS_BEGIN);
//本期余额表
TrialBalanceExample trialBalanceExample = new TrialBalanceExample();
/* TrialBalanceExample trialBalanceExample = new TrialBalanceExample();
TrialBalanceExample.Criteria criteria = trialBalanceExample.createCriteria();
criteria.andProjectIdEqualTo(projectId);
criteria.andPeriodEqualTo(periodParam);
TrialBalance trialBalances = trialBalanceMapper.selectByExample(trialBalanceExample).get(0);
//调整表
AdjustmentTableExample adjustmentTableExample = new AdjustmentTableExample();
AdjustmentTableExample.Criteria criteria1 = adjustmentTableExample.createCriteria();
criteria1.andPeriodEqualTo(periodParam);
criteria1.andProjectIdEqualTo(projectId);
AdjustmentTable adjustmentTables = adjustmentTableMapper.selectByExample(adjustmentTableExample).get(0);
//本期利润表
ProfitLossStatementExample profitLossStatementExample = new ProfitLossStatementExample();
ProfitLossStatementExample.Criteria criteria2 = profitLossStatementExample.createCriteria();
criteria2.andProjectIdEqualTo(projectId);
criteria2.andPeriodEqualTo(periodParam);
ProfitLossStatement profitLossStatements = profitLossStatementMapper.selectByExample(profitLossStatementExample).get(0);
ProfitLossStatement profitLossStatements = profitLossStatementMapper.selectByExample(profitLossStatementExample).get(0);*/
//调整表
Map<String, Object> map1 = new HashedMap();
map1.put("projectId", projectId);
map1.put("period", periodParam);
if((periodParam+"").length() == 1){
map1.put("period", "0"+ periodParam);
}else{
map1.put("period", "" + periodParam);
}
List<AdjustmentTable> adjustmentTables = adjustmentTableMapper.selectBeforeAdjustData(map1);
Map<String, Object> map2 = new HashedMap();
map2.put("projectId", projectId);
if((periodParam+"").length() == 1){
map2.put("period", "0"+ periodParam);
}else{
map2.put("period", "" + periodParam);
}
List<JournalEntry> journalEntries = journalEntryMapper.selectNowAdjustData(map2);
for(int i =0; i< adjustmentTables.size(); i++){
for(int j =0; j< journalEntries.size(); j++){
if(journalEntries.get(j).getSegment3().equals(adjustmentTables.get(j).getSegment3()) &&
journalEntries.get(j).getSegment5().equals(adjustmentTables.get(j).getSegment5())&&
journalEntries.get(j).getSegment6().equals(adjustmentTables.get(j).getSegment6()) && journalEntries.get(j).getPeriodJrMinDr() != adjustmentTables.get(j).getPeriodDrMixCr() ){
setStatus(genJob,STATUS_ERROR );
}
}
}
setStatus(genJob, STATUS_END);
periodJobMapper.updateByPrimaryKey(genJob);
}
......@@ -1379,7 +1414,7 @@ public class ReportServiceImpl extends BaseService {
System.out.println("==>>>附件绑定成功");
}
public PageInfo loadAttachList(ReportAttachDto param) {
public List<PwcReportAttach> loadAttachList(ReportAttachDto param) {
PwcReportAttachExample example = new PwcReportAttachExample();
Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize());
PwcReportAttachExample.Criteria criteria = example.createCriteria();
......@@ -1387,8 +1422,24 @@ public class ReportServiceImpl extends BaseService {
criteria.andRowEqualTo(param.getActiveRow());
criteria.andTemplateIdEqualTo(param.getActiveTemplateId());
example.setOrderByClause("create_time DESC");
PageInfo<PwcReportAttach> pageInfo = new PageInfo<PwcReportAttach>(pwcReportAttachMapper.selectByExample(example));
pageInfo.setTotal(page.getTotal());
return pageInfo;
/* PageInfo<PwcReportAttach> pageInfo = new PageInfo<PwcReportAttach>();
pageInfo.setTotal(page.getTotal());*/
return pwcReportAttachMapper.selectByExample(example);
}
/**
* 删除附件
* @param id
* @return
*/
public OperationResultDto deleteAttach(Long id) {
PwcReportAttachExample example = new PwcReportAttachExample();
OperationResultDto<Object> objectOperationResultDto = new OperationResultDto<>();
example.createCriteria().andIdEqualTo(id);
int i = pwcReportAttachMapper.deleteByExample(example);
if(i>0){
objectOperationResultDto.setResultMsg("success");
}
return objectOperationResultDto;
}
}
......@@ -466,6 +466,14 @@ public class OrganizationDto {
this.pLevel = pLevel;
}
public Integer getPLevel() {
return pLevel;
}
public void setPLevel(Integer pLevel) {
this.pLevel = pLevel;
}
public String getRemark() {
return remark;
}
......
......@@ -787,6 +787,30 @@ public class Organization extends BaseEntity implements Serializable {
this.pLevel = pLevel;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.p_level
*
* @return the value of organization.p_level
*
* @mbg.generated
*/
public Integer getPLevel() {
return pLevel;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization.p_level
*
* @param pLevel the value for organization.p_level
*
* @mbg.generated
*/
public void setPLevel(Integer pLevel) {
this.pLevel = pLevel;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.create_time
......@@ -1699,6 +1723,8 @@ public class Organization extends BaseEntity implements Serializable {
this.logoutTime = logoutTime;
}
public Area getArea() {
return area;
}
......
package pwc.taxtech.atms.vat.dao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
......@@ -108,4 +110,5 @@ public interface AdjustmentTableMapper extends MyVatMapper {
int insertBatch(List<AdjustmentTable> rlits);
List<AdjustmentTable> selectBeforeAdjustData(Map<String,Object> map1);
}
\ No newline at end of file
package pwc.taxtech.atms.vat.dao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
......@@ -109,4 +111,5 @@ public interface JournalEntryMapper extends MyVatMapper {
List<JournalEntry> selectByCondition(@Param("jeCondition")JournalEntryCondition journalEntryCondition);
List<JournalEntry> selectNowAdjustData(Map<String,Object> map2);
}
\ No newline at end of file
......@@ -35,6 +35,8 @@ public class AdjustmentTable extends BaseEntity implements Serializable {
*/
private String organizationId;
/**
* Database Column Remarks:
* 项目ID
......@@ -288,6 +290,14 @@ public class AdjustmentTable extends BaseEntity implements Serializable {
*/
private BigDecimal periodDrBeq;
/**
* 本位币借方发生额-本位币贷方发生额
*/
private BigDecimal periodDrMixCr;
/**
* Database Column Remarks:
* 本位币本期贷方发生额
......@@ -496,6 +506,14 @@ public class AdjustmentTable extends BaseEntity implements Serializable {
return segment3;
}
public BigDecimal getPeriodDrMixCr() {
return periodDrMixCr;
}
public void setPeriodDrMixCr(BigDecimal periodDrMixCr) {
this.periodDrMixCr = periodDrMixCr;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column adjustment_table.segment3
......
......@@ -221,6 +221,15 @@ public class JournalEntry extends BaseEntity implements Serializable {
* @mbg.generated
*/
private String voucherNum;
private BigDecimal periodJrMinDr;
public BigDecimal getPeriodJrMinDr() {
return periodJrMinDr;
}
public void setPeriodJrMinDr(BigDecimal periodJrMinDr) {
this.periodJrMinDr = periodJrMinDr;
}
/**
* Database Column Remarks:
......
......@@ -791,6 +791,9 @@
<if test="parentId != null">
parent_id = #{parentId,jdbcType=VARCHAR},
</if>
<if test="parentId == null">
parent_id = NULL,
</if>
<if test="taxPayerNumber != null">
tax_payer_number = #{taxPayerNumber,jdbcType=VARCHAR},
</if>
......
......@@ -666,4 +666,35 @@
order by ${orderByClause}
</if>
</select>
<select id ="selectBeforeAdjustData" parameterType="java.util.Map" resultType="pwc.taxtech.atms.vat.entity.AdjustmentTable">
SELECT
max(CASE #{period}
WHEN 0 THEN
0
ELSE
(
t.period_dr_beq - t.period_cr_beq
) END )
periodDrMixCr,
max(t.period),
max(t.project_id),
t.segment3,
t.segment5,
t.segment6
FROM
adjustment_table t
WHERE
1 = 1
<if test="projectId!= '' and projectId != null">
and t.project_id = #{projectId}
</if>
<if test="period !=null and period != '' ">
AND substring(t.period, -2) = ${period}
</if>
group by t.segment3, t.segment5, t.segment6
</select>
</mapper>
\ No newline at end of file
......@@ -1299,4 +1299,25 @@
order by ${orderByClause}
</if>
</select>
<select id ="selectNowAdjustData" parameterType="java.util.Map" resultType="pwc.taxtech.atms.vat.entity.JournalEntry">
SELECT
max(t.entered_dr - t.entered_cr) as periodJrMinDr,
max(t.period),
max(t.project_id),
t.segment3,
t.segment5,
t.segment6
FROM
journal_entry t
where 1 =1 and t.description like '%调表不调账%'
<if test="projectId != null and projectId != '' ">
and t.project_id = #{projectId}
</if>
<if test="period!= null and period != '' ">
and substring(t.period, -2) = ${period}
</if>
group by t.segment3, t.segment5, t.segment6
</select>
</mapper>
\ No newline at end of file
......@@ -17,11 +17,6 @@
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>pwc.taxtech.atms</groupId>
<artifactId>atms-api</artifactId>
<version>0.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
......
......@@ -176,6 +176,8 @@ span.form-control-customer {
/* LOGIN */
body.login-body {
background: #999999 url('/app-resources/images/login_pic.jpg') no-repeat;
height: calc(100% - 16px);
background-size: cover;
color: #333;
overflow-y: auto;
}
......
......@@ -1835,11 +1835,12 @@
"DataImportLog": "Data Import Log",
"DataImportLogTitle": "Data Import Log",
"SelectedOrganization": "Selected Organization",
"SelectedDataType": "Selected DataType",
"extractFinancialData": "Extract Financial Data",
"ExtractFinancialDataTitle": "Extract Financial Data",
"extractInvoiceData": "Extract Invoice Data",
"ExtractInvoiceDataTitle": "Extract Invoice Data",
"TBInterCompany": "Inter-Company",
"~MustBeEndOneApp": "I Must be the End One, please!",
"dataValidate" : "数据校验"
"dataValidate" : "data Validate"
}
\ No newline at end of file
......@@ -361,10 +361,10 @@
"LandAppreciationTax": "土地增值税",
"LastMonth": "上月实际",
"LegalCode": "法人代码",
"LegalPersonName": "法定代表人/负责人名称",
"LegalPersonPhoneNumber": "法定代表人/负责人手机",
"LegalPersonLandlineNum": "法定代表人/负责人座机",
"LegalPersonEmailAddress": "法定代表人/负责人邮箱",
"LegalPersonName": "法定负责人名称",
"LegalPersonPhoneNumber": "法定负责人手机",
"LegalPersonLandlineNum": "法定负责人座机",
"LegalPersonEmailAddress": "法定负责人邮箱",
"RegFinancialOfficerName": "注册登记财务负责人姓名",
"RegFinancialOfficerPhoneNum": "注册登记财务负责人手机",
"RegFinancialOfficerLandlineNum": "注册登记财务负责人座机",
......
......@@ -319,7 +319,7 @@
"BranchLocalTaxPaymentRatio": "分支机构就地纳税比例",
"TotalAssets": "资产总额",
"NationalEconomicIndustry": "所属国民经济行业",
"EngageNationalProhibitIndustry": "从事国家限制或禁止行业",
"EngageNationalProhibitIndustry": "从事国家限制行业",
"ApplicableAccountingStandardsOrAccountingSystems": "适用会计准则或会计制度",
"GeneralCorporateFinancialStatementFormat": "采用一般企业财务报表格式",
"SmallMeagerProfit": "小型微利企业",
......
......@@ -2079,6 +2079,8 @@
"DataImportLog": "数据导入记录",
"DataImportLogTitle": "数据导入记录",
"SelectedOrganization": "选择机构",
"SelectedDataType": "选择数据类型",
"extractFinancialData": "财务数据抽取",
"ExtractFinancialDataTitle": "财务数据抽取",
......@@ -2104,6 +2106,6 @@
"RevenueGetOrgError": "获取机构信息失败",
"RevenueAddSuccess": "添加成功",
"RevenueUpdateSuccess": "更新成功",
"dataValidate" : "数据校验",
"~MustBeEndOneApp": "我必须是最后一个!"
}
\ No newline at end of file
......@@ -399,7 +399,8 @@
{
dataField: "createTime",
caption: $translate.instant('RevisionDate'),
allowHeaderFiltering:false
allowHeaderFiltering:false,
dataType: "date"
},
{
dataField: "comment",
......@@ -2011,7 +2012,7 @@
$scope.isCanOrganizationIsActiveBtn = true;
});
}
generalSelectCompanyText();
};
// 进入高级配置编辑状态
......@@ -2219,6 +2220,10 @@
$scope.selectCompanyExtra.completeRecordTotalInstitutions?"是":"否";
};
var generalSelectCompanyText = function(){
$scope.selectCompany.engageNationalProhibitIndustry = $scope.selectCompany.engageNationalProhibitIndustry?"是":"否";
};
// 添加或者编辑机构成功之后,刷新当前页面的数据
$scope.$watch('isOrgUpdate', function (newValue, oldValue) {
if (newValue) {
......@@ -2391,9 +2396,11 @@
//加载用户权限list
loadUserRoleList(org.id);
generalSelectCompanyText();
});
orgService.getSingleOrgExtra(org.id).success(function (data) {
if(data){
$scope.selectCompanyExtra = data;
......
......@@ -161,13 +161,13 @@
<div class="form-group" ng-show="!isInternational">
<div class="col-sm-12" ng-show="!isInternational">
<span class="">{{'Abbreviation' | translate}}:<span
title="{{selectCompany.abbreviation}}">{{selectCompany.abbreviation ? (selectCompany.foundationDate):'无'}}</span></span>
title="{{selectCompany.abbreviation}}">{{selectCompany.abbreviation ? (selectCompany.abbreviation):'无'}}</span></span>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<span class="">{{'FoundationDate' | translate}}:<span
title="{{selectCompany.foundationDate}}">{{selectCompany.foundationDate ? (selectCompany.foundationDate):'无'}}</span></span>
title="{{selectCompany.foundationDate}}">{{selectCompany.foundationDate | dateFormat:'YYYY-MM-DD'}}</span></span>
</div>
</div>
<div class="form-group" ng-show="!isInternational">
......@@ -185,7 +185,7 @@
<div class="form-group" >
<div class="col-sm-12">
<span class="control-label"> {{'RegistrationLocationEn' | translate}}:<span
title="{{selectCompany.RegistrationLocationEn}}">{{selectCompany.RegistrationLocationEn }}</span></span>
title="{{selectCompany.registrationLocationEn}}">{{selectCompany.registrationLocationEn }}</span></span>
</div>
</div>
<div class="form-group" ng-show="!isInternational">
......
......@@ -221,7 +221,6 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
$scope.isUpdate = true;
});
} else {
if (editModel.parentID && $scope.selectedOrganization.suborgList) {
if (editModel.parentID === editModel.id) {
......@@ -238,7 +237,6 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
return;
}
};
editModel.isActive = !editModel.isActive;
orgService.updateOrg(editModel).success(function (data) {
if (data && !data.result) {
......
......@@ -316,13 +316,12 @@
| translate}}:</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.foundationDate.$invalid && (orgControlForm.foundationDate.$dirty || orgControlForm.$submitted)}">
<div class="input-daterange startDatepicker" >
<div class="input-daterange startDatepicker">
<input type="text" id="foundationDate" class="input-sm form-control" name="foundationDate" ng-model="editOrgModel.foundationDate"
placeholder="{{resources.FoundationDate}}"/>
</div>
</div>
</div>
</div>
</div>
<div style="clear: both;"></div>
......
......@@ -32,13 +32,15 @@
$scope.importEnum = { Import: 0, CoverImport: 1, AddImport: 2 }; //导入方式
$scope.selectedPeriod = null;
$scope.showTotalSecondRow = false;
$scope.checkedCompanyList = [];
$scope.maxTitleLength = constant.maxButtonTitleLength;
$scope.companyList = [];
$scope.m = [];
$scope.checkedCompanyList = [];
$scope.checkedCompanyCodeList = [];
$scope.checkedCompanyTypeList = "";
$scope.importATExcelFile = apiInterceptor.webApiHostUrl + '/DataImport/ATExcelFile';
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth();
......@@ -737,7 +739,7 @@
}
var period = $scope.UploadPeriodTime;
var orgIds = JSON.stringify($scope.checkedCompanyList);
var orgIds = JSON.stringify($scope.checkedCompanyCodeList);
// var orgIds = $scope.checkedCompanyList;
Upload.upload({
......@@ -1196,20 +1198,24 @@
};
$scope.selectOne = function () {
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList , function (i) {
var index = $scope.checkedCompanyList.indexOf(i.id);
if(i.checked && index === -1) {
$scope.checkedCompanyList.push(i.id);
$scope.checkedCompanyList.push(i);
} else if (!i.checked && index !== -1){
$scope.checkedCompanyList.splice(index, 1);
}
});
if ($scope.companyList.length === $scope.checkedCompanyList.length) {
$scope.selectedAll = true;
} else {
$scope.selectedAll = false;
}
$scope.selectedAll = $scope.companyList.length === $scope.checkedCompanyList.length;
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name+";";
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
......@@ -1218,7 +1224,7 @@
$scope.selectedOne = true;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
$scope.checkedCompanyList.push(i.id);
$scope.checkedCompanyList.push(i);
i.checked = true;
})
}else {
......@@ -1228,6 +1234,12 @@
i.checked = false;
})
}
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name;
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
......
......@@ -15,7 +15,7 @@
<div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 250px;">
{{'PleaseSelect' | translate}}
{{checkedCompanyTypeList ? ((checkedCompanyTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span>
</button>
<ul class="dropdown-menu" style="width: 250px;" aria-labelledby="dropdownMenu1">
......@@ -29,7 +29,7 @@
<input type="checkbox" ng-model="i.checked" ng-change="selectOne()"
ng-checked="selectedOne"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px">
<span style="margin-left:5px;">{{i.name}}</span>
<span style="margin-left:5px;text-align: left;">{{i.name}}</span>
</div>
</li>
</ul>
......
......@@ -32,10 +32,12 @@
$scope.importEnum = { Import: 0, CoverImport: 1, AddImport: 2 }; //导入方式
$scope.selectedPeriod = null;
$scope.showTotalSecondRow = false;
$scope.maxTitleLength = constant.maxButtonTitleLength;
$scope.checkedCompanyList = [];
$scope.companyList = [];
$scope.m = [];
$scope.checkedCompanyList = [];
$scope.checkedCompanyCodeList = [];
$scope.checkedCompanyTypeList = "";
$scope.importCPRExcelFile = apiInterceptor.webApiHostUrl + '/DataImport/CPRExcelFile';
......@@ -735,7 +737,7 @@
}
var period = $scope.UploadPeriodTime;
var orgIds = JSON.stringify($scope.checkedCompanyList);
var orgIds = JSON.stringify($scope.checkedCompanyCodeList);
Upload.upload({
url: $scope.importCPRExcelFile,
......@@ -1242,20 +1244,24 @@
};
$scope.selectOne = function () {
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList , function (i) {
var index = $scope.checkedCompanyList.indexOf(i.id);
if(i.checked && index === -1) {
$scope.checkedCompanyList.push(i.id);
$scope.checkedCompanyList.push(i);
} else if (!i.checked && index !== -1){
$scope.checkedCompanyList.splice(index, 1);
}
});
if ($scope.companyList.length === $scope.checkedCompanyList.length) {
$scope.selectedAll = true;
} else {
$scope.selectedAll = false;
}
$scope.selectedAll = $scope.companyList.length === $scope.checkedCompanyList.length;
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name+";";
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
......@@ -1264,7 +1270,7 @@
$scope.selectedOne = true;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
$scope.checkedCompanyList.push(i.id);
$scope.checkedCompanyList.push(i);
i.checked = true;
})
}else {
......@@ -1274,6 +1280,12 @@
i.checked = false;
})
}
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name;
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
......
......@@ -15,7 +15,7 @@
<div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 250px;">
{{'PleaseSelect' | translate}}
{{checkedCompanyTypeList ? ((checkedCompanyTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span>
</button>
<ul class="dropdown-menu" style="width: 250px;" aria-labelledby="dropdownMenu1">
......@@ -29,7 +29,7 @@
<input type="checkbox" ng-model="i.checked" ng-change="selectOne()"
ng-checked="selectedOne"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px">
<span style="margin-left:5px;">{{i.name}}</span>
<span style="margin-left:5px;text-align: left;">{{i.name}}</span>
</div>
</li>
</ul>
......
......@@ -32,12 +32,14 @@
$scope.importEnum = { Import: 0, CoverImport: 1, AddImport: 2 }; //导入方式
$scope.selectedPeriod = null;
$scope.showTotalSecondRow = false;
$scope.maxTitleLength = constant.maxButtonTitleLength;
$scope.importIRExcelFile = apiInterceptor.webApiHostUrl + '/DataImport/IRExcelFile';
$scope.checkedCompanyList = [];
$scope.companyList = [];
$scope.m = [];
$scope.checkedCompanyList = [];
$scope.checkedCompanyCodeList = [];
$scope.checkedCompanyTypeList = "";
var date = new Date();
var year = date.getFullYear();
......@@ -215,7 +217,7 @@
}
var period = $scope.UploadPeriodTime;
var orgIds = JSON.stringify($scope.checkedCompanyList);
var orgIds = JSON.stringify($scope.checkedCompanyCodeList);
Upload.upload({
url: $scope.importIRExcelFile,
......@@ -509,20 +511,24 @@
};
$scope.selectOne = function () {
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList , function (i) {
var index = $scope.checkedCompanyList.indexOf(i.id);
if(i.checked && index === -1) {
$scope.checkedCompanyList.push(i.id);
$scope.checkedCompanyList.push(i);
} else if (!i.checked && index !== -1){
$scope.checkedCompanyList.splice(index, 1);
}
});
if ($scope.companyList.length === $scope.checkedCompanyList.length) {
$scope.selectedAll = true;
} else {
$scope.selectedAll = false;
}
$scope.selectedAll = $scope.companyList.length === $scope.checkedCompanyList.length;
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name+";";
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
......@@ -531,7 +537,7 @@
$scope.selectedOne = true;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
$scope.checkedCompanyList.push(i.id);
$scope.checkedCompanyList.push(i);
i.checked = true;
})
}else {
......@@ -541,6 +547,12 @@
i.checked = false;
})
}
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name;
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
......
......@@ -15,7 +15,7 @@
<div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 250px;">
{{'PleaseSelect' | translate}}
{{checkedCompanyTypeList ? ((checkedCompanyTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span>
</button>
<ul class="dropdown-menu" style="width: 250px;" aria-labelledby="dropdownMenu1">
......@@ -29,7 +29,7 @@
<input type="checkbox" ng-model="i.checked" ng-change="selectOne()"
ng-checked="selectedOne"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px">
<span style="margin-left:5px;">{{i.name}}</span>
<span style="margin-left:5px;text-align: left;float: left;">{{i.name}}</span>
</div>
</li>
</ul>
......
......@@ -32,10 +32,12 @@
$scope.importEnum = { Import: 0, CoverImport: 1, AddImport: 2 }; //导入方式
$scope.selectedPeriod = null;
$scope.showTotalSecondRow = false;
$scope.maxTitleLength = constant.maxButtonTitleLength;
$scope.checkedCompanyList = [];
$scope.companyList = [];
$scope.m = [];
$scope.checkedCompanyList = [];
$scope.checkedCompanyCodeList = [];
$scope.checkedCompanyTypeList = "";
$scope.importRLITExcelFile = apiInterceptor.webApiHostUrl + '/DataImport/RLITExcelFile';
......@@ -738,7 +740,7 @@
}
var period = $scope.UploadPeriodTime;
var orgIds = JSON.stringify($scope.checkedCompanyList);
var orgIds = JSON.stringify($scope.checkedCompanyCodeList);
Upload.upload({
url: $scope.importRLITExcelFile,
......@@ -1246,20 +1248,24 @@
};
$scope.selectOne = function () {
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList , function (i) {
var index = $scope.checkedCompanyList.indexOf(i.id);
if(i.checked && index === -1) {
$scope.checkedCompanyList.push(i.id);
$scope.checkedCompanyList.push(i);
} else if (!i.checked && index !== -1){
$scope.checkedCompanyList.splice(index, 1);
}
});
if ($scope.companyList.length === $scope.checkedCompanyList.length) {
$scope.selectedAll = true;
} else {
$scope.selectedAll = false;
}
$scope.selectedAll = $scope.companyList.length === $scope.checkedCompanyList.length;
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name+";";
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
......@@ -1268,7 +1274,7 @@
$scope.selectedOne = true;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
$scope.checkedCompanyList.push(i.id);
$scope.checkedCompanyList.push(i);
i.checked = true;
})
}else {
......@@ -1278,6 +1284,12 @@
i.checked = false;
})
}
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name;
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
......
......@@ -15,7 +15,7 @@
<div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 250px;">
{{'PleaseSelect' | translate}}
{{checkedCompanyTypeList ? ((checkedCompanyTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span>
</button>
<ul class="dropdown-menu" style="width: 250px;" aria-labelledby="dropdownMenu1">
......@@ -29,7 +29,7 @@
<input type="checkbox" ng-model="i.checked" ng-change="selectOne()"
ng-checked="selectedOne"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px">
<span style="margin-left:5px;">{{i.name}}</span>
<span style="margin-left:5px;text-align: left;">{{i.name}}</span>
</div>
</li>
</ul>
......
......@@ -2349,15 +2349,25 @@
{caption: '文件大小', dataField: "size"},
{caption: '备注信息', dataField: "remarks"},
{caption: '用户', dataField: "uploadUser"},
{caption: '操作时间', dataField: "createTime"}
{caption: '操作时间', dataField: "createTime"},
{caption : '操作' ,cellTemplate: function (container, options) {
try {
$('<button type="button" class="btn btn-in-grid" onclick = "deleteAttach('+options.data.id + ')"><i class="material-icons middle" style="vertical-align: text-bottom">delete</i>删除</button>&nbsp;&nbsp;')
.appendTo(container);
}
catch (e) {
$log.error(e);
}
} }
],
showBorders: true,
showBorders: true/*,
editing: {
mode: "cell",
allowAdding: false,
allowUpdating: false,
allowDeleting: true
},
allowDeleting: true,
}*/,
onInitialized : function(e){
$scope.dataGrid = e.component;
},
......@@ -2365,15 +2375,38 @@
dataSource: '_gridData'
}
};
window.deleteAttach = function(id, data){
swal({
title: "warning!",
text: "确定删除该附件?",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: $translate.instant('Yes'),
cancelButtonText: $translate.instant('No'),
closeOnConfirm: true,
closeOnCancel: true
},
function (tmpConfirm) {
if (tmpConfirm) {
vatReportService.deleteAttach(id).success(function(res){
if(res.resultMsg == "success"){
$scope.loadAttach();
}
});
}
});
}
//加载附件信息列表
$scope.loadAttach = function () {
$scope._gridData = [];
$scope.activeSheet.pageInfo = $scope.pagingOptions;
if ($scope.activeSheet.activeRow && $scope.activeSheet.activeCol && $scope.activeSheet.activeTemplateId) {
//获取附件信息
vatReportService.loadAttachList($scope.activeSheet).success(function (_data) {
var data = _data.list;
if (_data && data) {
vatReportService.loadAttachList($scope.activeSheet).success(function (data) {
if (data) {
var _xh = 0;
for(var i = 0; i< data.length; i++){
/* var _data1 = {
......@@ -2392,7 +2425,7 @@
}
$scope.xh = _xh;
//$scope._gridData = data;
$scope.pagingOptions.totalItems = _data.totalCount;
//$scope.pagingOptions.totalItems = data.totalCount;
}else {
SweetAlert.error($translate.instant('SystemError'));
}
......@@ -2411,7 +2444,6 @@
$scope.remarks = "";
$scope.fileNameWrapper = {};
$scope.fileName = "";
$scope.$apply();
$('#addCellAttachmentContainer').modal('show');
}
......
......@@ -286,10 +286,10 @@
style="height: 450px;">
</div>
<div class="page-footer">
<!-- <div class="page-footer">
<ack-pagination page-options="pagingOptions"
refresh-table="loadAttach()"></ack-pagination>
</div>
</div>-->
</div>
</div>
......
......@@ -1444,4 +1444,6 @@ constant.fileTypeList = [
/************************************************cit constant end*************************************************/
\ No newline at end of file
......@@ -197,7 +197,11 @@
},
loadAttachList : function(activeSheet){
return $http.post('/Report/loadAttachList' , activeSheet, apiConfig.createVat());
}
},
deleteAttach : function(id){
var config = { isBusyRequest: true };
return $http.get('/Report/deleteAttach?id=' + id, apiConfig.create(config));
}
};
......
......@@ -14,11 +14,11 @@
<span class="text-bold" translate="SelectedOrganization"></span>:
<div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 250px;">
{{'PleaseSelect' | translate}}
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 220px;">
{{checkedCompanyTypeList ? ((checkedCompanyTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span>
</button>
<ul class="dropdown-menu" style="width: 250px;" aria-labelledby="dropdownMenu1">
<ul class="dropdown-menu" style="width: 220px;" aria-labelledby="dropdownMenu1">
<li><input type="checkbox" ng-model="selectedAll" ng-change="selectAll()"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px" checked>
<span style="margin-left:5px;float: left;">全选</span></li>
......@@ -36,19 +36,19 @@
</div>
<span class="text-bold" translate="InvoiceQJ"></span>:
<div class="period-picker" style="margin-left:10px">
<input type="text" id="periodDatepicker" class="datepicker imp-subheader" style="width:120px;"
<input type="text" id="periodDatepicker" class="datepicker imp-subheader" style="width:80px;"
readonly="readonly" ng-model="UploadPeriodTime"/>
<i class="fa fa-calendar imp-subheader red-color" style="width:20px;"></i>
</div>
<span class="text-bold" translate="SelectedDataType"></span>:
<div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 250px;">
{{'PleaseSelect' | translate}}
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 180px;">
{{checkedFileTypeList ? ((checkedFileTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span>
</button>
<ul class="dropdown-menu" style="width: 250px;" aria-labelledby="dropdownMenu2">
<li><input type="checkbox" ng-model="selectedAllFileType" ng-change="selectAllFileType()"
<ul class="dropdown-menu" style="width: 180px;" aria-labelledby="dropdownMenu2">
<li><input type="checkbox" ng-model="selectedAllFileType" ng-change="selectAllFile()"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px" checked>
<span style="margin-left:5px;float: left;">全选</span></li>
<li role="separator" class="divider" style="height: 1px;margin: 9px 0;
......@@ -56,7 +56,7 @@
<li ng-repeat="i in fileTypeList">
<div class="checkbox-custom checkbox-default">
<input type="checkbox" ng-model="i.checked" ng-change="selectOneFileType()"
ng-checked="selectedOneFileType"
ng-checked="selectedOneFile"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px">
<span style="margin-left:5px;">{{i.type}}</span>
</div>
......@@ -67,7 +67,7 @@
<button type="button" atms-permission permission-control-type="ngIf" permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
class="btn btn-vat-primary" style="float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;"
translate="ImportBtn"
ng-click="doUpload(importEnum.ApiImport)"></button>
ng-click="callApi()"></button>
</div>
</div>
......
......@@ -176,7 +176,7 @@
}
.period-picker {
width: 150px;
width: 110px;
border: 1px solid #c7c5c0;
display: inline-block;
line-height: 20px;
......
<div class="extract-invoice-data">
<!--标题-->
<div class="nav-wrapper">
<div class="nav-header" translate="ExtractFinancialDataTitle"></div>
<div class="nav-header" translate="ExtractInvoiceDataTitle"></div>
<div class="alert alert-warning" style="width:400px;margin-bottom:5px;" ng-show="ImportErrorTab" ng-click="toggleErrorTab()">
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>{{errorMsg}}
</div>
......
......@@ -7,26 +7,26 @@
$scope.revenueGridOptions = $.extend(true, {}, dxDataGridService.BASIC_GRID_OPTIONS, {
columns: [
// {dataField: 'serialNo', caption: $translate.instant('RevenueColSerialNo'), fixed: true, allowHeaderFiltering: true},
{dataField: 'name', caption: $translate.instant('RevenueColName'), fixed: true, allowHeaderFiltering: true},
{dataField: 'orgId', caption: $translate.instant('RevenueColOrg'), fixed: true, allowHeaderFiltering: true,
{dataField: 'name', caption: $translate.instant('RevenueColName'), fixed: true, allowHeaderFiltering: true, minWidth: '300px'},
{dataField: 'orgId', caption: $translate.instant('RevenueColOrg'), fixed: true, allowHeaderFiltering: true, minWidth: '300px',
calculateCellValue: function(data) {
return _.find($scope.selectOrgList, function(o) {
return o.id === data.orgId;
}).name;
}},
//todo 组装accountName
{dataField: 'accountTypeStr', caption: $translate.instant('RevenueColAccountName'), fixed: true, allowHeaderFiltering: true},
{dataField: 'taxRate', caption: $translate.instant('RevenueColTaxRate'), fixed: true, allowHeaderFiltering: true,
{dataField: 'accountTypeStr', caption: $translate.instant('RevenueColAccountName'), fixed: true, allowHeaderFiltering: true, width: '100px'},
{dataField: 'taxRate', caption: $translate.instant('RevenueColTaxRate'), fixed: true, allowHeaderFiltering: true, width: '50px',
calculateCellValue: function(data) {
return (data.taxRate * 100) + '%';
}},
{dataField: 'taxBaseStr', caption: $translate.instant('RevenueColTaxBase'), fixed: true, allowHeaderFiltering: true},
{dataField: 'revenueTypeStr', caption: $translate.instant('RevenueColType'), fixed: true, allowHeaderFiltering: true},
{dataField: 'taxTypeStr', caption: $translate.instant('RevenueColTaxType'), fixed: true, allowHeaderFiltering: true},
{dataField: 'statusStr', caption: $translate.instant('RevenueColStatus'), fixed: true, allowHeaderFiltering: true},
{dataField: 'startDate', caption: $translate.instant('RevenueColEnable'), fixed: true, allowHeaderFiltering: true},
{dataField: 'endDate', caption: $translate.instant('RevenueColDisable'), fixed: true, allowHeaderFiltering: true},
{dataField: '', caption: $translate.instant('RevenueColEdit'), fixed: true,
{dataField: 'taxBaseStr', caption: $translate.instant('RevenueColTaxBase'), fixed: true, allowHeaderFiltering: true, width: '120px'},
{dataField: 'revenueTypeStr', caption: $translate.instant('RevenueColType'), fixed: true, allowHeaderFiltering: true, minWidth: '250px'},
{dataField: 'taxTypeStr', caption: $translate.instant('RevenueColTaxType'), fixed: true, allowHeaderFiltering: true, width: '120px'},
{dataField: 'statusStr', caption: $translate.instant('RevenueColStatus'), fixed: true, allowHeaderFiltering: true, width: '50px'},
{dataField: 'startDate', caption: $translate.instant('RevenueColEnable'), fixed: true, allowHeaderFiltering: true, width: '120px'},
{dataField: 'endDate', caption: $translate.instant('RevenueColDisable'), fixed: true, allowHeaderFiltering: true, width: '120px'},
{dataField: '', caption: $translate.instant('RevenueColEdit'), fixed: true,width: '80px', alignment: 'center',
cellTemplate: function (container, options) {
try {
$('<i class="fa fa-pencil-square-o" style="cursor: pointer"></i>&nbsp;&nbsp;')
......@@ -300,6 +300,7 @@
acceptCustomValue: false,
openOnFieldClick: true,
displayFormat: 'yyyy-MM',
maxZoomLevel: "year",
dateSerializationFormat: 'yyyy-MM',
bindingOptions: {
value: 'formParam.startDate'
......@@ -311,6 +312,7 @@
acceptCustomValue: false,
openOnFieldClick: true,
displayFormat: 'yyyy-MM',
maxZoomLevel: "year",
dateSerializationFormat: 'yyyy-MM',
bindingOptions: {
value: 'formParam.endDate'
......
vatModule.controller('vatCaculateDataController', ['$scope', '$log', '$timeout','$interval', '$q', '$translate', 'loginContext',
vatModule.controller('vatCaculateDataController', ['$scope', '$log', '$timeout','$interval', '$q', '$translate', 'loginContext',
'apiInterceptor', 'Upload', 'dataImportService', 'SweetAlert', 'vatReductionService', 'vatSessionService', 'uiGridConstants',
'enums', 'modelConfigurationService', 'vatReportService', 'vatCommonService', 'BSPLService', 'vatOperationLogService',
'vatWorkflowService',
......@@ -203,14 +203,22 @@
// result.push({ name: $translate.instant('ProcessData'), items: [new task('GenerateStdTb', 'unstarted')] });
// result.push({ name: $translate.instant('ProcessData'), items: [new task('CompareUnbilled', 'unstarted')] });
// result.push({ name: $translate.instant('ProcessData'), items: [new task('CaculateUnbilled', 'unstarted'), new task('UpdateReportConfig', 'unstarted'), new task('GenerateFinanceReport', 'unstarted')] });
/* var dataValidateItems = [/!*"本期余额表累计数+导入调整表是否等于本期利润表累计数", "本期余额表本期数+导入调整表是否等于本期利润表本期数", "上期利润表本年累进+本期利润表本期数是否等于本期利润表本年累计",*!/ ""];
var dataValidateCode = [/!*'DA001', 'DA002', 'DA003',*!/ ''];*/
//数据配置
result.push({ name: $translate.instant('ProcessData'), items: [new task('UpdateReportConfig', 'unstarted')] });
result[result.length - 1].items.forEach(function (t) { t.seqNo = result.length - 1 });
var dataValidateItems = ["本期余额表累计数+导入调整表是否等于本期利润表累计数", "本期余额表本期数+导入调整表是否等于本期利润表本期数", "上期利润表本年累进+本期利润表本期数是否等于本期利润表本年累计", "上期导入调整表是否等于本期调整日记账发生额(摘要中包含“调表不调账”关键字)"];
//数据校验
var reItem = [];
for(var i = 0; i< dataValidateItems.length; i++){///添加数据数据校验选项
reItem.push(new task(dataValidateItems[i], "unstarted"));
}
result.push({ name: $translate.instant('dataValidate'), items : reItem});
reItem.push( new task(Math.ceil(Math.random()*1000000).toString(), "unstarted","上期导入调整表是否等于本期调整日记账发生额(摘要中包含“调表不调账”关键字)", "DA004"));
result.push({ name: $translate.instant('dataValidate'),isReportTask: true, items : reItem});
fixedRef = [];
if (report && report.data && report.data.data) {
result.push({
......@@ -281,14 +289,12 @@
// });
}
function doStartCaculate2(isMergeManualDataSource) {
vatReportService.generateAll(vatSessionService.project.id, isMergeManualDataSource, vatSessionService.month, vatSessionService.logUser.id ? vatSessionService.logUser.id : "").success(function (data) {
$scope.readonly = true;
if(data && data.result)
alert(JSON.stringify(data.data));
updateTasksStatus(data.data);
updateTasksStatus(data.data);
if(data.data.jobStatus=='Begin'||data.data.jobStatus=='Running'){
if(!$scope.timer)
$scope.timer= $interval(function(){
......@@ -562,7 +568,8 @@
};
var updateTasksStatus = function(job){
var items = $scope.tasks[1].items;
var items = $scope.tasks;
var tasks = JSON.parse(job.status)
if(job.jobStatus == 'End'){
items.forEach(function(item,index){
item.status = 'completed';
......@@ -571,14 +578,13 @@
$scope.tasks[0].items[0].status = 'completed';
$scope.tasks[0].items[0].text= $translate.instant('completed');
if($scope.timer){
$interval.cancel($scope.timer);
vatCommonService.setProjectStatus(vatSessionService.project.id, vatSessionService.month, constant.ProjectStatusEnum.Generated
, constant.DictionaryDictKey.WFDataProcess, enums.FinishStatusEnum.Finished);
}
}else if(job.jobStatus=='Running'|| job.jobStatus=='Error'){
var tasks = JSON.parse(job.status)
var updateConfig = tasks[0];
if(updateConfig.status == 'Error'){
......@@ -589,7 +595,7 @@
$scope.tasks[0].items[0].status = 'processing';
}
$scope.tasks[0].items[0].text= $translate.instant($scope.tasks[0].items[0].status);
items.forEach(function(item,index){
/* items.forEach(function(item,index){
tasks.forEach(function(task){
if(task.code==item.code){
if(task.status == 'Error'){
......@@ -602,17 +608,32 @@
item.text = $translate.instant(item.status);
}
})
});
});*/
if(job.jobStatus == 'Error'){
if($scope.timer)$interval.cancel($scope.timer);
}
}
items.forEach(function(item,index){
item.items.forEach(function (_task, index) {
tasks.forEach(function(task){
if(task.code==_task.code){
if(task.status == 'Error'){
_task.status = 'error';
}else if(task.status == 'End'){
_task.status = 'completed';
}else if(task.status == 'Begin'){
_task.status = 'processing';
}
_task.text = $translate.instant(_task.status);
}
})
})
});
}
var getInitTaskStatus = function(){
vatReportService.getRunningJob(vatSessionService.project.id,vatSessionService.month).then(function (result) {
debugger;
if(result.data && result.status == 200){
updateTasksStatus(result.data);
if(result.data.jobStatus=='Begin'||result.data.jobStatus=='Running'){
......@@ -627,7 +648,6 @@
$interval.cancel($scope.timer);
}
});
},1000);
}
}else{
......
......@@ -29,11 +29,11 @@
<script type="text/ng-template" id="group_template">
<div>
<div ng-if="group.items.length > 1" class="task" style="margin-bottom:5px;padding-left:20px;">{{group.name}}</div>
<ul ng-if="group.items.length > 1" ng-repeat="task in group.items track by $index">
<div ng-if="group.items.length >= 1" class="task" style="margin-bottom:5px;padding-left:20px;">{{group.name}}</div>
<ul ng-if="group.items.length >= 1" ng-repeat="task in group.items track by $index">
<li ng-include="'task_template'" />
</ul>
<div ng-if="group.items.length == 1" ng-repeat="task in group.items track by $index" style="height:42px;" ng-include="'task_template'" />
<!-- <div ng-if="group.items.length == 1" ng-repeat="task in group.items track by $index" style="height:42px;" ng-include="'task_template'" />-->
</script>
<script type="text/ng-template" id="task_template">
......
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