Commit f3001234 authored by kevin's avatar kevin

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

parents bc0ba2ea a0f4d5d8
...@@ -12,7 +12,31 @@ public class ReportFileUploadEnum { ...@@ -12,7 +12,31 @@ public class ReportFileUploadEnum {
NORMAL_DECLARATION("增值税纳税申报表", "增值税纳税申报表"), NORMAL_DECLARATION("增值税纳税申报表", "增值税纳税申报表"),
CORR_DECLARATION("增值税更正申报表", "增值税更正申报表"), CORR_DECLARATION("增值税更正申报表", "增值税更正申报表"),
NORMAL_TAX_RECEIPT("增值税纳税税票", "增值税纳税税票"), NORMAL_TAX_RECEIPT("增值税纳税税票", "增值税纳税税票"),
CORR_TAX_RECEIPT("增值税更正税票", "增值税更正税票"); CORR_TAX_RECEIPT("增值税更正税票", "增值税更正税票"),
CIT_FIRST_QUARTERLY("企业所得税第一季度预缴表", "企业所得税第一季度预缴表"),
CIT_CORRECT_FIRST_QUARTERLY("企业所得税更正第一季度预缴表", "企业所得税更正第一季度预缴表"),
CIT_SECOND_QUARTERLY("企业所得税第二季度预缴表", "企业所得税第二季度预缴表"),
CIT_CORRECT_SECOND_QUARTERLY("企业所得税更正第二季度预缴表", "企业所得税更正第二季度预缴表"),
CIT_THIRD_QUARTERLY("企业所得税第三季度预缴表", "企业所得税第三季度预缴表"),
CIT_CORRECT_THIRD_QUARTERLY("企业所得税更正第三季度预缴表", "企业所得税更正第三季度预缴表"),
CIT_FORTH_QUARTERLY("企业所得税第四季度预缴表", "企业所得税第四季度预缴表"),
CIT_CORRECT_FORTH_QUARTERLY("企业所得税更正第四季度预缴表", "企业所得税更正第四季度预缴表"),
CIT_FINAL_SETTLEMENT_DECLARATION_FORM("企业所得税汇算清缴纳税申报表", "企业所得税汇算清缴纳税申报表"),
CIT_CORRECT_FINAL_SETTLEMENT_DECLARATION_FORM("企业所得税更正汇算清缴纳税申报表", "企业所得税更正汇算清缴纳税申报表"),
CIT_FIRST_TAX_STAMP("企业所得税第一季度纳税税票", "企业所得税第一季度纳税税票"),
CIT_CORRECT_FIRST_TAX_STAMP("企业所得税第一季度更正纳税税票", "企业所得税第一季度更正纳税税票"),
CIT_SECOND_TAX_STAMP("企业所得税第二季度纳税税票", "企业所得税第二季度纳税税票"),
CIT_CORRECT_SECOND_TAX_STAMP("企业所得税更正第二季度纳税税票", "企业所得税更正第二季度纳税税票"),
CIT_THIRD_TAX_STAMP("企业所得税第三季度纳税税票", "企业所得税第三季度纳税税票"),
CIT_CORRECT_THIRD_TAX_STAMP("企业所得税更正第三季度纳税税票", "企业所得税更正第三季度纳税税票"),
CIT_FORTH_TAX_STAMP("企业所得税第四季度纳税税票", "企业所得税第四季度纳税税票"),
CIT_CORRECT_FORTH_TAX_STAMP("企业所得税更正第四季度纳税税票", "企业所得税更正第四季度纳税税票"),
CIT_FINAL_SETTLEMENT_TAX_STAMP("企业所得税汇算清缴纳税税票", "企业所得税汇算清缴纳税税票"),
CIT_CORRECT_FINAL_SETTLEMENT_TAX_STAMP("企业所得税更正汇算清缴纳税税票", "企业所得税更正汇算清缴纳税税票");
private String code; private String code;
private String name; private String name;
public static final Map<String, String> MAPPING = new HashMap<>(); public static final Map<String, String> MAPPING = new HashMap<>();
...@@ -42,6 +66,7 @@ public class ReportFileUploadEnum { ...@@ -42,6 +66,7 @@ public class ReportFileUploadEnum {
*/ */
public enum SuorceType { public enum SuorceType {
VAT("VAT", "VAT"), VAT("VAT", "VAT"),
CIT("CIT", "CIT"),
RECORD("RECORD", "档案"); RECORD("RECORD", "档案");
private String code; private String code;
private String name; private String name;
......
...@@ -10,6 +10,7 @@ import pwc.taxtech.atms.dto.reportFileUpload.ReportFileUploadResult; ...@@ -10,6 +10,7 @@ import pwc.taxtech.atms.dto.reportFileUpload.ReportFileUploadResult;
import pwc.taxtech.atms.dto.reportUpload.ReportUploadParam; import pwc.taxtech.atms.dto.reportUpload.ReportUploadParam;
import pwc.taxtech.atms.dto.reportUpload.ReportUploadResult; import pwc.taxtech.atms.dto.reportUpload.ReportUploadResult;
import pwc.taxtech.atms.exception.ServiceException; import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.service.impl.CitReportFileUploadService;
import pwc.taxtech.atms.service.impl.CitReportUploadService; import pwc.taxtech.atms.service.impl.CitReportUploadService;
import pwc.taxtech.atms.service.impl.ReportFileUploadService; import pwc.taxtech.atms.service.impl.ReportFileUploadService;
import pwc.taxtech.atms.service.impl.ReportUploadService; import pwc.taxtech.atms.service.impl.ReportUploadService;
...@@ -27,7 +28,7 @@ public class CitReportUploadDetailController extends BaseController { ...@@ -27,7 +28,7 @@ public class CitReportUploadDetailController extends BaseController {
@Resource @Resource
private ReportFileUploadService reportFileUploadService; private CitReportFileUploadService citReportFileUploadService;
@PostMapping("queryPage") @PostMapping("queryPage")
public CamelPagingResultDto<ReportUploadResult> queryPage(@RequestBody ReportUploadParam param) { public CamelPagingResultDto<ReportUploadResult> queryPage(@RequestBody ReportUploadParam param) {
return new CamelPagingResultDto<>(citReportUploadService.queryPage(param)); return new CamelPagingResultDto<>(citReportUploadService.queryPage(param));
...@@ -36,7 +37,7 @@ public class CitReportUploadDetailController extends BaseController { ...@@ -36,7 +37,7 @@ public class CitReportUploadDetailController extends BaseController {
@PostMapping("queryFileUpload") @PostMapping("queryFileUpload")
public List<ReportFileUploadResult> queryFileUpload(@RequestBody ReportFileUploadParam param) { public List<ReportFileUploadResult> queryFileUpload(@RequestBody ReportFileUploadParam param) {
return reportFileUploadService.queryData(param); return citReportFileUploadService.queryData(param);
} }
@ResponseBody @ResponseBody
...@@ -48,7 +49,7 @@ public class CitReportUploadDetailController extends BaseController { ...@@ -48,7 +49,7 @@ public class CitReportUploadDetailController extends BaseController {
data.setProjectId(projectId); data.setProjectId(projectId);
data.setReportType(reportType); data.setReportType(reportType);
data.setSourceType(sourceType); data.setSourceType(sourceType);
reportFileUploadService.saveData(file,data); citReportFileUploadService.saveData(file,data);
return OperationResultDto.success(); return OperationResultDto.success();
} catch (ServiceException e) { } catch (ServiceException e) {
return OperationResultDto.error(e.getMessage()); return OperationResultDto.error(e.getMessage());
......
...@@ -244,9 +244,9 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -244,9 +244,9 @@ public class CitImportExcelServiceImpl extends BaseService {
} }
citJournal.setSubjectCode(cellValue.toString()); citJournal.setSubjectCode(cellValue.toString());
citJournal.setSegment4(CitCommonUtil.getValue(rowData.getCell(12)).toString()); citJournal.setSegment4(CitCommonUtil.getValue(rowData.getCell(12)).toString());
citJournal.setSegment5(CitCommonUtil.getValue(rowData.getCell(13)).toString()); citJournal.setSegment5(CitCommonUtil.getValue(rowData.getCell(13)).toString().replace(".0",""));
citJournal.setSegment6(CitCommonUtil.getValue(rowData.getCell(14)).toString()); citJournal.setSegment6(CitCommonUtil.getValue(rowData.getCell(14)).toString().replace(".0",""));
citJournal.setSegment7(CitCommonUtil.getValue(rowData.getCell(15)).toString()); citJournal.setSegment7(CitCommonUtil.getValue(rowData.getCell(15)).toString().replace(".0",""));
citJournal.setSegment8(CitCommonUtil.getValue(rowData.getCell(16)).toString()); citJournal.setSegment8(CitCommonUtil.getValue(rowData.getCell(16)).toString());
citJournal.setSegment9(CitCommonUtil.getValue(rowData.getCell(17)).toString()); citJournal.setSegment9(CitCommonUtil.getValue(rowData.getCell(17)).toString());
citJournal.setSegment10(CitCommonUtil.getValue(rowData.getCell(18)).toString()); citJournal.setSegment10(CitCommonUtil.getValue(rowData.getCell(18)).toString());
...@@ -401,7 +401,6 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -401,7 +401,6 @@ public class CitImportExcelServiceImpl extends BaseService {
continue; continue;
} }
DecimalFormat df=new DecimalFormat("0");
String companyCode = cellValue.toString().replace(".0",""); String companyCode = cellValue.toString().replace(".0","");
//根据code(主体)获取机构相关信息 //根据code(主体)获取机构相关信息
List<Organization> organizations = getOrganizationByCode(companyCode); List<Organization> organizations = getOrganizationByCode(companyCode);
...@@ -442,25 +441,64 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -442,25 +441,64 @@ public class CitImportExcelServiceImpl extends BaseService {
trialBalance.setOrganizationId(orgId); trialBalance.setOrganizationId(orgId);
trialBalance.setProjectId(project.getId()); trialBalance.setProjectId(project.getId());
trialBalance.setAccountCategory(CitCommonUtil.getValue(rowData.getCell(0)).toString());
trialBalance.setAcctCode1(CitCommonUtil.getValue(rowData.getCell(1)).toString());
trialBalance.setAcctName1(CitCommonUtil.getValue(rowData.getCell(2)).toString());
trialBalance.setAcctName2(CitCommonUtil.getValue(rowData.getCell(3)).toString());
trialBalance.setAcctName3(CitCommonUtil.getValue(rowData.getCell(4)).toString());
trialBalance.setSegment1(companyCode);
trialBalance.setSegment2(CitCommonUtil.getValue(rowData.getCell(6)).toString());
cellValue = CitCommonUtil.getValue(rowData.getCell(7)); cellValue = CitCommonUtil.getValue(rowData.getCell(7));
if("".equals(cellValue)){ if("".equals(cellValue)){
citDataImportLogError.setErrorMsg("数据错误,第"+(rowNum+1)+"行科目为空"); citDataImportLogError.setErrorMsg("数据错误,第"+(rowNum+1)+"行科目为空");
citDataImportLogList.add(citDataImportLogError); citDataImportLogList.add(citDataImportLogError);
continue; continue;
} }
trialBalance.setAccountCode(cellValue.toString().replace(".0",""));
trialBalance.setSegment4(CitCommonUtil.getValue(rowData.getCell(8)).toString());
trialBalance.setSegment5(CitCommonUtil.getValue(rowData.getCell(9)).toString());
trialBalance.setSegment6(CitCommonUtil.getValue(rowData.getCell(10)).toString());
trialBalance.setSegment7(CitCommonUtil.getValue(rowData.getCell(11)).toString());
trialBalance.setSegment8(CitCommonUtil.getValue(rowData.getCell(12)).toString());
trialBalance.setSegment9(CitCommonUtil.getValue(rowData.getCell(13)).toString());
trialBalance.setSegment10(CitCommonUtil.getValue(rowData.getCell(14)).toString());
trialBalance.setSegment1Name(CitCommonUtil.getValue(rowData.getCell(15)).toString());
trialBalance.setSegment2Name(CitCommonUtil.getValue(rowData.getCell(16)).toString());
trialBalance.setAccountCode(cellValue.toString().substring(0,cellValue.toString().indexOf(".")));
trialBalance.setAccountDescription(CitCommonUtil.getValue(rowData.getCell(17)).toString()); trialBalance.setAccountDescription(CitCommonUtil.getValue(rowData.getCell(17)).toString());
trialBalance.setSegment4Name(CitCommonUtil.getValue(rowData.getCell(18)).toString());
trialBalance.setSegment5Name(CitCommonUtil.getValue(rowData.getCell(19)).toString());
trialBalance.setSegment6Name(CitCommonUtil.getValue(rowData.getCell(20)).toString());
trialBalance.setSegment7Name(CitCommonUtil.getValue(rowData.getCell(21)).toString());
trialBalance.setSegment8Name(CitCommonUtil.getValue(rowData.getCell(22)).toString());
trialBalance.setSegment9Name(CitCommonUtil.getValue(rowData.getCell(23)).toString());
trialBalance.setSegment10Name(CitCommonUtil.getValue(rowData.getCell(24)).toString());
//此期间默认为12 //此期间默认为12
trialBalance.setAccountPeriod(12); trialBalance.setAccountPeriod(12);
trialBalance.setBeginningBalance(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(25)).toString())); trialBalance.setBeginningBalance(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(25)).toString()));
trialBalance.setJan(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(26)).toString()));
trialBalance.setFeb(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(27)).toString()));
trialBalance.setMar(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(28)).toString()));
trialBalance.setApr(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(29)).toString()));
trialBalance.setMay(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(30)).toString()));
trialBalance.setJun(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(31)).toString()));
trialBalance.setJul(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(32)).toString()));
trialBalance.setAug(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(33)).toString()));
trialBalance.setSep(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(34)).toString()));
trialBalance.setOct(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(35)).toString()));
trialBalance.setNov(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(36)).toString()));
trialBalance.setDecember(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(37)).toString()));
trialBalance.setThirteen(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(38)).toString()));
trialBalance.setEndingBalance(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(39)).toString())); trialBalance.setEndingBalance(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(39)).toString()));
trialBalanceList.add(trialBalance); trialBalanceList.add(trialBalance);
} }
//判断导入的方式 //判断导入的方式
String msg = "追加导入成功"; String msg = "追加导入成功";
if (EnumTbImportType.CoverImport.getCode().equals(importType)) { if (EnumTbImportType.CoverImport.getCode().equals(importType) && projectIdList.size()>0) {
//覆盖导入要删除原有的该操作人在当前期间导入的数据,且更改之前导入的日志记录状态 //覆盖导入要删除原有的该操作人在当前期间导入的数据,且更改之前导入的日志记录状态
msg = "覆盖导入成功"; msg = "覆盖导入成功";
CitTrialBalanceExample citTrialBalanceExample = new CitTrialBalanceExample(); CitTrialBalanceExample citTrialBalanceExample = new CitTrialBalanceExample();
......
package pwc.taxtech.atms.service.impl;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.AuthUserHelper;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.message.ErrorMessage;
import pwc.taxtech.atms.constant.enums.FileUploadEnum;
import pwc.taxtech.atms.constant.enums.ReportFileUploadEnum;
import pwc.taxtech.atms.dao.FileTypesMapper;
import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.dao.ProjectMapper;
import pwc.taxtech.atms.dao.UserMapper;
import pwc.taxtech.atms.dto.didiFileUpload.DidiFileIUploadParam;
import pwc.taxtech.atms.dto.didiFileUpload.DidiFileUploadDetailResult;
import pwc.taxtech.atms.dto.reportFileUpload.ReportFileUploadParam;
import pwc.taxtech.atms.dto.reportFileUpload.ReportFileUploadResult;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.vat.dao.ReportFileUploadMapper;
import pwc.taxtech.atms.vat.entity.FileUpload;
import pwc.taxtech.atms.vat.entity.ReportFileUpload;
import pwc.taxtech.atms.vat.entity.ReportFileUploadExample;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
@Service
public class CitReportFileUploadService extends BaseService {
@Resource
private ReportFileUploadMapper reportFileUploadMapper;
@Autowired
protected AuthUserHelper authUserHelper;
@Resource
private UserMapper userMapper;
@Resource
private ProjectMapper projectMapper;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private FileTypesMapper fileTypesMapper;
@Autowired
DidiFileUploadService didiFileUploadService;
@Autowired
TaxDocumentServiceImpl taxDocumentService;
public List<ReportFileUploadResult> queryData(ReportFileUploadParam param) {
ReportFileUploadExample example = new ReportFileUploadExample();
example.createCriteria().andProjectIdEqualTo(param.getProjectId()).andPeriodEqualTo(param.getPeriod());
List<ReportFileUpload> dataList = reportFileUploadMapper.selectByExample(example);
List<String> fileUploadUids = dataList.stream()
.map(o -> o.getFileUploadId()).collect(Collectors.toList());
Map<String, String> urlMap = new HashMap<>();
if (CollectionUtils.isNotEmpty(fileUploadUids)) {
DidiFileIUploadParam fileParam = new DidiFileIUploadParam();
fileParam.setUuids(fileUploadUids);
PageInfo<DidiFileUploadDetailResult> uploadDetail = didiFileUploadService.queryPage(fileParam);
if (CollectionUtils.isNotEmpty(uploadDetail.getList())) {
urlMap = uploadDetail.getList().stream().collect(Collectors.toMap(DidiFileUploadDetailResult::getUid, didiFileUploadDetailResult -> didiFileUploadDetailResult.getViewHttpUrl()));
}
}
List<String> reportTypeList = dataList.stream()
.map(o -> o.getReportType()).collect(Collectors.toList());
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_FIRST_QUARTERLY.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_FIRST_QUARTERLY.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_CORRECT_FIRST_QUARTERLY.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_CORRECT_FIRST_QUARTERLY.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_SECOND_QUARTERLY.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_SECOND_QUARTERLY.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_CORRECT_SECOND_QUARTERLY.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_CORRECT_SECOND_QUARTERLY.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_THIRD_QUARTERLY.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_THIRD_QUARTERLY.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_CORRECT_THIRD_QUARTERLY.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_CORRECT_THIRD_QUARTERLY.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_FORTH_QUARTERLY.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_FORTH_QUARTERLY.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_CORRECT_FORTH_QUARTERLY.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_CORRECT_FORTH_QUARTERLY.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_FINAL_SETTLEMENT_DECLARATION_FORM.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_FINAL_SETTLEMENT_DECLARATION_FORM.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_CORRECT_FINAL_SETTLEMENT_DECLARATION_FORM.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_CORRECT_FINAL_SETTLEMENT_DECLARATION_FORM.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_FIRST_TAX_STAMP.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_FIRST_TAX_STAMP.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_CORRECT_FIRST_TAX_STAMP.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_CORRECT_FIRST_TAX_STAMP.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_SECOND_TAX_STAMP.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_SECOND_TAX_STAMP.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_CORRECT_SECOND_TAX_STAMP.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_CORRECT_SECOND_TAX_STAMP.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_THIRD_TAX_STAMP.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_THIRD_TAX_STAMP.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_CORRECT_THIRD_TAX_STAMP.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_CORRECT_THIRD_TAX_STAMP.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_FORTH_TAX_STAMP.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_FORTH_TAX_STAMP.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_CORRECT_FORTH_TAX_STAMP.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_CORRECT_FORTH_TAX_STAMP.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_FINAL_SETTLEMENT_TAX_STAMP.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_FINAL_SETTLEMENT_TAX_STAMP.getCode());
dataList.add(upload);
}
if (!reportTypeList.contains(ReportFileUploadEnum.ReportType.CIT_CORRECT_FINAL_SETTLEMENT_TAX_STAMP.getCode())) {
ReportFileUpload upload = new ReportFileUpload();
upload.setReportType(ReportFileUploadEnum.ReportType.CIT_CORRECT_FINAL_SETTLEMENT_TAX_STAMP.getCode());
dataList.add(upload);
}
List<ReportFileUploadResult> resultList = new ArrayList<ReportFileUploadResult>();
for (ReportFileUpload data : dataList) {
ReportFileUploadResult result = beanUtil.copyProperties(data, new ReportFileUploadResult());
result.setFileUrl(urlMap.get(data.getFileUploadId()));
resultList.add(result);
}
return resultList;
}
@Transactional
public void saveData(MultipartFile file, ReportFileUpload data) {
if (!ReportFileUploadEnum.ReportType.MAPPING.containsKey(data.getReportType())) {
throw new ServiceException(ErrorMessage.ParamError);
}
if (!ReportFileUploadEnum.SuorceType.MAPPING.containsKey(data.getSourceType())) {
throw new ServiceException(ErrorMessage.ParamError);
}
String uid = authUserHelper.getCurrentUserId();
User user = userMapper.selectByPrimaryKey(uid);
data.setCreator(user.getUserName());
data.setUid(CommonUtils.getUUID());
data.setCreateTime(new Date());
if(StringUtils.isBlank(data.getReportFileName())){
data.setReportFileName(file.getOriginalFilename());
}
if (StringUtils.isBlank(data.getProjectId()) && StringUtils.isNotBlank(data.getOrgId()) && data.getPeriod() != null) {
ProjectExample projectExample = new ProjectExample();
String year = String.valueOf(data.getPeriod()).substring(0,4);
projectExample.createCriteria().andOrganizationIdEqualTo(data.getOrgId()).andYearEqualTo(Integer.valueOf(year));
List<Project> projects = projectMapper.selectByExample(projectExample);
if(CollectionUtils.isNotEmpty(projects)){
data.setProjectId(projects.get(0).getId());
}else{
return;
}
if (StringUtils.isBlank(data.getFileUploadId())) {
FileUpload fileUpload = didiFileUploadService.uploadFile(file, file.getOriginalFilename(), FileUploadEnum.BizSource.REPORT_UPLOAD.name());
data.setFileUploadId(fileUpload.getUid());
}
}else {
Project project = projectMapper.selectByPrimaryKey(data.getProjectId());
data.setOrgId(project.getOrganizationId());
TaxDocument taxDocument = new TaxDocument();
taxDocument.setCompanyId(project.getOrganizationId());
Organization organization = organizationMapper.selectByPrimaryKey(project.getOrganizationId());
taxDocument.setCompanyName(organization.getName());
taxDocument.setFileUploadId(data.getFileUploadId());
taxDocument.setEnable("T");
taxDocument.setOwnTime(data.getPeriod());
taxDocument.setFileType(data.getReportType());
FileTypesExample example = new FileTypesExample();
example.createCriteria().andFileTypeEqualTo(data.getReportType());
List<FileTypes> dataList = fileTypesMapper.selectByExample(example);
if(CollectionUtils.isNotEmpty(dataList)){
taxDocument.setFileAttr(dataList.get(0).getFileAttr());
taxDocument.setFileTypeId(dataList.get(0).getId());
}
//重新命名
String fileName = taxDocument.getCompanyName()+"_"+taxDocument.getFileType()+"_"+taxDocument.getOwnTime();
fileName+=file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
if (StringUtils.isBlank(data.getFileUploadId())) {
FileUpload fileUpload = didiFileUploadService.uploadFile(file, fileName, FileUploadEnum.BizSource.REPORT_UPLOAD.name());
data.setFileUploadId(fileUpload.getUid());
data.setReportFileName(fileName);
}
taxDocument.setFileName(fileName);
taxDocumentService.addTaxDocumentList(file,taxDocument);
}
ReportFileUploadExample example = new ReportFileUploadExample();
example.createCriteria().andProjectIdEqualTo(data.getProjectId()).andPeriodEqualTo(data.getPeriod()).andReportTypeEqualTo(data.getReportType());
int updateRow = reportFileUploadMapper.updateByExample(data, example);
if (updateRow == 0) {
reportFileUploadMapper.insert(data);
}
}
}
...@@ -1554,7 +1554,10 @@ public class DataImportService extends BaseService { ...@@ -1554,7 +1554,10 @@ public class DataImportService extends BaseService {
rlit.setId(plId); rlit.setId(plId);
rlit.setSubjectNum(getCellStringValue(row.getCell(0))); rlit.setSubjectNum(getCellStringValue(row.getCell(0)));
rlit.setSubjectName(getCellStringValue(row.getCell(1))); rlit.setSubjectName(getCellStringValue(row.getCell(1)));
rlit.setRedLetterInvoiceInfoTableNum(getCellStringValue(row.getCell(2))); Object value = CitCommonUtil.getValue(row.getCell(2));
if(!"".equals(value)){
rlit.setRedLetterInvoiceInfoTableNum(new BigDecimal(value.toString()).toPlainString());
}
rlit.setPeriod(DateUtils.dateToPeriod(row.getCell(3).getDateCellValue())); rlit.setPeriod(DateUtils.dateToPeriod(row.getCell(3).getDateCellValue()));
rlit.setFillInDate(row.getCell(3).getDateCellValue()); rlit.setFillInDate(row.getCell(3).getDateCellValue());
rlit.setSalesTaxNumber(getCellStringValue(row.getCell(4))); rlit.setSalesTaxNumber(getCellStringValue(row.getCell(4)));
......
...@@ -1156,6 +1156,8 @@ ...@@ -1156,6 +1156,8 @@
"ProcessFail": "Process Fail", "ProcessFail": "Process Fail",
"EndOfThisYear": "End Of This Year", "EndOfThisYear": "End Of This Year",
"BeginOfNextYear": "Begin Of Next Year", "BeginOfNextYear": "Begin Of Next Year",
"PreClassified": "Pre Classified" "PreClassified": "Pre Classified",
"AssetType": "Asset Type",
"TaxGroupName": "TaxGroupName"
} }
\ No newline at end of file
...@@ -1209,7 +1209,9 @@ ...@@ -1209,7 +1209,9 @@
"ProcessFail": "处理失败", "ProcessFail": "处理失败",
"EndOfThisYear": "本年底", "EndOfThisYear": "本年底",
"BeginOfNextYear": "下年初", "BeginOfNextYear": "下年初",
"PreClassified": "预提重分类" "PreClassified": "预提重分类",
"AssetType": "资产类型",
"TaxGroupName": "税务资产分类"
......
...@@ -35,15 +35,12 @@ ...@@ -35,15 +35,12 @@
}; };
//从数据库中load数据 //从数据库中load数据
var loadJournalEntryDataFromDB = function (pageIndex) { var loadJournalEntryDataFromDB = function () {
initJournalEntryPagination();
$scope.curJournalEntryPage = pageIndex;
//初始化查询信息 //初始化查询信息
$scope.queryParams.pageInfo = { $scope.queryParams.pageInfo = {
totalCount: $scope.queryJournalEntryResult.pageInfo.totalCount, totalCount: $scope.pagingOptions.totalItems,
pageIndex: pageIndex, pageIndex: $scope.pagingOptions.pageIndex,
pageSize: $scope.queryJournalEntryResult.pageInfo.pageSize, pageSize: $scope.pagingOptions.pageSize,
totalPage: 0 totalPage: 0
}; };
$scope.getDataFromDatabase($scope.queryParams); $scope.getDataFromDatabase($scope.queryParams);
...@@ -58,80 +55,12 @@ ...@@ -58,80 +55,12 @@
resp.data.list.forEach(function (v) { resp.data.list.forEach(function (v) {
v.index = index++; v.index = index++;
}); });
$scope.gridOptions.data = resp.data.list; // $scope.gridOptions.data = resp.data.list;
$scope.queryJournalEntryResult.pageInfo = resp.data; $scope.gridDataSource = resp.data.list;
computeJournalEntryPage();
// $scope.ledgerName = data.list[0].ledgerName;
// $scope.currencyCode = data.list[0].currencyCode;
// $scope.status = data.list[0].status;
// $scope.importDate = $filter('date')(data.list[0].date, "yyyy-MM-dd hh:mm:ss");
}
});
};
//点击任意一页加载数据事件
var loadIncomeInvoiceDataByPage = function (pageIndex) {
loadJournalEntryDataFromDB(pageIndex);
};
//计算页数,创建分页栏
var computeJournalEntryPage = function () {
if ($scope.queryJournalEntryResult.pageInfo && $scope.queryJournalEntryResult.pageInfo.total > 0) {
var totalPage = parseInt($scope.queryJournalEntryResult.pageInfo.total / $scope.queryJournalEntryResult.pageInfo.pageSize);
totalPage = $scope.queryJournalEntryResult.pageInfo.totalCount % $scope.queryJournalEntryResult.pageInfo.pageSize == 0 ? totalPage : totalPage + 1;
//计算本页记录数 $scope.pagingOptions.totalItems = resp.data.total;
if ($scope.queryJournalEntryResult.pageInfo.pageNum === totalPage) {
$scope.curPageItemCount = $scope.queryJournalEntryResult.pageInfo.total % $scope.queryJournalEntryResult.pageInfo.pageSize;
} }
else { });
$scope.curPageItemCount = $scope.queryJournalEntryResult.pageInfo.pageSize;
}
$scope.queryJournalEntryResult.pageInfo.totalPage = totalPage;
var createPage = $("#totalInvoicePage").createPage({
pageCount: totalPage,
current: $scope.curJournalEntryPage,
backFn: function (p) {
//单击回调方法,p是当前页码
loadIncomeInvoiceDataByPage(p);
}
});
$('#totalInvoicePage').css('display', 'inline-block');
} else {
//如果查询结果为0,则直接设置本页记录数为0
$scope.curPageItemCount = 0;
var createPage = $("#totalInvoicePage").createPage({
pageCount: 0,
current: $scope.curJournalEntryPage,
backFn: function (p) {
//单击回调方法,p是当前页码
loadIncomeInvoiceDataByPage(p);
}
});
$('#totalInvoicePage').css('display', 'inline-block');
}
};
//初始化分页信息
var initJournalEntryPagination = function () {
$scope.queryJournalEntryResult = {
list: [],
pageInfo: {
totalCount: -1,
pageIndex: 1,
pageSize: constant.pagesize,
totalPage: 0,
}
}
$scope.curJournalEntryPage = 1;
}; };
//将选择了的查询条件显示在grid上方 //将选择了的查询条件显示在grid上方
...@@ -164,14 +93,7 @@ ...@@ -164,14 +93,7 @@
}); });
} }
loadJournalEntryDataFromDB(1); loadJournalEntryDataFromDB();
if ($scope.criteriaList.length > 6) {
$scope.criteriaListFirstRow = $scope.criteriaList.slice(0, 6);
$scope.criteriaListSecondRow = $scope.criteriaList.slice(6, $scope.criteriaList.length);
}
else {
$scope.criteriaListFirstRow = $scope.criteriaList.slice(0, $scope.criteriaList.length);
}
$('.filter-button').popover("hide"); $('.filter-button').popover("hide");
}; };
...@@ -190,7 +112,7 @@ ...@@ -190,7 +112,7 @@
}; };
$scope.queryParams.periodStart = $scope.startMonth; $scope.queryParams.periodStart = $scope.startMonth;
$scope.queryParams.periodEnd = $scope.endMonth; $scope.queryParams.periodEnd = $scope.endMonth;
loadJournalEntryDataFromDB(1); loadJournalEntryDataFromDB();
$('.filter-button').popover("hide"); $('.filter-button').popover("hide");
}; };
...@@ -248,7 +170,7 @@ ...@@ -248,7 +170,7 @@
$scope.startCalculateData = function () { $scope.startCalculateData = function () {
citReportService.generateAssetEamMapping($scope.queryParams).success(function (data) { citReportService.generateAssetEamMapping($scope.queryParams).success(function (data) {
loadJournalEntryDataFromDB(1); loadJournalEntryDataFromDB();
// if(status===204){ // if(status===204){
// SweetAlert.warning("没有数据可以下载"); // SweetAlert.warning("没有数据可以下载");
// return; // return;
...@@ -258,8 +180,22 @@ ...@@ -258,8 +180,22 @@
}); });
}; };
//刷新页面
$scope.refreshConfigGrid = function () {
loadJournalEntryDataFromDB();
};
(function initialize() { (function initialize() {
$log.debug('VatPreviewInputInvoiceController.ctor()...'); $log.debug('VatPreviewInputInvoiceController.ctor()...');
//分页的设置
$scope.pagingOptions = {
pageIndex: 1, //当前页码
totalItems: 0, //总数据
pageSize: 50, //每页多少条数据
pageSizeString:"50"
};
$('#input-invoice-period-picker').focus(function () { $('#input-invoice-period-picker').focus(function () {
$('.filter-button').popover("hide"); $('.filter-button').popover("hide");
}); });
...@@ -281,42 +217,164 @@ ...@@ -281,42 +217,164 @@
$scope.queryParams.periodStart = startMonth; $scope.queryParams.periodStart = startMonth;
$scope.queryParams.periodEnd = endMonth; $scope.queryParams.periodEnd = endMonth;
loadJournalEntryDataFromDB(1); loadJournalEntryDataFromDB();
}); });
$scope.gridOptions = { $scope.gridOptions = {
rowHeight: constant.UIGrid.rowHeight, bindingOptions: {
selectionRowHeaderWidth: constant.UIGrid.rowHeight, dataSource: 'gridDataSource'
// expandableRowTemplate: '<div ui-grid="row.entity.subGridOptions" style="height:150px;"></div>', },
virtualizationThreshold: 50,//默认加载50条数据,避免在数据展示时,只显示前面4条 showBorders: true,
enableSorting: false, columns: [
enableColumnMenus: false, {
enableHorizontalScrollbar : 1, caption: $translate.instant('AssetType'),
columnDefs: [ dataField: "assetType",
{ name: $translate.instant('AssetType'), width: 200, cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.assetType}}<span></div>' }, width: 120,
{ name: $translate.instant('AssetNumber'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.assetNumber}}<span></div>' }, calculateDisplayValue: function (data) {
{ name: $translate.instant('AssetName'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.assetDescription}}</span></div>' }, if(data.assetType == 1){
{ name: $translate.instant('BuyDate'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.buyDate | date:"yyyy-MM-dd"}}</span></div>' }, return "固定资产";
{ name: $translate.instant('DepreciationDate2'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.depreciationDate | date:"yyyy-MM-dd"}}</span></div>' }, }
{ name: $translate.instant('AssetGroupName'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.assetGroupName}}</span></div>' }, if(data.assetType == 2){
{ name: $translate.instant('AcquisitionValue'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.acquisitionValue}}</span></div>' }, return "长期待摊";
{ name: $translate.instant('ResidualValue'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.residualRate}}</span></div>' }, }
{ name: $translate.instant('YearEndValue'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.yearEndValue}}</span></div>' }, if(data.assetType == 3){
{ name: $translate.instant('CompensationSaleAmount'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.compensationSaleAmount}}</span></div>' }, return "无形资产";
}
{ name: $translate.instant('CompensationSaleAmount'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.compensationSaleAmount}}</span></div>' }, }
{ name: $translate.instant('DisposalProfitAndLoss'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.disposalProfitAndLoss}}</span></div>' }, },
{caption: $translate.instant('AssetNumber'), dataField: "assetNumber",width: 120},
{ name: $translate.instant('TaxGroupName'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.taxGroupName}}</span></div>' }, {caption: $translate.instant('AssetName'), dataField: "assetDescription",width: 200},
{ name: $translate.instant('DepreciationPeriod'),width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.depreciationPeriod}}</span></div>' }, {caption: $translate.instant('BuyDate'), dataField: "buyDate", dataType: "date", format: "yyyy-MM-dd",width: 100},
{ name: $translate.instant('PerMonthDepreciationAmount'),width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.perMonthDepreciationAmount}}</span></div>' }, {
{ name: $translate.instant('TaxToCurrentYearDepreciationPeriod'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.taxToCurrentYearDepreciationPeriod}}</span></div>' }, caption: $translate.instant('DepreciationDate2'),
{ name: $translate.instant('AccountTotalepreciationAmount'),width: 200, cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.taxToCurrentYearDepreciationAmount}}</span></div>' }, dataField: "depreciationDate",
{ name: $translate.instant('TaxNetValue'),width: 200, cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.taxNetValue}}</span></div>' }, dataType: "date",
{ name: $translate.instant('DisposalTaxBenefit'),width: 200, cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.disposalTaxBenefit}}</span></div>' } format: "yyyy-MM-dd",
] width: 100
},
{caption: $translate.instant('AssetGroupName'), dataField: "assetGroupName",width: 120},
{
caption: $translate.instant('AcquisitionValue'),
dataField: "acquisitionValue",
format: {type: 'fixedPoint', precision: 2},
width: 100
},
{
caption: $translate.instant('ResidualRate'),
dataField: "residualRate",
format: {type: 'fixedPoint', precision: 2},
width: 100
},
{
caption: $translate.instant('YearEndValue'),
dataField: "yearEndValue",
format: {type: 'fixedPoint', precision: 2},
width: 100
},
{
caption: $translate.instant('compensationSaleAmount'),
dataField: "compensationSaleAmount",
format: {type: 'fixedPoint', precision: 2},
width: 100
},
{
caption: $translate.instant('DisposalProfitAndLoss'),
dataField: "disposalProfitAndLoss",
format: {type: 'fixedPoint', precision: 2},
width: 100
},
{caption: $translate.instant('TaxGroupName '), dataField: "taxGroupName"},
{
caption: $translate.instant('DepreciationPeriod'),
dataField: "depreciationPeriod",
format: {type: 'fixedPoint', precision: 0},
width: 100
},
{
caption: $translate.instant('PerMonthDepreciationAmount'),
dataField: "perMonthDepreciationAmount",
format: {type: 'fixedPoint', precision: 2},
width: 100
},
{
caption: $translate.instant('TaxToCurrentYearDepreciationPeriod'),
dataField: "taxToCurrentYearDepreciationPeriod",
format: {type: 'fixedPoint', precision: 0},
width: 100
},
{
caption: $translate.instant('AccountTotalepreciationAmount'),
dataField: "taxToCurrentYearDepreciationAmount",
format: {type: 'fixedPoint', precision: 2},
width: 100
},
{
caption: $translate.instant('TaxNetValue'),
dataField: "taxNetValue",
format: {type: 'fixedPoint', precision: 2},
width: 100
},
{
caption: $translate.instant('DisposalTaxBenefit'),
dataField: "disposalTaxBenefit",
format: {type: 'fixedPoint', precision: 2},
width: 100
}
],
// onContentReady: function (e) {
// $scope.extractFinancialInstance = e.component;
// var totalCount = e.component.totalCount();
// if (totalCount > 0) {
// $scope.totalCount = totalCount;
// }
// },
loadPanel: {
enabled: true
},
selection: {
mode: "single"
},
grouping: {
autoExpandAll: false
},
allowColumnResizing: true,
columnAutoWidth: true,
showRowLines: true,
showColumnLines: true,
rowAlternationEnabled: true, //单双行颜色
noDataText: $translate.instant('NoDataText'),
}; };
// $scope.gridOptions = {
// rowHeight: constant.UIGrid.rowHeight,
// selectionRowHeaderWidth: constant.UIGrid.rowHeight,
// // expandableRowTemplate: '<div ui-grid="row.entity.subGridOptions" style="height:150px;"></div>',
// virtualizationThreshold: 50,//默认加载50条数据,避免在数据展示时,只显示前面4条
// enableSorting: false,
// enableColumnMenus: false,
// enableHorizontalScrollbar : 1,
// columnDefs: [
// { name: $translate.instant('AssetType'), width: 200, cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.assetType}}<span></div>' },
// { name: $translate.instant('AssetNumber'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.assetNumber}}<span></div>' },
// { name: $translate.instant('AssetName'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.assetDescription}}</span></div>' },
// { name: $translate.instant('BuyDate'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.buyDate | date:"yyyy-MM-dd"}}</span></div>' },
// { name: $translate.instant('DepreciationDate2'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.depreciationDate | date:"yyyy-MM-dd"}}</span></div>' },
// { name: $translate.instant('AssetGroupName'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.assetGroupName}}</span></div>' },
// { name: $translate.instant('AcquisitionValue'), width: 120,cellTemplate: '<div class="ui-grid-cell-contents" style="float: right"><span >{{row.entity.acquisitionValue}}</span></div>' },
// { name: $translate.instant('ResidualValue'), width: 120,cellTemplate: '<div class="ui-grid-cell-contents" style="float: right"><span >{{row.entity.residualRate}}</span></div>' },
// { name: $translate.instant('YearEndValue'), width: 120,cellTemplate: '<div class="ui-grid-cell-contents" style="float: right"><span>{{row.entity.yearEndValue}}</span></div>' },
// { name: $translate.instant('compensationSaleAmount'), width: 120,cellTemplate: '<div class="ui-grid-cell-contents" style="float: right"><span>{{row.entity.compensationSaleAmount}}</span></div>' },
//
// { name: $translate.instant('DisposalProfitAndLoss'), width: 120,cellTemplate: '<div class="ui-grid-cell-contents" style="float: right"><span>{{row.entity.disposalProfitAndLoss}}</span></div>' },
//
// { name: $translate.instant('TaxGroupName'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.taxGroupName}}</span></div>' },
// { name: $translate.instant('DepreciationPeriod'),width: 120,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.depreciationPeriod}}</span></div>' },
// { name: $translate.instant('PerMonthDepreciationAmount'),width: 120,cellTemplate: '<div class="ui-grid-cell-contents" style="float: right"><span>{{row.entity.perMonthDepreciationAmount}}</span></div>' },
// { name: $translate.instant('TaxToCurrentYearDepreciationPeriod'), width: 120,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.taxToCurrentYearDepreciationPeriod}}</span></div>' },
// { name: $translate.instant('AccountTotalepreciationAmount'),width: 120, cellTemplate: '<div class="ui-grid-cell-contents" style="float: right"><span>{{row.entity.taxToCurrentYearDepreciationAmount}}</span></div>' },
// { name: $translate.instant('TaxNetValue'),width: 120, cellTemplate: '<div class="ui-grid-cell-contents" style="float: right"><span>{{row.entity.taxNetValue}}</span></div>' },
// { name: $translate.instant('DisposalTaxBenefit'),width: 120, cellTemplate: '<div class="ui-grid-cell-contents" style="float: right"><span>{{row.entity.disposalTaxBenefit}}</span></div>' }
// ]
// };
$scope.doDataFilter = doDataFilter; $scope.doDataFilter = doDataFilter;
$scope.doDataFilterReset = doDataFilterReset; $scope.doDataFilterReset = doDataFilterReset;
...@@ -325,7 +383,6 @@ ...@@ -325,7 +383,6 @@
$scope.downloadJE = downloadJE; $scope.downloadJE = downloadJE;
initPeriods(); initPeriods();
initJournalEntryPagination();
//初始化查询条件-期间范围 //初始化查询条件-期间范围
$scope.queryParams.periodStart = vatSessionService.year * 100 + vatSessionService.month; $scope.queryParams.periodStart = vatSessionService.year * 100 + vatSessionService.month;
$scope.queryParams.periodEnd = vatSessionService.year * 100 + vatSessionService.month; $scope.queryParams.periodEnd = vatSessionService.year * 100 + vatSessionService.month;
...@@ -335,7 +392,7 @@ ...@@ -335,7 +392,7 @@
}else{ }else{
$('.periodInput')[0].style.left = "150px"; $('.periodInput')[0].style.left = "150px";
} }
loadJournalEntryDataFromDB(1); loadJournalEntryDataFromDB();
})(); })();
} }
]); ]);
......
...@@ -20,31 +20,17 @@ ...@@ -20,31 +20,17 @@
<!--{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>--> <!--{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>-->
<!--</div>--> <!--</div>-->
<div id="filterCriteriaDiv" style="max-width:98%;margin-bottom:2px;" ng-show="criteriaList.length>0"> <!--导航栏-->
<span class="text-bold margin-left20" translate="FilterCriteriaTags"></span>: <div id="tab_total">
<span class="tag label label-default" ng-repeat="criteria in criteriaListFirstRow"> <div class="dt-init-wrapper">
<span title="{{criteria.fullName}}"> <div class="dx-viewport grid-container">
{{criteria.name}} <div id="extractFinancialGridContainer" dx-data-grid="gridOptions"
</span> style="margin-top: 30px;">
<a><i class="remove glyphicon glyphicon-remove-sign glyphicon-white" ng-click="doDataFilter(criteria.propertyName)"></i></a> </div>
</span> </div>
<span ng-if="criteriaList.length>6"><br /></span> <div class="page-footer">
<span ng-if="criteriaList.length>6" style="margin-left: 81px; margin-top: 19px; display: inline-block;"></span> <ack-pagination page-options="pagingOptions"
<span ng-if="criteriaList.length>6" class="tag label label-default" ng-repeat="criteria in criteriaListSecondRow"> refresh-table="refreshConfigGrid()"></ack-pagination>
<span title="{{criteria.fullName}}">
{{criteria.name}}
</span>
<a><i class="remove glyphicon glyphicon-remove-sign glyphicon-white" ng-click="doDataFilter(criteria.propertyName)"></i></a>
</span>
</div>
<div id="mainAreaDiv" class="main-area">
<div class="inputInvoiceGrid" ui-grid="gridOptions">
<div class="watermark" ng-show="!gridOptions.data.length"><span translate="NoDataAvailable"></span></div>
</div>
<div class="pagination-container">
<span>本页{{curPageItemCount}}条记录,共{{queryJournalEntryResult.pageInfo.total}}条记录</span>
<div id="totalInvoicePage" class="common-pagination" style="display:none;">
</div> </div>
</div> </div>
</div> </div>
......
@import "~/app-resources/less/theme.less"; @import "~/app-resources/less/theme.less";
.cit-asset-eam-mapping { .cit-asset-eam-mapping {
background-color: white; /*background-color: @color-white;*/
height: 100%; padding-left: 20px;
/*min-height: 800px;*/
.numAmount { height: 96%;
padding: 0 3px;
height: 21px;
margin-left: 5px;
/* font-family: 'Arial'; */
font-weight: 600;
border-radius: 2px;
font-style: normal;
outline: none;
border: none;
min-width: 20px;
background-color: #DDDDDD;
color: #AA0000;
}
.top-area-wrapper { .dropdown-common() {
height: 60px; display: inline-block;
width: 98%;
margin: 0 20px;
.filter-button { .select-button {
width: 30px; background-color: #F5F5F5;
margin-top: 16px; padding: 6px 0;
width: 100px;
} }
.operation-wrapper { .caret {
margin: 15px 25px 10px 10px; margin-top: 8px;
}
span { .dropdown-menu {
cursor: pointer; min-width: 100px;
li {
text-align: center;
min-height: 0px;
height: 30px;
line-height: 30px;
color: #000;
font-weight: normal;
&:hover {
background-color: #F91000;
color: #FFF;
}
} }
} }
} }
.filter-popup-wrapper { #tab_total {
display: none; display: block;
} height: calc(~'100% - 40px');
position: relative;
.import-wrapper {
span {
margin-left: 10px;
color: #333;
font-family: "Microsoft YaHei";
font-style: normal;
font-size: 14px;
font-weight: bold;
}
.margin-left20 { .checkbox-custom {
margin-left: 20px; float: left;
} position: relative;
/*******************************************/ margin-right : 10px;
/*Filter Criteria tags:*/ margin-top: 0;
.tag { display: inline-block;
font-size: 12px; }
padding: .3em .4em .4em;
margin: 0 .1em;
a {
color: #bbb;
cursor: pointer;
opacity: 0.6;
margin: 0 0 0 .3em;
.divider{
height: 1px;
margin: 9px 0;
overflow: hidden;
background-color: #e5e5e5;
}
&:hover { .checkbox-custom input[type="checkbox"] {
opacity: 1.0; cursor: pointer;
z-index: 2;
margin: -6px 0 0 0;
top: 50%;
left: 3px;
} }
.glyphicon-white { .checkbox-custom label:before {
color: #fff; content: '';
margin-bottom: 2px; position: absolute;
top: 50%;
left: 0;
margin-top: -9px;
width: 19px;
height: 18px;
display: inline-block;
border-radius: 2px;
border: 1px solid #bbb;
background: #fff;
} }
}
.remove { .checkbox-custom input[type="checkbox"]:checked +label:after {
vertical-align: bottom; position: absolute;
top: 0; display: inline-block;
} font-family: 'Glyphicons Halflings';
} content: "\e013";
/*Filter Criteria tags:*/ top: 42%;
/*******************************************/ left: 3px;
.main-area { margin-top: -5px;
height: 100%; font-size: 11px;
margin: 0 20px; line-height: 1;
width: 16px;
height: 16px;
color: #333;
}
.checkbox-custom label {
cursor: pointer;
line-height: 1.2;
font-weight: normal;
margin-bottom: 0;
text-align: left;
}
.watermark { .period-picker {
position: absolute; width: 110px;
top: 50%; border: 1px solid #c7c5c0;
transform: translateY(-50%); display: inline-block;
opacity: .25; line-height: 20px;
font-size: 3em; margin-top: 7px;
width: 100%; }
text-align: center;
z-index: 1000;
}
.inputInvoiceGrid { .imp-subheader {
width: 100%; display: inline-block;
height: calc(~'100% - 158px'); font-size: 15px;
height: 30px;
line-height: 30px;
vertical-align: middle;
border: none;
.ui-grid-header-cell-wrapper .ui-grid-header-cell-row .ui-grid-cell-contents {
height: 40px;
i { select {
display: none; appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
background: transparent;
} }
} }
}
}
.dropdown {
.dropdown-common();
}
.form-control { input {
width: 50px;
&:focus { outline: none;
border-color: transparent; border-radius: 3px;
-webkit-box-shadow: none; border: 1px solid #3c3a36;
box-shadow: none; padding: 2px;
border: 1px solid #ccc; text-align: center;
} }
}
.input-width-middle { > button:last-child {
width: 217px; float: right;
} margin-right: 20px;
} }
.btn-wrapper {
border-radius: 5px;
background-color: #e0301e;
color: #FFF;
display: inline-block;
float: right;
margin-right: 10px;
.btn-vat-primary {
min-width: 80px;
}
}
}
.popover { .dt-init-wrapper {
min-width: 370px; //margin: 60px 0;
max-width: 99%;
height: calc(100% - 200px);
position: relative;
.arrow { .dropdown {
left: 5% !important; .dropdown-common();
}
}
.popover-content { i {
td { color: #F85550;
text-align: right; }
padding: 6px; }
span { .extractFinancialGridContainer {
float: left; height: calc(~'100% - 30px');
overflow: hidden;
position: absolute;
top: 0;
bottom: 136px; /* 130 + 6 */
left: 0;
right: 0;
background-color: #FFF;
}
} }
}
.form-control { .error-info-wrapper {
display: inline-block; position: absolute;
height: 150px;
bottom: 0;
left: 0;
right: 0;
overflow: hidden;
background-color: #FFF;
margin-left: -40px;
}
&:focus { #content-resizer {
border-color: transparent; width: 110%;
-webkit-box-shadow: none; position: absolute;
box-shadow: none; height: 4px;
border: 1px solid #ccc; bottom: 150px;
left: 0;
right: 0;
background-color: red;
cursor: n-resize;
margin-left: -40px;
#topIcon {
cursor: pointer;
margin-top: -19px;
width: 38px;
margin-left: 46%;
z-index: 999;
bottom: -381px;
text-align: center;
display: block !important;
}
} }
}
.input-width-small { .dt-import-wrapper {
width: 100px; margin: 60px 0;
max-width: 99%;
overflow: auto;
height: calc(~"100% - 35px");
.dropdown {
.dropdown-common();
i {
color: #F85550;
}
}
}
} }
.input-width-middle { /*覆写ack-pagination.less中:.page-size, .pagination 中的margin演示 */
width: 217px; .page-form-group{
float:right;
.page-size{
margin:0;
}
.pagination {
margin:0;
}
} }
} }
.nav-wrapper { .nav-wrapper {
padding-bottom: 10px; padding-bottom: 10px;
border-bottom: 1px solid #DBD8D3; border-bottom: 1px solid #DBD8D3;
......
...@@ -37,16 +37,13 @@ ...@@ -37,16 +37,13 @@
}; };
//从数据库中load数据 //从数据库中load数据
var loadJournalEntryDataFromDB = function (pageIndex) { var loadJournalEntryDataFromDB = function () {
initJournalEntryPagination(); //初始化查询信息
$scope.curJournalEntryPage = pageIndex;
//初始化查询信息
$scope.queryParams = { $scope.queryParams = {
pageInfo: { pageInfo: {
totalCount: $scope.queryJournalEntryResult.pageInfo.totalCount, totalCount: $scope.pagingOptions.totalItems,
pageIndex: pageIndex, pageIndex: $scope.pagingOptions.pageIndex,
pageSize: $scope.queryJournalEntryResult.pageInfo.pageSize, pageSize: $scope.pagingOptions.pageSize,
totalPage: 0 totalPage: 0
}, },
periodStart: '', periodStart: '',
...@@ -69,80 +66,12 @@ ...@@ -69,80 +66,12 @@
resp.data.list.forEach(function (v) { resp.data.list.forEach(function (v) {
v.index = index++; v.index = index++;
}); });
$scope.gridOptions.data = resp.data.list; // $scope.gridOptions.data = resp.data.list;
$scope.queryJournalEntryResult.pageInfo = resp.data; $scope.gridDataSource = resp.data.list;
computeJournalEntryPage();
// $scope.ledgerName = data.list[0].ledgerName;
// $scope.currencyCode = data.list[0].currencyCode;
// $scope.status = data.list[0].status;
// $scope.importDate = $filter('date')(data.list[0].date, "yyyy-MM-dd hh:mm:ss");
}
});
};
//点击任意一页加载数据事件
var loadIncomeInvoiceDataByPage = function (pageIndex) {
loadJournalEntryDataFromDB(pageIndex);
};
//计算页数,创建分页栏
var computeJournalEntryPage = function () {
if ($scope.queryJournalEntryResult.pageInfo && $scope.queryJournalEntryResult.pageInfo.total > 0) {
var totalPage = parseInt($scope.queryJournalEntryResult.pageInfo.total / $scope.queryJournalEntryResult.pageInfo.pageSize);
totalPage = $scope.queryJournalEntryResult.pageInfo.totalCount % $scope.queryJournalEntryResult.pageInfo.pageSize == 0 ? totalPage : totalPage + 1;
//计算本页记录数
if ($scope.queryJournalEntryResult.pageInfo.pageNum === totalPage) {
$scope.curPageItemCount = $scope.queryJournalEntryResult.pageInfo.total % $scope.queryJournalEntryResult.pageInfo.pageSize;
}
else {
$scope.curPageItemCount = $scope.queryJournalEntryResult.pageInfo.pageSize;
}
$scope.queryJournalEntryResult.pageInfo.totalPage = totalPage;
var createPage = $("#totalInvoicePage").createPage({
pageCount: totalPage,
current: $scope.curJournalEntryPage,
backFn: function (p) {
//单击回调方法,p是当前页码
loadIncomeInvoiceDataByPage(p);
}
});
$('#totalInvoicePage').css('display', 'inline-block');
} else {
//如果查询结果为0,则直接设置本页记录数为0
$scope.curPageItemCount = 0;
var createPage = $("#totalInvoicePage").createPage({
pageCount: 0,
current: $scope.curJournalEntryPage,
backFn: function (p) {
//单击回调方法,p是当前页码
loadIncomeInvoiceDataByPage(p);
}
});
$('#totalInvoicePage').css('display', 'inline-block');
}
};
//初始化分页信息 $scope.pagingOptions.totalItems = resp.data.total;
var initJournalEntryPagination = function () {
$scope.queryJournalEntryResult = {
list: [],
pageInfo: {
totalCount: -1,
pageIndex: 1,
pageSize: constant.pagesize,
totalPage: 0,
} }
} });
$scope.curJournalEntryPage = 1;
}; };
//将选择了的查询条件显示在grid上方 //将选择了的查询条件显示在grid上方
...@@ -175,14 +104,7 @@ ...@@ -175,14 +104,7 @@
}); });
} }
loadJournalEntryDataFromDB(1); loadJournalEntryDataFromDB();
if ($scope.criteriaList.length > 6) {
$scope.criteriaListFirstRow = $scope.criteriaList.slice(0, 6);
$scope.criteriaListSecondRow = $scope.criteriaList.slice(6, $scope.criteriaList.length);
}
else {
$scope.criteriaListFirstRow = $scope.criteriaList.slice(0, $scope.criteriaList.length);
}
$('.filter-button').popover("hide"); $('.filter-button').popover("hide");
}; };
...@@ -201,7 +123,7 @@ ...@@ -201,7 +123,7 @@
}; };
$scope.queryParams.periodStart = $scope.startMonth; $scope.queryParams.periodStart = $scope.startMonth;
$scope.queryParams.periodEnd = $scope.endMonth; $scope.queryParams.periodEnd = $scope.endMonth;
loadJournalEntryDataFromDB(1); loadJournalEntryDataFromDB();
$('.filter-button').popover("hide"); $('.filter-button').popover("hide");
}; };
...@@ -262,7 +184,7 @@ ...@@ -262,7 +184,7 @@
$scope.totalBusinessIncome = data.data.totalBusinessIncome; $scope.totalBusinessIncome = data.data.totalBusinessIncome;
$scope.totalEmployeeRemuneration = data.data.totalEmployeeRemuneration; $scope.totalEmployeeRemuneration = data.data.totalEmployeeRemuneration;
$scope.totalTotalAssets = data.data.totalTotalAssets; $scope.totalTotalAssets = data.data.totalTotalAssets;
loadJournalEntryDataFromDB(1); loadJournalEntryDataFromDB();
// if(status===204){ // if(status===204){
// SweetAlert.warning("没有数据可以下载"); // SweetAlert.warning("没有数据可以下载");
// return; // return;
...@@ -272,8 +194,23 @@ ...@@ -272,8 +194,23 @@
}); });
}; };
//刷新页面
$scope.refreshConfigGrid = function () {
loadJournalEntryDataFromDB();
};
(function initialize() { (function initialize() {
$log.debug('citDistributionTableController.ctor()...'); $log.debug('citDistributionTableController.ctor()...');
//分页的设置
$scope.pagingOptions = {
pageIndex: 1, //当前页码
totalItems: 0, //总数据
pageSize: 50, //每页多少条数据
pageSizeString:"50"
};
$('#input-invoice-period-picker').focus(function () { $('#input-invoice-period-picker').focus(function () {
$('.filter-button').popover("hide"); $('.filter-button').popover("hide");
}); });
...@@ -295,36 +232,105 @@ ...@@ -295,36 +232,105 @@
$scope.queryParams.periodStart = startMonth; $scope.queryParams.periodStart = startMonth;
$scope.queryParams.periodEnd = endMonth; $scope.queryParams.periodEnd = endMonth;
loadJournalEntryDataFromDB(1); loadJournalEntryDataFromDB();
}); });
//格式化Grid
$scope.gridOptions = { $scope.gridOptions = {
rowHeight: constant.UIGrid.rowHeight, bindingOptions: {
showColumnFooter: true, dataSource: 'gridDataSource'
selectionRowHeaderWidth: constant.UIGrid.rowHeight, },
// expandableRowTemplate: '<div ui-grid="row.entity.subGridOptions" style="height:150px;"></div>', showBorders: true,
virtualizationThreshold: 50,//默认加载50条数据,避免在数据展示时,只显示前面4条 columns: [
enableSorting: false, {caption: $translate.instant('TaxPayerNumber'), dataField: "taxPayerNumber",width: 200},
enableColumnMenus: false, {caption: $translate.instant('OrgName'), dataField: "orgName",width: 300},
enableHorizontalScrollbar : 1, {
columnDefs: [ caption: $translate.instant('BusinessIncome'),
{ name: $translate.instant('TaxPayerNumber'), width: 250, cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.taxPayerNumber}}<span></div>' }, dataField: "businessIncome",
{ name: $translate.instant('OrgName'), width: 350,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.orgName}}<span></div>' format: {type: 'fixedPoint', precision: 2},
, footerCellTemplate: '<div class="ui-grid-cell-contents" translate="Subtotal"> </div>'}, width: 200
{ name: $translate.instant('BusinessIncome'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.businessIncome}}</span></div>' },
, footerCellTemplate: '<div class="ui-grid-cell-contents">'+$scope.totalBusinessIncome+'</div>'}, {
{ name: $translate.instant('EmployeeRemuneration'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.employeeRemuneration}}</span></div>' caption: $translate.instant('EmployeeRemuneration'),
, footerCellTemplate: '<div class="ui-grid-cell-contents">'+$scope.totalEmployeeRemuneration+'</div>'}, dataField: "employeeRemuneration",
{ name: $translate.instant('TotalAssets'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.totalAssets}}</span></div>' format: {type: 'fixedPoint', precision: 2},
, footerCellTemplate: '<div class="ui-grid-cell-contents">'+$scope.totalTotalAssets+'</div>'}, width: 200
{ name: $translate.instant('DistributionRatio'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.distributionRatio}}</span></div>' },
, footerCellTemplate: '<div class="ui-grid-cell-contents"><span>100<span></div>'}, {
// { name: $translate.instant('DistributionAmount'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.distributionAmount}}</span></div>' caption: $translate.instant('TotalAssets'),
// , footerCellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.orgName}}<span></div>'}, dataField: "totalAssets",
format: {type: 'fixedPoint', precision: 2},
width: 200
},
{
caption: $translate.instant('DistributionRatio'),
dataField: "distributionRatio",
format: {type: 'fixedPoint', precision: 2},
width: 200
}
],
// onContentReady: function (e) {
// $scope.extractFinancialInstance = e.component;
// var totalCount = e.component.totalCount();
// if (totalCount > 0) {
// $scope.totalCount = totalCount;
// }
// },
loadPanel: {
enabled: true
},
selection: {
mode: "single"
},
grouping: {
autoExpandAll: false
},
allowColumnResizing: true,
columnAutoWidth: true,
showRowLines: true,
showColumnLines: true,
rowAlternationEnabled: true, //单双行颜色
noDataText: $translate.instant('NoDataText'),
summary: {
totalItems: [
{
column: 'orgName',
customizeText: function (item) {
return $translate.instant('Subtotal');
}
},
{
column: 'businessIncome',
summaryType: 'sum',
customizeText: function (data) {
return data.value.formatAmount(2);
}
},
{
column: 'employeeRemuneration',
summaryType: 'sum',
customizeText: function (data) {
return data.value.formatAmount(2);
}
},
{
column: 'totalAssets',
summaryType: 'sum',
customizeText: function (data) {
return data.value.formatAmount(2);
}
},
{
column: 'distributionRatio',
summaryType: 'sum',
customizeText: function (data) {
return data.value.formatAmount(2);
}
}
] ]
}
}; };
$scope.doDataFilter = doDataFilter; $scope.doDataFilter = doDataFilter;
$scope.doDataFilterReset = doDataFilterReset; $scope.doDataFilterReset = doDataFilterReset;
$scope.prepareSummary = prepareSummary; $scope.prepareSummary = prepareSummary;
...@@ -332,7 +338,6 @@ ...@@ -332,7 +338,6 @@
$scope.downloadJE = downloadJE; $scope.downloadJE = downloadJE;
initPeriods(); initPeriods();
initJournalEntryPagination();
//初始化查询条件-期间范围 //初始化查询条件-期间范围
$scope.queryParams.periodStart = vatSessionService.year * 100 + vatSessionService.month; $scope.queryParams.periodStart = vatSessionService.year * 100 + vatSessionService.month;
$scope.queryParams.periodEnd = vatSessionService.year * 100 + vatSessionService.month; $scope.queryParams.periodEnd = vatSessionService.year * 100 + vatSessionService.month;
...@@ -342,7 +347,7 @@ ...@@ -342,7 +347,7 @@
}else{ }else{
$('.periodInput')[0].style.left = "150px"; $('.periodInput')[0].style.left = "150px";
} }
loadJournalEntryDataFromDB(1); loadJournalEntryDataFromDB();
})(); })();
} }
]); ]);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="nav-header">{{'DistributionTable' | translate}}</div> <div class="nav-header">{{'DistributionTable' | translate}}</div>
<div class="nav-tab"> <div class="nav-tab">
<span style="width: auto" ng-click="startCalculateData()">{{'startCaculateData' | translate}}</span> <span style="width: auto" ng-click="startCalculateData()">{{'startCaculateData' | translate}}</span>
<span ng-click="downloadJE()" style="float: right;"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span> <span ng-click="downloadJE()" style="float: right;margin-right: 20px"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>
</div> </div>
</div> </div>
<div class="top-area-wrapper" style="margin-top: 10px;display: none"> <div class="top-area-wrapper" style="margin-top: 10px;display: none">
...@@ -20,31 +20,16 @@ ...@@ -20,31 +20,16 @@
<!--{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>--> <!--{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>-->
<!--</div>--> <!--</div>-->
<div id="filterCriteriaDiv" style="max-width:98%;margin-bottom:2px;" ng-show="criteriaList.length>0"> <div id="tab_total">
<span class="text-bold margin-left20" translate="FilterCriteriaTags"></span>: <div class="dt-init-wrapper">
<span class="tag label label-default" ng-repeat="criteria in criteriaListFirstRow"> <div class="dx-viewport grid-container">
<span title="{{criteria.fullName}}"> <div id="extractFinancialGridContainer" dx-data-grid="gridOptions"
{{criteria.name}} style="margin-top: 30px;">
</span> </div>
<a><i class="remove glyphicon glyphicon-remove-sign glyphicon-white" ng-click="doDataFilter(criteria.propertyName)"></i></a> </div>
</span> <div class="page-footer">
<span ng-if="criteriaList.length>6"><br /></span> <ack-pagination page-options="pagingOptions"
<span ng-if="criteriaList.length>6" style="margin-left: 81px; margin-top: 19px; display: inline-block;"></span> refresh-table="refreshConfigGrid()"></ack-pagination>
<span ng-if="criteriaList.length>6" class="tag label label-default" ng-repeat="criteria in criteriaListSecondRow">
<span title="{{criteria.fullName}}">
{{criteria.name}}
</span>
<a><i class="remove glyphicon glyphicon-remove-sign glyphicon-white" ng-click="doDataFilter(criteria.propertyName)"></i></a>
</span>
</div>
<div id="mainAreaDiv" class="main-area">
<div class="inputInvoiceGrid" ui-grid="gridOptions">
<div class="watermark" ng-show="!gridOptions.data.length"><span translate="NoDataAvailable"></span></div>
</div>
<div class="pagination-container">
<span>本页{{curPageItemCount}}条记录,共{{queryJournalEntryResult.pageInfo.total}}条记录</span>
<div id="totalInvoicePage" class="common-pagination" style="display:none;">
</div> </div>
</div> </div>
</div> </div>
......
@import "~/app-resources/less/theme.less"; @import "~/app-resources/less/theme.less";
.cit-distribution-table { .cit-distribution-table {
background-color: white; /*background-color: @color-white;*/
height: 100%; padding-left: 20px;
/*min-height: 800px;*/
.numAmount { height: 96%;
padding: 0 3px;
height: 21px;
margin-left: 5px;
/* font-family: 'Arial'; */
font-weight: 600;
border-radius: 2px;
font-style: normal;
outline: none;
border: none;
min-width: 20px;
background-color: #DDDDDD;
color: #AA0000;
}
.top-area-wrapper { .dropdown-common() {
height: 60px; display: inline-block;
width: 98%;
margin: 0 20px;
.filter-button { .select-button {
width: 30px; background-color: #F5F5F5;
margin-top: 16px; padding: 6px 0;
width: 100px;
} }
.operation-wrapper { .caret {
margin: 15px 25px 10px 10px; margin-top: 8px;
}
span { .dropdown-menu {
cursor: pointer; min-width: 100px;
li {
text-align: center;
min-height: 0px;
height: 30px;
line-height: 30px;
color: #000;
font-weight: normal;
&:hover {
background-color: #F91000;
color: #FFF;
}
} }
} }
} }
.filter-popup-wrapper { #tab_total {
display: none; display: block;
} height: calc(~'100% - 40px');
position: relative;
.import-wrapper {
span {
margin-left: 10px;
color: #333;
font-family: "Microsoft YaHei";
font-style: normal;
font-size: 14px;
font-weight: bold;
}
.margin-left20 { .checkbox-custom {
margin-left: 20px; float: left;
} position: relative;
/*******************************************/ margin-right : 10px;
/*Filter Criteria tags:*/ margin-top: 0;
.tag { display: inline-block;
font-size: 12px; }
padding: .3em .4em .4em;
margin: 0 .1em;
a {
color: #bbb;
cursor: pointer;
opacity: 0.6;
margin: 0 0 0 .3em;
.divider{
height: 1px;
margin: 9px 0;
overflow: hidden;
background-color: #e5e5e5;
}
&:hover { .checkbox-custom input[type="checkbox"] {
opacity: 1.0; cursor: pointer;
z-index: 2;
margin: -6px 0 0 0;
top: 50%;
left: 3px;
} }
.glyphicon-white { .checkbox-custom label:before {
color: #fff; content: '';
margin-bottom: 2px; position: absolute;
top: 50%;
left: 0;
margin-top: -9px;
width: 19px;
height: 18px;
display: inline-block;
border-radius: 2px;
border: 1px solid #bbb;
background: #fff;
} }
}
.remove { .checkbox-custom input[type="checkbox"]:checked +label:after {
vertical-align: bottom; position: absolute;
top: 0; display: inline-block;
} font-family: 'Glyphicons Halflings';
} content: "\e013";
/*Filter Criteria tags:*/ top: 42%;
/*******************************************/ left: 3px;
.main-area { margin-top: -5px;
height: 100%; font-size: 11px;
//margin: 0 20px; line-height: 1;
width: 16px;
height: 16px;
color: #333;
}
.checkbox-custom label {
cursor: pointer;
line-height: 1.2;
font-weight: normal;
margin-bottom: 0;
text-align: left;
}
.watermark { .period-picker {
position: absolute; width: 110px;
top: 50%; border: 1px solid #c7c5c0;
transform: translateY(-50%); display: inline-block;
opacity: .25; line-height: 20px;
font-size: 3em; margin-top: 7px;
width: 100%; }
text-align: center;
z-index: 1000;
}
.inputInvoiceGrid { .imp-subheader {
width: 100%; display: inline-block;
height: calc(~'100% - 158px'); font-size: 15px;
height: 30px;
line-height: 30px;
vertical-align: middle;
border: none;
.ui-grid-header-cell-wrapper .ui-grid-header-cell-row .ui-grid-cell-contents {
height: 40px;
i { select {
display: none; appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
background: transparent;
} }
} }
}
}
.dropdown {
.dropdown-common();
}
input {
width: 50px;
outline: none;
border-radius: 3px;
border: 1px solid #3c3a36;
padding: 2px;
text-align: center;
}
> button:last-child {
float: right;
margin-right: 20px;
}
.form-control { .btn-wrapper {
border-radius: 5px;
background-color: #e0301e;
color: #FFF;
display: inline-block;
float: right;
margin-right: 10px;
&:focus { .btn-vat-primary {
border-color: transparent; min-width: 80px;
-webkit-box-shadow: none; }
box-shadow: none; }
border: 1px solid #ccc;
} }
}
.input-width-middle { .dt-init-wrapper {
width: 217px; //margin: 60px 0;
} max-width: 99%;
} height: calc(100% - 200px);
position: relative;
.popover { .dropdown {
min-width: 370px; .dropdown-common();
.arrow { i {
left: 5% !important; color: #F85550;
} }
} }
.popover-content {
td {
text-align: right;
padding: 6px;
span { .extractFinancialGridContainer {
float: left; height: calc(~'100% - 30px');
overflow: hidden;
position: absolute;
top: 0;
bottom: 136px; /* 130 + 6 */
left: 0;
right: 0;
background-color: #FFF;
}
} }
}
.form-control { .error-info-wrapper {
display: inline-block; position: absolute;
height: 150px;
bottom: 0;
left: 0;
right: 0;
overflow: hidden;
background-color: #FFF;
margin-left: -40px;
}
&:focus { #content-resizer {
border-color: transparent; width: 110%;
-webkit-box-shadow: none; position: absolute;
box-shadow: none; height: 4px;
border: 1px solid #ccc; bottom: 150px;
left: 0;
right: 0;
background-color: red;
cursor: n-resize;
margin-left: -40px;
#topIcon {
cursor: pointer;
margin-top: -19px;
width: 38px;
margin-left: 46%;
z-index: 999;
bottom: -381px;
text-align: center;
display: block !important;
}
} }
}
.input-width-small { .dt-import-wrapper {
width: 100px; margin: 60px 0;
} max-width: 99%;
overflow: auto;
height: calc(~"100% - 35px");
.input-width-middle { .dropdown {
width: 217px; .dropdown-common();
i {
color: #F85550;
}
}
}
} }
/*覆写ack-pagination.less中:.page-size, .pagination 中的margin演示 */
.page-form-group{
float:right;
.page-size{
margin:0;
}
.pagination {
margin:0;
}
}
} }
.nav-wrapper { .nav-wrapper {
......
...@@ -319,10 +319,18 @@ ...@@ -319,10 +319,18 @@
$scope.reportTwoDataSource = []; $scope.reportTwoDataSource = [];
$scope.reportThreeDataSource = []; $scope.reportThreeDataSource = [];
angular.forEach(res, function (data) { angular.forEach(res, function (data) {
if ("增值税纳税申报表" === data.reportType || "增值税更正申报表" === data.reportType) { if ("企业所得税第一季度预缴表" === data.reportType || "企业所得税更正第一季度预缴表" === data.reportType
|| "企业所得税第二季度预缴表" === data.reportType || "企业所得税更正第二季度预缴表" === data.reportType
|| "企业所得税第三季度预缴表" === data.reportType || "企业所得税更正第三季度预缴表" === data.reportType
|| "企业所得税第四季度预缴表" === data.reportType || "企业所得税更正第四季度预缴表" === data.reportType
|| "企业所得税汇算清缴纳税申报表" === data.reportType || "企业所得税更正汇算清缴纳税申报表" === data.reportType) {
$scope.reportTwoDataSource.push(data); $scope.reportTwoDataSource.push(data);
} }
if ("增值税纳税税票" === data.reportType || "增值税更正税票" === data.reportType) { if ("企业所得税第一季度纳税税票" === data.reportType || "企业所得税第一季度更正纳税税票" === data.reportType
|| "企业所得税第二季度纳税税票" === data.reportType || "企业所得税更正第二季度纳税税票" === data.reportType
|| "企业所得税第三季度纳税税票" === data.reportType || "企业所得税更正第三季度纳税税票" === data.reportType
|| "企业所得税第四季度纳税税票" === data.reportType || "企业所得税更正第四季度纳税税票" === data.reportType
|| "企业所得税汇算清缴纳税税票" === data.reportType || "企业所得税更正汇算清缴纳税税票" === data.reportType) {
$scope.reportThreeDataSource.push(data); $scope.reportThreeDataSource.push(data);
} }
}); });
......
<div class="cit-report-upload-detail"> <div class="cit-report-upload-detail" style="overflow-y: auto">
<div class="header-title"> <div class="header-title">
<div style="display:inline-block"><span class="title-name">{{'ReportUploadDetail' | translate }}</span></div> <div style="display:inline-block"><span class="title-name">{{'ReportUploadDetail' | translate }}</span></div>
</div> </div>
......
...@@ -170,10 +170,11 @@ ...@@ -170,10 +170,11 @@
}, },
__RequestVerificationToken: token, __RequestVerificationToken: token,
withCredentials: true withCredentials: true
}).then(function(resp) { }).then(function(data) {
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
var resp = data.data;
deferred.resolve(); deferred.resolve();
if (resp.data || resp.result) { if (resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess')+" "+resp.data + $translate.instant('ItemData'); logDto.UpdateState = $translate.instant('ImportSuccess')+" "+resp.data + $translate.instant('ItemData');
vatOperationLogService.addOperationLog(logDto); vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess')+" "+resp.data + $translate.instant('ItemData')); SweetAlert.success($translate.instant('ImportSuccess')+" "+resp.data + $translate.instant('ItemData'));
......
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