Commit 32268d5567694966331bf305c4ccb6608d09415d
1 parent
fbe36b68
feat: 签到报表导出场地
Showing
4 changed files
with
40 additions
and
22 deletions
Bsth-admin/src/main/java/com/ruoyi/domain/DriverScheduling.java
| @@ -26,6 +26,7 @@ public class DriverScheduling { | @@ -26,6 +26,7 @@ public class DriverScheduling { | ||
| 26 | private Integer alcoholFlag; | 26 | private Integer alcoholFlag; |
| 27 | private BigDecimal alcoholIntake; | 27 | private BigDecimal alcoholIntake; |
| 28 | private String remark; | 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,6 +55,11 @@ public class ExportReportViewResponseVo { | ||
| 55 | @ColumnWidth(12) | 55 | @ColumnWidth(12) |
| 56 | private String nbbm; | 56 | private String nbbm; |
| 57 | 57 | ||
| 58 | + @ApiModelProperty("打卡场地") | ||
| 59 | + @ExcelProperty(value = "打卡场地") | ||
| 60 | + @ColumnWidth(14) | ||
| 61 | + private String siteName; | ||
| 62 | + | ||
| 58 | @ApiModelProperty("计划签到时间") | 63 | @ApiModelProperty("计划签到时间") |
| 59 | @ExcelProperty(value = "计划签到时间") | 64 | @ExcelProperty(value = "计划签到时间") |
| 60 | @ColumnWidth(20) | 65 | @ColumnWidth(20) |
Bsth-admin/src/main/java/com/ruoyi/pojo/response/ReportDetailResponseVo.java
| @@ -19,6 +19,7 @@ public class ReportDetailResponseVo { | @@ -19,6 +19,7 @@ public class ReportDetailResponseVo { | ||
| 19 | private String fleetName; | 19 | private String fleetName; |
| 20 | private String nbbm; | 20 | private String nbbm; |
| 21 | private String exString; | 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,7 +23,7 @@ | ||
| 23 | <result column="alcohol_flag" property="alcoholFlag" jdbcType="DATETIMEOFFSET"/> | 23 | <result column="alcohol_flag" property="alcoholFlag" jdbcType="DATETIMEOFFSET"/> |
| 24 | <result column="alcohol_intake" property="alcoholIntake"/> | 24 | <result column="alcohol_intake" property="alcoholIntake"/> |
| 25 | </resultMap> | 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 | insert into scheduling (schedule_date,line_name,job_code,`name`,posts,lp_name,nbbm,bc_type,fcsj_t,zdsj_t) | 27 | insert into scheduling (schedule_date,line_name,job_code,`name`,posts,lp_name,nbbm,bc_type,fcsj_t,zdsj_t) |
| 28 | values | 28 | values |
| 29 | <foreach collection="list" item="item" separator=","> | 29 | <foreach collection="list" item="item" separator=","> |
| @@ -45,34 +45,45 @@ | @@ -45,34 +45,45 @@ | ||
| 45 | </insert> | 45 | </insert> |
| 46 | <update id="updateRoster"> | 46 | <update id="updateRoster"> |
| 47 | update scheduling | 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 | alcohol_intake = #{alcoholIntake} | 54 | alcohol_intake = #{alcoholIntake} |
| 55 | where id = #{scheduling.id} | 55 | where id = #{scheduling.id} |
| 56 | </update> | 56 | </update> |
| 57 | 57 | ||
| 58 | <select id="queryToDay" resultType="com.ruoyi.domain.DriverScheduling" resultMap="Scheduling"> | 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 | </select> | 79 | </select> |
| 73 | <select id="queryByMonth" resultType="com.ruoyi.domain.DriverScheduling" resultMap="Scheduling"> | 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 >= #{startDate} and schedule_date <= #{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 >= #{startDate} | ||
| 87 | + and schedule_date <= #{endDate} | ||
| 77 | </select> | 88 | </select> |
| 78 | </mapper> | 89 | </mapper> |
| 79 | \ No newline at end of file | 90 | \ No newline at end of file |