班组修改

This commit is contained in:
JinLu.Yin 2022-06-07 15:45:42 +08:00
parent d8b2d821b3
commit 3ec4fb7505
4 changed files with 15 additions and 16 deletions

View File

@ -79,8 +79,8 @@ create table cal_shift (
plan_id bigint(20) not null comment '计划ID', plan_id bigint(20) not null comment '计划ID',
order_num int(2) not null comment '序号', order_num int(2) not null comment '序号',
shift_name varchar(64) not null comment '班次名称', shift_name varchar(64) not null comment '班次名称',
start_time datetime not null comment '开始时间', start_time varchar(10) not null comment '开始时间',
end_time datetime not null comment '结束时间', end_time varchar(10) not null comment '结束时间',
remark varchar(500) default '' comment '备注', remark varchar(500) default '' comment '备注',
attr1 varchar(64) default null comment '预留字段1', attr1 varchar(64) default null comment '预留字段1',
attr2 varchar(255) default null comment '预留字段2', attr2 varchar(255) default null comment '预留字段2',

View File

@ -132,7 +132,7 @@ public class UserConstants
public static final String TRANSACTION_TYPE_MISC_ISSUE = "MISC_ISSUE"; //杂项出库 public static final String TRANSACTION_TYPE_MISC_ISSUE = "MISC_ISSUE"; //杂项出库
public static final String CAL_SHIFT_TYPE_SINGLE="SINGLE"; public static final String CAL_SHIFT_TYPE_SINGLE="SINGLE";
public static final String CAL_SHIFT_TYPE_TWO="TWO"; public static final String CAL_SHIFT_TYPE_TWO="SHIFT_TWO";
public static final String CAL_SHIFT_TYPE_THREE="THREE"; public static final String CAL_SHIFT_TYPE_THREE="SHIFT_THREE";
} }

View File

@ -90,10 +90,10 @@ public class CalShiftController extends BaseController
return AjaxResult.error("轮班方式为 白班 时只能有一个班次!"); return AjaxResult.error("轮班方式为 白班 时只能有一个班次!");
} }
if(UserConstants.CAL_SHIFT_TYPE_TWO.equals(plan.getShiftType())&&count>1){ if(UserConstants.CAL_SHIFT_TYPE_TWO.equals(plan.getShiftType())&&count>1){
return AjaxResult.error("轮班方式为 白班 时只能有两个班次!"); return AjaxResult.error("轮班方式为 两班倒 时只能有两个班次!");
} }
if(UserConstants.CAL_SHIFT_TYPE_THREE.equals(plan.getShiftType())&&count>2){ if(UserConstants.CAL_SHIFT_TYPE_THREE.equals(plan.getShiftType())&&count>2){
return AjaxResult.error("轮班方式为 白班 时只能有三个班次!"); return AjaxResult.error("轮班方式为 三班倒 时只能有三个班次!");
} }
return toAjax(calShiftService.insertCalShift(calShift)); return toAjax(calShiftService.insertCalShift(calShift));

View File

@ -33,14 +33,13 @@ public class CalShift extends BaseEntity
private String shiftName; private String shiftName;
/** 开始时间 */ /** 开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "开始时间")
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd") private String startTime;
private Date startTime;
/** 结束时间 */ /** 结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "结束时间")
private Date endTime; private String endTime;
/** 预留字段1 */ /** 预留字段1 */
private String attr1; private String attr1;
@ -90,21 +89,21 @@ public class CalShift extends BaseEntity
{ {
return shiftName; return shiftName;
} }
public void setStartTime(Date startTime) public void setStartTime(String startTime)
{ {
this.startTime = startTime; this.startTime = startTime;
} }
public Date getStartTime() public String getStartTime()
{ {
return startTime; return startTime;
} }
public void setEndTime(Date endTime) public void setEndTime(String endTime)
{ {
this.endTime = endTime; this.endTime = endTime;
} }
public Date getEndTime() public String getEndTime()
{ {
return endTime; return endTime;
} }