|
@@ -7,13 +7,10 @@ import com.dk.common.response.ResponseCodeEnum;
|
|
|
import com.dk.common.response.ResponseResultUtil;
|
|
import com.dk.common.response.ResponseResultUtil;
|
|
|
import com.dk.common.response.ResponseResultVO;
|
|
import com.dk.common.response.ResponseResultVO;
|
|
|
import com.dk.mdm.infrastructure.convert.mst.StaffConvert;
|
|
import com.dk.mdm.infrastructure.convert.mst.StaffConvert;
|
|
|
-import com.dk.mdm.model.pojo.mst.Role;
|
|
|
|
|
-import com.dk.mdm.model.pojo.mst.RoleFun;
|
|
|
|
|
-import com.dk.mdm.model.pojo.mst.Staff;
|
|
|
|
|
|
|
+import com.dk.mdm.model.pojo.mst.*;
|
|
|
import com.dk.mdm.mapper.mst.StaffMapper;
|
|
import com.dk.mdm.mapper.mst.StaffMapper;
|
|
|
import com.dk.common.service.BaseService;
|
|
import com.dk.common.service.BaseService;
|
|
|
import com.dk.common.mapper.BaseMapper;
|
|
import com.dk.common.mapper.BaseMapper;
|
|
|
-import com.dk.mdm.model.pojo.mst.StaffRight;
|
|
|
|
|
import com.dk.mdm.model.query.core.StaffQuery;
|
|
import com.dk.mdm.model.query.core.StaffQuery;
|
|
|
import com.dk.mdm.model.query.mst.RoleQuery;
|
|
import com.dk.mdm.model.query.mst.RoleQuery;
|
|
|
import com.dk.mdm.model.response.mst.StaffResponse;
|
|
import com.dk.mdm.model.response.mst.StaffResponse;
|
|
@@ -59,6 +56,9 @@ public class StaffService extends BaseService<Staff> {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private StaffRightService staffRightService;
|
|
private StaffRightService staffRightService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private StaffPurviewService staffPurviewService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @desc : 条件查询
|
|
* @desc : 条件查询
|
|
|
* @author : 姜永辉
|
|
* @author : 姜永辉
|
|
@@ -121,6 +121,25 @@ public class StaffService extends BaseService<Staff> {
|
|
|
return ResponseResultUtil.success();
|
|
return ResponseResultUtil.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 保存权限方法
|
|
|
|
|
+ * @author : 姜永辉
|
|
|
|
|
+ * @date : 2023/1/9 10:49
|
|
|
|
|
+ */
|
|
|
|
|
+ @Transactional(
|
|
|
|
|
+ rollbackFor = {Exception.class}
|
|
|
|
|
+ )
|
|
|
|
|
+ public ResponseResultVO<?> saveStaffPurview(StaffVO staffVO) {
|
|
|
|
|
+ // 转化实体
|
|
|
|
|
+ Staff staff = staffConvert.convertToPo(staffVO);
|
|
|
|
|
+ for (StaffPurview staffRight : staffVO.getStaffPurviewList()) {
|
|
|
|
|
+ staffRight.setStaffId(staff.getStaffId());
|
|
|
|
|
+ staffRight.setCpId(staff.getCpId());
|
|
|
|
|
+ }
|
|
|
|
|
+ staffPurviewService.saveStaffPurview(staffVO.getStaffPurviewList());
|
|
|
|
|
+ return ResponseResultUtil.success();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @desc : 员工离职
|
|
* @desc : 员工离职
|