|
|
@@ -27,20 +27,26 @@ import com.xueyi.system.api.model.Source; |
|
|
|
import com.xueyi.system.api.organize.domain.dto.SysEnterpriseDto; |
|
|
|
import com.xueyi.system.api.staff.domain.dto.DmStaffDto; |
|
|
|
import com.xueyi.system.api.staff.domain.po.DmStaffPo; |
|
|
|
import com.xueyi.system.api.staff.domain.vo.DmStaffFeature; |
|
|
|
import com.xueyi.system.authority.service.ISysLoginService; |
|
|
|
import com.xueyi.system.organize.service.ISysEnterpriseService; |
|
|
|
import com.xueyi.system.resource.domain.dto.DmResourcesDto; |
|
|
|
import com.xueyi.system.resource.service.IDmResourcesService; |
|
|
|
import com.xueyi.system.staff.domain.query.DmStaffQuery; |
|
|
|
import com.xueyi.system.api.staff.domain.vo.DmStaffFeature; |
|
|
|
import com.xueyi.system.staff.service.IDmStaffService; |
|
|
|
import com.xueyi.tenant.api.tenant.domain.po.SysEnterpriseStaff; |
|
|
|
import com.xueyi.tenant.api.tenant.feign.RemoteTenantService; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.PathVariable; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.PutMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
import java.io.Serializable; |
|
|
@@ -56,8 +62,6 @@ import java.util.List; |
|
|
|
@RestController |
|
|
|
@RequestMapping("/staff") |
|
|
|
public class DmStaffController extends BaseController<DmStaffQuery, DmStaffDto, IDmStaffService> { |
|
|
|
private static final Logger logger = LoggerFactory.getLogger(DmStaffController.class); |
|
|
|
|
|
|
|
@Autowired |
|
|
|
IDmStaffService dmStaffService; |
|
|
|
|
|
|
@@ -193,6 +197,13 @@ public class DmStaffController extends BaseController<DmStaffQuery, DmStaffDto, |
|
|
|
Long tenantId = Long.parseLong(String.valueOf(SecurityContextHolder.getLocalMap().get("enterprise_id"))); |
|
|
|
SysEnterpriseDto enterpriseDto = enterpriseService.selectById(tenantId); |
|
|
|
Source source = SourceUtil.getSourceCache(enterpriseDto.getStrategyId()); |
|
|
|
SysEnterpriseStaff enterpriseStaff = new SysEnterpriseStaff(); |
|
|
|
enterpriseStaff.setPhone(dmStaff.getPhone()); |
|
|
|
enterpriseStaff.setStaffId(dmStaff.getId()); |
|
|
|
enterpriseStaff.setId(dmStaff.getId()); |
|
|
|
enterpriseStaff.setTId(SecurityContextHolder.getEnterpriseId()); |
|
|
|
tenantService.saveEnterpriseStaff(enterpriseStaff, SecurityConstants.INNER); |
|
|
|
|
|
|
|
if (dmStaff.getBirthDate() != null) { |
|
|
|
DmWebSocketMessageVo vo = new DmWebSocketMessageVo(); |
|
|
|
JSONObject birthJson = new JSONObject(); |
|
|
|