更新0926

This commit is contained in:
xyc 2025-09-26 14:32:41 +08:00
parent 9dc4e188f0
commit 2afe93bf6e
3 changed files with 29 additions and 1 deletions

View File

@ -84,6 +84,7 @@ import com.deepoove.poi.plugin.table.HackLoopTableRenderPolicy;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
@ -742,6 +743,16 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
if (ObjectUtil.isEmpty(one)) {
throw exception0(500, "未找到该笔订单");
}
if ("0".equals(repairTicketsRespVO.getIsPaid())) {
// 未支付
one.setPayRemark(repairTicketsRespVO.getRemark());
//更新
repairOrderInfoService.updateById(one);
// 记录日志
repairRecordsService.saveRepairRecord(one.getGoodsId(), null, RecordTypeEnum.SK.getCode(), "未收款-"+repairTicketsRespVO.getRemark(), null);
return;
}
RepairOrderInfo repairOrderInfo = new RepairOrderInfo();
repairOrderInfo.setId(one.getId());
repairOrderInfo.setPayType(repairTicketsRespVO.getPayType());
@ -809,7 +820,17 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
* @Date 10:13 2025/8/20
* @Param [repairTicketsRespVO]
**/
@Transactional
public void setTicketsSettlement(TicketsSettlementVO vo) {
/*通过工单id查询工单配件申请表*/
List<DlTicketWares> list = ticketWaresService.list(Wrappers.<DlTicketWares>lambdaQuery()
.eq(DlTicketWares::getTicketId, vo.getTicketId()));
// 判断是否有未申领完成的
if (list.stream().anyMatch(item -> item.getStatus().equals("0"))) {
throw exception0(500, "请先完成配件申领");
}
/*添加结算数据*/
// 将vo转为json
String json = JSON.toJSONString(vo);
@ -1086,6 +1107,9 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
for (Map<String, Object> receivable : receivables) {
// 转换为TicketsSettlementVO
Object otherData = receivable.get("otherData");
if (ObjectUtil.isNull(otherData)) {
continue;
}
TicketsSettlementVO settlement = JSONObject.parseObject(
otherData.toString(), TicketsSettlementVO.class
);

View File

@ -91,4 +91,7 @@ public class DlRepairTicketsRespVO extends DlRepairTickets {
/** 结算时间 */
private LocalDateTime settlementTime;
private String payTime;
/** 是否支付 */
private String isPaid;
}

View File

@ -93,7 +93,8 @@
select 1 from dl_tw_item dti where dti.tw_id = dtw.id and dti.deleted = '0'
<choose>
<when test="map.userRole == 5 and map.isBack == false">
and (dti.wares_count > dti.wares_already_count and dti.wares_status = '1')
-- and (dti.wares_count > dti.wares_already_count and dti.wares_status = '1')
and ( dti.wares_status = '1')
</when>
<when test="map.userRole == 5 and map.isBack == true">
and (dti.wares_already_count > 0 and dti.wares_status = '1')