no message

This commit is contained in:
wangh 2024-05-23 12:01:13 +08:00
parent 891d047581
commit 0cc396634b
7 changed files with 42 additions and 0 deletions

1
.gitignore vendored
View File

@ -22,4 +22,5 @@ bin-release/
/gasStation-uni/uni_modules/
/gasStation-uni/unpackage/
/gasStation-uni/node_modules/
/pos-uni/unpackage/
node_modules

View File

@ -192,4 +192,10 @@ public class AllOrderInfoController extends BaseController {
public ResponseObject runningWaterByTissue(){
return getSuccessResult(TokenUtil.getNowAccountInfo());
}
@GetMapping("getIndexData4Pos")
public ResponseObject getIndexData4Pos(){
return getSuccessResult(allOrderInfoService.getIndexData4Pos());
}
}

View File

@ -44,4 +44,7 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
* @return
*/
Integer selectByPayStatusNum(AllOrderInfo allOrderInfo);
AllOrderInfoVo getIndexData4Pos(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
}

View File

@ -344,4 +344,14 @@
</where>
</select>
<select id="getIndexData4Pos" resultType="com.fuint.business.order.vo.AllOrderInfoVo">
SELECT
SUM(pay_money) AS total_pay_money,
COUNT(*) AS total_count,
SUM(CASE WHEN status = 'refund' THEN pay_money ELSE 0 END) AS total_refund
FROM
all_order_info
WHERE
DATE(pay_time) = CURDATE();
</select>
</mapper>

View File

@ -87,4 +87,7 @@ public interface AllOrderInfoService {
AllOrderInfoVo runningWaterByData(Page page, AllOrderInfoDto allOrderInfo);
IPage<SysDeptVo> runningWaterByTissue(Page page, AllOrderInfoDto allOrderInfo);
AllOrderInfoVo getIndexData4Pos();
}

View File

@ -893,6 +893,23 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
IPage<SysDeptVo> sysDepts = sysDeptMapper.selectChildrenDeptById2(page, nowAccountInfo.getDeptId(),allOrderInfo.getDeptId(), allOrderInfo.getDeptType());
return sysDepts;
}
public AllOrderInfoVo getIndexData4Pos(){
return allOrderInfoMapper.getIndexData4Pos(new AllOrderInfoDto());
}
// 获取经营数据
public AllOrderInfoVo getOperatingDataPos(){
return allOrderInfoMapper.getIndexData4Pos(new AllOrderInfoDto());
}
private long dayCount(String beginTimeStr, String endTimeStr ) {
// 将字符串表示的时间转换成 LocalDate 对象
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/M/d");

View File

@ -3,6 +3,7 @@ package com.fuint.system.dept.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.order.vo.AllOrderInfoVo;
import com.fuint.system.dept.entity.SysDept;
import com.fuint.system.dept.vo.SysDeptVo;
import org.apache.ibatis.annotations.Param;
@ -121,4 +122,5 @@ public interface SysDeptMapper extends BaseMapper<SysDept>
int updateStatusByList(@Param("list") List<SysDept> sysDeptsList);
}