Browse Source

添加流程记录功能

qinyan 3 tháng trước cách đây
mục cha
commit
dd65e2e568
28 tập tin đã thay đổi với 1848 bổ sung118 xóa
  1. 27 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/care/CareApplicationsController.java
  2. 2 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/care/CareNurseClocksController.java
  3. 106 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/care/CareRecordsController.java
  4. 104 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/care/CareScoresController.java
  5. 10 0
      ruoyi-system/src/main/java/com/ruoyi/care/domain/CareApplications.java
  6. 144 0
      ruoyi-system/src/main/java/com/ruoyi/care/domain/CareRecords.java
  7. 111 0
      ruoyi-system/src/main/java/com/ruoyi/care/domain/CareScores.java
  8. 61 0
      ruoyi-system/src/main/java/com/ruoyi/care/mapper/CareRecordsMapper.java
  9. 61 0
      ruoyi-system/src/main/java/com/ruoyi/care/mapper/CareScoresMapper.java
  10. 5 1
      ruoyi-system/src/main/java/com/ruoyi/care/service/ICareApplicationsService.java
  11. 1 1
      ruoyi-system/src/main/java/com/ruoyi/care/service/ICareNurseClocksService.java
  12. 61 0
      ruoyi-system/src/main/java/com/ruoyi/care/service/ICareRecordsService.java
  13. 61 0
      ruoyi-system/src/main/java/com/ruoyi/care/service/ICareScoresService.java
  14. 109 1
      ruoyi-system/src/main/java/com/ruoyi/care/service/impl/CareApplicationsServiceImpl.java
  15. 21 2
      ruoyi-system/src/main/java/com/ruoyi/care/service/impl/CareNurseClocksServiceImpl.java
  16. 97 0
      ruoyi-system/src/main/java/com/ruoyi/care/service/impl/CareRecordsServiceImpl.java
  17. 96 0
      ruoyi-system/src/main/java/com/ruoyi/care/service/impl/CareScoresServiceImpl.java
  18. 13 9
      ruoyi-system/src/main/resources/mapper/care/CareNurseClocksMapper.xml
  19. 129 0
      ruoyi-system/src/main/resources/mapper/care/CareRecordsMapper.xml
  20. 95 0
      ruoyi-system/src/main/resources/mapper/care/CareScoresMapper.xml
  21. 18 0
      ruoyi-vue/src/api/care/applications.js
  22. 44 0
      ruoyi-vue/src/api/care/careRecords.js
  23. 96 4
      ruoyi-vue/src/views/care/applications/index.vue
  24. 7 1
      ruoyi-vue/src/views/care/applications/index_assign_nurse.vue
  25. 4 4
      ruoyi-vue/src/views/care/applications/index_wait_check.vue
  26. 269 0
      ruoyi-vue/src/views/care/careRecords/index.vue
  27. 89 88
      ruoyi-vue/src/views/care/clocks/index.vue
  28. 7 5
      ruoyi-vue/src/views/care/clocks/index_task.vue

+ 27 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/care/CareApplicationsController.java

@@ -126,6 +126,31 @@ public class CareApplicationsController extends BaseController
         return toAjax(careApplicationsService.deleteCareApplicationsByApplyIds(applyIds));
     }
 
+    /**
+     * 送审护理申请
+     */
+    @PreAuthorize("@ss.hasPermi('care:applications:edit')")
+    @Log(title = "护理送审", businessType = BusinessType.UPDATE)
+    @PostMapping("/start")
+    public AjaxResult start(@RequestBody CareApplications careApplications)
+    {
+        Long userId=getUserId();
+        return toAjax(careApplicationsService.start(careApplications,userId));
+    }
+
+    /**
+     * 审核护理申请
+     */
+    @PreAuthorize("@ss.hasPermi('care:applications:check')")
+    @Log(title = "护理审核", businessType = BusinessType.UPDATE)
+    @PostMapping("/check")
+    public AjaxResult check(@RequestBody CareApplications careApplications)
+    {
+        Long userId=getUserId();
+        return toAjax(careApplicationsService.check(careApplications,userId));
+    }
+
+
     /**
      * 修改护理申请
      */
@@ -133,6 +158,7 @@ public class CareApplicationsController extends BaseController
     @PostMapping("/assign")
     public AjaxResult assign(@RequestBody CareApplications careApplications)
     {
-        return toAjax(careApplicationsService.assign(careApplications));
+        Long userId=getUserId();
+        return toAjax(careApplicationsService.assign(careApplications,userId));
     }
 }

+ 2 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/care/CareNurseClocksController.java

@@ -84,7 +84,8 @@ public class CareNurseClocksController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody CareNurseClocks careNurseClocks)
     {
-        return toAjax(careNurseClocksService.insertCareNurseClocks(careNurseClocks));
+        Long userId=getUserId();
+        return toAjax(careNurseClocksService.insertCareNurseClocks(careNurseClocks,userId));
     }
 
     /**

+ 106 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/care/CareRecordsController.java

@@ -0,0 +1,106 @@
+package com.ruoyi.web.controller.care;
+
+import java.util.List;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+
+import com.ruoyi.care.domain.CareRecords;
+import com.ruoyi.care.service.ICareRecordsService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 流程记录Controller
+ * 
+ * @author qy
+ * @date 2025-01-07
+ */
+@RestController
+@RequestMapping("/care/careRecords")
+public class CareRecordsController extends BaseController
+{
+    @Autowired
+    private ICareRecordsService careRecordsService;
+
+    /**
+     * 查询流程记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('care:careRecords:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(CareRecords careRecords)
+    {
+        startPage();
+        List<CareRecords> list = careRecordsService.selectCareRecordsList(careRecords);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出流程记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('care:careRecords:export')")
+    @Log(title = "流程记录", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, CareRecords careRecords)
+    {
+        List<CareRecords> list = careRecordsService.selectCareRecordsList(careRecords);
+        ExcelUtil<CareRecords> util = new ExcelUtil<CareRecords>(CareRecords.class);
+        util.exportExcel(response, list, "流程记录数据");
+    }
+
+    /**
+     * 获取流程记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('care:careRecords:query')")
+    @GetMapping(value = "/{recordId}")
+    public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
+    {
+        return success(careRecordsService.selectCareRecordsByRecordId(recordId));
+    }
+
+    /**
+     * 新增流程记录
+     */
+    @PreAuthorize("@ss.hasPermi('care:careRecords:add')")
+    @Log(title = "流程记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CareRecords careRecords)
+    {
+        return toAjax(careRecordsService.insertCareRecords(careRecords));
+    }
+
+    /**
+     * 修改流程记录
+     */
+    @PreAuthorize("@ss.hasPermi('care:careRecords:edit')")
+    @Log(title = "流程记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CareRecords careRecords)
+    {
+        return toAjax(careRecordsService.updateCareRecords(careRecords));
+    }
+
+    /**
+     * 删除流程记录
+     */
+    @PreAuthorize("@ss.hasPermi('care:careRecords:remove')")
+    @Log(title = "流程记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{recordIds}")
+    public AjaxResult remove(@PathVariable Long[] recordIds)
+    {
+        return toAjax(careRecordsService.deleteCareRecordsByRecordIds(recordIds));
+    }
+}

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/care/CareScoresController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.web.controller.care;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.care.domain.CareScores;
+import com.ruoyi.care.service.ICareScoresService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 业务评分Controller
+ * 
+ * @author qy
+ * @date 2024-11-26
+ */
+@RestController
+@RequestMapping("/care/scores")
+public class CareScoresController extends BaseController
+{
+    @Autowired
+    private ICareScoresService careScoresService;
+
+    /**
+     * 查询业务评分列表
+     */
+    @PreAuthorize("@ss.hasPermi('care:scores:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(CareScores careScores)
+    {
+        startPage();
+        List<CareScores> list = careScoresService.selectCareScoresList(careScores);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出业务评分列表
+     */
+    @PreAuthorize("@ss.hasPermi('care:scores:export')")
+    @Log(title = "业务评分", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, CareScores careScores)
+    {
+        List<CareScores> list = careScoresService.selectCareScoresList(careScores);
+        ExcelUtil<CareScores> util = new ExcelUtil<CareScores>(CareScores.class);
+        util.exportExcel(response, list, "业务评分数据");
+    }
+
+    /**
+     * 获取业务评分详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('care:scores:query')")
+    @GetMapping(value = "/{scoreId}")
+    public AjaxResult getInfo(@PathVariable("scoreId") Long scoreId)
+    {
+        return success(careScoresService.selectCareScoresByScoreId(scoreId));
+    }
+
+    /**
+     * 新增业务评分
+     */
+    @PreAuthorize("@ss.hasPermi('care:scores:add')")
+    @Log(title = "业务评分", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CareScores careScores)
+    {
+        return toAjax(careScoresService.insertCareScores(careScores));
+    }
+
+    /**
+     * 修改业务评分
+     */
+    @PreAuthorize("@ss.hasPermi('care:scores:edit')")
+    @Log(title = "业务评分", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CareScores careScores)
+    {
+        return toAjax(careScoresService.updateCareScores(careScores));
+    }
+
+    /**
+     * 删除业务评分
+     */
+    @PreAuthorize("@ss.hasPermi('care:scores:remove')")
+    @Log(title = "业务评分", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{scoreIds}")
+    public AjaxResult remove(@PathVariable Long[] scoreIds)
+    {
+        return toAjax(careScoresService.deleteCareScoresByScoreIds(scoreIds));
+    }
+}

+ 10 - 0
ruoyi-system/src/main/java/com/ruoyi/care/domain/CareApplications.java

@@ -80,6 +80,16 @@ public class CareApplications extends BaseEntity
     private Long companyId;
     private Long nurseId;
     private String assignRemark;
+    private String assignNurseRemark;
+
+    public String getAssignNurseRemark() {
+        return assignNurseRemark;
+    }
+
+    public void setAssignNurseRemark(String assignNurseRemark) {
+        this.assignNurseRemark = assignNurseRemark;
+    }
+
     /** 护理人姓名 */
     private String nurseName;
 

+ 144 - 0
ruoyi-system/src/main/java/com/ruoyi/care/domain/CareRecords.java

@@ -0,0 +1,144 @@
+package com.ruoyi.care.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 111对象 care_records
+ * 
+ * @author qy
+ * @date 2025-01-07
+ */
+public class CareRecords extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    private Long recordId;
+
+    /** 节点名称 */
+    @Excel(name = "节点名称")
+    private String nodeTitle;
+
+    /** 操作人 */
+    @Excel(name = "操作人")
+    private String operate;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    private String state;
+
+
+    private Long applyId;
+    private String operateName;
+    private Long parentId;
+    private String code;
+    private String isAgree;
+
+    public String getIsAgree() {
+        return isAgree;
+    }
+
+    public void setIsAgree(String isAgree) {
+        this.isAgree = isAgree;
+    }
+
+    public Long getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getOperateName() {
+        return operateName;
+    }
+
+    public void setOperateName(String operateName) {
+        this.operateName = operateName;
+    }
+
+    public Long getApplyId() {
+        return applyId;
+    }
+
+    public void setApplyId(Long applyId) {
+        this.applyId = applyId;
+    }
+
+    public void setRecordId(Long recordId)
+    {
+        this.recordId = recordId;
+    }
+
+    public Long getRecordId() 
+    {
+        return recordId;
+    }
+    public void setNodeTitle(String nodeTitle) 
+    {
+        this.nodeTitle = nodeTitle;
+    }
+
+    public String getNodeTitle() 
+    {
+        return nodeTitle;
+    }
+    public void setOperate(String operate) 
+    {
+        this.operate = operate;
+    }
+
+    public String getOperate() 
+    {
+        return operate;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setState(String state) 
+    {
+        this.state = state;
+    }
+
+    public String getState() 
+    {
+        return state;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("recordId", getRecordId())
+            .append("nodeTitle", getNodeTitle())
+            .append("operate", getOperate())
+            .append("remark", getRemark())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("state", getState())
+            .toString();
+    }
+}

+ 111 - 0
ruoyi-system/src/main/java/com/ruoyi/care/domain/CareScores.java

@@ -0,0 +1,111 @@
+package com.ruoyi.care.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 业务评分对象 care_scores
+ * 
+ * @author qy
+ * @date 2024-11-26
+ */
+public class CareScores extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 业务评分表的唯一标识符 */
+    private Long scoreId;
+
+    /** 护理业务数据id */
+    @Excel(name = "护理业务数据id")
+    private Long applyId;
+
+    /** 评分人id */
+    @Excel(name = "评分人id")
+    private String userId;
+
+    /** 评价 */
+    @Excel(name = "评价")
+    private String assess;
+
+    /** 得此评价原因 */
+    @Excel(name = "得此评价原因")
+    private String reason;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    public void setScoreId(Long scoreId) 
+    {
+        this.scoreId = scoreId;
+    }
+
+    public Long getScoreId() 
+    {
+        return scoreId;
+    }
+    public void setApplyId(Long applyId) 
+    {
+        this.applyId = applyId;
+    }
+
+    public Long getApplyId() 
+    {
+        return applyId;
+    }
+    public void setUserId(String userId) 
+    {
+        this.userId = userId;
+    }
+
+    public String getUserId() 
+    {
+        return userId;
+    }
+    public void setAssess(String assess) 
+    {
+        this.assess = assess;
+    }
+
+    public String getAssess() 
+    {
+        return assess;
+    }
+    public void setReason(String reason) 
+    {
+        this.reason = reason;
+    }
+
+    public String getReason() 
+    {
+        return reason;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("scoreId", getScoreId())
+            .append("applyId", getApplyId())
+            .append("userId", getUserId())
+            .append("assess", getAssess())
+            .append("reason", getReason())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/care/mapper/CareRecordsMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.care.mapper;
+
+import java.util.List;
+import com.ruoyi.care.domain.CareRecords;
+
+/**
+ * 111Mapper接口
+ * 
+ * @author qy
+ * @date 2025-01-07
+ */
+public interface CareRecordsMapper 
+{
+    /**
+     * 查询111
+     * 
+     * @param recordId 111主键
+     * @return 111
+     */
+    public CareRecords selectCareRecordsByRecordId(Long recordId);
+
+    /**
+     * 查询111列表
+     * 
+     * @param careRecords 111
+     * @return 111集合
+     */
+    public List<CareRecords> selectCareRecordsList(CareRecords careRecords);
+
+    /**
+     * 新增111
+     * 
+     * @param careRecords 111
+     * @return 结果
+     */
+    public int insertCareRecords(CareRecords careRecords);
+
+    /**
+     * 修改111
+     * 
+     * @param careRecords 111
+     * @return 结果
+     */
+    public int updateCareRecords(CareRecords careRecords);
+
+    /**
+     * 删除111
+     * 
+     * @param recordId 111主键
+     * @return 结果
+     */
+    public int deleteCareRecordsByRecordId(Long recordId);
+
+    /**
+     * 批量删除111
+     * 
+     * @param recordIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCareRecordsByRecordIds(Long[] recordIds);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/care/mapper/CareScoresMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.care.mapper;
+
+import java.util.List;
+import com.ruoyi.care.domain.CareScores;
+
+/**
+ * 业务评分Mapper接口
+ * 
+ * @author qy
+ * @date 2024-11-26
+ */
+public interface CareScoresMapper 
+{
+    /**
+     * 查询业务评分
+     * 
+     * @param scoreId 业务评分主键
+     * @return 业务评分
+     */
+    public CareScores selectCareScoresByScoreId(Long scoreId);
+
+    /**
+     * 查询业务评分列表
+     * 
+     * @param careScores 业务评分
+     * @return 业务评分集合
+     */
+    public List<CareScores> selectCareScoresList(CareScores careScores);
+
+    /**
+     * 新增业务评分
+     * 
+     * @param careScores 业务评分
+     * @return 结果
+     */
+    public int insertCareScores(CareScores careScores);
+
+    /**
+     * 修改业务评分
+     * 
+     * @param careScores 业务评分
+     * @return 结果
+     */
+    public int updateCareScores(CareScores careScores);
+
+    /**
+     * 删除业务评分
+     * 
+     * @param scoreId 业务评分主键
+     * @return 结果
+     */
+    public int deleteCareScoresByScoreId(Long scoreId);
+
+    /**
+     * 批量删除业务评分
+     * 
+     * @param scoreIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCareScoresByScoreIds(Long[] scoreIds);
+}

+ 5 - 1
ruoyi-system/src/main/java/com/ruoyi/care/service/ICareApplicationsService.java

@@ -62,5 +62,9 @@ public interface ICareApplicationsService
     /*
         指派
      */
-    public int assign(CareApplications careApplications);
+    public int assign(CareApplications careApplications, Long userId);
+
+    int start(CareApplications careApplications,Long userId);
+
+    int check(CareApplications careApplications, Long userId);
 }

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/care/service/ICareNurseClocksService.java

@@ -33,7 +33,7 @@ public interface ICareNurseClocksService
      * @param careNurseClocks 护理任务打卡
      * @return 结果
      */
-    public int insertCareNurseClocks(CareNurseClocks careNurseClocks);
+    public int insertCareNurseClocks(CareNurseClocks careNurseClocks,Long userId);
 
     /**
      * 修改护理任务打卡

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/care/service/ICareRecordsService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.care.service;
+
+import java.util.List;
+import com.ruoyi.care.domain.CareRecords;
+
+/**
+ * 111Service接口
+ * 
+ * @author qy
+ * @date 2025-01-07
+ */
+public interface ICareRecordsService 
+{
+    /**
+     * 查询111
+     * 
+     * @param recordId 111主键
+     * @return 111
+     */
+    public CareRecords selectCareRecordsByRecordId(Long recordId);
+
+    /**
+     * 查询111列表
+     * 
+     * @param careRecords 111
+     * @return 111集合
+     */
+    public List<CareRecords> selectCareRecordsList(CareRecords careRecords);
+
+    /**
+     * 新增111
+     * 
+     * @param careRecords 111
+     * @return 结果
+     */
+    public int insertCareRecords(CareRecords careRecords);
+
+    /**
+     * 修改111
+     * 
+     * @param careRecords 111
+     * @return 结果
+     */
+    public int updateCareRecords(CareRecords careRecords);
+
+    /**
+     * 批量删除111
+     * 
+     * @param recordIds 需要删除的111主键集合
+     * @return 结果
+     */
+    public int deleteCareRecordsByRecordIds(Long[] recordIds);
+
+    /**
+     * 删除111信息
+     * 
+     * @param recordId 111主键
+     * @return 结果
+     */
+    public int deleteCareRecordsByRecordId(Long recordId);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/care/service/ICareScoresService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.care.service;
+
+import java.util.List;
+import com.ruoyi.care.domain.CareScores;
+
+/**
+ * 业务评分Service接口
+ * 
+ * @author qy
+ * @date 2024-11-26
+ */
+public interface ICareScoresService 
+{
+    /**
+     * 查询业务评分
+     * 
+     * @param scoreId 业务评分主键
+     * @return 业务评分
+     */
+    public CareScores selectCareScoresByScoreId(Long scoreId);
+
+    /**
+     * 查询业务评分列表
+     * 
+     * @param careScores 业务评分
+     * @return 业务评分集合
+     */
+    public List<CareScores> selectCareScoresList(CareScores careScores);
+
+    /**
+     * 新增业务评分
+     * 
+     * @param careScores 业务评分
+     * @return 结果
+     */
+    public int insertCareScores(CareScores careScores);
+
+    /**
+     * 修改业务评分
+     * 
+     * @param careScores 业务评分
+     * @return 结果
+     */
+    public int updateCareScores(CareScores careScores);
+
+    /**
+     * 批量删除业务评分
+     * 
+     * @param scoreIds 需要删除的业务评分主键集合
+     * @return 结果
+     */
+    public int deleteCareScoresByScoreIds(Long[] scoreIds);
+
+    /**
+     * 删除业务评分信息
+     * 
+     * @param scoreId 业务评分主键
+     * @return 结果
+     */
+    public int deleteCareScoresByScoreId(Long scoreId);
+}

+ 109 - 1
ruoyi-system/src/main/java/com/ruoyi/care/service/impl/CareApplicationsServiceImpl.java

@@ -3,7 +3,9 @@ package com.ruoyi.care.service.impl;
 import java.util.List;
 
 import com.ruoyi.care.domain.CareAssignments;
+import com.ruoyi.care.domain.CareRecords;
 import com.ruoyi.care.mapper.CareAssignmentsMapper;
+import com.ruoyi.care.mapper.CareRecordsMapper;
 import com.ruoyi.common.enums.CareApplyStatus;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
@@ -28,6 +30,9 @@ public class CareApplicationsServiceImpl implements ICareApplicationsService
 
     @Autowired
     private CareAssignmentsMapper careAssignmentsMapper;
+
+    @Autowired
+    private CareRecordsMapper careRecordsMapper;
     /**
      * 查询护理申请
      * 
@@ -104,11 +109,44 @@ public class CareApplicationsServiceImpl implements ICareApplicationsService
 
     @Override
     @Transactional
-    public int assign(CareApplications careApplications) {
+    public int assign(CareApplications careApplications, Long userId) {
         int result=0;
         CareAssignments careAssignments=new CareAssignments();
         careApplicationsMapper.updateCareApplications(careApplications);
+        //获取当前节点记录
+        CareRecords curr=new CareRecords();
+        curr.setApplyId(careApplications.getApplyId());
+        curr.setState("0");
+        List<CareRecords> lst=careRecordsMapper.selectCareRecordsList(curr);
+        if(lst.size()>0){
+            curr=lst.get(0);
+            curr.setState("1");
+            curr.setIsAgree("1");
+            curr.setOperate(userId.toString());
+            curr.setUpdateTime(DateUtils.getNowDate());
+            curr.setUpdateBy(userId.toString());
+            if(careApplications.getStatus().equals("wait_assign_nurse")){//如果下一步为指派人员,当前则为指派公司
+                curr.setRemark(careApplications.getAssignRemark());
+            }else if(careApplications.getStatus().equals("assigned")){//如果下一步为已完成,当前则为指派人员
+                curr.setRemark(careApplications.getAssignNurseRemark());
+            }
+            careRecordsMapper.updateCareRecords(curr);
+        }
 
+        //保存下一个记录
+        CareRecords careRecords2=new CareRecords();
+        careRecords2.setState("0");//待完成
+        careRecords2.setParentId(curr.getRecordId());
+        careRecords2.setCreateTime(DateUtils.getNowDate());
+        careRecords2.setCreateBy(userId.toString());
+        careRecords2.setApplyId(careApplications.getApplyId());
+
+
+        if(careApplications.getStatus().equals("wait_assign_nurse")){//如果下一步为指派人员,当前则为指派公司
+            careRecords2.setNodeTitle("指派护理人员");
+        }else if(careApplications.getStatus().equals("assigned")){//如果下一步为已完成,当前则为指派人员
+            careRecords2.setNodeTitle("护理打卡");
+        }
         if(careApplications.getAssignId()==null){
             careAssignments.setApplyId(careApplications.getApplyId());
             careAssignments.setCompanyId(careApplications.getCompanyId());
@@ -127,6 +165,76 @@ public class CareApplicationsServiceImpl implements ICareApplicationsService
             result=careAssignmentsMapper.updateCareAssignments(careAssignments);
         }
 
+        careRecordsMapper.insertCareRecords(careRecords2);
         return result;
     }
+
+    @Override
+    @Transactional
+    public int start(CareApplications careApplications,Long userId) {
+        //保存流程记录
+        CareRecords careRecords=new CareRecords();
+        careRecords.setNodeTitle("资料提交");
+        careRecords.setOperate(userId.toString());
+        careRecords.setState("1");//已完成
+        careRecords.setIsAgree("1");//同意
+        careRecords.setCreateTime(DateUtils.getNowDate());
+        careRecords.setCreateBy(userId.toString());
+        careRecords.setRemark("提交成功");
+        careRecords.setApplyId(careApplications.getApplyId());
+        careRecordsMapper.insertCareRecords(careRecords);
+
+        //保存下一个节点信息
+        CareRecords careRecords2=new CareRecords();
+        careRecords2.setNodeTitle("资料审核");
+        careRecords2.setState("0");//待完成
+        careRecords2.setParentId(careRecords.getRecordId());
+        careRecords2.setCreateTime(DateUtils.getNowDate());
+        careRecords2.setCreateBy(userId.toString());
+        careRecords2.setApplyId(careApplications.getApplyId());
+        careRecordsMapper.insertCareRecords(careRecords2);
+
+        careApplications.setStatus("wait_check");
+        careApplications.setUpdateTime(DateUtils.getNowDate());
+        return careApplicationsMapper.updateCareApplications(careApplications);
+    }
+
+    @Override
+    public int check(CareApplications careApplications, Long userId) {
+        //获取当前节点记录
+        CareRecords curr=new CareRecords();
+        curr.setApplyId(careApplications.getApplyId());
+        curr.setState("0");
+        List<CareRecords> lst=careRecordsMapper.selectCareRecordsList(curr);
+        if(lst.size()>0){
+            curr=lst.get(0);
+            curr.setOperate(userId.toString());
+
+            if(careApplications.getStatus().equals("disagree")){
+                curr.setIsAgree("0");
+                curr.setRemark(careApplications.getAuditReason());
+                curr.setState("2");//不同意 退回
+            }else{
+                curr.setRemark("同意");
+                curr.setIsAgree("1");
+                curr.setState("1");
+
+                //保存下一个记录
+                CareRecords careRecords2=new CareRecords();
+                careRecords2.setNodeTitle("指派护理公司");
+                careRecords2.setState("0");//待完成
+                careRecords2.setParentId(curr.getRecordId());
+                careRecords2.setCreateTime(DateUtils.getNowDate());
+                careRecords2.setCreateBy(userId.toString());
+                careRecords2.setApplyId(careApplications.getApplyId());
+                careRecordsMapper.insertCareRecords(careRecords2);
+            }
+            curr.setUpdateTime(DateUtils.getNowDate());
+            curr.setUpdateBy(userId.toString());
+            careRecordsMapper.updateCareRecords(curr);
+        }
+
+        careApplications.setUpdateTime(DateUtils.getNowDate());
+        return careApplicationsMapper.updateCareApplications(careApplications);
+    }
 }

+ 21 - 2
ruoyi-system/src/main/java/com/ruoyi/care/service/impl/CareNurseClocksServiceImpl.java

@@ -5,8 +5,10 @@ import java.util.List;
 
 import com.ruoyi.care.domain.CareApplications;
 import com.ruoyi.care.domain.CareNurseRecords;
+import com.ruoyi.care.domain.CareRecords;
 import com.ruoyi.care.mapper.CareApplicationsMapper;
 import com.ruoyi.care.mapper.CareNurseRecordsMapper;
+import com.ruoyi.care.mapper.CareRecordsMapper;
 import com.ruoyi.common.enums.CareApplyStatus;
 import com.ruoyi.common.utils.DateUtils;
 import org.apache.commons.lang3.time.FastDateFormat;
@@ -32,6 +34,8 @@ public class CareNurseClocksServiceImpl implements ICareNurseClocksService
     private CareApplicationsMapper careApplicationsMapper;
     @Autowired
     private CareNurseRecordsMapper careNurseRecordsMapper;
+    @Autowired
+    private CareRecordsMapper careRecordsMapper;
     /**
      * 查询护理任务打卡
      * 
@@ -64,8 +68,19 @@ public class CareNurseClocksServiceImpl implements ICareNurseClocksService
      */
     @Override
     @Transactional
-    public int insertCareNurseClocks(CareNurseClocks careNurseClocks)
+    public int insertCareNurseClocks(CareNurseClocks careNurseClocks,Long userId)
     {
+        //获取当前节点记录
+        CareRecords curr=new CareRecords();
+        curr.setApplyId(Long.parseLong(careNurseClocks.getApplyId()));
+        curr.setState("0");
+        List<CareRecords> list=careRecordsMapper.selectCareRecordsList(curr);
+        if(list.size()>0){
+            curr=list.get(0);
+            curr.setOperate(userId.toString());
+            careRecordsMapper.updateCareRecords(curr);
+        }
+
         careNurseClocks.setCreateTime(DateUtils.getNowDate());
         // 判断当天任务是否一开始
         String  date=careNurseClocks.getNursingTime().substring(0,10);
@@ -74,10 +89,11 @@ public class CareNurseClocksServiceImpl implements ICareNurseClocksService
         careNurseRecords.setApplyId(Long.parseLong(careNurseClocks.getApplyId()));
         List<CareNurseRecords> lst=careNurseRecordsMapper.selectCareNurseRecordsList(careNurseRecords);
         if(lst.size()>0){
+            careRecordsMapper.updateCareRecords(curr);
            //已经开始了直接新增打卡记录
            return careNurseClocksMapper.insertCareNurseClocks(careNurseClocks);
         }else{
-          //修改申请状态为正在进行,并添加护理记录级打卡记录
+           //修改申请状态为正在进行,并添加护理记录级打卡记录
            CareApplications careApplications=careApplicationsMapper.selectCareApplicationsByApplyId(Long.parseLong(careNurseClocks.getApplyId()));
            careApplications.setDealStatus("in_progress");
            careApplicationsMapper.updateCareApplications(careApplications);
@@ -87,6 +103,9 @@ public class CareNurseClocksServiceImpl implements ICareNurseClocksService
            careNurseRecords.setApplyId(Long.parseLong(careNurseClocks.getApplyId()));
            careNurseRecordsMapper.insertCareNurseRecords(careNurseRecords);
 
+            curr.setRemark("已打卡"+(lst.size()+1)+"次");
+            careRecordsMapper.updateCareRecords(curr);
+
            return careNurseClocksMapper.insertCareNurseClocks(careNurseClocks);
         }
 

+ 97 - 0
ruoyi-system/src/main/java/com/ruoyi/care/service/impl/CareRecordsServiceImpl.java

@@ -0,0 +1,97 @@
+package com.ruoyi.care.service.impl;
+
+import java.util.List;
+
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.care.mapper.CareRecordsMapper;
+import com.ruoyi.care.domain.CareRecords;
+import com.ruoyi.care.service.ICareRecordsService;
+
+/**
+ * 111Service业务层处理
+ * 
+ * @author qy
+ * @date 2025-01-07
+ */
+@Service
+public class CareRecordsServiceImpl implements ICareRecordsService 
+{
+    @Autowired
+    private CareRecordsMapper careRecordsMapper;
+
+    /**
+     * 查询111
+     * 
+     * @param recordId 111主键
+     * @return 111
+     */
+    @Override
+    public CareRecords selectCareRecordsByRecordId(Long recordId)
+    {
+        return careRecordsMapper.selectCareRecordsByRecordId(recordId);
+    }
+
+    /**
+     * 查询111列表
+     * 
+     * @param careRecords 111
+     * @return 111
+     */
+    @Override
+    public List<CareRecords> selectCareRecordsList(CareRecords careRecords)
+    {
+        return careRecordsMapper.selectCareRecordsList(careRecords);
+    }
+
+    /**
+     * 新增111
+     * 
+     * @param careRecords 111
+     * @return 结果
+     */
+    @Override
+    public int insertCareRecords(CareRecords careRecords)
+    {
+        careRecords.setCreateTime(DateUtils.getNowDate());
+        return careRecordsMapper.insertCareRecords(careRecords);
+    }
+
+    /**
+     * 修改111
+     * 
+     * @param careRecords 111
+     * @return 结果
+     */
+    @Override
+    public int updateCareRecords(CareRecords careRecords)
+    {
+        careRecords.setUpdateTime(DateUtils.getNowDate());
+        return careRecordsMapper.updateCareRecords(careRecords);
+    }
+
+    /**
+     * 批量删除111
+     * 
+     * @param recordIds 需要删除的111主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCareRecordsByRecordIds(Long[] recordIds)
+    {
+        return careRecordsMapper.deleteCareRecordsByRecordIds(recordIds);
+    }
+
+    /**
+     * 删除111信息
+     * 
+     * @param recordId 111主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCareRecordsByRecordId(Long recordId)
+    {
+        return careRecordsMapper.deleteCareRecordsByRecordId(recordId);
+    }
+}

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/care/service/impl/CareScoresServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.care.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.care.mapper.CareScoresMapper;
+import com.ruoyi.care.domain.CareScores;
+import com.ruoyi.care.service.ICareScoresService;
+
+/**
+ * 业务评分Service业务层处理
+ * 
+ * @author qy
+ * @date 2024-11-26
+ */
+@Service
+public class CareScoresServiceImpl implements ICareScoresService 
+{
+    @Autowired
+    private CareScoresMapper careScoresMapper;
+
+    /**
+     * 查询业务评分
+     * 
+     * @param scoreId 业务评分主键
+     * @return 业务评分
+     */
+    @Override
+    public CareScores selectCareScoresByScoreId(Long scoreId)
+    {
+        return careScoresMapper.selectCareScoresByScoreId(scoreId);
+    }
+
+    /**
+     * 查询业务评分列表
+     * 
+     * @param careScores 业务评分
+     * @return 业务评分
+     */
+    @Override
+    public List<CareScores> selectCareScoresList(CareScores careScores)
+    {
+        return careScoresMapper.selectCareScoresList(careScores);
+    }
+
+    /**
+     * 新增业务评分
+     * 
+     * @param careScores 业务评分
+     * @return 结果
+     */
+    @Override
+    public int insertCareScores(CareScores careScores)
+    {
+        careScores.setCreateTime(DateUtils.getNowDate());
+        return careScoresMapper.insertCareScores(careScores);
+    }
+
+    /**
+     * 修改业务评分
+     * 
+     * @param careScores 业务评分
+     * @return 结果
+     */
+    @Override
+    public int updateCareScores(CareScores careScores)
+    {
+        careScores.setUpdateTime(DateUtils.getNowDate());
+        return careScoresMapper.updateCareScores(careScores);
+    }
+
+    /**
+     * 批量删除业务评分
+     * 
+     * @param scoreIds 需要删除的业务评分主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCareScoresByScoreIds(Long[] scoreIds)
+    {
+        return careScoresMapper.deleteCareScoresByScoreIds(scoreIds);
+    }
+
+    /**
+     * 删除业务评分信息
+     * 
+     * @param scoreId 业务评分主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCareScoresByScoreId(Long scoreId)
+    {
+        return careScoresMapper.deleteCareScoresByScoreId(scoreId);
+    }
+}

+ 13 - 9
ruoyi-system/src/main/resources/mapper/care/CareNurseClocksMapper.xml

@@ -1,9 +1,9 @@
 <?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">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.care.mapper.CareNurseClocksMapper">
-    
+
     <resultMap type="CareNurseClocks" id="CareNurseClocksResult">
         <result property="clockId"    column="clock_id"    />
         <result property="nursingRecordId"    column="nursing_record_id"    />
@@ -16,22 +16,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
         <result property="remark"    column="remark"    />
+        <result property="applyId" column="apply_id"/>
     </resultMap>
 
     <sql id="selectCareNurseClocksVo">
-        select clock_id, nursing_record_id, nursing_time, img_paths, img_num, del_flag, create_by, create_time, update_by, update_time, remark from care_nurse_clocks
+        select clock_id, nursing_record_id, nursing_time, img_paths, img_num, del_flag, create_by, create_time, update_by, update_time, remark,apply_id from care_nurse_clocks
     </sql>
 
     <select id="selectCareNurseClocksList" parameterType="CareNurseClocks" resultMap="CareNurseClocksResult">
         <include refid="selectCareNurseClocksVo"/>
-        <where>  
+        <where>
             <if test="nursingRecordId != null "> and nursing_record_id = #{nursingRecordId}</if>
             <if test="nursingTime != null  and nursingTime != ''"> and nursing_time like concat('%', #{nursingTime}, '%')</if>
             <if test="imgPaths != null  and imgPaths != ''"> and img_paths = #{imgPaths}</if>
+            <if test="applyId != null  and applyId != ''"> and apply_id = #{applyId}</if>
             <if test="imgNum != null "> and img_num = #{imgNum}</if>
         </where>
     </select>
-    
+
     <select id="selectCareNurseClocksByClockId" parameterType="Long" resultMap="CareNurseClocksResult">
         <include refid="selectCareNurseClocksVo"/>
         where clock_id = #{clockId}
@@ -50,7 +52,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
-         </trim>
+            <if test="applyId != null">apply_id,</if>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="nursingRecordId != null">#{nursingRecordId},</if>
             <if test="nursingTime != null and nursingTime != ''">#{nursingTime},</if>
@@ -62,7 +65,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
-         </trim>
+            <if test="applyId != null">#{applyId}</if>
+        </trim>
     </insert>
 
     <update id="updateCareNurseClocks" parameterType="CareNurseClocks">
@@ -87,7 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteCareNurseClocksByClockIds" parameterType="String">
-        delete from care_nurse_clocks where clock_id in 
+        delete from care_nurse_clocks where clock_id in
         <foreach item="clockId" collection="array" open="(" separator="," close=")">
             #{clockId}
         </foreach>

+ 129 - 0
ruoyi-system/src/main/resources/mapper/care/CareRecordsMapper.xml

@@ -0,0 +1,129 @@
+<?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="com.ruoyi.care.mapper.CareRecordsMapper">
+    
+    <resultMap type="CareRecords" id="CareRecordsResult">
+        <result property="recordId"    column="record_id"    />
+        <result property="nodeTitle"    column="node_title"    />
+        <result property="operate"    column="operate"    />
+        <result property="remark"    column="remark"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="state"    column="state"    />
+        <result property="applyId" column="apply_id"/>
+        <result property="operateName" column="operate_name"/>
+        <result property="parentId" column="parent_id"/>
+        <result property="code" column="code"/>
+        <result property="isAgree" column="is_agree"/>
+    </resultMap>
+
+    <sql id="selectCareRecordsVo">
+        SELECT
+            o.record_id,
+            o.node_title,
+            o.operate,
+            o.remark,
+            o.del_flag,
+            o.create_by,
+            o.create_time,
+            o.update_by,
+            o.update_time,
+            o.state,
+            o.apply_id,
+            o.code,
+            o.parent_id,
+            o.is_agree,
+            u.nick_name 'operate_name'
+        FROM
+            care_records o
+            left join sys_user u on u.user_id=o.operate
+    </sql>
+
+    <select id="selectCareRecordsList" parameterType="CareRecords" resultMap="CareRecordsResult">
+        <include refid="selectCareRecordsVo"/>
+        <where>  
+            <if test="nodeTitle != null  and nodeTitle != ''"> and o.node_title = #{nodeTitle}</if>
+            <if test="applyId != null  and applyId != ''"> and o.apply_id = #{applyId}</if>
+            <if test="operate != null  and operate != ''"> and o.operate = #{operate}</if>
+            <if test="state != null  and state != ''"> and o.state = #{state}</if>
+            <if test="isAgree != null and isAgree != ''">o.is_agree = #{isAgree},</if>
+        </where>
+    </select>
+    
+    <select id="selectCareRecordsByRecordId" parameterType="Long" resultMap="CareRecordsResult">
+        <include refid="selectCareRecordsVo"/>
+        where record_id = #{recordId}
+    </select>
+
+    <insert id="insertCareRecords" parameterType="CareRecords">
+        insert into care_records
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="recordId != null">record_id,</if>
+            <if test="nodeTitle != null">node_title,</if>
+            <if test="operate != null">operate,</if>
+            <if test="remark != null">remark,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="applyId != null">apply_id,</if>
+            <if test="state != null">state,</if>
+            <if test="parentId != null">parent_id,</if>
+            <if test="code != null">code,</if>
+            <if test="isAgree != null">is_agree,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="recordId != null">#{recordId},</if>
+            <if test="nodeTitle != null">#{nodeTitle},</if>
+            <if test="operate != null">#{operate},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="applyId != null">#{applyId},</if>
+            <if test="state != null">#{state},</if>
+            <if test="parentId != null">#{parentId},</if>
+            <if test="code != null">#{code},</if>
+            <if test="isAgree != null">#{isAgree},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCareRecords" parameterType="CareRecords">
+        update care_records
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="nodeTitle != null">node_title = #{nodeTitle},</if>
+            <if test="operate != null">operate = #{operate},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="applyId != null">apply_id = #{applyId},</if>
+            <if test="state != null">state = #{state},</if>
+            <if test="parentId != null">parent_id=#{parentId},</if>
+            <if test="code != null">code=#{code},</if>
+            <if test="isAgree != null">is_agree=#{isAgree},</if>
+        </trim>
+        where record_id = #{recordId}
+    </update>
+
+    <delete id="deleteCareRecordsByRecordId" parameterType="Long">
+        delete from care_records where record_id = #{recordId}
+    </delete>
+
+    <delete id="deleteCareRecordsByRecordIds" parameterType="String">
+        delete from care_records where record_id in 
+        <foreach item="recordId" collection="array" open="(" separator="," close=")">
+            #{recordId}
+        </foreach>
+    </delete>
+</mapper>

+ 95 - 0
ruoyi-system/src/main/resources/mapper/care/CareScoresMapper.xml

@@ -0,0 +1,95 @@
+<?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="com.ruoyi.care.mapper.CareScoresMapper">
+    
+    <resultMap type="CareScores" id="CareScoresResult">
+        <result property="scoreId"    column="score_id"    />
+        <result property="applyId"    column="apply_id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="assess"    column="assess"    />
+        <result property="reason"    column="reason"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectCareScoresVo">
+        select score_id, apply_id, user_id, assess, reason, del_flag, create_by, create_time, update_by, update_time, remark from care_scores
+    </sql>
+
+    <select id="selectCareScoresList" parameterType="CareScores" resultMap="CareScoresResult">
+        <include refid="selectCareScoresVo"/>
+        <where>  
+            <if test="applyId != null "> and apply_id = #{applyId}</if>
+            <if test="userId != null  and userId != ''"> and user_id = #{userId}</if>
+            <if test="assess != null  and assess != ''"> and assess = #{assess}</if>
+            <if test="reason != null  and reason != ''"> and reason = #{reason}</if>
+        </where>
+    </select>
+    
+    <select id="selectCareScoresByScoreId" parameterType="Long" resultMap="CareScoresResult">
+        <include refid="selectCareScoresVo"/>
+        where score_id = #{scoreId}
+    </select>
+
+    <insert id="insertCareScores" parameterType="CareScores" useGeneratedKeys="true" keyProperty="scoreId">
+        insert into care_scores
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="applyId != null">apply_id,</if>
+            <if test="userId != null and userId != ''">user_id,</if>
+            <if test="assess != null and assess != ''">assess,</if>
+            <if test="reason != null">reason,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="applyId != null">#{applyId},</if>
+            <if test="userId != null and userId != ''">#{userId},</if>
+            <if test="assess != null and assess != ''">#{assess},</if>
+            <if test="reason != null">#{reason},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCareScores" parameterType="CareScores">
+        update care_scores
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="applyId != null">apply_id = #{applyId},</if>
+            <if test="userId != null and userId != ''">user_id = #{userId},</if>
+            <if test="assess != null and assess != ''">assess = #{assess},</if>
+            <if test="reason != null">reason = #{reason},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where score_id = #{scoreId}
+    </update>
+
+    <delete id="deleteCareScoresByScoreId" parameterType="Long">
+        delete from care_scores where score_id = #{scoreId}
+    </delete>
+
+    <delete id="deleteCareScoresByScoreIds" parameterType="String">
+        delete from care_scores where score_id in 
+        <foreach item="scoreId" collection="array" open="(" separator="," close=")">
+            #{scoreId}
+        </foreach>
+    </delete>
+</mapper>

+ 18 - 0
ruoyi-vue/src/api/care/applications.js

@@ -49,4 +49,22 @@ export function assignApplications(data) {
     method: 'post',
     data: data
   })
+}
+
+// 送审护理申请
+export function startApplications(data) {
+  return request({
+    url: '/care/applications/start',
+    method: 'post',
+    data: data
+  })
+}
+
+//审核护理申请
+export function checkApplications(data) {
+  return request({
+    url: '/care/applications/check',
+    method: 'post',
+    data: data
+  })
 }

+ 44 - 0
ruoyi-vue/src/api/care/careRecords.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询111列表
+export function listCareRecords(query) {
+  return request({
+    url: '/care/careRecords/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询111详细
+export function getCareRecords(recordId) {
+  return request({
+    url: '/care/careRecords/' + recordId,
+    method: 'get'
+  })
+}
+
+// 新增111
+export function addCareRecords(data) {
+  return request({
+    url: '/care/careRecords',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改111
+export function updateCareRecords(data) {
+  return request({
+    url: '/care/careRecords',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除111
+export function delCareRecords(recordId) {
+  return request({
+    url: '/care/careRecords/' + recordId,
+    method: 'delete'
+  })
+}

+ 96 - 4
ruoyi-vue/src/views/care/applications/index.vue

@@ -150,7 +150,8 @@
             <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['care:applications:remove']">删除</el-button>
           </div>
           <div v-else>
-            <el-button link type="success" icon="View" @click="handleView(scope.row)" v-hasPermi="['care:applications:edit']">查看</el-button>
+            <el-button link type="success" icon="View" @click="handleView(scope.row)" v-hasPermi="['care:applications:edit']">查看详细</el-button>
+            <el-button link type="success" icon="View" @click="handleRecord(scope.row)" v-hasPermi="['care:applications:record']">申请进度</el-button>
           </div>
         </template>
       </el-table-column>
@@ -318,13 +319,89 @@
         </el-row>
       </el-form>
     </el-dialog>
+    <el-dialog :title="title" v-model="openRecords" width="700px" append-to-body>
+      <el-table v-loading="loading" :data="recordList">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="时间" align="center" width="155" prop="createTime" />
+        <el-table-column label="节点名称" align="center" prop="nodeTitle" />
+        <el-table-column label="操作人" align="center" prop="operateName" />
+        <el-table-column label="备注" align="center" prop="remark" />
+        <el-table-column label="是否同意" align="center" prop="isAgree">
+          <template #default="scope">
+            <div v-if="scope.row.isAgree == '1'">
+              <div class="cell el-tooltip" style="width: 78px;">
+                <div>
+                  <div data-v-00e5bcbc="">
+                      <span class="el-tag el-tag--success el-tag--default el-tag--light" index="5" data-v-00e5bcbc=""><span class="el-tag__content">同意</span>
+                      </span>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div v-if="scope.row.isAgree == '0'">
+              <div class="cell el-tooltip" style="width: 78px;">
+                <div>
+                  <div data-v-00e5bcbc="">
+                      <span class="el-tag el-tag--danger el-tag--default el-tag--light" index="5" data-v-00e5bcbc=""><span class="el-tag__content">不同意</span>
+                      </span>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="状态" align="center" prop="state">
+          <template #default="scope">
+            <div v-if="scope.row.state == '1'">
+                <div class="cell el-tooltip" style="width: 78px;">
+                  <div>
+                    <div data-v-00e5bcbc="">
+                      <span class="el-tag el-tag--success el-tag--default el-tag--light" index="5" data-v-00e5bcbc=""><span class="el-tag__content">已完成</span>
+                      </span>
+                    </div>
+                  </div>
+                </div>
+            </div>
+            <div v-if="scope.row.state == '2'">
+              <div class="cell el-tooltip" style="width: 78px;">
+                <div>
+                  <div data-v-00e5bcbc="">
+                      <span class="el-tag el-tag--warning el-tag--default el-tag--light" index="5" data-v-00e5bcbc=""><span class="el-tag__content">退回</span>
+                      </span>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div v-if="scope.row.state == '0'">
+              <div class="cell el-tooltip" style="width: 78px;">
+                <div>
+                  <div data-v-00e5bcbc="">
+                      <span class="el-tag el-tag--danger el-tag--default el-tag--light" index="5" data-v-00e5bcbc=""><span class="el-tag__content">未开始</span>
+                      </span>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <pagination
+          v-show="recordTotal>0"
+          :total="recordTotal"
+          v-model:page="queryParams.pageNumRecord"
+          v-model:limit="queryParams.pageSizeRecord"
+          @pagination="getList"
+      />
+    </el-dialog>
   </div>
 </template>
 
 <script setup name="Applications">
-import { listApplications, getApplications, delApplications, addApplications, updateApplications } from "@/api/care/applications";
+import { listApplications, getApplications, delApplications, addApplications, updateApplications,startApplications } from "@/api/care/applications";
 import { listAllHospital } from "@/api/care/hospital";
 import {listAllPersons} from "@/api/care/persons";
+import {listCareRecords} from "@/api/care/careRecords";
 
 const { proxy } = getCurrentInstance();
 const { sys_user_sex,care_apply_status,deal_status,pay_status } = proxy.useDict('sys_user_sex','care_apply_status','deal_status','pay_status');
@@ -342,11 +419,17 @@ const multiple = ref(true);
 const total = ref(0);
 const title = ref("");
 const openDetail=ref(false);
+
+const recordList=ref([]);
+const openRecords=ref(false);
+const recordTotal=ref(0);
 const data = reactive({
   form: {},
   queryParams: {
     pageNum: 1,
     pageSize: 10,
+    pageNumRecord: 1,
+    pageSizeRecord: 10,
     personId: null,
     personName: null,
     careNeeds: null,
@@ -468,11 +551,20 @@ function handleView(row) {
   });
 }
 
+function handleRecord(row) {
+  const _applyId = row.applyId || ids.value
+  listCareRecords({"applyId":_applyId}).then(response => {
+    openRecords.value = true;
+    recordList.value = response.rows;
+    recordTotal.value = response.total;
+    title.value = "查看记录";
+  });
+}
+
 // 送审
 function handleCheck(row) {
   proxy.$modal.confirm('是否确认送审"' + row.personName + '"的护理申请?').then(function() {
-    row.status='wait_check';
-    updateApplications(row).then(response => {
+    startApplications(row).then(response => {
       proxy.$modal.msgSuccess("送审成功");
       open.value = false;
       getList();

+ 7 - 1
ruoyi-vue/src/views/care/applications/index_assign_nurse.vue

@@ -188,6 +188,11 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注" prop="assignNurseRemark">
+              <el-input v-model="form.assignNurseRemark" type="textarea" placeholder="请输入备注" />
+            </el-form-item>
+          </el-col>
         </el-row>
 
       </el-form>
@@ -287,7 +292,8 @@ function reset() {
     createTime: null,
     updateBy: null,
     updateTime: null,
-    remark: null
+    remark: null,
+    assignNurseRemark: null
   };
   proxy.resetForm("applicationsRef");
 }

+ 4 - 4
ruoyi-vue/src/views/care/applications/index_wait_check.vue

@@ -340,7 +340,7 @@
 </template>
 
 <script setup name="WaitCheckApplications">
-import { listApplications, getApplications, updateApplications,assignApplications } from "@/api/care/applications";
+import { listApplications, getApplications, checkApplications,assignApplications } from "@/api/care/applications";
 import { listAllHospital } from "@/api/care/hospital";
 import {listAllPersons} from "@/api/care/persons";
 import {listAllCompany} from "@/api/care/nurses";
@@ -480,7 +480,7 @@ function handleUpdate(row) {
   getApplications(_applyId).then(response => {
     form.value = response.data;
     open.value = true;
-    title.value = "修改护理申请";
+    title.value = "审核护理申请";
   });
 }
 /** 指派操作 */
@@ -499,7 +499,7 @@ function submitForm(type) {
   proxy.$refs["applicationsRef"].validate(valid => {
     if (valid) {
       if(type==2){
-        if(form.value.auditReason==""){
+        if(form.value.auditReason==""||form.value.auditReason==null){
           proxy.$modal.msgWarning("审核理由不能为空");
           return;
         }else{
@@ -509,7 +509,7 @@ function submitForm(type) {
         form.value.status='wait_assign_company'
       }
 
-      updateApplications(form.value).then(response => {
+      checkApplications(form.value).then(response => {
         proxy.$modal.msgSuccess("审核成功");
         open.value = false;
         getList();

+ 269 - 0
ruoyi-vue/src/views/care/careRecords/index.vue

@@ -0,0 +1,269 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="节点名称" prop="nodeTitle">
+        <el-input
+          v-model="queryParams.nodeTitle"
+          placeholder="请输入节点名称"
+          clearable
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="操作人" prop="operate">
+        <el-input
+          v-model="queryParams.operate"
+          placeholder="请输入操作人"
+          clearable
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="状态" prop="state">
+        <el-input
+          v-model="queryParams.state"
+          placeholder="请输入状态"
+          clearable
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="Plus"
+          @click="handleAdd"
+          v-hasPermi="['care:careRecords:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="Edit"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['care:careRecords:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="Delete"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['care:careRecords:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="Download"
+          @click="handleExport"
+          v-hasPermi="['care:careRecords:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="careRecordsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="id" align="center" prop="recordId" />
+      <el-table-column label="节点名称" align="center" prop="nodeTitle" />
+      <el-table-column label="操作人" align="center" prop="operateName" />
+      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="状态" align="center" prop="state" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template #default="scope">
+          <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['care:careRecords:edit']">修改</el-button>
+          <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['care:careRecords:remove']">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改111对话框 -->
+    <el-dialog :title="title" v-model="open" width="500px" append-to-body>
+      <el-form ref="careRecordsRef" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="节点名称" prop="nodeTitle">
+          <el-input v-model="form.nodeTitle" placeholder="请输入节点名称" />
+        </el-form-item>
+        <el-form-item label="操作人" prop="operate">
+          <el-input v-model="form.operate" placeholder="请输入操作人" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+        <el-form-item label="删除标志" prop="delFlag">
+          <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
+        </el-form-item>
+        <el-form-item label="状态" prop="state">
+          <el-input v-model="form.state" placeholder="请输入状态" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitForm">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup name="CareRecords">
+import { listCareRecords, getCareRecords, delCareRecords, addCareRecords, updateCareRecords } from "@/api/care/careRecords";
+
+const { proxy } = getCurrentInstance();
+
+const careRecordsList = ref([]);
+const open = ref(false);
+const loading = ref(true);
+const showSearch = ref(true);
+const ids = ref([]);
+const single = ref(true);
+const multiple = ref(true);
+const total = ref(0);
+const title = ref("");
+
+const data = reactive({
+  form: {},
+  queryParams: {
+    pageNum: 1,
+    pageSize: 10,
+    nodeTitle: null,
+    operate: null,
+    state: null
+  },
+  rules: {
+  }
+});
+
+const { queryParams, form, rules } = toRefs(data);
+
+/** 查询111列表 */
+function getList() {
+  loading.value = true;
+  listCareRecords(queryParams.value).then(response => {
+    careRecordsList.value = response.rows;
+    total.value = response.total;
+    loading.value = false;
+  });
+}
+
+// 取消按钮
+function cancel() {
+  open.value = false;
+  reset();
+}
+
+// 表单重置
+function reset() {
+  form.value = {
+    recordId: null,
+    nodeTitle: null,
+    operate: null,
+    remark: null,
+    delFlag: null,
+    createBy: null,
+    createTime: null,
+    updateBy: null,
+    updateTime: null,
+    state: null,
+    operateName:null
+  };
+  proxy.resetForm("careRecordsRef");
+}
+
+/** 搜索按钮操作 */
+function handleQuery() {
+  queryParams.value.pageNum = 1;
+  getList();
+}
+
+/** 重置按钮操作 */
+function resetQuery() {
+  proxy.resetForm("queryRef");
+  handleQuery();
+}
+
+// 多选框选中数据
+function handleSelectionChange(selection) {
+  ids.value = selection.map(item => item.recordId);
+  single.value = selection.length != 1;
+  multiple.value = !selection.length;
+}
+
+/** 新增按钮操作 */
+function handleAdd() {
+  reset();
+  open.value = true;
+  title.value = "添加111";
+}
+
+/** 修改按钮操作 */
+function handleUpdate(row) {
+  reset();
+  const _recordId = row.recordId || ids.value
+  getCareRecords(_recordId).then(response => {
+    form.value = response.data;
+    open.value = true;
+    title.value = "修改111";
+  });
+}
+
+/** 提交按钮 */
+function submitForm() {
+  proxy.$refs["careRecordsRef"].validate(valid => {
+    if (valid) {
+      if (form.value.recordId != null) {
+        updateCareRecords(form.value).then(response => {
+          proxy.$modal.msgSuccess("修改成功");
+          open.value = false;
+          getList();
+        });
+      } else {
+        addCareRecords(form.value).then(response => {
+          proxy.$modal.msgSuccess("新增成功");
+          open.value = false;
+          getList();
+        });
+      }
+    }
+  });
+}
+
+/** 删除按钮操作 */
+function handleDelete(row) {
+  const _recordIds = row.recordId || ids.value;
+  proxy.$modal.confirm('是否确认删除111编号为"' + _recordIds + '"的数据项?').then(function() {
+    return delCareRecords(_recordIds);
+  }).then(() => {
+    getList();
+    proxy.$modal.msgSuccess("删除成功");
+  }).catch(() => {});
+}
+
+/** 导出按钮操作 */
+function handleExport() {
+  proxy.download('care/careRecords/export', {
+    ...queryParams.value
+  }, `careRecords_${new Date().getTime()}.xlsx`)
+}
+
+getList();
+</script>

+ 89 - 88
ruoyi-vue/src/views/care/clocks/index.vue

@@ -1,96 +1,99 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="护理时间" prop="nursingTime">
-        <el-date-picker clearable
-          v-model="queryParams.nursingTime"
-          type="date"
-          value-format="YYYY-MM-DD"
-          placeholder="请选择护理时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
-        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
-        <el-button
-            type="primary"
-            plain
-            icon="Plus"
-            @click="handleAdd"
-            v-hasPermi="['care:clocks:add']"
-        >新增</el-button>
-        <el-button
-            type="warning"
-            plain
-            icon="Download"
-            @click="handleExport"
-            v-hasPermi="['care:clocks:export']"
-        >导出</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-table v-loading="loading" :data="clocksList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="护理时间" align="center" prop="nursingTime" width="180">
-      </el-table-column>
-
-      <el-table-column label="图片数量" align="center" prop="imgNum" />
-      <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template #default="scope">
-          <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['care:clocks:edit']">修改</el-button>
-          <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['care:clocks:remove']">删除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-    
-    <pagination
-      v-show="total>0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改护理任务打卡对话框 -->
-    <el-dialog :title="title" v-model="open" width="500px" append-to-body>
-      <el-form ref="clocksRef" :model="form" :rules="rules" label-width="80px">
+  <div>
+    <div class="app-container1">
+      <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
         <el-form-item label="护理时间" prop="nursingTime">
           <el-date-picker clearable
-            v-model="form.nursingTime"
-            type="datetime"
-            value-format="YYYY-MM-DD HH:mm:ss"
+            v-model="queryParams.nursingTime"
+            type="date"
+            value-format="YYYY-MM-DD"
             placeholder="请选择护理时间">
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="图片路径" prop="imgPaths">
-          <el-upload
-              v-model:file-list="fileLists"
-              :action="uploadImgUrl"
-              :headers="uploadHeaders"
-              list-type="picture-card"
-              :on-remove="handleRemove"
-              :on-success="handleSuccess"
-          >
-            <el-icon><Plus /></el-icon>
-          </el-upload>
-        </el-form-item>
-
-        <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+        <el-form-item>
+          <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+          <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+          <el-button
+              type="primary"
+              plain
+              icon="Plus"
+              @click="handleAdd"
+              v-hasPermi="['care:clocks:add']"
+          >新增</el-button>
+          <el-button
+              type="warning"
+              plain
+              icon="Download"
+              @click="handleExport"
+              v-hasPermi="['care:clocks:export']"
+          >导出</el-button>
         </el-form-item>
       </el-form>
-      <template #footer>
-        <div class="dialog-footer">
-          <el-button type="primary" @click="submitForm">确 定</el-button>
-          <el-button @click="cancel">取 消</el-button>
-        </div>
-      </template>
-    </el-dialog>
+
+      <el-table v-loading="loading" :data="clocksList" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="护理时间" align="center" prop="nursingTime" width="180">
+        </el-table-column>
+
+        <el-table-column label="图片数量" align="center" prop="imgNum" />
+        <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/>
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+          <template #default="scope">
+            <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['care:clocks:edit']">修改</el-button>
+            <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['care:clocks:remove']">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <pagination
+        v-show="total>0"
+        :total="total"
+        v-model:page="queryParams.pageNum"
+        v-model:limit="queryParams.pageSize"
+        @pagination="getList"
+      />
+
+      <!-- 添加或修改护理任务打卡对话框 -->
+      <el-dialog :title="title" v-model="open" width="500px" append-to-body>
+        <el-form ref="clocksRef" :model="form" :rules="rules" label-width="80px">
+          <el-form-item label="护理时间" prop="nursingTime">
+            <el-date-picker clearable
+              v-model="form.nursingTime"
+              type="datetime"
+              value-format="YYYY-MM-DD HH:mm:ss"
+              placeholder="请选择护理时间">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="图片路径" prop="imgPaths">
+            <el-upload
+                v-model:file-list="fileLists"
+                :action="uploadImgUrl"
+                :headers="uploadHeaders"
+                list-type="picture-card"
+                :on-remove="handleRemove"
+                :on-success="handleSuccess"
+                :data="uploadImgData"
+            >
+              <el-icon><Plus /></el-icon>
+            </el-upload>
+          </el-form-item>
+
+          <el-form-item label="备注" prop="remark">
+            <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+          </el-form-item>
+        </el-form>
+        <template #footer>
+          <div class="dialog-footer">
+            <el-button type="primary" @click="submitForm">确 定</el-button>
+            <el-button @click="cancel">取 消</el-button>
+          </div>
+        </template>
+      </el-dialog>
+    </div>
   </div>
 </template>
 <style>
-.app-container{
+.app-container1{
   height: 500px;
 }
 </style>
@@ -113,16 +116,14 @@ const title = ref("");
 
 const fileLists =ref([]);
 
-const dialogImageUrl = ref('')
-const dialogVisible = ref(false)
 // 定义 props
 const props = defineProps({
   applyId: {
-    type: String,
+    type: Number,
     required: true
   }
 });
-
+console.info("=="+props.applyId);
 const data = reactive({
   form: {},
   queryParams: {
@@ -147,8 +148,9 @@ const data = reactive({
 });
 
 const { queryParams, form, rules } = toRefs(data);
+const uploadImgData={applyId:props.applyId,"nursingDate":form.value.nursingTime};
 
-const uploadImgUrl = ref(import.meta.env.VITE_APP_BASE_API + "/care/clocks/upload?applyId="+props.applyId+"&nursingDate="+form.value.nursingTime); // 上传的图片服务器地址
+const uploadImgUrl = ref(import.meta.env.VITE_APP_BASE_API + "/care/clocks/upload"); // 上传的图片服务器地址
 const uploadHeaders={Authorization: 'Bearer ' + getToken()};
 const fileSize=1;
 
@@ -239,7 +241,6 @@ function handleUpdate(row) {
 function submitForm() {
   form.value.imgNum=0;
   form.value.imgPaths=""
-  console.info(import.meta.env.VITE_APP_BASE_API+"---"+JSON.stringify(fileLists.value))
   fileLists.value.forEach(item => {
     console.info(item);
     form.value.imgNum++;

+ 7 - 5
ruoyi-vue/src/views/care/clocks/index_task.vue

@@ -151,7 +151,10 @@
   </el-dialog>
 
   <el-dialog v-model="openClock" width="80%">
-    <component :is="currentComponent" v-bind="componentProps"></component>
+    <div>
+      <component :is="currentComponent" v-bind="componentProps"></component>
+    </div>
+
   </el-dialog>
 </template>
 
@@ -252,13 +255,12 @@ function look(row) {
 
 function clock(row){
   const _applyId = row.applyId || ids.value
-  // 设置要加载的组件
+
   currentComponent.value = clockIndex;
 
-  // 设置传递给组件的属性
+  // 传递apply
   componentProps.value = {
-    applyId: _applyId,
-    // 其他需要传递的属性可以在这里添加
+    applyId: _applyId
   };
   openClock.value=true
 }