查询 护理类、仓库类、后勤类当天服务指令执行各状态数量
This commit is contained in:
parent
f1df53a3a2
commit
1c42b3edf9
|
|
@ -270,10 +270,14 @@ public class CareDirectiveApi {
|
||||||
public Result<Map<String, Object>> getDirectivePlanCountByNuID(CareDirectiveEntity dto) {
|
public Result<Map<String, Object>> getDirectivePlanCountByNuID(CareDirectiveEntity dto) {
|
||||||
Map<String, Object> result = Maps.newHashMap();
|
Map<String, Object> result = Maps.newHashMap();
|
||||||
|
|
||||||
|
//护理类
|
||||||
|
if (("," + dto.getQueryInstructionIds().trim() + ",").indexOf(",1,") != -1) {
|
||||||
|
Map<String, Object> hlResult = Maps.newHashMap();
|
||||||
//当天已执行完数据
|
//当天已执行完数据
|
||||||
CareDirectiveEntity queryParams = new CareDirectiveEntity();
|
CareDirectiveEntity queryParams = new CareDirectiveEntity();
|
||||||
queryParams.setNuId(dto.getNuId());
|
queryParams.setNuId(dto.getNuId());
|
||||||
queryParams.setQueryDate(new Date());
|
queryParams.setQueryDate(new Date());
|
||||||
|
queryParams.setInstructionTagId("1");
|
||||||
List<DirectiveOrderEntity> history = directiveOrderApi.queryHistory(queryParams);
|
List<DirectiveOrderEntity> history = directiveOrderApi.queryHistory(queryParams);
|
||||||
|
|
||||||
int yzx = 0;
|
int yzx = 0;
|
||||||
|
|
@ -298,9 +302,100 @@ public class CareDirectiveApi {
|
||||||
dto.setQueryFuture(true);
|
dto.setQueryFuture(true);
|
||||||
List<DirectiveOrderEntity> dzxList = careDirectivePlanApi.queryFuture(dto);
|
List<DirectiveOrderEntity> dzxList = careDirectivePlanApi.queryFuture(dto);
|
||||||
|
|
||||||
result.put("yzx", yzx);//已执行
|
hlResult.put("yzx", yzx);//已执行
|
||||||
result.put("dzx", dzxList.size());//待执行
|
hlResult.put("dzx", dzxList.size());//待执行
|
||||||
result.put("yc", yc);//异常
|
hlResult.put("yc", yc);//异常
|
||||||
|
result.put("hll", hlResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO 医疗类 没表
|
||||||
|
if (("," + dto.getQueryInstructionIds().trim() + ",").indexOf(",2,") != -1) {
|
||||||
|
Map<String, Object> ylResult = Maps.newHashMap();
|
||||||
|
|
||||||
|
ylResult.put("yzx", 0);//已执行
|
||||||
|
ylResult.put("dzx", 0);//待执行
|
||||||
|
ylResult.put("yc", 0);//异常
|
||||||
|
result.put("yll", ylResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
//仓库类
|
||||||
|
if (("," + dto.getQueryInstructionIds().trim() + ",").indexOf(",3,") != -1) {
|
||||||
|
Map<String, Object> ckResult = Maps.newHashMap();
|
||||||
|
|
||||||
|
//当天已执行完数据
|
||||||
|
CareDirectiveEntity queryParams = new CareDirectiveEntity();
|
||||||
|
queryParams.setNuId(dto.getNuId());
|
||||||
|
queryParams.setQueryDate(new Date());
|
||||||
|
queryParams.setInstructionTagId("3");
|
||||||
|
List<DirectiveOrderEntity> history = directiveOrderApi.queryHistory(queryParams);
|
||||||
|
|
||||||
|
int yzx = 0;
|
||||||
|
int yc = 0;
|
||||||
|
if (!CollectionUtils.isEmpty(history)) {
|
||||||
|
// 未结束就是未执行;结束时间在应该结束时间后就是超时
|
||||||
|
for (DirectiveOrderEntity item : history) {
|
||||||
|
if ("N".equals(item.getIzFinish())) {
|
||||||
|
// 未执行
|
||||||
|
yc++;
|
||||||
|
} else if (item.getFinishTime().after(item.getEndTime())) {
|
||||||
|
// 超时
|
||||||
|
yc++;
|
||||||
|
} else {
|
||||||
|
// 正常
|
||||||
|
yzx++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//待执行
|
||||||
|
dto.setQueryFuture(true);
|
||||||
|
List<DirectiveOrderEntity> dzxList = careDirectivePlanApi.queryFuture(dto);
|
||||||
|
|
||||||
|
ckResult.put("yzx", yzx);//已执行
|
||||||
|
ckResult.put("dzx", dzxList.size());//待执行
|
||||||
|
ckResult.put("yc", yc);//异常
|
||||||
|
result.put("ckl", ckResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
//后勤类
|
||||||
|
if (("," + dto.getQueryInstructionIds().trim() + ",").indexOf(",4,") != -1) {
|
||||||
|
Map<String, Object> hqResult = Maps.newHashMap();
|
||||||
|
|
||||||
|
//当天已执行完数据
|
||||||
|
CareDirectiveEntity queryParams = new CareDirectiveEntity();
|
||||||
|
queryParams.setNuId(dto.getNuId());
|
||||||
|
queryParams.setQueryDate(new Date());
|
||||||
|
queryParams.setInstructionTagId("4");
|
||||||
|
List<DirectiveOrderEntity> history = directiveOrderApi.queryHistory(queryParams);
|
||||||
|
|
||||||
|
int yzx = 0;
|
||||||
|
int yc = 0;
|
||||||
|
if (!CollectionUtils.isEmpty(history)) {
|
||||||
|
// 未结束就是未执行;结束时间在应该结束时间后就是超时
|
||||||
|
for (DirectiveOrderEntity item : history) {
|
||||||
|
if ("N".equals(item.getIzFinish())) {
|
||||||
|
// 未执行
|
||||||
|
yc++;
|
||||||
|
} else if (item.getFinishTime().after(item.getEndTime())) {
|
||||||
|
// 超时
|
||||||
|
yc++;
|
||||||
|
} else {
|
||||||
|
// 正常
|
||||||
|
yzx++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//待执行
|
||||||
|
dto.setQueryFuture(true);
|
||||||
|
List<DirectiveOrderEntity> dzxList = careDirectivePlanApi.queryFuture(dto);
|
||||||
|
|
||||||
|
hqResult.put("yzx", yzx);//已执行
|
||||||
|
hqResult.put("dzx", dzxList.size());//待执行
|
||||||
|
hqResult.put("yc", yc);//异常
|
||||||
|
result.put("hql", hqResult);
|
||||||
|
}
|
||||||
|
|
||||||
return Result.ok(result);
|
return Result.ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 行政类服务指令计划API
|
* @Description: 后勤服务指令计划API
|
||||||
* @Author: caolei
|
* @Author: caolei
|
||||||
* @Date: 2026-1-6
|
* @Date: 2026-1-6
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
|
|
|
||||||
|
|
@ -83,5 +83,14 @@ public class CareDirectiveEntity implements Serializable {
|
||||||
private String queryType;
|
private String queryType;
|
||||||
/**长者标签列表**/
|
/**长者标签列表**/
|
||||||
private List<ElderTagEntity> tagList;
|
private List<ElderTagEntity> tagList;
|
||||||
|
/**
|
||||||
|
* 1 护理类 2医疗类 3仓库类 5后勤类
|
||||||
|
*/
|
||||||
|
private String instructionTagId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询哪些类型
|
||||||
|
*/
|
||||||
|
private String queryInstructionIds;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 行政类服务指令
|
* @Description: 后勤服务指令
|
||||||
* @Author: caolei
|
* @Author: caolei
|
||||||
* @Date: 2026-1-6
|
* @Date: 2026-1-6
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 行政类服务指令即时指令
|
* @Description: 后勤服务指令即时指令
|
||||||
* @Author: caolei
|
* @Author: caolei
|
||||||
* @Date: 2026-1-6
|
* @Date: 2026-1-6
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlan;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 服务指令数据池管理-行政类
|
* @Description: 服务指令数据池管理-后勤
|
||||||
* @Author: caolei
|
* @Author: caolei
|
||||||
* @Date: 2026-1-6
|
* @Date: 2026-1-6
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
|
|
|
||||||
|
|
@ -408,6 +408,9 @@
|
||||||
<if test="dto.elderId != null and dto.elderId != ''">
|
<if test="dto.elderId != null and dto.elderId != ''">
|
||||||
AND o.elder_id = #{dto.elderId}
|
AND o.elder_id = #{dto.elderId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="dto.nuId != null and dto.nuId != ''">
|
||||||
|
AND o.nu_id = #{dto.nuId}
|
||||||
|
</if>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="queryHistory" resultMap="DirectiveOrderMap">
|
<select id="queryHistory" resultMap="DirectiveOrderMap">
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 行政类服务指令计划
|
* @Description: 后勤服务指令计划
|
||||||
* @Author: caolei
|
* @Author: caolei
|
||||||
* @Date: 2026-1-6
|
* @Date: 2026-1-6
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
|
|
@ -26,7 +26,7 @@ import java.util.List;
|
||||||
@TableName("nu_biz_nu_logistics_directive_plan")
|
@TableName("nu_biz_nu_logistics_directive_plan")
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ApiModel(value="nu_biz_nu_logistics_directive_plan对象", description="行政类服务指令计划")
|
@ApiModel(value="nu_biz_nu_logistics_directive_plan对象", description="后勤服务指令计划")
|
||||||
public class LogisticsDirectivePlan implements Serializable {
|
public class LogisticsDirectivePlan implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.Param;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 行政类服务指令计划
|
* @Description: 后勤服务指令计划
|
||||||
* @Author: caolei
|
* @Author: caolei
|
||||||
* @Date: 2026-1-6
|
* @Date: 2026-1-6
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
|
|
@ -18,4 +18,5 @@ public interface LogisticsDirectivePlanMapper extends BaseMapper<LogisticsDirect
|
||||||
int queryTotal(@Param("nuId") String nuId, @Param("elderId") String elderId);
|
int queryTotal(@Param("nuId") String nuId, @Param("elderId") String elderId);
|
||||||
|
|
||||||
List<LogisticsDirectivePlan> list(@Param("dto") LogisticsDirectiveEntity logisticsDirectiveEntity);
|
List<LogisticsDirectivePlan> list(@Param("dto") LogisticsDirectiveEntity logisticsDirectiveEntity);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlan;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 行政类服务指令计划
|
* @Description: 后勤服务指令计划
|
||||||
* @Author: caolei
|
* @Author: caolei
|
||||||
* @Date: 2026-1-6
|
* @Date: 2026-1-6
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 行政类服务指令计划
|
* @Description: 后勤服务指令计划
|
||||||
* @Author: caolei
|
* @Author: caolei
|
||||||
* @Date: 2026-1-6
|
* @Date: 2026-1-6
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue