Merge branch 'dev' of http://122.51.230.86:3000/dianliang/lanan-system into dev
# Conflicts: # dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/entity/DlTicketWares.java
This commit is contained in:
commit
e6cb2ba276
@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.iocoder.yudao.common.RepairErrorCodeConstants;
|
||||
import cn.iocoder.yudao.common.SoStatusEnum;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.base.service.RepairWorkerService;
|
||||
import cn.iocoder.yudao.module.company.entity.Company;
|
||||
import cn.iocoder.yudao.module.company.service.CompanyService;
|
||||
import cn.iocoder.yudao.module.project.entity.RepairWares;
|
||||
@ -85,6 +86,10 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
@Lazy
|
||||
private DlRepairTitemService titemService;
|
||||
|
||||
@Resource
|
||||
@Lazy
|
||||
private RepairWorkerService repairWorkerService;
|
||||
|
||||
/**
|
||||
* 采购单/领料单 新增
|
||||
*
|
||||
@ -165,6 +170,16 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
@Override
|
||||
public void voidRepairSo(DlRepairSoReqVO repairSoReqVO) {
|
||||
baseMapper.updateById(repairSoReqVO);
|
||||
|
||||
// 查主表
|
||||
DlRepairSo so = baseMapper.selectById(repairSoReqVO.getId());
|
||||
// 查当前登录操作人的userId
|
||||
Long loginUserId = SecurityFrameworkUtils.getLoginUserId();
|
||||
// 如果主表记录的领退料人与操作人一致,即是员工点击的作废,即需要通知仓库
|
||||
boolean flag = so.getUserId().equals(loginUserId);
|
||||
if (flag){
|
||||
repairWorkerService.sentMessage(Long.valueOf(so.getCreator()), (so.getSoType().equals("02") ? "领料单:" : "退料单:") + so.getSoNo() + "已被" + so.getUserName() + "作废");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -249,6 +264,11 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
List<DlTwItem> flag = list.stream().filter(item -> !item.getWaresStatus().equals("01")).collect(Collectors.toList());
|
||||
dlTicketWares.setStatus(CollectionUtil.isEmpty(flag) ? "03" : "04");
|
||||
ticketWaresService.updateById(dlTicketWares);
|
||||
|
||||
// 查主表记录
|
||||
DlRepairSo newSo = baseMapper.selectById(id);
|
||||
// 通知仓库
|
||||
repairWorkerService.sentMessage(Long.valueOf(newSo.getCreator()), newSo.getUserName() + "已确认领料单:" + newSo.getSoNo());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -351,6 +371,11 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
BigDecimal partPrice = newTickets.getPartPrice() == null ? BigDecimal.ZERO : newTickets.getPartPrice();
|
||||
newTickets.setTotalPrice(projectPrice.add(partPrice).add(otherPrice));
|
||||
ticketsService.updateById(newTickets);
|
||||
|
||||
// 查主表
|
||||
DlRepairSo newSo = baseMapper.selectById(id);
|
||||
// 通知仓库
|
||||
repairWorkerService.sentMessage(Long.valueOf(newSo.getCreator()), newSo.getUserName() + "已确认退料单:" + newSo.getSoNo());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,6 +57,7 @@ public class DlTicketWares extends TenantBaseDO {
|
||||
|
||||
/** 维修顾问name(system_user的nickname) */
|
||||
private String adviserName;
|
||||
|
||||
/** 客户车辆的车牌号(dl_repair_tickets中的carNo) */
|
||||
private String licenseNumber;
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
<select id="customerSource" resultType="cn.iocoder.yudao.module.base.vo.RepairStatisticsVO">
|
||||
SELECT
|
||||
COALESCE(sdd.label, '未知') AS name,
|
||||
COUNT(bcm.id) AS vale
|
||||
COUNT(bcm.id) AS value
|
||||
FROM
|
||||
base_customer_main bcm
|
||||
LEFT JOIN system_dict_data sdd ON bcm.data_from = sdd.value AND sdd.dict_type = 'cus_data_from' AND sdd.deleted = 0
|
||||
@ -51,7 +51,7 @@
|
||||
<select id="paymentWay" resultType="cn.iocoder.yudao.module.base.vo.RepairStatisticsVO">
|
||||
SELECT
|
||||
COALESCE(sdd.label, '未知') AS name,
|
||||
COUNT(roi.id)
|
||||
COUNT(roi.id) AS value
|
||||
FROM
|
||||
repair_order_info roi
|
||||
LEFT JOIN system_dict_data sdd ON roi.pay_type = sdd.value AND sdd.dict_type = 'repair_pay_type' AND sdd.deleted = 0
|
||||
|
@ -19,7 +19,7 @@
|
||||
sale_name = #{saleName},
|
||||
</if>
|
||||
</set>
|
||||
WHERE ticket_id = #{ticketId}
|
||||
WHERE ticket_id = #{ticketId} and project_id = #{projectId}
|
||||
</update>
|
||||
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
<result property="repairName" column="repair_name" />
|
||||
<result property="adviserId" column="adviser_id" />
|
||||
<result property="adviserName" column="adviser_name" />
|
||||
<result property="licenseNumber" column="license_number" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_SQL">
|
||||
@ -24,7 +25,8 @@
|
||||
dtw.repair_id as repair_id,
|
||||
dtw.repair_name as repair_name,
|
||||
dtw.adviser_id as adviser_id,
|
||||
dtw.adviser_name as adviser_name
|
||||
dtw.adviser_name as adviser_name,
|
||||
dtw.license_number
|
||||
from dl_ticket_wares dtw
|
||||
left join dl_repair_tickets drt
|
||||
on dtw.ticket_id = drt.id
|
||||
@ -39,7 +41,7 @@
|
||||
or
|
||||
drt.ticket_no like concat('%', #{map.query}, '%')
|
||||
or
|
||||
drt.car_no like concat('%', #{map.query}, '%')
|
||||
dtw.license_number like concat('%', #{map.query}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="map.type != null and map.type != ''">
|
||||
|
Loading…
Reference in New Issue
Block a user