Commit 17f3bc80c8d7436890edfb66b9b7d8cdfa9dad48
1 parent
7069ce47
c
Showing
21 changed files
with
1298 additions
and
2 deletions
Bsth-admin/src/main/java/com/ruoyi/controller/dss/DriverHeartbeatController.java
0 → 100644
| 1 | +package com.ruoyi.controller.dss; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.common.core.controller.BaseController; | ||
| 4 | +import com.ruoyi.common.core.domain.AjaxResult; | ||
| 5 | +import io.swagger.annotations.Api; | ||
| 6 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 7 | +import org.springframework.web.bind.annotation.RestController; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @author liujun | ||
| 11 | + * @date 2024年06月25日 16:38 | ||
| 12 | + */ | ||
| 13 | +@RestController | ||
| 14 | +@RequestMapping("/dss/Driver/Heartbeat") | ||
| 15 | +@Api(tags = "【蓝斯一期】岗前设备报警信息") | ||
| 16 | +public class DriverHeartbeatController extends BaseController { | ||
| 17 | + public AjaxResult AddHeartbeat(){ | ||
| 18 | + | ||
| 19 | + } | ||
| 20 | +} |
Bsth-admin/src/main/java/com/ruoyi/controller/dss/KeyBoxController.java
0 → 100644
| 1 | +package com.ruoyi.controller.dss; | ||
| 2 | + | ||
| 3 | +import cn.hutool.core.convert.Convert; | ||
| 4 | +import com.alibaba.fastjson2.JSON; | ||
| 5 | +import com.ruoyi.common.core.controller.BaseController; | ||
| 6 | +import com.ruoyi.common.core.domain.AjaxResult; | ||
| 7 | +import com.ruoyi.common.utils.StringUtils; | ||
| 8 | +import com.ruoyi.domain.caiinfo.CarInfo; | ||
| 9 | +import com.ruoyi.domain.driver.NewDriver; | ||
| 10 | +import com.ruoyi.domain.equipment.linke.log.LingangEquipmentLinkeLog; | ||
| 11 | +import com.ruoyi.domain.keyInfo.KeyInfo; | ||
| 12 | +import com.ruoyi.domain.keyInfo.box.dto.KeyBoxQueryDTO; | ||
| 13 | +import com.ruoyi.domain.keyInfo.box.vo.KeyBoxVo; | ||
| 14 | +import com.ruoyi.domain.lin.gang.LingangScheduling; | ||
| 15 | +import com.ruoyi.equipment.domain.Equipment; | ||
| 16 | +import com.ruoyi.equipment.service.IEquipmentService; | ||
| 17 | +import com.ruoyi.in.domain.SignIn; | ||
| 18 | +import com.ruoyi.in.service.ISignInService; | ||
| 19 | +import com.ruoyi.service.SchedulingService; | ||
| 20 | +import com.ruoyi.service.carinfo.CarInfoService; | ||
| 21 | +import com.ruoyi.service.dss.KeyBoxVoService; | ||
| 22 | +import com.ruoyi.service.equipment.linke.log.LingangEquipmentLinkeLogService; | ||
| 23 | +import com.ruoyi.service.keyinfo.KeyInfoService; | ||
| 24 | +import com.ruoyi.service.lin.gang.LingangSchedulingService; | ||
| 25 | +import com.ruoyi.utils.DateUtil; | ||
| 26 | +import io.swagger.annotations.Api; | ||
| 27 | +import io.swagger.annotations.ApiOperation; | ||
| 28 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 29 | +import org.springframework.web.bind.annotation.PostMapping; | ||
| 30 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 31 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 32 | +import org.springframework.web.bind.annotation.RestController; | ||
| 33 | + | ||
| 34 | +import java.text.MessageFormat; | ||
| 35 | +import java.util.Date; | ||
| 36 | +import java.util.List; | ||
| 37 | +import java.util.Objects; | ||
| 38 | + | ||
| 39 | +/** | ||
| 40 | + * @author liujun | ||
| 41 | + * @date 2024年06月25日 13:04 | ||
| 42 | + */ | ||
| 43 | +@RestController | ||
| 44 | +@RequestMapping("/dss/keybox") | ||
| 45 | +@Api(tags = "【蓝斯一期】钥匙信息") | ||
| 46 | +public class KeyBoxController extends BaseController { | ||
| 47 | + | ||
| 48 | + @Autowired | ||
| 49 | + private LingangEquipmentLinkeLogService lingangEquipmentLinkeLogService; | ||
| 50 | + | ||
| 51 | + @Autowired | ||
| 52 | + private KeyBoxVoService keyBoxVoService; | ||
| 53 | + | ||
| 54 | + @PostMapping(value = "/findKey") | ||
| 55 | + @ApiOperation("钥匙信息查询") | ||
| 56 | + public AjaxResult listSelect(@RequestBody KeyBoxQueryDTO request) { | ||
| 57 | + LingangEquipmentLinkeLog linkeLog = saveLog(request); | ||
| 58 | + | ||
| 59 | + return keyBoxVoService.listSelect(request,linkeLog); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + /*** | ||
| 63 | + * 保存链接日志 | ||
| 64 | + * @author liujun | ||
| 65 | + * @date 2024/6/25 15:24 | ||
| 66 | + * @param request | ||
| 67 | + * @return com.ruoyi.domain.equipment.linke.log.LingangEquipmentLinkeLog | ||
| 68 | + */ | ||
| 69 | + private LingangEquipmentLinkeLog saveLog(KeyBoxQueryDTO request) { | ||
| 70 | + LingangEquipmentLinkeLog linkeLog = new LingangEquipmentLinkeLog(); | ||
| 71 | + linkeLog.setDevice(request.getDevice()); | ||
| 72 | + linkeLog.setCreateTime(new Date()); | ||
| 73 | + linkeLog.setPassingReferences(JSON.toJSONString(request)); | ||
| 74 | + linkeLog.setUrl("/dss/keybox/findKey"); | ||
| 75 | + | ||
| 76 | + lingangEquipmentLinkeLogService.save(linkeLog); | ||
| 77 | + return linkeLog; | ||
| 78 | + } | ||
| 79 | +} |
Bsth-admin/src/main/java/com/ruoyi/domain/caiinfo/CarInfo.java
| @@ -63,6 +63,7 @@ public class CarInfo { | @@ -63,6 +63,7 @@ public class CarInfo { | ||
| 63 | private java.util.Date updateTime; | 63 | private java.util.Date updateTime; |
| 64 | 64 | ||
| 65 | 65 | ||
| 66 | + | ||
| 66 | @Override | 67 | @Override |
| 67 | public String toString() { | 68 | public String toString() { |
| 68 | return com.alibaba.fastjson2.JSON.toJSONString(this); | 69 | return com.alibaba.fastjson2.JSON.toJSONString(this); |
Bsth-admin/src/main/java/com/ruoyi/domain/equipment/linke/log/LingangEquipmentLinkeLog.java
0 → 100644
| 1 | +package com.ruoyi.domain.equipment.linke.log; | ||
| 2 | + | ||
| 3 | +import lombok.Data; | ||
| 4 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
| 5 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
| 6 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
| 7 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
| 8 | +import org.apache.commons.lang3.StringUtils; | ||
| 9 | +import lombok.EqualsAndHashCode; | ||
| 10 | +import lombok.experimental.Accessors; | ||
| 11 | +import lombok.extern.slf4j.Slf4j; | ||
| 12 | +import com.ruoyi.common.annotation.Excel; | ||
| 13 | + | ||
| 14 | +@Data | ||
| 15 | +@Slf4j | ||
| 16 | +@Accessors(chain = true) | ||
| 17 | +@EqualsAndHashCode(callSuper = false) | ||
| 18 | +@TableName("equipment_linke_log") | ||
| 19 | +/**设备链接日志 实体*/ | ||
| 20 | +public class LingangEquipmentLinkeLog { | ||
| 21 | + /***设备链接日志*/ | ||
| 22 | + @TableId(value = "id", type = IdType.AUTO) | ||
| 23 | + @Excel(name = "设备链接日志") | ||
| 24 | + private java.lang.Long id; | ||
| 25 | + | ||
| 26 | + | ||
| 27 | + /***传参*/ | ||
| 28 | + @Excel(name = "传参") | ||
| 29 | + private java.lang.String passingReferences; | ||
| 30 | + | ||
| 31 | + | ||
| 32 | + /***设备*/ | ||
| 33 | + @Excel(name = "设备") | ||
| 34 | + private java.lang.String device; | ||
| 35 | + | ||
| 36 | + | ||
| 37 | + /***创建时间*/ | ||
| 38 | + @Excel(name = "创建时间") | ||
| 39 | + private java.util.Date createTime; | ||
| 40 | + | ||
| 41 | + | ||
| 42 | + /***状态;*/ | ||
| 43 | + @Excel(name = "状态;") | ||
| 44 | + private java.lang.Integer status; | ||
| 45 | + | ||
| 46 | + | ||
| 47 | + /***修改时间*/ | ||
| 48 | + @Excel(name = "修改时间") | ||
| 49 | + private java.util.Date updateTime; | ||
| 50 | + | ||
| 51 | + /***执行结果*/ | ||
| 52 | + @Excel(name = "执行结果") | ||
| 53 | + private java.lang.String result; | ||
| 54 | + | ||
| 55 | + /***请求的URL*/ | ||
| 56 | + @Excel(name = "请求的URL") | ||
| 57 | + private java.lang.String url; | ||
| 58 | + | ||
| 59 | + | ||
| 60 | + @Override | ||
| 61 | + public String toString() { | ||
| 62 | + return com.alibaba.fastjson2.JSON.toJSONString(this); | ||
| 63 | + } | ||
| 64 | +} | ||
| 0 | \ No newline at end of file | 65 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/domain/keyInfo/KeyInfo.java
Bsth-admin/src/main/java/com/ruoyi/domain/keyInfo/box/dto/KeyBoxQueryDTO.java
0 → 100644
| 1 | +package com.ruoyi.domain.keyInfo.box.dto; | ||
| 2 | + | ||
| 3 | +import io.swagger.annotations.ApiModel; | ||
| 4 | +import io.swagger.annotations.ApiModelProperty; | ||
| 5 | +import lombok.Data; | ||
| 6 | +import lombok.EqualsAndHashCode; | ||
| 7 | +import lombok.experimental.Accessors; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @author liujun | ||
| 11 | + * @date 2024年06月25日 13:22 | ||
| 12 | + */ | ||
| 13 | +@Data | ||
| 14 | +@ApiModel(value = "钥匙信息查询DTO") | ||
| 15 | +@Accessors(chain = true) | ||
| 16 | +@EqualsAndHashCode(callSuper = false) | ||
| 17 | +public class KeyBoxQueryDTO implements java.io.Serializable { | ||
| 18 | + | ||
| 19 | + private static final long serialVersionUID = -1865377310922939750L; | ||
| 20 | + @ApiModelProperty(value = "设备号", required = true) | ||
| 21 | + private String device; | ||
| 22 | + @ApiModelProperty(value = "设备类型", required = true) | ||
| 23 | + private String deviceType; | ||
| 24 | + @ApiModelProperty(value = "司机卡号", required = true) | ||
| 25 | + private String driverCode; | ||
| 26 | + @ApiModelProperty(value = "工号", required = true) | ||
| 27 | + private String staffCode; | ||
| 28 | + @ApiModelProperty(value = "时间", required = true) | ||
| 29 | + private String time; | ||
| 30 | + @ApiModelProperty(value = "类型:0签到上报获取,1签退归还获取", required = true) | ||
| 31 | + private String eventType; | ||
| 32 | +} |
Bsth-admin/src/main/java/com/ruoyi/domain/keyInfo/box/vo/KeyBoxVo.java
0 → 100644
| 1 | +package com.ruoyi.domain.keyInfo.box.vo; | ||
| 2 | + | ||
| 3 | +import io.swagger.annotations.ApiModel; | ||
| 4 | +import io.swagger.annotations.ApiModelProperty; | ||
| 5 | +import lombok.Data; | ||
| 6 | +import lombok.EqualsAndHashCode; | ||
| 7 | +import lombok.experimental.Accessors; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @author liujun | ||
| 11 | + * @date 2024年06月25日 13:26 | ||
| 12 | + */ | ||
| 13 | +@Data | ||
| 14 | +@ApiModel(value = "钥匙信息查询Vo") | ||
| 15 | +@Accessors(chain = true) | ||
| 16 | +@EqualsAndHashCode(callSuper = false) | ||
| 17 | +public class KeyBoxVo implements java.io.Serializable { | ||
| 18 | + | ||
| 19 | + private static final long serialVersionUID = -8828667737136648188L; | ||
| 20 | + @ApiModelProperty(value = "钥匙所在场站ID") | ||
| 21 | + private String yardId; | ||
| 22 | + @ApiModelProperty(value = "钥匙所在场站名称") | ||
| 23 | + private String yardName; | ||
| 24 | + @ApiModelProperty(value = "设备号null表示没钥匙操作记录") | ||
| 25 | + private String device; | ||
| 26 | + @ApiModelProperty(value = "设备名称") | ||
| 27 | + private String deviceName; | ||
| 28 | + @ApiModelProperty(value = "钥匙位") | ||
| 29 | + private String cabinetNo; | ||
| 30 | + @ApiModelProperty(value = "车位号") | ||
| 31 | + private String parkingNo; | ||
| 32 | + @ApiModelProperty(value = "车牌号") | ||
| 33 | + private String plateNum; | ||
| 34 | +} |
Bsth-admin/src/main/java/com/ruoyi/domain/lin/gang/LingangScheduling.java
0 → 100644
| 1 | +package com.ruoyi.domain.lin.gang; | ||
| 2 | + | ||
| 3 | +import lombok.Data; | ||
| 4 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
| 5 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
| 6 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
| 7 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
| 8 | +import org.apache.commons.lang3.StringUtils; | ||
| 9 | +import lombok.EqualsAndHashCode; | ||
| 10 | +import lombok.experimental.Accessors; | ||
| 11 | +import lombok.extern.slf4j.Slf4j; | ||
| 12 | +import com.ruoyi.common.annotation.Excel; | ||
| 13 | + | ||
| 14 | +@Data | ||
| 15 | +@Slf4j | ||
| 16 | +@Accessors(chain = true) | ||
| 17 | +@EqualsAndHashCode(callSuper = false) | ||
| 18 | +@TableName("scheduling") | ||
| 19 | +/** 实体*/ | ||
| 20 | +public class LingangScheduling { | ||
| 21 | + /***主键*/ | ||
| 22 | + @TableId(value = "id", type = IdType.AUTO) | ||
| 23 | + @Excel(name = "主键") | ||
| 24 | + private Integer id; | ||
| 25 | + | ||
| 26 | + | ||
| 27 | + /***排班日期*/ | ||
| 28 | + @Excel(name = "排班日期") | ||
| 29 | + private java.time.LocalDate scheduleDate; | ||
| 30 | + | ||
| 31 | + | ||
| 32 | + /***线路名称*/ | ||
| 33 | + @Excel(name = "线路名称") | ||
| 34 | + private String lineName; | ||
| 35 | + | ||
| 36 | + | ||
| 37 | + /***工号*/ | ||
| 38 | + @Excel(name = "工号") | ||
| 39 | + private String jobCode; | ||
| 40 | + | ||
| 41 | + | ||
| 42 | + /***姓名*/ | ||
| 43 | + @Excel(name = "姓名") | ||
| 44 | + private String name; | ||
| 45 | + | ||
| 46 | + | ||
| 47 | + /***工种*/ | ||
| 48 | + @Excel(name = "工种") | ||
| 49 | + private String posts; | ||
| 50 | + | ||
| 51 | + | ||
| 52 | + /***路牌*/ | ||
| 53 | + @Excel(name = "路牌") | ||
| 54 | + private String lpName; | ||
| 55 | + | ||
| 56 | + | ||
| 57 | + /***车辆自编号*/ | ||
| 58 | + @Excel(name = "车辆自编号") | ||
| 59 | + private String nbbm; | ||
| 60 | + | ||
| 61 | + | ||
| 62 | + /***班次类型*/ | ||
| 63 | + @Excel(name = "班次类型") | ||
| 64 | + private String bcType; | ||
| 65 | + | ||
| 66 | + | ||
| 67 | + /***发车时间*/ | ||
| 68 | + @Excel(name = "发车时间") | ||
| 69 | + private Long fcsjT; | ||
| 70 | + | ||
| 71 | + | ||
| 72 | + /***到站时间*/ | ||
| 73 | + @Excel(name = "到站时间") | ||
| 74 | + private Long zdsjT; | ||
| 75 | + | ||
| 76 | + | ||
| 77 | + /***签到表id*/ | ||
| 78 | + @Excel(name = "签到表id") | ||
| 79 | + private Long signInId; | ||
| 80 | + | ||
| 81 | + | ||
| 82 | + /***记录状态*/ | ||
| 83 | + @Excel(name = "记录状态") | ||
| 84 | + private Integer exType; | ||
| 85 | + | ||
| 86 | + | ||
| 87 | + /***打卡时间*/ | ||
| 88 | + @Excel(name = "打卡时间") | ||
| 89 | + private java.util.Date signTime; | ||
| 90 | + | ||
| 91 | + | ||
| 92 | + /***打卡类型*/ | ||
| 93 | + @Excel(name = "打卡类型") | ||
| 94 | + private Integer signType; | ||
| 95 | + | ||
| 96 | + | ||
| 97 | + /***是否酒精测试*/ | ||
| 98 | + @Excel(name = "是否酒精测试") | ||
| 99 | + private Integer alcoholFlag; | ||
| 100 | + | ||
| 101 | + | ||
| 102 | + /***酒精测试含量*/ | ||
| 103 | + @Excel(name = "酒精测试含量") | ||
| 104 | + private java.math.BigDecimal alcoholIntake; | ||
| 105 | + | ||
| 106 | + | ||
| 107 | + /***原因*/ | ||
| 108 | + @Excel(name = "原因") | ||
| 109 | + private String remark; | ||
| 110 | + | ||
| 111 | + /***钥匙ID*/ | ||
| 112 | + @Excel(name = "钥匙ID") | ||
| 113 | + private java.lang.Integer keyInfoId; | ||
| 114 | + | ||
| 115 | + | ||
| 116 | + @Override | ||
| 117 | + public String toString() { | ||
| 118 | + return com.alibaba.fastjson2.JSON.toJSONString(this); | ||
| 119 | + } | ||
| 120 | +} | ||
| 0 | \ No newline at end of file | 121 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/mapper/equipment/linke/log/LingangEquipmentLinkeLogMapper.java
0 → 100644
| 1 | +package com.ruoyi.mapper.equipment.linke.log; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.domain.equipment.linke.log.LingangEquipmentLinkeLog; | ||
| 4 | +import org.apache.ibatis.annotations.Mapper; | ||
| 5 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
| 6 | + | ||
| 7 | + | ||
| 8 | +@Mapper | ||
| 9 | +/**设备链接日志 Mapper接口*/ | ||
| 10 | +public interface LingangEquipmentLinkeLogMapper extends BaseMapper<LingangEquipmentLinkeLog> { | ||
| 11 | + /**插入有值的列 */ | ||
| 12 | + int insertSelective(LingangEquipmentLinkeLog name); | ||
| 13 | + | ||
| 14 | + int udpateMsgStatusResultById(LingangEquipmentLinkeLog linkeLog); | ||
| 15 | +} | ||
| 0 | \ No newline at end of file | 16 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/mapper/lin/gang/LingangSchedulingMapper.java
0 → 100644
| 1 | +package com.ruoyi.mapper.lin.gang; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.domain.lin.gang.LingangScheduling; | ||
| 4 | +import org.apache.ibatis.annotations.Mapper; | ||
| 5 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
| 6 | + | ||
| 7 | + | ||
| 8 | +@Mapper | ||
| 9 | +/** Mapper接口*/ | ||
| 10 | +public interface LingangSchedulingMapper extends BaseMapper<LingangScheduling> { | ||
| 11 | + /**插入有值的列 */ | ||
| 12 | + int insertSelective(LingangScheduling name); | ||
| 13 | +} | ||
| 0 | \ No newline at end of file | 14 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/service/carinfo/CarInfoService.java
| @@ -31,6 +31,14 @@ public interface CarInfoService extends IService<CarInfo> { | @@ -31,6 +31,14 @@ public interface CarInfoService extends IService<CarInfo> { | ||
| 31 | * 条件查询只返回一条数据的方法 | 31 | * 条件查询只返回一条数据的方法 |
| 32 | */ | 32 | */ |
| 33 | CarInfo getOne(CarInfo entity); | 33 | CarInfo getOne(CarInfo entity); |
| 34 | + /*** | ||
| 35 | + *根据车牌号查询车辆信息 | ||
| 36 | + * @author liujun | ||
| 37 | + * @date 2024/6/25 14:59 | ||
| 38 | + * @param plateNum | ||
| 39 | + * @return com.ruoyi.domain.caiinfo.CarInfo | ||
| 40 | + */ | ||
| 41 | + CarInfo getOneByPlateNum(String plateNum); | ||
| 34 | 42 | ||
| 35 | Integer countId(CarInfo entity); | 43 | Integer countId(CarInfo entity); |
| 36 | 44 |
Bsth-admin/src/main/java/com/ruoyi/service/dss/KeyBoxVoService.java
0 → 100644
| 1 | +package com.ruoyi.service.dss; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.common.core.domain.AjaxResult; | ||
| 4 | +import com.ruoyi.domain.equipment.linke.log.LingangEquipmentLinkeLog; | ||
| 5 | +import com.ruoyi.domain.keyInfo.box.dto.KeyBoxQueryDTO; | ||
| 6 | + | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * @author liujun | ||
| 10 | + * @date 2024年06月25日 15:17 | ||
| 11 | + */ | ||
| 12 | +public interface KeyBoxVoService { | ||
| 13 | + /**钥匙信息查询*/ | ||
| 14 | + AjaxResult listSelect( KeyBoxQueryDTO request, LingangEquipmentLinkeLog linkeLog); | ||
| 15 | +} |
Bsth-admin/src/main/java/com/ruoyi/service/equipment/linke/log/LingangEquipmentLinkeLogService.java
0 → 100644
| 1 | +package com.ruoyi.service.equipment.linke.log; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.extension.service.IService; | ||
| 4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
| 5 | + | ||
| 6 | +import java.util.List; | ||
| 7 | + | ||
| 8 | +import com.ruoyi.domain.OrderEntity; | ||
| 9 | +import com.ruoyi.domain.equipment.linke.log.LingangEquipmentLinkeLog; | ||
| 10 | + | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 设备链接日志 Service接口 | ||
| 14 | + */ | ||
| 15 | +public interface LingangEquipmentLinkeLogService extends IService<LingangEquipmentLinkeLog> { | ||
| 16 | + /** | ||
| 17 | + * 分页查询 | ||
| 18 | + */ | ||
| 19 | + IPage<LingangEquipmentLinkeLog> pageList(com.baomidou.mybatisplus.extension.plugins.pagination.Page<LingangEquipmentLinkeLog> page, LingangEquipmentLinkeLog entity, OrderEntity orderEntity); | ||
| 20 | + | ||
| 21 | + /** | ||
| 22 | + * 带条件查询 | ||
| 23 | + */ | ||
| 24 | + List<LingangEquipmentLinkeLog> list(LingangEquipmentLinkeLog entity); | ||
| 25 | + | ||
| 26 | + | ||
| 27 | + /** | ||
| 28 | + * 条件查询只返回一条数据的方法 | ||
| 29 | + */ | ||
| 30 | + LingangEquipmentLinkeLog getOne(LingangEquipmentLinkeLog entity); | ||
| 31 | + | ||
| 32 | + Integer countId(LingangEquipmentLinkeLog entity); | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 插入有值的列 | ||
| 36 | + */ | ||
| 37 | + int insertSelective(LingangEquipmentLinkeLog entity); | ||
| 38 | + | ||
| 39 | + /***插入数据*/ | ||
| 40 | + boolean insert(LingangEquipmentLinkeLog entity); | ||
| 41 | + | ||
| 42 | + /** | ||
| 43 | + * 根据主键修改数据 | ||
| 44 | + */ | ||
| 45 | + boolean updateByPrimaryKey(LingangEquipmentLinkeLog entity); | ||
| 46 | + | ||
| 47 | + boolean updateByPrimaryKey(LingangEquipmentLinkeLog linkeLog,String msg,Integer status); | ||
| 48 | + | ||
| 49 | + boolean deleteById(Long id); | ||
| 50 | +} | ||
| 0 | \ No newline at end of file | 51 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/service/impl/carinfo/CarInfoServiceImpl.java
| @@ -85,6 +85,13 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl | @@ -85,6 +85,13 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl | ||
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | @Override | 87 | @Override |
| 88 | + public CarInfo getOneByPlateNum(String plateNum) { | ||
| 89 | + CarInfo carInfo = new CarInfo(); | ||
| 90 | + carInfo.setPlateNum(plateNum); | ||
| 91 | + return getOne(carInfo); | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + @Override | ||
| 88 | public Integer countId(CarInfo entity) { | 95 | public Integer countId(CarInfo entity) { |
| 89 | LambdaQueryWrapper<CarInfo> wrapper = new LambdaQueryWrapper<>(entity); | 96 | LambdaQueryWrapper<CarInfo> wrapper = new LambdaQueryWrapper<>(entity); |
| 90 | wrapper.select(CarInfo::getId); | 97 | wrapper.select(CarInfo::getId); |
Bsth-admin/src/main/java/com/ruoyi/service/impl/dss/KeyBoxVoServiceImpl.java
0 → 100644
| 1 | +package com.ruoyi.service.impl.dss; | ||
| 2 | + | ||
| 3 | +import cn.hutool.core.convert.Convert; | ||
| 4 | +import com.ruoyi.common.constant.HttpStatus; | ||
| 5 | +import com.ruoyi.common.core.domain.AjaxResult; | ||
| 6 | +import com.ruoyi.common.utils.StringUtils; | ||
| 7 | +import com.ruoyi.domain.caiinfo.CarInfo; | ||
| 8 | +import com.ruoyi.domain.equipment.linke.log.LingangEquipmentLinkeLog; | ||
| 9 | +import com.ruoyi.domain.keyInfo.KeyInfo; | ||
| 10 | +import com.ruoyi.domain.keyInfo.box.dto.KeyBoxQueryDTO; | ||
| 11 | +import com.ruoyi.domain.keyInfo.box.vo.KeyBoxVo; | ||
| 12 | +import com.ruoyi.domain.lin.gang.LingangScheduling; | ||
| 13 | +import com.ruoyi.equipment.domain.Equipment; | ||
| 14 | +import com.ruoyi.equipment.service.IEquipmentService; | ||
| 15 | +import com.ruoyi.in.domain.SignIn; | ||
| 16 | +import com.ruoyi.in.service.ISignInService; | ||
| 17 | +import com.ruoyi.service.carinfo.CarInfoService; | ||
| 18 | +import com.ruoyi.service.dss.KeyBoxVoService; | ||
| 19 | +import com.ruoyi.service.equipment.linke.log.LingangEquipmentLinkeLogService; | ||
| 20 | +import com.ruoyi.service.keyinfo.KeyInfoService; | ||
| 21 | +import com.ruoyi.service.lin.gang.LingangSchedulingService; | ||
| 22 | +import com.ruoyi.utils.DateUtil; | ||
| 23 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 24 | +import org.springframework.stereotype.Service; | ||
| 25 | + | ||
| 26 | +import java.text.MessageFormat; | ||
| 27 | +import java.util.Objects; | ||
| 28 | + | ||
| 29 | +/** | ||
| 30 | + * @author liujun | ||
| 31 | + * @date 2024年06月25日 15:18 | ||
| 32 | + */ | ||
| 33 | +@Service | ||
| 34 | +public class KeyBoxVoServiceImpl implements KeyBoxVoService { | ||
| 35 | + @Autowired | ||
| 36 | + private KeyInfoService keyInfoService; | ||
| 37 | + @Autowired | ||
| 38 | + private LingangSchedulingService lingangSchedulingService; | ||
| 39 | + @Autowired | ||
| 40 | + private ISignInService signInService; | ||
| 41 | + @Autowired | ||
| 42 | + private IEquipmentService iEquipmentService; | ||
| 43 | + @Autowired | ||
| 44 | + private CarInfoService carInfoService; | ||
| 45 | + @Autowired | ||
| 46 | + private LingangEquipmentLinkeLogService lingangEquipmentLinkeLogService; | ||
| 47 | + | ||
| 48 | + @Override | ||
| 49 | + public AjaxResult listSelect(KeyBoxQueryDTO request, LingangEquipmentLinkeLog linkeLog) { | ||
| 50 | + LingangScheduling lingangScheduling = queryScheduling(request); | ||
| 51 | + if (Objects.isNull(lingangScheduling)) { | ||
| 52 | + String msg = MessageFormat.format("工号[{0}]在[{1}]没有排班信息", request.getStaffCode(), request.getTime()); | ||
| 53 | + linkeLog.setStatus(HttpStatus.ERROR); | ||
| 54 | + linkeLog.setResult(msg); | ||
| 55 | + lingangEquipmentLinkeLogService.updateByPrimaryKey(linkeLog); | ||
| 56 | + | ||
| 57 | + return AjaxResult.error(msg); | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + SignIn signIn = querySignIn(lingangScheduling.getSignInId()); | ||
| 61 | + if (Objects.isNull(signIn)) { | ||
| 62 | + lingangEquipmentLinkeLogService.updateByPrimaryKey(linkeLog, MessageFormat.format("工号[{0}]在[{1}]没有签到或签退信息;[{2}]", request.getStaffCode(), request.getTime(), lingangScheduling.getSignInId()), HttpStatus.ERROR); | ||
| 63 | + | ||
| 64 | + | ||
| 65 | + return AjaxResult.error(MessageFormat.format("工号[{0}]在[{1}]没有签到或签退信息", request.getStaffCode(), request.getTime())); | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + KeyInfo keyInfo = queryKeyInfo(lingangScheduling.getKeyInfoId()); | ||
| 69 | + if (Objects.isNull(keyInfo)) { | ||
| 70 | + lingangEquipmentLinkeLogService.updateByPrimaryKey(linkeLog, MessageFormat.format("工号[{0}]在[{1}]没有分配钥匙;[{2}]", request.getStaffCode(), request.getTime(), lingangScheduling.getKeyInfoId()), HttpStatus.ERROR); | ||
| 71 | + | ||
| 72 | + | ||
| 73 | + return AjaxResult.error(MessageFormat.format("工号[{0}]在[{1}]没有分配钥匙", request.getStaffCode(), request.getTime())); | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + | ||
| 77 | + Equipment equipment = queryEquipment(Convert.toLong(signIn.getDeviceId())); | ||
| 78 | + if (Objects.isNull(equipment)) { | ||
| 79 | + lingangEquipmentLinkeLogService.updateByPrimaryKey(linkeLog, MessageFormat.format("工号[{0}]在[{1}]找不到设备信息;[{2}]", request.getStaffCode(), request.getTime(), signIn.getDeviceId()), HttpStatus.ERROR); | ||
| 80 | + | ||
| 81 | + return AjaxResult.error(MessageFormat.format("工号[{0}]在[{1}]找不到设备信息", request.getStaffCode(), request.getTime())); | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + CarInfo carInfo = queryCarInfo(lingangScheduling.getNbbm()); | ||
| 85 | + if (Objects.isNull(carInfo)) { | ||
| 86 | + lingangEquipmentLinkeLogService.updateByPrimaryKey(linkeLog, MessageFormat.format("工号[{0}]在[{1}]找不到设备信息;[{2}]", request.getStaffCode(), request.getTime(), lingangScheduling.getNbbm()), HttpStatus.ERROR); | ||
| 87 | + | ||
| 88 | + | ||
| 89 | + return AjaxResult.error(MessageFormat.format("工号[{0}]在[{1}]找不到车辆信息", request.getStaffCode(), request.getTime())); | ||
| 90 | + } | ||
| 91 | + KeyBoxVo keyBoxVo = new KeyBoxVo(); | ||
| 92 | + keyBoxVo.setCabinetNo(Convert.toStr(keyInfo.getCabinetno())); | ||
| 93 | +// keyBoxVo.setDevice(""); | ||
| 94 | + keyBoxVo.setDeviceName(equipment.getSiteName()); | ||
| 95 | +// keyBoxVo.setYardId(Convert.toStr(keyInfo.getYardId())); | ||
| 96 | +// keyBoxVo.setYardName(Convert.toStr(keyInfo.getS())); | ||
| 97 | + keyBoxVo.setPlateNum(lingangScheduling.getNbbm()); | ||
| 98 | + keyBoxVo.setParkingNo(carInfo.getParkingNo()); | ||
| 99 | + | ||
| 100 | + lingangEquipmentLinkeLogService.updateByPrimaryKey(linkeLog, null, HttpStatus.SUCCESS); | ||
| 101 | + return AjaxResult.success(keyBoxVo); | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + | ||
| 105 | + /*** | ||
| 106 | + * 根据时间和司机工号查询排班信息 | ||
| 107 | + * @author liujun | ||
| 108 | + * @date 2024/6/25 14:07 | ||
| 109 | + * @param request | ||
| 110 | + * @return com.ruoyi.domain.lin.gang.LingangScheduling | ||
| 111 | + */ | ||
| 112 | + private LingangScheduling queryScheduling(KeyBoxQueryDTO request) { | ||
| 113 | + LingangScheduling lingangScheduling = new LingangScheduling(); | ||
| 114 | + lingangScheduling.setScheduleDate(DateUtil.parseLocalDate(request.getTime())); | ||
| 115 | + lingangScheduling.setJobCode(request.getStaffCode()); | ||
| 116 | + if(StringUtils.equals(request.getEventType(), "0")){ | ||
| 117 | + lingangScheduling.setSignType(1); | ||
| 118 | + }else if(StringUtils.equals(request.getEventType(), "1")){ | ||
| 119 | + lingangScheduling.setSignType(2); | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + return lingangSchedulingService.getOne(lingangScheduling); | ||
| 123 | + | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + /*** | ||
| 127 | + * 查询签到信息 | ||
| 128 | + * @author liujun | ||
| 129 | + * @date 2024/6/25 14:30 | ||
| 130 | + * @param signInId 签到ID | ||
| 131 | + * @return com.ruoyi.in.domain.SignIn | ||
| 132 | + */ | ||
| 133 | + private SignIn querySignIn(Long signInId) { | ||
| 134 | + return signInService.selectSignInById(signInId); | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + /*** | ||
| 138 | + * 根据钥匙ID查询钥匙信息 | ||
| 139 | + * @author liujun | ||
| 140 | + * @date 2024/6/25 14:39 | ||
| 141 | + * @param keyInfoId | ||
| 142 | + * @return com.ruoyi.domain.keyInfo.KeyInfo | ||
| 143 | + */ | ||
| 144 | + private KeyInfo queryKeyInfo(Integer keyInfoId) { | ||
| 145 | + return keyInfoService.getById(keyInfoId); | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + /*** | ||
| 149 | + * 查询设备信息 | ||
| 150 | + * @author liujun | ||
| 151 | + * @date 2024/6/25 14:43 | ||
| 152 | + * @param equipmentId | ||
| 153 | + * @return com.ruoyi.equipment.domain.Equipment | ||
| 154 | + */ | ||
| 155 | + private Equipment queryEquipment(long equipmentId) { | ||
| 156 | + return iEquipmentService.selectEquipmentById(equipmentId); | ||
| 157 | + } | ||
| 158 | + | ||
| 159 | + /*** | ||
| 160 | + * 根据车牌号查询车辆信息 | ||
| 161 | + * @author liujun | ||
| 162 | + * @date 2024/6/25 15:00 | ||
| 163 | + * @param plateNum | ||
| 164 | + * @return com.ruoyi.domain.caiinfo.CarInfo | ||
| 165 | + */ | ||
| 166 | + private CarInfo queryCarInfo(String plateNum) { | ||
| 167 | + return carInfoService.getOneByPlateNum(plateNum); | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | + | ||
| 171 | +} |
Bsth-admin/src/main/java/com/ruoyi/service/impl/equipment/linke/log/LingangEquipmentLinkeLogServiceImpl.java
0 → 100644
| 1 | +package com.ruoyi.service.impl.equipment.linke.log; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.domain.equipment.linke.log.LingangEquipmentLinkeLog; | ||
| 4 | +import com.ruoyi.mapper.equipment.linke.log.LingangEquipmentLinkeLogMapper; | ||
| 5 | +import com.ruoyi.service.equipment.linke.log.LingangEquipmentLinkeLogService; | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
| 9 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
| 10 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
| 11 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
| 12 | + | ||
| 13 | +import com.github.pagehelper.PageHelper; | ||
| 14 | + | ||
| 15 | + | ||
| 16 | +import java.util.Collections; | ||
| 17 | +import java.util.Date; | ||
| 18 | +import java.util.List; | ||
| 19 | + | ||
| 20 | +import com.ruoyi.domain.OrderEntity; | ||
| 21 | + | ||
| 22 | +@Service | ||
| 23 | +/**设备链接日志 Service实现类*/ | ||
| 24 | +public class LingangEquipmentLinkeLogServiceImpl extends ServiceImpl<LingangEquipmentLinkeLogMapper, LingangEquipmentLinkeLog> implements LingangEquipmentLinkeLogService { | ||
| 25 | + @Autowired | ||
| 26 | + private LingangEquipmentLinkeLogMapper lingangEquipmentLinkeLogMapper; | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * 分页查询 | ||
| 30 | + */ | ||
| 31 | + @Override | ||
| 32 | + public IPage<LingangEquipmentLinkeLog> pageList(Page<LingangEquipmentLinkeLog> page, LingangEquipmentLinkeLog entity, OrderEntity orderEntity) { | ||
| 33 | + LambdaQueryWrapper<LingangEquipmentLinkeLog> countWrapper = new LambdaQueryWrapper<>(entity); | ||
| 34 | + countWrapper.select(LingangEquipmentLinkeLog::getId); | ||
| 35 | + int count = count(countWrapper); | ||
| 36 | + | ||
| 37 | + List<LingangEquipmentLinkeLog> lists = Collections.emptyList(); | ||
| 38 | + if (count > 0) { | ||
| 39 | + PageHelper.startPage((int) page.getCurrent(), (int) page.getSize(), false); | ||
| 40 | + LambdaQueryWrapper<LingangEquipmentLinkeLog> selectWrapper = new LambdaQueryWrapper<>(entity); | ||
| 41 | + orderColumn(selectWrapper, orderEntity); | ||
| 42 | + lists = list(selectWrapper); | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + IPage<LingangEquipmentLinkeLog> returnPage = new Page<LingangEquipmentLinkeLog>(); | ||
| 46 | + returnPage.setRecords(lists); | ||
| 47 | + returnPage.setPages(count % page.getSize() == 0 ? count / page.getSize() : count / page.getSize() + 1); | ||
| 48 | + returnPage.setCurrent(page.getCurrent()); | ||
| 49 | + returnPage.setSize(page.getSize()); | ||
| 50 | + returnPage.setTotal(count); | ||
| 51 | + | ||
| 52 | + return returnPage; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + @Override | ||
| 56 | + public List<LingangEquipmentLinkeLog> list(LingangEquipmentLinkeLog entity) { | ||
| 57 | + return list(new LambdaQueryWrapper<>(entity)); | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + | ||
| 61 | + @Override | ||
| 62 | + public LingangEquipmentLinkeLog getOne(LingangEquipmentLinkeLog entity) { | ||
| 63 | + return getOne(new LambdaQueryWrapper<>(entity)); | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + @Override | ||
| 67 | + public Integer countId(LingangEquipmentLinkeLog entity) { | ||
| 68 | + LambdaQueryWrapper<LingangEquipmentLinkeLog> wrapper = new LambdaQueryWrapper<>(entity); | ||
| 69 | + wrapper.select(LingangEquipmentLinkeLog::getId); | ||
| 70 | + return count(wrapper); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 插入有值的列 | ||
| 76 | + */ | ||
| 77 | + @Override | ||
| 78 | + public int insertSelective(LingangEquipmentLinkeLog entity) { | ||
| 79 | + return lingangEquipmentLinkeLogMapper.insertSelective(entity); | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + /** | ||
| 83 | + * 插入数据 | ||
| 84 | + */ | ||
| 85 | + @Override | ||
| 86 | + public boolean insert(LingangEquipmentLinkeLog entity) { | ||
| 87 | + return save(entity); | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + /** | ||
| 91 | + * 根据主键修改数据 | ||
| 92 | + */ | ||
| 93 | + @Override | ||
| 94 | + public boolean updateByPrimaryKey(LingangEquipmentLinkeLog entity) { | ||
| 95 | + return updateById(entity); | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + @Override | ||
| 99 | + public boolean updateByPrimaryKey(LingangEquipmentLinkeLog linkeLog, String msg, Integer status) { | ||
| 100 | + linkeLog.setStatus(status); | ||
| 101 | + linkeLog.setResult(msg); | ||
| 102 | + linkeLog.setUpdateTime(new Date()); | ||
| 103 | + int count = lingangEquipmentLinkeLogMapper.udpateMsgStatusResultById(linkeLog); | ||
| 104 | + return count > 0; | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + /***根据主键删除数据*/ | ||
| 108 | + @Override | ||
| 109 | + public boolean deleteById(Long id) { | ||
| 110 | + return removeById(id); | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + | ||
| 114 | + public static void orderColumn(LambdaQueryWrapper<LingangEquipmentLinkeLog> wrapper, OrderEntity orderEntity) { | ||
| 115 | + if (org.apache.commons.lang3.StringUtils.equals("ascending", orderEntity.getOrder())) { | ||
| 116 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "id")) { | ||
| 117 | + wrapper.orderByAsc(LingangEquipmentLinkeLog::getId); | ||
| 118 | + } | ||
| 119 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "passingReferences")) { | ||
| 120 | + wrapper.orderByAsc(LingangEquipmentLinkeLog::getPassingReferences); | ||
| 121 | + } | ||
| 122 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "device")) { | ||
| 123 | + wrapper.orderByAsc(LingangEquipmentLinkeLog::getDevice); | ||
| 124 | + } | ||
| 125 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createTime")) { | ||
| 126 | + wrapper.orderByAsc(LingangEquipmentLinkeLog::getCreateTime); | ||
| 127 | + } | ||
| 128 | + } else if (org.apache.commons.lang3.StringUtils.equals("descending", orderEntity.getOrder())) { | ||
| 129 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "id")) { | ||
| 130 | + wrapper.orderByDesc(LingangEquipmentLinkeLog::getId); | ||
| 131 | + } | ||
| 132 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "passingReferences")) { | ||
| 133 | + wrapper.orderByDesc(LingangEquipmentLinkeLog::getPassingReferences); | ||
| 134 | + } | ||
| 135 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "device")) { | ||
| 136 | + wrapper.orderByDesc(LingangEquipmentLinkeLog::getDevice); | ||
| 137 | + } | ||
| 138 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createTime")) { | ||
| 139 | + wrapper.orderByDesc(LingangEquipmentLinkeLog::getCreateTime); | ||
| 140 | + } | ||
| 141 | + } | ||
| 142 | + } | ||
| 143 | +} | ||
| 0 | \ No newline at end of file | 144 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/service/impl/lin/gang/LingangSchedulingServiceImpl.java
0 → 100644
| 1 | +package com.ruoyi.service.impl.lin.gang; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.domain.lin.gang.LingangScheduling; | ||
| 4 | +import com.ruoyi.mapper.lin.gang.LingangSchedulingMapper; | ||
| 5 | +import com.ruoyi.service.lin.gang.LingangSchedulingService; | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
| 9 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
| 10 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
| 11 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
| 12 | + | ||
| 13 | +import com.github.pagehelper.PageHelper; | ||
| 14 | + | ||
| 15 | +import javax.servlet.http.HttpServletResponse; | ||
| 16 | + | ||
| 17 | +import java.util.Collection; | ||
| 18 | +import java.util.Collections; | ||
| 19 | +import java.util.List; | ||
| 20 | + | ||
| 21 | +import com.ruoyi.domain.OrderEntity; | ||
| 22 | + | ||
| 23 | +@Service | ||
| 24 | +/** Service实现类*/ | ||
| 25 | +public class LingangSchedulingServiceImpl extends ServiceImpl<LingangSchedulingMapper, LingangScheduling> implements LingangSchedulingService { | ||
| 26 | + @Autowired | ||
| 27 | + private LingangSchedulingMapper lingangSchedulingMapper; | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * 分页查询 | ||
| 31 | + */ | ||
| 32 | + @Override | ||
| 33 | + public IPage<LingangScheduling> pageList(Page<LingangScheduling> page, LingangScheduling entity, OrderEntity orderEntity) { | ||
| 34 | + LambdaQueryWrapper<LingangScheduling> countWrapper = new LambdaQueryWrapper<>(entity); | ||
| 35 | + countWrapper.select(LingangScheduling::getId); | ||
| 36 | + int count = count(countWrapper); | ||
| 37 | + | ||
| 38 | + List<LingangScheduling> lists = Collections.emptyList(); | ||
| 39 | + if (count > 0) { | ||
| 40 | + PageHelper.startPage((int) page.getCurrent(), (int) page.getSize(), false); | ||
| 41 | + LambdaQueryWrapper<LingangScheduling> selectWrapper = new LambdaQueryWrapper<>(entity); | ||
| 42 | + orderColumn(selectWrapper, orderEntity); | ||
| 43 | + lists = list(selectWrapper); | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + IPage<LingangScheduling> returnPage = new Page<LingangScheduling>(); | ||
| 47 | + returnPage.setRecords(lists); | ||
| 48 | + returnPage.setPages(count % page.getSize() == 0 ? count / page.getSize() : count / page.getSize() + 1); | ||
| 49 | + returnPage.setCurrent(page.getCurrent()); | ||
| 50 | + returnPage.setSize(page.getSize()); | ||
| 51 | + returnPage.setTotal(count); | ||
| 52 | + | ||
| 53 | + return returnPage; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + @Override | ||
| 57 | + public List<LingangScheduling> list(LingangScheduling entity) { | ||
| 58 | + return list(new LambdaQueryWrapper<>(entity)); | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + | ||
| 62 | + @Override | ||
| 63 | + public LingangScheduling getOne(LingangScheduling entity) { | ||
| 64 | + return getOne(new LambdaQueryWrapper<>(entity)); | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + @Override | ||
| 68 | + public Integer countId(LingangScheduling entity) { | ||
| 69 | + LambdaQueryWrapper<LingangScheduling> wrapper = new LambdaQueryWrapper<>(entity); | ||
| 70 | + wrapper.select(LingangScheduling::getId); | ||
| 71 | + return count(wrapper); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + | ||
| 75 | + /** | ||
| 76 | + * 插入有值的列 | ||
| 77 | + */ | ||
| 78 | + @Override | ||
| 79 | + public int insertSelective(LingangScheduling entity) { | ||
| 80 | + return lingangSchedulingMapper.insertSelective(entity); | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + /** | ||
| 84 | + * 插入数据 | ||
| 85 | + */ | ||
| 86 | + @Override | ||
| 87 | + public boolean insert(LingangScheduling entity) { | ||
| 88 | + return save(entity); | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + /** | ||
| 92 | + * 根据主键修改数据 | ||
| 93 | + */ | ||
| 94 | + @Override | ||
| 95 | + public boolean updateByPrimaryKey(LingangScheduling entity) { | ||
| 96 | + return updateById(entity); | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + /***根据主键删除数据*/ | ||
| 100 | + @Override | ||
| 101 | + public boolean deleteById(Integer id) { | ||
| 102 | + return removeById(id); | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + | ||
| 106 | + public static void orderColumn(LambdaQueryWrapper<LingangScheduling> wrapper, OrderEntity orderEntity) { | ||
| 107 | + if (org.apache.commons.lang3.StringUtils.equals("ascending", orderEntity.getOrder())) { | ||
| 108 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "id")) { | ||
| 109 | + wrapper.orderByAsc(LingangScheduling::getId); | ||
| 110 | + } | ||
| 111 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "scheduleDate")) { | ||
| 112 | + wrapper.orderByAsc(LingangScheduling::getScheduleDate); | ||
| 113 | + } | ||
| 114 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "lineName")) { | ||
| 115 | + wrapper.orderByAsc(LingangScheduling::getLineName); | ||
| 116 | + } | ||
| 117 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "jobCode")) { | ||
| 118 | + wrapper.orderByAsc(LingangScheduling::getJobCode); | ||
| 119 | + } | ||
| 120 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "name")) { | ||
| 121 | + wrapper.orderByAsc(LingangScheduling::getName); | ||
| 122 | + } | ||
| 123 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "posts")) { | ||
| 124 | + wrapper.orderByAsc(LingangScheduling::getPosts); | ||
| 125 | + } | ||
| 126 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "lpName")) { | ||
| 127 | + wrapper.orderByAsc(LingangScheduling::getLpName); | ||
| 128 | + } | ||
| 129 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "nbbm")) { | ||
| 130 | + wrapper.orderByAsc(LingangScheduling::getNbbm); | ||
| 131 | + } | ||
| 132 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "bcType")) { | ||
| 133 | + wrapper.orderByAsc(LingangScheduling::getBcType); | ||
| 134 | + } | ||
| 135 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "fcsjT")) { | ||
| 136 | + wrapper.orderByAsc(LingangScheduling::getFcsjT); | ||
| 137 | + } | ||
| 138 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "zdsjT")) { | ||
| 139 | + wrapper.orderByAsc(LingangScheduling::getZdsjT); | ||
| 140 | + } | ||
| 141 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "signInId")) { | ||
| 142 | + wrapper.orderByAsc(LingangScheduling::getSignInId); | ||
| 143 | + } | ||
| 144 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "exType")) { | ||
| 145 | + wrapper.orderByAsc(LingangScheduling::getExType); | ||
| 146 | + } | ||
| 147 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "signTime")) { | ||
| 148 | + wrapper.orderByAsc(LingangScheduling::getSignTime); | ||
| 149 | + } | ||
| 150 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "signType")) { | ||
| 151 | + wrapper.orderByAsc(LingangScheduling::getSignType); | ||
| 152 | + } | ||
| 153 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "alcoholFlag")) { | ||
| 154 | + wrapper.orderByAsc(LingangScheduling::getAlcoholFlag); | ||
| 155 | + } | ||
| 156 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "alcoholIntake")) { | ||
| 157 | + wrapper.orderByAsc(LingangScheduling::getAlcoholIntake); | ||
| 158 | + } | ||
| 159 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "remark")) { | ||
| 160 | + wrapper.orderByAsc(LingangScheduling::getRemark); | ||
| 161 | + } | ||
| 162 | + } else if (org.apache.commons.lang3.StringUtils.equals("descending", orderEntity.getOrder())) { | ||
| 163 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "id")) { | ||
| 164 | + wrapper.orderByDesc(LingangScheduling::getId); | ||
| 165 | + } | ||
| 166 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "scheduleDate")) { | ||
| 167 | + wrapper.orderByDesc(LingangScheduling::getScheduleDate); | ||
| 168 | + } | ||
| 169 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "lineName")) { | ||
| 170 | + wrapper.orderByDesc(LingangScheduling::getLineName); | ||
| 171 | + } | ||
| 172 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "jobCode")) { | ||
| 173 | + wrapper.orderByDesc(LingangScheduling::getJobCode); | ||
| 174 | + } | ||
| 175 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "name")) { | ||
| 176 | + wrapper.orderByDesc(LingangScheduling::getName); | ||
| 177 | + } | ||
| 178 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "posts")) { | ||
| 179 | + wrapper.orderByDesc(LingangScheduling::getPosts); | ||
| 180 | + } | ||
| 181 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "lpName")) { | ||
| 182 | + wrapper.orderByDesc(LingangScheduling::getLpName); | ||
| 183 | + } | ||
| 184 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "nbbm")) { | ||
| 185 | + wrapper.orderByDesc(LingangScheduling::getNbbm); | ||
| 186 | + } | ||
| 187 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "bcType")) { | ||
| 188 | + wrapper.orderByDesc(LingangScheduling::getBcType); | ||
| 189 | + } | ||
| 190 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "fcsjT")) { | ||
| 191 | + wrapper.orderByDesc(LingangScheduling::getFcsjT); | ||
| 192 | + } | ||
| 193 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "zdsjT")) { | ||
| 194 | + wrapper.orderByDesc(LingangScheduling::getZdsjT); | ||
| 195 | + } | ||
| 196 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "signInId")) { | ||
| 197 | + wrapper.orderByDesc(LingangScheduling::getSignInId); | ||
| 198 | + } | ||
| 199 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "exType")) { | ||
| 200 | + wrapper.orderByDesc(LingangScheduling::getExType); | ||
| 201 | + } | ||
| 202 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "signTime")) { | ||
| 203 | + wrapper.orderByDesc(LingangScheduling::getSignTime); | ||
| 204 | + } | ||
| 205 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "signType")) { | ||
| 206 | + wrapper.orderByDesc(LingangScheduling::getSignType); | ||
| 207 | + } | ||
| 208 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "alcoholFlag")) { | ||
| 209 | + wrapper.orderByDesc(LingangScheduling::getAlcoholFlag); | ||
| 210 | + } | ||
| 211 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "alcoholIntake")) { | ||
| 212 | + wrapper.orderByDesc(LingangScheduling::getAlcoholIntake); | ||
| 213 | + } | ||
| 214 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "remark")) { | ||
| 215 | + wrapper.orderByDesc(LingangScheduling::getRemark); | ||
| 216 | + } | ||
| 217 | + } | ||
| 218 | + } | ||
| 219 | +} | ||
| 0 | \ No newline at end of file | 220 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/service/lin/gang/LingangSchedulingService.java
0 → 100644
| 1 | +package com.ruoyi.service.lin.gang; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.extension.service.IService; | ||
| 4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
| 5 | + | ||
| 6 | +import java.util.List; | ||
| 7 | + | ||
| 8 | +import com.ruoyi.domain.OrderEntity; | ||
| 9 | +import com.ruoyi.domain.lin.gang.LingangScheduling; | ||
| 10 | + | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * Service接口 | ||
| 14 | + */ | ||
| 15 | +public interface LingangSchedulingService extends IService<LingangScheduling> { | ||
| 16 | + /** | ||
| 17 | + * 分页查询 | ||
| 18 | + */ | ||
| 19 | + IPage<LingangScheduling> pageList(com.baomidou.mybatisplus.extension.plugins.pagination.Page<LingangScheduling> page, LingangScheduling entity, OrderEntity orderEntity); | ||
| 20 | + | ||
| 21 | + /** | ||
| 22 | + * 带条件查询 | ||
| 23 | + */ | ||
| 24 | + List<LingangScheduling> list(LingangScheduling entity); | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 条件查询只返回一条数据的方法 | ||
| 28 | + */ | ||
| 29 | + LingangScheduling getOne(LingangScheduling entity); | ||
| 30 | + | ||
| 31 | + Integer countId(LingangScheduling entity); | ||
| 32 | + | ||
| 33 | + /** | ||
| 34 | + * 插入有值的列 | ||
| 35 | + */ | ||
| 36 | + int insertSelective(LingangScheduling entity); | ||
| 37 | + | ||
| 38 | + /***插入数据*/ | ||
| 39 | + boolean insert(LingangScheduling entity); | ||
| 40 | + | ||
| 41 | + /** | ||
| 42 | + * 根据主键修改数据 | ||
| 43 | + */ | ||
| 44 | + boolean updateByPrimaryKey(LingangScheduling entity); | ||
| 45 | + | ||
| 46 | + boolean deleteById(Integer id); | ||
| 47 | +} | ||
| 0 | \ No newline at end of file | 48 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/utils/DateUtil.java
| 1 | package com.ruoyi.utils; | 1 | package com.ruoyi.utils; |
| 2 | 2 | ||
| 3 | +import org.apache.commons.lang3.StringUtils; | ||
| 3 | import org.apache.commons.lang3.time.FastDateFormat; | 4 | import org.apache.commons.lang3.time.FastDateFormat; |
| 4 | 5 | ||
| 6 | +import java.time.LocalDate; | ||
| 7 | +import java.time.LocalDateTime; | ||
| 8 | +import java.time.format.DateTimeFormatter; | ||
| 9 | + | ||
| 5 | /** | 10 | /** |
| 6 | * @author liujun | 11 | * @author liujun |
| 7 | * @date 2024年06月24日 11:27 | 12 | * @date 2024年06月24日 11:27 |
| 8 | */ | 13 | */ |
| 9 | public class DateUtil { | 14 | public class DateUtil { |
| 10 | 15 | ||
| 11 | - public static FastDateFormat YYYY_MM_DD_LINK_HH_MM_SS=FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss"); | 16 | + public static FastDateFormat YYYY_MM_DD_LINK_HH_MM_SS = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss"); |
| 17 | + public static DateTimeFormatter YYYY_MM_DD_LINK_HH_MM_SS_Local_Date = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); | ||
| 18 | + public static DateTimeFormatter YYYY_MM_DD_LINK_Local_Date = DateTimeFormatter.ofPattern("yyyy-MM-dd"); | ||
| 19 | + | ||
| 20 | + public static LocalDateTime parseLocalDateTime(String dateStr) { | ||
| 21 | + return StringUtils.isEmpty(dateStr) ? null : LocalDateTime.parse(dateStr, YYYY_MM_DD_LINK_HH_MM_SS_Local_Date); | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + public static LocalDate parseLocalDate(String dateStr) { | ||
| 25 | + return StringUtils.isEmpty(dateStr) ? null : LocalDate.parse(dateStr, YYYY_MM_DD_LINK_Local_Date); | ||
| 26 | + } | ||
| 12 | } | 27 | } |
Bsth-admin/src/main/resources/mapper/equipment/linke/log/LingangEquipmentLinkeLogMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | +<mapper namespace="com.ruoyi.mapper.equipment.linke.log.LingangEquipmentLinkeLogMapper"> | ||
| 4 | + <resultMap id="BaseResultMap" type="com.ruoyi.domain.equipment.linke.log.LingangEquipmentLinkeLog"> | ||
| 5 | + <result column="Passing_references" jdbcType="VARCHAR" property="passingReferences" /> | ||
| 6 | + <result column="device" jdbcType="VARCHAR" property="device" /> | ||
| 7 | + <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> | ||
| 8 | + <result column="status" jdbcType="INTEGER" property="status" /> | ||
| 9 | + <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> | ||
| 10 | + <result column="result" jdbcType="VARCHAR" property="result" /> | ||
| 11 | + <result column="url" jdbcType="VARCHAR" property="url" /> | ||
| 12 | + </resultMap> | ||
| 13 | + | ||
| 14 | + <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true" | ||
| 15 | + parameterType="com.ruoyi.domain.equipment.linke.log.LingangEquipmentLinkeLog"> | ||
| 16 | + INSERT INTO equipment_linke_log <include refid="insertSelectiveColumn"></include> | ||
| 17 | + <include refid="insertSelectiveValue"></include> | ||
| 18 | + </insert> | ||
| 19 | + <update id="udpateMsgStatusResultById" parameterType="com.ruoyi.domain.equipment.linke.log.LingangEquipmentLinkeLog"> | ||
| 20 | + update equipment_linke_log <include refid="udpateMsgStatusResultById"></include> where id=#{id} | ||
| 21 | + </update> | ||
| 22 | + | ||
| 23 | + | ||
| 24 | + <sql id="columns"> | ||
| 25 | + id , Passing_references , device , create_time , status , update_time , result , url | ||
| 26 | + </sql> | ||
| 27 | + | ||
| 28 | + <sql id="insert_columns"> | ||
| 29 | + id , Passing_references , device , create_time , status , update_time , result , url | ||
| 30 | + </sql> | ||
| 31 | + | ||
| 32 | + <sql id="insert_values"> | ||
| 33 | + #{id}, #{passingReferences}, #{device}, #{createTime}, #{status}, #{updateTime}, #{result}, #{url} | ||
| 34 | + </sql> | ||
| 35 | + | ||
| 36 | + <sql id="insertSelectiveColumn"> | ||
| 37 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
| 38 | + <if test="null!=id">id,</if> | ||
| 39 | + <if test="null!=passingReferences">Passing_references,</if> | ||
| 40 | + <if test="null!=device">device,</if> | ||
| 41 | + <if test="null!=createTime">create_time,</if> | ||
| 42 | + <if test="null!=status">status,</if> | ||
| 43 | + <if test="null!=updateTime">update_time,</if> | ||
| 44 | + <if test="null!=result">result,</if> | ||
| 45 | + <if test="null!=url">url,</if> | ||
| 46 | + </trim> | ||
| 47 | + </sql> | ||
| 48 | + | ||
| 49 | + <sql id="insertSelectiveValue"> | ||
| 50 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
| 51 | + <if test="null!=id">#{id,jdbcType=BIGINT},</if> | ||
| 52 | + <if test="null!=passingReferences">#{passingReferences,jdbcType=VARCHAR},</if> | ||
| 53 | + <if test="null!=device">#{device,jdbcType=VARCHAR},</if> | ||
| 54 | + <if test="null!=createTime">#{createTime,jdbcType=TIMESTAMP},</if> | ||
| 55 | + <if test="null!=status">#{status,jdbcType=INTEGER},</if> | ||
| 56 | + <if test="null!=updateTime">#{updateTime,jdbcType=TIMESTAMP},</if> | ||
| 57 | + <if test="null!=result">#{result,jdbcType=VARCHAR},</if> | ||
| 58 | + <if test="null!=url">#{url,jdbcType=VARCHAR},</if> | ||
| 59 | + </trim> | ||
| 60 | + </sql> | ||
| 61 | + | ||
| 62 | + <sql id="updateByPrimaryKeySelectiveSql"> | ||
| 63 | + <set> | ||
| 64 | + <if test="null!=passingReferences">Passing_references = #{passingReferences,jdbcType=VARCHAR},</if> | ||
| 65 | + <if test="null!=device">device = #{device,jdbcType=VARCHAR},</if> | ||
| 66 | + <if test="null!=createTime">create_time = #{createTime,jdbcType=TIMESTAMP},</if> | ||
| 67 | + <if test="null!=status">status = #{status,jdbcType=INTEGER},</if> | ||
| 68 | + <if test="null!=updateTime">update_time = #{updateTime,jdbcType=TIMESTAMP},</if> | ||
| 69 | + <if test="null!=result">result = #{result,jdbcType=VARCHAR},</if> | ||
| 70 | + <if test="null!=url">url = #{url,jdbcType=VARCHAR},</if> | ||
| 71 | + </set> | ||
| 72 | + </sql> | ||
| 73 | + | ||
| 74 | + <sql id="udpateMsgStatusResultById"> | ||
| 75 | + <set> | ||
| 76 | + <if test="null!=status">status = #{status,jdbcType=INTEGER},</if> | ||
| 77 | + <if test="null!=updateTime">update_time = #{updateTime,jdbcType=TIMESTAMP},</if> | ||
| 78 | + <if test="null!=result">result = #{result,jdbcType=VARCHAR},</if> | ||
| 79 | + </set> | ||
| 80 | + </sql> | ||
| 81 | + | ||
| 82 | + <sql id="where"> | ||
| 83 | + <if test="null!=id">AND id = #{id,jdbcType=BIGINT}, </if> | ||
| 84 | + <if test="null!=passingReferences">AND Passing_references = #{passingReferences,jdbcType=VARCHAR}, </if> | ||
| 85 | + <if test="null!=device">AND device = #{device,jdbcType=VARCHAR}, </if> | ||
| 86 | + <if test="null!=createTime">AND create_time = #{createTime,jdbcType=TIMESTAMP}, </if> | ||
| 87 | + <if test="null!=status">AND status = #{status,jdbcType=INTEGER}, </if> | ||
| 88 | + <if test="null!=updateTime">AND update_time = #{updateTime,jdbcType=TIMESTAMP}, </if> | ||
| 89 | + <if test="null!=result">AND result = #{result,jdbcType=VARCHAR}, </if> | ||
| 90 | + <if test="null!=url">AND url = #{url,jdbcType=VARCHAR}, </if> | ||
| 91 | + </sql> | ||
| 92 | +</mapper> | ||
| 0 | \ No newline at end of file | 93 | \ No newline at end of file |
Bsth-admin/src/main/resources/mapper/lin/gang/LingangSchedulingMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | +<mapper namespace="com.ruoyi.mapper.lin.gang.LingangSchedulingMapper"> | ||
| 4 | + <resultMap id="BaseResultMap" type="com.ruoyi.domain.lin.gang.LingangScheduling"> | ||
| 5 | + <id column="id" jdbcType="INTEGER" property="id"/> | ||
| 6 | + <result column="schedule_date" jdbcType="DATE" property="scheduleDate"/> | ||
| 7 | + <result column="line_name" jdbcType="VARCHAR" property="lineName"/> | ||
| 8 | + <result column="job_code" jdbcType="VARCHAR" property="jobCode"/> | ||
| 9 | + <result column="name" jdbcType="VARCHAR" property="name"/> | ||
| 10 | + <result column="posts" jdbcType="VARCHAR" property="posts"/> | ||
| 11 | + <result column="lp_name" jdbcType="VARCHAR" property="lpName"/> | ||
| 12 | + <result column="nbbm" jdbcType="VARCHAR" property="nbbm"/> | ||
| 13 | + <result column="bc_type" jdbcType="VARCHAR" property="bcType"/> | ||
| 14 | + <result column="fcsj_t" jdbcType="BIGINT" property="fcsjT"/> | ||
| 15 | + <result column="zdsj_t" jdbcType="BIGINT" property="zdsjT"/> | ||
| 16 | + <result column="sign_in_id" jdbcType="INTEGER" property="signInId"/> | ||
| 17 | + <result column="ex_type" jdbcType="TINYINT" property="exType"/> | ||
| 18 | + <result column="sign_time" jdbcType="TIMESTAMP" property="signTime"/> | ||
| 19 | + <result column="sign_type" jdbcType="TINYINT" property="signType"/> | ||
| 20 | + <result column="alcohol_flag" jdbcType="TINYINT" property="alcoholFlag"/> | ||
| 21 | + <result column="alcohol_intake" jdbcType="DECIMAL" property="alcoholIntake"/> | ||
| 22 | + <result column="remark" jdbcType="VARCHAR" property="remark"/> | ||
| 23 | + </resultMap> | ||
| 24 | + | ||
| 25 | + <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true" | ||
| 26 | + parameterType="com.ruoyi.domain.lin.gang.LingangScheduling"> | ||
| 27 | + INSERT INTO scheduling <include refid="insertSelectiveColumn"></include> | ||
| 28 | + <include refid="insertSelectiveValue"></include> | ||
| 29 | + </insert> | ||
| 30 | + | ||
| 31 | + <sql id="columns"> | ||
| 32 | + id | ||
| 33 | + , schedule_date , line_name , job_code , name , posts , lp_name , nbbm , bc_type , fcsj_t , zdsj_t , sign_in_id , ex_type , sign_time , sign_type , alcohol_flag , alcohol_intake , remark | ||
| 34 | + </sql> | ||
| 35 | + | ||
| 36 | + <sql id="insert_columns"> | ||
| 37 | + id | ||
| 38 | + , schedule_date , line_name , job_code , name , posts , lp_name , nbbm , bc_type , fcsj_t , zdsj_t , sign_in_id , ex_type , sign_time , sign_type , alcohol_flag , alcohol_intake , remark | ||
| 39 | + </sql> | ||
| 40 | + | ||
| 41 | + <sql id="insert_values"> | ||
| 42 | + #{id} | ||
| 43 | + , | ||
| 44 | + #{scheduleDate}, | ||
| 45 | + #{lineName}, | ||
| 46 | + #{jobCode}, | ||
| 47 | + #{name}, | ||
| 48 | + #{posts}, | ||
| 49 | + #{lpName}, | ||
| 50 | + #{nbbm}, | ||
| 51 | + #{bcType}, | ||
| 52 | + #{fcsjT}, | ||
| 53 | + #{zdsjT}, | ||
| 54 | + #{signInId}, | ||
| 55 | + #{exType}, | ||
| 56 | + #{signTime}, | ||
| 57 | + #{signType}, | ||
| 58 | + #{alcoholFlag}, | ||
| 59 | + #{alcoholIntake}, | ||
| 60 | + #{remark} | ||
| 61 | + </sql> | ||
| 62 | + | ||
| 63 | + <sql id="insertSelectiveColumn"> | ||
| 64 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
| 65 | + <if test="null!=id">id,</if> | ||
| 66 | + <if test="null!=scheduleDate">schedule_date,</if> | ||
| 67 | + <if test="null!=lineName">line_name,</if> | ||
| 68 | + <if test="null!=jobCode">job_code,</if> | ||
| 69 | + <if test="null!=name">name,</if> | ||
| 70 | + <if test="null!=posts">posts,</if> | ||
| 71 | + <if test="null!=lpName">lp_name,</if> | ||
| 72 | + <if test="null!=nbbm">nbbm,</if> | ||
| 73 | + <if test="null!=bcType">bc_type,</if> | ||
| 74 | + <if test="null!=fcsjT">fcsj_t,</if> | ||
| 75 | + <if test="null!=zdsjT">zdsj_t,</if> | ||
| 76 | + <if test="null!=signInId">sign_in_id,</if> | ||
| 77 | + <if test="null!=exType">ex_type,</if> | ||
| 78 | + <if test="null!=signTime">sign_time,</if> | ||
| 79 | + <if test="null!=signType">sign_type,</if> | ||
| 80 | + <if test="null!=alcoholFlag">alcohol_flag,</if> | ||
| 81 | + <if test="null!=alcoholIntake">alcohol_intake,</if> | ||
| 82 | + <if test="null!=remark">remark,</if> | ||
| 83 | + </trim> | ||
| 84 | + </sql> | ||
| 85 | + | ||
| 86 | + <sql id="insertSelectiveValue"> | ||
| 87 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
| 88 | + <if test="null!=id">#{id,jdbcType=INTEGER},</if> | ||
| 89 | + <if test="null!=scheduleDate">#{scheduleDate,jdbcType=DATE},</if> | ||
| 90 | + <if test="null!=lineName">#{lineName,jdbcType=VARCHAR},</if> | ||
| 91 | + <if test="null!=jobCode">#{jobCode,jdbcType=VARCHAR},</if> | ||
| 92 | + <if test="null!=name">#{name,jdbcType=VARCHAR},</if> | ||
| 93 | + <if test="null!=posts">#{posts,jdbcType=VARCHAR},</if> | ||
| 94 | + <if test="null!=lpName">#{lpName,jdbcType=VARCHAR},</if> | ||
| 95 | + <if test="null!=nbbm">#{nbbm,jdbcType=VARCHAR},</if> | ||
| 96 | + <if test="null!=bcType">#{bcType,jdbcType=VARCHAR},</if> | ||
| 97 | + <if test="null!=fcsjT">#{fcsjT,jdbcType=BIGINT},</if> | ||
| 98 | + <if test="null!=zdsjT">#{zdsjT,jdbcType=BIGINT},</if> | ||
| 99 | + <if test="null!=signInId">#{signInId,jdbcType=INTEGER},</if> | ||
| 100 | + <if test="null!=exType">#{exType,jdbcType=TINYINT},</if> | ||
| 101 | + <if test="null!=signTime">#{signTime,jdbcType=TIMESTAMP},</if> | ||
| 102 | + <if test="null!=signType">#{signType,jdbcType=TINYINT},</if> | ||
| 103 | + <if test="null!=alcoholFlag">#{alcoholFlag,jdbcType=TINYINT},</if> | ||
| 104 | + <if test="null!=alcoholIntake">#{alcoholIntake,jdbcType=DECIMAL},</if> | ||
| 105 | + <if test="null!=remark">#{remark,jdbcType=VARCHAR},</if> | ||
| 106 | + </trim> | ||
| 107 | + </sql> | ||
| 108 | + | ||
| 109 | + <sql id="updateByPrimaryKeySelectiveSql"> | ||
| 110 | + <set> | ||
| 111 | + <if test="null!=id">id = #{id,jdbcType=INTEGER},</if> | ||
| 112 | + <if test="null!=scheduleDate">schedule_date = #{scheduleDate,jdbcType=DATE},</if> | ||
| 113 | + <if test="null!=lineName">line_name = #{lineName,jdbcType=VARCHAR},</if> | ||
| 114 | + <if test="null!=jobCode">job_code = #{jobCode,jdbcType=VARCHAR},</if> | ||
| 115 | + <if test="null!=name">name = #{name,jdbcType=VARCHAR},</if> | ||
| 116 | + <if test="null!=posts">posts = #{posts,jdbcType=VARCHAR},</if> | ||
| 117 | + <if test="null!=lpName">lp_name = #{lpName,jdbcType=VARCHAR},</if> | ||
| 118 | + <if test="null!=nbbm">nbbm = #{nbbm,jdbcType=VARCHAR},</if> | ||
| 119 | + <if test="null!=bcType">bc_type = #{bcType,jdbcType=VARCHAR},</if> | ||
| 120 | + <if test="null!=fcsjT">fcsj_t = #{fcsjT,jdbcType=BIGINT},</if> | ||
| 121 | + <if test="null!=zdsjT">zdsj_t = #{zdsjT,jdbcType=BIGINT},</if> | ||
| 122 | + <if test="null!=signInId">sign_in_id = #{signInId,jdbcType=INTEGER},</if> | ||
| 123 | + <if test="null!=exType">ex_type = #{exType,jdbcType=TINYINT},</if> | ||
| 124 | + <if test="null!=signTime">sign_time = #{signTime,jdbcType=TIMESTAMP},</if> | ||
| 125 | + <if test="null!=signType">sign_type = #{signType,jdbcType=TINYINT},</if> | ||
| 126 | + <if test="null!=alcoholFlag">alcohol_flag = #{alcoholFlag,jdbcType=TINYINT},</if> | ||
| 127 | + <if test="null!=alcoholIntake">alcohol_intake = #{alcoholIntake,jdbcType=DECIMAL},</if> | ||
| 128 | + <if test="null!=remark">remark = #{remark,jdbcType=VARCHAR},</if> | ||
| 129 | + </set> | ||
| 130 | + </sql> | ||
| 131 | + | ||
| 132 | + <sql id="where"> | ||
| 133 | + <if test="null!=id">AND id = #{id,jdbcType=INTEGER},</if> | ||
| 134 | + <if test="null!=scheduleDate">AND schedule_date = #{scheduleDate,jdbcType=DATE},</if> | ||
| 135 | + <if test="null!=lineName">AND line_name = #{lineName,jdbcType=VARCHAR},</if> | ||
| 136 | + <if test="null!=jobCode">AND job_code = #{jobCode,jdbcType=VARCHAR},</if> | ||
| 137 | + <if test="null!=name">AND name = #{name,jdbcType=VARCHAR},</if> | ||
| 138 | + <if test="null!=posts">AND posts = #{posts,jdbcType=VARCHAR},</if> | ||
| 139 | + <if test="null!=lpName">AND lp_name = #{lpName,jdbcType=VARCHAR},</if> | ||
| 140 | + <if test="null!=nbbm">AND nbbm = #{nbbm,jdbcType=VARCHAR},</if> | ||
| 141 | + <if test="null!=bcType">AND bc_type = #{bcType,jdbcType=VARCHAR},</if> | ||
| 142 | + <if test="null!=fcsjT">AND fcsj_t = #{fcsjT,jdbcType=BIGINT},</if> | ||
| 143 | + <if test="null!=zdsjT">AND zdsj_t = #{zdsjT,jdbcType=BIGINT},</if> | ||
| 144 | + <if test="null!=signInId">AND sign_in_id = #{signInId,jdbcType=INTEGER},</if> | ||
| 145 | + <if test="null!=exType">AND ex_type = #{exType,jdbcType=TINYINT},</if> | ||
| 146 | + <if test="null!=signTime">AND sign_time = #{signTime,jdbcType=TIMESTAMP},</if> | ||
| 147 | + <if test="null!=signType">AND sign_type = #{signType,jdbcType=TINYINT},</if> | ||
| 148 | + <if test="null!=alcoholFlag">AND alcohol_flag = #{alcoholFlag,jdbcType=TINYINT},</if> | ||
| 149 | + <if test="null!=alcoholIntake">AND alcohol_intake = #{alcoholIntake,jdbcType=DECIMAL},</if> | ||
| 150 | + <if test="null!=remark">AND remark = #{remark,jdbcType=VARCHAR},</if> | ||
| 151 | + </sql> | ||
| 152 | +</mapper> | ||
| 0 | \ No newline at end of file | 153 | \ No newline at end of file |