feat:app检修开门、关门

This commit is contained in:
dzc committed 2025-04-21 10:22:03 +08:00
1 parent ed87865e96
commit 30ee1ed8e3
3 files changed
+29 -1

No files matched your search

@@ -100,6 +100,30 @@ public class HardDoorFlowController {
return R.ok(hardDoorFlowService.openDoorRepertory(dto));
}
@Operation(summary = "app检修开门", description = "app检修开门")
@PostMapping("/app/open-access")
@Idempotent(expireTime = 5, info = "正在开门中,请勿重复操作")
public R appOpenAccess(@Validated @RequestBody HardDoorFlowOpenDto dto) {
PjcloudUser user = SecurityUtils.getUser();
dto.setFlowType(HardDoorFlowBizEnum.ACCESS_OPEN);
dto.setOpenType(HardDoorOpenTypeEnum.MAINTENANCE_UNLOCK);
dto.setUserId(user.getId());
hardDoorFlowService.openDoorAccess(dto);
return R.ok();
}
@Operation(summary = "app检修开门", description = "app检修开门")
@PostMapping("/app/close-access")
@Idempotent(expireTime = 5, info = "正在关门中,请勿重复操作")
public R appCloseAccess(@Validated @RequestBody HardDoorFlowOpenDto dto) {
PjcloudUser user = SecurityUtils.getUser();
dto.setFlowType(HardDoorFlowBizEnum.ACCESS_OPEN);
dto.setOpenType(HardDoorOpenTypeEnum.MAINTENANCE_LOCK);
dto.setUserId(user.getId());
hardDoorFlowService.closeAccess(dto);
return R.ok();
}
/* ************************************* end app end ************************************* */
@Operation(summary = "检修开门", description = "检修开门")
@@ -440,7 +440,8 @@ public class HardOrderTotalServiceImpl implements HardOrderTotalService {
}
if (ObjectUtil.isNotEmpty(walletReduceList)) {
walletReduceList.stream().filter(i -> ObjectUtil.equals(i.getDeptId(), v.getDeptId())).findFirst().ifPresent(i -> {
v.setWalletReducePrice(i.getSum());
// v.setWalletReducePrice(i.getSum());
v.setWalletReducePrice(Math.abs(i.getSum()));
v.setWalletReduceCount(i.getCount());
});
}
@@ -219,6 +219,7 @@
</if>
</where>
group by a.hard_id
order by a.merchant_type asc
</select>
<select id="listCs" resultType="com.bsd.pjcloud.hard.api.vo.order.HardOrderCsVo">
@@ -240,6 +241,7 @@
</if>
</where>
group by a.merchant_id
order by a.merchant_type asc
</select>
<select id="listCsByDay" resultType="com.bsd.pjcloud.hard.api.vo.order.HardOrderCsVo">
@@ -276,6 +278,7 @@
<include refid="whereA"/>
</where>
group by a.pay_type
order by a.merchant_type asc
</select>
<select id="sumAndCount" resultType="com.bsd.pjcloud.hard.api.vo.order.HardOrderSumAndCountVo">