提交 00651e0b 编写于 作者: zhouweidong's avatar zhouweidong

还原

上级 9d9f0e90
...@@ -39,24 +39,22 @@ public class ${item.codeName}SearchContext extends QueryWrapperContext<${item.co ...@@ -39,24 +39,22 @@ public class ${item.codeName}SearchContext extends QueryWrapperContext<${item.co
<#if defield.getAllPSDEFSearchModes()??> <#if defield.getAllPSDEFSearchModes()??>
<#list defield.getAllPSDEFSearchModes() as formitem> <#list defield.getAllPSDEFSearchModes() as formitem>
<#if formitem.getPSDEField()??> <#if formitem.getPSDEField()??>
<#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)>
<#assign defDataType=formitem.getPSDEField().getDataType()> <#assign defDataType=formitem.getPSDEField().getDataType()>
<#comment>in条件通过String接,通过split拆后再进行查询</#comment> <#if defDataType == "DATETIME">
<#if formitem.getValueOp() == "IN" || formitem.getValueOp() == "ISNULL" || formitem.getValueOp() == "ISNOTNULL">
<#assign formItemDataType="String">
</#if>
<#if formItemDataType !="String">
<#if defDataType == "DATETIME">
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
@JSONField(format="yyyy-MM-dd HH:mm:ss") @JSONField(format="yyyy-MM-dd HH:mm:ss")
<#elseif defDataType == "DATE"> <#elseif defDataType == "DATE">
@JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
@JSONField(format="yyyy-MM-dd") @JSONField(format="yyyy-MM-dd")
<#elseif defDataType == "TIME"> <#elseif defDataType == "TIME">
@JsonFormat(pattern="HH:mm", timezone="GMT+8") @JsonFormat(pattern="HH:mm", timezone="GMT+8")
@JSONField(format="HH:mm") @JSONField(format="HH:mm")
</#if>
</#if> </#if>
<#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)>
<#comment>in条件通过String接,通过split拆后再进行查询</#comment>
<#if formitem.getValueOp() == "IN">
<#assign formItemDataType="String">
</#if>
private ${formItemDataType} ${formitem.getName()?lower_case};//[${defield.getLogicName()}] private ${formItemDataType} ${formitem.getName()?lower_case};//[${defield.getLogicName()}]
public void set${formitem.getName()?lower_case?cap_first}(${formItemDataType} ${formitem.getName()?lower_case}) { public void set${formitem.getName()?lower_case?cap_first}(${formItemDataType} ${formitem.getName()?lower_case}) {
this.${formitem.getName()?lower_case} = ${formitem.getName()?lower_case}; this.${formitem.getName()?lower_case} = ${formitem.getName()?lower_case};
...@@ -80,11 +78,11 @@ public class ${item.codeName}SearchContext extends QueryWrapperContext<${item.co ...@@ -80,11 +78,11 @@ public class ${item.codeName}SearchContext extends QueryWrapperContext<${item.co
<#elseif formitem.getValueOp() == "LTANDEQ"> <#elseif formitem.getValueOp() == "LTANDEQ">
this.getSearchCond().le("${formitem.getPSDEField().getName()?lower_case}", ${formitem.getName()?lower_case}); this.getSearchCond().le("${formitem.getPSDEField().getName()?lower_case}", ${formitem.getName()?lower_case});
<#elseif formitem.getValueOp() == "ISNOTNULL"> <#elseif formitem.getValueOp() == "ISNOTNULL">
if(this.${formitem.getName()?lower_case}.equals("1")){ if(this.${formitem.getName()?lower_case}.toString().equals("1")){
this.getSearchCond().isNotNull("${formitem.getPSDEField().getName()?lower_case}"); this.getSearchCond().isNotNull("${formitem.getPSDEField().getName()?lower_case}");
} }
<#elseif formitem.getValueOp() == "ISNULL"> <#elseif formitem.getValueOp() == "ISNULL">
if(this.${formitem.getName()?lower_case}.equals("1")){ if(this.${formitem.getName()?lower_case}.toString().equals("1")){
this.getSearchCond().isNull("${formitem.getPSDEField().getName()?lower_case}"); this.getSearchCond().isNull("${formitem.getPSDEField().getName()?lower_case}");
} }
<#elseif formitem.getValueOp() == "IN"> <#elseif formitem.getValueOp() == "IN">
...@@ -120,10 +118,10 @@ public class ${item.codeName}SearchContext extends QueryWrapperContext<${item.co ...@@ -120,10 +118,10 @@ public class ${item.codeName}SearchContext extends QueryWrapperContext<${item.co
<#assign bHasSearch = true > <#assign bHasSearch = true >
<#if bFisrtLoop> <#if bFisrtLoop>
this.getSearchCond().and( wrapper -> this.getSearchCond().and( wrapper ->
wrapper.like("${defield.name?lower_case}", query) wrapper.like("${defield.name?lower_case}", query)
<#assign bFisrtLoop = false > <#assign bFisrtLoop = false >
<#else> <#else>
.or().like("${defield.name?lower_case}", query) .or().like("${defield.name?lower_case}", query)
</#if> </#if>
</#if> </#if>
</#list> </#list>
...@@ -153,24 +151,22 @@ public class ${item.codeName}SearchContext extends QueryBuildContext { ...@@ -153,24 +151,22 @@ public class ${item.codeName}SearchContext extends QueryBuildContext {
<#if defield.getAllPSDEFSearchModes()??> <#if defield.getAllPSDEFSearchModes()??>
<#list defield.getAllPSDEFSearchModes() as formitem> <#list defield.getAllPSDEFSearchModes() as formitem>
<#if formitem.getPSDEField()??> <#if formitem.getPSDEField()??>
<#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)>
<#assign defDataType=formitem.getPSDEField().getDataType()> <#assign defDataType=formitem.getPSDEField().getDataType()>
<#comment>in条件通过String接,通过split拆后再进行查询</#comment> <#if defDataType == "DATETIME">
<#if formitem.getValueOp() == "IN" || formitem.getValueOp() == "ISNULL" || formitem.getValueOp() == "ISNOTNULL">
<#assign formItemDataType="String">
</#if>
<#if formItemDataType !="String">
<#if defDataType == "DATETIME">
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
@JSONField(format="yyyy-MM-dd HH:mm:ss") @JSONField(format="yyyy-MM-dd HH:mm:ss")
<#elseif defDataType == "DATE"> <#elseif defDataType == "DATE">
@JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
@JSONField(format="yyyy-MM-dd") @JSONField(format="yyyy-MM-dd")
<#elseif defDataType == "TIME"> <#elseif defDataType == "TIME">
@JsonFormat(pattern="HH:mm", timezone="GMT+8") @JsonFormat(pattern="HH:mm", timezone="GMT+8")
@JSONField(format="HH:mm") @JSONField(format="HH:mm")
</#if>
</#if> </#if>
<#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)>
<#comment>in条件通过String接,通过split拆后再进行查询</#comment>
<#if formitem.getValueOp() == "IN">
<#assign formItemDataType="String">
</#if>
private ${formItemDataType} ${formitem.getName()?lower_case};//[${defield.getLogicName()}] private ${formItemDataType} ${formitem.getName()?lower_case};//[${defield.getLogicName()}]
public void set${formitem.getName()?lower_case?cap_first}(${formItemDataType} ${formitem.getName()?lower_case}) { public void set${formitem.getName()?lower_case?cap_first}(${formItemDataType} ${formitem.getName()?lower_case}) {
this.${formitem.getName()?lower_case} = ${formitem.getName()?lower_case}; this.${formitem.getName()?lower_case} = ${formitem.getName()?lower_case};
...@@ -197,11 +193,11 @@ public class ${item.codeName}SearchContext extends QueryBuildContext { ...@@ -197,11 +193,11 @@ public class ${item.codeName}SearchContext extends QueryBuildContext {
<#elseif formitem.getValueOp() == "LTANDEQ"> <#elseif formitem.getValueOp() == "LTANDEQ">
this.getSearchCond().and("${formitem.getPSDEField().getName()?lower_case}").lessThanEquals(${formitem.getName()?lower_case}); this.getSearchCond().and("${formitem.getPSDEField().getName()?lower_case}").lessThanEquals(${formitem.getName()?lower_case});
<#elseif formitem.getValueOp() == "ISNOTNULL"> <#elseif formitem.getValueOp() == "ISNOTNULL">
if(this.${formitem.getName()?lower_case}.equals("1")){ if(this.${formitem.getName()?lower_case}.toString().equals("1")){
this.getSearchCond().and("${formitem.getPSDEField().getName()?lower_case}").exists(true).and("${formitem.getPSDEField().getName()?lower_case}").notEquals("").and("${formitem.getPSDEField().getName()?lower_case}").notEquals(null); this.getSearchCond().and("${formitem.getPSDEField().getName()?lower_case}").exists(true).and("${formitem.getPSDEField().getName()?lower_case}").notEquals("").and("${formitem.getPSDEField().getName()?lower_case}").notEquals(null);
} }
<#elseif formitem.getValueOp() == "ISNULL"> <#elseif formitem.getValueOp() == "ISNULL">
if(this.${formitem.getName()?lower_case}.equals("1")){ if(this.${formitem.getName()?lower_case}.toString().equals("1")){
this.getSearchCond().and("${formitem.getPSDEField().getName()?lower_case}").exists(null); this.getSearchCond().and("${formitem.getPSDEField().getName()?lower_case}").exists(null);
} }
<#elseif formitem.getValueOp() == "IN"> <#elseif formitem.getValueOp() == "IN">
...@@ -266,7 +262,7 @@ public class ${item.codeName}SearchContext extends SearchContextBase { ...@@ -266,7 +262,7 @@ public class ${item.codeName}SearchContext extends SearchContextBase {
</#if> </#if>
<#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)> <#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)>
<#comment>in条件通过String接,通过split拆后再进行查询</#comment> <#comment>in条件通过String接,通过split拆后再进行查询</#comment>
<#if formitem.getValueOp() == "IN" || formitem.getValueOp() == "ISNULL" || formitem.getValueOp() == "ISNOTNULL"> <#if formitem.getValueOp() == "IN">
<#assign formItemDataType="String"> <#assign formItemDataType="String">
</#if> </#if>
private ${formItemDataType} ${formitem.getName()?lower_case};//[${defield.getLogicName()}] private ${formItemDataType} ${formitem.getName()?lower_case};//[${defield.getLogicName()}]
...@@ -303,7 +299,7 @@ public class ${item.codeName}SearchContext extends SearchContextBase { ...@@ -303,7 +299,7 @@ public class ${item.codeName}SearchContext extends SearchContextBase {
</#if> </#if>
<#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)> <#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)>
<#comment>in条件通过String接,通过split拆后再进行查询</#comment> <#comment>in条件通过String接,通过split拆后再进行查询</#comment>
<#if formitem.getValueOp() == "IN" || formitem.getValueOp() == "ISNULL" || formitem.getValueOp() == "ISNOTNULL"> <#if formitem.getValueOp() == "IN">
<#assign formItemDataType="String"> <#assign formItemDataType="String">
</#if> </#if>
private ${formItemDataType} ${formitem.getName()?lower_case};//[${defield.getLogicName()}] private ${formItemDataType} ${formitem.getName()?lower_case};//[${defield.getLogicName()}]
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册