修改危急值模块功能
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
This commit is contained in:
parent
6f5f61f6a7
commit
453a03353e
@ -1,5 +1,9 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.warning;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.mysql.warning.WarningMapper;
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -42,6 +46,8 @@ public class WarningController {
|
||||
@Resource
|
||||
private WarningService warningService;
|
||||
|
||||
@Resource
|
||||
private WarningMapper warningMapper;
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建危急值记录")
|
||||
@PreAuthorize("@ss.hasPermission('system:warning:create')")
|
||||
@ -66,8 +72,16 @@ public class WarningController {
|
||||
@Operation(summary = "更新危急值记录")
|
||||
public CommonResult<Boolean> SaveupdateWarning(@Valid @RequestBody WarningSaveReqVO updateReqVO) {
|
||||
|
||||
LocalDateTime dateTime = LocalDateTime.parse(updateReqVO.getCheckDateTime(), DateTimeFormatter.ofPattern("yyyy-M-d H:mm:ss"));
|
||||
WarningDO warningDO=new WarningDO();
|
||||
warningDO.setId(updateReqVO.getId());
|
||||
warningDO.setReadremark(updateReqVO.getReadremark());
|
||||
warningDO.setReceiveDoctor(updateReqVO.getReceiveDoctor());
|
||||
warningDO.setDealDoctor(updateReqVO.getDealDoctor());
|
||||
warningDO.setCheckDateTime(dateTime) ;
|
||||
|
||||
warningMapper.updateById(warningDO);
|
||||
|
||||
warningService.updateWarning(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@ -75,22 +89,21 @@ public class WarningController {
|
||||
@Operation(summary = "更新危急值接收时间和发送回执记录")
|
||||
public CommonResult<Boolean> updateWarningdate( @RequestParam("id") String id,@RequestParam("readDateTime") String readDateTime,@RequestParam("receiptDateTime") String receiptDateTime) {
|
||||
|
||||
WarningSaveReqVO warningSaveReqVO = new WarningSaveReqVO();
|
||||
warningSaveReqVO.setId(id);
|
||||
WarningDO warningDO=new WarningDO();
|
||||
warningDO.setId(id);
|
||||
if(!readDateTime.isEmpty())
|
||||
{
|
||||
LocalDateTime dateTime = LocalDateTime.parse(readDateTime, DateTimeFormatter.ofPattern("yyyy-M-d H:mm:ss"));
|
||||
|
||||
warningSaveReqVO.setReadDateTime(dateTime);
|
||||
warningDO.setReadDateTime(dateTime);
|
||||
}
|
||||
if(!receiptDateTime.isEmpty())
|
||||
{
|
||||
LocalDateTime dateTime = LocalDateTime.parse(receiptDateTime, DateTimeFormatter.ofPattern("yyyy-M-d H:mm:ss"));
|
||||
warningSaveReqVO.setReceiptDateTime(dateTime);
|
||||
|
||||
warningDO.setReceiptDateTime(dateTime);
|
||||
}
|
||||
|
||||
warningService.updateWarning(warningSaveReqVO);
|
||||
warningMapper.updateById(warningDO);
|
||||
|
||||
return success(true);
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public class WarningDO {
|
||||
/**
|
||||
* 机构ID
|
||||
*/
|
||||
@TableField("orgId")
|
||||
@TableField(value = "orgId")
|
||||
private String orgId;
|
||||
/**
|
||||
* 检查ID,一人多个检查的检查id
|
||||
@ -44,37 +44,37 @@ public class WarningDO {
|
||||
/**
|
||||
* 上报机构id
|
||||
*/
|
||||
@TableField("reportOrgId")
|
||||
@TableField(value ="reportOrgId")
|
||||
private String reportOrgId;
|
||||
/**
|
||||
* 上报机构名称
|
||||
*/
|
||||
@TableField("reportorgName")
|
||||
@TableField(value ="reportorgName")
|
||||
private String reportorgName;
|
||||
/**
|
||||
* 上报医生
|
||||
*/
|
||||
@TableField("reportDoctor")
|
||||
@TableField(value = "reportDoctor")
|
||||
private String reportDoctor;
|
||||
/**
|
||||
* 上报时间
|
||||
*/
|
||||
@TableField("reportDate")
|
||||
@TableField(value = "reportDate")
|
||||
private LocalDateTime reportDate;
|
||||
/**
|
||||
* 危急值内容
|
||||
*/
|
||||
@TableField("warningContent")
|
||||
@TableField(value = "warningContent")
|
||||
private String warningContent;
|
||||
/**
|
||||
* 危急值接收医生
|
||||
*/
|
||||
@TableField("receiveDoctor")
|
||||
@TableField(value = "receiveDoctor")
|
||||
private String receiveDoctor;
|
||||
/**
|
||||
* 处理医生
|
||||
*/
|
||||
@TableField("dealDoctor")
|
||||
@TableField(value = "dealDoctor")
|
||||
private String dealDoctor;
|
||||
/**
|
||||
* 确认时间
|
||||
|
@ -30,6 +30,13 @@ public interface WarningService {
|
||||
*/
|
||||
void updateWarning(@Valid WarningSaveReqVO updateReqVO);
|
||||
|
||||
|
||||
/**
|
||||
* 更新危急值记录
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void SaveupdateWarning(@Valid WarningSaveUpdateVO updateReqVO);
|
||||
/**
|
||||
* 删除危急值记录
|
||||
*
|
||||
|
@ -50,6 +50,13 @@ public class WarningServiceImpl implements WarningService {
|
||||
warningMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void SaveupdateWarning(WarningSaveUpdateVO updateReqVO) {
|
||||
// 更新
|
||||
WarningDO updateObj = BeanUtils.toBean(updateReqVO, WarningDO.class);
|
||||
warningMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteWarning(String id) {
|
||||
// 校验存在
|
||||
|
Loading…
Reference in New Issue
Block a user