Commit 32268d5567694966331bf305c4ccb6608d09415d

Authored by guzijian
1 parent fbe36b68

feat: 签到报表导出场地

Bsth-admin/src/main/java/com/ruoyi/domain/DriverScheduling.java
... ... @@ -26,6 +26,7 @@ public class DriverScheduling {
26 26 private Integer alcoholFlag;
27 27 private BigDecimal alcoholIntake;
28 28 private String remark;
  29 + private String siteName;
29 30 /**
30 31 * 不是当前表的属性
31 32 */
... ...
Bsth-admin/src/main/java/com/ruoyi/pojo/response/ExportReportViewResponseVo.java
... ... @@ -55,6 +55,11 @@ public class ExportReportViewResponseVo {
55 55 @ColumnWidth(12)
56 56 private String nbbm;
57 57  
  58 + @ApiModelProperty("打卡场地")
  59 + @ExcelProperty(value = "打卡场地")
  60 + @ColumnWidth(14)
  61 + private String siteName;
  62 +
58 63 @ApiModelProperty("计划签到时间")
59 64 @ExcelProperty(value = "计划签到时间")
60 65 @ColumnWidth(20)
... ...
Bsth-admin/src/main/java/com/ruoyi/pojo/response/ReportDetailResponseVo.java
... ... @@ -19,6 +19,7 @@ public class ReportDetailResponseVo {
19 19 private String fleetName;
20 20 private String nbbm;
21 21 private String exString;
  22 + private String siteName;
22 23 /**
23 24 * 计划操作
24 25 */
... ...
Bsth-admin/src/main/resources/mapper/driver_scheduling/DriverSchedulingMapper.xml
... ... @@ -23,7 +23,7 @@
23 23 <result column="alcohol_flag" property="alcoholFlag" jdbcType="DATETIMEOFFSET"/>
24 24 <result column="alcohol_intake" property="alcoholIntake"/>
25 25 </resultMap>
26   - <insert id="insertRoster" parameterType="java.util.List" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
  26 + <insert id="insertRoster" parameterType="java.util.List" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
27 27 insert into scheduling (schedule_date,line_name,job_code,`name`,posts,lp_name,nbbm,bc_type,fcsj_t,zdsj_t)
28 28 values
29 29 <foreach collection="list" item="item" separator=",">
... ... @@ -45,34 +45,45 @@
45 45 </insert>
46 46 <update id="updateRoster">
47 47 update scheduling
48   - set sign_in_id = #{signInId},
49   - ex_type = #{exType},
50   - sign_time = #{signTime},
51   - remark = #{remark},
52   - sign_type = #{signType},
53   - alcohol_flag = #{alcoholFlag},
  48 + set sign_in_id = #{signInId},
  49 + ex_type = #{exType},
  50 + sign_time = #{signTime},
  51 + remark = #{remark},
  52 + sign_type = #{signType},
  53 + alcohol_flag = #{alcoholFlag},
54 54 alcohol_intake = #{alcoholIntake}
55 55 where id = #{scheduling.id}
56 56 </update>
57 57  
58 58 <select id="queryToDay" resultType="com.ruoyi.domain.DriverScheduling" resultMap="Scheduling">
59   - select scheduling.*,driver.fleet_name fleetName from
60   - scheduling left join driver on driver.job_code = scheduling.job_code
61   - where schedule_date = #{date}
62   - <if test="jobCode !=null and jobCode != ''">
63   - and scheduling.job_code = #{jobCode}
64   - </if>
65   - <if test="name !=null and name != ''">
66   - and `name` = #{name}
67   - </if>
68   - <if test="lineName !=null and lineName != ''">
69   - and scheduling.line_name like concat('%', #{lineName}, '%')
70   - </if>
  59 + select scheduling.*,driver.fleet_name fleetName,equipment.site_name siteName from
  60 + scheduling left join driver on scheduling.job_code = driver.job_code
  61 + left join sign_in on scheduling.sign_in_id = sign_in.id
  62 + left join equipment on equipment.device_id = sign_in.device_id
  63 + <where>
  64 + <if test="jobCode !=null and jobCode != ''">
  65 + and scheduling.job_code = #{jobCode}
  66 + </if>
  67 + <if test="name !=null and name != ''">
  68 + and `name` = #{name}
  69 + </if>
  70 + <if test="lineName !=null and lineName != ''">
  71 + and scheduling.line_name like concat('%', #{lineName}, '%')
  72 + </if>
  73 + <if test="date != null and date != ''">
  74 + and schedule_date = #{date}
  75 + </if>
  76 + </where>
  77 +
71 78  
72 79 </select>
73 80 <select id="queryByMonth" resultType="com.ruoyi.domain.DriverScheduling" resultMap="Scheduling">
74   - select scheduling.*,driver.fleet_name fleetName from
75   - scheduling left join driver on driver.job_code = scheduling.job_code
76   - where schedule_date &gt;= #{startDate} and schedule_date &lt;= #{endDate}
  81 + select scheduling.*, driver.fleet_name fleetName,equipment.site_name siteName
  82 + from scheduling
  83 + left join driver on driver.job_code = scheduling.job_code
  84 + left join sign_in on scheduling.sign_in_id = sign_in.id
  85 + left join equipment on equipment.device_id = sign_in.device_id
  86 + where schedule_date &gt;= #{startDate}
  87 + and schedule_date &lt;= #{endDate}
77 88 </select>
78 89 </mapper>
79 90 \ No newline at end of file
... ...