|
|
@@ -2,6 +2,7 @@ package com.dk.mdm.service.mst;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.dk.common.infrastructure.annotaiton.Pagination;
|
|
|
+import com.dk.common.infrastructure.constant.Constant;
|
|
|
import com.dk.common.model.pojo.PageList;
|
|
|
import com.dk.common.response.ResponseCodeEnum;
|
|
|
import com.dk.common.response.ResponseResultUtil;
|
|
|
@@ -14,12 +15,15 @@ import com.dk.common.mapper.BaseMapper;
|
|
|
import com.dk.mdm.model.query.mst.StaffQuery;
|
|
|
import com.dk.mdm.model.response.mst.StaffResponse;
|
|
|
import com.dk.mdm.model.vo.mst.StaffVO;
|
|
|
+import com.dk.mdm.service.common.CommonService;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.Random;
|
|
|
import java.util.UUID;
|
|
|
|
|
|
/**
|
|
|
@@ -57,6 +61,9 @@ public class StaffService extends BaseService<Staff> {
|
|
|
@Autowired
|
|
|
private StaffPurviewService staffPurviewService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CommonService commonService;
|
|
|
+
|
|
|
/**
|
|
|
* @desc : 条件查询
|
|
|
* @author : 姜永辉
|
|
|
@@ -79,6 +86,10 @@ public class StaffService extends BaseService<Staff> {
|
|
|
public ResponseResultVO<?> insert(StaffVO staffVO) {
|
|
|
// 转化实体
|
|
|
Staff staff = staffConvert.convertToPo(staffVO);
|
|
|
+ // 获取编码和主键UuId
|
|
|
+ Map<String, Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.STAFF.getName(), true);
|
|
|
+ staff.setStaffId(codeMap.get("outId").toString());
|
|
|
+ staff.setStaffCode(codeMap.get("outNote").toString());
|
|
|
return super.insert(staff);
|
|
|
}
|
|
|
|