提交 2647a10b 编写于 作者: zhouweidong's avatar zhouweidong

修复数据搜索项日期型数据格式化问题

上级 cf5a0e9b
...@@ -41,19 +41,20 @@ public class ${item.codeName}SearchContext extends QueryWrapperContext<${item.co ...@@ -41,19 +41,20 @@ public class ${item.codeName}SearchContext extends QueryWrapperContext<${item.co
<#if formitem.getPSDEField()??> <#if formitem.getPSDEField()??>
<#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)> <#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)>
<#assign stdDataType=srfdatatype(formitem.getPSDEField().stdDataType)> <#assign stdDataType=srfdatatype(formitem.getPSDEField().stdDataType)>
<#assign dataFomat=formitem.getPSDEField().getValueFormat()>
<#assign defDataType=formitem.getPSDEField().getDataType()> <#assign defDataType=formitem.getPSDEField().getDataType()>
<#comment>in条件通过String接,通过split拆后再进行查询</#comment> <#comment>in条件通过String接,通过split拆后再进行查询</#comment>
<#if formitem.getValueOp() == "IN" || formitem.getValueOp() == "ISNULL" || formitem.getValueOp() == "ISNOTNULL"> <#if formitem.getValueOp() == "IN" || formitem.getValueOp() == "ISNULL" || formitem.getValueOp() == "ISNOTNULL">
<#assign formItemDataType="String"> <#assign formItemDataType="String">
</#if> </#if>
<#if formItemDataType !="String"> <#if formItemDataType !="String">
<#if defDataType == "DATETIME" || stdDataType == "DATETIME"> <#if (defDataType == "DATETIME" || stdDataType == "DATETIME") && dataFomat=="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS">
@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" || stdDataType == "DATE"> <#elseif (defDataType == "DATE" || stdDataType == "DATE") && dataFomat=="%1$tY-%1$tm-%1$td">
@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" || stdDataType == "TIME"> <#elseif (defDataType == "TIME" || stdDataType == "TIME") && dataFomat=="%1$tH:%1$tM:%1$tS">
@JsonFormat(pattern="HH:mm", timezone="GMT+8") @JsonFormat(pattern="HH:mm", timezone="GMT+8")
@JSONField(format="HH:mm") @JSONField(format="HH:mm")
</#if> </#if>
...@@ -156,19 +157,20 @@ public class ${item.codeName}SearchContext extends QueryBuildContext { ...@@ -156,19 +157,20 @@ public class ${item.codeName}SearchContext extends QueryBuildContext {
<#if formitem.getPSDEField()??> <#if formitem.getPSDEField()??>
<#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)> <#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)>
<#assign stdDataType=srfdatatype(formitem.getPSDEField().stdDataType)> <#assign stdDataType=srfdatatype(formitem.getPSDEField().stdDataType)>
<#assign dataFomat=formitem.getPSDEField().getValueFormat()>
<#assign defDataType=formitem.getPSDEField().getDataType()> <#assign defDataType=formitem.getPSDEField().getDataType()>
<#comment>in条件通过String接,通过split拆后再进行查询</#comment> <#comment>in条件通过String接,通过split拆后再进行查询</#comment>
<#if formitem.getValueOp() == "IN" || formitem.getValueOp() == "ISNULL" || formitem.getValueOp() == "ISNOTNULL"> <#if formitem.getValueOp() == "IN" || formitem.getValueOp() == "ISNULL" || formitem.getValueOp() == "ISNOTNULL">
<#assign formItemDataType="String"> <#assign formItemDataType="String">
</#if> </#if>
<#if formItemDataType !="String"> <#if formItemDataType !="String">
<#if defDataType == "DATETIME" || stdDataType == "DATETIME"> <#if (defDataType == "DATETIME" || stdDataType == "DATETIME") && dataFomat=="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS">
@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" || stdDataType == "DATE"> <#elseif (defDataType == "DATE" || stdDataType == "DATE") && dataFomat=="%1$tY-%1$tm-%1$td">
@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" || stdDataType == "TIME"> <#elseif (defDataType == "TIME" || stdDataType == "TIME") && dataFomat=="%1$tH:%1$tM:%1$tS">
@JsonFormat(pattern="HH:mm", timezone="GMT+8") @JsonFormat(pattern="HH:mm", timezone="GMT+8")
@JSONField(format="HH:mm") @JSONField(format="HH:mm")
</#if> </#if>
...@@ -257,17 +259,24 @@ public class ${item.codeName}SearchContext extends SearchContextBase { ...@@ -257,17 +259,24 @@ public class ${item.codeName}SearchContext extends SearchContextBase {
<#if formitem.getPSDEField()??> <#if formitem.getPSDEField()??>
<#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)> <#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)>
<#assign stdDataType=srfdatatype(formitem.getPSDEField().stdDataType)> <#assign stdDataType=srfdatatype(formitem.getPSDEField().stdDataType)>
<#assign dataFomat=formitem.getPSDEField().getValueFormat()>
<#assign defDataType=formitem.getPSDEField().getDataType()> <#assign defDataType=formitem.getPSDEField().getDataType()>
<#if defDataType == "DATETIME" || stdDataType == "DATETIME"> <#comment>in条件通过String接,通过split拆后再进行查询</#comment>
<#if formitem.getValueOp() == "IN" || formitem.getValueOp() == "ISNULL" || formitem.getValueOp() == "ISNOTNULL">
<#assign formItemDataType="String">
</#if>
<#if formItemDataType !="String">
<#if (defDataType == "DATETIME" || stdDataType == "DATETIME") && dataFomat=="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS">
@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" || stdDataType == "DATE"> <#elseif (defDataType == "DATE" || stdDataType == "DATE") && dataFomat=="%1$tY-%1$tm-%1$td">
@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" || stdDataType == "TIME"> <#elseif (defDataType == "TIME" || stdDataType == "TIME") && dataFomat=="%1$tH:%1$tM:%1$tS">
@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)> <#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" || formitem.getValueOp() == "ISNULL" || formitem.getValueOp() == "ISNOTNULL">
...@@ -296,17 +305,24 @@ public class ${item.codeName}SearchContext extends SearchContextBase { ...@@ -296,17 +305,24 @@ public class ${item.codeName}SearchContext extends SearchContextBase {
<#if formitem.getPSDEField()??> <#if formitem.getPSDEField()??>
<#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)> <#assign formItemDataType=srfr7javatype(formitem.getPSDEField().stdDataType)>
<#assign stdDataType=srfdatatype(formitem.getPSDEField().stdDataType)> <#assign stdDataType=srfdatatype(formitem.getPSDEField().stdDataType)>
<#assign dataFomat=formitem.getPSDEField().getValueFormat()>
<#assign defDataType=formitem.getPSDEField().getDataType()> <#assign defDataType=formitem.getPSDEField().getDataType()>
<#if defDataType == "DATETIME" || stdDataType == "DATETIME"> <#comment>in条件通过String接,通过split拆后再进行查询</#comment>
<#if formitem.getValueOp() == "IN" || formitem.getValueOp() == "ISNULL" || formitem.getValueOp() == "ISNOTNULL">
<#assign formItemDataType="String">
</#if>
<#if formItemDataType !="String">
<#if (defDataType == "DATETIME" || stdDataType == "DATETIME") && dataFomat=="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS">
@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" || stdDataType == "DATE"> <#elseif (defDataType == "DATE" || stdDataType == "DATE") && dataFomat=="%1$tY-%1$tm-%1$td">
@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" || stdDataType == "TIME"> <#elseif (defDataType == "TIME" || stdDataType == "TIME") && dataFomat=="%1$tH:%1$tM:%1$tS">
@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)> <#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" || formitem.getValueOp() == "ISNULL" || formitem.getValueOp() == "ISNOTNULL">
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册