Compare commits
2 Commits
4b6d66e9b4
...
cb3bea2ad3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb3bea2ad3 | ||
|
|
e230c5ab09 |
@ -105,15 +105,15 @@ public class CompanyStaffController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建员工信息,在角色和用户已经存在的情况下用
|
* 创建、修改员工信息,在角色和用户已经存在的情况下用
|
||||||
*
|
*
|
||||||
* @author 小李
|
* @author 小李
|
||||||
* @date 17:26 2024/12/19
|
* @date 17:26 2024/12/19
|
||||||
* @param staffRespVO 信息
|
* @param staffRespVO 信息
|
||||||
**/
|
**/
|
||||||
@PostMapping("/createByExistUser")
|
@PostMapping("/updateByExistUser")
|
||||||
public CommonResult<?> createByExistUser(@RequestBody CompanyStaffRespVO staffRespVO){
|
public CommonResult<?> updateByExistUser(@RequestBody CompanyStaffRespVO staffRespVO){
|
||||||
staffService.createByExistUser(staffRespVO);
|
staffService.updateByExistUser(staffRespVO);
|
||||||
return CommonResult.ok();
|
return CommonResult.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -120,13 +120,13 @@ public class CompanyStaff extends TenantBaseDO {
|
|||||||
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
|
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
@ExcelProperty("转正时间")
|
@ExcelProperty("转正时间")
|
||||||
private LocalDateTime formalDate;
|
private Date formalDate;
|
||||||
|
|
||||||
/** 购买保险时间 */
|
/** 购买保险时间 */
|
||||||
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
|
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
@ExcelProperty("购买保险时间")
|
@ExcelProperty("购买保险时间")
|
||||||
private LocalDateTime safeDate;
|
private Date safeDate;
|
||||||
|
|
||||||
/** 附件的名称们,手动填写,逗号分隔,没有也要占位,和下面的urls对应 */
|
/** 附件的名称们,手动填写,逗号分隔,没有也要占位,和下面的urls对应 */
|
||||||
private String fileNames;
|
private String fileNames;
|
||||||
|
|||||||
@ -141,12 +141,12 @@ public interface CompanyStaffService extends IService<CompanyStaff> {
|
|||||||
CompanyStaffRespVO getMyAdviser(Long tenantId,String sysCode);
|
CompanyStaffRespVO getMyAdviser(Long tenantId,String sysCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建员工信息,在角色和用户已经存在的情况下用
|
* 创建、修改员工信息,在角色和用户已经存在的情况下用
|
||||||
*
|
*
|
||||||
* @author 小李
|
* @author 小李
|
||||||
* @date 17:26 2024/12/19
|
* @date 17:26 2024/12/19
|
||||||
* @param staffRespVO 信息
|
* @param staffRespVO 信息
|
||||||
**/
|
**/
|
||||||
void createByExistUser(CompanyStaffRespVO staffRespVO);
|
void updateByExistUser(CompanyStaffRespVO staffRespVO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -689,13 +689,15 @@ public class CompanyStaffServiceImpl extends ServiceImpl<CompanyStaffMapper, Com
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建员工信息,在角色和用户已经存在的情况下用
|
* 创建、修改员工信息,在角色和用户已经存在的情况下用
|
||||||
*
|
*
|
||||||
* @author 小李
|
* @author 小李
|
||||||
* @date 17:26 2024/12/19
|
* @date 17:26 2024/12/19
|
||||||
* @param staffRespVO 信息
|
* @param staffRespVO 信息
|
||||||
**/
|
**/
|
||||||
public void createByExistUser(CompanyStaffRespVO staffRespVO){
|
@Override
|
||||||
|
public void updateByExistUser(CompanyStaffRespVO staffRespVO){
|
||||||
|
if (ObjectUtil.isEmpty(staffRespVO.getId())){
|
||||||
AdminUserRespDTO loginUser = getLoginUser();
|
AdminUserRespDTO loginUser = getLoginUser();
|
||||||
// 设置新增员工部门
|
// 设置新增员工部门
|
||||||
staffRespVO.setDeptId(loginUser.getDeptId());
|
staffRespVO.setDeptId(loginUser.getDeptId());
|
||||||
@ -710,5 +712,20 @@ public class CompanyStaffServiceImpl extends ServiceImpl<CompanyStaffMapper, Com
|
|||||||
staffRespVO.setUniqueCode(uniqueCode);
|
staffRespVO.setUniqueCode(uniqueCode);
|
||||||
// 3 保存员工信息到数据库
|
// 3 保存员工信息到数据库
|
||||||
baseMapper.insert(staffRespVO);
|
baseMapper.insert(staffRespVO);
|
||||||
|
}else {
|
||||||
|
AdminUserRespDTO user = adminUserApi.getUser(staffRespVO.getUserId());
|
||||||
|
AdminUserRespDTO newUser = new AdminUserRespDTO();
|
||||||
|
newUser.setId(user.getId());
|
||||||
|
if (!user.getUsername().equals(staffRespVO.getTel())){
|
||||||
|
newUser.setUsername(staffRespVO.getTel());
|
||||||
|
}
|
||||||
|
if (!user.getNickname().equals(staffRespVO.getName())){
|
||||||
|
newUser.setNickname(staffRespVO.getName());
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(newUser.getUsername()) || ObjectUtil.isNotEmpty(newUser.getNickname())){
|
||||||
|
adminUserApi.updateUser(newUser);
|
||||||
|
}
|
||||||
|
baseMapper.updateById(staffRespVO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -213,7 +213,8 @@ where sig.partner_id =#{partnerId}
|
|||||||
<select id="inspectionList" resultType="cn.iocoder.yudao.module.inspection.entity.InspectionInfo">
|
<select id="inspectionList" resultType="cn.iocoder.yudao.module.inspection.entity.InspectionInfo">
|
||||||
SELECT
|
SELECT
|
||||||
info.id,info.worker_name,info.worker_phone,info.worker_avatar,info.`status`,info.is_pass,info.start_time,info.end_time,step.title as lastTitle,
|
info.id,info.worker_name,info.worker_phone,info.worker_avatar,info.`status`,info.is_pass,info.start_time,info.end_time,step.title as lastTitle,
|
||||||
su.nickname buyName,su.mobile as buyPhone,oi.order_no as orderNo,oi.pay_money+oi.balance as realPayMoney,oi.goods_title as goodsName,info.car_num,info.is_retrial
|
su.nickname buyName,su.mobile as buyPhone,oi.order_no as orderNo,oi.pay_money+oi.balance as realPayMoney,oi.goods_title as goodsName,info.car_num,info.is_retrial,
|
||||||
|
info.customer_source as customerSource, info.other_phone as otherPhone,oi.sku_id as skuId, oi.sku_name as skuName,oi.goods_price as goodsPrice
|
||||||
from
|
from
|
||||||
inspection_info info
|
inspection_info info
|
||||||
LEFT JOIN inspection_step_info step ON info.id = step.inspection_info_id
|
LEFT JOIN inspection_step_info step ON info.id = step.inspection_info_id
|
||||||
|
|||||||
@ -162,4 +162,13 @@ public interface AdminUserApi {
|
|||||||
**/
|
**/
|
||||||
void setOpenId(Long userId,String openId);
|
void setOpenId(Long userId,String openId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户信息,慎用!
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:47 2024/12/20
|
||||||
|
* @param newUser 新用户信息
|
||||||
|
**/
|
||||||
|
void updateUser(AdminUserRespDTO newUser);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -195,4 +195,17 @@ public class AdminUserApiImpl implements AdminUserApi {
|
|||||||
userService.setOpenId(userId, openId);
|
userService.setOpenId(userId, openId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户信息,慎用!
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:47 2024/12/20
|
||||||
|
* @param newUser 新用户信息
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void updateUser(AdminUserRespDTO newUser){
|
||||||
|
AdminUserDO bean = BeanUtil.toBean(newUser, AdminUserDO.class);
|
||||||
|
userService.updateById(bean);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user