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

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

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