pad接口-查询仓库类指令工单增加执行类型对应中文汉字

This commit is contained in:
1378012178@qq.com 2025-12-30 15:49:14 +08:00
parent 8d9aac2e47
commit 1ae82034b6
4 changed files with 163 additions and 154 deletions

View File

@ -193,5 +193,7 @@ public class InvoicingDirectiveEntity implements Serializable {
private String izEnabled; private String izEnabled;
/** 是否判断单号为空 */ /** 是否判断单号为空 */
private String izEmptyNo; private String izEmptyNo;
/**执行类型文字*/
private String optTypeName;
} }

View File

@ -1,6 +1,7 @@
package com.nu.modules.biz.invoicing.order.mapper; package com.nu.modules.biz.invoicing.order.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nu.entity.InvoicingDirectiveEntity;
import com.nu.entity.InvoicingOrdersEntity; import com.nu.entity.InvoicingOrdersEntity;
import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders; import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -28,4 +29,6 @@ public interface InvoicingOrdersMapper extends BaseMapper<InvoicingOrders> {
InvoicingOrders getFlowOne(InvoicingOrders invoicingOrders); InvoicingOrders getFlowOne(InvoicingOrders invoicingOrders);
void cancelOrder(InvoicingOrders invoicingOrders); void cancelOrder(InvoicingOrders invoicingOrders);
InvoicingOrders getOrderOne(InvoicingOrders invoicingOrders); InvoicingOrders getOrderOne(InvoicingOrders invoicingOrders);
InvoicingDirectiveEntity selectInfoById(String id);
} }

View File

@ -3,33 +3,29 @@
<mapper namespace="com.nu.modules.biz.invoicing.order.mapper.InvoicingOrdersMapper"> <mapper namespace="com.nu.modules.biz.invoicing.order.mapper.InvoicingOrdersMapper">
<select id="getNuById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders"> <select id="getNuById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select select a.nu_id as nuId,
a.nu_id as nuId, a.nu_name as nuName
a.nu_name as nuName
from nu_base_info a from nu_base_info a
where a.nu_id = #{nuId} where a.nu_id = #{nuId}
</select> </select>
<select id="getEmployeeById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders"> <select id="getEmployeeById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select select a.id as employeeId,
a.id as employeeId, a.name as employeeName
a.name as employeeName
from nu_biz_employees_info a from nu_biz_employees_info a
where a.id = #{employeeId} where a.id = #{employeeId}
</select> </select>
<select id="getElderById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders"> <select id="getElderById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select select a.id as elderId,
a.id as elderId, a.name as elderName
a.name as elderName
from nu_biz_elder_info a from nu_biz_elder_info a
where a.id = #{elderId} where a.id = #{elderId}
</select> </select>
<select id="getOnLineEmployeeById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders"> <select id="getOnLineEmployeeById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select select a.id as employeeId,
a.id as employeeId, a.name as employeeName
a.name as employeeName
from nu_biz_employees_info a from nu_biz_employees_info a
where a.del_flag = '0' where a.del_flag = '0'
and a.iz_freeze = 'N' and a.iz_freeze = 'N'
@ -38,81 +34,79 @@
</select> </select>
<select id="getDirectivePrice" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders"> <select id="getDirectivePrice" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select select toll_price as tollPrice,
toll_price as tollPrice, com_price as comPrice
com_price as comPrice
from nu_config_service_directive from nu_config_service_directive
where id = #{directiveId} where id = #{directiveId}
</select> </select>
<select id="queryDataPoolList" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders"> <select id="queryDataPoolList" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select select a.id as poolId,
a.id as poolId, a.biz_id as bizId,
a.biz_id as bizId, a.nu_id as nuId,
a.nu_id as nuId, a.nu_name as nuName,
a.nu_name as nuName, a.elder_id as elderId,
a.elder_id as elderId, a.elder_name as elderName,
a.elder_name as elderName, a.directive_id as directiveId,
a.directive_id as directiveId, a.directive_name as directiveName,
a.directive_name as directiveName, a.cycle_type_id as cycleTypeId,
a.cycle_type_id as cycleTypeId, a.cycle_type as cycleType,
a.cycle_type as cycleType, a.cycle_value as cycleValue,
a.cycle_value as cycleValue, a.preview_file as previewFile,
a.preview_file as previewFile, a.net_preview_file as netPeviewFile,
a.net_preview_file as netPeviewFile, a.preview_file_small as previewFileSmall,
a.preview_file_small as previewFileSmall, a.net_preview_file_small as netPreviewFileSmall,
a.net_preview_file_small as netPreviewFileSmall, a.mp3_file as mp3File,
a.mp3_file as mp3File, a.net_mp3_file as netMp3File,
a.net_mp3_file as netMp3File, a.mp4_file as mp4File,
a.mp4_file as mp4File, a.net_mp4_file as netMp4File,
a.net_mp4_file as netMp4File, a.service_duration as serviceDuration,
a.service_duration as serviceDuration, a.service_content as serviceContent,
a.service_content as serviceContent, a.start_time as startTime,
a.start_time as startTime, a.end_time as endTime,
a.end_time as endTime, (case when b.orderly is null then 2 else 1 end) as orderEmp
(case when b.orderly is null then 2 else 1 end) as orderEmp
from nu_biz_nu_invoicing_directive_data_pool a from nu_biz_nu_invoicing_directive_data_pool a
left join nu_biz_elder_info b on a.elder_id = b.id left join nu_biz_elder_info b on a.elder_id = b.id
where a.iz_orders = 'N' where a.iz_orders = 'N'
order by a.start_time,orderEmp,a.nu_id order by a.start_time, orderEmp, a.nu_id
</select> </select>
<select id="getEmpPermissionAndOnline" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders"> <select id="getEmpPermissionAndOnline" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select select
distinct distinct
a.id as employeeId, a.id as employeeId,
a.name as employeeName, a.name as employeeName,
a.order_cap as orderCap, a.order_cap as orderCap,
ifnull(e.orderNum,0) as orderNum, ifnull(e.orderNum,0) as orderNum,
ifnull(e.totalDuration,0) as totalDuration, ifnull(e.totalDuration,0) as totalDuration,
ifnull(e.totalComPrice,0) as totalComPrice, ifnull(e.totalComPrice,0) as totalComPrice,
e.maxTime, e.maxTime,
ifnull(e.ownCn,0) as ownCn, ifnull(e.ownCn,0) as ownCn,
(case when ifnull(f.orderNum,0) = 0 then 1 else 0 end) as izFree, (case when ifnull(f.orderNum,0) = 0 then 1 else 0 end) as izFree,
0 as level 0 as level
from nu_biz_employees_info a from nu_biz_employees_info a
inner join nu_biz_employees_servcie_tags b on a.id = b.employees_id inner join nu_biz_employees_servcie_tags b on a.id = b.employees_id
inner join nu_service_tag c on c.id = b.tags_id inner join nu_service_tag c on c.id = b.tags_id
inner join nu_servtag_directive d on d.tag_id = c.id inner join nu_servtag_directive d on d.tag_id = c.id
left join ( left join (
select employee_id,count(*) as orderNum, select employee_id,count(*) as orderNum,
sum(service_duration) as totalDuration, sum(service_duration) as totalDuration,
round(sum(ifnull(com_price,0)),4) as totalComPrice, round(sum(ifnull(com_price,0)),4) as totalComPrice,
max(start_time) as maxTime, max(start_time) as maxTime,
sum(case when iz_finish='N' then 1 else 0 end) as ownCn sum(case when iz_finish='N' then 1 else 0 end) as ownCn
from nu_biz_nu_invoicing_directive_order from nu_biz_nu_invoicing_directive_order
where start_time >=DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00') where start_time >=DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00')
and start_time &lt;=DATE_FORMAT(NOW(), '%Y-%m-%d 23:59:59') and start_time &lt;=DATE_FORMAT(NOW(), '%Y-%m-%d 23:59:59')
and del_flag = '0' and del_flag = '0'
group by employee_id group by employee_id
) e on a.id = e.employee_id ) e on a.id = e.employee_id
left join ( left join (
select employee_id,sum(case when iz_finish='N' then 1 else 0 end) as orderNum select employee_id,sum(case when iz_finish='N' then 1 else 0 end) as orderNum
from nu_biz_nu_invoicing_directive_order from nu_biz_nu_invoicing_directive_order
where start_time = #{startTime} where start_time = #{startTime}
or (start_time &lt; #{startTime} and end_time > #{startTime}) or (start_time &lt; #{startTime} and end_time > #{startTime})
and del_flag = '0' and del_flag = '0'
group by employee_id group by employee_id
) f on a.id = f.employee_id ) f on a.id = f.employee_id
where a.del_flag = '0' where a.del_flag = '0'
and a.iz_freeze = 'N' and a.iz_freeze = 'N'
@ -137,33 +131,34 @@
inner join nu_service_tag c on c.id = b.tags_id inner join nu_service_tag c on c.id = b.tags_id
inner join nu_servtag_directive d on d.tags_id = c.id inner join nu_servtag_directive d on d.tags_id = c.id
where d.directive_id in where d.directive_id in
<foreach collection="directiveIds" item="directiveId" open="(" separator="," close=")"> <foreach collection="directiveIds" item="directiveId" open="(" separator="," close=")">
#{directiveId} #{directiveId}
</foreach> </foreach>
group by a.id group by a.id
</select> </select>
<select id="getFlowList" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders"> <select id="getFlowList" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select select
a.id as flowId, a.id as flowId,
a.name as flowName, a.name as flowName,
a.main_id as flowMainId, a.main_id as flowMainId,
a.sub_id as subId, a.sub_id as subId,
a.flow_code as flowCode, a.flow_code as flowCode,
a.directive_id as directiveId, a.directive_id as directiveId,
b.directive_name as directiveName, b.directive_name as directiveName,
b.cycle_type as cycleTypeId, b.cycle_type as cycleTypeId,
dict.item_text as cycleType, dict.item_text as cycleType,
b.preview_file as previewFile, b.preview_file as previewFile,
b.preview_file_small as previewFileSmall, b.preview_file_small as previewFileSmall,
b.mp3_file as mp3File, b.mp3_file as mp3File,
b.mp4_file as mp4File, b.mp4_file as mp4File,
b.service_duration as serviceDuration, b.service_duration as serviceDuration,
b.service_content as serviceContent, b.service_content as serviceContent,
a.pad_path as padPath a.pad_path as padPath
from nu_config_service_flow_sub a from nu_config_service_flow_sub a
inner join nu_config_service_directive b on b.id = a.directive_id inner join nu_config_service_directive b on b.id = a.directive_id
LEFT JOIN (select * from sys_dict_item where dict_id = '1900374791386140674') dict on b.cycle_type = dict.item_value LEFT JOIN (select * from sys_dict_item where dict_id = '1900374791386140674') dict on b.cycle_type =
dict.item_value
<where> <where>
<if test="flowCode != null and flowCode != ''"> <if test="flowCode != null and flowCode != ''">
AND a.flow_code = #{flowCode} AND a.flow_code = #{flowCode}
@ -173,25 +168,26 @@
<select id="getFlowOne" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders"> <select id="getFlowOne" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select select
a.id as flowId, a.id as flowId,
a.name as flowName, a.name as flowName,
a.main_id as flowMainId, a.main_id as flowMainId,
a.sub_id as subId, a.sub_id as subId,
a.flow_code as flowCode, a.flow_code as flowCode,
a.directive_id as directiveId, a.directive_id as directiveId,
b.directive_name as directiveName, b.directive_name as directiveName,
b.cycle_type as cycleTypeId, b.cycle_type as cycleTypeId,
dict.item_text as cycleType, dict.item_text as cycleType,
b.preview_file as previewFile, b.preview_file as previewFile,
b.preview_file_small as previewFileSmall, b.preview_file_small as previewFileSmall,
b.mp3_file as mp3File, b.mp3_file as mp3File,
b.mp4_file as mp4File, b.mp4_file as mp4File,
b.service_duration as serviceDuration, b.service_duration as serviceDuration,
b.service_content as serviceContent, b.service_content as serviceContent,
a.pad_path as padPath a.pad_path as padPath
from nu_config_service_flow_sub a from nu_config_service_flow_sub a
inner join nu_config_service_directive b on b.id = a.directive_id inner join nu_config_service_directive b on b.id = a.directive_id
LEFT JOIN (select * from sys_dict_item where dict_id = '1900374791386140674') dict on b.cycle_type = dict.item_value LEFT JOIN (select * from sys_dict_item where dict_id = '1900374791386140674') dict on b.cycle_type =
dict.item_value
<where> <where>
<if test="flowId != null and flowId != ''"> <if test="flowId != null and flowId != ''">
AND a.id = #{flowId} AND a.id = #{flowId}
@ -209,58 +205,58 @@
update nu_biz_nu_invoicing_directive_order update nu_biz_nu_invoicing_directive_order
set del_flag = '1', set del_flag = '1',
del_time = #{delTime}, del_time = #{delTime},
del_emp = #{delEmp}, del_emp = #{delEmp},
remarks = #{remarks} remarks = #{remarks}
where biz_id = #{bizId} where biz_id = #{bizId}
</update> </update>
<select id="getOrderOne" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders"> <select id="getOrderOne" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select select
a.id, a.id,
a.pool_id as poolId, a.pool_id as poolId,
a.biz_id as bizId, a.biz_id as bizId,
a.biz_type as bizType, a.biz_type as bizType,
a.nu_id as nuId, a.nu_id as nuId,
a.nu_name as nuName, a.nu_name as nuName,
a.elder_id as elderId, a.elder_id as elderId,
a.elder_name as elderName, a.elder_name as elderName,
a.employee_id as employeeId, a.employee_id as employeeId,
a.employee_name as employeeName, a.employee_name as employeeName,
a.directive_id as directiveId, a.directive_id as directiveId,
a.directive_name as directiveName, a.directive_name as directiveName,
a.cycle_type_id as cycleTypeId, a.cycle_type_id as cycleTypeId,
a.cycle_type as cycleType, a.cycle_type as cycleType,
a.cycle_value as cycleValue, a.cycle_value as cycleValue,
a.preview_file as previewFile, a.preview_file as previewFile,
a.net_preview_file as netPreviewFile, a.net_preview_file as netPreviewFile,
a.preview_file_small as previewFileSmall, a.preview_file_small as previewFileSmall,
a.net_preview_file_small as netPreviewFileSmall, a.net_preview_file_small as netPreviewFileSmall,
a.mp3_file as mp3File, a.mp3_file as mp3File,
a.net_mp3_file as netMp3File, a.net_mp3_file as netMp3File,
a.mp4_file as mp4File, a.mp4_file as mp4File,
a.net_mp4_file as netMp4File, a.net_mp4_file as netMp4File,
a.service_duration as serviceDuration, a.service_duration as serviceDuration,
a.service_content as serviceContent, a.service_content as serviceContent,
a.toll_price as tollPrice, a.toll_price as tollPrice,
a.com_price as comPrice, a.com_price as comPrice,
a.real_com_price as realComPrice, a.real_com_price as realComPrice,
a.start_time as startTime, a.start_time as startTime,
a.end_time as endTime, a.end_time as endTime,
a.begin_time as beginTime, a.begin_time as beginTime,
a.finish_time as finishTime, a.finish_time as finishTime,
a.iz_start as izStart, a.iz_start as izStart,
a.iz_finish as izFinish, a.iz_finish as izFinish,
a.iz_rollback as izRollback, a.iz_rollback as izRollback,
a.create_emp as createEmp, a.create_emp as createEmp,
a.create_time as createTime, a.create_time as createTime,
a.update_emp as updateEmp, a.update_emp as updateEmp,
a.update_time as updateTime, a.update_time as updateTime,
a.del_flag as delFlag, a.del_flag as delFlag,
a.initiator_id as initiatorId, a.initiator_id as initiatorId,
a.initiator_name as initiatorName, a.initiator_name as initiatorName,
a.remarks, a.remarks,
a.biz_type as flowCode, a.biz_type as flowCode,
a.pad_path as padPath a.pad_path as padPath
from nu_biz_nu_invoicing_directive_order a from nu_biz_nu_invoicing_directive_order a
<where> <where>
<if test="id != null and id != ''"> <if test="id != null and id != ''">
@ -300,5 +296,13 @@
order by create_time desc order by create_time desc
limit 1 limit 1
</select> </select>
<select id="selectInfoById" resultType="com.nu.entity.InvoicingDirectiveEntity">
select a.*,
mainStatus.item_text AS optTypeName
from nu_biz_nu_invoicing_directive_order a
LEFT JOIN sys_dict dict ON dict.dict_code = 'directive_order_opt_type'
LEFT JOIN sys_dict_item mainStatus
ON mainStatus.dict_id = dict.id AND mainStatus.item_value = a.opt_type
</select>
</mapper> </mapper>

View File

@ -179,7 +179,7 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
@Override @Override
public InvoicingDirectiveEntity selectInfoById(String id) { public InvoicingDirectiveEntity selectInfoById(String id) {
InvoicingDirectiveEntity result = new InvoicingDirectiveEntity(); InvoicingDirectiveEntity result = new InvoicingDirectiveEntity();
BeanUtils.copyProperties(baseMapper.selectById(id),result); BeanUtils.copyProperties(baseMapper.selectInfoById(id),result);
return result; return result;
} }