Explorar el Código

增加上下班时间

wukai hace 1 mes
padre
commit
9a6659486c

+ 10 - 0
jjt-biz/src/main/java/com/jjt/wkEmp/domain/TwinWkEmpRota.java

@@ -47,7 +47,17 @@ public class TwinWkEmpRota extends BaseEntity{
     @ApiModelProperty("班组")
     @Excel(name = "班组")
     private String empTeam;
+    /** 上班时间 */
+    @ApiModelProperty("上班时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "上班时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date inTime;
 
+    /** 下班时间 */
+    @ApiModelProperty("下班时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "下班时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date outTime;
     /** 机台号 */
     @ApiModelProperty("机台号")
     @Excel(name = "机台号")

+ 2 - 0
jjt-biz/src/main/java/com/jjt/wkEmp/service/impl/TwinWkEmpRotaServiceImpl.java

@@ -103,6 +103,8 @@ public class TwinWkEmpRotaServiceImpl implements ITwinWkEmpRotaService {
         rota.setEmpId(data.getId());
         rota.setEmpName(data.getName());
         rota.setEmpTeam(data.getTeam());
+        rota.setInTime(data.getIn());
+        rota.setOutTime(data.getOut());
         Set<Integer> deviceSet = new TreeSet<>();
         for (String s : data.getDevices()) {
             String id = s.replace("J", "");

+ 11 - 1
jjt-biz/src/main/resources/mapper/wkEmp/TwinWkEmpRotaMapper.xml

@@ -10,6 +10,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="empId"    column="EMP_ID"    />
         <result property="empName"    column="EMP_NAME"    />
         <result property="empTeam"    column="EMP_TEAM"    />
+        <result property="inTime"    column="IN_TIME"    />
+        <result property="outTime"    column="OUT_TIME"    />
         <result property="devices"    column="DEVICES"    />
         <result property="createdBy"    column="CREATED_BY"    />
         <result property="createdTime"    column="CREATED_TIME"    />
@@ -19,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTwinWkEmpRotaVo">
-        select SHIFT_ID, EMP_DATE, EMP_ID, EMP_NAME, EMP_TEAM, DEVICES, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, REMARK from TWIN_WK_EMP_ROTA
+        select SHIFT_ID, EMP_DATE, EMP_ID, EMP_NAME, EMP_TEAM, IN_TIME, OUT_TIME, DEVICES, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, REMARK from TWIN_WK_EMP_ROTA
     </sql>
 
     <select id="selectTwinWkEmpRotaList" parameterType="TwinWkEmpRota" resultMap="TwinWkEmpRotaResult">
@@ -29,6 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="empId != null  and empId != ''"> and EMP_ID = #{empId}</if>
             <if test="empName != null  and empName != ''"> and EMP_NAME like concat('%', #{empName}, '%')</if>
             <if test="empTeam != null  and empTeam != ''"> and EMP_TEAM = #{empTeam}</if>
+            <if test="inTime != null "> and IN_TIME = #{inTime}</if>
+            <if test="outTime != null "> and OUT_TIME = #{outTime}</if>
             <if test="devices != null  and devices != ''"> and DEVICES = #{devices}</if>
             <if test="createdBy != null  and createdBy != ''"> and CREATED_BY = #{createdBy}</if>
             <if test="createdTime != null "> and CREATED_TIME = #{createdTime}</if>
@@ -51,6 +55,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="empId != null">EMP_ID,</if>
             <if test="empName != null">EMP_NAME,</if>
             <if test="empTeam != null">EMP_TEAM,</if>
+            <if test="inTime != null">IN_TIME,</if>
+            <if test="outTime != null">OUT_TIME,</if>
             <if test="devices != null">DEVICES,</if>
             <if test="createdBy != null">CREATED_BY,</if>
             <if test="createdTime != null">CREATED_TIME,</if>
@@ -63,6 +69,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="empId != null">#{empId},</if>
             <if test="empName != null">#{empName},</if>
             <if test="empTeam != null">#{empTeam},</if>
+            <if test="inTime != null">#{inTime},</if>
+            <if test="outTime != null">#{outTime},</if>
             <if test="devices != null">#{devices},</if>
             <if test="createdBy != null">#{createdBy},</if>
             <if test="createdTime != null">#{createdTime},</if>
@@ -79,6 +87,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="empId != null">EMP_ID = #{empId},</if>
             <if test="empName != null">EMP_NAME = #{empName},</if>
             <if test="empTeam != null">EMP_TEAM = #{empTeam},</if>
+            <if test="inTime != null">IN_TIME = #{inTime},</if>
+            <if test="outTime != null">OUT_TIME = #{outTime},</if>
             <if test="devices != null">DEVICES = #{devices},</if>
             <if test="createdBy != null">CREATED_BY = #{createdBy},</if>
             <if test="createdTime != null">CREATED_TIME = #{createdTime},</if>