Commit b50a3f69 authored by gary's avatar gary

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents 7aa072d6 d8e9c629
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
<artifactId>atms-dao</artifactId> <artifactId>atms-dao</artifactId>
<version>0.1.1</version> <version>0.1.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId> <artifactId>spring-context</artifactId>
......
package pwc.taxtech.atms.common;
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");
String formattedDate = formatter.format(value);
jgen.writeString(formattedDate);
}
}
package pwc.taxtech.atms.common.util;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHeaders;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.config.FileServiceConfig;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.exception.ServiceException;
import java.io.IOException;
/**
* author kevin
* ver 1.0
*/
@Configuration
public class FileUploadUtil implements ApplicationContextAware {
protected static final Logger logger = LoggerFactory.getLogger(FileUploadUtil.class);
// Spring应用上下文环境
private static ApplicationContext applicationContext;
private static FileServiceConfig config;
private static final String USER_TEMPLATE_PATH = "pwc/userTemplate/";
private static final String HTTP_HEADER = "application/json;charset=UTF-8";
public static String upload(MultipartFile file) throws ServiceException{
return upload( file, false);
}
public static String serverPath(){
config = (FileServiceConfig)applicationContext.getBean("fileServiceConfig");
return config.getServerUrl() + config.getUploadUrl();
}
/**
* 上传模板
*
* @param file MultipartFile
* @param fullPath 是否返回全路径 默认false ,如果为true返回的路径直接可以用于下载
* @return Boolean
*/
public static String upload( MultipartFile file, boolean fullPath) throws ServiceException {
if (StringUtils.isBlank(file.getOriginalFilename()) || null == file) {
throw new IllegalArgumentException("上传参数为空");
}
CloseableHttpClient httpClient = null;
String filePath = USER_TEMPLATE_PATH + file.getOriginalFilename();
try {
String serverPath = serverPath();
httpClient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(serverPath);
httpPost.addHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON.getMimeType());
JSONObject param = new JSONObject();
param.put("path", filePath);
param.put("file", file.getBytes());
HttpEntity httpEntity = new StringEntity(param.toJSONString(), ContentType.APPLICATION_JSON);
httpPost.setEntity(httpEntity);
HttpResponse httpResponse = httpClient.execute(httpPost);
ApiResultDto resultDto = JSON.parseObject(IOUtils.toString(httpResponse.getEntity().getContent(), "UTF-8"), ApiResultDto.class);
if (resultDto.getCode() == ApiResultDto.SUCCESS) {
if(fullPath){
return config.getServerUrl() + "/" + filePath;
}
return filePath;
}
} catch (Exception e) {
e.printStackTrace();
logger.error("uploadTemplate error.", e);
} finally {
if (null != httpClient) {
try {
httpClient.close();
} catch (IOException e) {
logger.error("close httpClient error.", e);
}
}
}
throw new ServiceException("uploadTemplate error.");
}
/**
* 实现ApplicationContextAware接口的回调方法。设置上下文环境
*
* @param applicationContext
*/
public void setApplicationContext(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}
/**
* @return ApplicationContext
*/
public static ApplicationContext getApplicationContext() {
return applicationContext;
}
}
...@@ -83,7 +83,7 @@ public class DataPreviewController extends BaseController { ...@@ -83,7 +83,7 @@ public class DataPreviewController extends BaseController {
public void downloadCFQueryData(@RequestBody CashFlowParam param, HttpServletResponse response) { public void downloadCFQueryData(@RequestBody CashFlowParam param, HttpServletResponse response) {
logger.debug("enter downloadCFQueryData"); logger.debug("enter downloadCFQueryData");
String fileName="testFile"; String fileName="testFile";
// dataPreviewSerivceImpl.exportCashFlowList(response, param, fileName); dataPreviewSerivceImpl.exportCashFlowList(response, param, fileName);
} }
@RequestMapping(value = "exportTBData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "exportTBData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
......
...@@ -8,15 +8,21 @@ import org.springframework.http.ResponseEntity; ...@@ -8,15 +8,21 @@ import org.springframework.http.ResponseEntity;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.multipart.MultipartHttpServletRequest;
import pwc.taxtech.atms.common.CommonConstants; import pwc.taxtech.atms.common.CommonConstants;
import pwc.taxtech.atms.common.CommonUtils; import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.constant.enums.EnumModule; import pwc.taxtech.atms.constant.enums.EnumModule;
import pwc.taxtech.atms.dto.FileDto;
import pwc.taxtech.atms.dto.OperationResultDto; import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.service.impl.FileService; import pwc.taxtech.atms.service.impl.FileService;
import pwc.taxtech.atms.service.impl.HttpFileService;
import pwc.taxtech.atms.vat.service.impl.FileUploadAdapter; import pwc.taxtech.atms.vat.service.impl.FileUploadAdapter;
import javax.mail.Session;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.InputStream; import java.io.InputStream;
...@@ -33,6 +39,9 @@ public class FileUploadController { ...@@ -33,6 +39,9 @@ public class FileUploadController {
@Autowired @Autowired
private FileService fileService; private FileService fileService;
@Autowired
private HttpFileService httpFileService;
@RequestMapping(value = "NewFile", method = RequestMethod.POST, produces = MediaType.MULTIPART_FORM_DATA_VALUE) @RequestMapping(value = "NewFile", method = RequestMethod.POST, produces = MediaType.MULTIPART_FORM_DATA_VALUE)
public ResponseEntity getInputInvoiceTreeViewData(MultipartHttpServletRequest request) { public ResponseEntity getInputInvoiceTreeViewData(MultipartHttpServletRequest request) {
return fileUploadAdapter.upload(request); return fileUploadAdapter.upload(request);
......
package pwc.taxtech.atms.controller; package pwc.taxtech.atms.controller;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.constant.enums.EnumServiceType; import pwc.taxtech.atms.constant.enums.EnumServiceType;
import pwc.taxtech.atms.dpo.ReportDto; import pwc.taxtech.atms.dpo.ReportDto;
import pwc.taxtech.atms.dto.FileDto;
import pwc.taxtech.atms.dto.OperationResultDto; import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.vatdto.*; import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.vat.entity.PeriodCellTemplateConfig; import pwc.taxtech.atms.vat.entity.PeriodCellTemplateConfig;
import pwc.taxtech.atms.vat.entity.PeriodJob; import pwc.taxtech.atms.vat.entity.PeriodJob;
import pwc.taxtech.atms.vat.entity.PwcReportAttach;
import pwc.taxtech.atms.vat.entity.VatEnterpriseAccount; import pwc.taxtech.atms.vat.entity.VatEnterpriseAccount;
import pwc.taxtech.atms.vat.service.impl.ReportServiceImpl; import pwc.taxtech.atms.vat.service.impl.ReportServiceImpl;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Optional; import java.util.Optional;
@RestController @RestController
...@@ -149,4 +155,20 @@ public class ReportController { ...@@ -149,4 +155,20 @@ public class ReportController {
} }
@RequestMapping(value = "doUpload", method = RequestMethod.POST)
public OperationResultDto doUploadAttach(@RequestParam("fileName") String fileName, MultipartFile file, String remarks, @RequestParam("activeCol")Long activeCol, @RequestParam("activeRow")Long activeRow, @RequestParam("activeTemplateId")String activeTemplateId){
System.out.println(activeCol + "----" + activeRow + "-----" + activeTemplateId);
OperationResultDto operationResultDto = reportService.doUploadAttach(file, remarks);
if(!"error".equals(operationResultDto.getResultMsg())){//上传成功绑定
reportService.bindPwcAttach(activeCol, activeRow, activeTemplateId, (FileDto) operationResultDto.getData());
}
return operationResultDto;
}
@RequestMapping(value = "loadAttachList", method = RequestMethod.GET)
public List<PwcReportAttach> loadAttachList(Long col, Long row, String templateId){
return reportService.loadAttachList(col, row, templateId);
}
} }
\ No newline at end of file
package pwc.taxtech.atms.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;
import pwc.taxtech.atms.common.CustomDateSerializer;
import pwc.taxtech.atms.entity.BaseEntity;
import java.util.Date;
//统一返回文件对象
public class FileDto extends BaseEntity {
private String fileName;
private String size;
private String remarks;//备注信息
private String uploadUser;//上传用户
private Date createTime;
protected Date updateTime;
private String fileUrl;
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getSize() {
return size;
}
public void setSize(String size) {
this.size = size;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public String getUploadUser() {
return uploadUser;
}
public void setUploadUser(String uploadUser) {
this.uploadUser = uploadUser;
}
@JsonSerialize(using = CustomDateSerializer.class)
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@JsonSerialize(using = CustomDateSerializer.class)
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
return "FileDto{" +
"fileName='" + fileName + '\'' +
", size='" + size + '\'' +
", remarks='" + remarks + '\'' +
", uploadUser='" + uploadUser + '\'' +
", createTime=" + createTime +
", updateTime=" + updateTime +
", fileUrl='" + fileUrl + '\'' +
'}';
}
}
...@@ -16,6 +16,7 @@ public class OperationResultDto<T> extends OperationResultBase { ...@@ -16,6 +16,7 @@ public class OperationResultDto<T> extends OperationResultBase {
private T data; private T data;
public OperationResultDto() { public OperationResultDto() {
} }
......
/*
package pwc.taxtech.atms.service.impl; package pwc.taxtech.atms.service.impl;
import org.jxls.common.Context; import org.jxls.common.Context;
import org.jxls.expression.JexlExpressionEvaluator; import org.jxls.expression.JexlExpressionEvaluator;
import org.jxls.transform.Transformer; import org.jxls.transform.Transformer;
...@@ -82,4 +80,4 @@ public class CommonDocumentHelper { ...@@ -82,4 +80,4 @@ public class CommonDocumentHelper {
} }
} }
*/
...@@ -60,6 +60,8 @@ public class DataPreviewSerivceImpl extends BaseService { ...@@ -60,6 +60,8 @@ public class DataPreviewSerivceImpl extends BaseService {
@Resource @Resource
private OrganizationMapper organizationMapper; private OrganizationMapper organizationMapper;
@Resource
private CommonDocumentHelper commonDocumentHelper;
public PageInfo<TrialBalanceDto> getTBDataForDisplay(TrialBalanceParam param) { public PageInfo<TrialBalanceDto> getTBDataForDisplay(TrialBalanceParam param) {
...@@ -123,7 +125,7 @@ public class DataPreviewSerivceImpl extends BaseService { ...@@ -123,7 +125,7 @@ public class DataPreviewSerivceImpl extends BaseService {
return pageInfo; return pageInfo;
} }
/*public HttpServletResponse exportCashFlowList(HttpServletResponse response, CashFlowParam param, String fileName) { public HttpServletResponse exportCashFlowList(HttpServletResponse response, CashFlowParam param, String fileName) {
//Boolean isEn = StringUtils.equals(language, "en-us"); //Boolean isEn = StringUtils.equals(language, "en-us");
logger.debug("start export input invoice list to excel"); logger.debug("start export input invoice list to excel");
//String excelTemplatePathInClassPath = "/vat_excel_template/cash_flow"+(isEn?"":"_cn") + ".xlsx"; //String excelTemplatePathInClassPath = "/vat_excel_template/cash_flow"+(isEn?"":"_cn") + ".xlsx";
...@@ -157,7 +159,7 @@ public class DataPreviewSerivceImpl extends BaseService { ...@@ -157,7 +159,7 @@ public class DataPreviewSerivceImpl extends BaseService {
logger.error(e.getMessage()); logger.error(e.getMessage());
} }
return null; return null;
}*/ }
public PageInfo<JournalEntryDto> getJEDataForDisplay(JournalEntryParam param) { public PageInfo<JournalEntryDto> getJEDataForDisplay(JournalEntryParam param) {
......
...@@ -198,4 +198,8 @@ public class FileService { ...@@ -198,4 +198,8 @@ public class FileService {
} }
} }
//上传文件
} }
...@@ -23,15 +23,22 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -23,15 +23,22 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.config.FileServiceConfig; import pwc.taxtech.atms.common.config.FileServiceConfig;
import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.dto.ApiResultDto; import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.FileDto;
import pwc.taxtech.atms.exception.ServiceException; import pwc.taxtech.atms.exception.ServiceException;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
/**
* version 2.0
* author kevin
*/
@Service @Service
public class HttpFileService extends BaseService { public class HttpFileService extends BaseService {
@Autowired @Autowired
...@@ -44,21 +51,23 @@ public class HttpFileService extends BaseService { ...@@ -44,21 +51,23 @@ public class HttpFileService extends BaseService {
* *
* @param fileName 文件名 * @param fileName 文件名
* @param file MultipartFile * @param file MultipartFile
* @param fullPath 是否返回全路径 默认false ,如果为true返回的路径直接可以用于下载
* @return Boolean * @return Boolean
*/ */
public String uploadTemplate(String fileName, MultipartFile file) throws ServiceException { public String uploadTemplate(String fileName, MultipartFile file, boolean fullPath) throws ServiceException {
if (StringUtils.isBlank(fileName) || null == file) { if (StringUtils.isBlank(fileName) || null == file) {
throw new IllegalArgumentException("上传参数为空"); throw new IllegalArgumentException("上传参数为空");
} }
CloseableHttpClient httpClient = null; CloseableHttpClient httpClient = null;
String fullPath = USER_TEMPLATE_PATH + fileName; String filePath = USER_TEMPLATE_PATH + fileName;
try { try {
String serverPath = config.getServerUrl() + config.getUploadUrl();
httpClient = HttpClients.createDefault(); httpClient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(config.getServerUrl() + config.getUploadUrl()); HttpPost httpPost = new HttpPost(serverPath);
httpPost.addHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON.getMimeType()); httpPost.addHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON.getMimeType());
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
param.put("path", fullPath); param.put("path", filePath);
param.put("file", file.getBytes()); param.put("file", file.getBytes());
HttpEntity httpEntity = new StringEntity(param.toJSONString(), ContentType.APPLICATION_JSON); HttpEntity httpEntity = new StringEntity(param.toJSONString(), ContentType.APPLICATION_JSON);
...@@ -67,7 +76,10 @@ public class HttpFileService extends BaseService { ...@@ -67,7 +76,10 @@ public class HttpFileService extends BaseService {
HttpResponse httpResponse = httpClient.execute(httpPost); HttpResponse httpResponse = httpClient.execute(httpPost);
ApiResultDto resultDto = JSON.parseObject(IOUtils.toString(httpResponse.getEntity().getContent(), "UTF-8"), ApiResultDto.class); ApiResultDto resultDto = JSON.parseObject(IOUtils.toString(httpResponse.getEntity().getContent(), "UTF-8"), ApiResultDto.class);
if (resultDto.getCode() == ApiResultDto.SUCCESS) { if (resultDto.getCode() == ApiResultDto.SUCCESS) {
return fullPath; if(fullPath){
return config.getServerUrl() + "/" + filePath;
}
return filePath;
} }
} catch (Exception e) { } catch (Exception e) {
logger.error("uploadTemplate error.", e); logger.error("uploadTemplate error.", e);
...@@ -83,6 +95,11 @@ public class HttpFileService extends BaseService { ...@@ -83,6 +95,11 @@ public class HttpFileService extends BaseService {
throw new ServiceException("uploadTemplate error."); throw new ServiceException("uploadTemplate error.");
} }
public String uploadTemplate(String fileName, MultipartFile file) throws ServiceException{
return uploadTemplate(fileName, file, false);
}
/** /**
* 下载模板 * 下载模板
* *
...@@ -117,4 +134,22 @@ public class HttpFileService extends BaseService { ...@@ -117,4 +134,22 @@ public class HttpFileService extends BaseService {
return null; return null;
} }
//上传
public FileDto upload(MultipartFile file, String remarks){
FileDto fileDto = new FileDto();
int i = file.getOriginalFilename().lastIndexOf(".");
fileDto.setFileName(file.getOriginalFilename());
if(remarks != null){
fileDto.setRemarks(remarks);
}
fileDto.setFileUrl(uploadTemplate(file.getOriginalFilename(), file, true));
//绑定
fileDto.setSize(String.valueOf(file.getSize()/1024));
fileDto.setUploadUser(authUserHelper.getCurrentAuditor().get());
fileDto.setCreateTime(DateUtils.getNowDate());
return fileDto;
}
} }
...@@ -11,18 +11,23 @@ import org.slf4j.Logger; ...@@ -11,18 +11,23 @@ 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.stereotype.Component; import org.springframework.stereotype.Component;
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.FileUploadUtil;
import pwc.taxtech.atms.common.util.MyAsserts; import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.common.util.SpringContextUtil; 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.*;
import pwc.taxtech.atms.dpo.ReportDto; import pwc.taxtech.atms.dpo.ReportDto;
import pwc.taxtech.atms.dto.FileDto;
import pwc.taxtech.atms.dto.OperationResultDto; import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.vatdto.*; import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.entity.*; import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.exception.Exceptions; import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.exception.NotFoundException; import pwc.taxtech.atms.exception.NotFoundException;
import pwc.taxtech.atms.service.impl.BaseService;
import pwc.taxtech.atms.service.impl.CellConfigTranslater; import pwc.taxtech.atms.service.impl.CellConfigTranslater;
import pwc.taxtech.atms.service.impl.DistributedIdService; import pwc.taxtech.atms.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.*; import pwc.taxtech.atms.vat.dao.*;
...@@ -44,7 +49,7 @@ import java.util.stream.Collectors; ...@@ -44,7 +49,7 @@ import java.util.stream.Collectors;
import static pwc.taxtech.atms.dto.vatdto.WrapPeriodJobDto.*; import static pwc.taxtech.atms.dto.vatdto.WrapPeriodJobDto.*;
@Component @Component
public class ReportServiceImpl { public class ReportServiceImpl extends BaseService {
private final static Logger logger = LoggerFactory.getLogger(ReportServiceImpl.class); private final static Logger logger = LoggerFactory.getLogger(ReportServiceImpl.class);
private BlockingQueue<PeriodJob> queue = new LinkedBlockingQueue<>(); private BlockingQueue<PeriodJob> queue = new LinkedBlockingQueue<>();
private final static String[] functions = {"SGSR", "FSJZ", "ND", "BB", "XXFP", "GZSD", "PC", "JXFPMX", private final static String[] functions = {"SGSR", "FSJZ", "ND", "BB", "XXFP", "GZSD", "PC", "JXFPMX",
...@@ -137,7 +142,6 @@ public class ReportServiceImpl { ...@@ -137,7 +142,6 @@ public class ReportServiceImpl {
operationResult.setResultMsg("NoOrganization"); operationResult.setResultMsg("NoOrganization");
return operationResult; return operationResult;
} }
Long templateGroupId; Long templateGroupId;
/* /*
...@@ -479,15 +483,12 @@ public class ReportServiceImpl { ...@@ -479,15 +483,12 @@ public class ReportServiceImpl {
MyAsserts.assertNull(periodJobMapper.getRunningJob(projectId,periodParam), Exceptions.TASK_HAS_BEGINNING); MyAsserts.assertNull(periodJobMapper.getRunningJob(projectId,periodParam), Exceptions.TASK_HAS_BEGINNING);
String status = periodApprovalMapper.getStatusByProjectIdAndPeriod(projectId, periodParam); String status = periodApprovalMapper.getStatusByProjectIdAndPeriod(projectId, periodParam);
MyAsserts.assertTrue(status == null || !status.equals(Constant.APPROVAL_COMMITTED), Exceptions.REPORT_IN_PROCESS_OR_AGREED_EXCEPTION); MyAsserts.assertTrue(status == null || !status.equals(Constant.APPROVAL_COMMITTED), Exceptions.REPORT_IN_PROCESS_OR_AGREED_EXCEPTION);
try { try {
if (serviceType.equals(EnumServiceType.VAT) && (periodParam == null || periodParam <= 0)) { if (serviceType.equals(EnumServiceType.VAT) && (periodParam == null || periodParam <= 0)) {
operationResultDto.setResultMsg("PeriodRequiredForVAT"); operationResultDto.setResultMsg("PeriodRequiredForVAT");
return operationResultDto; return operationResultDto;
} }
List<Template> templates = getTemplatesByProjectId(projectId); List<Template> templates = getTemplatesByProjectId(projectId);
PeriodJob genJob = WrapPeriodJobDto.createReportGenJob(projectId, periodParam, templates); PeriodJob genJob = WrapPeriodJobDto.createReportGenJob(projectId, periodParam, templates);
periodJobMapper.insert(genJob); periodJobMapper.insert(genJob);
new Thread(new Runnable() { new Thread(new Runnable() {
...@@ -1295,4 +1296,54 @@ public class ReportServiceImpl { ...@@ -1295,4 +1296,54 @@ public class ReportServiceImpl {
MyAsserts.assertNotNull(job, Exceptions.NOT_FOUND_EXCEPTION); MyAsserts.assertNotNull(job, Exceptions.NOT_FOUND_EXCEPTION);
return job; return job;
} }
public OperationResultDto doUploadAttach(MultipartFile file, String remarks){
OperationResultDto operationResultDto = new OperationResultDto();
try {
FileDto fileDto = new FileDto();
int i = file.getOriginalFilename().lastIndexOf(".");
fileDto.setFileName(file.getOriginalFilename());
if(remarks != null){
fileDto.setRemarks(remarks);
}
fileDto.setFileUrl(FileUploadUtil.upload(file, true));
//绑定
fileDto.setSize(String.valueOf(file.getSize()/1024) + "KB");
fileDto.setUploadUser(authUserHelper.getCurrentAuditor().get());
fileDto.setCreateTime(new Date());
operationResultDto.setData(fileDto);
}catch (Exception e){
e.printStackTrace();
operationResultDto.setResultMsg("error");
}
return operationResultDto;
}
@Autowired
private PwcReportAttachMapper pwcReportAttachMapper;
public void bindPwcAttach(Long activeCol, Long activeRow, String activeTemplateId, FileDto file) {
PwcReportAttach pwcReportAttach = new PwcReportAttach();
pwcReportAttach.setCol(activeCol);
pwcReportAttach.setCreateTime(file.getCreateTime());
pwcReportAttach.setRow(activeRow);
pwcReportAttach.setTemplateId(activeTemplateId);
pwcReportAttach.setFileName(file.getFileName());
pwcReportAttach.setUploadUser(file.getUploadUser());
pwcReportAttach.setFileUrl(file.getFileUrl());
pwcReportAttach.setSize(file.getSize());
pwcReportAttachMapper.insert(pwcReportAttach);
System.out.println("==>>>附件绑定成功");
}
public List<PwcReportAttach> loadAttachList(Long col, Long row, String templateId) {
PwcReportAttachExample example = new PwcReportAttachExample();
PwcReportAttachExample.Criteria criteria = example.createCriteria();
criteria.andColEqualTo(col);
criteria.andRowEqualTo(row);
criteria.andTemplateIdEqualTo(templateId);
example.setOrderByClause("create_time DESC");
return pwcReportAttachMapper.selectByExample(example);
}
} }
...@@ -41,7 +41,12 @@ ...@@ -41,7 +41,12 @@
<property name="rootInterface" value="pwc.taxtech.atms.MyVatMapper" /> <property name="rootInterface" value="pwc.taxtech.atms.MyVatMapper" />
</javaClientGenerator> </javaClientGenerator>
<table tableName="trial_balance_final" domainObjectName="TrialBalanceFinal"> <!-- <table tableName="trial_balance_final" domainObjectName="TrialBalanceFinal">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>-->
<table tableName="pwc_report_attach" domainObjectName="PwcReportAttach">
<property name="useActualColumnNames" value="false"/> <property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/> <property name="ignoreQualifiersAtRuntime" value="true"/>
</table> </table>
......
package pwc.taxtech.atms.vat.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.entity.PwcReportAttach;
import pwc.taxtech.atms.vat.entity.PwcReportAttachExample;
@Mapper
public interface PwcReportAttachMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_report_attach
*
* @mbg.generated
*/
long countByExample(PwcReportAttachExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_report_attach
*
* @mbg.generated
*/
int deleteByExample(PwcReportAttachExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_report_attach
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_report_attach
*
* @mbg.generated
*/
int insert(PwcReportAttach record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_report_attach
*
* @mbg.generated
*/
int insertSelective(PwcReportAttach record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_report_attach
*
* @mbg.generated
*/
List<PwcReportAttach> selectByExampleWithRowbounds(PwcReportAttachExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_report_attach
*
* @mbg.generated
*/
List<PwcReportAttach> selectByExample(PwcReportAttachExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_report_attach
*
* @mbg.generated
*/
PwcReportAttach selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_report_attach
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") PwcReportAttach record, @Param("example") PwcReportAttachExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_report_attach
*
* @mbg.generated
*/
int updateByExample(@Param("record") PwcReportAttach record, @Param("example") PwcReportAttachExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_report_attach
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(PwcReportAttach record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_report_attach
*
* @mbg.generated
*/
int updateByPrimaryKey(PwcReportAttach record);
}
\ No newline at end of file
...@@ -17,7 +17,7 @@ public class MyBatisGeneratorTest { ...@@ -17,7 +17,7 @@ public class MyBatisGeneratorTest {
boolean overwrite = true; boolean overwrite = true;
//配置文件 //配置文件
// File configFile = new File(MyBatisGeneratorTest.class.getClassLoader().getResource("generatorConfig.xml").getPath()); // File configFile = new File(MyBatisGeneratorTest.class.getClassLoader().getResource("generatorConfig.xml").getPath());
File configFile = new File(MyBatisGeneratorTest.class.getClassLoader().getResource("generatorConfig-invoice.xml").getPath()); File configFile = new File(MyBatisGeneratorTest.class.getClassLoader().getResource("generatorConfig.xml").getPath());
ConfigurationParser cp = new ConfigurationParser(warnings); ConfigurationParser cp = new ConfigurationParser(warnings);
Configuration config = cp.parseConfiguration(configFile); Configuration config = cp.parseConfiguration(configFile);
DefaultShellCallback callback = new DefaultShellCallback(overwrite); DefaultShellCallback callback = new DefaultShellCallback(overwrite);
......
...@@ -3,9 +3,17 @@ let grunt = require('grunt'); ...@@ -3,9 +3,17 @@ let grunt = require('grunt');
let process = (src, filepath) => { let process = (src, filepath) => {
return src.replace(/@import\s+"~\//g, '@import "'); return src.replace(/@import\s+"~\//g, '@import "');
}; };
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({ grunt.initConfig({
pkg: grunt.file.readJSON('package.json'), pkg: grunt.file.readJSON('package.json'),
appFourJs : 'app/**/**/**/**/*.js',
appThreeJs : 'app/**/**/**/*.js',
appTwoJs : 'app/**/**/*.js',
appOne : 'app/**/*.js',
appFourLess : 'app/**/**/**/**/*.less',
appThreeLess : 'app/**/**/**/*.less',
appTwoLess : 'app/**/**/*.less',
appOneLess : 'app/**/*.less',
concat: { concat: {
adminHomePageJs: { adminHomePageJs: {
src: ['app/admin/homePage/**/*.js'], src: ['app/admin/homePage/**/*.js'],
...@@ -16,7 +24,7 @@ grunt.initConfig({ ...@@ -16,7 +24,7 @@ grunt.initConfig({
files: { files: {
'<%= pkg.bundleDest %>/less/adminHomePage.less': ['app/admin/homePage/**/*.less'] '<%= pkg.bundleDest %>/less/adminHomePage.less': ['app/admin/homePage/**/*.less']
} }
}, },
basicDataJs: { basicDataJs: {
src: ['app/admin/basicData/**/*.js'], src: ['app/admin/basicData/**/*.js'],
dest: '<%= pkg.bundleTemp %>/basicData.js' dest: '<%= pkg.bundleTemp %>/basicData.js'
...@@ -516,7 +524,16 @@ grunt.initConfig({ ...@@ -516,7 +524,16 @@ grunt.initConfig({
dest: '<%= pkg.bundleDest %>/' dest: '<%= pkg.bundleDest %>/'
}] }]
} }
} },
watch : {
scripts: {
files: ['<%=appFourJs%>','<%=appThreeJs%>','<%=appTwoJs%>','<%=appOne%>','<%=appFourLess%>','<%=appThreeLess%>','<%=appTwoLess%>','<%=appOneLess%>'],
tasks: ['dev'],
options: {
spawn: false
}
}
}
}); });
grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-concat');
......
...@@ -176,6 +176,8 @@ span.form-control-customer { ...@@ -176,6 +176,8 @@ span.form-control-customer {
/* LOGIN */ /* LOGIN */
body.login-body { body.login-body {
background: #999999 url('/app-resources/images/login_pic.jpg') no-repeat; background: #999999 url('/app-resources/images/login_pic.jpg') no-repeat;
height: calc(100% - 16px);
background-size: cover;
color: #333; color: #333;
overflow-y: auto; overflow-y: auto;
} }
......
...@@ -659,7 +659,7 @@ ...@@ -659,7 +659,7 @@
$scope.closeUserCard(); $scope.closeUserCard();
$scope.areaORGGridList.data = []; $scope.areaORGGridList.data = [];
$scope.commonCountDataSource = []; $scope.commonCountDataSource= [];
if ($scope.panelArea.organizationList && $scope.panelArea.organizationList.length > 0) { if ($scope.panelArea.organizationList && $scope.panelArea.organizationList.length > 0) {
parseDataGridOnlyOrg(); parseDataGridOnlyOrg();
} else { } else {
......
...@@ -79,7 +79,6 @@ function ($scope, $log, $timeout, $q, $http, $sce, $translate, loginContext, api ...@@ -79,7 +79,6 @@ function ($scope, $log, $timeout, $q, $http, $sce, $translate, loginContext, api
item.text = $translate.instant(statusTmp); item.text = $translate.instant(statusTmp);
calcProgress(item.name); calcProgress(item.name);
} }
} }
}; };
...@@ -489,8 +488,8 @@ function ($scope, $log, $timeout, $q, $http, $sce, $translate, loginContext, api ...@@ -489,8 +488,8 @@ function ($scope, $log, $timeout, $q, $http, $sce, $translate, loginContext, api
// break; // break;
// default: // default:
// item.isSelected = false; // item.isSelected = false;
//} //}
var newTask = new task(item.id, constant.DataProccessStatus.Unstarted, item.name, item.tasklevel, item.parentId, item.hasButton, item.seqNo); var newTask = new task(item.id, constant.DataProccessStatus.Unstarted, item.name, item.tasklevel, item.parentId, item.hasButton, item.seqNo);
newTask.btTitle = $translate.instant('DataProcessData_Generate');// item.btTitle; newTask.btTitle = $translate.instant('DataProcessData_Generate');// item.btTitle;
newTask.isSelected = true;//item.isSelected; newTask.isSelected = true;//item.isSelected;
......
<div id="vat-caculate-data"> <div id="vat-caculate-data">
<div style="font-family:'Microsoft YaHei';font-size:18px;margin-top:10px">{{'vatCaculateDataDesc' | translate}}</div> <div style="font-family:'Microsoft YaHei';font-size:18px;margin-top:10px">{{'vatCaculateDataDesc' | translate}}</div>
<div class="vat-caculate-data-title"> <div class="vat-caculate-data-title">
<button id="calAll" class="btn btn-vat-primary" style="background-color: #B4122A;" translate="startCaculateData" ng-disabled="readonly" ng-click="startCaculate($event)"></button> <button id="calAll" class="btn btn-vat-primary" style="background-color: #B4122A;" translate="startCaculateData" ng-disabled="readonly" ng-click="startCaculate($event)"></button>
<span ng-click="showOperateLogPop()" class="right"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'Remarks' | translate}}</span> <span ng-click="showOperateLogPop()" class="right"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'Remarks' | translate}}</span>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</form> </form>
</div> </div>
</perfect-scrollbar> </perfect-scrollbar>
</div> </div>
<vat-operate-log period="period" module-type="moduleid" is-show="isShowLog" service-type="serviceType"></vat-operate-log> <vat-operate-log period="period" module-type="moduleid" is-show="isShowLog" service-type="serviceType"></vat-operate-log>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<div ng-bind="detail.formulaDesc"></div> <div ng-bind="detail.formulaDesc"></div>
</perfect-scrollbar> </perfect-scrollbar>
</div> </div>
</div> </div>
<div class="pair-item" id="data-source"> <div class="pair-item" id="data-source">
<label translate="DataSource" id="datasource-title"></label> <label translate="DataSource" id="datasource-title"></label>
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
OperationType: '', OperationType: '',
OperationContent: '', OperationContent: '',
OriginalState: '', OriginalState: '',
UpdateState: '', UpdateState: '',
CreatorID: vatSessionService.logUser.ID, CreatorID: vatSessionService.logUser.ID,
Comment: comment, Comment: comment,
......
...@@ -1774,7 +1774,7 @@ ...@@ -1774,7 +1774,7 @@
var showErrTab = function() { var showErrTab = function() {
$scope.ImportErrorTab = true; $scope.ImportErrorTab = true;
$scope.ImportErrorTag = true; $scope.ImportErrorTag = true;
$scope.errorMsg = $translate.instant('ImportErrorMsg').formatObj({ "NumberOfError": $scope.errorList.length }); $scope.errorMsg = $translate.instant('ImportErrorMsg').formatObj({ "Nu__RequestVerificationTokenmberOfError": $scope.errorList.length });
}; };
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<form class="form-inline" id="navigationForm" name="navigationForm"> <form class="form-inline" id="navigationForm" name="navigationForm">
<div class="form-group" ng-style="setButtonWrapStyle()"> <div class="form-group" ng-style="setButtonWrapStyle()">
<div class="import-wrapper"> <div class="import-wrapper">chunkSize
<button type="button" atms-permission permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}" <button type="button" atms-permission permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
ngf-select="" ng-model="fileNameWrapper" ngf-drag-over-class="'dragover'" accept=".xls,.xlsx" ngf-multiple="false" ngf-select="" ng-model="fileNameWrapper" ngf-drag-over-class="'dragover'" accept=".xls,.xlsx" ngf-multiple="false"
ngf-allow-dir="false" class="btn btn-vat-third" style="margin-right:10px"> ngf-allow-dir="false" class="btn btn-vat-third" style="margin-right:10px">
......
...@@ -5,7 +5,8 @@ function ($log) { ...@@ -5,7 +5,8 @@ function ($log) {
templateUrl: '/app/common/controls/tax-report-cell-detail-modal/tax-report-cell-detail-modal.html' + '?_=' + Math.random(), templateUrl: '/app/common/controls/tax-report-cell-detail-modal/tax-report-cell-detail-modal.html' + '?_=' + Math.random(),
scope: { scope: {
detail: '=', detail: '=',
onConfirm: '&' onConfirm: '&',
activeSheet : '='
}, },
controller: 'taxReportCellDetailModalController', controller: 'taxReportCellDetailModalController',
link: function ($scope, $element, $attr) { link: function ($scope, $element, $attr) {
......
...@@ -160,6 +160,7 @@ ...@@ -160,6 +160,7 @@
scope.internalApi.onCellDoubleClick({ scope.internalApi.onCellDoubleClick({
'sender': sender, 'sender': sender,
'args': args, 'args': args,
'templateId' : scope.templateId,
'data': JSON.parse(args.sheet.getTag(args.row, args.col)) 'data': JSON.parse(args.sheet.getTag(args.row, args.col))
}); });
$log.debug(args.sheet.getTag(args.row, args.col)); $log.debug(args.sheet.getTag(args.row, args.col));
......
...@@ -19,6 +19,13 @@ ...@@ -19,6 +19,13 @@
$scope.manualSpread = {}; $scope.manualSpread = {};
$scope.file = null; $scope.file = null;
$scope.activeSheet = {
activeCol : null,
activeRow : null,
activeTemplateId : null
};
//Notice: ************************************ //Notice: ************************************
//$scope.templateCode, $scope.reportId, $scope.initRow, $scope.initCol等都是外部传递进来的数据。 //$scope.templateCode, $scope.reportId, $scope.initRow, $scope.initCol等都是外部传递进来的数据。
//$scope.templateCode对应的是TaxAdmin.Template中的Code字段 //$scope.templateCode对应的是TaxAdmin.Template中的Code字段
...@@ -436,13 +443,17 @@ ...@@ -436,13 +443,17 @@
calculateCellSubValue(jsonTagInfo); calculateCellSubValue(jsonTagInfo);
showTaxReportCellDetail(isSingleClick); showTaxReportCellDetail(isSingleClick);
}; };
var setTaxReportCellPopInfo = function (cellEvent, isSingleClick) { var setTaxReportCellPopInfo = function (cellEvent, isSingleClick) {
var row = cellEvent.args.row; var row = cellEvent.args.row;
var column = cellEvent.args.col; var column = cellEvent.args.col;
//纳税申报表 //纳税申报表
var sheets = $scope.spread.sheets; var sheets = $scope.spread.sheets;
$scope.activeSheet.activeTemplateId = cellEvent.templateId;
$scope.activeSheet.activeCol = cellEvent.args.col;
$scope.activeSheet.activeRow = cellEvent.args.row;
if (sheets && sheets.length > 0) { if (sheets && sheets.length > 0) {
var tagInfo = sheets[0].getTag(row, column); var tagInfo = sheets[0].getTag(row, column);
if (constant.regesterInformation.active) { if (constant.regesterInformation.active) {
...@@ -845,6 +856,8 @@ ...@@ -845,6 +856,8 @@
setTaxReportCellPopInfo($event); setTaxReportCellPopInfo($event);
} }
//
}; };
$scope.exportExcel = function () { $scope.exportExcel = function () {
......
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
</vat-report-sheet> </vat-report-sheet>
</div> </div>
<cell-detail-panel detail="cellDetail" id="cell-detail" source-type="isBSPLSpecial"></cell-detail-panel> <cell-detail-panel detail="cellDetail" id="cell-detail" source-type="isBSPLSpecial"></cell-detail-panel>
<tax-report-cell-detail-modal on-confirm="confirm()" detail="taxCellDetail" id="tax-cell-detail" <tax-report-cell-detail-modal on-confirm="confirm()" detail="taxCellDetail" id="tax-cell-detail" active-sheet = "activeSheet"
service-type="serviceType" <!--service-type="serviceType"
on-update-data-source="updateCellByManualChange(manualData)" on-update-data-source="updateCellByManualChange(manualData)"
on-delete-data-source="updateCellByManualSourceDelete(dataSourceId, cellId)" on-delete-data-source="updateCellByManualSourceDelete(dataSourceId, cellId)"
on-delete-data-source-detail="updateCellBySourceDetailDelete(dataSource, detailId, opType)"> on-delete-data-source-detail="updateCellBySourceDetailDelete(dataSource, detailId, opType)"-->>
</tax-report-cell-detail-modal> </tax-report-cell-detail-modal>
<vat-operate-log period="period" module-type="moduleid" is-show="isShowLog"></vat-operate-log> <vat-operate-log period="period" module-type="moduleid" is-show="isShowLog"></vat-operate-log>
<div class='export-container hidden'></div> <div class='export-container hidden'></div>
......
...@@ -194,6 +194,9 @@ ...@@ -194,6 +194,9 @@
}, },
hasManualDataSource: function (projectId, period) { hasManualDataSource: function (projectId, period) {
return $http.get('/Report/hasManualDataSource/' + projectId+ '/' +period, apiConfig.createVat()); return $http.get('/Report/hasManualDataSource/' + projectId+ '/' +period, apiConfig.createVat());
},
loadAttachList : function(activeSheet){
return $http.get('/Report/loadAttachList?col='+ activeSheet.activeCol + "&row=" + activeSheet.activeRow + "&templateId=" +activeSheet.activeTemplateId, apiConfig.createVat());
} }
}; };
......
...@@ -7,26 +7,26 @@ ...@@ -7,26 +7,26 @@
$scope.revenueGridOptions = $.extend(true, {}, dxDataGridService.BASIC_GRID_OPTIONS, { $scope.revenueGridOptions = $.extend(true, {}, dxDataGridService.BASIC_GRID_OPTIONS, {
columns: [ columns: [
// {dataField: 'serialNo', caption: $translate.instant('RevenueColSerialNo'), fixed: true, allowHeaderFiltering: true}, // {dataField: 'serialNo', caption: $translate.instant('RevenueColSerialNo'), fixed: true, allowHeaderFiltering: true},
{dataField: 'name', caption: $translate.instant('RevenueColName'), fixed: true, allowHeaderFiltering: true}, {dataField: 'name', caption: $translate.instant('RevenueColName'), fixed: true, allowHeaderFiltering: true, minWidth: '300px'},
{dataField: 'orgId', caption: $translate.instant('RevenueColOrg'), fixed: true, allowHeaderFiltering: true, {dataField: 'orgId', caption: $translate.instant('RevenueColOrg'), fixed: true, allowHeaderFiltering: true, minWidth: '300px',
calculateCellValue: function(data) { calculateCellValue: function(data) {
return _.find($scope.selectOrgList, function(o) { return _.find($scope.selectOrgList, function(o) {
return o.id === data.orgId; return o.id === data.orgId;
}).name; }).name;
}}, }},
//todo 组装accountName //todo 组装accountName
{dataField: 'accountTypeStr', caption: $translate.instant('RevenueColAccountName'), fixed: true, allowHeaderFiltering: true}, {dataField: 'accountTypeStr', caption: $translate.instant('RevenueColAccountName'), fixed: true, allowHeaderFiltering: true, width: '100px'},
{dataField: 'taxRate', caption: $translate.instant('RevenueColTaxRate'), fixed: true, allowHeaderFiltering: true, {dataField: 'taxRate', caption: $translate.instant('RevenueColTaxRate'), fixed: true, allowHeaderFiltering: true, width: '50px',
calculateCellValue: function(data) { calculateCellValue: function(data) {
return (data.taxRate * 100) + '%'; return (data.taxRate * 100) + '%';
}}, }},
{dataField: 'taxBaseStr', caption: $translate.instant('RevenueColTaxBase'), fixed: true, allowHeaderFiltering: true}, {dataField: 'taxBaseStr', caption: $translate.instant('RevenueColTaxBase'), fixed: true, allowHeaderFiltering: true, width: '120px'},
{dataField: 'revenueTypeStr', caption: $translate.instant('RevenueColType'), fixed: true, allowHeaderFiltering: true}, {dataField: 'revenueTypeStr', caption: $translate.instant('RevenueColType'), fixed: true, allowHeaderFiltering: true, minWidth: '250px'},
{dataField: 'taxTypeStr', caption: $translate.instant('RevenueColTaxType'), fixed: true, allowHeaderFiltering: true}, {dataField: 'taxTypeStr', caption: $translate.instant('RevenueColTaxType'), fixed: true, allowHeaderFiltering: true, width: '120px'},
{dataField: 'statusStr', caption: $translate.instant('RevenueColStatus'), fixed: true, allowHeaderFiltering: true}, {dataField: 'statusStr', caption: $translate.instant('RevenueColStatus'), fixed: true, allowHeaderFiltering: true, width: '50px'},
{dataField: 'startDate', caption: $translate.instant('RevenueColEnable'), fixed: true, allowHeaderFiltering: true}, {dataField: 'startDate', caption: $translate.instant('RevenueColEnable'), fixed: true, allowHeaderFiltering: true, width: '120px'},
{dataField: 'endDate', caption: $translate.instant('RevenueColDisable'), fixed: true, allowHeaderFiltering: true}, {dataField: 'endDate', caption: $translate.instant('RevenueColDisable'), fixed: true, allowHeaderFiltering: true, width: '120px'},
{dataField: '', caption: $translate.instant('RevenueColEdit'), fixed: true, {dataField: '', caption: $translate.instant('RevenueColEdit'), fixed: true,width: '80px', alignment: 'center',
cellTemplate: function (container, options) { cellTemplate: function (container, options) {
try { try {
$('<i class="fa fa-pencil-square-o" style="cursor: pointer"></i>&nbsp;&nbsp;') $('<i class="fa fa-pencil-square-o" style="cursor: pointer"></i>&nbsp;&nbsp;')
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
showClearButton: true, showClearButton: true,
searchEnabled: true, searchEnabled: true,
noDataText: $translate.instant('RevenueNoOrgData'), noDataText: $translate.instant('RevenueNoOrgData'),
showSelectionControls: true, showSelectionControls: true
}; };
//税率下拉框 //税率下拉框
...@@ -300,6 +300,7 @@ ...@@ -300,6 +300,7 @@
acceptCustomValue: false, acceptCustomValue: false,
openOnFieldClick: true, openOnFieldClick: true,
displayFormat: 'yyyy-MM', displayFormat: 'yyyy-MM',
maxZoomLevel: "year",
dateSerializationFormat: 'yyyy-MM', dateSerializationFormat: 'yyyy-MM',
bindingOptions: { bindingOptions: {
value: 'formParam.startDate' value: 'formParam.startDate'
...@@ -311,6 +312,7 @@ ...@@ -311,6 +312,7 @@
acceptCustomValue: false, acceptCustomValue: false,
openOnFieldClick: true, openOnFieldClick: true,
displayFormat: 'yyyy-MM', displayFormat: 'yyyy-MM',
maxZoomLevel: "year",
dateSerializationFormat: 'yyyy-MM', dateSerializationFormat: 'yyyy-MM',
bindingOptions: { bindingOptions: {
value: 'formParam.endDate' value: 'formParam.endDate'
......
...@@ -239,7 +239,6 @@ ...@@ -239,7 +239,6 @@
taskList = taskList.concat(item.items); taskList = taskList.concat(item.items);
}); });
$scope.tasks = result;
getInitTaskStatus(); getInitTaskStatus();
}); });
}; };
...@@ -370,7 +369,7 @@ ...@@ -370,7 +369,7 @@
text: $translate.instant('IsConfirmReCalcuate').formatObj({status: vatCommonService.getProjectStautsEnumDesc(vatSessionService.project.projectStatusList[vatSessionService.month])}), text: $translate.instant('IsConfirmReCalcuate').formatObj({status: vatCommonService.getProjectStautsEnumDesc(vatSessionService.project.projectStatusList[vatSessionService.month])}),
type: "warning", type: "warning",
showCancelButton: true, showCancelButton: true,
confirmButtonColor: "#DD6B55", confirmButtonColor: "#dd6b55",
confirmButtonText: $translate.instant('Yes'), confirmButtonText: $translate.instant('Yes'),
cancelButtonText: $translate.instant('No'), cancelButtonText: $translate.instant('No'),
closeOnConfirm: true, closeOnConfirm: true,
...@@ -582,9 +581,7 @@ ...@@ -582,9 +581,7 @@
}else if(updateConfig.status == 'Begin'){ }else if(updateConfig.status == 'Begin'){
$scope.tasks[0].items[0].status = 'processing'; $scope.tasks[0].items[0].status = 'processing';
} }
$scope.tasks[0].items[0].text= $translate.instant($scope.tasks[0].items[0].status); $scope.tasks[0].items[0].text= $translate.instant($scope.tasks[0].items[0].status);
items.forEach(function(item,index){ items.forEach(function(item,index){
tasks.forEach(function(task){ tasks.forEach(function(task){
if(task.code==item.code){ if(task.code==item.code){
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
<ul ng-if="group.items.length > 1" ng-repeat="task in group.items track by $index"> <ul ng-if="group.items.length > 1" ng-repeat="task in group.items track by $index">
<li ng-include="'task_template'" /> <li ng-include="'task_template'" />
</ul> </ul>
<div ng-if="group.items.length == 1" ng-repeat="task in group.items track by $index" style="height:42px;" ng-include="'task_template'" /> <div ng-if="group.items.length == 1" ng-repeat="task in group.items track by $index" style="height:42px;" ng-include="'task_template'" />
</script> </script>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
aria-hidden="true"></i> aria-hidden="true"></i>
<label class="tree-toggle nav-header" translate="{{group.name}}"></label> <label class="tree-toggle nav-header" translate="{{group.name}}"></label>
</div> </div>
<div class="divider"></div> <div class="divider"></div>
<div ng-show="group.isExpand" class="animate-show-hide"> <div ng-show="group.isExpand" class="animate-show-hide">
<div class="li tree" ng-repeat="menu in group.children"> <div class="li tree" ng-repeat="menu in group.children">
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</ul> </ul>
</perfect-scrollbar> </perfect-scrollbar>
</div> </div>
<div id="vat-report-content" style="overflow:hidden;height:100%" > <div id="vat-report-content" style="overflow:hidden;height:100%" >
<div class="vat-report-content" ui-view></div> <div class="vat-report-content" ui-view></div>
</div> </div>
......
This diff is collapsed.
This diff is collapsed.
.account-tree-wrapper{display:inline-block}.account-tree-container{overflow-y:scroll;max-height:500px;width:250px;position:absolute;background-color:#fff;-moz-box-shadow:0 10px 20px #000;-webkit-box-shadow:0 10px 20px #000;box-shadow:0 10px 20px #000}.selector-input{width:250px}.account-tree .angular-ui-tree-handle{margin-bottom:0}.account-tree .expander{line-height:initial}.account-tree .angular-ui-tree-node .angular-ui-tree-node .angular-ui-tree-handle:hover{background-color:#ccc}.menu-tree-wrapper{display:inline-block}.menu-tree-container{overflow-y:scroll;overflow-x:hidden;max-height:150px;width:250px;position:absolute;z-index:2;background-color:#fff;-moz-box-shadow:0 10px 20px #000;-webkit-box-shadow:0 10px 20px #000;box-shadow:0 10px 20px #000}.selector-input{width:250px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.menu-tree-wrapper .tree-view{padding:10px 0 0 0;min-height:150px}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
.import-trial-balance .weight-normal{font-weight:400}.import-trial-balance{height:700px;overflow-y:auto;background-color:#fff}.import-trial-balance .title-normal{font-weight:bolder;font-size:20px}.import-trial-balance .weight-normal{font-weight:bolder;font-size:14px}.import-trial-balance .nav-button{background-color:#d3d3d3;width:106px}.import-trial-balance .nav-button:hover{background-color:red;color:#fff}.import-trial-balance .import-button{background-color:red}.import-trial-balance .import-button:hover{color:#fff}.import-trial-balance .a-border{border:none}.import-trial-balance .table-container{padding-top:30px;padding-left:20px;padding-right:20px;padding-bottom:30px}.import-trial-balance .table-gray-header thead tr{background-color:#e7e5e2;color:#000}.import-trial-balance .table-gray-header tbody tr td:first-child{text-align:center}.import-trial-balance .operation-row{background-color:#fff!important}.import-trial-balance .operation-row td{padding:0!important}.import-trial-balance .table-bordered>thead>tr>th{border:none}.import-trial-balance .dropdown-wrapper{display:inline-block;width:100%}.import-trial-balance .dropdown-wrapper>.btn-white{width:100%;text-align:left}.import-trial-balance .btn-white,.import-trial-balance .btn-white:active,.import-trial-balance .btn-white:focus,.import-trial-balance .btn-white:hover,.import-trial-balance .open>.dropdown-toggle.btn-white{background-color:#fff;border-color:#fff;color:#000}.import-trial-balance .caret-outer{float:right;display:inline-block;height:25px;width:25px;background-color:#dc6900}.import-trial-balance .caret-import-inner-data{color:#fff;margin-top:4px;border-top:6px dashed;border-right:6px solid transparent;border-left:6px solid transparent;margin-left:6px!important}.import-trial-balance .table-error{max-height:400px;padding-top:30px;padding-left:20px;padding-right:20px;overflow:scroll}
\ No newline at end of file
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
"grunt-contrib-copy": "^1.0.0", "grunt-contrib-copy": "^1.0.0",
"grunt-contrib-cssmin": "^3.0.0", "grunt-contrib-cssmin": "^3.0.0",
"grunt-contrib-less": "1.4.1", "grunt-contrib-less": "1.4.1",
"grunt-contrib-uglify": "^4.0.0" "grunt-contrib-uglify": "^4.0.0",
"grunt-contrib-watch": "^1.1.0"
} }
} }
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