Commit 43398ef2 by 吕明尚

Merge branch 'dev' into test

parents 4f8449fb 31a83c3e
package share.system.domain; package share.system.domain;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder; import lombok.Data;
import org.apache.commons.lang3.builder.ToStringStyle;
import share.common.annotation.Excel; import share.common.annotation.Excel;
import share.common.core.domain.BaseEntity; import share.common.core.domain.BaseEntity;
import java.util.Date;
/** /**
* 保洁记录对象 s_clean_records * 保洁记录对象 s_clean_records
* *
* @author ruoyi * @author ruoyi
* @date 2023-09-28 * @date 2023-09-28
*/ */
@Data
public class SCleanRecords extends BaseEntity public class SCleanRecords extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -25,12 +25,40 @@ public class SCleanRecords extends BaseEntity ...@@ -25,12 +25,40 @@ public class SCleanRecords extends BaseEntity
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Long id; private Long id;
/**
* 门店名称
*/
@Excel(name = "门店名称")
@TableField(exist = false)
private String storeName;
/** 门店ID */ /** 门店ID */
private Long storeId; private Long storeId;
/**
* 房间名称
*/
@Excel(name = "房间名称")
@TableField(exist = false)
private String roomName;
/** 房间ID */ /** 房间ID */
private Long roomId; private Long roomId;
/**
* 保洁员姓名
*/
@Excel(name = "保洁员姓名")
@TableField(exist = false)
private String cleanName;
/**
* 保洁员手机号
*/
@Excel(name = "保洁员手机号")
@TableField(exist = false)
private String phone;
/** 保洁人员ID */ /** 保洁人员ID */
private Long consumerId; private Long consumerId;
...@@ -40,7 +68,7 @@ public class SCleanRecords extends BaseEntity ...@@ -40,7 +68,7 @@ public class SCleanRecords extends BaseEntity
private Date startDate; private Date startDate;
/** 保洁前照片 */ /** 保洁前照片 */
@Excel(name = "保洁前照片") // @Excel(name = "保洁前照片")
private String startImage; private String startImage;
/** 结束时间 */ /** 结束时间 */
...@@ -48,35 +76,29 @@ public class SCleanRecords extends BaseEntity ...@@ -48,35 +76,29 @@ public class SCleanRecords extends BaseEntity
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date endDate; private Date endDate;
/**
* 下单开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@TableField(select = false)
private Date startTime;
/**
* 下单结束时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@TableField(select = false)
private Date endTime;
/** 保洁后照片 */ /** 保洁后照片 */
@Excel(name = "保洁后照片") // @Excel(name = "保洁后照片")
private String endImage; private String endImage;
/** 保洁状态:0:未保洁,1:保洁中,2:已保洁 */ /** 保洁状态:0:未保洁,1:保洁中,2:已保洁 */
@Excel(name = "保洁状态") @Excel(name = "保洁状态", dictType = "clean_records_status")
private Integer status; private Integer status;
/**
* 门店名称
*/
@TableField(exist = false)
private String storeName;
/**
* 房间名称
*/
@TableField(exist = false)
private String roomName;
/**
* 保洁员姓名
*/
@TableField(exist = false)
private String cleanName;
/**
* 保洁员手机号
*/
@TableField(exist = false)
private String phone;
@TableField(exist = false) @TableField(exist = false)
private SRoom sRoom; private SRoom sRoom;
...@@ -84,152 +106,4 @@ public class SCleanRecords extends BaseEntity ...@@ -84,152 +106,4 @@ public class SCleanRecords extends BaseEntity
@TableField(exist = false) @TableField(exist = false)
private SStore sStore; private SStore sStore;
public SRoom getsRoom() {
return sRoom;
}
public void setsRoom(SRoom sRoom) {
this.sRoom = sRoom;
}
public SStore getsStore() {
return sStore;
}
public void setsStore(SStore sStore) {
this.sStore = sStore;
}
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setRoomId(Long roomId)
{
this.roomId = roomId;
}
public Long getRoomId()
{
return roomId;
}
public void setConsumerId(Long consumerId)
{
this.consumerId = consumerId;
}
public Long getConsumerId()
{
return consumerId;
}
public void setStartDate(Date startDate)
{
this.startDate = startDate;
}
public Date getStartDate()
{
return startDate;
}
public void setStartImage(String startImage)
{
this.startImage = startImage;
}
public String getStartImage()
{
return startImage;
}
public void setEndDate(Date endDate)
{
this.endDate = endDate;
}
public Date getEndDate()
{
return endDate;
}
public void setEndImage(String endImage)
{
this.endImage = endImage;
}
public String getEndImage()
{
return endImage;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public Long getStoreId() {
return storeId;
}
public void setStoreId(Long storeId) {
this.storeId = storeId;
}
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public String getRoomName() {
return roomName;
}
public void setRoomName(String roomName) {
this.roomName = roomName;
}
public String getCleanName() {
return cleanName;
}
public void setCleanName(String cleanName) {
this.cleanName = cleanName;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("storeId", getStoreId())
.append("roomId", getRoomId())
.append("consumerId", getConsumerId())
.append("startDate", getStartDate())
.append("startImage", getStartImage())
.append("endDate", getEndDate())
.append("endImage", getEndImage())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
} }
...@@ -70,8 +70,8 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC ...@@ -70,8 +70,8 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
if (sCleanRecords != null) { if (sCleanRecords != null) {
SStore store = sStoreMapper.selectSStoreById(sCleanRecords.getStoreId()); SStore store = sStoreMapper.selectSStoreById(sCleanRecords.getStoreId());
SRoom room = sRoomMapper.selectSRoomById(sCleanRecords.getRoomId()); SRoom room = sRoomMapper.selectSRoomById(sCleanRecords.getRoomId());
sCleanRecords.setsStore(store); sCleanRecords.setSStore(store);
sCleanRecords.setsRoom(room); sCleanRecords.setSRoom(room);
} }
return sCleanRecords; return sCleanRecords;
} }
...@@ -251,12 +251,12 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC ...@@ -251,12 +251,12 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
cleanRecordsList.forEach(item -> { cleanRecordsList.forEach(item -> {
SStore store = storeMap.get(item.getStoreId()); SStore store = storeMap.get(item.getStoreId());
if (store != null) { if (store != null) {
item.setsStore(store); item.setSStore(store);
item.setStoreName(store.getName()); item.setStoreName(store.getName());
} }
SRoom room = roomMap.get(item.getRoomId()); SRoom room = roomMap.get(item.getRoomId());
if (room != null) { if (room != null) {
item.setsRoom(room); item.setSRoom(room);
item.setRoomName(room.getName()); item.setRoomName(room.getName());
} }
}); });
...@@ -302,8 +302,8 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC ...@@ -302,8 +302,8 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
} }
//取创建时间最远的 //取创建时间最远的
SCleanRecords records = sCleanRecords.stream().min(Comparator.comparing(SCleanRecords::getCreateTime)).get(); SCleanRecords records = sCleanRecords.stream().min(Comparator.comparing(SCleanRecords::getCreateTime)).get();
records.setsRoom(sRoomMapper.selectById(records.getRoomId())); records.setSRoom(sRoomMapper.selectById(records.getRoomId()));
records.setsStore(sStoreMapper.selectById(records.getStoreId())); records.setSStore(sStoreMapper.selectById(records.getStoreId()));
return records; return records;
} }
......
...@@ -40,16 +40,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -40,16 +40,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSCleanRecordsList" parameterType="SCleanRecords" resultMap="SCleanRecordsResult"> <select id="selectSCleanRecordsList" parameterType="SCleanRecords" resultMap="SCleanRecordsResult">
<include refid="selectSCleanRecordsVo"/> <include refid="selectSCleanRecordsVo"/>
<where> <where>
<if test="startDate != null "> and t1.start_date = #{startDate}</if> <!-- <if test="startDate != null "> and t1.start_date = #{startDate}</if>-->
<!-- <if test="endDate != null "> and t1.end_date = #{endDate}</if>-->
<if test="startImage != null and startImage != ''"> and t1.start_image = #{startImage}</if> <if test="startImage != null and startImage != ''"> and t1.start_image = #{startImage}</if>
<if test="endDate != null "> and t1.end_date = #{endDate}</if>
<if test="endImage != null and endImage != ''"> and t1.end_image = #{endImage}</if> <if test="endImage != null and endImage != ''"> and t1.end_image = #{endImage}</if>
<if test="status != null "> and t1.status = #{status}</if> <if test="status != null "> and t1.status = #{status}</if>
<if test="consumerId != null"> and t1.consumer_id = #{consumerId}</if> <if test="consumerId != null"> and t1.consumer_id = #{consumerId}</if>
<if test="roomId != null"> and t1.room_id = #{roomId}</if> <if test="roomId != null"> and t1.room_id = #{roomId}</if>
<if test="storeId != null"> and t1.store_id = #{storeId}</if> <if test="storeId != null"> and t1.store_id = #{storeId}</if>
<if test="createTime != null "> <!-- <if test="createTime != null ">-->
and DATE_FORMAT(t1.create_time, '%Y-%m-%d') = DATE_FORMAT(#{createTime}, '%Y-%m-%d') <!-- and DATE_FORMAT(t1.create_time, '%Y-%m-%d') = DATE_FORMAT(#{createTime}, '%Y-%m-%d')-->
<!-- </if>-->
<if test="startTime != null">
and DATE_FORMAT(t1.create_time, '%Y-%m-%d') &gt;= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
</if>
<if test="endTime != null">
and DATE_FORMAT(t1.create_time, '%Y-%m-%d') &lt;= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
</if>
<if test="startDate != null">
and DATE_FORMAT(t1.start_date, '%Y-%m-%d') &gt;= DATE_FORMAT(#{startDate}, '%Y-%m-%d')
</if>
<if test="endDate != null">
and DATE_FORMAT(t1.end_date, '%Y-%m-%d') &lt;= DATE_FORMAT(#{endDate}, '%Y-%m-%d')
</if> </if>
</where> </where>
order by create_time desc order by create_time desc
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
s.update_time, s.update_time,
s.arrival_time, s.arrival_time,
s.remark s.remark
from s_order s join s_consumer_coupon c on s.coupon_id = c.id from s_order s left join s_consumer_coupon c on s.coupon_id = c.id
where s.pay_status = 1 where s.pay_status = 1
and s.is_delete = 0 and s.is_delete = 0
<if test="couponName !=null and couponName!= ''">and c.name = #{couponName}</if> <if test="couponName !=null and couponName!= ''">and c.name = #{couponName}</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment