Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
d36c077bea
@ -217,10 +217,15 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
||||
queryWrapper.eq(CardFuelRecord::getStoreId,cardFuelRecordDTO.getStoreId());
|
||||
queryWrapper.eq(CardFuelRecord::getMtUserId,cardFuelRecordDTO.getMtUserId());
|
||||
List<CardFuelRecord> cardFuelRecords = cardFuelRecordMapper.selectList(queryWrapper);
|
||||
Optional<CardFuelRecord> max = cardFuelRecords.stream().min(Comparator.comparing(CardFuelRecord::getLockupPrice));
|
||||
CardFuelRecord cardFuelRecord = max.get();
|
||||
CardFuelRecord cardFuelRecord = new CardFuelRecord();
|
||||
|
||||
if (ObjectUtils.isNotEmpty(cardFuelRecords)){
|
||||
Optional<CardFuelRecord> max = cardFuelRecords.stream().max(Comparator.comparing(CardFuelRecord::getLockupPrice));
|
||||
cardFuelRecord = max.get();
|
||||
}
|
||||
CardFuelDiesel cardFuelDiesel = cardFuelDieselService.getById(cardFuelRecord.getCardFuelId());
|
||||
if ("2".equals(cardFuelDiesel.getActiveTime())){
|
||||
|
||||
if (ObjectUtils.isNotEmpty(cardFuelDiesel) && "2".equals(cardFuelDiesel.getActiveTime())){
|
||||
cardFuelRecordDTO.setExpireTime(cardFuelDiesel.getEndTime());
|
||||
}else {
|
||||
LocalDate today = LocalDate.now(); // 获取当前日期
|
||||
|
@ -28,6 +28,8 @@ public class HandoverRecord extends BaseEntity {
|
||||
* 交班数据记录
|
||||
*/
|
||||
private String recordData;
|
||||
@TableField(exist = false)
|
||||
private String totalPayMoney;
|
||||
private String staffName;
|
||||
private String type;
|
||||
private String status;
|
||||
@ -36,6 +38,10 @@ public class HandoverRecord extends BaseEntity {
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date startTime;
|
||||
@TableField(exist = false)
|
||||
private String startTime1;
|
||||
@TableField(exist = false)
|
||||
private String endTime1;
|
||||
/**
|
||||
* 交班结束时间
|
||||
*/
|
||||
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.dto.AllOrderInfoDto;
|
||||
import com.fuint.business.order.entity.AllOrderInfo;
|
||||
import com.fuint.business.order.entity.CardBalanceChange;
|
||||
import com.fuint.business.order.entity.HandoverRecord;
|
||||
import com.fuint.business.order.vo.AllOrderInfoVo;
|
||||
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
||||
import com.fuint.business.store.entity.MtStore;
|
||||
@ -47,4 +48,5 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
|
||||
|
||||
AllOrderInfoVo getIndexData4Pos(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
||||
|
||||
AllOrderInfoVo getHandOverList(HandoverRecord record);
|
||||
}
|
||||
|
@ -365,6 +365,32 @@
|
||||
all_order_info
|
||||
|
||||
</select>
|
||||
<!-- WHERE-->
|
||||
<select id="getHandOverList" resultType="com.fuint.business.order.vo.AllOrderInfoVo">
|
||||
SELECT
|
||||
SUM(pay_money) AS totalPayMoney,
|
||||
COUNT(*) AS totalCount,
|
||||
COUNT(CASE WHEN status = 'refund' THEN 1 ELSE NULL END) AS totalRefund -- 计算退款订单的总数
|
||||
|
||||
-- SUM(CASE WHEN status = 'refund' THEN pay_money ELSE 0 END) AS totalRefund
|
||||
FROM
|
||||
all_order_info
|
||||
<where>
|
||||
staff_id = #{staffId}
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND start_time >= #{startTime} -- 开始时间检索
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND end_time <= #{endTime} -- 结束时间检索
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
<!-- WHERE-->
|
||||
<!-- DATE(pay_time) = CURDATE();-->
|
||||
<!-- <if test="startTime != null and startTime != ''"><!– 开始时间检索 –>-->
|
||||
<!-- and date_format(start_time,'%y%m%d') >= date_format(#{startTime},'%y%m%d')-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="endTime != null and endTime != ''"><!– 结束时间检索 –>-->
|
||||
<!-- and date_format(end_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')-->
|
||||
<!-- </if>-->
|
||||
</mapper>
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.dto.AllOrderInfoDto;
|
||||
import com.fuint.business.order.entity.AllOrderInfo;
|
||||
import com.fuint.business.order.entity.CashierOrder;
|
||||
import com.fuint.business.order.entity.HandoverRecord;
|
||||
import com.fuint.business.order.vo.AllOrderInfoVo;
|
||||
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
||||
import com.fuint.framework.exception.BusinessCheckException;
|
||||
@ -91,5 +92,4 @@ public interface AllOrderInfoService {
|
||||
AllOrderInfoVo getIndexData4Pos();
|
||||
AllOrderInfoVo getOperatingDataPos(AllOrderInfoDto allOrderInfo);
|
||||
|
||||
|
||||
}
|
||||
|
@ -15,10 +15,7 @@ import com.fuint.business.convenienceSore.service.LJGoodsService;
|
||||
import com.fuint.business.convenienceSore.service.StockTrackService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||
import com.fuint.business.order.dto.AllOrderInfoDto;
|
||||
import com.fuint.business.order.entity.AllOrderInfo;
|
||||
import com.fuint.business.order.entity.CashierOrder;
|
||||
import com.fuint.business.order.entity.LJOrder;
|
||||
import com.fuint.business.order.entity.OilOrder;
|
||||
import com.fuint.business.order.entity.*;
|
||||
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
||||
import com.fuint.business.order.service.*;
|
||||
import com.fuint.business.order.vo.AllOrderInfoVo;
|
||||
|
@ -1,12 +1,15 @@
|
||||
package com.fuint.business.order.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.member.entity.LJStaff;
|
||||
import com.fuint.business.member.service.ILJStaffService;
|
||||
import com.fuint.business.order.entity.HandoverRecord;
|
||||
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
||||
import com.fuint.business.order.mapper.HandoverRecordMapper;
|
||||
import com.fuint.business.order.service.AllOrderInfoService;
|
||||
import com.fuint.business.order.service.HandoverRecordService;
|
||||
import com.fuint.business.store.entity.MtStore;
|
||||
import com.fuint.business.store.service.StoreService;
|
||||
@ -62,6 +65,9 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
return this.handoverRecordMapper.queryById(id);
|
||||
}
|
||||
|
||||
|
||||
@Resource
|
||||
AllOrderInfoMapper allOrderInfoMapper;
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
@ -73,6 +79,17 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
public IPage<HandoverRecord> queryByPage(@Param("page") Page page,@Param("handoverRecord") HandoverRecord handoverRecord) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
handoverRecord.setStoreId(nowAccountInfo.getStoreId());
|
||||
IPage<HandoverRecord> handoverRecordIPage = this.handoverRecordMapper.queryAllByLimit(page, handoverRecord);
|
||||
|
||||
for (HandoverRecord record : handoverRecordIPage.getRecords()) {
|
||||
|
||||
DateTime dateTime = DateTime.of(record.getStartTime());
|
||||
DateTime dateTime1 = DateTime.of(record.getEndTime());
|
||||
record.setEndTime1(dateTime.toString());
|
||||
record.setStartTime1(dateTime1.toString());
|
||||
allOrderInfoMapper.getHandOverList(record);
|
||||
record.setTotalPayMoney(record.getTotalPayMoney());
|
||||
}
|
||||
return this.handoverRecordMapper.queryAllByLimit(page, handoverRecord);
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
</view>
|
||||
<view class="b-ss">
|
||||
<view class="">今日累计:¥{{indexData.totalPayMoney}}</view>
|
||||
<view class="d-s">
|
||||
<view class="d-s" @click="jump()">
|
||||
<view class="">交班记录</view>
|
||||
<u-icon name="arrow-right" color="#fff" size="18"></u-icon>
|
||||
</view>
|
||||
@ -67,8 +67,8 @@
|
||||
totalPayMoney: '0',
|
||||
totalCount: '0',
|
||||
totalRefund: '0',
|
||||
}
|
||||
|
||||
},
|
||||
form: {}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
@ -110,7 +110,11 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
jump() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesHome/changeShifts/list'
|
||||
})
|
||||
},
|
||||
// 获取销售数据
|
||||
getIndexData() {
|
||||
request({
|
||||
|
@ -7,9 +7,9 @@
|
||||
<view class="">-</view>
|
||||
<view class="time-box" @click="show = true">结束日期</view>
|
||||
</view>
|
||||
<view class="box_">
|
||||
<view class="box_" v-for="item,index in listData">
|
||||
<view class="top-title">
|
||||
<view class="name_">姓名</view>
|
||||
<view class="name_">{{item.staffName}}</view>
|
||||
<view class="price_">¥400.00</view>
|
||||
</view>
|
||||
<view class="time">2024-05-11 07:10-2024-05-13 16:45</view>
|
||||
@ -21,6 +21,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from "../../utils/request";
|
||||
|
||||
import headers from '../../components/header/headers.vue'
|
||||
|
||||
export default {
|
||||
@ -29,12 +31,19 @@
|
||||
titles: "交班记录",
|
||||
show: false,
|
||||
value1: Number(new Date()),
|
||||
|
||||
listData: [],
|
||||
form: {
|
||||
page: 1,
|
||||
pageSize: 10000,
|
||||
beginTime: '',
|
||||
endTime: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// this.actList = ["1", "1", "1", "1", "1", ]
|
||||
// this.status = "nomore" 底部刷新结束
|
||||
this.getIndexData()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log("刷新");
|
||||
@ -52,6 +61,23 @@
|
||||
methods: {
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
// 获取销售数据
|
||||
getIndexData() {
|
||||
request({
|
||||
url: 'business/handoverRecord/queryByPage',
|
||||
method: 'get',
|
||||
params: this.form
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.listData = res.data.records
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data,
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user