提交 aa5b40b7 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 22041e6a
...@@ -39,13 +39,13 @@ ...@@ -39,13 +39,13 @@
</i-col> </i-col>
<i-col v-show="detailsModel.last_time.visible" :style="{}" :lg="{ span: 24, offset: 0 }"> <i-col v-show="detailsModel.last_time.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='last_time' :itemRules="this.rules.last_time" class='' :caption="$t('entities.jobsinfo.main_form.details.last_time')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.last_time.error" :isEmptyCaption="false" labelPos="LEFT"> <app-form-item name='last_time' :itemRules="this.rules.last_time" class='' :caption="$t('entities.jobsinfo.main_form.details.last_time')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.last_time.error" :isEmptyCaption="false" labelPos="LEFT">
<date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :value="data.last_time" :disabled="detailsModel.last_time.disabled" style="min-width: 150px; width:160px;" @on-change="(val1, val2) => { this.data.last_time = val1 }"></date-picker> <input-box v-model="data.last_time" @enter="onEnter($event)" unit="" :disabled="detailsModel.last_time.disabled" type='number' style=""></input-box>
</app-form-item> </app-form-item>
</i-col> </i-col>
<i-col v-show="detailsModel.next_time.visible" :style="{}" :lg="{ span: 24, offset: 0 }"> <i-col v-show="detailsModel.next_time.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='next_time' :itemRules="this.rules.next_time" class='' :caption="$t('entities.jobsinfo.main_form.details.next_time')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.next_time.error" :isEmptyCaption="false" labelPos="LEFT"> <app-form-item name='next_time' :itemRules="this.rules.next_time" class='' :caption="$t('entities.jobsinfo.main_form.details.next_time')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.next_time.error" :isEmptyCaption="false" labelPos="LEFT">
<date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :value="data.next_time" :disabled="detailsModel.next_time.disabled" style="min-width: 150px; width:160px;" @on-change="(val1, val2) => { this.data.next_time = val1 }"></date-picker> <input-box v-model="data.next_time" @enter="onEnter($event)" unit="" :disabled="detailsModel.next_time.disabled" type='number' style=""></input-box>
</app-form-item> </app-form-item>
</i-col> </i-col>
...@@ -549,16 +549,16 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -549,16 +549,16 @@ export default class MainBase extends Vue implements ControlInterface {
{ required: false, type: 'string', message: '执行器任务参数 值不能为空', trigger: 'blur' }, { required: false, type: 'string', message: '执行器任务参数 值不能为空', trigger: 'blur' },
], ],
last_time: [ last_time: [
{ type: 'string', message: '上次调度时间 值必须为字符串类型', trigger: 'change' }, { type: 'number', message: '上次调度时间 值必须为数值类型', trigger: 'change' },
{ type: 'string', message: '上次调度时间 值必须为字符串类型', trigger: 'blur' }, { type: 'number', message: '上次调度时间 值必须为数值类型', trigger: 'blur' },
{ required: true, type: 'string', message: '上次调度时间 值不能为空', trigger: 'change' }, { required: true, type: 'number', message: '上次调度时间 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '上次调度时间 值不能为空', trigger: 'blur' }, { required: true, type: 'number', message: '上次调度时间 值不能为空', trigger: 'blur' },
], ],
next_time: [ next_time: [
{ type: 'string', message: '下次调度时间 值必须为字符串类型', trigger: 'change' }, { type: 'number', message: '下次调度时间 值必须为数值类型', trigger: 'change' },
{ type: 'string', message: '下次调度时间 值必须为字符串类型', trigger: 'blur' }, { type: 'number', message: '下次调度时间 值必须为数值类型', trigger: 'blur' },
{ required: true, type: 'string', message: '下次调度时间 值不能为空', trigger: 'change' }, { required: true, type: 'number', message: '下次调度时间 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '下次调度时间 值不能为空', trigger: 'blur' }, { required: true, type: 'number', message: '下次调度时间 值不能为空', trigger: 'blur' },
], ],
timeout: [ timeout: [
{ type: 'number', message: '任务执行超时时间(秒) 值必须为数值类型', trigger: 'change' }, { type: 'number', message: '任务执行超时时间(秒) 值必须为数值类型', trigger: 'change' },
......
...@@ -78,12 +78,12 @@ export default class MainModel { ...@@ -78,12 +78,12 @@ export default class MainModel {
{ {
name: 'last_time', name: 'last_time',
prop: 'last_time', prop: 'last_time',
dataType: 'DATETIME', dataType: 'BIGINT',
}, },
{ {
name: 'next_time', name: 'next_time',
prop: 'next_time', prop: 'next_time',
dataType: 'DATETIME', dataType: 'BIGINT',
}, },
{ {
name: 'timeout', name: 'timeout',
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD hh:mm:ss" :data="row.last_time"></app-format-data> <span>{{row.last_time}}</span>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD hh:mm:ss" :data="row.next_time"></app-format-data> <span>{{row.next_time}}</span>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
......
...@@ -44,7 +44,7 @@ export default class MainModel { ...@@ -44,7 +44,7 @@ export default class MainModel {
{ {
name: 'next_time', name: 'next_time',
prop: 'next_time', prop: 'next_time',
dataType: 'DATETIME', dataType: 'BIGINT',
}, },
{ {
name: 'update_time', name: 'update_time',
...@@ -59,7 +59,7 @@ export default class MainModel { ...@@ -59,7 +59,7 @@ export default class MainModel {
{ {
name: 'last_time', name: 'last_time',
prop: 'last_time', prop: 'last_time',
dataType: 'DATETIME', dataType: 'BIGINT',
}, },
{ {
name: 'srfmajortext', name: 'srfmajortext',
......
...@@ -104,19 +104,17 @@ public class JobsInfo extends EntityMP implements Serializable { ...@@ -104,19 +104,17 @@ public class JobsInfo extends EntityMP implements Serializable {
*/ */
@DEField(name = "last_time") @DEField(name = "last_time")
@TableField(value = "last_time") @TableField(value = "last_time")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JSONField(name = "last_time")
@JSONField(name = "last_time" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("last_time") @JsonProperty("last_time")
private Timestamp lastTime; private BigInteger lastTime;
/** /**
* 下次调度时间 * 下次调度时间
*/ */
@DEField(name = "next_time") @DEField(name = "next_time")
@TableField(value = "next_time") @TableField(value = "next_time")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JSONField(name = "next_time")
@JSONField(name = "next_time" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("next_time") @JsonProperty("next_time")
private Timestamp nextTime; private BigInteger nextTime;
/** /**
* 所有者 * 所有者
*/ */
...@@ -218,39 +216,19 @@ public class JobsInfo extends EntityMP implements Serializable { ...@@ -218,39 +216,19 @@ public class JobsInfo extends EntityMP implements Serializable {
/** /**
* 设置 [上次调度时间] * 设置 [上次调度时间]
*/ */
public void setLastTime(Timestamp lastTime){ public void setLastTime(BigInteger lastTime){
this.lastTime = lastTime ; this.lastTime = lastTime ;
this.modify("last_time",lastTime); this.modify("last_time",lastTime);
} }
/**
* 格式化日期 [上次调度时间]
*/
public String formatLastTime(){
if (this.lastTime == null) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(lastTime);
}
/** /**
* 设置 [下次调度时间] * 设置 [下次调度时间]
*/ */
public void setNextTime(Timestamp nextTime){ public void setNextTime(BigInteger nextTime){
this.nextTime = nextTime ; this.nextTime = nextTime ;
this.modify("next_time",nextTime); this.modify("next_time",nextTime);
} }
/**
* 格式化日期 [下次调度时间]
*/
public String formatNextTime(){
if (this.nextTime == null) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(nextTime);
}
/** /**
* 设置 [所有者] * 设置 [所有者]
*/ */
......
...@@ -50,8 +50,8 @@ public class JobsInfoServiceImpl extends ServiceImpl<JobsInfoMapper, JobsInfo> i ...@@ -50,8 +50,8 @@ public class JobsInfoServiceImpl extends ServiceImpl<JobsInfoMapper, JobsInfo> i
@Override @Override
@Transactional @Transactional
public JobsInfo start(JobsInfo et) { public JobsInfo start(JobsInfo et) {
et.set("Status","0");
et.set("Last_time","0"); et.set("Last_time","0");
et.set("Status","0");
update(et); update(et);
return et; return et;
} }
...@@ -158,9 +158,9 @@ public class JobsInfoServiceImpl extends ServiceImpl<JobsInfoMapper, JobsInfo> i ...@@ -158,9 +158,9 @@ public class JobsInfoServiceImpl extends ServiceImpl<JobsInfoMapper, JobsInfo> i
@Override @Override
@Transactional @Transactional
public JobsInfo stop(JobsInfo et) { public JobsInfo stop(JobsInfo et) {
et.set("Next_time","0");
et.set("Last_time","0"); et.set("Last_time","0");
et.set("Status","1"); et.set("Status","1");
et.set("Next_time","0");
update(et); update(et);
return et; return et;
} }
......
!!!!模版产生代码错误:---- <?xml version="1.1" encoding="UTF-8" standalone="no"?>
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
----
----
FTL stack trace ("~" means nesting-related): <!--输出实体[JOBS_INFO]数据结构 -->
- Failed at: ${dbinst.getUserName()} [in template "CODETEMPL_zh_CN" at line 28, column 24] <changeSet author="a_A_5d9d78509" id="tab-jobs_info-99-1">
---- <createTable tableName="JOBS_INFO">
\ No newline at end of file <column name="ID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_JOBS_INFO_ID"/>
</column>
<column name="TENANT_ID" remarks="" type="VARCHAR(100)">
</column>
<column name="APP" remarks="" type="VARCHAR(100)">
</column>
<column name="CRON" remarks="" type="VARCHAR(100)">
</column>
<column name="HANDLER" remarks="" type="VARCHAR(255)">
</column>
<column name="PARAM" remarks="" type="VARCHAR(512)">
</column>
<column name="TIMEOUT" remarks="" type="INT">
</column>
<column name="FAIL_RETRY_COUNT" remarks="" type="INT">
</column>
<column name="LAST_TIME" remarks="" type="BIGINT">
</column>
<column name="NEXT_TIME" remarks="" type="BIGINT">
</column>
<column name="AUTHOR" remarks="" type="VARCHAR(30)">
</column>
<column name="REMARK" remarks="" type="VARCHAR(30)">
</column>
<column name="STATUS" remarks="" type="INT">
</column>
<column name="UPDATE_TIME" remarks="" type="DATETIME">
</column>
<column name="CREATE_TIME" remarks="" type="DATETIME">
</column>
</createTable>
</changeSet>
<!--输出实体[JOBS_REGISTRY]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-jobs_registry-35-2">
<createTable tableName="JOBS_REGISTRY">
<column name="ID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_JOBS_REGISTRY_ID"/>
</column>
<column name="APP" remarks="" type="VARCHAR(100)">
</column>
<column name="ADDRESS" remarks="" type="VARCHAR(255)">
</column>
<column name="STATUS" remarks="" type="INT">
</column>
<column name="UPDATE_TIME" remarks="" type="DATETIME">
</column>
</createTable>
</changeSet>
<!--输出实体[JOBS_LOCK]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-jobs_lock-20-3">
<createTable tableName="JOBS_LOCK">
<column name="ID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_JOBS_LOCK_ID"/>
</column>
<column name="NAME" remarks="" type="VARCHAR(30)">
</column>
<column name="OWNER" remarks="" type="VARCHAR(100)">
</column>
<column name="CREATE_TIME" remarks="" type="DATETIME">
</column>
</createTable>
</changeSet>
<!--输出实体[JOBS_LOG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-jobs_log-56-4">
<createTable tableName="JOBS_LOG">
<column name="ID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_JOBS_LOG_ID"/>
</column>
<column name="JOB_ID" remarks="" type="VARCHAR(100)">
</column>
<column name="ADDRESS" remarks="" type="VARCHAR(255)">
</column>
<column name="HANDLER" remarks="" type="VARCHAR(255)">
</column>
<column name="PARAM" remarks="" type="VARCHAR(512)">
</column>
<column name="FAIL_RETRY_COUNT" remarks="" type="INT">
</column>
<column name="TRIGGER_CODE" remarks="" type="INT">
</column>
<column name="TRIGGER_TYPE" remarks="" type="VARCHAR(30)">
</column>
<column name="TRIGGER_MSG" remarks="" type="TEXT(1048576)">
</column>
<column name="CREATE_TIME" remarks="" type="DATETIME">
</column>
</createTable>
</changeSet>
<!--输出实体[JOBS_INFO]外键关系 -->
<!--输出实体[JOBS_REGISTRY]外键关系 -->
<!--输出实体[JOBS_LOCK]外键关系 -->
<!--输出实体[JOBS_LOG]外键关系 -->
</databaseChangeLog>
...@@ -91,19 +91,17 @@ public class JobsInfoDTO extends DTOBase implements Serializable { ...@@ -91,19 +91,17 @@ public class JobsInfoDTO extends DTOBase implements Serializable {
* 属性 [LAST_TIME] * 属性 [LAST_TIME]
* *
*/ */
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JSONField(name = "last_time")
@JSONField(name = "last_time" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("last_time") @JsonProperty("last_time")
private Timestamp lastTime; private BigInteger lastTime;
/** /**
* 属性 [NEXT_TIME] * 属性 [NEXT_TIME]
* *
*/ */
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JSONField(name = "next_time")
@JSONField(name = "next_time" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("next_time") @JsonProperty("next_time")
private Timestamp nextTime; private BigInteger nextTime;
/** /**
* 属性 [AUTHOR] * 属性 [AUTHOR]
...@@ -207,7 +205,7 @@ public class JobsInfoDTO extends DTOBase implements Serializable { ...@@ -207,7 +205,7 @@ public class JobsInfoDTO extends DTOBase implements Serializable {
/** /**
* 设置 [LAST_TIME] * 设置 [LAST_TIME]
*/ */
public void setLastTime(Timestamp lastTime){ public void setLastTime(BigInteger lastTime){
this.lastTime = lastTime ; this.lastTime = lastTime ;
this.modify("last_time",lastTime); this.modify("last_time",lastTime);
} }
...@@ -215,7 +213,7 @@ public class JobsInfoDTO extends DTOBase implements Serializable { ...@@ -215,7 +213,7 @@ public class JobsInfoDTO extends DTOBase implements Serializable {
/** /**
* 设置 [NEXT_TIME] * 设置 [NEXT_TIME]
*/ */
public void setNextTime(Timestamp nextTime){ public void setNextTime(BigInteger nextTime){
this.nextTime = nextTime ; this.nextTime = nextTime ;
this.modify("next_time",nextTime); this.modify("next_time",nextTime);
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册