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

代码规范检查

上级 a204cd87
......@@ -77,17 +77,17 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
<#if defieldano?? && defieldano!=''>
<#assign defieldano = defieldano+" , ">
</#if>
<#assign defieldano = defieldano+"isKeyField=true">
<#assign defieldano = defieldano+"isKeyField = true">
<#elseif defield.getPredefinedType()?? && defield.getPredefinedType()!=''>
<#if defieldano?? && defieldano!=''>
<#assign defieldano = defieldano+" , ">
<#assign defieldano = defieldano+", ">
</#if>
<#assign defieldano = defieldano+"preType = DEPredefinedFieldType."+defield.getPredefinedType()?upper_case>
<#assign defieldano = defieldano+" preType = DEPredefinedFieldType."+defield.getPredefinedType()?upper_case>
<#if defield.getPredefinedType()?lower_case =='createdate'||defield.getPredefinedType()?lower_case =='createman'>
<#assign tablefieldano = tablefieldano+" , fill = FieldFill.INSERT">
<#assign tablefieldano = tablefieldano+", fill = FieldFill.INSERT">
<#elseif defield.getPredefinedType()?lower_case =='logicvalid'>
<#if de.getLogicValidPSDEField()?? && de.isLogicValid()==true>
<#assign defieldano = defieldano+", logicval = \""+((item.getValidLogicValue())!'1')+"\" , logicdelval=\""+((item.getInvalidLogicValue())!'0')+"\"">
<#assign defieldano = defieldano+", logicval = \""+((item.getValidLogicValue())!'1')+"\", logicdelval = \""+((item.getInvalidLogicValue())!'0')+"\"">
</#if>
</#if>
</#if>
......@@ -100,29 +100,29 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
<#assign defieldano = defieldano+"value = \""+jsonfield+"\"">
<#if defield.getPSCodeList?? && defield.getPSCodeList()??>
<#if ((defield.getPredefinedType())!'')!='LOGICVALID'>
<#assign defieldano=defieldano+",dict=\""+defield.getPSCodeList().codeName+"\"">
<#assign defieldano=defieldano+",dict = \""+defield.getPSCodeList().codeName+"\"">
</#if>
</#if>
<#if defDataType == "DATETIME"|| defDataType == "DATE" || defDataType == "TIME" || (defDataType=='PICKUPDATA'||defDataType=='INHERIT')&& defStdType=='Timestamp'>
<#if defDataType == "DATETIME">
<#assign defieldano=defieldano+",fieldType=\"DATETIME\",format=\"yyyy-MM-dd HH:mm:ss\"">
<#assign defieldano=defieldano+", fieldType = \"DATETIME\", format = \"yyyy-MM-dd HH:mm:ss\"">
<#elseif defDataType == "DATE">
<#assign defieldano=defieldano+",fieldType=\"DATE\",format=\"yyyy-MM-dd\"">
<#assign defieldano=defieldano+", fieldType = \"DATE\", format = \"yyyy-MM-dd\"">
<#elseif defDataType == "TIME">
<#assign defieldano=defieldano+",fieldType=\"TIME\",format=\"HH:mm:ss\"">
<#assign defieldano=defieldano+", fieldType = \"TIME\", format = \"HH:mm:ss\"">
<#elseif (defDataType=='PICKUPDATA'||defDataType=='INHERIT')&& defStdType=='Timestamp'><#comment>外键值附加数据,数据类型为时间</#comment>
<#assign defieldano=defieldano+",fieldType=\"DATETIME\",format=\"yyyy-MM-dd HH:mm:ss\"">
<#assign defieldano=defieldano+", fieldType = \"DATETIME\", format = \"yyyy-MM-dd HH:mm:ss\"">
</#if>
</#if>
</#if>
<#comment>重复值检查</#comment>
<#if defield.getDupCheckMode?? && defield.getDupCheckMode()?? && defield.getDupCheckMode()=='ALL'>
<#if defieldano?? && defieldano!='' >
<#assign defieldano = defieldano+" , ">
<#assign defieldano = defieldano+", ">
</#if>
<#if defield.getDupCheckPSDEField?? && defield.getDupCheckPSDEField()??>
<#assign dupCheckField = srfcaseformat(defield.getDupCheckPSDEField().getCodeName(),'l_u2lC') >
<#assign defieldano=defieldano+"dupCheck = DupCheck.ALL , dupCheckField=\""+dupCheckField+"\"">
<#assign defieldano=defieldano+"dupCheck = DupCheck.ALL, dupCheckField = \""+dupCheckField+"\"">
<#else>
<#assign defieldano=defieldano+"dupCheck = DupCheck.ALL" >
</#if>
......@@ -153,7 +153,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
<#comment>逻辑有效默认值-用于mybatis-plus删除时update逻辑有效值</#comment>
<#if de.getLogicValidPSDEField()?? && de.isLogicValid()==true>
<#if (((item.getValidLogicValue())!'')!='') && (((item.getInvalidLogicValue())!'')!='')>
@TableLogic(value= "${item.getValidLogicValue()}",delval="${item.getInvalidLogicValue()}")
@TableLogic(value= "${item.getValidLogicValue()}", delval = "${item.getInvalidLogicValue()}")
<#else>
@TableLogic
</#if>
......@@ -163,14 +163,14 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
@TableField(${tablefieldano})
</#if>
<#if defDataType == "DATETIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS")>
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "${jsonfield}", format = "yyyy-MM-dd HH:mm:ss")
<#elseif defDataType == "DATE" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tY-%1$tm-%1$td")>
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "${jsonfield}", format = "yyyy-MM-dd")
<#elseif defDataType == "TIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tH:%1$tM:%1$tS")>
@JsonFormat(pattern="HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="HH:mm:ss")
@JsonFormat(pattern = "HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "${jsonfield}", format = "HH:mm:ss")
<#else>
@JSONField(name = "${jsonfield}")
</#if>
......@@ -240,7 +240,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
/**
* 设置 [${der.getMinorPSDataEntity().getLogicName()}]
*/
public void set${srfcaseformat(listcode,'l_u2lC')?cap_first}(List<${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.domain.${der.getMinorPSDataEntity().getCodeName()}> ${srfcaseformat(listcode,'l_u2lC')}){
public void set${srfcaseformat(listcode,'l_u2lC')?cap_first}(List<${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.domain.${der.getMinorPSDataEntity().getCodeName()}> ${srfcaseformat(listcode,'l_u2lC')}) {
this.${srfcaseformat(listcode,'l_u2lC')} = ${srfcaseformat(listcode,'l_u2lC')} ;
this.modify("${columnname}",(${srfcaseformat(listcode,'l_u2lC')}!=null)?${srfcaseformat(listcode,'l_u2lC')}:(new ArrayList()));
}
......@@ -265,7 +265,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
/**
* 设置 [${defield.getLogicName()}]
*/
public void set${publicCodeName}(${srfr7javatype(defield.getStdDataType())} ${prvateCodeName}){
public void set${publicCodeName}(${srfr7javatype(defield.getStdDataType())} ${prvateCodeName}) {
this.${prvateCodeName} = ${prvateCodeName} ;
this.modify("${columnname}",${prvateCodeName});
}
......@@ -284,7 +284,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
/**
* 格式化日期 [${defield.getLogicName()}]
*/
public String format${publicCodeName}(){
public String format${publicCodeName}() {
if (this.${prvateCodeName} == null) {
return null;
}
......@@ -311,7 +311,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
/**
* 获取 [${keyField.getLogicName()}]
*/
public ${srfr7javatype(keyField.getStdDataType())} get${publicCodeName}(){
public ${srfr7javatype(keyField.getStdDataType())} get${publicCodeName}() {
Object id=getDefaultKey(true);
return ObjectUtils.isEmpty(id)?null:(${srfr7javatype(keyField.getStdDataType())})id;
}
......@@ -346,7 +346,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
/**
* 获取 [${keyField.getLogicName()}]
*/
public ${srfr7javatype(keyField.getStdDataType())} get${publicCodeName}(){
public ${srfr7javatype(keyField.getStdDataType())} get${publicCodeName}() {
if(ObjectUtils.isEmpty(${prvateCodeName})){
${prvateCodeName}=(${srfr7javatype(keyField.stdDataType)})getDefaultKey(true);
}
......@@ -441,7 +441,7 @@ public class ${item.getCodeName()} extends EntityMongo implements Serializable {
<#if defieldano?? && defieldano!=''>
<#assign defieldano = defieldano+" , ">
</#if>
<#assign defieldano = defieldano+"isKeyField=true">
<#assign defieldano = defieldano+"isKeyField = true">
<#elseif defield.getPredefinedType()?? && defield.getPredefinedType()!=''>
<#if defieldano?? && defieldano!=''>
<#assign defieldano = defieldano+" , ">
......@@ -449,7 +449,7 @@ public class ${item.getCodeName()} extends EntityMongo implements Serializable {
<#assign defieldano = defieldano+"preType = DEPredefinedFieldType."+defield.getPredefinedType()?upper_case>
<#if defield.getPredefinedType()?lower_case =='logicvalid'>
<#if de.getLogicValidPSDEField()?? && de.isLogicValid()==true>
<#assign defieldano = defieldano+", logicval = \""+((item.getValidLogicValue())!'1')+"\" , logicdelval=\""+((item.getInvalidLogicValue())!'0')+"\"">
<#assign defieldano = defieldano+", logicval = \""+((item.getValidLogicValue())!'1')+"\" , logicdelval = \""+((item.getInvalidLogicValue())!'0')+"\"">
</#if>
</#if>
</#if>
......@@ -469,14 +469,14 @@ public class ${item.getCodeName()} extends EntityMongo implements Serializable {
</#if>
<#assign defDataType = (defield.getDataType())!"">
<#if defDataType == "DATETIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS")>
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "${jsonfield}" , format = "yyyy-MM-dd HH:mm:ss")
<#elseif defDataType == "DATE" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tY-%1$tm-%1$td")>
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "${jsonfield}" , format="yyyy-MM-dd")
<#elseif defDataType == "TIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tH:%1$tM:%1$tS")>
@JsonFormat(pattern="HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="HH:mm:ss")
@JsonFormat(pattern = "HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "${jsonfield}" , format = "HH:mm:ss")
<#else>
@JSONField(name = "${jsonfield}")
</#if>
......@@ -558,7 +558,7 @@ public class ${item.getCodeName()} extends EntityMongo implements Serializable {
/**
* 获取 [${keyField.getLogicName()}]
*/
public ${srfr7javatype(keyField.getStdDataType())} get${publicCodeName}(){
public ${srfr7javatype(keyField.getStdDataType())} get${publicCodeName}() {
if(ObjectUtils.isEmpty(${privateCodeName})){
${privateCodeName}=(${srfr7javatype(keyField.stdDataType)})getDefaultKey(true);
}
......@@ -612,7 +612,7 @@ public class ${item.getCodeName()} extends EntityClient implements Serializable
<#if defieldano?? && defieldano!=''>
<#assign defieldano = defieldano+" , ">
</#if>
<#assign defieldano = defieldano+"isKeyField=true">
<#assign defieldano = defieldano+"isKeyField = true">
<#elseif defield.getPredefinedType()?? && defield.getPredefinedType()!=''>
<#if defieldano?? && defieldano!=''>
<#assign defieldano = defieldano+" , ">
......@@ -620,7 +620,7 @@ public class ${item.getCodeName()} extends EntityClient implements Serializable
<#assign defieldano = defieldano+"preType = DEPredefinedFieldType."+defield.getPredefinedType()?upper_case>
<#if defield.getPredefinedType()?lower_case =='logicvalid'>
<#if de.getLogicValidPSDEField()?? && de.isLogicValid()==true>
<#assign defieldano = defieldano+", logicval = \""+((item.getValidLogicValue())!'1')+"\" , logicdelval=\""+((item.getInvalidLogicValue())!'0')+"\"">
<#assign defieldano = defieldano+", logicval = \""+((item.getValidLogicValue())!'1')+"\" , logicdelval = \""+((item.getInvalidLogicValue())!'0')+"\"">
</#if>
</#if>
</#if>
......@@ -637,14 +637,14 @@ public class ${item.getCodeName()} extends EntityClient implements Serializable
</#if>
<#assign defDataType = (defield.getDataType())!"">
<#if defDataType == "DATETIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS")>
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "${jsonfield}" , format = "yyyy-MM-dd HH:mm:ss")
<#elseif defDataType == "DATE" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tY-%1$tm-%1$td")>
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "${jsonfield}" , format = "yyyy-MM-dd")
<#elseif defDataType == "TIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tH:%1$tM:%1$tS")>
@JsonFormat(pattern="HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="HH:mm:ss")
@JsonFormat(pattern = "HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "${jsonfield}" , format = "HH:mm:ss")
<#else>
@JSONField(name = "${jsonfield}")
</#if>
......@@ -718,7 +718,7 @@ public class ${item.getCodeName()} extends EntityClient implements Serializable
/**
* 设置 [${defield.getLogicName()}]
*/
public void set${publicCodeName}(${srfr7javatype(defield.getStdDataType())} ${prvateCodeName}){
public void set${publicCodeName}(${srfr7javatype(defield.getStdDataType())} ${prvateCodeName}) {
this.${prvateCodeName} = ${prvateCodeName} ;
this.modify("${columnname}",${prvateCodeName});
}
......@@ -737,7 +737,7 @@ public class ${item.getCodeName()} extends EntityClient implements Serializable
/**
* 格式化日期 [${defield.getLogicName()}]
*/
public String format${publicCodeName}(){
public String format${publicCodeName}() {
if (this.${prvateCodeName} == null) {
return null;
}
......@@ -828,7 +828,7 @@ public class ${item.getCodeName()} extends EntityBase implements Serializable {
<#assign defieldano = defieldano+"preType = DEPredefinedFieldType."+defield.getPredefinedType()?upper_case>
<#if defield.getPredefinedType()?lower_case =='logicvalid'>
<#if de.getLogicValidPSDEField()?? && de.isLogicValid()==true>
<#assign defieldano = defieldano+", logicval = \""+((item.getValidLogicValue())!'1')+"\" , logicdelval=\""+((item.getInvalidLogicValue())!'0')+"\"">
<#assign defieldano = defieldano+", logicval = \""+((item.getValidLogicValue())!'1')+"\" , logicdelval = \""+((item.getInvalidLogicValue())!'0')+"\"">
</#if>
</#if>
</#if>
......@@ -845,14 +845,14 @@ public class ${item.getCodeName()} extends EntityBase implements Serializable {
</#if>
<#assign defDataType = (defield.getDataType())!"">
<#if defDataType == "DATETIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS")>
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "${jsonfield}" , format = "yyyy-MM-dd HH:mm:ss")
<#elseif defDataType == "DATE" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tY-%1$tm-%1$td")>
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "${jsonfield}" , format = "yyyy-MM-dd")
<#elseif defDataType == "TIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tH:%1$tM:%1$tS")>
@JsonFormat(pattern="HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="HH:mm:ss")
@JsonFormat(pattern = "HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "${jsonfield}" , format = "HH:mm:ss")
<#else>
@JSONField(name = "${jsonfield}")
</#if>
......@@ -935,7 +935,7 @@ public class ${item.getCodeName()} extends EntityBase implements Serializable {
/**
* 格式化日期 [${defield.getLogicName()}]
*/
public String format${publicCodeName}(){
public String format${publicCodeName}() {
if (this.${prvateCodeName} == null) {
return null;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册