能源消耗比较
生成炉号
This commit is contained in:
2022-11-03 16:14:01 +08:00
parent 9d8b6c065f
commit d5464eed6c
16 changed files with 437 additions and 330 deletions

View File

@@ -21,9 +21,9 @@ public class MyGenerator {
/**
* 数据库地址
*/
static String dbUrl = "jdbc:mysql://mysql.picaiba.com:30307/mt_wms_qj";
static String dbUrl = "jdbc:mysql://localhost:3306/mt_wms_qj";
static String userName = "root";
static String password = "1qaz@WSX3edc$RFV";
static String password = "123456";
/**
* 是否去掉生成实体的属性名前缀
*/
@@ -106,7 +106,7 @@ public class MyGenerator {
@Test
public void generateCodeWithInjectConfigForAllTable() {
generateByTablesWithInjectConfig(new String[]{"t_auto_exe_task"});
generateByTablesWithInjectConfig(new String[]{"t_question_answer"});
}
public static void main(String[] args) {

View File

@@ -228,6 +228,12 @@ public class CurrTask extends Model<CurrTask> {
@TableField("process_type")
private Integer processType;
/**
* 炉号
*/
@TableField("stove_code")
private String stoveCode;
public static final String ID = "id";
@@ -297,6 +303,8 @@ public class CurrTask extends Model<CurrTask> {
public static final String PROCESS_TYPE = "process_type";
public static final String STOVE_CODE = "stove_code";
@Override
protected Serializable pkVal() {
return this.id;

View File

@@ -238,6 +238,12 @@ public class TaskHis extends Model<TaskHis> {
@TableField("task_id")
private Long taskId;
/**
* 炉号
*/
@TableField("stove_code")
private String stoveCode;
public static final String ID = "id";
public static final String VALID = "valid";
@@ -308,6 +314,8 @@ public class TaskHis extends Model<TaskHis> {
public static final String TASK_ID = "task_id";
public static final String STOVE_CODE = "stove_code";
@Override
protected Serializable pkVal() {
return this.id;

View File

@@ -50,6 +50,10 @@ public class CodeGeneratorHelper {
public static String getStoveCode(String kilnNameAndCraft) {
return IDGenerator.gen(kilnNameAndCraft, "yyMMdd", 2, STOVE_CODE);
}
public static String getStoveCode(String kilnName,String craft) {
return IDGenerator.gen(kilnName+"-"+craft+"-", "yyMMdd", 4,kilnName);
}
/**
* 生成自动任务编码
*