LiGuang 3 years ago
parent
commit
a82464311f

+ 2 - 1
jeecg-boot-module-demo/src/main/java/org/jeecg/modules/geke/shift/controller/ShiftController.java

@@ -118,7 +118,8 @@ public class ShiftController extends JeecgController<Shift, IShiftService> {
 	@ApiOperation(value="班次档案-编辑", notes="班次档案-编辑")
 	@ApiOperation(value="班次档案-编辑", notes="班次档案-编辑")
 	@PutMapping(value = "/edit")
 	@PutMapping(value = "/edit")
 	public Result<?> edit(@RequestBody Shift shift) {
 	public Result<?> edit(@RequestBody Shift shift) {
-		shiftService.updateById(shift);
+		shiftService.removeById(shift.getId());
+		shiftService.save(shift);
 		return Result.OK("编辑成功!");
 		return Result.OK("编辑成功!");
 	}
 	}
 	
 	

+ 15 - 0
jeecg-boot-module-demo/src/main/java/org/jeecg/modules/geke/shift/entity/Shift.java

@@ -48,6 +48,18 @@ public class Shift {
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "下班时间")
     @ApiModelProperty(value = "下班时间")
 	private java.util.Date endDate;
 	private java.util.Date endDate;
+	/**上班时间*/
+	@Excel(name = "上班时间", width = 20, format = "HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "上班时间")
+	private java.util.Date start2Date;
+	/**下班时间*/
+	@Excel(name = "下班时间", width = 20, format = "HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "下班时间")
+	private java.util.Date end2Date;
 	/**创建时间*/
 	/**创建时间*/
 	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd")
 	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd")
 	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
 	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@@ -69,4 +81,7 @@ public class Shift {
 	/**删除标记*/
 	/**删除标记*/
     @ApiModelProperty(value = "删除标记")
     @ApiModelProperty(value = "删除标记")
 	private java.lang.String delFlag;
 	private java.lang.String delFlag;
+	/**删除标记*/
+	@ApiModelProperty(value = "类型")
+	private java.lang.String shiftType;
 }
 }

+ 2 - 1
jeecg-boot-module-demo/src/main/java/org/jeecg/modules/geke/shift/mapper/xml/ShiftMapper.xml

@@ -17,7 +17,8 @@
 
 
     </select>
     </select>
     <select id="querys" resultType="java.util.Map">
     <select id="querys" resultType="java.util.Map">
-        select id,name,date_format(start_date,'%H:%i:%s') as 'startDate', date_format(end_date,'%H:%i:%s') as 'endDate' from geke_shift
+        select id,name,date_format(start_date,'%H:%i') as 'startDate', date_format(end_date,'%H:%i') as 'endDate',date_format(start2_date,'%H:%i') as 'start2Date', date_format(end2_date,'%H:%i') as 'end2Date',shift_type as 'shiftType'
+        from geke_shift
 
 
     </select>
     </select>
     <select id="lists" resultType="org.jeecg.modules.geke.shift.entity.Shift">
     <select id="lists" resultType="org.jeecg.modules.geke.shift.entity.Shift">