Commit 80831640 authored by neo's avatar neo

[bugfix] change CurrentPeriodBo to Period

parent b31caae1
......@@ -18,6 +18,6 @@ public interface CitTBDataImportMapper extends MyMapper {
"</script>")
Integer deleteByPeriod(@Param("period") Integer period, @Param("tbName") String tbName);
@Delete("<script>DELETE FROM #{tbName} <if test=\"period != null\"> WHERE CurrentPeriodBo =#{period} </if></script>")
@Delete("<script>DELETE FROM #{tbName} <if test=\"period != null\"> WHERE Period =#{period} </if></script>")
Integer deleteByNameAndPeriod(@Param("tbName") String tbName,@Param("period") Integer period);
}
......@@ -9,7 +9,7 @@ import pwc.taxtech.atms.MyMapper;
@Mapper
public interface DataImportMapper extends MyMapper {
@Delete("DELETE FROM #{tbName} WHERE CurrentPeriodBo =#{period}")
@Delete("DELETE FROM #{tbName} WHERE Period =#{period}")
Integer deleteByNameAndPeriod(@Param("tbName") String tbName, @Param("period") Integer period);
......
......@@ -42,8 +42,8 @@ public interface JournalEntryImportMapper extends MyVatMapper {
" Voucher " +
"WHERE " +
" 1 = 1 " +
" AND `ImportType` = #{importType} AND `CurrentPeriodBo` = #{period} " +
" ORDER BY `CurrentPeriodBo`,`Group`,`VID`,`ItemID`" +
" AND `ImportType` = #{importType} AND `Period` = #{period} " +
" ORDER BY `Period`,`Group`,`VID`,`ItemID`" +
" LIMIT #{start},#{size}" +
"</script>")
List<Voucher> pageQuery(@Param("importType") int code, @Param("period") int periodId, @Param("start") int start ,
......@@ -56,7 +56,7 @@ public interface JournalEntryImportMapper extends MyVatMapper {
" Voucher " +
"WHERE " +
" 1 = 1" +
" AND `ImportType` = #{importType} AND `CurrentPeriodBo` = #{period}" +
" AND `ImportType` = #{importType} AND `Period` = #{period}" +
"</script>")
Integer pageQueryCount(@Param("importType") int code, @Param("period") int periodId);
......@@ -67,8 +67,8 @@ public interface JournalEntryImportMapper extends MyVatMapper {
" Voucher " +
"WHERE " +
" 1 = 1" +
" AND `ImportType` = #{importType} AND `CurrentPeriodBo` = #{period}" +
" GROUP BY `VID` ,`Group`,`CurrentPeriodBo`" +
" AND `ImportType` = #{importType} AND `Period` = #{period}" +
" GROUP BY `VID` ,`Group`,`Period`" +
"</script>")
Integer pageVIDCount(@Param("importType") int code, @Param("period") int periodId);
}
......@@ -265,62 +265,62 @@ public class PeriodCellReferenceExample {
}
public Criteria andPeriodIsNull() {
addCriterion("CurrentPeriodBo is null");
addCriterion("Period is null");
return (Criteria) this;
}
public Criteria andPeriodIsNotNull() {
addCriterion("CurrentPeriodBo is not null");
addCriterion("Period is not null");
return (Criteria) this;
}
public Criteria andPeriodEqualTo(Integer value) {
addCriterion("CurrentPeriodBo =", value, "period");
addCriterion("Period =", value, "period");
return (Criteria) this;
}
public Criteria andPeriodNotEqualTo(Integer value) {
addCriterion("CurrentPeriodBo <>", value, "period");
addCriterion("Period <>", value, "period");
return (Criteria) this;
}
public Criteria andPeriodGreaterThan(Integer value) {
addCriterion("CurrentPeriodBo >", value, "period");
addCriterion("Period >", value, "period");
return (Criteria) this;
}
public Criteria andPeriodGreaterThanOrEqualTo(Integer value) {
addCriterion("CurrentPeriodBo >=", value, "period");
addCriterion("Period >=", value, "period");
return (Criteria) this;
}
public Criteria andPeriodLessThan(Integer value) {
addCriterion("CurrentPeriodBo <", value, "period");
addCriterion("Period <", value, "period");
return (Criteria) this;
}
public Criteria andPeriodLessThanOrEqualTo(Integer value) {
addCriterion("CurrentPeriodBo <=", value, "period");
addCriterion("Period <=", value, "period");
return (Criteria) this;
}
public Criteria andPeriodIn(List<Integer> values) {
addCriterion("CurrentPeriodBo in", values, "period");
addCriterion("Period in", values, "period");
return (Criteria) this;
}
public Criteria andPeriodNotIn(List<Integer> values) {
addCriterion("CurrentPeriodBo not in", values, "period");
addCriterion("Period not in", values, "period");
return (Criteria) this;
}
public Criteria andPeriodBetween(Integer value1, Integer value2) {
addCriterion("CurrentPeriodBo between", value1, value2, "period");
addCriterion("Period between", value1, value2, "period");
return (Criteria) this;
}
public Criteria andPeriodNotBetween(Integer value1, Integer value2) {
addCriterion("CurrentPeriodBo not between", value1, value2, "period");
addCriterion("Period not between", value1, value2, "period");
return (Criteria) this;
}
......
......@@ -22,7 +22,7 @@ public class PeriodCellReferenceKey implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column PeriodCellReference.CurrentPeriodBo
* This field corresponds to the database column PeriodCellReference.Period
*
* @mbg.generated
*/
......@@ -62,9 +62,9 @@ public class PeriodCellReferenceKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column PeriodCellReference.CurrentPeriodBo
* This method returns the value of the database column PeriodCellReference.Period
*
* @return the value of PeriodCellReference.CurrentPeriodBo
* @return the value of PeriodCellReference.Period
*
* @mbg.generated
*/
......@@ -74,9 +74,9 @@ public class PeriodCellReferenceKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column PeriodCellReference.CurrentPeriodBo
* This method sets the value of the database column PeriodCellReference.Period
*
* @param period the value for PeriodCellReference.CurrentPeriodBo
* @param period the value for PeriodCellReference.Period
*
* @mbg.generated
*/
......
......@@ -22,7 +22,7 @@ public class PeriodCellTemplateConfigKey implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column PeriodCellTemplateConfig.CurrentPeriodBo
* This field corresponds to the database column PeriodCellTemplateConfig.Period
*
* @mbg.generated
*/
......@@ -62,9 +62,9 @@ public class PeriodCellTemplateConfigKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column PeriodCellTemplateConfig.CurrentPeriodBo
* This method returns the value of the database column PeriodCellTemplateConfig.Period
*
* @return the value of PeriodCellTemplateConfig.CurrentPeriodBo
* @return the value of PeriodCellTemplateConfig.Period
*
* @mbg.generated
*/
......@@ -74,9 +74,9 @@ public class PeriodCellTemplateConfigKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column PeriodCellTemplateConfig.CurrentPeriodBo
* This method sets the value of the database column PeriodCellTemplateConfig.Period
*
* @param period the value for PeriodCellTemplateConfig.CurrentPeriodBo
* @param period the value for PeriodCellTemplateConfig.Period
*
* @mbg.generated
*/
......
......@@ -22,7 +22,7 @@ public class PeriodCellTemplateKey implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column PeriodCellTemplate.CurrentPeriodBo
* This field corresponds to the database column PeriodCellTemplate.Period
*
* @mbg.generated
*/
......@@ -62,9 +62,9 @@ public class PeriodCellTemplateKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column PeriodCellTemplate.CurrentPeriodBo
* This method returns the value of the database column PeriodCellTemplate.Period
*
* @return the value of PeriodCellTemplate.CurrentPeriodBo
* @return the value of PeriodCellTemplate.Period
*
* @mbg.generated
*/
......@@ -74,9 +74,9 @@ public class PeriodCellTemplateKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column PeriodCellTemplate.CurrentPeriodBo
* This method sets the value of the database column PeriodCellTemplate.Period
*
* @param period the value for PeriodCellTemplate.CurrentPeriodBo
* @param period the value for PeriodCellTemplate.Period
*
* @mbg.generated
*/
......
......@@ -22,7 +22,7 @@ public class PeriodFormulaBlockKey implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column PeriodFormulaBlock.CurrentPeriodBo
* This field corresponds to the database column PeriodFormulaBlock.Period
*
* @mbg.generated
*/
......@@ -62,9 +62,9 @@ public class PeriodFormulaBlockKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column PeriodFormulaBlock.CurrentPeriodBo
* This method returns the value of the database column PeriodFormulaBlock.Period
*
* @return the value of PeriodFormulaBlock.CurrentPeriodBo
* @return the value of PeriodFormulaBlock.Period
*
* @mbg.generated
*/
......@@ -74,9 +74,9 @@ public class PeriodFormulaBlockKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column PeriodFormulaBlock.CurrentPeriodBo
* This method sets the value of the database column PeriodFormulaBlock.Period
*
* @param period the value for PeriodFormulaBlock.CurrentPeriodBo
* @param period the value for PeriodFormulaBlock.Period
*
* @mbg.generated
*/
......
......@@ -22,7 +22,7 @@ public class PeriodTaxPayerReportRuleKey implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column PeriodTaxPayerReportRule.CurrentPeriodBo
* This field corresponds to the database column PeriodTaxPayerReportRule.Period
*
* @mbg.generated
*/
......@@ -62,9 +62,9 @@ public class PeriodTaxPayerReportRuleKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column PeriodTaxPayerReportRule.CurrentPeriodBo
* This method returns the value of the database column PeriodTaxPayerReportRule.Period
*
* @return the value of PeriodTaxPayerReportRule.CurrentPeriodBo
* @return the value of PeriodTaxPayerReportRule.Period
*
* @mbg.generated
*/
......@@ -74,9 +74,9 @@ public class PeriodTaxPayerReportRuleKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column PeriodTaxPayerReportRule.CurrentPeriodBo
* This method sets the value of the database column PeriodTaxPayerReportRule.Period
*
* @param period the value for PeriodTaxPayerReportRule.CurrentPeriodBo
* @param period the value for PeriodTaxPayerReportRule.Period
*
* @mbg.generated
*/
......
......@@ -22,7 +22,7 @@ public class PeriodTaxRuleSettingKey implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column PeriodTaxRuleSetting.CurrentPeriodBo
* This field corresponds to the database column PeriodTaxRuleSetting.Period
*
* @mbg.generated
*/
......@@ -62,9 +62,9 @@ public class PeriodTaxRuleSettingKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column PeriodTaxRuleSetting.CurrentPeriodBo
* This method returns the value of the database column PeriodTaxRuleSetting.Period
*
* @return the value of PeriodTaxRuleSetting.CurrentPeriodBo
* @return the value of PeriodTaxRuleSetting.Period
*
* @mbg.generated
*/
......@@ -74,9 +74,9 @@ public class PeriodTaxRuleSettingKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column PeriodTaxRuleSetting.CurrentPeriodBo
* This method sets the value of the database column PeriodTaxRuleSetting.Period
*
* @param period the value for PeriodTaxRuleSetting.CurrentPeriodBo
* @param period the value for PeriodTaxRuleSetting.Period
*
* @mbg.generated
*/
......
......@@ -22,7 +22,7 @@ public class PeriodTaxRuleSettingOrganizationKey implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column PeriodTaxRuleSettingOrganization.CurrentPeriodBo
* This field corresponds to the database column PeriodTaxRuleSettingOrganization.Period
*
* @mbg.generated
*/
......@@ -62,9 +62,9 @@ public class PeriodTaxRuleSettingOrganizationKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column PeriodTaxRuleSettingOrganization.CurrentPeriodBo
* This method returns the value of the database column PeriodTaxRuleSettingOrganization.Period
*
* @return the value of PeriodTaxRuleSettingOrganization.CurrentPeriodBo
* @return the value of PeriodTaxRuleSettingOrganization.Period
*
* @mbg.generated
*/
......@@ -74,9 +74,9 @@ public class PeriodTaxRuleSettingOrganizationKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column PeriodTaxRuleSettingOrganization.CurrentPeriodBo
* This method sets the value of the database column PeriodTaxRuleSettingOrganization.Period
*
* @param period the value for PeriodTaxRuleSettingOrganization.CurrentPeriodBo
* @param period the value for PeriodTaxRuleSettingOrganization.Period
*
* @mbg.generated
*/
......
......@@ -22,7 +22,7 @@ public class PeriodTemplateKey implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column PeriodTemplate.CurrentPeriodBo
* This field corresponds to the database column PeriodTemplate.Period
*
* @mbg.generated
*/
......@@ -62,9 +62,9 @@ public class PeriodTemplateKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column PeriodTemplate.CurrentPeriodBo
* This method returns the value of the database column PeriodTemplate.Period
*
* @return the value of PeriodTemplate.CurrentPeriodBo
* @return the value of PeriodTemplate.Period
*
* @mbg.generated
*/
......@@ -74,9 +74,9 @@ public class PeriodTemplateKey implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column PeriodTemplate.CurrentPeriodBo
* This method sets the value of the database column PeriodTemplate.Period
*
* @param period the value for PeriodTemplate.CurrentPeriodBo
* @param period the value for PeriodTemplate.Period
*
* @mbg.generated
*/
......
......@@ -40,7 +40,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
if (pagingInfo != null) {
sql = "SELECT" +
"`VoucherID`," +
"`CurrentPeriodBo`," +
"`Period`," +
"`Date`," +
"`GROUP`," +
"`ItemID`," +
......@@ -59,7 +59,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"(" +
"SELECT" +
"`VoucherID`," +
"c.`CurrentPeriodBo`," +
"c.`Period`," +
"`Date`," +
"c.`GROUP`," +
"`ItemID`," +
......@@ -74,27 +74,27 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"FROM" +
"(" +
"SELECT DISTINCT" +
"`CurrentPeriodBo`," +
"`Period`," +
"`GROUP`," +
"`VID`" +
"FROM" +
"(" +
"SELECT" +
"`CurrentPeriodBo`," +
"`Period`," +
"`GROUP`," +
"`VID`" +
"FROM" +
"Voucher " + sqlWhere +
") tbl" +
") abc" +
"LEFT JOIN Voucher c ON abc.`CurrentPeriodBo` = c.`CurrentPeriodBo`" +
"LEFT JOIN Voucher c ON abc.`Period` = c.`Period`" +
"AND abc.`GROUP` = c.`GROUP`" +
"AND abc.`VID` = c.`VID`" +
") TB" +
"LEFT JOIN EnterpriseAccount e ON TB.AcctCode = e.AcctCode" +
"LEFT JOIN StandardAccount s ON e.StdCode = s. CODE" +
"ORDER BY" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Date`," +
"`GROUP`," +
"`VID`" +
......@@ -102,7 +102,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
} else {
sql = "SELECT" +
"`VoucherID`," +
"`CurrentPeriodBo`," +
"`Period`," +
"`Date`," +
"`GROUP`," +
"`ItemID`," +
......@@ -121,7 +121,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"(" +
"SELECT" +
"`VoucherID`," +
"c.`CurrentPeriodBo`," +
"c.`Period`," +
"`Date`," +
"c.`GROUP`," +
"`ItemID`," +
......@@ -136,27 +136,27 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"FROM" +
"(" +
"SELECT DISTINCT" +
"`CurrentPeriodBo`," +
"`Period`," +
"`GROUP`," +
"`VID`" +
"FROM" +
"(" +
"SELECT" +
"`CurrentPeriodBo`," +
"`Period`," +
"`GROUP`," +
"`VID`" +
"FROM" +
"Voucher " + sqlWhere +
") tbl" +
") abc" +
"LEFT JOIN Voucher c ON abc.`CurrentPeriodBo` = c.`CurrentPeriodBo`" +
"LEFT JOIN Voucher c ON abc.`Period` = c.`Period`" +
"AND abc.`GROUP` = c.`GROUP`" +
"AND abc.`VID` = c.`VID`" +
") TB" +
"LEFT JOIN EnterpriseAccount e ON TB.AcctCode = e.AcctCode" +
"LEFT JOIN StandardAccount s ON e.StdCode = s. CODE" +
"ORDER BY" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Date`," +
"`GROUP`," +
"`VID`";
......@@ -169,7 +169,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"(" +
"SELECT" +
"`VoucherID`," +
"`CurrentPeriodBo`," +
"`Period`," +
"`Date`," +
"`Group`," +
"`ItemID`," +
......@@ -188,7 +188,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"(" +
"SELECT" +
"`VoucherID`," +
"`CurrentPeriodBo`," +
"`Period`," +
"`Date`," +
"`Group`," +
"`ItemID`," +
......@@ -207,7 +207,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"LEFT JOIN StandardAccount s ON e.StdCode = s. CODE" +
") RowNumVoucher" +
"ORDER BY" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Date`," +
"`Group`," +
"`VID`" +
......@@ -219,7 +219,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"(" +
"SELECT" +
"`VoucherID`," +
"`CurrentPeriodBo`," +
"`Period`," +
"`Date`," +
"`Group`," +
"`ItemID`," +
......@@ -238,7 +238,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"(" +
"SELECT" +
"`VoucherID`," +
"`CurrentPeriodBo`," +
"`Period`," +
"`Date`," +
"`Group`," +
"`ItemID`," +
......@@ -257,7 +257,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"LEFT JOIN StandardAccount s ON e.StdCode = s. CODE" +
") RowNumVoucher" +
"ORDER BY" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Date`," +
"`Group`," +
"`VID`";
......@@ -267,7 +267,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
queryForList.forEach(a -> {
VoucherDto dto = new VoucherDto();
dto.setVoucherID(a.get("VoucherID").toString());
dto.setPeriod(Integer.parseInt(a.get("CurrentPeriodBo").toString()));
dto.setPeriod(Integer.parseInt(a.get("Period").toString()));
dto.setDate(DateTime.parse(a.get("Date").toString()).toDate());
dto.setGroup(a.get("Group").toString());
dto.setvID(a.get("VID").toString());
......@@ -312,14 +312,14 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
if (isEntryShow) {
if (allJe) {
sql = "select count(1) as TotalCount from" +
" (select distinct CurrentPeriodBo,`Group`,VID from" +
" (select CurrentPeriodBo,`Group`,VID from Voucher " + sqlWhere + ")TB)abc" +
" left join Voucher c on abc.CurrentPeriodBo=c.CurrentPeriodBo and abc.`Group`=c.`Group` and abc.VID=c.VID";
" (select distinct Period,`Group`,VID from" +
" (select Period,`Group`,VID from Voucher " + sqlWhere + ")TB)abc" +
" left join Voucher c on abc.Period=c.Period and abc.`Group`=c.`Group` and abc.VID=c.VID";
} else {
sql = "select count(1) as TotalCount from Voucher " + sqlWhere;
}
} else {
sql = "Select count(1) as TotalCount from (select CurrentPeriodBo,`Group`,VID from Voucher " + sqlWhere + " group by CurrentPeriodBo,`Group`,VID)TB";
sql = "Select count(1) as TotalCount from (select Period,`Group`,VID from Voucher " + sqlWhere + " group by Period,`Group`,VID)TB";
}
int total = jdbcTemplate.queryForObject(sql, int.class);
......@@ -343,7 +343,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
if (allJe) {
if (pagingInfo != null) {
sql = "SELECT" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Group`," +
"`VID`," +
"`Date`," +
......@@ -353,7 +353,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"FROM" +
"(" +
"SELECT" +
"TB.`CurrentPeriodBo`," +
"TB.`Period`," +
"TB.`Group`," +
"TB.`VID`," +
"TB.`Date`," +
......@@ -363,7 +363,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"FROM" +
"(" +
"SELECT" +
"c.`CurrentPeriodBo`," +
"c.`Period`," +
"c.`Group`," +
"c.`VID`," +
"c.`Date`," +
......@@ -373,35 +373,35 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"FROM" +
"(" +
"SELECT" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Group`," +
"`VID`" +
"FROM" +
"Voucher " + sqlWhere +
"GROUP BY" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Group`," +
"`VID`" +
") abc" +
"LEFT JOIN Voucher c ON abc.`CurrentPeriodBo` = c.`CurrentPeriodBo`" +
"LEFT JOIN Voucher c ON abc.`Period` = c.`Period`" +
"AND abc.`Group` = c.`Group`" +
"AND abc.`VID` = c.`VID`" +
"GROUP BY" +
"c.`CurrentPeriodBo`," +
"c.`Period`," +
"c.`Group`," +
"c.`VID`," +
"c.`Date`" +
") TB" +
") tmp" +
"ORDER BY" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Date`," +
"`Group`," +
"`VID`" +
"LIMIT " + pagingInfo.getPageSize() * (pagingInfo.getPageIndex() - 1) + "," + pagingInfo.getPageSize();
} else {
sql = "SELECT" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Group`," +
"`VID`," +
"`Date`," +
......@@ -411,7 +411,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"FROM" +
"(" +
"SELECT" +
"TB.`CurrentPeriodBo`," +
"TB.`Period`," +
"TB.`Group`," +
"TB.`VID`," +
"TB.`Date`," +
......@@ -421,7 +421,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"FROM" +
"(" +
"SELECT" +
"c.`CurrentPeriodBo`," +
"c.`Period`," +
"c.`Group`," +
"c.`VID`," +
"c.`Date`," +
......@@ -431,28 +431,28 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"FROM" +
"(" +
"SELECT" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Group`," +
"`VID`" +
"FROM" +
"Voucher " + sqlWhere +
"GROUP BY" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Group`," +
"`VID`" +
") abc" +
"LEFT JOIN Voucher c ON abc.`CurrentPeriodBo` = c.`CurrentPeriodBo`" +
"LEFT JOIN Voucher c ON abc.`Period` = c.`Period`" +
"AND abc.`Group` = c.`Group`" +
"AND abc.`VID` = c.`VID`" +
"GROUP BY" +
"c.`CurrentPeriodBo`," +
"c.`Period`," +
"c.`Group`," +
"c.`VID`," +
"c.`Date`" +
") TB" +
") tmp" +
"ORDER BY" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Date`," +
"`Group`," +
"`VID`";
......@@ -460,7 +460,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
} else {
if (pagingInfo != null) {
sql = "SELECT" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Group`," +
"`VID`," +
"`Date`," +
......@@ -470,7 +470,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"FROM" +
"(" +
"SELECT" +
"TB.`CurrentPeriodBo`," +
"TB.`Period`," +
"TB.`Group`," +
"TB.`VID`," +
"TB.`Date`," +
......@@ -480,7 +480,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"FROM" +
"(" +
"SELECT" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Group`," +
"`VID`," +
"`Date`," +
......@@ -490,21 +490,21 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"FROM" +
"Voucher " + sqlWhere +
"GROUP BY" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Group`," +
"`VID`," +
"`Date`" +
") TB" +
") abc" +
"ORDER BY" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Date`," +
"`Group`," +
"`VID`" +
"LIMIT " + pagingInfo.getPageSize() * (pagingInfo.getPageIndex() - 1) + "," + pagingInfo.getPageSize();
} else {
sql = "SELECT" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Group`," +
"`VID`," +
"`Date`," +
......@@ -514,7 +514,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"FROM" +
"(" +
"SELECT" +
"TB.`CurrentPeriodBo`," +
"TB.`Period`," +
"TB.`Group`," +
"TB.`VID`," +
"TB.`Date`," +
......@@ -524,7 +524,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"FROM" +
"(" +
"SELECT" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Group`," +
"`VID`," +
"`Date`," +
......@@ -534,14 +534,14 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"FROM" +
"Voucher " + sqlWhere +
"GROUP BY" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Group`," +
"`VID`," +
"`Date`" +
") TB" +
") abc" +
"ORDER BY" +
"`CurrentPeriodBo`," +
"`Period`," +
"`Date`," +
"`Group`," +
"`VID`";
......@@ -552,7 +552,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
queryResult.forEach(a -> {
VoucherMainDto voucherMainDto = new VoucherMainDto();
voucherMainDto.setPeriod(Integer.parseInt(a.get("CurrentPeriodBo").toString()));
voucherMainDto.setPeriod(Integer.parseInt(a.get("Period").toString()));
voucherMainDto.setGroup(a.get("Group").toString());
voucherMainDto.setvID(a.get("VID").toString());
voucherMainDto.setDate(DateTime.parse(a.get("Date").toString()).toDate());
......@@ -638,7 +638,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
case VoucherSelect.S_Period:
tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().split(" "))
, VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord()]
, "`CurrentPeriodBo`"
, "`Period`"
, mainRelation
, null));
break;
......
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