Commit b8995e16 authored by frank.xa.zhang's avatar frank.xa.zhang

add new api voucherSelectAdvancedByVoucher

parent 786b99a7
rem see http://www.mybatis.org/generator/running/runningFromCmdLine.html
cd /d %~dp0
call java -classpath .;./* org.mybatis.generator.api.ShellRunner -configfile vatGeneratorConfig.xml -overwrite -verbose -tables cell_data_source
call java -classpath .;./* org.mybatis.generator.api.ShellRunner -configfile vatGeneratorConfig.xml -overwrite -verbose -tables period_cell_template_config
echo @@@@@@@@@@@ DONE @@@@@@@@@@@
pause
......@@ -318,17 +318,17 @@
</dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.jetty.aggregate/jetty-all -->
<!-- https://mvnrepository.com/artifact/org.eclipse.jetty.aggregate/jetty-all -->
<dependency>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all</artifactId>
<version>9.4.10.v20180503</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>apache-jsp</artifactId>
<version>9.4.10.v20180503</version>
</dependency>
<!--<dependency>-->
<!--<groupId>org.eclipse.jetty.aggregate</groupId>-->
<!--<artifactId>jetty-all</artifactId>-->
<!--<version>9.4.10.v20180503</version>-->
<!--<type>pom</type>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>org.eclipse.jetty</groupId>-->
<!--<artifactId>apache-jsp</artifactId>-->
<!--<version>9.4.10.v20180503</version>-->
<!--</dependency>-->
</dependencies>
<profiles>
......
......@@ -2,10 +2,7 @@ package pwc.taxtech.atms.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.constant.enums.EnumServiceType;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.vatdto.ReportDto;
......@@ -23,4 +20,9 @@ public class ReportController {
public OperationResultDto<List<ReportDto>> getTemplate(@PathVariable String organizationID, @PathVariable Integer period) {
return reportService.getReportTemplate(organizationID, EnumServiceType.VAT, period);
}
@RequestMapping(value = "updateConfig/{projectId}/{period}", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto updateConfig(@PathVariable String projectId, @PathVariable Integer period, @RequestParam String generator) {
return reportService.updateConfig(projectId, period, generator);
}
}
......@@ -234,4 +234,13 @@ public interface ProjectMapper extends MyMapper {
@Select("SELECT max(DbName) as DbName FROM Project WHERE Year=#{year}")
String maxDbName(Integer year);
@Select("SELECT\n" +
" template_group_id\n" +
"FROM Project a\n" +
" JOIN organization_service_template_group b\n" +
" ON a.organizationid = b.organization_id\n" +
"WHERE a.id = #{projectId}\n" +
" AND b.service_type_id = #{serviceType}")
Long getTemplateGroupIdByProject(@Param("projectId") String projectId,@Param("serviceType") Integer serviceType);
}
\ No newline at end of file
......@@ -121,9 +121,28 @@ public interface TemplateMapper extends MyMapper {
*/
List<TemplateUniqDto> getTemplateUniqDtosByTemplateAndTemplateGroup(Map<String,Object> map);
/**
* 根据templateID获取template 和 templategroup 对象
* @param ID templateID
* @return
*/
TemplateAndGroupDbDto getTemplateAndGroupByID(@Param("ID") String ID);
/**
* 根据模板名称获取模板和模板分组数量
* @param map 模板组ID, 模板ID,模板名称
* @return
*/
long getCountOfTemplateAndGroupByTemplateName(Map<String,Object> map);
/**
* 获取模板的所有报表
* @param map 月份,项目ID,数据库名称,模板组ID
* @return
*/
List<ReportDto> getTemplateLeftJoinReport(Map<String, Object> map);
List<Long> getIDsForExceptTemplate();
}
\ No newline at end of file
......@@ -105,4 +105,6 @@ public interface DataSourceMapper extends MyVatMapper {
* @mbg.generated
*/
int updateByPrimaryKey(DataSource record);
void clearDataWithPeriod(@Param("period")Integer period,@Param("exceptReportTemplateIDs") String exceptReportTemplateIDs);
}
\ No newline at end of file
......@@ -50,22 +50,6 @@ public interface PeriodCellTemplateConfigMapper extends MyVatMapper {
*/
int insertSelective(PeriodCellTemplateConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table period_cell_template_config
*
* @mbg.generated
*/
List<PeriodCellTemplateConfig> selectByExampleWithBLOBsWithRowbounds(PeriodCellTemplateConfigExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table period_cell_template_config
*
* @mbg.generated
*/
List<PeriodCellTemplateConfig> selectByExampleWithBLOBs(PeriodCellTemplateConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table period_cell_template_config
......@@ -98,14 +82,6 @@ public interface PeriodCellTemplateConfigMapper extends MyVatMapper {
*/
int updateByExampleSelective(@Param("record") PeriodCellTemplateConfig record, @Param("example") PeriodCellTemplateConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table period_cell_template_config
*
* @mbg.generated
*/
int updateByExampleWithBLOBs(@Param("record") PeriodCellTemplateConfig record, @Param("example") PeriodCellTemplateConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table period_cell_template_config
......@@ -122,14 +98,6 @@ public interface PeriodCellTemplateConfigMapper extends MyVatMapper {
*/
int updateByPrimaryKeySelective(PeriodCellTemplateConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table period_cell_template_config
*
* @mbg.generated
*/
int updateByPrimaryKeyWithBLOBs(PeriodCellTemplateConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table period_cell_template_config
......@@ -137,4 +105,6 @@ public interface PeriodCellTemplateConfigMapper extends MyVatMapper {
* @mbg.generated
*/
int updateByPrimaryKey(PeriodCellTemplateConfig record);
void batchInsert(List<PeriodCellTemplateConfig> list);
}
\ No newline at end of file
......@@ -105,4 +105,6 @@ public interface PeriodCellTemplateMapper extends MyVatMapper {
* @mbg.generated
*/
int updateByPrimaryKey(PeriodCellTemplate record);
void batchInsert(List<PeriodCellTemplate> list);
}
\ No newline at end of file
......@@ -105,4 +105,7 @@ public interface PeriodTemplateMapper extends MyVatMapper {
* @mbg.generated
*/
int updateByPrimaryKey(PeriodTemplate record);
void batchInsert(List<PeriodTemplate> periodTemplateList);
}
\ No newline at end of file
......@@ -40,7 +40,7 @@ public class PeriodCellTemplate implements Serializable {
*
* @mbg.generated
*/
private String reportTemplateId;
private Long reportTemplateId;
/**
* Database Column Remarks:
......@@ -245,7 +245,7 @@ public class PeriodCellTemplate implements Serializable {
*
* @mbg.generated
*/
public String getReportTemplateId() {
public Long getReportTemplateId() {
return reportTemplateId;
}
......@@ -257,8 +257,8 @@ public class PeriodCellTemplate implements Serializable {
*
* @mbg.generated
*/
public void setReportTemplateId(String reportTemplateId) {
this.reportTemplateId = reportTemplateId == null ? null : reportTemplateId.trim();
public void setReportTemplateId(Long reportTemplateId) {
this.reportTemplateId = reportTemplateId;
}
/**
......
......@@ -40,7 +40,7 @@ public class PeriodCellTemplateConfig implements Serializable {
*
* @mbg.generated
*/
private String cellTemplateId;
private Long cellTemplateId;
/**
* Database Column Remarks:
......@@ -51,7 +51,7 @@ public class PeriodCellTemplateConfig implements Serializable {
*
* @mbg.generated
*/
private String reportTemplateId;
private Long reportTemplateId;
/**
* Database Column Remarks:
......@@ -86,6 +86,17 @@ public class PeriodCellTemplateConfig implements Serializable {
*/
private String parsedFormula;
/**
* Database Column Remarks:
* 公式描述
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column period_cell_template_config.formula_description
*
* @mbg.generated
*/
private String formulaDescription;
/**
* Database Column Remarks:
* 账套代码
......@@ -252,15 +263,13 @@ public class PeriodCellTemplateConfig implements Serializable {
private String voucherKeyword;
/**
* Database Column Remarks:
* 公式描述
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column period_cell_template_config.formula_description
* This field corresponds to the database column period_cell_template_config.cell_template_config_id
*
* @mbg.generated
*/
private byte[] formulaDescription;
private Long cellTemplateConfigId;
/**
* This field was generated by MyBatis Generator.
......@@ -326,7 +335,7 @@ public class PeriodCellTemplateConfig implements Serializable {
*
* @mbg.generated
*/
public String getCellTemplateId() {
public Long getCellTemplateId() {
return cellTemplateId;
}
......@@ -338,8 +347,8 @@ public class PeriodCellTemplateConfig implements Serializable {
*
* @mbg.generated
*/
public void setCellTemplateId(String cellTemplateId) {
this.cellTemplateId = cellTemplateId == null ? null : cellTemplateId.trim();
public void setCellTemplateId(Long cellTemplateId) {
this.cellTemplateId = cellTemplateId;
}
/**
......@@ -350,7 +359,7 @@ public class PeriodCellTemplateConfig implements Serializable {
*
* @mbg.generated
*/
public String getReportTemplateId() {
public Long getReportTemplateId() {
return reportTemplateId;
}
......@@ -362,8 +371,8 @@ public class PeriodCellTemplateConfig implements Serializable {
*
* @mbg.generated
*/
public void setReportTemplateId(String reportTemplateId) {
this.reportTemplateId = reportTemplateId == null ? null : reportTemplateId.trim();
public void setReportTemplateId(Long reportTemplateId) {
this.reportTemplateId = reportTemplateId;
}
/**
......@@ -438,6 +447,30 @@ public class PeriodCellTemplateConfig implements Serializable {
this.parsedFormula = parsedFormula == null ? null : parsedFormula.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column period_cell_template_config.formula_description
*
* @return the value of period_cell_template_config.formula_description
*
* @mbg.generated
*/
public String getFormulaDescription() {
return formulaDescription;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column period_cell_template_config.formula_description
*
* @param formulaDescription the value for period_cell_template_config.formula_description
*
* @mbg.generated
*/
public void setFormulaDescription(String formulaDescription) {
this.formulaDescription = formulaDescription == null ? null : formulaDescription.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column period_cell_template_config.account_codes
......@@ -800,26 +833,26 @@ public class PeriodCellTemplateConfig implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column period_cell_template_config.formula_description
* This method returns the value of the database column period_cell_template_config.cell_template_config_id
*
* @return the value of period_cell_template_config.formula_description
* @return the value of period_cell_template_config.cell_template_config_id
*
* @mbg.generated
*/
public byte[] getFormulaDescription() {
return formulaDescription;
public Long getCellTemplateConfigId() {
return cellTemplateConfigId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column period_cell_template_config.formula_description
* This method sets the value of the database column period_cell_template_config.cell_template_config_id
*
* @param formulaDescription the value for period_cell_template_config.formula_description
* @param cellTemplateConfigId the value for period_cell_template_config.cell_template_config_id
*
* @mbg.generated
*/
public void setFormulaDescription(byte[] formulaDescription) {
this.formulaDescription = formulaDescription;
public void setCellTemplateConfigId(Long cellTemplateConfigId) {
this.cellTemplateConfigId = cellTemplateConfigId;
}
/**
......@@ -841,6 +874,7 @@ public class PeriodCellTemplateConfig implements Serializable {
sb.append(", dataSourceType=").append(dataSourceType);
sb.append(", formula=").append(formula);
sb.append(", parsedFormula=").append(parsedFormula);
sb.append(", formulaDescription=").append(formulaDescription);
sb.append(", accountCodes=").append(accountCodes);
sb.append(", invoiceType=").append(invoiceType);
sb.append(", taxRate=").append(taxRate);
......@@ -856,7 +890,7 @@ public class PeriodCellTemplateConfig implements Serializable {
sb.append(", parsedValidation=").append(parsedValidation);
sb.append(", validationDescription=").append(validationDescription);
sb.append(", voucherKeyword=").append(voucherKeyword);
sb.append(", formulaDescription=").append(formulaDescription);
sb.append(", cellTemplateConfigId=").append(cellTemplateConfigId);
sb.append("]");
return sb.toString();
}
......
......@@ -325,62 +325,52 @@ public class PeriodCellTemplateExample {
return (Criteria) this;
}
public Criteria andReportTemplateIdEqualTo(String value) {
public Criteria andReportTemplateIdEqualTo(Long value) {
addCriterion("report_template_id =", value, "reportTemplateId");
return (Criteria) this;
}
public Criteria andReportTemplateIdNotEqualTo(String value) {
public Criteria andReportTemplateIdNotEqualTo(Long value) {
addCriterion("report_template_id <>", value, "reportTemplateId");
return (Criteria) this;
}
public Criteria andReportTemplateIdGreaterThan(String value) {
public Criteria andReportTemplateIdGreaterThan(Long value) {
addCriterion("report_template_id >", value, "reportTemplateId");
return (Criteria) this;
}
public Criteria andReportTemplateIdGreaterThanOrEqualTo(String value) {
public Criteria andReportTemplateIdGreaterThanOrEqualTo(Long value) {
addCriterion("report_template_id >=", value, "reportTemplateId");
return (Criteria) this;
}
public Criteria andReportTemplateIdLessThan(String value) {
public Criteria andReportTemplateIdLessThan(Long value) {
addCriterion("report_template_id <", value, "reportTemplateId");
return (Criteria) this;
}
public Criteria andReportTemplateIdLessThanOrEqualTo(String value) {
public Criteria andReportTemplateIdLessThanOrEqualTo(Long value) {
addCriterion("report_template_id <=", value, "reportTemplateId");
return (Criteria) this;
}
public Criteria andReportTemplateIdLike(String value) {
addCriterion("report_template_id like", value, "reportTemplateId");
return (Criteria) this;
}
public Criteria andReportTemplateIdNotLike(String value) {
addCriterion("report_template_id not like", value, "reportTemplateId");
return (Criteria) this;
}
public Criteria andReportTemplateIdIn(List<String> values) {
public Criteria andReportTemplateIdIn(List<Long> values) {
addCriterion("report_template_id in", values, "reportTemplateId");
return (Criteria) this;
}
public Criteria andReportTemplateIdNotIn(List<String> values) {
public Criteria andReportTemplateIdNotIn(List<Long> values) {
addCriterion("report_template_id not in", values, "reportTemplateId");
return (Criteria) this;
}
public Criteria andReportTemplateIdBetween(String value1, String value2) {
public Criteria andReportTemplateIdBetween(Long value1, Long value2) {
addCriterion("report_template_id between", value1, value2, "reportTemplateId");
return (Criteria) this;
}
public Criteria andReportTemplateIdNotBetween(String value1, String value2) {
public Criteria andReportTemplateIdNotBetween(Long value1, Long value2) {
addCriterion("report_template_id not between", value1, value2, "reportTemplateId");
return (Criteria) this;
}
......
......@@ -72,7 +72,7 @@ public class PeriodTemplate implements Serializable {
*
* @mbg.generated
*/
private String templateGroupId;
private Long templateGroupId;
/**
*
......@@ -315,7 +315,7 @@ public class PeriodTemplate implements Serializable {
*
* @mbg.generated
*/
public String getTemplateGroupId() {
public Long getTemplateGroupId() {
return templateGroupId;
}
......@@ -327,8 +327,8 @@ public class PeriodTemplate implements Serializable {
*
* @mbg.generated
*/
public void setTemplateGroupId(String templateGroupId) {
this.templateGroupId = templateGroupId == null ? null : templateGroupId.trim();
public void setTemplateGroupId(Long templateGroupId) {
this.templateGroupId = templateGroupId;
}
/**
......
......@@ -595,62 +595,52 @@ public class PeriodTemplateExample {
return (Criteria) this;
}
public Criteria andTemplateGroupIdEqualTo(String value) {
public Criteria andTemplateGroupIdEqualTo(Long value) {
addCriterion("template_group_id =", value, "templateGroupId");
return (Criteria) this;
}
public Criteria andTemplateGroupIdNotEqualTo(String value) {
public Criteria andTemplateGroupIdNotEqualTo(Long value) {
addCriterion("template_group_id <>", value, "templateGroupId");
return (Criteria) this;
}
public Criteria andTemplateGroupIdGreaterThan(String value) {
public Criteria andTemplateGroupIdGreaterThan(Long value) {
addCriterion("template_group_id >", value, "templateGroupId");
return (Criteria) this;
}
public Criteria andTemplateGroupIdGreaterThanOrEqualTo(String value) {
public Criteria andTemplateGroupIdGreaterThanOrEqualTo(Long value) {
addCriterion("template_group_id >=", value, "templateGroupId");
return (Criteria) this;
}
public Criteria andTemplateGroupIdLessThan(String value) {
public Criteria andTemplateGroupIdLessThan(Long value) {
addCriterion("template_group_id <", value, "templateGroupId");
return (Criteria) this;
}
public Criteria andTemplateGroupIdLessThanOrEqualTo(String value) {
public Criteria andTemplateGroupIdLessThanOrEqualTo(Long value) {
addCriterion("template_group_id <=", value, "templateGroupId");
return (Criteria) this;
}
public Criteria andTemplateGroupIdLike(String value) {
addCriterion("template_group_id like", value, "templateGroupId");
return (Criteria) this;
}
public Criteria andTemplateGroupIdNotLike(String value) {
addCriterion("template_group_id not like", value, "templateGroupId");
return (Criteria) this;
}
public Criteria andTemplateGroupIdIn(List<String> values) {
public Criteria andTemplateGroupIdIn(List<Long> values) {
addCriterion("template_group_id in", values, "templateGroupId");
return (Criteria) this;
}
public Criteria andTemplateGroupIdNotIn(List<String> values) {
public Criteria andTemplateGroupIdNotIn(List<Long> values) {
addCriterion("template_group_id not in", values, "templateGroupId");
return (Criteria) this;
}
public Criteria andTemplateGroupIdBetween(String value1, String value2) {
public Criteria andTemplateGroupIdBetween(Long value1, Long value2) {
addCriterion("template_group_id between", value1, value2, "templateGroupId");
return (Criteria) this;
}
public Criteria andTemplateGroupIdNotBetween(String value1, String value2) {
public Criteria andTemplateGroupIdNotBetween(Long value1, Long value2) {
addCriterion("template_group_id not between", value1, value2, "templateGroupId");
return (Criteria) this;
}
......
......@@ -8,4 +8,6 @@ import java.util.List;
public interface ReportService {
OperationResultDto<List<ReportDto>> getReportTemplate(String projectID, EnumServiceType serviceType, Integer period);
OperationResultDto updateConfig(String projectId,Integer period,String generator);
}
......@@ -3,10 +3,8 @@ package pwc.taxtech.atms.vat.service.impl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import pwc.taxtech.atms.dao.ProjectMapper;
import pwc.taxtech.atms.dao.ProjectServiceTypeMapper;
import pwc.taxtech.atms.dao.TaxPayerReportRuleMapper;
import pwc.taxtech.atms.dao.TemplateMapper;
import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.service.impl.DistributedIDService;
import pwc.taxtech.atms.vat.dao.*;
public class VatAbstractService {
......@@ -36,4 +34,23 @@ public class VatAbstractService {
ProjectServiceTypeMapper projectServiceTypeMapper;
@Autowired
TemplateMapper templateMapper;
@Autowired
PeriodTemplateMapper periodTemplateMapper;
@Autowired
PeriodCellTemplateMapper periodCellTemplateMapper;
@Autowired
PeriodCellTemplateConfigMapper periodCellTemplateConfigMapper;
@Autowired
DataSourceMapper dataSourceMapper;
@Autowired
TemplateGroupMapper templateGroupMapper;
@Autowired
DistributedIDService distributedIDService;
@Autowired
CellTemplateMapper cellTemplateMapper;
@Autowired
CellTemplateConfigMapper cellTemplateConfigMapper;
@Autowired
EnterpriseAccountMapper enterpriseAccountMapper;
}
......@@ -22,7 +22,7 @@
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
<!--getTemplateAndGroupByID
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
......@@ -516,4 +516,15 @@
AND b.project_id = #{ProjectID,jdbcType=VARCHAR}) d
ON c.id = d.template_id
</select>
<select id="getIDsForExceptTemplate" resultType="java.lang.Long">
SELECT
a.id
FROM
template a
JOIN template_group b ON a.template_group_id = b.id
WHERE
b.group_type = 2
AND b.service_type_id = 2
</select>
</mapper>
\ No newline at end of file
......@@ -445,4 +445,13 @@
order by ${orderByClause}
</if>
</select>
<delete id="clearDataWithPeriod" >
DELETE d FROM data_source d JOIN period_formula_block f ON d.key_value_data_id = f.id WHERE f.Period = #{period,jdbcType=INTEGER};
delete from period_formula_block where period=#{period,jdbcType=INTEGER};
delete from period_tax_payer_report_rule where period=#{period,jdbcType=INTEGER};
delete from period_tax_rule_setting where period=#{period,jdbcType=INTEGER};
delete from period_cell_template where period=#{period,jdbcType=INTEGER} and report_template_id not in (#{exceptReportTemplateIDs,jdbcType=VARCHAR});
delete from period_cell_template_config where period=#{period,jdbcType=INTEGER} and report_template_id not in (#{exceptReportTemplateIDs,jdbcType=VARCHAR});
delete from period_template where period=#{period,jdbcType=INTEGER} and id not in (#{exceptReportTemplateIDs,jdbcType=VARCHAR});
</delete>
</mapper>
\ No newline at end of file
......@@ -8,7 +8,7 @@
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="period" jdbcType="INTEGER" property="period" />
<result column="report_template_id" jdbcType="VARCHAR" property="reportTemplateId" />
<result column="report_template_id" jdbcType="BIGINT" property="reportTemplateId" />
<result column="row_index" jdbcType="INTEGER" property="rowIndex" />
<result column="row_name" jdbcType="VARCHAR" property="rowName" />
<result column="column_index" jdbcType="INTEGER" property="columnIndex" />
......@@ -155,7 +155,7 @@
update_time, cell_template_id, data_type,
is_read_only, copy_from_id, create_by,
update_by)
values (#{id,jdbcType=BIGINT}, #{period,jdbcType=INTEGER}, #{reportTemplateId,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{period,jdbcType=INTEGER}, #{reportTemplateId,jdbcType=BIGINT},
#{rowIndex,jdbcType=INTEGER}, #{rowName,jdbcType=VARCHAR}, #{columnIndex,jdbcType=INTEGER},
#{columnName,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{cellTemplateId,jdbcType=BIGINT}, #{dataType,jdbcType=INTEGER},
......@@ -226,7 +226,7 @@
#{period,jdbcType=INTEGER},
</if>
<if test="reportTemplateId != null">
#{reportTemplateId,jdbcType=VARCHAR},
#{reportTemplateId,jdbcType=BIGINT},
</if>
<if test="rowIndex != null">
#{rowIndex,jdbcType=INTEGER},
......@@ -293,7 +293,7 @@
period = #{record.period,jdbcType=INTEGER},
</if>
<if test="record.reportTemplateId != null">
report_template_id = #{record.reportTemplateId,jdbcType=VARCHAR},
report_template_id = #{record.reportTemplateId,jdbcType=BIGINT},
</if>
<if test="record.rowIndex != null">
row_index = #{record.rowIndex,jdbcType=INTEGER},
......@@ -347,7 +347,7 @@
update period_cell_template
set id = #{record.id,jdbcType=BIGINT},
period = #{record.period,jdbcType=INTEGER},
report_template_id = #{record.reportTemplateId,jdbcType=VARCHAR},
report_template_id = #{record.reportTemplateId,jdbcType=BIGINT},
row_index = #{record.rowIndex,jdbcType=INTEGER},
row_name = #{record.rowName,jdbcType=VARCHAR},
column_index = #{record.columnIndex,jdbcType=INTEGER},
......@@ -376,7 +376,7 @@
period = #{period,jdbcType=INTEGER},
</if>
<if test="reportTemplateId != null">
report_template_id = #{reportTemplateId,jdbcType=VARCHAR},
report_template_id = #{reportTemplateId,jdbcType=BIGINT},
</if>
<if test="rowIndex != null">
row_index = #{rowIndex,jdbcType=INTEGER},
......@@ -427,7 +427,7 @@
-->
update period_cell_template
set period = #{period,jdbcType=INTEGER},
report_template_id = #{reportTemplateId,jdbcType=VARCHAR},
report_template_id = #{reportTemplateId,jdbcType=BIGINT},
row_index = #{rowIndex,jdbcType=INTEGER},
row_name = #{rowName,jdbcType=VARCHAR},
column_index = #{columnIndex,jdbcType=INTEGER},
......@@ -461,4 +461,44 @@
order by ${orderByClause}
</if>
</select>
<insert id="batchInsert">
INSERT INTO period_cell_template
(id,
period,
report_template_id,
row_index,
row_name,
column_index,
column_name,
'comment',
create_time,
update_time,
cell_template_id,
data_type,
is_read_only,
copy_from_id,
create_by,
update_by
)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}
,#{item.period,jdbcType=INTEGER}
,#{item.reportTemplateId,jdbcType=INTEGER}
,#{item.rowIndex,jdbcType=INTEGER}
,#{item.rowName,jdbcType=VARCHAR}
,#{item.columnIndex,jdbcType=INTEGER}
,#{item.columnName,jdbcType=VARCHAR}
,#{item.comment,jdbcType=VARCHAR}
,#{item.createTime,jdbcType=TIMESTAMP}
,#{item.updateTime,jdbcType=TIMESTAMP}
,#{item.cellTemplateId,jdbcType=INTEGER}
,#{item.dataType,jdbcType=INTEGER}
,#{item.isReadOnly,jdbcType=INTEGER}
,#{item.copyFromId,jdbcType=INTEGER}
,#{item.createBy,jdbcType=VARCHAR}
,#{item.updateBy,jdbcType=VARCHAR}
)
</foreach>
</insert>
</mapper>
\ No newline at end of file
......@@ -12,7 +12,7 @@
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="path" jdbcType="VARCHAR" property="path" />
<result column="report_type" jdbcType="INTEGER" property="reportType" />
<result column="template_group_id" jdbcType="VARCHAR" property="templateGroupId" />
<result column="template_group_id" jdbcType="BIGINT" property="templateGroupId" />
<result column="order_index" jdbcType="INTEGER" property="orderIndex" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
......@@ -157,7 +157,7 @@
update_by)
values (#{id,jdbcType=BIGINT}, #{period,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
#{code,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, #{reportType,jdbcType=INTEGER},
#{templateGroupId,jdbcType=VARCHAR}, #{orderIndex,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{templateGroupId,jdbcType=BIGINT}, #{orderIndex,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{isSystemType,jdbcType=INTEGER}, #{isActiveAssociation,jdbcType=INTEGER},
#{parentId,jdbcType=VARCHAR}, #{templateId,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR},
#{updateBy,jdbcType=VARCHAR})
......@@ -238,7 +238,7 @@
#{reportType,jdbcType=INTEGER},
</if>
<if test="templateGroupId != null">
#{templateGroupId,jdbcType=VARCHAR},
#{templateGroupId,jdbcType=BIGINT},
</if>
<if test="orderIndex != null">
#{orderIndex,jdbcType=INTEGER},
......@@ -305,7 +305,7 @@
report_type = #{record.reportType,jdbcType=INTEGER},
</if>
<if test="record.templateGroupId != null">
template_group_id = #{record.templateGroupId,jdbcType=VARCHAR},
template_group_id = #{record.templateGroupId,jdbcType=BIGINT},
</if>
<if test="record.orderIndex != null">
order_index = #{record.orderIndex,jdbcType=INTEGER},
......@@ -351,7 +351,7 @@
code = #{record.code,jdbcType=VARCHAR},
"path" = #{record.path,jdbcType=VARCHAR},
report_type = #{record.reportType,jdbcType=INTEGER},
template_group_id = #{record.templateGroupId,jdbcType=VARCHAR},
template_group_id = #{record.templateGroupId,jdbcType=BIGINT},
order_index = #{record.orderIndex,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
......@@ -388,7 +388,7 @@
report_type = #{reportType,jdbcType=INTEGER},
</if>
<if test="templateGroupId != null">
template_group_id = #{templateGroupId,jdbcType=VARCHAR},
template_group_id = #{templateGroupId,jdbcType=BIGINT},
</if>
<if test="orderIndex != null">
order_index = #{orderIndex,jdbcType=INTEGER},
......@@ -431,7 +431,7 @@
code = #{code,jdbcType=VARCHAR},
"path" = #{path,jdbcType=VARCHAR},
report_type = #{reportType,jdbcType=INTEGER},
template_group_id = #{templateGroupId,jdbcType=VARCHAR},
template_group_id = #{templateGroupId,jdbcType=BIGINT},
order_index = #{orderIndex,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
......@@ -461,4 +461,45 @@
order by ${orderByClause}
</if>
</select>
<insert id="batchInsert">
INSERT INTO period_template
(id,
period,
`name`,
`code`,
path,
report_type,
template_group_id,
order_index,
create_time,
update_time,
is_system_type,
is_active_association,
parent_id,
template_id,
create_by,
update_by
)
VALUES
<foreach collection="periodTemplateList" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}
,#{item.peiod,jdbcType=INTEGER}
,#{item.name,jdbcType=VARCHAR}
,#{item.code,jdbcType=VARCHAR}
,#{item.path,jdbcType=VARCHAR}
,#{item.reportType,jdbcType=INTEGER}
,#{item.templateGroupId,jdbcType=INTEGER}
,#{item.orderIndex,jdbcType=INTEGER}
,#{item.createTime,jdbcType=TIMESTAMP}
,#{item.updateTime,jdbcType=TIMESTAMP}
,#{item.isSystemType,jdbcType=INTEGER}
,#{item.isActiveAssociation,jdbcType=INTEGER}
,#{item.parentId,jdbcType=VARCHAR}
,#{item.templateId,jdbcType=INTEGER}
,#{item.createBy,jdbcType=VARCHAR}
,#{item.updateBy,jdbcType=VARCHAR}
)
</foreach>
</insert>
</mapper>
\ No newline at end of file
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