Commit 80831640 authored by neo's avatar neo

[bugfix] change CurrentPeriodBo to Period

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