diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtStaffInfoDaoController.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtStaffInfoDaoController.java
index 00f223fb2..e86c95c0c 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtStaffInfoDaoController.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtStaffInfoDaoController.java
@@ -1,5 +1,7 @@
package com.ruoyi.system.fantang.controller;
+import cn.hutool.core.date.DateTime;
+import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.annotation.Log;
@@ -94,11 +96,21 @@ public class FtStaffInfoDaoController extends BaseController {
* 获取员工管理详细信息
*/
@PreAuthorize("@ss.hasPermi('fantang:staffInfo:query')")
+ @GetMapping(value = "/nursing/{staffId}")
+ public AjaxResult getNursingInfo(@PathVariable("staffId") Long staffId) {
+ return AjaxResult.success(iFtStaffInfoDaoService.getById(staffId));
+ }
+
+ /**
+ * 获取护工管理详细信息
+ */
+ @PreAuthorize("@ss.hasPermi('fantang:staffInfo:query')")
@GetMapping(value = "/{staffId}")
public AjaxResult getInfo(@PathVariable("staffId") Long staffId) {
return AjaxResult.success(iFtStaffInfoDaoService.getById(staffId));
}
+
/**
* 新增员工管理
*/
@@ -127,7 +139,7 @@ public class FtStaffInfoDaoController extends BaseController {
}
ftStaffInfoDao.setCreateAt(new Date());
- ftStaffInfoDao.setDepartId(Long.parseLong(ftStaffInfoDao.getDeptList()));
+ ftStaffInfoDao.setDeptList(ftStaffInfoDao.getDeptList());
iFtStaffInfoDaoService.save(ftStaffInfoDao);
@@ -144,6 +156,26 @@ public class FtStaffInfoDaoController extends BaseController {
return toAjax(iFtStaffInfoDaoService.updateById(ftStaffInfoDao) ? 1 : 0);
}
+
+ /**
+ * 修改护工管理
+ */
+ @PreAuthorize("@ss.hasPermi('fantang:staffInfo:edit')")
+ @Log(title = "护工管理", businessType = BusinessType.UPDATE)
+ @PutMapping("/nursing")
+ public AjaxResult nursingEdit(@RequestBody JSONObject param) {
+ FtStaffInfoDao dao = new FtStaffInfoDao();
+ dao.setStaffId(param.getLong("staffId"));
+ dao.setCorpName(param.getString("corpName"));
+ dao.setCreateAt(new DateTime());
+ dao.setSex(param.getInteger("sex"));
+ dao.setDeptList(param.getString("deptList"));
+ dao.setStaffType(param.getLong("staffType"));
+ dao.setName(param.getString("name"));
+ return toAjax(iFtStaffInfoDaoService.updateById(dao) ? 1 : 0);
+ }
+
+
/**
* 删除员工管理
*/
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/domain/FtStaffInfoDao.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/domain/FtStaffInfoDao.java
index 8df8460d4..99cb7c665 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/domain/FtStaffInfoDao.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/domain/FtStaffInfoDao.java
@@ -1,7 +1,9 @@
package com.ruoyi.system.fantang.domain;
+import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
@@ -9,8 +11,6 @@ import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
-
-import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@@ -26,7 +26,7 @@ import java.util.Date;
@NoArgsConstructor
@Accessors(chain = true)
@TableName("ft_staff_info")
-public class FtStaffInfoDao implements Serializable {
+public class FtStaffInfoDao {
private static final long serialVersionUID = 1L;
diff --git a/ruoyi-system/src/main/resources/mapper/fantang/FtStaffInfoDaoMapper.xml b/ruoyi-system/src/main/resources/mapper/fantang/FtStaffInfoDaoMapper.xml
index f07cae4f8..5bae44478 100644
--- a/ruoyi-system/src/main/resources/mapper/fantang/FtStaffInfoDaoMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/fantang/FtStaffInfoDaoMapper.xml
@@ -23,6 +23,4 @@
-
-
\ No newline at end of file
diff --git a/ruoyi-ui/src/api/fantang/staffInfo.js b/ruoyi-ui/src/api/fantang/staffInfo.js
index d67bccddc..3fb5e4839 100644
--- a/ruoyi-ui/src/api/fantang/staffInfo.js
+++ b/ruoyi-ui/src/api/fantang/staffInfo.js
@@ -26,6 +26,14 @@ export function getStaffInfo(staffId) {
})
}
+export function getNursingInfo(nursingId) {
+ return request({
+ url: '/fantang/staffInfo/nursing/' + nursingId,
+ method: 'get'
+ })
+}
+
+
// 新增员工管理
export function addStaffInfo(data) {
return request({
@@ -60,3 +68,11 @@ export function exportStaffInfo(query) {
params: query
})
}
+
+export function updateNursingInfo(data) {
+ return request({
+ url: '/fantang/staffInfo/nursing',
+ method: 'put',
+ data: data
+ })
+}
diff --git a/ruoyi-ui/src/views/fantang/careStaffInfo/index.vue b/ruoyi-ui/src/views/fantang/careStaffInfo/index.vue
index 0e12fb5ce..5bf3ee5ac 100644
--- a/ruoyi-ui/src/views/fantang/careStaffInfo/index.vue
+++ b/ruoyi-ui/src/views/fantang/careStaffInfo/index.vue
@@ -10,11 +10,6 @@
@keyup.enter.native="handleQuery"
/>
-
-
-
-
-
-
-
+
+
@@ -146,11 +141,6 @@
>
-
-
-
-
-
@@ -158,7 +148,7 @@
-
+
{
+ const staffId = row.staffId || this.ids;
+ getNursingInfo(staffId).then(response => {
this.form = response.data;
+ // this.form.deptList = response.data.deptList.split(',');
+ this.form.deptList =[2,3];
this.open = true;
- this.title = "修改员工管理";
+ this.title = "修改护工管理";
+ console.log("form-->", this.form);
});
},
/** 提交按钮 */
submitForm() {
+ this.form.deptList = this.form.deptList.toString();
+ console.log("form-->convert-->", this.form);
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.staffId != null) {
- updateStaffInfo(this.form).then(response => {
+ updateNursingInfo(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();