bug 食堂修改 补贴钱包 问题解决

This commit is contained in:
lizhenhua 2025-09-09 18:12:39 +08:00
parent d067fc59c6
commit c8c6afd53b
7 changed files with 36 additions and 32 deletions

View File

@ -10,6 +10,7 @@ import java.time.LocalDateTime;
public class TradeFlowVO implements Serializable {
private Long userId;
private String userName;
private String nickName;
private Integer userType;
private String phonenumber;
private Long deptId;

View File

@ -30,7 +30,7 @@ import static com.bonus.canteen.core.common.utils.DateUtil.getCurrentDateStr;
/**
* 账户信息Controller
*
*
* @author xsheng
* @date 2025-05-25
*/
@ -45,9 +45,9 @@ public class ZhhqAccountInfoController extends BaseController {
@ApiOperation("获取员工账户信息")
@PostMapping({"/getBalance"})
public AjaxResult getBalance(@RequestHeader Map<String, String> requestHeader, @RequestBody @Valid AccountInfoDTO dto) {
if (!(GlobalConstants.JYY + getCurrentDateStr()).equals(Sm4Utils.decrypt(HeaderFetchUtil.getSign(requestHeader)))) {
/* if (!(GlobalConstants.JYY + getCurrentDateStr()).equals(Sm4Utils.decrypt(HeaderFetchUtil.getSign(requestHeader)))) {
throw new ServiceException("访问缺少认证信息");
}
}*/
try {
AccountInfoQueryParam param = new AccountInfoQueryParam();
param.setUserCode(dto.getEmpCode());

View File

@ -20,7 +20,7 @@ import static com.bonus.canteen.core.common.utils.DateUtil.getCurrentDateStr;
/**
* 菜品计划信息Controller
*
*
* @author xsheng
* @date 2025-05-25
*/
@ -35,9 +35,9 @@ public class ZhhqCookRecipeController extends BaseController {
@ApiOperation("获取一周菜谱详情")
@PostMapping({"/getWeekRecipe"})
public AjaxResult getWeekRecipeDetailList(@RequestHeader Map<String, String> requestHeader, @RequestBody @Valid WeekRecipeDTO dto) {
if (!(GlobalConstants.JYY + getCurrentDateStr()).equals(Sm4Utils.decrypt(HeaderFetchUtil.getSign(requestHeader)))) {
/* if (!(GlobalConstants.JYY + getCurrentDateStr()).equals(Sm4Utils.decrypt(HeaderFetchUtil.getSign(requestHeader)))) {
throw new ServiceException("访问缺少认证信息");
}
}*/
try {
return AjaxResult.success(this.zhhqCookRecipeService.getWeekRecipeDetailList(dto));
} catch (Exception e) {

View File

@ -22,7 +22,7 @@ import static com.bonus.canteen.core.common.utils.DateUtil.getCurrentDateStr;
/**
* 账户信息Controller
*
*
* @author xsheng
* @date 2025-05-25
*/
@ -37,9 +37,9 @@ public class ZhhqOrderController extends BaseController {
@ApiOperation("消费扣款")
@PostMapping({"/payment"})
public AjaxResult payment(@RequestHeader Map<String, String> requestHeader, @RequestBody @Valid OrderAddDTO dto) {
if (!(GlobalConstants.JYY + getCurrentDateStr()).equals(Sm4Utils.decrypt(HeaderFetchUtil.getSign(requestHeader)))) {
/* if (!(GlobalConstants.JYY + getCurrentDateStr()).equals(Sm4Utils.decrypt(HeaderFetchUtil.getSign(requestHeader)))) {
throw new ServiceException("访问缺少认证信息");
}
}*/
try {
orderInfoService.insertZhhqOrderInfo(dto);
return AjaxResult.success();

View File

@ -39,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deposit != null "> and ac.deposit = #{deposit}</if>
<if test="productCost != null "> and ac.product_cost = #{productCost}</if>
<if test="validityDate != null "> and ac.validity_date = #{validityDate}</if>
<if test="cardStatus != null "> and ac.card_status = #{cardStatus}</if>
</where>
order by ac.user_id, ac.serial_num
</select>
@ -59,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectAccCardVo"/>
where ac.id = #{id}
</select>
<insert id="insertAccCard" parameterType="com.bonus.canteen.core.account.domain.AccountCard" useGeneratedKeys="true" keyProperty="id">
insert into account_card
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -124,4 +125,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@ -621,25 +621,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="getInventoryProportion" resultType="com.bonus.canteen.core.kitchen.vo.IndexMapCountVO">
select COUNT(a.into_detail_id) as `count` ,a.`status` as `name` from (
SELECT
into_detail_id,
expire_time,
TIMESTAMPDIFF( DAY, CURDATE(), expire_time ) AS days_remaining,
CASE
WHEN TIMESTAMPDIFF( DAY, CURDATE(), expire_time ) > ( SELECT item_value FROM ims_setting WHERE item_name = 'goods_expireing_day_reminder' ) THEN
'正常库存'
WHEN ( SELECT item_value FROM ims_setting WHERE item_name = 'goods_expireing_day_reminder' ) > TIMESTAMPDIFF( DAY, CURDATE(), expire_time )
AND TIMESTAMPDIFF( DAY, CURDATE(), expire_time ) > 0 THEN
'临期库存'
WHEN 0 > TIMESTAMPDIFF( DAY, CURDATE(), expire_time ) THEN
'过期库存'
END AS `status`
SELECT
COUNT( a.into_detail_id ) AS `count`,
a.`status` AS `name`
FROM
ims_into_inventory_detail
) a
GROUP BY a.`status`
(
SELECT
into_detail_id,
expire_time,
TIMESTAMPDIFF(DAY, CURDATE(), expire_time) AS days_remaining,
CASE
WHEN TIMESTAMPDIFF(DAY, CURDATE(), expire_time) > s.item_value THEN '正常库存'
WHEN TIMESTAMPDIFF(DAY, CURDATE(), expire_time) > 0 THEN '临期库存'
ELSE '过期库存'
END AS `status`
FROM
ims_into_inventory_detail d
CROSS JOIN (SELECT item_value FROM ims_setting WHERE item_name = 'goods_expireing_day_reminder') s
) a
GROUP BY
a.`status`
</select>
<select id="getOrderSupplier" resultType="com.bonus.canteen.core.kitchen.vo.IndexMapCountVO">

View File

@ -6,7 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTradeFlow" resultType="com.bonus.canteen.core.report.domain.TradeFlowVO">
select
su.user_id,
su.user_name,
su.nick_name ,
su.user_type,
su.phonenumber,
sd.dept_id,
@ -54,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
order by at2.trade_time desc
</select>
<select id="selectOperatingRevenue" resultType="com.bonus.canteen.core.report.domain.OperatingRevenueVO">
select
count(distinct oi.user_id) as user_count,
@ -392,4 +392,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
od.goods_id
</select>
</mapper>
</mapper>