pad新增接口:查询护理单元下长者常用护理类、行政类、仓库类即时指令
This commit is contained in:
parent
1aa2fe77a3
commit
b5bcecc194
|
|
@ -0,0 +1,82 @@
|
|||
package com.nu.modules.biz.plan.care.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.beust.jcommander.internal.Maps;
|
||||
import com.nu.modules.biz.plan.care.entity.CareDirectivePlanInstant;
|
||||
import com.nu.modules.biz.plan.care.service.ICareDirectivePlanInstantService;
|
||||
import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlanInstant;
|
||||
import com.nu.modules.biz.plan.invoicing.service.IInvoicingDirectivePlanInstantService;
|
||||
import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlanInstant;
|
||||
import com.nu.modules.biz.plan.logistics.service.LogisticsDirectivePlanInstantService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 长者常用即时指令
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-03-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "长者常用即时指令")
|
||||
@RestController
|
||||
@RequestMapping("/services/directivePlanInstant")
|
||||
@Slf4j
|
||||
public class DirectivePlanInstantController extends JeecgController<CareDirectivePlanInstant, ICareDirectivePlanInstantService> {
|
||||
|
||||
@Autowired
|
||||
private ICareDirectivePlanInstantService careDirectivePlanInstantService;
|
||||
@Autowired
|
||||
private IInvoicingDirectivePlanInstantService invoicingDirectivePlanInstantService;
|
||||
@Autowired
|
||||
private LogisticsDirectivePlanInstantService logisticsDirectivePlanInstantService;
|
||||
|
||||
/**
|
||||
* 查询长者常用即时指令 按照 分类标签分类后数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "查询长者常用即时指令,按照分类标签分类后数据", notes = "查询长者常用即时指令,按照分类标签分类后数据")
|
||||
@GetMapping(value = "/queryAll")
|
||||
public Result<Map<String, Object>> queryAll(@RequestParam("nuId") String nuId, @RequestParam("elderId") String elderId) {
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
|
||||
//护理类即时指令
|
||||
QueryWrapper<CareDirectivePlanInstant> careQW = new QueryWrapper<>();
|
||||
careQW.eq("nu_id", nuId);
|
||||
careQW.eq("elder_id", elderId);
|
||||
List<CareDirectivePlanInstant> careList = careDirectivePlanInstantService.list(careQW);
|
||||
result.put("care", careList);
|
||||
|
||||
//医疗类即时指令
|
||||
//TODO 待完成 现在没有表
|
||||
// result.put("invoicing", careList);
|
||||
|
||||
//仓库类即时指令
|
||||
QueryWrapper<InvoicingDirectivePlanInstant> invoicingQW = new QueryWrapper<>();
|
||||
invoicingQW.eq("nu_id", nuId);
|
||||
List<InvoicingDirectivePlanInstant> invoicingList = invoicingDirectivePlanInstantService.list(invoicingQW);
|
||||
result.put("invoicing", invoicingList);
|
||||
|
||||
//行政类即时指令
|
||||
QueryWrapper<LogisticsDirectivePlanInstant> logisticsQW = new QueryWrapper<>();
|
||||
logisticsQW.eq("nu_id", nuId);
|
||||
logisticsQW.eq("elder_id", elderId);
|
||||
List<LogisticsDirectivePlanInstant> logisticsList = logisticsDirectivePlanInstantService.list(logisticsQW);
|
||||
result.put("logistics", logisticsList);
|
||||
|
||||
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -12,4 +12,5 @@ import org.apache.ibatis.annotations.Param;
|
|||
*/
|
||||
public interface CareDirectivePlanInstantMapper extends BaseMapper<CareDirectivePlanInstant> {
|
||||
int deleteByIdPhysic(@Param("id") String id);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
<mapper namespace="com.nu.modules.biz.plan.care.mapper.CareDirectivePlanInstantMapper">
|
||||
|
||||
<delete id="deleteByIdPhysic">
|
||||
delete from nu_biz_nu_care_directive_plan_instant where id = #{id}
|
||||
delete
|
||||
from nu_biz_nu_care_directive_plan_instant
|
||||
where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -12,4 +12,5 @@ import com.nu.modules.biz.plan.care.entity.CareDirectivePlanInstant;
|
|||
public interface ICareDirectivePlanInstantService extends IService<CareDirectivePlanInstant> {
|
||||
|
||||
int deleteByIdPhysic(String id);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,4 +19,5 @@ public class CareDirectivePlanInstantServiceImpl extends ServiceImpl<CareDirecti
|
|||
public int deleteByIdPhysic(String id) {
|
||||
return baseMapper.deleteByIdPhysic(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue