Commit 778dfe62 authored by sherlock's avatar sherlock

merge

parents aa4d1dc9 f8eba103
......@@ -367,6 +367,25 @@
<artifactId>activiti-rest</artifactId>
<version>${activiti.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.grapecity.documents/gcexcel -->
<dependency>
<groupId>com.grapecity.documents</groupId>
<artifactId>gcexcel</artifactId>
<version>2.0.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.12</version>
</dependency>
</dependencies>
<profiles>
......
kill -9 `ps -ef |grep java | grep atms-api | awk '{print $2}'`
export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n"
rm -f nohup.out
nohup mvn clean tomcat7:run -Dmaven.test.skip=true -f pom.xml &
......@@ -41,4 +41,12 @@ public class MyAsserts {
public static void assertEmpty(Collection obj, ApiException exception) {
if (obj != null && !obj.isEmpty()) throw exception;
}
public static <T,S> void assertEq(T t,S s,ApiException exception){
if(s != t) throw exception;
}
public static <T,S> void assertNotEq(T t,S s,ApiException exception){
if(s == t) throw exception;
}
}
......@@ -3,12 +3,14 @@ package pwc.taxtech.atms.controller;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.constant.enums.EnumServiceType;
import pwc.taxtech.atms.dpo.ReportDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.vat.entity.PeriodCellTemplateConfig;
import pwc.taxtech.atms.vat.entity.PeriodJob;
import pwc.taxtech.atms.vat.entity.VatEnterpriseAccount;
import pwc.taxtech.atms.vat.service.impl.ReportServiceImpl;
......@@ -21,27 +23,32 @@ public class ReportController {
@Autowired
ReportServiceImpl reportService;
@RequestMapping(value = "export", method = RequestMethod.POST)
public ResponseEntity getExportFile(ReportExportDto report) {
return ResponseEntity.ok(reportService.export(report.getReportData(), "~"));
}
@RequestMapping(value = "template/{projectId}/{serviceType}/{period}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto<List<ReportDto>> getTemplate(@PathVariable String projectId, @PathVariable int serviceType, @PathVariable Integer period) {
return reportService.getReportTemplate(projectId, EnumServiceType.getEnumByCode(serviceType), period);
}
@RequestMapping(value = "updateConfig/{projectId}/{ifDeleteManualDataSource}/{period}", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto updateConfig(@PathVariable String projectId,
@PathVariable Boolean ifDeleteManualDataSource,
@PathVariable Integer period,
@RequestParam String generator,
@RequestParam Boolean mergeManual) {
return reportService.updateConfig(projectId, period, ifDeleteManualDataSource, generator, mergeManual);
// OperationResultDto operationResultDto = new OperationResultDto();
// operationResultDto.setResult(true);
// return operationResultDto;
@RequestMapping(value = "generateByTotal/{projectId}/{mergeManual}/{period}", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto generateAllData(@PathVariable String projectId, @PathVariable Integer period, @RequestParam Optional<String> generator,
@PathVariable Boolean mergeManual) {
return reportService.generateData(projectId, EnumServiceType.VAT, mergeManual, period, null, generator);
}
@RequestMapping(value = "generateByTotal/{projectId}/{ifDeleteManualDataSource}/{period}", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto generateAllData(@PathVariable String projectId, @PathVariable Boolean ifDeleteManualDataSource,
@PathVariable Integer period, @RequestParam Optional<String> generator) {
return reportService.generateData(projectId, EnumServiceType.VAT, ifDeleteManualDataSource, period, null, generator);
@RequestMapping(value = "getRunningJob/{projectId}/{period}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
public PeriodJob getRunningJob(@PathVariable String projectId, @PathVariable Integer period) {
return reportService.getRunningJob(projectId, period);
}
@RequestMapping(value = "getJobStatus/{projectId}//{period}/{jobId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
public PeriodJob getJobStatus(@PathVariable String projectId, @PathVariable Integer period, @PathVariable String jobId) {
return reportService.getJobStatus(projectId, period, jobId);
}
@RequestMapping(value = "templateReferences/{period}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
......@@ -129,6 +136,8 @@ public class ReportController {
@RequestMapping(value = "hasManualDataSource/{projectId}/{period}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public Boolean hasManualDataSource(@PathVariable String projectId, @PathVariable Integer period) {
return reportService.hasManualDataSource(projectId,period);
return reportService.hasManualDataSource(projectId, period);
}
}
\ No newline at end of file
package pwc.taxtech.atms.dto.vatdto;
import lombok.Getter;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.entity.Project;
import pwc.taxtech.atms.entity.TemplateGroup;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.service.impl.Message;
import pwc.taxtech.atms.vat.entity.PeriodCellTemplate;
import pwc.taxtech.atms.vat.entity.PeriodCellTemplateConfig;
import pwc.taxtech.atms.vat.entity.PeriodTemplate;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@Getter
public class PeriodResources {
Project project;
List<PeriodTemplate> periodTemplates = new ArrayList<>();
List<PeriodCellTemplate> periodCellTemplates = new ArrayList<>();
List<PeriodCellTemplateConfig> periodCellTemplateConfigs = new ArrayList<>();
public void setProject(Project project) {
this.project = project;
}
public void putAllTemplate(List<PeriodTemplate> periodTemplates) {
this.periodTemplates.addAll(periodTemplates);
}
public List<Long> getTemolateIds() {
MyAsserts.assertNotEmpty(periodTemplates, Exceptions.NOT_FOUND_TEMPLATE_EXCEPTION);
return periodTemplates.stream()
.map(PeriodTemplate::getTemplateId)
.collect(Collectors.toList());
}
public void putAllCellTemplate(List<PeriodCellTemplate> periodCellTemplates) {
this.periodCellTemplates.addAll(periodCellTemplates);
}
public void putAllCellTemplateConfig(List<PeriodCellTemplateConfig> periodCellTemplateConfigs) {
this.periodCellTemplateConfigs.addAll(periodCellTemplateConfigs);
}
public Long getTemplateGroupId(){
return periodTemplates.get(0).getTemplateGroupId();
}
}
package pwc.taxtech.atms.dto.vatdto;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class ReportExportDto {
@JsonProperty("ReportType")
private String reportType;
@JsonProperty("ReportData")
private String reportData;
}
package pwc.taxtech.atms.dto.vatdto;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.entity.Project;
import pwc.taxtech.atms.entity.Template;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.vat.entity.PeriodJob;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
public class WrapPeriodJobDto {
public static final String STATUS_BEGIN = "Begin";
public static final String STATUS_CANCEL = "Cancel";
public static final String STATUS_ERROR = "Error";
public static final String STATUS_END = "End";
public static final String STEP_UPDATE_CONFIG = "UpdateConfig";
public static PeriodJob createReportGenJob(String projectId, Integer period, List<Template> templates) {
MyAsserts.assertNotEmpty(templates, Exceptions.NOT_FOUND_TEMPLATE_EXCEPTION);
PeriodJob job = new PeriodJob();
job.setCreateTime(new Date());
job.setName("Gen All Report");
job.setProjectId(projectId);
job.setPeriod(period);
job.setId(UUID.randomUUID().toString());
job.setStatus(STATUS_BEGIN);
job.setCurrentStep(STEP_UPDATE_CONFIG);
StringBuilder builder = new StringBuilder(STEP_UPDATE_CONFIG);
templates.forEach(m -> {
builder.append(",").append(m.getCode());
});
job.setStepsCode(builder.toString());
return job;
}
}
package pwc.taxtech.atms.exception;
import org.springframework.http.ResponseEntity;
import javax.net.ssl.SSLEngineResult;
import static org.springframework.http.HttpStatus.CONFLICT;
public class ConflictException extends ApiException {
public ConflictException() {
super();
}
public ConflictException(String message) {
super(message);
}
public ConflictException(String message, Throwable cause) {
super(message, cause);
}
public ConflictException(Throwable cause) {
super(cause);
}
@Override
public <Object> ResponseEntity handle() {
return ResponseEntity.status(CONFLICT).build();
}
}
......@@ -10,6 +10,12 @@ public class Exceptions {
public static final ApiException EMPTY_PROJECT_PARAM = new BadParameterException("project is empty");
public static final ApiException EMPTY_PRIODDATE_PARAM = new BadParameterException("period data is empty");
public static final ApiException NOT_FOUND_REPORT_EXCEPTION = new NotFoundException("not found report");
public static final ApiException NOT_FOUND_TEMPLATE_EXCEPTION = new NotFoundException("not found template");
public static final ApiException REPORT_HAS_COMMIT_EXCEPTION = new AlreadyExistsException("report approval has commit");
public static final ApiException SERVER_ERROR_EXCEPTION= new ServerErrorException("server error exception");
public static final ApiException SERVER_ERROR_EXCEPTION = new ServerErrorException("server error exception");
public static final ApiException TASK_HAS_BEGINNING = new ConflictException("task has beginning ..");
public static final ApiException PROJECT_EMPTY_EXCEPTION = new BadParameterException("projectId is empty");
public static final ApiException PROJECT_PROJECT_EXCEPTION = new NotFoundException("not found project");
public static final ApiException NOT_FOUND_TEMPLATE_GROUP_EXCEPTION = new NotFoundException("not found template group");
public static final ApiException NOT_FOUND_EXCEPTION = new NotFoundException("not found resources");
}
......@@ -2,10 +2,7 @@ package pwc.taxtech.atms.vat.service.impl.report.functions;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.WorkbookEvaluator;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.OperandResolver;
import org.apache.poi.ss.formula.eval.StringEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.eval.*;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -40,7 +37,7 @@ public class BB extends FunctionBase implements FreeRefFunction {
} catch (Exception e) {
if (e instanceof FormulaException)
LOGGER.warn("Formula Exception || {}", e.getMessage());
else
e.printStackTrace();
return defaultEval;
}
......@@ -95,10 +92,18 @@ public class BB extends FunctionBase implements FreeRefFunction {
Field evaluatorField = OperationEvaluationContext.class.getDeclaredField("_bookEvaluator");
evaluatorField.setAccessible(true);
WorkbookEvaluator evaluator = (WorkbookEvaluator) evaluatorField.get(ec);
ValueEval eval = evaluator.evaluate(ec.getWorkbook().getSheet(ec.getWorkbook().getSheetIndex(bo.getReportCode()))
int index = ec.getWorkbook().getSheetIndex(bo.getReportCode());
if (index < 0) logger.warn("not found sheet code {}", bo.getReportCode());
ValueEval eval = evaluator.evaluate(ec.getWorkbook().getSheet(index)
.getCell(bo.getRowIndex() - 1, bo.getColumnIndex() - 1));
bo.putPeriodCellTempate(formulaContext.getPeriod(), Long.parseLong(cellTemplateData.getCellTemplateId()));
if (eval instanceof ErrorEval) {
LOGGER.warn("error eval for bb {} and error code {} and error String {}", bo.toString(),
((ErrorEval) eval).getErrorCode(), ((ErrorEval) eval).getErrorString());
}
cellValue = new BigDecimal(OperandResolver.coerceValueToDouble(eval));
nullCellDto.extractFromGroup(bo, formulaContext.getPeriod(), formulaContext.getYear(), cellTemplateData);
......
......@@ -2,6 +2,7 @@ package pwc.taxtech.atms.vat.service.impl.report.functions;
import lombok.Getter;
import lombok.Setter;
import pwc.taxtech.atms.entity.Project;
import pwc.taxtech.atms.vat.service.impl.FormulaAgent;
@Setter
......@@ -36,4 +37,22 @@ public class FormulaContext {
private FormulaAgent formulaAgent;
//private Map<String, FormulaResult> replaceSpecialCellFormulaDic;
public static FormulaContext extractContextFromProject(Project project){
FormulaContext formulaContext = new FormulaContext();
formulaContext.setProjectId(project.getId());
formulaContext.setYear(project.getYear());
formulaContext.setIfRound(true);
formulaContext.setOrganizationId(project.getOrganizationId());
formulaContext.setIfRound(true);
return formulaContext;
}
public FormulaContext fixedFormula(Integer period,Long reportTemplateGroupId,FormulaAgent agent){
this.period=period;
this.formulaAgent=agent;
this.reportTemplateGroupId=reportTemplateGroupId;
this.isYear=(period==0);
return this;
}
}
......@@ -228,5 +228,11 @@
<columnOverride column="YEAR" javaType="java.lang.Integer" />
</table>
<table tableName="PERIOD_JOB" schema="tax_admin" domainObjectName="PeriodJob">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
<columnOverride column="PERIOD" javaType="java.lang.Integer" />
</table>
</context>
</generatorConfiguration>
\ No newline at end of file
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.annotations.Select;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.entity.PeriodJob;
import pwc.taxtech.atms.vat.entity.PeriodJobExample;
@Mapper
public interface PeriodJobMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated
*/
long countByExample(PeriodJobExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated
*/
int deleteByExample(PeriodJobExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated
*/
int deleteByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated
*/
int insert(PeriodJob record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated
*/
int insertSelective(PeriodJob record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated
*/
List<PeriodJob> selectByExampleWithRowbounds(PeriodJobExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated
*/
List<PeriodJob> selectByExample(PeriodJobExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated
*/
PeriodJob selectByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") PeriodJob record, @Param("example") PeriodJobExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated
*/
int updateByExample(@Param("record") PeriodJob record, @Param("example") PeriodJobExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(PeriodJob record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated
*/
int updateByPrimaryKey(PeriodJob record);
@Select("SELECT " +
" ID AS id, " +
" NAME AS name, " +
" CURRENT_STEP AS currentStep, " +
" PROJECT_ID AS projectId, " +
" PERIOD AS period, " +
" STEPS_CODE AS stepsCode, " +
" CREATE_TIME AS createTime, " +
" STATUS AS status, " +
" ERROR_MSG AS errorMsg " +
"FROM " +
" PERIOD_JOB " +
"WHERE " +
" STATUS = 'Begin' " +
" AND PROJECT_ID = #{projectId} " +
" AND PERIOD =#{period}")
PeriodJob getRunningJob(@Param("projectId") String projectId, @Param("period") Integer period);
@Select("SELECT " +
" ID AS id, " +
" NAME AS name, " +
" CURRENT_STEP AS currentStep, " +
" PROJECT_ID AS projectId, " +
" PERIOD AS period, " +
" STEPS_CODE AS stepsCode, " +
" CREATE_TIME AS createTime, " +
" STATUS AS status, " +
" ERROR_MSG AS errorMsg " +
"FROM " +
" PERIOD_JOB " +
"WHERE " +
" PROJECT_ID = #{projectId} " +
" AND PERIOD =#{period} " +
" AND ID = #{id}")
PeriodJob getJobStatus(@Param("projectId") String projectId, @Param("period") Integer period,@Param("id") String id);
}
\ No newline at end of file
package pwc.taxtech.atms.vat.entity;
import java.io.Serializable;
import java.util.Date;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated do_not_delete_during_merge
*/
public class PeriodJob implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_JOB.ID
*
* @mbg.generated
*/
private String id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_JOB.NAME
*
* @mbg.generated
*/
private String name;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_JOB.CURRENT_STEP
*
* @mbg.generated
*/
private String currentStep;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_JOB.PROJECT_ID
*
* @mbg.generated
*/
private String projectId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_JOB.PERIOD
*
* @mbg.generated
*/
private Integer period;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_JOB.STEPS_CODE
*
* @mbg.generated
*/
private String stepsCode;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_JOB.CREATE_TIME
*
* @mbg.generated
*/
private Date createTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_JOB.STATUS
*
* @mbg.generated
*/
private String status;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_JOB.ERROR_MSG
*
* @mbg.generated
*/
private String errorMsg;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_JOB.ID
*
* @return the value of TAX_ADMIN.PERIOD_JOB.ID
*
* @mbg.generated
*/
public String getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_JOB.ID
*
* @param id the value for TAX_ADMIN.PERIOD_JOB.ID
*
* @mbg.generated
*/
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_JOB.NAME
*
* @return the value of TAX_ADMIN.PERIOD_JOB.NAME
*
* @mbg.generated
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_JOB.NAME
*
* @param name the value for TAX_ADMIN.PERIOD_JOB.NAME
*
* @mbg.generated
*/
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_JOB.CURRENT_STEP
*
* @return the value of TAX_ADMIN.PERIOD_JOB.CURRENT_STEP
*
* @mbg.generated
*/
public String getCurrentStep() {
return currentStep;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_JOB.CURRENT_STEP
*
* @param currentStep the value for TAX_ADMIN.PERIOD_JOB.CURRENT_STEP
*
* @mbg.generated
*/
public void setCurrentStep(String currentStep) {
this.currentStep = currentStep == null ? null : currentStep.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_JOB.PROJECT_ID
*
* @return the value of TAX_ADMIN.PERIOD_JOB.PROJECT_ID
*
* @mbg.generated
*/
public String getProjectId() {
return projectId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_JOB.PROJECT_ID
*
* @param projectId the value for TAX_ADMIN.PERIOD_JOB.PROJECT_ID
*
* @mbg.generated
*/
public void setProjectId(String projectId) {
this.projectId = projectId == null ? null : projectId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_JOB.PERIOD
*
* @return the value of TAX_ADMIN.PERIOD_JOB.PERIOD
*
* @mbg.generated
*/
public Integer getPeriod() {
return period;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_JOB.PERIOD
*
* @param period the value for TAX_ADMIN.PERIOD_JOB.PERIOD
*
* @mbg.generated
*/
public void setPeriod(Integer period) {
this.period = period;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_JOB.STEPS_CODE
*
* @return the value of TAX_ADMIN.PERIOD_JOB.STEPS_CODE
*
* @mbg.generated
*/
public String getStepsCode() {
return stepsCode;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_JOB.STEPS_CODE
*
* @param stepsCode the value for TAX_ADMIN.PERIOD_JOB.STEPS_CODE
*
* @mbg.generated
*/
public void setStepsCode(String stepsCode) {
this.stepsCode = stepsCode == null ? null : stepsCode.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_JOB.CREATE_TIME
*
* @return the value of TAX_ADMIN.PERIOD_JOB.CREATE_TIME
*
* @mbg.generated
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_JOB.CREATE_TIME
*
* @param createTime the value for TAX_ADMIN.PERIOD_JOB.CREATE_TIME
*
* @mbg.generated
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_JOB.STATUS
*
* @return the value of TAX_ADMIN.PERIOD_JOB.STATUS
*
* @mbg.generated
*/
public String getStatus() {
return status;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_JOB.STATUS
*
* @param status the value for TAX_ADMIN.PERIOD_JOB.STATUS
*
* @mbg.generated
*/
public void setStatus(String status) {
this.status = status == null ? null : status.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_JOB.ERROR_MSG
*
* @return the value of TAX_ADMIN.PERIOD_JOB.ERROR_MSG
*
* @mbg.generated
*/
public String getErrorMsg() {
return errorMsg;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_JOB.ERROR_MSG
*
* @param errorMsg the value for TAX_ADMIN.PERIOD_JOB.ERROR_MSG
*
* @mbg.generated
*/
public void setErrorMsg(String errorMsg) {
this.errorMsg = errorMsg == null ? null : errorMsg.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
*
* @mbg.generated
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", currentStep=").append(currentStep);
sb.append(", projectId=").append(projectId);
sb.append(", period=").append(period);
sb.append(", stepsCode=").append(stepsCode);
sb.append(", createTime=").append(createTime);
sb.append(", status=").append(status);
sb.append(", errorMsg=").append(errorMsg);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
kill -9 `ps -ef |grep java | grep atms-invoice | awk '{print $2}'`
nohup mvn clean spring-boot:run &
kill -9 `ps -ef |grep java | grep atms-web | awk '{print $2}'`
nohup mvn clean tomcat7:run -Dmaven.test.skip=true -f pom.xml &
......@@ -1016,17 +1016,17 @@
function exportSpread(exportReportData) {
$scope.exportReportData = exportReportData;
$timeout(function () {
var mainSpread = new GcSpread.Sheets.Spread(document.getElementById("export"), {sheetCount: 1});
var mainSpread = new GC.Spread.Sheets.Workbook(document.getElementById("export"), {sheetCount: 1});
mainSpread.isPaintSuspended(true);
mainSpread.sheets.pop();
for (var index = 0; index < $scope.spreads.length; index++) {
var currentSheet = $scope.spreads[index].getActiveSheet();
currentSheet.setIsProtected(false);
currentSheet.options.isProtected=false;
for (var rowIndex = 0; rowIndex < currentSheet.getRowCount(); rowIndex++) {
for (var columnIndex = 0; columnIndex < currentSheet.getColumnCount(); columnIndex++) {
var cellStyle = currentSheet.getActualStyle(rowIndex, columnIndex, GcSpread.Sheets.SheetArea.viewport, true);
currentSheet.setStyle(rowIndex, columnIndex, cellStyle, GcSpread.Sheets.SheetArea.viewport);
var cellStyle = currentSheet.getActualStyle(rowIndex, columnIndex, GC.Spread.Sheets.SheetArea.viewport, true);
currentSheet.setStyle(rowIndex, columnIndex, cellStyle, GC.Spread.Sheets.SheetArea.viewport);
}
}
......
......@@ -48,8 +48,14 @@
generate: function (projectId, templateId, ifDeleteManualDataSource, period, generator) {
return $http.post('/Report/generate/' + projectId + '/' + templateId + '/' + ifDeleteManualDataSource + '/' + period + '?generator=' + generator, {}, apiConfig.createVat({ignoreLoadingBar: true}));
},
generateAll: function (projectId, ifDeleteManualDataSource, period, generator) {
return $http.post('/Report/generateByTotal/' + projectId + '/' + ifDeleteManualDataSource + '/' + period + '?generator=' + generator , {}, apiConfig.createVat({ignoreLoadingBar: true}));
generateAll: function (projectId, isMergeManualDataSource, period, generator) {
return $http.post('/Report/generateByTotal/' + projectId + '/' + isMergeManualDataSource + '/' + period + '?generator=' + generator , {}, apiConfig.createVat({ignoreLoadingBar: true}));
},
getRunningJob: function (projectId, period) {
return $http.get('/Report/getRunningJob/' + projectId+'/'+period, apiConfig.createVat());
},
getJobStatus: function (projectId, period, jobId) {
return $http.get('/Report/getJobStatus/' + projectId+'/'+period+'/'+jobId, apiConfig.createVat({ignoreLoadingBar: true}));
},
getReportData: function (reportId) {
return $http.get('/Report/reportData/' + reportId, apiConfig.createVat());
......
......@@ -22,17 +22,73 @@
autoExpandAll:true,
columns: [
{ dataField: 'typeName', caption: $translate.instant('IncomeType') },
{ dataField: 'description', caption: $translate.instant('Description') },
{ dataField: 'amount', caption: $translate.instant('Amount'), format: { type: 'fixedPoint', precision: 2 } }
{ dataField: 'description', caption: "栏次" },
{ dataField: 'amount', caption: "税务系统", format: { type: 'fixedPoint', precision: 2 } }
],
selection: {
mode: "single"
},
onRowPrepared: function (info) {
if (info.rowType != 'header') {
if (info.data.head_ID === "0") {
info.rowElement.addClass('top-category');
}
}
}
},
reasonOptions: {
height: '600px',
bindingOptions: {
dataSource: 'reasonList'
},
keyExpr: "id",
parentIdExpr: "head_ID",
expandedRowKeys: [1],
showBorders: false,
showColumnLines: false,
showRowLines: false,
columnAutoWidth: true,
autoExpandAll: true,
columns: [
{ dataField: 'name', caption: "会计科目" },
{ dataField: 'desc', caption: "明细字段" },
{ dataField: 'amount', caption: $translate.instant('Amount'), format: { type: 'fixedPoint', precision: 2 } },
{ dataField: 'desc', caption: $translate.instant('Description') },
{ dataField: 'name', caption: $translate.instant('DifferenceReason') }
],
onRowPrepared: function (info) {
if (info.rowType != 'header') {
if (info.data.head_ID==="0") {
info.rowElement.addClass('top-category');
}
if (info.data.id === 'total') {
info.rowElement.addClass('table-summary');
}
}
}
}
};
$scope.toggleAllMasterRows = function ($event) {
var expand = "dx-datagrid-group-closed";
var collapse = "dx-datagrid-group-opened";
if ($($event.target).hasClass(expand)) {
$scope.gridInstance.expandAll(-1);
$($event.target).removeClass(expand);
$($event.target).addClass(collapse);
} else {
$scope.gridInstance.collapseAll(-1);
$($event.target).removeClass(collapse);
$($event.target).addClass(expand);
}
};
var initData = function () {
$scope.differenceList = [];
$scope.reasonList = [];
// getService.getDifferenceList();
// getService.getReasonList();
};
......
......@@ -2,33 +2,16 @@
<div class="content">
<div class="col-lg-12 col-md-12" style="margin-top:10px;">
</div>
<div class="col-lg-24 col-md-24 fit-height">
<table border="1" width="95%" style="margin: auto">
<thead>
<tr class="th">
<th>会计科目</th>
<th>明细字段</th>
<th>金额</th>
<th>差异</th>
<th>差异原因</th>
</tr>
</thead>
<tbody >
<tr ng-repeat="x in list">
<td>{{}}</td>
<td>{{}}</td>
<td>{{}}</td>
<td>{{}}</td>
<td>{{}}</td>
</tr>
</tbody>
</table>
<div class="col-lg-12 col-md-12 fit-height">
<div class="col-lg-4 col-md-4">
<div dx-tree-list="grid.differenceOptions" dx-item-alias="item">
</div>
</div>
<style>
.th>th{
width : 15%;
text-align: center;
}
</style>
<div class="col-lg-8 col-md-8">
<div dx-tree-list="grid.reasonOptions" id="reason"></div>
</div>
</div>
</div>
</div>
......@@ -11,6 +11,7 @@
$scope.totalTaxAmount = 0;
var minDate = [1, vatSessionService.project.year];
// var minDate = moment().startOf('month').subtract(0, 'months');
var maxDate = [12, vatSessionService.project.year];
var setDate = [
[vatSessionService.month, vatSessionService.project.year],
......@@ -108,6 +109,7 @@
vatPreviewService.queryInputInvoiceList($scope.queryParams).success(function (data) {
if (data) {
// minDate = data.
var index = 1;
data.list.forEach(function (v) {
v.index = index++;
......
......@@ -8,7 +8,7 @@
data-templateurl="/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice-search.html">
<i class="fa fa-filter" aria-hidden="true"></i>
</button>-->
<div></div><div></div>
<span translate="IncomeInvoiceTitle" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;<span class="text-bold" translate="InvoiceQJ"></span>
<input type="text" class="form-control input-width-middle" style="position: relative; top: -33px; left: 160px;" id="input-invoice-period-picker" />
......
......@@ -2,7 +2,8 @@
<div class="vat-caculate-data-title" ng-if="tasks.length > 0">
<!--<span translate="vatCaculateDataDesc"></span>-->
<button class="btn btn-vat-primary" translate="startCaculateData" ng-disabled="readonly" ng-click="startCaculate()"></button>
<!--<button class="btn btn-vat-primary" translate="startCaculateData" ng-disabled="readonly" ng-click="startCaculate()"></button>-->
<button class="btn btn-vat-primary" translate="startCaculateData" ng-disabled="readonly" ng-click="startCaculate2()"></button>
<span ng-click="showOperateLogPop()"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'Remarks' | translate}}</span>
</div>
......
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