完善申请单记录 Applyform 相关内容
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled
This commit is contained in:
parent
633f93b526
commit
f03c9566f3
@ -1,5 +1,11 @@
|
|||||||
package cn.iocoder.yudao.module.applyregistration.controller.admin.applyform;
|
package cn.iocoder.yudao.module.applyregistration.controller.admin.applyform;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.applyregistration.controller.admin.applyform.devicevo.DeviceVO;
|
||||||
|
import cn.iocoder.yudao.module.applyregistration.controller.admin.applyform.devicevo.deviceupVO;
|
||||||
|
import cn.iocoder.yudao.module.applyregistration.dal.device.DeviceDO;
|
||||||
|
import cn.iocoder.yudao.module.applyregistration.service.applyform.device.DeviceService;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@ -8,6 +14,8 @@ import io.swagger.v3.oas.annotations.Parameter;
|
|||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
@ -36,9 +44,13 @@ import javax.validation.Valid;
|
|||||||
@Validated
|
@Validated
|
||||||
public class ApplyformController {
|
public class ApplyformController {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(ApplyformController.class);
|
||||||
@Resource
|
@Resource
|
||||||
private ApplyformService applyformService;
|
private ApplyformService applyformService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DeviceService DeviceService;
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建申请登记记录")
|
@Operation(summary = "创建申请登记记录")
|
||||||
@PreAuthorize("@ss.hasPermission('applyregistration:applyform:create')")
|
@PreAuthorize("@ss.hasPermission('applyregistration:applyform:create')")
|
||||||
@ -93,4 +105,69 @@ public class ApplyformController {
|
|||||||
BeanUtils.toBean(list, ApplyformRespVO.class));
|
BeanUtils.toBean(list, ApplyformRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getdevice")
|
||||||
|
@Operation(summary = "获取分诊设备列表")
|
||||||
|
@Parameter(name = "orgid", description = "机构ID", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('applyregistration:applyform:query')")
|
||||||
|
public CommonResult<List<DeviceVO>> getDevicelist(@RequestParam("orgId") String orgId) {
|
||||||
|
List<DeviceDO> devicelist = DeviceService.getDevicelist(orgId);
|
||||||
|
return success(BeanUtils.toBean(devicelist, DeviceVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/updateapplyform")
|
||||||
|
@Operation(summary = "分检更新")
|
||||||
|
@Parameter(name = "id", description = "ID", required = true, example = "1024")
|
||||||
|
@Parameter(name = "device", description = "设备", required = true,example = "12121")
|
||||||
|
@PreAuthorize("@ss.hasPermission('applyregistration:applyform:query')")
|
||||||
|
public CommonResult<Boolean> updateFJApplyform(@Valid @RequestBody deviceupVO deviceVO) {
|
||||||
|
|
||||||
|
if (deviceVO==null)
|
||||||
|
{
|
||||||
|
log.error("分检更新方法参数为空");
|
||||||
|
return success(false);
|
||||||
|
}
|
||||||
|
String device= deviceVO.getDevice();
|
||||||
|
if (!device.isEmpty())
|
||||||
|
{
|
||||||
|
LocalDateTime dateTime= LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
|
||||||
|
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||||
|
String[] result = device.split("\\|");
|
||||||
|
ApplyformSaveReqVO updateReqVO=new ApplyformSaveReqVO();
|
||||||
|
updateReqVO.setId(deviceVO.getID());
|
||||||
|
updateReqVO.setDeviceName(result[0]) ;
|
||||||
|
updateReqVO.setDeviceId(result[1]);
|
||||||
|
updateReqVO.setSortDate(dateTime);
|
||||||
|
updateReqVO.setExamStatus("未检查");
|
||||||
|
applyformService.updateApplyform(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return success(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@DeleteMapping("/cancel")
|
||||||
|
@Operation(summary = "申请单作废")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('applyregistration:applyform:delete')")
|
||||||
|
public CommonResult<Boolean> cancelApplyform(@RequestParam("id") String id) {
|
||||||
|
|
||||||
|
ApplyformSaveReqVO updateReqVO=new ApplyformSaveReqVO();
|
||||||
|
updateReqVO.setId(id);
|
||||||
|
updateReqVO.setExamStatus("已放弃");
|
||||||
|
applyformService.updateApplyform(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/applfmdeptlist")
|
||||||
|
@Operation(summary = "获取分诊设备列表")
|
||||||
|
@Parameter(name = "orgid", description = "机构ID", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('applyregistration:applyform:query')")
|
||||||
|
public CommonResult<List<DeviceVO>> getapplfmdeptlist(@RequestParam("orgId") String orgId) {
|
||||||
|
List<DeviceDO> devicelist = DeviceService.getDevicelist(orgId);
|
||||||
|
return success(BeanUtils.toBean(devicelist, DeviceVO.class));
|
||||||
|
}
|
||||||
}
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package cn.iocoder.yudao.module.applyregistration.controller.admin.applyform.department;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class departmentVO {
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "主键")
|
||||||
|
private String ID;
|
||||||
|
}
|
@ -0,0 +1,76 @@
|
|||||||
|
package cn.iocoder.yudao.module.applyregistration.controller.admin.applyform.devicevo;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class DeviceVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键")
|
||||||
|
private String ID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "设备名称")
|
||||||
|
private String deviceName;
|
||||||
|
/**
|
||||||
|
* 设备唯一编号
|
||||||
|
*/
|
||||||
|
@Schema(description = "设备唯一编号")
|
||||||
|
private String deviceId;
|
||||||
|
/**
|
||||||
|
* 设备型号
|
||||||
|
*/
|
||||||
|
@Schema(description = "设备型号")
|
||||||
|
private String deviceModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备生产商
|
||||||
|
*/
|
||||||
|
@Schema(description = "设备生产商")
|
||||||
|
private String deviceMaker;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DR CT MR 超声等类别
|
||||||
|
*/
|
||||||
|
@Schema(description = "超声等类别")
|
||||||
|
private String deviceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备状态:0:失效,1:正常,设备故障或者淘汰,此状态置为 0
|
||||||
|
*/
|
||||||
|
@Schema(description = "设备状态")
|
||||||
|
private String deviceStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备归属科室
|
||||||
|
*/
|
||||||
|
@Schema(description = "设备归属科室")
|
||||||
|
private String deviceDepartment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机构ID
|
||||||
|
*/
|
||||||
|
@Schema(description = "机构ID")
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备录入时间
|
||||||
|
*/
|
||||||
|
@Schema(description = "设备录入时间")
|
||||||
|
private String createDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备归属科室代码
|
||||||
|
*/
|
||||||
|
@Schema(description = "设备归属科室代码")
|
||||||
|
private String departmentCode;
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package cn.iocoder.yudao.module.applyregistration.controller.admin.applyform.devicevo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class deviceupVO {
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "主键")
|
||||||
|
private String ID;
|
||||||
|
|
||||||
|
@Schema(description = "设备内容")
|
||||||
|
private String device;
|
||||||
|
}
|
@ -79,4 +79,9 @@ public class ApplyformPageReqVO extends PageParam {
|
|||||||
@Schema(description = "分检医生")
|
@Schema(description = "分检医生")
|
||||||
private String sortDoctor;
|
private String sortDoctor;
|
||||||
|
|
||||||
|
@Schema(description = "执行科室")
|
||||||
|
private String deviceDepartment;
|
||||||
|
@Schema(description = "执行科室代码")
|
||||||
|
private String deviceDepartmentCode;
|
||||||
|
|
||||||
}
|
}
|
@ -14,7 +14,6 @@ import com.alibaba.excel.annotation.*;
|
|||||||
public class ApplyformRespVO {
|
public class ApplyformRespVO {
|
||||||
|
|
||||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "20234")
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "20234")
|
||||||
@ExcelProperty("主键")
|
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "登记单号", example = "10624")
|
@Schema(description = "登记单号", example = "10624")
|
||||||
@ -82,7 +81,6 @@ public class ApplyformRespVO {
|
|||||||
private String billDoctorDepartment;
|
private String billDoctorDepartment;
|
||||||
|
|
||||||
@Schema(description = "此条记录的创建时间")
|
@Schema(description = "此条记录的创建时间")
|
||||||
@ExcelProperty("此条记录的创建时间")
|
|
||||||
private LocalDateTime createDate;
|
private LocalDateTime createDate;
|
||||||
|
|
||||||
@Schema(description = "检查项目代码")
|
@Schema(description = "检查项目代码")
|
||||||
@ -90,11 +88,15 @@ public class ApplyformRespVO {
|
|||||||
private String examItemCode;
|
private String examItemCode;
|
||||||
|
|
||||||
@Schema(description = "机构ID", example = "31976")
|
@Schema(description = "机构ID", example = "31976")
|
||||||
@ExcelProperty("机构ID")
|
|
||||||
private String orgId;
|
private String orgId;
|
||||||
|
|
||||||
@Schema(description = "分检医生")
|
@Schema(description = "分检医生")
|
||||||
@ExcelProperty("分检医生")
|
@ExcelProperty("分检医生")
|
||||||
private String sortDoctor;
|
private String sortDoctor;
|
||||||
|
|
||||||
|
@Schema(description = "执行科室")
|
||||||
|
private String deviceDepartment;
|
||||||
|
@Schema(description = "执行科室代码")
|
||||||
|
private String deviceDepartmentCode;
|
||||||
|
|
||||||
}
|
}
|
@ -73,4 +73,9 @@ public class ApplyformSaveReqVO {
|
|||||||
@Schema(description = "分检医生")
|
@Schema(description = "分检医生")
|
||||||
private String sortDoctor;
|
private String sortDoctor;
|
||||||
|
|
||||||
|
@Schema(description = "执行科室")
|
||||||
|
private String deviceDepartment;
|
||||||
|
@Schema(description = "执行科室代码")
|
||||||
|
private String deviceDepartmentCode;
|
||||||
|
|
||||||
}
|
}
|
@ -137,7 +137,7 @@ public class ApplyformDO {
|
|||||||
/**
|
/**
|
||||||
* 执行科室代码
|
* 执行科室代码
|
||||||
*/
|
*/
|
||||||
@TableField("departmentCode")
|
@TableField("deviceDepartmentCode")
|
||||||
private String departmentCode;
|
private String deviceDepartmentCode;
|
||||||
|
|
||||||
}
|
}
|
@ -0,0 +1,74 @@
|
|||||||
|
package cn.iocoder.yudao.module.applyregistration.dal.device;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
@TableName("tb_device")
|
||||||
|
@Data
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DeviceDO {
|
||||||
|
|
||||||
|
@TableId(type = IdType.INPUT)
|
||||||
|
private String ID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备名称
|
||||||
|
*/
|
||||||
|
@TableField("deviceName")
|
||||||
|
private String deviceName;
|
||||||
|
/**
|
||||||
|
* 设备唯一编号
|
||||||
|
*/
|
||||||
|
@TableField("deviceId")
|
||||||
|
private String deviceId;
|
||||||
|
/**
|
||||||
|
* 设备型号
|
||||||
|
*/
|
||||||
|
@TableField("deviceModel")
|
||||||
|
private String deviceModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备生产商
|
||||||
|
*/
|
||||||
|
@TableField("deviceMaker")
|
||||||
|
private String deviceMaker;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DR CT MR 超声等类别
|
||||||
|
*/
|
||||||
|
@TableField("deviceType")
|
||||||
|
private String deviceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备状态:0:失效,1:正常,设备故障或者淘汰,此状态置为 0
|
||||||
|
*/
|
||||||
|
@TableField("deviceStatus")
|
||||||
|
private String deviceStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备归属科室
|
||||||
|
*/
|
||||||
|
@TableField("deviceDepartment")
|
||||||
|
private String deviceDepartment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机构ID
|
||||||
|
*/
|
||||||
|
@TableField("orgId")
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备录入时间
|
||||||
|
*/
|
||||||
|
@TableField("createDate")
|
||||||
|
private String createDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备归属科室代码
|
||||||
|
*/
|
||||||
|
@TableField("departmentCode")
|
||||||
|
private String departmentCode;
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package cn.iocoder.yudao.module.applyregistration.dal.device.Mapper;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.module.applyregistration.dal.device.DeviceDO;
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface DeviceMapper extends BaseMapperX<DeviceDO>
|
||||||
|
{
|
||||||
|
|
||||||
|
//获取机构表里的上级机构
|
||||||
|
List<DeviceDO> SelectDevice(@Param("orgId") String orgId);
|
||||||
|
}
|
@ -41,6 +41,8 @@ public interface ApplyformMapper extends BaseMapperX<ApplyformDO> {
|
|||||||
.eqIfPresent(ApplyformDO::getExamItemCode, reqVO.getExamItemCode())
|
.eqIfPresent(ApplyformDO::getExamItemCode, reqVO.getExamItemCode())
|
||||||
.eqIfPresent(ApplyformDO::getOrgId, reqVO.getOrgId())
|
.eqIfPresent(ApplyformDO::getOrgId, reqVO.getOrgId())
|
||||||
.eqIfPresent(ApplyformDO::getSortDoctor, reqVO.getSortDoctor())
|
.eqIfPresent(ApplyformDO::getSortDoctor, reqVO.getSortDoctor())
|
||||||
|
.eqIfPresent(ApplyformDO::getDeviceDepartment,reqVO.getDeviceDepartment())
|
||||||
|
.eqIfPresent(ApplyformDO::getDeviceDepartmentCode,reqVO.getDeviceDepartmentCode())
|
||||||
.orderByDesc(ApplyformDO::getId));
|
.orderByDesc(ApplyformDO::getId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
package cn.iocoder.yudao.module.applyregistration.service.applyform.device;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.module.applyregistration.controller.admin.applyform.vo.ApplyformPageReqVO;
|
||||||
|
import cn.iocoder.yudao.module.applyregistration.dal.dataobject.applyform.ApplyformDO;
|
||||||
|
import cn.iocoder.yudao.module.applyregistration.dal.device.DeviceDO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface DeviceService {
|
||||||
|
|
||||||
|
List<DeviceDO> getDevicelist(String orgId);
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package cn.iocoder.yudao.module.applyregistration.service.applyform.device;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.module.applyregistration.dal.device.DeviceDO;
|
||||||
|
import cn.iocoder.yudao.module.applyregistration.dal.device.Mapper.DeviceMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Validated
|
||||||
|
public class DeviceServiceImpl implements DeviceService {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DeviceMapper DeviceMapper;
|
||||||
|
@Override
|
||||||
|
public List<DeviceDO> getDevicelist(String orgId) {
|
||||||
|
|
||||||
|
return DeviceMapper.SelectDevice(orgId);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="cn.iocoder.yudao.module.applyregistration.dal.device.Mapper.DeviceMapper">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||||
|
-->
|
||||||
|
<select id="SelectDevice" parameterType="String" resultType="cn.iocoder.yudao.module.applyregistration.dal.device.DeviceDO">
|
||||||
|
SELECT * FROM tb_device WHERE orgID = #{orgId}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue
Block a user