|
@ -37,6 +37,8 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; |
|
|
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; |
|
|
import com.epmet.commons.tools.security.password.PasswordUtils; |
|
|
import com.epmet.commons.tools.security.password.PasswordUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
|
|
|
import com.epmet.commons.tools.utils.IdCardRegexUtils; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.constant.CustomerStaffConstant; |
|
|
import com.epmet.constant.CustomerStaffConstant; |
|
|
import com.epmet.constant.RoleKeyConstants; |
|
|
import com.epmet.constant.RoleKeyConstants; |
|
@ -73,6 +75,7 @@ import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.util.CollectionUtils; |
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDate; |
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
import java.util.concurrent.ExecutorService; |
|
|
import java.util.concurrent.ExecutorService; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
@ -370,6 +373,14 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
staffEntity.setWorkType(fromDTO.getWorkType()); |
|
|
staffEntity.setWorkType(fromDTO.getWorkType()); |
|
|
staffEntity.setEnableFlag(CustomerStaffConstant.ENABLE); |
|
|
staffEntity.setEnableFlag(CustomerStaffConstant.ENABLE); |
|
|
staffEntity.setPassword(PasswordUtils.encode("12345678")); |
|
|
staffEntity.setPassword(PasswordUtils.encode("12345678")); |
|
|
|
|
|
staffEntity.setIdCard(fromDTO.getIdCard()); |
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(fromDTO.getIdCard())) { |
|
|
|
|
|
LocalDate birthday = IdCardRegexUtils.parse(fromDTO.getIdCard()).getParsedResult().getBirthday(); |
|
|
|
|
|
staffEntity.setBirthday(DateUtils.localDate2Date(birthday)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
staffEntity.setCulture(fromDTO.getCulture()); |
|
|
baseDao.insert(staffEntity); |
|
|
baseDao.insert(staffEntity); |
|
|
|
|
|
|
|
|
//工作人员角色关联表
|
|
|
//工作人员角色关联表
|
|
@ -484,6 +495,14 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
staffEntity.setMobile(fromDTO.getMobile()); |
|
|
staffEntity.setMobile(fromDTO.getMobile()); |
|
|
staffEntity.setGender(fromDTO.getGender()); |
|
|
staffEntity.setGender(fromDTO.getGender()); |
|
|
staffEntity.setWorkType(fromDTO.getWorkType()); |
|
|
staffEntity.setWorkType(fromDTO.getWorkType()); |
|
|
|
|
|
staffEntity.setCulture(fromDTO.getCulture()); |
|
|
|
|
|
staffEntity.setIdCard(fromDTO.getIdCard()); |
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(fromDTO.getIdCard())) { |
|
|
|
|
|
LocalDate birthday = IdCardRegexUtils.parse(fromDTO.getIdCard()).getParsedResult().getBirthday(); |
|
|
|
|
|
staffEntity.setBirthday(DateUtils.localDate2Date(birthday)); |
|
|
|
|
|
} |
|
|
|
|
|
staffEntity.setCulture(fromDTO.getCulture()); |
|
|
baseDao.updateById(staffEntity); |
|
|
baseDao.updateById(staffEntity); |
|
|
|
|
|
|
|
|
//清空权限关联
|
|
|
//清空权限关联
|
|
|