服务指令-工单服务容错时长字段调整,数据池去掉冗余字段

This commit is contained in:
曹磊 2026-01-19 14:32:46 +08:00
parent 0456ad3ad1
commit 5a33f8bdd5
10 changed files with 92 additions and 40 deletions

View File

@ -290,7 +290,7 @@ public class CareDirectiveApi {
Date ygkssj = item.getStartTime(); // 应该开始时间
Date sjkssj = item.getBeginTime(); // 实际开始时间
Date sjjssj = item.getFinishTime(); // 实际结束时间
String rcsc = item.getServiceAllowedTimeout(); // 容错时长分钟
String rcsc = item.getTimeoutDuration(); // 容错时长分钟
String fwsc = item.getServiceDuration(); // 服务时长分钟
// 判断是否超时实际开始时间 > 应该开始时间 + 容错时长

View File

@ -34,8 +34,6 @@ public class DirectiveOrderEntity implements Serializable {
/**执行类型 1单人 2协助 3转单*/
private String optType;
private String optTypeName;
/**服务容错时长end_time + 这个时间) 小于 begin_time算超时*/
private String serviceAllowedTimeout;
/**是否超时 Y超时 N未超时*/
private String izTimeout;
/**实际执行人id多个 主要执行人+协助人*/
@ -90,6 +88,8 @@ public class DirectiveOrderEntity implements Serializable {
private String serviceDuration;
/**服务说明*/
private String serviceContent;
/**超时时长(分钟)*/
private String timeoutDuration;
/**服务指令包ID*/
private String packageId;
/**服务指令包名称*/

View File

@ -89,6 +89,8 @@ public class DirectiveOrderSubEntity implements Serializable {
private String serviceDuration;
/**服务说明*/
private String serviceContent;
/**超时时长(分钟)*/
private String timeoutDuration;
/**收费价格*/
private BigDecimal tollPrice;
/**提成价格*/
@ -137,8 +139,7 @@ public class DirectiveOrderSubEntity implements Serializable {
/**执行类型 1单人 2协助 3转单*/
private String optType;
private String optTypeName;
/**服务容错时长end_time + 这个时间) 小于 begin_time算超时*/
private String serviceAllowedTimeout;
/**是否超时 Y超时 N未超时*/
private String izTimeout;
/**实际执行人id多个 主要执行人+协助人*/

View File

@ -177,7 +177,12 @@
iz_start
from nu_biz_nu_directive_order
where pool_id = #{id}
AND iz_start = #{izStart}
<if test="izStart != null and izStart != ''">
AND iz_start = #{izStart}
</if>
<if test="startTime != null">
AND start_time >= #{startTime}
</if>
</select>
<update id="addOrdersLog">

View File

@ -219,7 +219,7 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Dir
dataPool.setNuId(careDirectivePlan.getNuId());
dataPool.setDirectiveId(careDirectivePlan.getDirectiveId());
dataPool.setStartTime(c.getTime());
dataPool.setIzStart("N");
// dataPool.setIzStart("N"); //不判断是否开始只针对时间
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
if(pool!=null){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

View File

@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
/**
* @Description: 服务指令数据池管理
@ -51,12 +52,15 @@ public class DirectiveDataPoolServiceImpl extends ServiceImpl<DirectiveDataPoolM
*/
@Override
public void deleteOrders(String dateStr, DirectiveDataPool dataPool){
dataPool.setIzStart("N");
//获取未开始的工单
DirectiveDataPool pool = baseMapper.queryOrdersOne(dataPool);
if(pool!=null){
DirectiveDataPool entity = new DirectiveDataPool();
entity.setId(dataPool.getId());
entity.setStartTime(new Date());
// entity.setIzStart("N");//不判断是否开始只针对时间
DirectiveDataPool order = baseMapper.queryOrdersOne(entity);
if(order!=null){
//删除工单
addOrdersLog(dateStr,pool);
addOrdersLog(dateStr,order);
//ws发送通知给员工员工端删除次工单待完善
}
}

View File

@ -83,16 +83,14 @@ public class DirectiveOrder implements Serializable {
private String serviceDuration;
/**服务描述*/
private String serviceContent;
/**超时时长(分钟)*/
private String timeoutDuration;
/**收费价格*/
private BigDecimal tollPrice;
/**提成价格*/
private BigDecimal comPrice;
/**实际提成价格*/
private BigDecimal realComPrice;
/**指令包id*/
private String packageId;
/**指令包名称*/
private String packageName;
/**是否是服务指令包 Y是 N否*/
private String izPackage;
/**开始时间*/
@ -145,8 +143,7 @@ public class DirectiveOrder implements Serializable {
private String remarks;
/**执行类型 1单人 2协助 3转单*/
private String optType;
/**服务容错时长end_time + 这个时间) 小于 begin_time算超时*/
private String serviceAllowedTimeout;
/**是否超时 Y超时 N未超时*/
private String izTimeout;
/**实际执行人id多个 主要执行人+协助人*/

View File

@ -92,6 +92,8 @@ public class DirectiveOrderSub implements Serializable {
private String serviceDuration;
/**服务描述*/
private String serviceContent;
/**超时时长(分钟)*/
private String timeoutDuration;
/**收费价格*/
private BigDecimal tollPrice;
/**提成价格*/
@ -144,8 +146,7 @@ public class DirectiveOrderSub implements Serializable {
/**执行类型 1单人 2协助 3转单*/
private String optType;
/**服务容错时长end_time + 这个时间) 小于 begin_time算超时*/
private String serviceAllowedTimeout;
/**是否超时 Y超时 N未超时*/
private String izTimeout;
/**实际执行人id多个 主要执行人+协助人*/

View File

@ -37,7 +37,11 @@ public interface DirectiveOrderMapper extends BaseMapper<DirectiveOrder> {
List<DirectiveOrderEntity> queryCurrent(@Param("dto") CareDirectiveEntity dto);
DirectiveOrder getInstantById(DirectiveOrder orders);
DirectiveOrder getDirectiveById(DirectiveOrder orders);
DirectiveOrder getPackageById(DirectiveOrder orders);
DirectiveOrder getEmployeeById(@Param("employeeId") String employeeId);
}

View File

@ -53,7 +53,7 @@
<result column="update_time" property="updateTime"/>
<result column="del_flag" property="delFlag"/>
<result column="remarks" property="remarks"/>
<result column="service_allowed_timeout" property="serviceAllowedTimeout"/>
<result column="timeout_duration" property="timeoutDuration"/>
<result column="iz_timeout" property="izTimeout"/>
<result column="opt_ids" property="optIds"/>
<result column="opt_names" property="optNames"/>
@ -114,6 +114,30 @@
</resultMap>
<select id="queryDataPoolList" resultType="com.nu.modules.biz.order.entity.DirectiveOrder">
select
a.id as poolId,
a.pool_type as orderType,
a.biz_id as bizId,
a.nu_id as nuId,
b.nu_name as nuName,
c.id as elderId,
c.name as elderName,
a.directive_id as directiveId,
a.cycle_type_id as cycleTypeId,
d.item_text as cycleType,
a.cycle_value as cycleValue,
a.iz_package as izPackage,
a.start_time as startTime,
(case when c.orderly is null then 2 else 1 end) as orderEmp
from nu_biz_nu_directive_data_pool a
inner join nu_base_info b on a.nu_id = b.nu_id and b.del_flag = '0'
left join nu_biz_elder_info c on a.nu_id = c.nu_id and c.del_flag = '0'
left join view_sys_dict d on a.cycle_type_id = d.item_value and d.dict_code = 'period_type'
where a.iz_orders = 'N'
order by a.start_time,orderEmp,a.nu_id
</select>
<select id="queryDataPoolListBak" resultType="com.nu.modules.biz.order.entity.DirectiveOrder">
select
a.id as poolId,
a.pool_type as orderType,
@ -318,7 +342,7 @@
o.update_time,
o.del_flag,
o.remarks,
o.service_allowed_timeout,
o.timeout_duration,
o.iz_timeout,
o.opt_ids,
o.opt_names,
@ -424,34 +448,50 @@
ORDER BY o.start_time, s.start_time
</select>
<select id="getDirectiveById" resultType="com.nu.modules.biz.order.entity.DirectiveOrder">
<select id="getInstantById" resultType="com.nu.modules.biz.order.entity.DirectiveOrder">
select
m.id as bizId,
m.nu_id as nuId,
m.nu_name as nuName,
elder_id as elderId,
elder_name as elderName,
b.nu_name as nuName,
c.id as elderId,
c.name as elderName,
directive_id as directiveId,
directive_name as directiveName,
'3' as cycleTypeId,
(select item_text from sys_dict_item where dict_id = '1900374791386140674' and item_value = '3') as cycleType,
preview_file as previewFile,
net_preview_file as netPreviewFile,
preview_file_small as previewFileSmall,
net_preview_file_small as netPreviewFileSmall,
mp3_file as mp3File,
net_mp3_file as netMp3File,
mp4_file as mp4File,
net_mp4_file as netMp4File,
service_duration as serviceDuration,
service_content as serviceContent,
'2' as cycleTypeId,
(select item_text from view_sys_dict where dict_code = 'period_type' and item_value = '2') as cycleType,
iz_package,
(case when b.orderly is null then 2 else 1 end) as orderEmp
(case when c.orderly is null then 2 else 1 end) as orderEmp
from ${tableName} m
left join nu_biz_elder_info b on m.elder_id = b.id
inner join nu_base_info b on m.nu_id = b.nu_id and b.del_flag = '0'
left join nu_biz_elder_info c on m.nu_id = c.nu_id and c.del_flag = '0'
where m.id = #{id}
</select>
<select id="getDirectiveById" resultType="com.nu.modules.biz.order.entity.DirectiveOrder">
select
a.id as directiveId,
a.directive_name as directiveName,
a.preview_file as previewFile,
a.preview_file_small as previewFileSmall,
a.mp3_file as mp3File,
a.mp4_file as mp4File,
a.service_duration as serviceDuration,
a.service_content as serviceContent,
a.timeout_duration as timeoutDuration
from nu_config_service_directive a
where a.id = #{directiveId}
</select>
<select id="getPackageById" resultType="com.nu.modules.biz.order.entity.DirectiveOrder">
select
a.id as directiveId,
a.package_name as directiveName,
a.total_duration as serviceDuration,
a.description as serviceContent,
a.timeout_duration as timeoutDuration
from nu_config_directive_package a
where a.id = #{directiveId}
</select>
<select id="getEmployeeById" resultType="com.nu.modules.biz.order.entity.DirectiveOrder">
select a.id as employeeId,
a.name as employeeName