服务指令-请领流程BUG处理

This commit is contained in:
曹磊 2025-12-12 16:59:36 +08:00
parent 78c42e509c
commit 1617e713fb
7 changed files with 49 additions and 24 deletions

View File

@ -71,6 +71,12 @@ public class InvoicingOrdersEntity implements Serializable {
private String serviceDuration;
/**服务描述*/
private String serviceContent;
/**收费价格*/
private BigDecimal tollPrice;
/**提成价格*/
private BigDecimal comPrice;
/**实际提成价格*/
private BigDecimal realComPrice;
/**开始时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")

View File

@ -79,6 +79,12 @@ public class InvoicingOrders implements Serializable {
private String serviceDuration;
/**服务描述*/
private String serviceContent;
/**收费价格*/
private BigDecimal tollPrice;
/**提成价格*/
private BigDecimal comPrice;
/**实际提成价格*/
private BigDecimal realComPrice;
/**开始时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")

View File

@ -16,6 +16,7 @@ import java.util.List;
*/
public interface InvoicingOrdersMapper extends BaseMapper<InvoicingOrders> {
InvoicingOrders getOnLineEmployeeById(@Param("employeeId") String employeeId);
InvoicingOrders getDirectivePrice(@Param("directiveId") String directiveId);
List<InvoicingOrders> queryDataPoolList(InvoicingOrders orders);
List<InvoicingOrders> getEmpPermissionAndOnline(@Param("directiveId") String directiveId, @Param("startTime") Date startTime);
InvoicingOrders getEmpOrderly(@Param("customerId") String customerId);

View File

@ -13,6 +13,14 @@
and a.id = #{employeeId}
</select>
<select id="getDirectivePrice" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select
toll_price as tollPrice,
com_price as comPrice
from nu_config_service_directive a
where b.id = #{directiveId}
</select>
<select id="queryDataPoolList" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select
a.id as poolId,
@ -36,9 +44,6 @@
a.net_mp4_file as netMp4File,
a.service_duration as serviceDuration,
a.service_content as serviceContent,
a.package_id as packageId,
a.package_name as packageName,
a.iz_package as izPackage,
a.start_time as startTime,
a.end_time as endTime,
(case when b.orderly is null then 2 else 1 end) as orderEmp

View File

@ -106,11 +106,11 @@ public class EmpOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Inv
@Override
public InvoicingOrders employeeScreening(String directiveId, String customerId, Date startTime) {
getSendOrderRule();
if (sendOrderRule.getRuleCode().equals("1")) {
if (sendOrderRule.getRuleCode().equals(1)) {
//按优先级
return getByPriority(directiveId, customerId, startTime);
}
if (sendOrderRule.getRuleCode().equals("2")) {
if (sendOrderRule.getRuleCode().equals(2)) {
//按人头
return getByHeadCount(directiveId, customerId, startTime);
}

View File

@ -106,6 +106,10 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
public Result<String> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity){
try {
Calendar c = Calendar.getInstance();
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
ioQw.eq("id", invoicingOrdersEntity.getId());
InvoicingOrders order = this.getOne(ioQw);
InvoicingOrders DirectivePrice = baseMapper.getDirectivePrice(order.getDirectiveId());//获取服务指令价格
InvoicingOrders entity = new InvoicingOrders();
entity.setId(invoicingOrdersEntity.getId());
entity.setFinishTime(c.getTime());
@ -113,6 +117,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
entity.setUpdateBy(invoicingOrdersEntity.getInitiatorId());
entity.setUpdateTime(c.getTime());
entity.setBizType(invoicingOrdersEntity.getFlowCode());
entity.setTollPrice(DirectivePrice.getTollPrice());
entity.setComPrice(DirectivePrice.getComPrice());
baseMapper.updateOrder(entity);
}catch (Exception e){
return Result.error("完成失败:"+e.getMessage());

View File

@ -39,22 +39,6 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
private ISysConfigApi sysConfigApi;
private String serverNetUrl;
private InvoicingOrders getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity,InvoicingOrders flow){
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
ioQw.eq("directive_id", flow.getDirectiveId());
ioQw.eq("nu_id", invoicingOrdersEntity.getNuId());
ioQw.eq("customer_id", invoicingOrdersEntity.getCustomerId());
ioQw.eq("iz_finish", "N");
ioQw.eq("iz_rollback", "N");
ioQw.eq("del_flag", "0");
ioQw.eq("biz_type", invoicingOrdersEntity.getFlowCode());
if(invoicingOrdersEntity.getBizId()!=null&&!invoicingOrdersEntity.getBizId().equals("")){
ioQw.eq("biz_id", invoicingOrdersEntity.getBizId());
}
InvoicingOrders order = this.getOne(ioQw);
return order;
}
/**
* 请领申请
* 护理员点击提交按钮修改请领指令工单bizId
@ -68,7 +52,15 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
if(flowList!=null){
Calendar c = Calendar.getInstance();
InvoicingOrders flow = flowList.get(0);
InvoicingOrders order = getOrderInfo(invoicingOrdersEntity,flow);
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
ioQw.eq("directive_id", flow.getDirectiveId());
ioQw.eq("nu_id", invoicingOrdersEntity.getNuId());
ioQw.eq("customer_id", invoicingOrdersEntity.getCustomerId());
ioQw.eq("iz_finish", "N");
ioQw.eq("iz_rollback", "N");
ioQw.eq("del_flag", "0");
ioQw.eq("biz_type", invoicingOrdersEntity.getFlowCode());
InvoicingOrders order = this.getOne(ioQw);
if(order!=null){
//修改请领单的bizId
InvoicingOrders entity = new InvoicingOrders();
@ -126,7 +118,16 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
if(flowList!=null){
Calendar c = Calendar.getInstance();
InvoicingOrders flow = flowList.get(0);
InvoicingOrders order = getOrderInfo(invoicingOrdersEntity,flow);
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
ioQw.eq("directive_id", flow.getDirectiveId());
ioQw.eq("nu_id", invoicingOrdersEntity.getNuId());
ioQw.eq("customer_id", invoicingOrdersEntity.getCustomerId());
ioQw.eq("iz_finish", "N");
ioQw.eq("iz_rollback", "N");
ioQw.eq("del_flag", "0");
ioQw.eq("biz_type", invoicingOrdersEntity.getFlowCode());
ioQw.eq("biz_id", invoicingOrdersEntity.getBizId());
InvoicingOrders order = this.getOne(ioQw);
String initiatorId = "";
String initiatorName = "";
if(order!=null){
@ -304,7 +305,7 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
nextEntity.setDelFlag("0");
nextEntity.setInitiatorId(initiatorId);
nextEntity.setInitiatorName(initiatorName);
nextEntity.setBeginTime(c.getTime());
nextEntity.setStartTime(c.getTime());
c.add(Calendar.MINUTE,Integer.valueOf(flowSub.getServiceDuration()));
nextEntity.setEndTime(c.getTime());
nextEntity.setEmployeeId(employeeId);