调整代码,通过ID获取名称,包括护理单元、长者、员工、申请人
This commit is contained in:
parent
288814add8
commit
968db33eaa
|
|
@ -15,6 +15,9 @@ import java.util.List;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
public interface InvoicingOrdersMapper extends BaseMapper<InvoicingOrders> {
|
||||
InvoicingOrders getNuById(@Param("nuId") String nuId);
|
||||
InvoicingOrders getEmployeeById(@Param("employeeId") String employeeId);
|
||||
InvoicingOrders getCustomerById(@Param("customerId") String customerId);
|
||||
InvoicingOrders getOnLineEmployeeById(@Param("employeeId") String employeeId);
|
||||
InvoicingOrders getDirectivePrice(@Param("directiveId") String directiveId);
|
||||
List<InvoicingOrders> queryDataPoolList(InvoicingOrders orders);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,30 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.biz.invoicing.order.mapper.InvoicingOrdersMapper">
|
||||
|
||||
<select id="getNuById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select
|
||||
a.nu_id as nuId,
|
||||
a.nu_name as nuName
|
||||
from nu_base_info a
|
||||
where a.nu_id = #{nuId}
|
||||
</select>
|
||||
|
||||
<select id="getEmployeeById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select
|
||||
a.id as employeeId,
|
||||
a.name as employeeName
|
||||
from nu_biz_employees_info a
|
||||
where a.id = #{employeeId}
|
||||
</select>
|
||||
|
||||
<select id="getCustomerById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select
|
||||
a.id as customerId,
|
||||
a.name as customerName
|
||||
from nu_biz_elder_info a
|
||||
where a.id = #{customerId}
|
||||
</select>
|
||||
|
||||
<select id="getOnLineEmployeeById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select
|
||||
a.id as employeeId,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.nu.modules.biz.invoicing.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.entity.InvoicingOrdersEntity;
|
||||
import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
|
|
@ -15,6 +16,6 @@ import java.util.Date;
|
|||
public interface IEmpOrdersService extends IService<InvoicingOrders> {
|
||||
|
||||
InvoicingOrders employeeScreening(String directiveId, String customerId, Date startTime);
|
||||
|
||||
void getNames(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
InvoicingOrders getOnLineEmployeeById(String employeeId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,78 @@ public class EmpOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Inv
|
|||
private List<SendOrderRuleSub> ruleSubList;
|
||||
|
||||
/**
|
||||
* 获取派单规则
|
||||
* 获取护理单元名称
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
private void getNuName(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
if(invoicingOrdersEntity.getNuName()==null||invoicingOrdersEntity.getNuName().equals("")){
|
||||
String nuId = invoicingOrdersEntity.getNuId();
|
||||
if(nuId!=null&&!nuId.equals("")){
|
||||
InvoicingOrders nuInfo = baseMapper.getNuById(nuId);
|
||||
if(nuInfo!=null){
|
||||
invoicingOrdersEntity.setNuName(nuInfo.getNuName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户名称
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
private void getCustomerName(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
if(invoicingOrdersEntity.getCustomerName()==null||invoicingOrdersEntity.getCustomerName().equals("")){
|
||||
String customerId = invoicingOrdersEntity.getCustomerId();
|
||||
if(customerId!=null&&!customerId.equals("")){
|
||||
InvoicingOrders customerInfo = baseMapper.getCustomerById(customerId);
|
||||
if(customerInfo!=null){
|
||||
invoicingOrdersEntity.setCustomerName(customerInfo.getCustomerName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工姓名
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
private void getEmployeeName(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
if(invoicingOrdersEntity.getEmployeeName()==null||invoicingOrdersEntity.getEmployeeName().equals("")){
|
||||
String employeeId = invoicingOrdersEntity.getEmployeeId();
|
||||
if(employeeId!=null&&!employeeId.equals("")){
|
||||
InvoicingOrders employeeInfo = baseMapper.getEmployeeById(employeeId);
|
||||
if(employeeInfo!=null){
|
||||
invoicingOrdersEntity.setEmployeeName(employeeInfo.getEmployeeName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取申请人姓名
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
private void getInitiatorName(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
if(invoicingOrdersEntity.getInitiatorName()==null||invoicingOrdersEntity.getInitiatorName().equals("")){
|
||||
String initiatorId = invoicingOrdersEntity.getInitiatorId();
|
||||
if(initiatorId!=null&&!initiatorId.equals("")){
|
||||
InvoicingOrders initiatorInfo = baseMapper.getEmployeeById(initiatorId);
|
||||
if(initiatorInfo!=null){
|
||||
invoicingOrdersEntity.setInitiatorName(initiatorInfo.getEmployeeName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void getNames(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
getNuName(invoicingOrdersEntity);
|
||||
getCustomerName(invoicingOrdersEntity);
|
||||
getEmployeeName(invoicingOrdersEntity);
|
||||
getInitiatorName(invoicingOrdersEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取在线员工
|
||||
*/
|
||||
@Override
|
||||
public InvoicingOrders getOnLineEmployeeById(String employeeId){
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
|||
*/
|
||||
@Override
|
||||
public void flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
empOrdersService.getNames(invoicingOrdersEntity);
|
||||
List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
if(flowList!=null){
|
||||
Calendar c = Calendar.getInstance();
|
||||
|
|
@ -88,6 +89,7 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
|||
*/
|
||||
@Override
|
||||
public void flowQlsqR(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
empOrdersService.getNames(invoicingOrdersEntity);
|
||||
InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity();
|
||||
flowCode.setFlowCode("ql_sq");
|
||||
List<InvoicingOrders> flowList = baseMapper.getFlowList(flowCode);
|
||||
|
|
@ -114,6 +116,7 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
|||
*/
|
||||
@Override
|
||||
public void flowQlck(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
empOrdersService.getNames(invoicingOrdersEntity);
|
||||
List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
if(flowList!=null){
|
||||
Calendar c = Calendar.getInstance();
|
||||
|
|
@ -157,6 +160,7 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
|||
*/
|
||||
@Override
|
||||
public void flowQlht(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
empOrdersService.getNames(invoicingOrdersEntity);
|
||||
InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity();
|
||||
flowCode.setFlowCode("ql_ck");
|
||||
List<InvoicingOrders> flowList = baseMapper.getFlowList(flowCode);
|
||||
|
|
@ -195,6 +199,7 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
|||
*/
|
||||
@Override
|
||||
public void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
empOrdersService.getNames(invoicingOrdersEntity);
|
||||
InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity();
|
||||
flowCode.setFlowCode("ql_ck");
|
||||
List<InvoicingOrders> flowList = baseMapper.getFlowList(flowCode);
|
||||
|
|
@ -232,6 +237,7 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
|||
*/
|
||||
@Override
|
||||
public void flowQlhtzf(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
empOrdersService.getNames(invoicingOrdersEntity);
|
||||
InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity();
|
||||
flowCode.setFlowCode("ql_sq");
|
||||
List<InvoicingOrders> flowList = baseMapper.getFlowList(flowCode);
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ public class ThOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
|||
*/
|
||||
@Override
|
||||
public void flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
empOrdersService.getNames(invoicingOrdersEntity);
|
||||
List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
if(flowList!=null){
|
||||
Calendar c = Calendar.getInstance();
|
||||
|
|
|
|||
Loading…
Reference in New Issue