Commit e68f97ab 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
parent 773b16bb
...@@ -10,13 +10,18 @@ import java.io.IOException; ...@@ -10,13 +10,18 @@ import java.io.IOException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
/**
* author kevin
* target : Solve date conversion issues
* version 1.0
*/
public class CustomDateSerializer extends JsonSerializer<Date> { public class CustomDateSerializer extends JsonSerializer<Date> {
@Override @Override
public void serialize(Date value, JsonGenerator jgen, SerializerProvider arg2) public void serialize(Date value, JsonGenerator jgen, SerializerProvider arg2)
throws IOException, JsonProcessingException { throws IOException, JsonProcessingException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String formattedDate = formatter.format(value); String formattedDate = formatter.format(value);
jgen.writeString(formattedDate); jgen.writeString(formattedDate);
......
...@@ -92,4 +92,7 @@ public class BeanUtil { ...@@ -92,4 +92,7 @@ public class BeanUtil {
return new String(ch); return new String(ch);
} }
} }
package pwc.taxtech.atms.common.util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Component;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.Project;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;
/**
* author kevin
* version 1.0
* 封装一些简单的数据处理
*/
@Component
public class DataUtil {
@Autowired
private JdbcTemplate jdbcTemplate;
//通过projectId查询project信息
public Map<String, Object> getProjectById(String projectId){
return jdbcTemplate.queryForMap("select * from project where id = ?", projectId);
}
}
...@@ -128,4 +128,30 @@ public final class Constant { ...@@ -128,4 +128,30 @@ public final class Constant {
public static String DECIMAL_FORMAT = "#,##0.00"; public static String DECIMAL_FORMAT = "#,##0.00";
public static String ZERO_STR = "0"; public static String ZERO_STR = "0";
public static class ReportDataValidateLog{
private String segment3 = null;
private String segment5 = null;
private String segment6 = null;
private static boolean status = true;
public String getResult(boolean status){
if(status){
return "校验结果失败: 科目代码: " + segment3 + ";利润中心:" + segment5 + "; 产品编号: " + segment6;
}
return "校验结果成功: 科目代码: " + segment3 + ";利润中心:" + segment5 + "; 产品编号: " + segment6;
}
public String getResult(){
return getResult(status);
}
public ReportDataValidateLog(String segment3, String segment5, String segment6){
this.segment3 = segment3;
this.segment5 = segment5;
this.segment6 = segment6;
}
}
} }
\ No newline at end of file
package pwc.taxtech.atms.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
import pwc.taxtech.atms.dto.previewData.CitSalaryDataDto;
import pwc.taxtech.atms.entity.CitSalaryAdvance;
import pwc.taxtech.atms.service.impl.CitPreviewDataServiceImpl;
@Controller
@RequestMapping("api/v1/citPreviewDataController")
public class CitPreviewDataController {
@Autowired
private CitPreviewDataServiceImpl citPreviewDataService;
@RequestMapping("getSalaryAdvaceListData")
@ResponseBody
public CamelPagingResultDto<CitSalaryAdvance> getSalaryAdvaceListData(@RequestBody CitSalaryDataDto citSalaryDataDto){
return new CamelPagingResultDto<>(citPreviewDataService.getCitSalaryAdvanceDataList(citSalaryDataDto));
}
}
...@@ -58,7 +58,7 @@ public class OperationLogController { ...@@ -58,7 +58,7 @@ public class OperationLogController {
public Boolean addOperationLog(VatOperationLog vatOperationLog) { public Boolean addOperationLog(VatOperationLog vatOperationLog) {
OperationLogDto operationLogDto = new OperationLogDto(); OperationLogDto operationLogDto = new OperationLogDto();
CommonUtils.copyProperties(vatOperationLog, operationLogDto); CommonUtils.copyProperties(vatOperationLog, operationLogDto);
// operationLogService.addOperationLog(operationLogDto); operationLogService.addOperationLog(operationLogDto);
return true; return true;
} }
} }
package pwc.taxtech.atms.dto; package pwc.taxtech.atms.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;
import pwc.taxtech.atms.common.CustomDateSerializer; import pwc.taxtech.atms.common.CustomDateSerializer;
import pwc.taxtech.atms.entity.BaseEntity; import pwc.taxtech.atms.entity.BaseEntity;
......
...@@ -17,6 +17,33 @@ public class QueryOperateParamDto { ...@@ -17,6 +17,33 @@ public class QueryOperateParamDto {
private Integer logType; private Integer logType;
private PagingDto pageInfo; private PagingDto pageInfo;
private String QueryValue;
private String Period;
private String ModuleID;
public String getQueryValue() {
return QueryValue;
}
public void setQueryValue(String queryValue) {
QueryValue = queryValue;
}
public String getPeriod() {
return Period;
}
public void setPeriod(String period) {
Period = period;
}
public String getModuleID() {
return ModuleID;
}
public void setModuleID(String moduleID) {
ModuleID = moduleID;
}
public String getSearchText() { public String getSearchText() {
return searchText; return searchText;
......
...@@ -17,6 +17,7 @@ public class RevenueConfResult extends RevenueConfig { ...@@ -17,6 +17,7 @@ public class RevenueConfResult extends RevenueConfig {
} }
public String getRevenueTypeStr() { public String getRevenueTypeStr() {
return RevenueConfEnum.RevenueType.MAPPING.get(this.getRevenueType()); return RevenueConfEnum.RevenueType.MAPPING.get(this.getRevenueType());
} }
......
package pwc.taxtech.atms.service.impl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.CitSalaryAdvanceMapper;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
import pwc.taxtech.atms.dto.previewData.CitSalaryDataDto;
import pwc.taxtech.atms.dto.vatdto.dd.BalanceSheetDto;
import pwc.taxtech.atms.entity.CitSalaryAdvance;
import pwc.taxtech.atms.entity.CitSalaryAdvanceExample;
import java.util.List;
@Service
public class CitPreviewDataServiceImpl {
@Autowired
private CitSalaryAdvanceMapper citSalaryAdvanceMapper;
public PageInfo<CitSalaryAdvance> getCitSalaryAdvanceDataList(CitSalaryDataDto citSalaryDataDto ){
CitSalaryAdvanceExample example = new CitSalaryAdvanceExample();
CitSalaryAdvanceExample.Criteria criteria = example.createCriteria();
if(!"".equals(citSalaryDataDto.getPoSubjectName()) && citSalaryDataDto.getPoSubjectName() != null){//根据PO主体名称进行查询
criteria.andPoSubjectNameEqualTo(citSalaryDataDto.getPoSubjectName());
}
Page page = PageHelper.startPage(citSalaryDataDto.getPageInfo().getPageIndex(), citSalaryDataDto.getPageInfo().getPageSize());
List<CitSalaryAdvance> citSalaryAdvances = citSalaryAdvanceMapper.selectByExample(example);
PageInfo<CitSalaryAdvance> pageInfo =new PageInfo<CitSalaryAdvance>(citSalaryAdvances);
pageInfo.setTotal(page.getTotal());
return pageInfo;
}
}
...@@ -104,7 +104,7 @@ public class OperationLogServiceImpl extends AbstractService { ...@@ -104,7 +104,7 @@ public class OperationLogServiceImpl extends AbstractService {
public PagingResultDto<OperationLogDto> getOperationLogList(QueryOperateParamDto queryOperateParamDto) { public PagingResultDto<OperationLogDto> getOperationLogList(QueryOperateParamDto queryOperateParamDto) {
logger.debug("OperationLogService getOperationLogList"); logger.debug("OperationLogService getOperationLogList");
// validate // validate
Assert.hasText(queryOperateParamDto.getModuleName(), "Empty moduleName"); // Assert.hasText(queryOperateParamDto.getModuleName(), "Empty moduleName");
final PagingDto pageInfo = queryOperateParamDto.getPageInfo(); final PagingDto pageInfo = queryOperateParamDto.getPageInfo();
......
...@@ -14,13 +14,12 @@ import org.apache.poi.ss.usermodel.Workbook; ...@@ -14,13 +14,12 @@ import org.apache.poi.ss.usermodel.Workbook;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.CommonUtils; import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.util.DateUtils; import pwc.taxtech.atms.common.util.*;
import pwc.taxtech.atms.common.util.FileUploadUtil;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.Constant; import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.constant.enums.*; import pwc.taxtech.atms.constant.enums.*;
import pwc.taxtech.atms.dao.*; import pwc.taxtech.atms.dao.*;
...@@ -553,7 +552,6 @@ public class ReportServiceImpl extends BaseService { ...@@ -553,7 +552,6 @@ public class ReportServiceImpl extends BaseService {
private JournalEntryMapper journalEntryMapper; private JournalEntryMapper journalEntryMapper;
/* @Autowired /* @Autowired
private CitJour*/ private CitJour*/
//数据校验 //数据校验
private void DataValidation(Integer periodParam, String projectId, PeriodJob genJob) { private void DataValidation(Integer periodParam, String projectId, PeriodJob genJob) {
setStatus(genJob,"DA004", STATUS_BEGIN); setStatus(genJob,"DA004", STATUS_BEGIN);
...@@ -590,20 +588,62 @@ public class ReportServiceImpl extends BaseService { ...@@ -590,20 +588,62 @@ public class ReportServiceImpl extends BaseService {
}else{ }else{
map2.put("period", "" + periodParam); map2.put("period", "" + periodParam);
} }
Map<String, Object> map = new HashMap<>();
map.put("period", periodParam);
map.put("projectId", projectId);
Map<String, Object> mapProject = new DataUtil().getProjectById(projectId);
map.put("companyCode", mapProject.get("code"));
map.put("companyName", mapProject.get("name"));
List<JournalEntry> journalEntries = journalEntryMapper.selectNowAdjustData(map2); List<JournalEntry> journalEntries = journalEntryMapper.selectNowAdjustData(map2);
for(int i =0; i< adjustmentTables.size(); i++){ for(int i =0; i< adjustmentTables.size(); i++){
for(int j =0; j< journalEntries.size(); j++){ for(int j =0; j< journalEntries.size(); j++){
if(journalEntries.get(j).getSegment3().equals(adjustmentTables.get(j).getSegment3()) && JournalEntry journalEntry = journalEntries.get(j);
journalEntries.get(j).getSegment5().equals(adjustmentTables.get(j).getSegment5())&& AdjustmentTable adjustmentTable = adjustmentTables.get(j);
journalEntries.get(j).getSegment6().equals(adjustmentTables.get(j).getSegment6()) && journalEntries.get(j).getPeriodJrMinDr() != adjustmentTables.get(j).getPeriodDrMixCr() ){ if(journalEntry.getSegment3().equals(adjustmentTable.getSegment3()) &&
journalEntry.getSegment5().equals(adjustmentTable.getSegment5())&&
journalEntry.getSegment6().equals(adjustmentTable.getSegment6()) && journalEntry.getPeriodJrMinDr() != adjustmentTable.getPeriodDrMixCr() ){
setStatus(genJob,STATUS_ERROR ); setStatus(genJob,STATUS_ERROR );
Constant.ReportDataValidateLog reportDataValidateLog = new Constant.ReportDataValidateLog(journalEntries.get(j).getSegment3(), journalEntries.get(j).getSegment5(), journalEntries.get(j).getSegment6());
//记录校验结果
//
map.put("result", reportDataValidateLog.getResult(false));
map.put("validateResult", "error");
map.put("tmsPeriod", journalEntry.getTmsPeriod());
map.put("organizationId", journalEntry.getOrganizationId());
insertDataValidateResult(map);
periodJobMapper.updateByPrimaryKey(genJob);
return;
} }
} }
} }
setStatus(genJob, STATUS_END); setStatus(genJob, STATUS_END);
map.put("validateResult", "success");
map.put("result", "");
map.put("tmsPeriod", journalEntries.get(0).getTmsPeriod());
map.put("organizationId", journalEntries.get(0).getOrganizationId());
insertDataValidateResult(map);
periodJobMapper.updateByPrimaryKey(genJob); periodJobMapper.updateByPrimaryKey(genJob);
} }
@Autowired
private DataValidateLogMapper dataValidateLogMapper;
public void insertDataValidateResult(Map map){
DataValidateLog dataValidateLog = new DataValidateLog();
dataValidateLog.setCreateTime(new Date());
dataValidateLog.setPeriod((String)map.get("period"));
dataValidateLog.setProjectId((String)map.get("projectId"));
dataValidateLog.setValidateResult((String)map.get("validateResult"));
dataValidateLog.setResult((String)map.get("result"));
dataValidateLog.setOrganizationId((String)map.get("organizationId"));
dataValidateLog.setCompanyCode((String)map.get("companyCode"));
dataValidateLog.setCompanyName((String)map.get("companyName"));
dataValidateLog.setTmsPeriod(Long.parseLong(map.get("tmsPeriod").toString()));
dataValidateLogMapper.insert(dataValidateLog);
}
public List<CellTemplateReferenceDto> getTemplateReferences(int period) { public List<CellTemplateReferenceDto> getTemplateReferences(int period) {
return new ArrayList<>(); return new ArrayList<>();
......
package pwc.taxtech.atms.entity; package pwc.taxtech.atms.entity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -470,6 +472,8 @@ public class CitSalaryAdvance extends BaseEntity implements Serializable { ...@@ -470,6 +472,8 @@ public class CitSalaryAdvance extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@JsonSerialize(using = CustomDateSerializer.class)
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
...@@ -494,6 +498,7 @@ public class CitSalaryAdvance extends BaseEntity implements Serializable { ...@@ -494,6 +498,7 @@ public class CitSalaryAdvance extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@JsonSerialize(using = CustomDateSerializer.class)
public Date getUpdateTime() { public Date getUpdateTime() {
return updateTime; return updateTime;
} }
......
package pwc.taxtech.atms.entity;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class CustomDateSerializer extends JsonSerializer<Date> {
@Override
public void serialize(Date value, JsonGenerator jgen, SerializerProvider arg2)
throws IOException, JsonProcessingException {
// TODO Auto-generated method stub
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String formattedDate = formatter.format(value);
jgen.writeString(formattedDate);
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pwc.taxtech.atms.vat.dao.DataValidateLogMapper">
</mapper>
\ No newline at end of file
api.url=${api.url} api.url=${api.url}
cookie.maxAgeSeconds=${cookie.maxAgeSeconds} cookie.maxAgeSeconds=${cookie.maxAgeSeconds}
......
...@@ -250,14 +250,13 @@ ...@@ -250,14 +250,13 @@
//uses to remove expired localstorage cache after login successfully //uses to remove expired localstorage cache after login successfully
var removeExpiredLocalCache = function (data, returnUrl) { var removeExpiredLocalCache = function (data, returnUrl) {
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
url: data.ApiHost + '/api/v1/cache/getallcache', url: data.ApiHost + '/api/v1/cache/' +
'getallcache',
data: {}, data: {},
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",
success: function (cachelist) { success: function (cachelist) {
cachelist.push({ cachelist.push({
cacheKey: '/api/v1/user/getUserPermission', cacheKey: '/api/v1/user/getUserPermission',
cacheTime: '11', cacheTime: '11',
......
...@@ -1117,6 +1117,17 @@ ...@@ -1117,6 +1117,17 @@
"bsGenerateVer": "试算平衡生成版", "bsGenerateVer": "试算平衡生成版",
"bsMappingVer": "试算平衡Mapping版", "bsMappingVer": "试算平衡Mapping版",
"salaryAdvance": "预提重分类", "salaryAdvance": "预提重分类",
"eamDisposal": "EAM资产处置金额记录表" "eamDisposal": "EAM资产处置金额记录表",
"organizationId" : "机构编号",
"source" : "来源",
"poSubjectName" : "PO主体名称",
"advancePrice" : "预提金额",
"approvedPrice": "已批准标准发票金额",
"createBy": "创建人",
"createTime" : "创建时间",
"citSalaryAdvance" : "预提重分类数据源"
} }
\ No newline at end of file
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
//初始化列数据 //初始化列数据
var initColumns = function () { var initColumns = function () {
debugger;
//初始化进项发票汇总表列名 //初始化进项发票汇总表列名
$scope.incomeInvoiceTotalColumns = [ $scope.incomeInvoiceTotalColumns = [
$translate.instant('PleaseSelectColumn'), $translate.instant('PleaseSelectColumn'),
...@@ -142,14 +142,14 @@ ...@@ -142,14 +142,14 @@
//上传文件 //上传文件
var uploadfile = function (file) { var uploadfile = function (file) {
var url = uploadUrl; var url = uploadUrl;
debugger;
if (file) { if (file) {
debugger;
successCount = 0; successCount = 0;
if (!file.$error) { if (!file.$error) {
var tempFileName = PWC.newGuid() + '.dat'; var tempFileName = PWC.newGuid() + '.dat';
var token = $('input[name="__RequestVerificationToken"]').val(); var token = $('input[name="__RequestVerificationToken"]').val();
debugger;
Upload.upload({ Upload.upload({
url: uploadUrl, url: uploadUrl,
data: { data: {
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
//上传成功 //上传成功
var uploadSuccess = function (resp) { var uploadSuccess = function (resp) {
debugger;
successCount++; successCount++;
if (successCount === 1) { if (successCount === 1) {
$scope.tempFileName = resp.data; $scope.tempFileName = resp.data;
...@@ -455,7 +455,7 @@ ...@@ -455,7 +455,7 @@
//简易导入,importType来分辨是覆盖导入还是追加导入 //简易导入,importType来分辨是覆盖导入还是追加导入
$scope.importDataNew = function(importType){ $scope.importDataNew = function(importType){
debugger;
var a = projectId; var a = projectId;
if (!$scope.file || !$scope.file.name) { if (!$scope.file || !$scope.file.name) {
...@@ -483,7 +483,7 @@ ...@@ -483,7 +483,7 @@
withCredentials: true withCredentials: true
}, withCredentials: true }, withCredentials: true
}).then(function(resp){ }).then(function(resp){
debugger;
assetListService.getAssetGroupResultData(projectId).success(function (groupResultData) { assetListService.getAssetGroupResultData(projectId).success(function (groupResultData) {
$scope.assetGroupResultDataSource = groupResultData.data; $scope.assetGroupResultDataSource = groupResultData.data;
}); });
...@@ -639,6 +639,7 @@ ...@@ -639,6 +639,7 @@
$scope.ImportTotalYearDifferenceAmount = 0 $scope.ImportTotalYearDifferenceAmount = 0
assetListService.getAssetListData().success(function (rsp) { assetListService.getAssetListData().success(function (rsp) {
if (rsp && rsp.length > 0) { if (rsp && rsp.length > 0) {
$scope.isShowImportTotalBtn = false; $scope.isShowImportTotalBtn = false;
initPagingControl(rsp.length); initPagingControl(rsp.length);
...@@ -673,14 +674,14 @@ ...@@ -673,14 +674,14 @@
//根据分类获取数据 //根据分类获取数据
function getAssetResultList(assetType) { function getAssetResultList(assetType) {
debugger;
$scope.TotalCount = 0; $scope.TotalCount = 0;
$scope.TotalAccountAcquisitionValue = 0; $scope.TotalAccountAcquisitionValue = 0;
$scope.TotalAccountYearDepreciationAmount = 0; $scope.TotalAccountYearDepreciationAmount = 0;
$scope.TotalTaxCurrentYearDepreciationAmount = 0; $scope.TotalTaxCurrentYearDepreciationAmount = 0;
$scope.TotalYearDifferenceAmount = 0 $scope.TotalYearDifferenceAmount = 0
assetListService.getAssetResultList(assetType,projectId,taxAccountCompare).success(function (assetListData) { assetListService.getAssetResultList(assetType,projectId,taxAccountCompare).success(function (assetListData) {
debugger;
var data = assetListData.data; var data = assetListData.data;
if (data) { if (data) {
var index = 1; var index = 1;
...@@ -730,7 +731,6 @@ ...@@ -730,7 +731,6 @@
//初始化dx控件 //初始化dx控件
function initDxGrid() { function initDxGrid() {
debugger;
var dupColumns = [ var dupColumns = [
{ caption: $translate.instant('ImportErrorPopUpNoCol'), dataField: "index", width: 50 }, { caption: $translate.instant('ImportErrorPopUpNoCol'), dataField: "index", width: 50 },
{ caption: $translate.instant('AssetNumber'), dataField: "assetNumber" }, { caption: $translate.instant('AssetNumber'), dataField: "assetNumber" },
...@@ -816,7 +816,7 @@ ...@@ -816,7 +816,7 @@
}], }],
setCellValue: function (rowData, value) { setCellValue: function (rowData, value) {
rowData.assetGroupId = value; rowData.assetGroupId = value;
debugger;
var aseetDetailList = _.filter($scope.detailGroupListDataSource, function (item) { var aseetDetailList = _.filter($scope.detailGroupListDataSource, function (item) {
return item.assetGroupId == value; return item.assetGroupId == value;
}); });
...@@ -843,7 +843,7 @@ ...@@ -843,7 +843,7 @@
}], }],
setCellValue: function (rowData, value) { setCellValue: function (rowData, value) {
rowData.assetDetailGroupId = value; rowData.assetDetailGroupId = value;
debugger;
var aseetDetailList = _.filter($scope.detailGroupListDataSource, function (item) { var aseetDetailList = _.filter($scope.detailGroupListDataSource, function (item) {
return item.id == value; return item.id == value;
return item.id == value; return item.id == value;
...@@ -854,7 +854,7 @@ ...@@ -854,7 +854,7 @@
}, },
lookup: { lookup: {
dataSource: function (options) { dataSource: function (options) {
debugger;
return { return {
store: $scope.detailGroupListDataSource, store: $scope.detailGroupListDataSource,
filter: options.data ? ["assetGroupId", "=", options.data.assetGroupId] : null filter: options.data ? ["assetGroupId", "=", options.data.assetGroupId] : null
...@@ -887,7 +887,7 @@ ...@@ -887,7 +887,7 @@
//初始化dx控件 //初始化dx控件
function initAssetResultDxGrid() { function initAssetResultDxGrid() {
debugger;
var dupColumns = [ var dupColumns = [
{ caption: $translate.instant('ImportErrorPopUpNoCol'), dataField: "index", width: 50, allowEditing: false, fixed: true }, { caption: $translate.instant('ImportErrorPopUpNoCol'), dataField: "index", width: 50, allowEditing: false, fixed: true },
{ caption: $translate.instant('AssetNumber'), dataField: "assetNumber", width: 120, allowEditing: false, fixed: true }, { caption: $translate.instant('AssetNumber'), dataField: "assetNumber", width: 120, allowEditing: false, fixed: true },
...@@ -948,7 +948,7 @@ ...@@ -948,7 +948,7 @@
}, },
onCellPrepared: function (e) { onCellPrepared: function (e) {
if (e.rowType === "header") { if (e.rowType === "header") {
debugger;
if (e.column.caption === $translate.instant('ImportErrorPopUpNoCol') || if (e.column.caption === $translate.instant('ImportErrorPopUpNoCol') ||
e.column.caption === $translate.instant('AssetNumber') || e.column.caption === $translate.instant('AssetNumber') ||
e.column.caption === $translate.instant('AssetGroupName') || e.column.caption === $translate.instant('AssetGroupName') ||
...@@ -1048,7 +1048,7 @@ ...@@ -1048,7 +1048,7 @@
valueExpr: "key", valueExpr: "key",
displayExpr: "name", displayExpr: "name",
onValueChanged: function(data) { onValueChanged: function(data) {
debugger;
taxAccountCompare = data.value; taxAccountCompare = data.value;
getAssetResultList($scope.displayType - 1); getAssetResultList($scope.displayType - 1);
} }
...@@ -1056,10 +1056,10 @@ ...@@ -1056,10 +1056,10 @@
//获取数据服务 //获取数据服务
var getGroupList = function () { var getGroupList = function () {
debugger;
var deferred = $q.defer(); var deferred = $q.defer();
assetListService.getAssetGroupListData().success(function (data) { assetListService.getAssetGroupListData().success(function (data) {
debugger;
if (data.data) { if (data.data) {
$scope.groupListDataSource = data.data; $scope.groupListDataSource = data.data;
deferred.resolve(data.data); deferred.resolve(data.data);
...@@ -1073,10 +1073,10 @@ ...@@ -1073,10 +1073,10 @@
//获取导入后数据 //获取导入后数据
var getGroupDetailList = function () { var getGroupDetailList = function () {
debugger;
var deferred = $q.defer(); var deferred = $q.defer();
assetListService.getAssetDetailGroupListData().success(function (data) { assetListService.getAssetDetailGroupListData().success(function (data) {
debugger;
if (data.data) { if (data.data) {
$scope.detailGroupListDataSource = data.data; $scope.detailGroupListDataSource = data.data;
deferred.resolve(data.data); deferred.resolve(data.data);
...@@ -1298,13 +1298,13 @@ ...@@ -1298,13 +1298,13 @@
//保存分类信息 //保存分类信息
$scope.saveAssetGroupInfo = function () { $scope.saveAssetGroupInfo = function () {
debugger;
var dataGrid = $('#assetsGroupGrid').dxDataGrid("instance"); var dataGrid = $('#assetsGroupGrid').dxDataGrid("instance");
dataGrid.saveEditData(); dataGrid.saveEditData();
if (validationAssetGroupList()) if (validationAssetGroupList())
{ {
assetListService.saveAssetGroupInfo($scope.assetGroupResultDataSource, $scope.saveGroupType, projectId).success(function (data) { assetListService.saveAssetGroupInfo($scope.assetGroupResultDataSource, $scope.saveGroupType, projectId).success(function (data) {
debugger;
if (data) { if (data) {
SweetAlert.success($translate.instant('SaveSuccess')); SweetAlert.success($translate.instant('SaveSuccess'));
if ($scope.modalInstance) { if ($scope.modalInstance) {
...@@ -1377,13 +1377,13 @@ ...@@ -1377,13 +1377,13 @@
//控制明细信息中删除权限 //控制明细信息中删除权限
var getUserPermission = function () { var getUserPermission = function () {
debugger;
var list = []; var list = [];
$scope.editCode = constant.citPermission.dataImport.assetList.importCode; $scope.editCode = constant.citPermission.dataImport.assetList.importCode;
list.push($scope.editCode); list.push($scope.editCode);
$scope.hasEditPermission = false; $scope.hasEditPermission = false;
$scope.$root.checkUserOrganizationPermissionList(list).success(function (data) { $scope.$root.checkUserOrganizationPermissionList(list).success(function (data) {
debugger;
$scope.hasEditPermission = data[$scope.editCode]; $scope.hasEditPermission = data[$scope.editCode];
//$scope.dataGridInstance.option("editing.allowUpdating", $scope.hasEditPermission); //$scope.dataGridInstance.option("editing.allowUpdating", $scope.hasEditPermission);
//$scope.dataGridInstance.refresh(); //$scope.dataGridInstance.refresh();
......
citModule.directive('citPreviewAssetList', ['$log', '$translate',
function ($log, $translate) {
'use strict';
$log.debug('citPreviewAssetList.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/cit/preview/cit-preview-asset-list/cit-preview-asset-list.html' + '?_=' + Math.random(),
scope: {},
controller: 'CitPreviewAssetListController',
link: function (scope, element) {
}
};
}
]);
\ No newline at end of file
@import "~/app-resources/less/theme.less";
.cit-import-asset-list {
padding-left: 20px;
height: 96%;
.sweet-alert {
background-color: #eeeeee;
}
.nav-wrapper {
padding-bottom: 10px;
border-bottom: 1px solid #DBD8D3;
.nav-header {
height: 54px;
line-height: 54px;
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular", "Microsoft YaHei";
font-weight: 700;
font-style: normal;
font-size: 15px;
color: #333;
}
.nav-tab {
/*display: inline-block;*/
span {
display: inline-block;
height: 34px;
width: 80px;
text-align: center;
line-height: 34px;
padding: 0 10px;
background-color: #B90808;
color: #FFF;
font-family: "Microsoft YaHei";
font-weight: 400;
font-style: normal;
font-size: 14px;
cursor: pointer;
}
.active {
background-color: #F91000;
}
}
}
.alert-warning {
background-color: #FDE2DE;
cursor: pointer;
}
.alert {
color: #CF2D1B;
font-weight: bold;
display: inline-block;
padding: 5px;
float: left;
margin: -45px 0 0 350px;
i {
font-size: 20px;
vertical-align: middle;
margin-right: 5px;
}
}
.dropdown-common() {
display: inline-block;
.select-button {
background-color: #F5F5F5;
padding: 6px 0;
width: 110px;
}
.caret {
margin-top: 8px;
}
.dropdown-menu {
min-width: 140px;
max-height: 400px;
overflow-y: scroll;
li {
text-align: left;
min-height: 0px;
height: 30px;
color: #000;
font-weight: normal;
&:hover {
background-color: #F91000;
color: #FFF;
cursor: pointer;
}
i {
float: right;
font-size: 15px;
}
}
}
}
#tab_total {
display: block;
height: calc(~'100% - 80px');
position: relative;
.operation-wrapper {
margin: -40px 15px 0 0;
span {
cursor: pointer;
}
}
.import-wrapper {
margin-top: 10px;
span {
margin-left: 10px;
color: #333;
font-family: "Microsoft YaHei";
font-style: normal;
font-size: 14px;
font-weight: bold;
}
.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;
}
.btn-wrapper {
border-radius: 5px;
background-color: #e0301e;
color: #FFF;
display: inline-block;
float: right;
margin-right: 10px;
.btn-vat-primary {
min-width: 80px;
}
}
.import-info-wrapper {
display: inline-block;
}
}
.dt-init-wrapper {
margin: 10px 0;
max-width: 99%;
height: calc(~'100% - 80px');
position: relative;
z-index: 1;
.dropdown {
.dropdown-common();
i {
color: #F85550;
}
}
.total-Wrapper {
width: 99%;
margin-left: 0px;
font-size: 13px;
font-family: 'Microsoft YaHei';
padding-bottom: 5px;
.total_span {
color: #B4122A !important;
background-color: #ddd !important;
font-size: 12px !important;
font-weight: bold !important;
border-radius: 10px !important;
padding-left: 8px !important;
padding-right: 8px !important;
}
}
/*.balance-ouput-grid-wrapper {
height: calc(~'100% - -10px');
overflow: hidden;
position: absolute;
top: 0;
bottom: 150px;
left: 0;
right: 0;
background-color: #FFF;
}*/
}
.dt-import-wrapper {
margin: 10px 0;
max-width: 99%;
overflow: auto;
height: calc(~"100% - 70px");
.dropdown {
.dropdown-common();
i {
color: #F85550;
}
button {
color: #333;
}
}
}
.error-info-wrapper {
position: absolute;
height: 150px;
bottom: 0;
left: 0;
right: 0;
overflow: hidden;
background-color: #FFF;
margin-left: -39px;
z-index: 2;
}
#content-resizer {
width: 110%;
position: absolute;
height: 4px;
bottom: 150px;
left: 0;
right: 0;
background-color: red;
cursor: n-resize;
margin-left: -39px;
#topIcon {
cursor: pointer;
margin-top: -19px;
width: 38px;
margin-left: 46%;
z-index: 999;
bottom: -200px;
text-align: center;
display: block !important;
}
}
}
#tab_Assets {
display: block;
height: calc(~'100% - 80px');
position: relative;
.total-Wrapper {
width: 72%;
margin-left: 0px;
font-size: 13px;
font-family: 'Microsoft YaHei';
padding-top: 5px;
position: absolute;
z-index: 9;
.total_span {
color: #B4122A !important;
background-color: #ddd !important;
font-size: 12px !important;
font-weight: bold !important;
border-radius: 10px !important;
padding-left: 8px !important;
padding-right: 8px !important;
}
}
.dt-asset-result {
margin: 0px 0;
max-width: 99%;
height: calc(~'100% - 20px');
position: relative;
margin-top: 10px;
.herder-center {
text-align: center !important;
vertical-align: middle !important;
/*font-size:13px !important;*/
}
}
}
.error-list-modal {
.modal-title {
color: #FF0000;
}
.modal-body {
max-height: 300px;
overflow-y: auto;
table {
border: 1px solid #CCC;
thead tr th {
height: 30px;
border: 1px solid #CCC;
}
tbody tr td {
height: 25px;
border: 1px solid #CCC;
}
}
}
.modal-footer {
text-align: center;
}
}
.page-form-group {
float: right;
margin-top: 10px;
.page-size {
margin: 0;
}
.pagination {
margin: 0;
}
}
#gridInitData {
border-radius: 3px;
border: 1px solid #d4d4d4;
}
}
.set-asset-list-modal .modal-dialog {
height: 500px;
width: 800px;
.modal-content {
height: 100%;
width: 100%;
}
.modal-title {
color: #333;
font-size: 16px;
font-weight: bold;
}
.modal-body {
height: 76%;
max-width: 760px !important;
margin-left: 22px;
overflow-y: auto;
.herder-center {
text-align: center !important;
}
.column-color {
color: red !important;
}
}
.modal-footer {
text-align:left;
}
}
citModule.controller('citReportLayoutController', ['$scope', '$log', '$q', '$timeout', '$compile', 'loginContext', citModule.controller('citReportLayoutController', ['$scope', '$log', '$q', '$timeout', '$compile', 'loginContext',
'$translate', '$location', 'vatSessionService', 'vatReportService', '$state', 'enums', 'checkListService', '$translate', '$location', 'vatSessionService', 'vatReportService', '$state', 'enums', /*'checkListService',*/
function ($scope, $log, $q, $timeout, $compile, loginContext, $translate, $location, vatSessionService, function ($scope, $log, $q, $timeout, $compile, loginContext, $translate, $location, vatSessionService,
vatReportService, $state, enums, checkListService) { vatReportService, $state, enums/*, checkListService*/) {
'use strict'; 'use strict';
$log.debug('citReportLayoutController.ctor()...'); $log.debug('citReportLayoutController.ctor()...');
$scope.$on('refreshCitGenerateReport', function (event, data) { $scope.$on('refreshCitGenerateReport', function (event, data) {
loadTemplateMenu(); loadTemplateMenu();
$scope.isFirstMenu = false; $scope.isFirstMenu = false;
...@@ -28,7 +27,6 @@ ...@@ -28,7 +27,6 @@
returnUrl = true; returnUrl = true;
} }
return returnUrl; return returnUrl;
}; };
var gvalue = 1; var gvalue = 1;
...@@ -53,7 +51,6 @@ ...@@ -53,7 +51,6 @@
event.preventDefault(); event.preventDefault();
} }
} }
_.each($scope.menuTreeDataSource, function (item) { _.each($scope.menuTreeDataSource, function (item) {
item.selected = false; item.selected = false;
}); });
...@@ -237,16 +234,17 @@ ...@@ -237,16 +234,17 @@
$scope.checkListModal.modalTitel = $translate.instant(cfg.titel); $scope.checkListModal.modalTitel = $translate.instant(cfg.titel);
var apiFun = checkListService.getCheckListViewData; /*var apiFun = checkListService.getCheckListViewData;
apiFun(vatSessionService.project.serviceTypeID, cfg.reportType, 0).then(function (response) { apiFun(vatSessionService.project.serviceTypeID, cfg.reportType, 0).then(function (response) {
var rst = response.data; var rst = response.data;
$scope.checkListModal.isOpen = rst.result; $scope.checkListModal.isOpen = rst.result;
$scope.checkListModal.dataSource = rst.result ? rst.data : []; $scope.checkListModal.dataSource = rst.result ? rst.data : [];
}); });*/
} }
}; };
var loadTemplateMenu = function () { var loadTemplateMenu = function () {
debugger;
var projectID = vatSessionService.project.id; var projectID = vatSessionService.project.id;
vatReportService.citGetTemplateTree(projectID).success(function (data) { vatReportService.citGetTemplateTree(projectID).success(function (data) {
if (!data || !data.data) { if (!data || !data.data) {
...@@ -418,6 +416,7 @@ ...@@ -418,6 +416,7 @@
id.selected = true; id.selected = true;
} }
} }
debugger;
$scope.menuTreeDataSource = data; $scope.menuTreeDataSource = data;
}); });
...@@ -439,6 +438,7 @@ ...@@ -439,6 +438,7 @@
//检查用户机构权限 //检查用户机构权限
var getUserPermission = function () { var getUserPermission = function () {
debugger;
var list = []; var list = [];
var reportTemp = constant.citPermission.reportView; var reportTemp = constant.citPermission.reportView;
//bspl //bspl
......
...@@ -3,39 +3,30 @@ webservices.factory('assetListService', ['$http', 'apiConfig', function ($http, ...@@ -3,39 +3,30 @@ webservices.factory('assetListService', ['$http', 'apiConfig', function ($http,
'use strict'; 'use strict';
return { return {
getAssetListData: function () { getAssetListData: function () {
debugger;
return $http.get('/asset/getAssetListData', apiConfig.create()); return $http.get('/asset/getAssetListData', apiConfig.create());
}, },
getAssetResultList: function (assetType,projectId, taxAccountCompare) { getAssetResultList: function (assetType,projectId, taxAccountCompare) {
debugger;
return $http.get('/asset/getAssetResultList?assetType=' + assetType + '&projectId=' + projectId + '&taxAccountCompare=' + taxAccountCompare, apiConfig.create()); return $http.get('/asset/getAssetResultList?assetType=' + assetType + '&projectId=' + projectId + '&taxAccountCompare=' + taxAccountCompare, apiConfig.create());
}, },
getAssetGroupResultData: function (projectId) { getAssetGroupResultData: function (projectId) {
debugger;
return $http.get('/asset/getAssetGroupResultData?projectId=' + projectId, apiConfig.create()); return $http.get('/asset/getAssetGroupResultData?projectId=' + projectId, apiConfig.create());
}, },
getAssetGroupListData: function () { getAssetGroupListData: function () {
debugger;
return $http.get('/asset/getAssetGroupListData', apiConfig.create()); return $http.get('/asset/getAssetGroupListData', apiConfig.create());
}, },
getAssetDetailGroupListData: function () { getAssetDetailGroupListData: function () {
debugger;
return $http.get('/asset/getAssetDetailGroupListData', apiConfig.create()); return $http.get('/asset/getAssetDetailGroupListData', apiConfig.create());
}, },
saveAssetGroupInfo:function (assetGroupResults,saveGroupType,projectId) { saveAssetGroupInfo:function (assetGroupResults,saveGroupType,projectId) {
debugger;
return $http.post('/asset/saveAssetGroupInfo?saveGroupType=' + saveGroupType + '&projectId=' + projectId,assetGroupResults, apiConfig.create()); return $http.post('/asset/saveAssetGroupInfo?saveGroupType=' + saveGroupType + '&projectId=' + projectId,assetGroupResults, apiConfig.create());
}, },
updateAssetResultList:function (assetsList,projectId) { updateAssetResultList:function (assetsList,projectId) {
debugger;
return $http.post('/asset/updateAssetResultList?projectId=' + projectId,assetsList, apiConfig.create()); return $http.post('/asset/updateAssetResultList?projectId=' + projectId,assetsList, apiConfig.create());
}, },
batchUpdateIsRetain:function (assetType,projectId, isRetain) { batchUpdateIsRetain:function (assetType,projectId, isRetain) {
debugger;
return $http.post('/asset/batchUpdateIsRetain?assetType=' + assetType + '&projectId=' + projectId + '&isRetain=' + isRetain, apiConfig.create()); return $http.post('/asset/batchUpdateIsRetain?assetType=' + assetType + '&projectId=' + projectId + '&isRetain=' + isRetain, apiConfig.create());
}, },
getAllFixedAssetDetailGroup: function (assetGroupType,pageIndex,pageSize) { getAllFixedAssetDetailGroup: function (assetGroupType,pageIndex,pageSize) {
debugger;
return $http.post('/asset/getFixedAssetDetailGroup',{"assetGroupType":assetGroupType,"pageIndex":pageIndex,"pageSize":pageSize}, apiConfig.create()); return $http.post('/asset/getFixedAssetDetailGroup',{"assetGroupType":assetGroupType,"pageIndex":pageIndex,"pageSize":pageSize}, apiConfig.create());
} }
}; };
......
// web service proxy for role
webservices.factory('citPreviewDataService', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
//获取 预提分类数据源列表数据
getCitPreviewSalaryAdvanceDataList : function(params){
return $http.post('/citPreviewDataController/getSalaryAdvaceListData', {pageInfo: params.pagingOptions, poSubjectName : params.poSubjectName }, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
...@@ -355,6 +355,14 @@ webservices.factory('commonWebService', ['$http', 'apiConfig', 'loginContext', ' ...@@ -355,6 +355,14 @@ webservices.factory('commonWebService', ['$http', 'apiConfig', 'loginContext', '
n = filterFunc.call(tree, match, opts); n = filterFunc.call(tree, match, opts);
} }
}).focus(); }).focus();
},
_index :function (data) {
var index = 1;
for(var i of data){
i.index = index;
index++;
}
return data;
} }
}; };
}]); }]);
\ No newline at end of file
...@@ -291,7 +291,6 @@ ...@@ -291,7 +291,6 @@
} }
function doStartCaculate2(isMergeManualDataSource) { function doStartCaculate2(isMergeManualDataSource) {
vatReportService.generateAll(vatSessionService.project.id, isMergeManualDataSource, vatSessionService.month, vatSessionService.logUser.id ? vatSessionService.logUser.id : "").success(function (data) { vatReportService.generateAll(vatSessionService.project.id, isMergeManualDataSource, vatSessionService.month, vatSessionService.logUser.id ? vatSessionService.logUser.id : "").success(function (data) {
$scope.readonly = true; $scope.readonly = true;
if(data && data.result) if(data && data.result)
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<span class="rect2"></span> <span class="rect2"></span>
<span class="rect3"></span> <span class="rect3"></span>
<span class="rect4"></span> <span class="rect4"></span>
<span class="rect5"></span> <spanmoduleType class="rect5"></spanmoduleType>
<!--<img src="/app-resources/images/loading.gif" alt="loading...">--> <!--<img src="/app-resources/images/loading.gif" alt="loading...">-->
</span> </span>
<span ng-if="task.status == 'error'" style="color:red;">{{task.text}}</span> <span ng-if="task.status == 'error'" style="color:red;">{{task.text}}</span>
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
if (!$scope.hasBsPermission) { if (!$scope.hasBsPermission) {
grps.children = _.reject(grps[0].children, {name: '资产负债表'}); grps.children = _.reject(grps[0].children, {name: '资产负债表'});
} }
if (!$scope.hasPlPermission) { if (!$scope.hasPlPermission) {
grps.children = _.reject(grps[0].children, {name: '利润表'}); grps.children = _.reject(grps[0].children, {name: '利润表'});
} }
......
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