diff --git a/src/main/java/com/glxp/api/constant/Constant.java b/src/main/java/com/glxp/api/constant/Constant.java index a304dc01..5e03eeed 100644 --- a/src/main/java/com/glxp/api/constant/Constant.java +++ b/src/main/java/com/glxp/api/constant/Constant.java @@ -46,6 +46,11 @@ public class Constant { */ public static final String DEVICE_MA_ORDER = "DMA"; + /** + * 设备巡检计划前缀 + */ + public static final String DEVICE_INSPECT_PLAN_ORDER = "DIP"; + public static final String dlThrProducts = "THR_DOWNLOAD_PRODUCTS"; public static final String dlThrInvProducts = "THR_DOWNLOAD_INV_PRODUCTS"; public static final String dlThrOrders = "THR_DOWNLOAD_ORDERS"; diff --git a/src/main/java/com/glxp/api/constant/DeviceStatus.java b/src/main/java/com/glxp/api/constant/DeviceStatus.java new file mode 100644 index 00000000..18f09ca4 --- /dev/null +++ b/src/main/java/com/glxp/api/constant/DeviceStatus.java @@ -0,0 +1,18 @@ +package com.glxp.api.constant; + +//设备任务状态 +public class DeviceStatus { + + public static final int DEVICE_STATUS_TEMP_SAVE = 0; //草稿 + + public static final int DEVICE_STATUS_TEMP_UNDISTRIBUTTED = 1; //未分配 + + public static final int DEVICE_STATUS_TEMP_UNINSPECTTION = 2; //未巡检 已分配 + + public static final int DEVICE_STATUS_TEMP_DURINGINSPECTTION = 3; //巡检中 + + public static final int DEVICE_STATUS_TEMP_INSPECTED = 4; //已巡检 + + + +} diff --git a/src/main/java/com/glxp/api/constant/DeviceType.java b/src/main/java/com/glxp/api/constant/DeviceType.java new file mode 100644 index 00000000..49f89c4a --- /dev/null +++ b/src/main/java/com/glxp/api/constant/DeviceType.java @@ -0,0 +1,10 @@ +package com.glxp.api.constant; + +public interface DeviceType { + + int TYPE_INSPECTTION = 1; //巡检 + + int TYPE_MAINTAIN = 2; //养护 + + int TYPE_REPAIR = 3; //报修 +} diff --git a/src/main/java/com/glxp/api/controller/inv/DeviceInspectTakeController.java b/src/main/java/com/glxp/api/controller/inv/DeviceInspectTakeController.java new file mode 100644 index 00000000..d9d086aa --- /dev/null +++ b/src/main/java/com/glxp/api/controller/inv/DeviceInspectTakeController.java @@ -0,0 +1,142 @@ +package com.glxp.api.controller.inv; + +import com.github.pagehelper.PageInfo; +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.common.util.ResultVOUtils; +import com.glxp.api.constant.Constant; +import com.glxp.api.constant.DeviceStatus; +import com.glxp.api.entity.inv.DeviceInspectTaskDetailEntity; +import com.glxp.api.entity.inv.DeviceInspectTaskEntity; +import com.glxp.api.req.inv.FilterDeviceInspectTakeRequest; +import com.glxp.api.res.inv.DeviceInspectTakeResponse; +import com.glxp.api.service.inv.DeviceInspectTaskDetailService; +import com.glxp.api.service.inv.DeviceInspectTaskService; +import com.glxp.api.util.GennerOrderUtils; +import com.glxp.api.util.OrderNoTypeBean; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +/** + * 设备巡检任务接口 + */ +@Slf4j +@RestController +public class DeviceInspectTakeController { + + @Resource + DeviceInspectTaskService deviceInspectTaskService; + + @Resource + DeviceInspectTaskDetailService deviceInspectTaskDetailService; + @Resource + private GennerOrderUtils gennerOrderUtils; + + /** + * 查询设设备巡检任务接口 + * + * @param filterDeviceInspectTakeRequest + * @return + */ + @GetMapping("/udiwms/inv/device/inspect/take/filter") + public BaseResponse filterList(FilterDeviceInspectTakeRequest filterDeviceInspectTakeRequest) { + List list = deviceInspectTaskService.filterList(filterDeviceInspectTakeRequest); + PageInfo pageInfo = new PageInfo<>(list); + return ResultVOUtils.page(pageInfo); + } + @PostMapping("/udiwms/inv/device/inspect/take/uploadDeviceInspecTake") + public BaseResponse uploadDeviceInspecTake(@RequestBody DeviceInspectTaskEntity deviceInspectTaskEntity) { + deviceInspectTaskEntity.setUpdateTime(new Date()); + if(deviceInspectTaskEntity.getStatus() == DeviceStatus.DEVICE_STATUS_TEMP_DURINGINSPECTTION){ + deviceInspectTaskEntity.setStrartTime(new Date()); + }else if (deviceInspectTaskEntity.getStatus() == DeviceStatus.DEVICE_STATUS_TEMP_INSPECTED){ + deviceInspectTaskEntity.setEndTime(new Date()); + } + boolean falg=deviceInspectTaskService.updateById(deviceInspectTaskEntity); + if(!falg){ + return ResultVOUtils.error(999,"更新失败"); + } + return ResultVOUtils.success(); + } + + @PostMapping("/udiwms/inv/device/inspect/take/uploadDeviceTake") + public BaseResponse uploadDeviceTake(@RequestBody DeviceInspectTaskEntity deviceInspectTaskEntity) { + deviceInspectTaskEntity.setUpdateTime(new Date()); + boolean falg=deviceInspectTaskService.updateById(deviceInspectTaskEntity); + if(!falg){ + return ResultVOUtils.error(999,"更新失败"); + } + return ResultVOUtils.success(); + } + + + + @PostMapping("/udiwms/inv/device/inspect/take/addDeviceInspecTake") + public BaseResponse addDeviceInspecTake(@RequestBody DeviceInspectTaskEntity deviceInspectTaskEntity) { + String orderId = gennerOrderUtils.createStOrderNo(new OrderNoTypeBean(Constant.DEVICE_INSPECT_PLAN_ORDER, "yyyyMMdd")); + deviceInspectTaskEntity.setOrderId(orderId); + deviceInspectTaskEntity.setCreateTime(new Date()); + deviceInspectTaskService.addDeviceInspectTask(deviceInspectTaskEntity); + return ResultVOUtils.success(deviceInspectTaskEntity); + } + + @PostMapping("/udiwms/inv/device/inspect/take/delectDeviceInspecTake") + public BaseResponse delectDeviceInspecTake(@RequestBody DeviceInspectTaskEntity deviceInspectTaskEntity) { + + deviceInspectTaskService.delectDeviceInspectTask(deviceInspectTaskEntity); + return ResultVOUtils.success(deviceInspectTaskEntity); + } + + + + + + + + + //------------------------------------------ 详情方法--------------------------------------------------------------// + @GetMapping("/udiwms/inv/device/inspect/take/detail/selectDeviceInspecTakeDetail") + public BaseResponse selectDeviceInspecTakeDetail(DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity) { + List deviceInspectPlanDelectEntityList = deviceInspectTaskDetailService.selectDeviceInspectTakeDetail(deviceInspectTaskDetailEntity); + return ResultVOUtils.success(deviceInspectPlanDelectEntityList); + } + + @PostMapping("/udiwms/inv/device/inspect/take/detail/uploadDeviceInspecTakeDetail") + public BaseResponse uploadDeviceInspecTakeDetail(@RequestBody DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity) { + deviceInspectTaskDetailEntity.setUpdateTime(new Date()); + boolean falg=deviceInspectTaskDetailService.uploadDeviceInspecTakeDetail(deviceInspectTaskDetailEntity); + if(!falg){ + return ResultVOUtils.error(999,"更新失败"); + } + return ResultVOUtils.success(); + } + + @PostMapping("/udiwms/inv/device/inspect/take/detail/addDeviceInspecTakeDetail") + public BaseResponse addDeviceInspecTakeDetail(@RequestBody DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity) { + + boolean falg=deviceInspectTaskDetailService.addDeviceInspectTaskDelect(deviceInspectTaskDetailEntity); + if(!falg){ + return ResultVOUtils.error(999,"更新失败"); + } + return ResultVOUtils.success(); + } + + @GetMapping("/udiwms/inv/device/inspect/take/detail/delectDeviceInspecTakeDetail") + public BaseResponse delecttDeviceInspecTakeDetail(String id) { + + boolean falg=deviceInspectTaskDetailService.removeById(id); + if(!falg){ + return ResultVOUtils.error(999,"删除失败"); + } + return ResultVOUtils.success(); + } + + + +} diff --git a/src/main/java/com/glxp/api/controller/inv/DeviceProjectSetController.java b/src/main/java/com/glxp/api/controller/inv/DeviceProjectSetController.java new file mode 100644 index 00000000..a8c57ab7 --- /dev/null +++ b/src/main/java/com/glxp/api/controller/inv/DeviceProjectSetController.java @@ -0,0 +1,99 @@ +package com.glxp.api.controller.inv; + +import com.github.pagehelper.PageInfo; +import com.glxp.api.common.enums.ResultEnum; +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.common.util.ResultVOUtils; +import com.glxp.api.req.inv.DeviceProjectSetRequest; +import com.glxp.api.res.inv.DeviceProjectSetResponse; +import com.glxp.api.service.inv.DeviceProjectSetService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 维保设备接口 + */ +@Slf4j +@RestController +public class DeviceProjectSetController { + + @Resource + private DeviceProjectSetService deviceProjectSetService; + + /** + * 查询维保设备列表 + * + * @param deviceProjectSetRequest + * @return + */ + @GetMapping("/udiwms/inv/device/project/set/filter") + public BaseResponse filterList(DeviceProjectSetRequest deviceProjectSetRequest) { + + List list = deviceProjectSetService.filterList(deviceProjectSetRequest); + PageInfo pageInfo = new PageInfo<>(list); + return ResultVOUtils.page(pageInfo); + } + + /** + * 添加维保设备维护 + * + * @param deviceProjectSetRequest + * @return + */ + @PostMapping("/udiwms/inv/device/project/set/insertDevprojectSet") + public BaseResponse insertDevprojectSet(@RequestBody DeviceProjectSetRequest deviceProjectSetRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + //判断编码是否存在 + boolean b = deviceProjectSetService.chcekCode(deviceProjectSetRequest.getCode(), null); + if(b){ + return ResultVOUtils.error(999,"编码已存在!"); + } + deviceProjectSetService.insertDevprojectSet(deviceProjectSetRequest); + return ResultVOUtils.success("添加成功"); + } + + /** + * 更新维保设备维护信息 + * + * @param deviceProjectSetRequest + * @return + */ + @PostMapping("/udiwms/inv/device/project/set/updateDevprojectSet") + public BaseResponse updateDevprojectSet(@RequestBody DeviceProjectSetRequest deviceProjectSetRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + //判断编号是否存在 + boolean b = deviceProjectSetService.chcekCode(deviceProjectSetRequest.getCode(), deviceProjectSetRequest.getId() + ""); + if(b){ + return ResultVOUtils.error(999,"编码已存在!"); + } + + deviceProjectSetService.updateDevprojectSet(deviceProjectSetRequest); + return ResultVOUtils.success("更新成功"); + } + + + /** + * 删除维保设备维护 + * + * @param id + * @return + */ + @GetMapping("/udiwms/inv/device/project/set/deleteDevprojectSet") + public BaseResponse deleteDevprojectSet(String id) { + deviceProjectSetService.deleteDevprojectSet(id); + + return ResultVOUtils.success("删除成功"); + } + +} diff --git a/src/main/java/com/glxp/api/dao/inv/DeviceInspectTaskDetailMapper.java b/src/main/java/com/glxp/api/dao/inv/DeviceInspectTaskDetailMapper.java new file mode 100644 index 00000000..47422c06 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/inv/DeviceInspectTaskDetailMapper.java @@ -0,0 +1,9 @@ +package com.glxp.api.dao.inv; + +import com.glxp.api.dao.BaseMapperPlus; +import com.glxp.api.entity.inv.DeviceInspectTaskDetailEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface DeviceInspectTaskDetailMapper extends BaseMapperPlus { +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/dao/inv/DeviceInspectTaskMapper.java b/src/main/java/com/glxp/api/dao/inv/DeviceInspectTaskMapper.java new file mode 100644 index 00000000..ecdda7fc --- /dev/null +++ b/src/main/java/com/glxp/api/dao/inv/DeviceInspectTaskMapper.java @@ -0,0 +1,15 @@ +package com.glxp.api.dao.inv; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.inv.DeviceInspectTaskEntity; +import com.glxp.api.req.inv.FilterDeviceInspectTakeRequest; +import com.glxp.api.res.inv.DeviceInspectTakeResponse; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface DeviceInspectTaskMapper extends BaseMapper { + + List filterList(FilterDeviceInspectTakeRequest filterDeviceInspectTakeRequest); +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/dao/inv/DeviceProjectSetMapper.java b/src/main/java/com/glxp/api/dao/inv/DeviceProjectSetMapper.java new file mode 100644 index 00000000..47758a36 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/inv/DeviceProjectSetMapper.java @@ -0,0 +1,16 @@ +package com.glxp.api.dao.inv; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.inv.DeviceProjectSet; +import com.glxp.api.req.inv.DeviceProjectSetRequest; +import com.glxp.api.res.inv.DeviceProjectSetResponse; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface DeviceProjectSetMapper extends BaseMapper { + + List filterList(DeviceProjectSetRequest deviceProjectSetRequest); + +} diff --git a/src/main/java/com/glxp/api/entity/inv/DeviceInspectTaskDetailEntity.java b/src/main/java/com/glxp/api/entity/inv/DeviceInspectTaskDetailEntity.java new file mode 100644 index 00000000..e8a107e6 --- /dev/null +++ b/src/main/java/com/glxp/api/entity/inv/DeviceInspectTaskDetailEntity.java @@ -0,0 +1,70 @@ +package com.glxp.api.entity.inv; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +@TableName(value = "device_inspect_task_detail") +public class DeviceInspectTaskDetailEntity implements Serializable { + @TableId(value = "id", type = IdType.INPUT) + private Integer id; + + /** + * 巡检项目编码 + */ + @TableField(value = "projectCode") + private String projectCode; + + /** + * 巡检内容 + */ + @TableField(value = "projectContent") + private String projectContent; + + /** + * 状态(1:未开始;2:已检查;3:异常;4:不巡检 + */ + @TableField(value = "`status`") + private Integer status; + + /** + * 巡检结果备注 + */ + @TableField(value = "`result`") + private String result; + + /** + * 巡检图片 + */ + @TableField(value = "inspectImage") + private String inspectImage; + + /** + * 巡检人 + */ + @TableField(value = "inspectUser") + private String inspectUser; + + /** + * 更新时间 + */ + @TableField(value = "updateTime") + private Date updateTime; + + /** + * 巡检任务ID外键 + */ + @TableField(value = "taskOrderIdFk") + private String taskOrderIdFk; + + @TableField(exist = false) + private String inspectName; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/entity/inv/DeviceInspectTaskEntity.java b/src/main/java/com/glxp/api/entity/inv/DeviceInspectTaskEntity.java new file mode 100644 index 00000000..efc5e417 --- /dev/null +++ b/src/main/java/com/glxp/api/entity/inv/DeviceInspectTaskEntity.java @@ -0,0 +1,109 @@ +package com.glxp.api.entity.inv; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.util.Date; + +@Data +@TableName(value = "device_inspect_task") +public class DeviceInspectTaskEntity{ + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + /** + * 任务单号 + */ + @TableField(value = "orderId") + private String orderId; + + /** + * 巡检计划单号(外键) + */ + @TableField(value = "planOrderIdFk") + private String planOrderIdFk; + + /** + * 部门 + */ + @TableField(value = "deptCode") + private String deptCode; + + /** + * 仓库 + */ + @TableField(value = "invCode") + private String invCode; + + /** + * 资产编码 + */ + @TableField(value = "code") + private String code; + + /** + * 状态 0 未巡检 1 巡检中 2 巡检结束 + */ + @TableField(value = "`status`") + private Integer status; + + /** + * 巡检人 + */ + @TableField(value = "inspectUser") + private String inspectUser; + + /** + * 提醒时间 + */ + @TableField(value = "remindTime") + private Date remindTime; + + /** + * 巡检备注 + */ + @TableField(value = "remark") + private String remark; + + /** + * 任务开始时间 + */ + @TableField(value = "strartTime") + private Date strartTime; + + /** + * 任务结束时间 + */ + @TableField(value = "endTime") + private Date endTime; + + /** + * 创建时间 + */ + @TableField(value = "createTime") + private Date createTime; + + /** + * 更新时间 + */ + @TableField(value = "updateTime") + private Date updateTime; + + @TableField(value = "expectedTime") + private Date expectedTime; + + @TableField(value = "type") + private Integer type; + + @TableField(value = "repairType") + private Integer repairType; + + @TableField(value = "level") + private Integer level; + + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/com/glxp/api/entity/inv/DeviceProjectSet.java b/src/main/java/com/glxp/api/entity/inv/DeviceProjectSet.java new file mode 100644 index 00000000..3de1658a --- /dev/null +++ b/src/main/java/com/glxp/api/entity/inv/DeviceProjectSet.java @@ -0,0 +1,67 @@ +package com.glxp.api.entity.inv; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +@TableName(value = "device_project_set") +public class DeviceProjectSet implements Serializable { + @TableId(value = "id", type = IdType.INPUT) + private Integer id; + + /** + * 项目编号 + */ + @TableField(value = "code") + private String code; + + /** + * 项目内容 + */ + @TableField(value = "content") + private String content; + + /** + * 项目类型:1:巡检;2:养护 + */ + @TableField(value = "`type`") + private Integer type; + + /** + * 备注 + */ + @TableField(value = "remak") + private String remak; + + /** + * 更新时间 + */ + @TableField(value = "udpateTime") + private Date udpateTime; + + /** + * 更新人 + */ + @TableField(value = "updateUser") + private String updateUser; + + /** + * 创建人 + */ + @TableField(value = "`createUser`") + private String createUser; + + /** + * 创建时间 + */ + @TableField(value = "createTime") + private Date createTime; + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/com/glxp/api/req/inv/DeviceProjectSetRequest.java b/src/main/java/com/glxp/api/req/inv/DeviceProjectSetRequest.java new file mode 100644 index 00000000..35370cf3 --- /dev/null +++ b/src/main/java/com/glxp/api/req/inv/DeviceProjectSetRequest.java @@ -0,0 +1,55 @@ +package com.glxp.api.req.inv; + +import com.glxp.api.util.page.ListPageRequest; +import lombok.Data; + +import java.util.Date; + +@Data +public class DeviceProjectSetRequest extends ListPageRequest { + private Integer id; + + /** + * 项目编号 + */ + private String code; + + /** + * 项目内容 + */ + private String content; + + /** + * 项目类型:1:巡检;2:养护 + */ + private Integer type; + + /** + * 备注 + */ + private String remak; + + /** + * 更新时间 + */ + private Date udpateTime; + + /** + * 更新人 + */ + private String updateUser; + + /** + * 创建人 + */ + private String createUser; + + /** + * 创建时间 + */ + private Date createTime; + + private String startTime; + private String endTime; + +} diff --git a/src/main/java/com/glxp/api/req/inv/FilterDeviceInspectTakeRequest.java b/src/main/java/com/glxp/api/req/inv/FilterDeviceInspectTakeRequest.java new file mode 100644 index 00000000..4e0e3c3b --- /dev/null +++ b/src/main/java/com/glxp/api/req/inv/FilterDeviceInspectTakeRequest.java @@ -0,0 +1,72 @@ +package com.glxp.api.req.inv; + +import com.glxp.api.util.page.ListPageRequest; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * 查询设备设备巡检计划接口参数 + */ +@Data +public class FilterDeviceInspectTakeRequest extends ListPageRequest { + + private Integer id; + + /** + * 单号 + */ + private String orderId; + + /** + * 部门编码 + */ + private String deptCode; + + /** + * 仓库编码 + */ + private String invCode; + + /** + * 资产编码 + */ + private String code; + + /** + * 计划级别(1:低级;2:中级;3:高级) + */ + private Integer level; + + /** + * 状态(1:新增;2:未审核;3:已审核) + */ + private Integer status; + + private List statusList; + + private Date expectedTime; + + private String ksStartDate; + + private String ksEndDate; + + private String jsStartDate; + + private String jsEndDate; + + private String yjjsStartDate; + + private String yjjsEndDate; + + + private Integer repairType; + + private Integer type; + + + + + +} diff --git a/src/main/java/com/glxp/api/res/inv/DeviceInspectTakeResponse.java b/src/main/java/com/glxp/api/res/inv/DeviceInspectTakeResponse.java new file mode 100644 index 00000000..8f46ade5 --- /dev/null +++ b/src/main/java/com/glxp/api/res/inv/DeviceInspectTakeResponse.java @@ -0,0 +1,117 @@ +package com.glxp.api.res.inv; + +import lombok.Data; + +import java.util.Date; + +/** + * 设备巡检计划VO + */ +@Data +public class DeviceInspectTakeResponse { + + private Integer id; + + /** + * 单号 + */ + private String orderId; + + /** + * 部门编码 + */ + private String deptCode; + + /** + * 仓库编码 + */ + private String invCode; + + /** + * 资产编码 + */ + private String code; + + private String planOrderIdFk; + + /** + * 状态(0:未巡检;1:巡检中;2:已巡检) + */ + private Integer status; + + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 备注 + */ + private String remark; + + /** + * 部门名称 + */ + private String deptName; + + /** + * 仓库名称 + */ + private String invName; + + /** + * 设备名称 + */ + private String deviceName; + + /** + * 规格型号 + */ + private String ggxh; + + /** + * 批次号 + */ + private String batchNo; + + /** + * 创建人名称 + */ + private String createUserName; + + /** + * 审核人名称 + */ + private String auditUserName; + + /** + * 计划开始时间 + */ + private Date strartTime; + /** + * 计划结束时间 + */ + private Date endTime; + + /** + * 计划状态(1:未启用;2:运行中;3:已结束;4:已过期 + */ + private Integer planStatus; + /** + * 巡检人 + */ + private String inspectUser; + /** + * 上次巡检时间 + */ + private Date remindTime; + private String inspectName; + private Date expectedTime; + private Integer type; + private Integer repairType; + private Integer level; + + + +} diff --git a/src/main/java/com/glxp/api/res/inv/DeviceProjectSetResponse.java b/src/main/java/com/glxp/api/res/inv/DeviceProjectSetResponse.java new file mode 100644 index 00000000..43862670 --- /dev/null +++ b/src/main/java/com/glxp/api/res/inv/DeviceProjectSetResponse.java @@ -0,0 +1,60 @@ +package com.glxp.api.res.inv; + +import lombok.Data; + +import java.util.Date; + +@Data +public class DeviceProjectSetResponse { + private Integer id; + + /** + * 项目编号 + */ + private String code; + + /** + * 项目内容 + */ + private String content; + + /** + * 项目类型:1:巡检;2:养护 + */ + private Integer type; + + /** + * 备注 + */ + private String remak; + + /** + * 更新时间 + */ + private Date udpateTime; + + /** + * 更新人 + */ + private String updateUser; + + /** + * 更新人名称 + */ + private String updateUserName; + + /** + * 创建人 + */ + private String createUser; + /** + * 创建人名称 + */ + private String createUserName; + + /** + * 创建时间 + */ + private Date createTime; + +} diff --git a/src/main/java/com/glxp/api/service/inv/DeviceInspectTaskDetailService.java b/src/main/java/com/glxp/api/service/inv/DeviceInspectTaskDetailService.java new file mode 100644 index 00000000..c1f14b5e --- /dev/null +++ b/src/main/java/com/glxp/api/service/inv/DeviceInspectTaskDetailService.java @@ -0,0 +1,57 @@ +package com.glxp.api.service.inv; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.dao.inv.DeviceInspectTaskDetailMapper; +import com.glxp.api.entity.inv.DeviceInspectTaskDetailEntity; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +@Service +public class DeviceInspectTaskDetailService extends ServiceImpl { + + @Resource + private DeviceInspectTaskDetailMapper deviceInspectTaskDetailMapper; + + public Boolean addDeviceInspectTaskDelect(DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity){ + deviceInspectTaskDetailEntity.setUpdateTime(new Date()); + deviceInspectTaskDetailMapper.insert(deviceInspectTaskDetailEntity); + return true; + } + + public Boolean addDeviceInspectTaskDelectList(List deviceInspectTaskDetailEntityList){ + deviceInspectTaskDetailMapper.insertBatch(deviceInspectTaskDetailEntityList); + return true; + } + + + public List selectDeviceInspectTakeDetail(DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity) { + + QueryWrapper ew = new QueryWrapper<>(); + if(deviceInspectTaskDetailEntity.getProjectCode() != null){ + ew.eq("projectCode",deviceInspectTaskDetailEntity.getProjectCode()); + } + if(deviceInspectTaskDetailEntity.getId() != null){ + ew.eq("id",deviceInspectTaskDetailEntity.getId()); + } + if(deviceInspectTaskDetailEntity.getTaskOrderIdFk() != null){ + ew.eq("taskOrderIdFk",deviceInspectTaskDetailEntity.getTaskOrderIdFk()); + } + if(deviceInspectTaskDetailEntity.getStatus() != null){ + ew.like("status",deviceInspectTaskDetailEntity.getStatus()); + } + ew.select("*, ( SELECT `employeeName` FROM auth_user WHERE id = device_inspect_task_detail.inspectUser ) inspectName"); + List deviceInspectPlanDelectEntities=deviceInspectTaskDetailMapper.selectList(ew); + return deviceInspectPlanDelectEntities; + } + + public Boolean uploadDeviceInspecTakeDetail(DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntityList){ + return deviceInspectTaskDetailMapper.updateById(deviceInspectTaskDetailEntityList) > 0 ? true : false; + } + + + +} diff --git a/src/main/java/com/glxp/api/service/inv/DeviceInspectTaskService.java b/src/main/java/com/glxp/api/service/inv/DeviceInspectTaskService.java new file mode 100644 index 00000000..97cd4eaf --- /dev/null +++ b/src/main/java/com/glxp/api/service/inv/DeviceInspectTaskService.java @@ -0,0 +1,48 @@ +package com.glxp.api.service.inv; + + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.github.pagehelper.PageHelper; +import com.glxp.api.dao.inv.DeviceInspectTaskMapper; +import com.glxp.api.entity.inv.DeviceInspectTaskEntity; +import com.glxp.api.req.inv.FilterDeviceInspectTakeRequest; +import com.glxp.api.res.inv.DeviceInspectTakeResponse; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +@Service +public class DeviceInspectTaskService extends ServiceImpl { + + @Resource + private DeviceInspectTaskMapper deviceInspectTaskMapper; + + public Boolean addDeviceInspectTask(DeviceInspectTaskEntity deviceInspectTaskEntity){ + deviceInspectTaskEntity.setUpdateTime(new Date()); + deviceInspectTaskMapper.insert(deviceInspectTaskEntity); + return true; + } + + public Boolean delectDeviceInspectTask(DeviceInspectTaskEntity deviceInspectTaskEntity){ + deviceInspectTaskMapper.deleteById(deviceInspectTaskEntity); + return true; + } + + + + public List filterList(FilterDeviceInspectTakeRequest filterDeviceInspectTakeRequest) { + if (null == filterDeviceInspectTakeRequest) { + return Collections.emptyList(); + } + if (null != filterDeviceInspectTakeRequest.getPage() && null != filterDeviceInspectTakeRequest.getLimit()) { + PageHelper.offsetPage((filterDeviceInspectTakeRequest.getPage() - 1) * filterDeviceInspectTakeRequest.getLimit(), filterDeviceInspectTakeRequest.getLimit()); + } + return deviceInspectTaskMapper.filterList(filterDeviceInspectTakeRequest); + } + +} + + diff --git a/src/main/java/com/glxp/api/service/inv/DeviceProjectSetService.java b/src/main/java/com/glxp/api/service/inv/DeviceProjectSetService.java new file mode 100644 index 00000000..ef530319 --- /dev/null +++ b/src/main/java/com/glxp/api/service/inv/DeviceProjectSetService.java @@ -0,0 +1,77 @@ +package com.glxp.api.service.inv; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.github.pagehelper.PageHelper; +import com.glxp.api.dao.inv.DeviceProjectSetMapper; +import com.glxp.api.entity.auth.AuthAdmin; +import com.glxp.api.entity.inv.DeviceProjectSet; +import com.glxp.api.req.inv.DeviceProjectSetRequest; +import com.glxp.api.res.inv.DeviceProjectSetResponse; +import com.glxp.api.service.auth.CustomerService; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +@Service +public class DeviceProjectSetService extends ServiceImpl { + + @Resource + DeviceProjectSetMapper deviceProjectSetMapper; + @Resource + CustomerService customerService; + + public List filterList(DeviceProjectSetRequest deviceProjectSetRequest) { + + if (null == deviceProjectSetRequest) { + return Collections.emptyList(); + } + if (null != deviceProjectSetRequest.getPage() && null != deviceProjectSetRequest.getLimit()) { + PageHelper.offsetPage((deviceProjectSetRequest.getPage() - 1) * deviceProjectSetRequest.getLimit(), deviceProjectSetRequest.getLimit()); + } + return deviceProjectSetMapper.filterList(deviceProjectSetRequest); + + } + + public boolean insertDevprojectSet(DeviceProjectSetRequest deviceProjectSetRequest) { + AuthAdmin user = customerService.getUserBean(); + DeviceProjectSet projectSet = new DeviceProjectSet(); + BeanUtils.copyProperties(deviceProjectSetRequest, projectSet); + projectSet.setCreateTime(new Date()); + projectSet.setCreateUser(user.getId()+""); + return deviceProjectSetMapper.insert(projectSet) > 0; + } + + public boolean deleteDevprojectSet(String id) { + + return deviceProjectSetMapper.deleteById(id) > 0; + } + + public boolean updateDevprojectSet(DeviceProjectSetRequest deviceProjectSetRequest) { + AuthAdmin user = customerService.getUserBean(); + DeviceProjectSet projectSet = new DeviceProjectSet(); + BeanUtils.copyProperties(deviceProjectSetRequest, projectSet); + projectSet.setUdpateTime(new Date()); + projectSet.setUpdateUser(user.getId()+""); + return deviceProjectSetMapper.updateById(projectSet) > 0; + } + + public boolean chcekCode(String code, String id) { + List list = null; + if (id != null && !"".equals(id)) { + list = deviceProjectSetMapper.selectList(new QueryWrapper().eq("code", code).ne("id", id)); + } else + list = deviceProjectSetMapper.selectList(new QueryWrapper().eq("code", code)); + if (list != null && list.size() > 0) { + return true; + } else + return false; + + } + + +} diff --git a/src/main/java/com/glxp/api/upload/uploadController.java b/src/main/java/com/glxp/api/upload/uploadController.java index e41ddb8c..6db36223 100644 --- a/src/main/java/com/glxp/api/upload/uploadController.java +++ b/src/main/java/com/glxp/api/upload/uploadController.java @@ -24,128 +24,128 @@ import java.util.UUID; @RestController public class uploadController { - @Value("${file_path}") - private String filePath; - @Value("${file_url}") - private String fileUrl; - @Value("${file_lpath}") - private String fileLpath; - @Value("${minio_path}") - private String minioPath; - @Value("${minio_url}") - private String minioUrl; - - - /** - * 上传PDF模板 - */ - - @PostMapping("/udiwms/upload/pdf/template/jasper") - public BaseResponse uploadPDFTemplate(@RequestParam("file") MultipartFile file) throws UnsupportedEncodingException { - if (file.isEmpty()) { - return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件不能为空"); - } - // 保存文件 --------------------- - String fileName = file.getOriginalFilename(); - String fileType = fileName.substring(fileName.lastIndexOf(".")); - // 文件类型判断 - if (StringUtils.isBlank(fileType) || !fileType.equals(".jasper")) { - return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件只能是 jasper 格式"); - } - String newName = UUID.randomUUID() + fileType;//生成新文件名 - String savePath = filePath + "/pdf/template"; - - File file1 = new File(savePath); - if (!file1.exists()) {// 判断目录是否存在 - file1.mkdirs();// 创建多层目录 - } - file1 = new File(savePath + "/" + newName); - try { - file.transferTo(file1); - Map rMap = new HashMap<>(); - rMap.put("msg", "上传成功"); - rMap.put("path", newName); - return ResultVOUtils.success(rMap); - } catch (IOException e) { - e.printStackTrace(); - } - return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传失败"); - } - - - @PostMapping("/udiwms/upload/pdf/template/jrxml") - public BaseResponse uploadPDFJrxmlTemplate(@RequestParam("file") MultipartFile file) throws UnsupportedEncodingException { - if (file.isEmpty()) { - return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件不能为空"); - } - // 保存文件 --------------------- - String fileName = file.getOriginalFilename(); - String fileType = fileName.substring(fileName.lastIndexOf(".")); - // 文件类型判断 - if (StringUtils.isBlank(fileType) || !fileType.equals(".jrxml")) { - return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件只能是 jrxml 格式"); - } - String newName = UUID.randomUUID() + fileType;//生成新文件名 - String savePath = filePath + "/pdf/template"; - - File file1 = new File(savePath); - if (!file1.exists()) {// 判断目录是否存在 - file1.mkdirs();// 创建多层目录 - } - file1 = new File(savePath + "/" + newName); - try { - file.transferTo(file1); - Map rMap = new HashMap<>(); - rMap.put("msg", "上传成功"); - rMap.put("path", savePath + "/" + newName); - return ResultVOUtils.success(rMap); - } catch (IOException e) { - e.printStackTrace(); - } - return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传失败"); - } - - /** - * 注册页面上传文件 - */ - @PostMapping("/udiwms/upload/register/file") - public BaseResponse uploadRegisterFile(@RequestParam("file") MultipartFile file, - @RequestParam("type") String type) throws UnsupportedEncodingException { - if (file.isEmpty()) { - return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件不能为空"); - } - if (StringUtils.isBlank(type)) { - return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件类型不能为空"); - } - - // 保存文件 --------------------- - String fileName = file.getOriginalFilename(); - String fileType = fileName.substring(fileName.lastIndexOf(".")); - // 文件类型判断 - if (StringUtils.isBlank(fileType) || (!fileType.equals(".jpg") && !fileType.equals(".png") && !fileType.equals(".doc") && !fileType.equals(".pdf"))) { - return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件只能是 jpg,png,doc,pdf 格式"); - } - String newName = UUID.randomUUID() + fileType;//生成新文件名 - String savePath = filePath + "/register/file/" + type; - String savePath1 = fileLpath + "?type=" + type; - String fileFullName = savePath + "/" + newName; - - File file1 = new File(savePath); - if (!file1.exists()) {// 判断目录是否存在 - file1.mkdirs();// 创建多层目录 - } - file1 = new File(savePath + "/" + newName); - try { - file.transferTo(file1); -// MinioUtil.uploadFile(fileFullName, file); - Map rMap = new HashMap<>(); - rMap.put("msg", "上传成功"); - rMap.put("name", fileUrl + savePath1 + "&name=" + newName); - rMap.put("type", type); - return ResultVOUtils.success(rMap); - } catch (Exception e) { - e.printStackTrace(); - } - return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传失败"); - } +// @Value("${file_path}") +// private String filePath; +// @Value("${file_url}") +// private String fileUrl; +// @Value("${file_lpath}") +// private String fileLpath; +// @Value("${minio_path}") +// private String minioPath; +// @Value("${minio_url}") +// private String minioUrl; +// +// +// /** +// * 上传PDF模板 +// */ +// +// @PostMapping("/udiwms/upload/pdf/template/jasper") +// public BaseResponse uploadPDFTemplate(@RequestParam("file") MultipartFile file) throws UnsupportedEncodingException { +// if (file.isEmpty()) { +// return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件不能为空"); +// } +// // 保存文件 --------------------- +// String fileName = file.getOriginalFilename(); +// String fileType = fileName.substring(fileName.lastIndexOf(".")); +// // 文件类型判断 +// if (StringUtils.isBlank(fileType) || !fileType.equals(".jasper")) { +// return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件只能是 jasper 格式"); +// } +// String newName = UUID.randomUUID() + fileType;//生成新文件名 +// String savePath = filePath + "/pdf/template"; +// +// File file1 = new File(savePath); +// if (!file1.exists()) {// 判断目录是否存在 +// file1.mkdirs();// 创建多层目录 +// } +// file1 = new File(savePath + "/" + newName); +// try { +// file.transferTo(file1); +// Map rMap = new HashMap<>(); +// rMap.put("msg", "上传成功"); +// rMap.put("path", newName); +// return ResultVOUtils.success(rMap); +// } catch (IOException e) { +// e.printStackTrace(); +// } +// return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传失败"); +// } +// +// +// @PostMapping("/udiwms/upload/pdf/template/jrxml") +// public BaseResponse uploadPDFJrxmlTemplate(@RequestParam("file") MultipartFile file) throws UnsupportedEncodingException { +// if (file.isEmpty()) { +// return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件不能为空"); +// } +// // 保存文件 --------------------- +// String fileName = file.getOriginalFilename(); +// String fileType = fileName.substring(fileName.lastIndexOf(".")); +// // 文件类型判断 +// if (StringUtils.isBlank(fileType) || !fileType.equals(".jrxml")) { +// return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件只能是 jrxml 格式"); +// } +// String newName = UUID.randomUUID() + fileType;//生成新文件名 +// String savePath = filePath + "/pdf/template"; +// +// File file1 = new File(savePath); +// if (!file1.exists()) {// 判断目录是否存在 +// file1.mkdirs();// 创建多层目录 +// } +// file1 = new File(savePath + "/" + newName); +// try { +// file.transferTo(file1); +// Map rMap = new HashMap<>(); +// rMap.put("msg", "上传成功"); +// rMap.put("path", savePath + "/" + newName); +// return ResultVOUtils.success(rMap); +// } catch (IOException e) { +// e.printStackTrace(); +// } +// return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传失败"); +// } +// +// /** +// * 注册页面上传文件 +// */ +// @PostMapping("/udiwms/upload/register/file") +// public BaseResponse uploadRegisterFile(@RequestParam("file") MultipartFile file, +// @RequestParam("type") String type) throws UnsupportedEncodingException { +// if (file.isEmpty()) { +// return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件不能为空"); +// } +// if (StringUtils.isBlank(type)) { +// return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件类型不能为空"); +// } +// +// // 保存文件 --------------------- +// String fileName = file.getOriginalFilename(); +// String fileType = fileName.substring(fileName.lastIndexOf(".")); +// // 文件类型判断 +// if (StringUtils.isBlank(fileType) || (!fileType.equals(".jpg") && !fileType.equals(".png") && !fileType.equals(".doc") && !fileType.equals(".pdf"))) { +// return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件只能是 jpg,png,doc,pdf 格式"); +// } +// String newName = UUID.randomUUID() + fileType;//生成新文件名 +// String savePath = filePath + "/register/file/" + type; +// String savePath1 = fileLpath + "?type=" + type; +// String fileFullName = savePath + "/" + newName; +// +// File file1 = new File(savePath); +// if (!file1.exists()) {// 判断目录是否存在 +// file1.mkdirs();// 创建多层目录 +// } +// file1 = new File(savePath + "/" + newName); +// try { +// file.transferTo(file1); +//// MinioUtil.uploadFile(fileFullName, file); +// Map rMap = new HashMap<>(); +// rMap.put("msg", "上传成功"); +// rMap.put("name", fileUrl + savePath1 + "&name=" + newName); +// rMap.put("type", type); +// return ResultVOUtils.success(rMap); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传失败"); +// } } diff --git a/src/main/resources/mybatis/mapper/inv/DeviceInspectTaskDetailMapper.xml b/src/main/resources/mybatis/mapper/inv/DeviceInspectTaskDetailMapper.xml new file mode 100644 index 00000000..6707f009 --- /dev/null +++ b/src/main/resources/mybatis/mapper/inv/DeviceInspectTaskDetailMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + id, projectCode, projectContent, `status`, `result`, inspectImage, inspectUser, updateTime, + taskOrderIdFk + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/inv/DeviceInspectTaskMapper.xml b/src/main/resources/mybatis/mapper/inv/DeviceInspectTaskMapper.xml new file mode 100644 index 00000000..0d40e506 --- /dev/null +++ b/src/main/resources/mybatis/mapper/inv/DeviceInspectTaskMapper.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + id, orderId, planOrderIdFk, deptCode, invCode, code, `status`, inspectUser, remindTime, + remark, strartTime, endTime, createTime, updateTime + + + + + + + + diff --git a/src/main/resources/mybatis/mapper/inv/DeviceProjectSetMapper.xml b/src/main/resources/mybatis/mapper/inv/DeviceProjectSetMapper.xml new file mode 100644 index 00000000..6a38c6a8 --- /dev/null +++ b/src/main/resources/mybatis/mapper/inv/DeviceProjectSetMapper.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + id, code, content, `type`, remak, udpateTime, updateUser, `createUser`, createTime + + + + + + diff --git a/src/main/resources/schemas/schema_v2.2.sql b/src/main/resources/schemas/schema_v2.2.sql index 7b34b320..593d55b9 100644 --- a/src/main/resources/schemas/schema_v2.2.sql +++ b/src/main/resources/schemas/schema_v2.2.sql @@ -1,4 +1,3 @@ - CREATE TABLE IF NOT EXISTS `sync_edit_log` ( `id` int NOT NULL AUTO_INCREMENT, @@ -32,3 +31,104 @@ CREATE TABLE IF NOT EXISTS `sync_edit_type` ROW_FORMAT = Dynamic; SET FOREIGN_KEY_CHECKS = 1; + +# 字段新增 (表名,字段名,字段类型,修改方式(1:新增,2:修改,3:删除) + +CREATE TABLE IF NOT EXISTS `device_inspect_task` +( + `id` int NOT NULL AUTO_INCREMENT, + `orderId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '任务单号', + `planOrderIdFk` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检计划单号(外键)', + `deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '部门', + `invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库', + `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '资产编码', + `status` int NULL DEFAULT NULL COMMENT '状态', + `type` int NULL DEFAULT NULL COMMENT '类型', + `inspectUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检人', + `remindTime` datetime(0) NULL DEFAULT NULL COMMENT '提醒时间', + `remark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检备注', + `strartTime` datetime(0) NULL DEFAULT NULL COMMENT '任务开始时间', + `endTime` datetime(0) NULL DEFAULT NULL COMMENT '任务结束时间', + `createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `expectedTime` datetime(0) NULL DEFAULT NULL COMMENT '预期结束时间', + `repairType` int NULL DEFAULT NULL COMMENT '报修类型', + `level` int NULL DEFAULT NULL COMMENT '紧急程度', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_0900_ai_ci + ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for device_inspect_task_detail +-- ---------------------------- +CREATE TABLE IF NOT EXISTS `device_inspect_task_detail` +( + `id` int NOT NULL AUTO_INCREMENT, + `projectCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检项目编码', + `projectContent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检内容', + `status` int NULL DEFAULT NULL COMMENT '状态(1:未开始;2:已检查;3:异常;4:不巡检', + `result` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检结果备注', + `inspectImage` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检图片', + `inspectUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检人', + `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `taskOrderIdFk` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检任务ID外键', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_0900_ai_ci + ROW_FORMAT = Dynamic; + + +CREATE TABLE IF NOT EXISTS `dept_device_detail` +( + `id` int(0) NOT NULL AUTO_INCREMENT, + `deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '科室编码', + `invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库编码', + `originCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '原始码', + `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '资产编码', + `relId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '耗材字典编码', + `deviceName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '设备名称', + `ggxh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '规格型号', + `batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号', + `serialNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '序列号', + `productionDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产日期', + `expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '失效日期', + `manufactory` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产厂家', + `measname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '计量单位', + `zczbhhzbapzbh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '注册/备案凭证号', + `supId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商ID', + `supName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商名称', + `status` tinyint(0) NULL DEFAULT NULL COMMENT '状态(1:正常;2:报修;3:养护中;4:已养护;5:已报废)', + `addType` tinyint(0) NULL DEFAULT NULL COMMENT '添加方式(1:领用添加;2:手动添加)', + `createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '添加人', + `manager` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '负责人', + `maTime` datetime(0) NULL DEFAULT NULL COMMENT '最后养护时间', + `createTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', + `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB + AUTO_INCREMENT = 33 + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_0900_ai_ci COMMENT = '科室设备明细表' + ROW_FORMAT = Dynamic; + +CREATE TABLE IF NOT EXISTS `device_project_set` +( + `id` int(0) NOT NULL AUTO_INCREMENT, + `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '项目编号', + `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '项目内容', + `type` int(0) NULL DEFAULT NULL COMMENT '项目类型:1:巡检;2:养护', + `remak` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注', + `udpateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `updateUser` varchar(0) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新人', + `createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人', + `createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB + AUTO_INCREMENT = 3 + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_0900_ai_ci + ROW_FORMAT = Dynamic; \ No newline at end of file