员工管理-审核管理,身高体重科学计数法问题调整
This commit is contained in:
parent
ee9a03cf7f
commit
f59a0c768b
|
|
@ -10,5 +10,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
public interface BizEmployeesInfoMapper extends BaseMapper<BizEmployeesInfo> {
|
||||
|
||||
BizEmployeesInfo findById(BizEmployeesInfo bizEmployeesInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,4 +2,63 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.employeesInfo.mapper.BizEmployeesInfoMapper">
|
||||
|
||||
<select id="findById" resultType="com.nu.modules.employeesInfo.entity.BizEmployeesInfo">
|
||||
select
|
||||
id,
|
||||
name,
|
||||
sex,
|
||||
national,
|
||||
head_path,
|
||||
id_card,
|
||||
tel,
|
||||
entry_time,
|
||||
post_level,
|
||||
date_of_birth,
|
||||
married_or_not,
|
||||
wages,
|
||||
CONCAT(height, '') as height,
|
||||
CONCAT(weight, '') as weight,
|
||||
address,
|
||||
is_smoking,
|
||||
health_status,
|
||||
house_address,
|
||||
political_appearance,
|
||||
emergency_contact,
|
||||
emergency_tel,
|
||||
emergency_relationship,
|
||||
hukou_nature,
|
||||
content,
|
||||
id_card_positive,
|
||||
id_card_negative,
|
||||
contract_positive,
|
||||
contract_negative,
|
||||
health_certificate_positive,
|
||||
health_certificate_negative,
|
||||
bank_positive,
|
||||
bank_negative,
|
||||
qualification,
|
||||
no_crime_certificate,
|
||||
regional,
|
||||
service_tag,
|
||||
del_flag,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
sys_org_code,
|
||||
open_id,
|
||||
iz_online,
|
||||
iz_freeze,
|
||||
opening_bank,
|
||||
bank_card,
|
||||
iz_invited,
|
||||
modify_status,
|
||||
start_time,
|
||||
end_time,
|
||||
current_address,
|
||||
order_cap
|
||||
from nu_biz_employees_info
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -10,5 +10,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBizEmployeesInfoService extends IService<BizEmployeesInfo> {
|
||||
|
||||
BizEmployeesInfo findById(BizEmployeesInfo bizEmployeesInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@ public class BizEmployeesInfoServiceImpl extends ServiceImpl<BizEmployeesInfoMap
|
|||
@Autowired
|
||||
private INuAppEmployeesPermissionService nuAppEmployeesPermissionService;
|
||||
|
||||
@Override
|
||||
public BizEmployeesInfo findById(BizEmployeesInfo bizEmployeesInfo){
|
||||
return baseMapper.findById(bizEmployeesInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getPermissionList(String employeesId) {
|
||||
List<NuAppEmployeesPermission> permissionList = nuAppEmployeesPermissionService.listByEmployeesId(employeesId);
|
||||
|
|
|
|||
|
|
@ -24,5 +24,8 @@ public interface EmployeesApplyMapper extends BaseMapper<EmployeesApply> {
|
|||
|
||||
EmployeesApply findById(@Param("id") String id);
|
||||
|
||||
EmployeesApply getModifyData(EmployeesApply employeesApply);
|
||||
|
||||
EmployeesApply findOne(EmployeesApply employeesApply);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,6 +164,49 @@
|
|||
where b.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getModifyData" resultType="com.nu.modules.employeesapply.entity.EmployeesApply">
|
||||
SELECT
|
||||
b.id AS id,
|
||||
b.employee_id,
|
||||
b.name,
|
||||
b.sex,
|
||||
b.date_of_birth,
|
||||
b.tel,
|
||||
b.national,
|
||||
b.id_card,
|
||||
b.married_or_not,
|
||||
CONCAT(b.height, '') as height,
|
||||
CONCAT(b.weight, '') as weight,
|
||||
b.health_status,
|
||||
b.political_appearance,
|
||||
b.house_address,
|
||||
b.emergency_contact,
|
||||
b.emergency_tel,
|
||||
b.emergency_relationship,
|
||||
b.hukou_nature,
|
||||
b.current_address,
|
||||
b.id_card_positive,
|
||||
b.id_card_negative,
|
||||
b.health_certificate_positive,
|
||||
b.bank_positive,
|
||||
b.bank_negative,
|
||||
b.qualification,
|
||||
b.no_crime_certificate,
|
||||
b.create_time,
|
||||
b.status,
|
||||
b.modify_status,
|
||||
b.apply_type,
|
||||
b.audit_content,
|
||||
b.iz_history
|
||||
FROM nu_biz_employees_apply b
|
||||
where b.employee_id = #{employeeId}
|
||||
and b.status = #{status}
|
||||
and b.iz_history = #{izHistory}
|
||||
and b.apply_type = #{applyType}
|
||||
order by b.create_time desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="findOne" resultType="com.nu.modules.employeesapply.entity.EmployeesApply">
|
||||
SELECT
|
||||
b.id AS id,
|
||||
|
|
|
|||
|
|
@ -88,27 +88,40 @@ public class EmployeesApplyServiceImpl extends ServiceImpl<EmployeesApplyMapper,
|
|||
@Override
|
||||
public List<Map<String, Object>> getModifyInfo(EmployeesApply employeesApply) {
|
||||
// 1. 查询变更后数据(申请表中最新待审核的变更数据)
|
||||
QueryWrapper<EmployeesApply> sourceQW = new QueryWrapper<>();
|
||||
sourceQW.eq("employee_id", employeesApply.getEmployeeId());
|
||||
sourceQW.eq("status", "1"); // 审核中
|
||||
sourceQW.eq("iz_history", "N"); // 当前数据(非历史)
|
||||
sourceQW.eq("apply_type", "2"); // 信息变更申请
|
||||
sourceQW.orderByDesc("create_time");
|
||||
List<EmployeesApply> sourceList = baseMapper.selectList(sourceQW);
|
||||
if (sourceList == null || sourceList.isEmpty()) {
|
||||
// QueryWrapper<EmployeesApply> sourceQW = new QueryWrapper<>();
|
||||
// sourceQW.eq("employee_id", employeesApply.getEmployeeId());
|
||||
// sourceQW.eq("status", "1"); // 审核中
|
||||
// sourceQW.eq("iz_history", "N"); // 当前数据(非历史)
|
||||
// sourceQW.eq("apply_type", "2"); // 信息变更申请
|
||||
// sourceQW.orderByDesc("create_time");
|
||||
// List<EmployeesApply> sourceList = baseMapper.selectList(sourceQW);
|
||||
// if (sourceList == null || sourceList.isEmpty()) {
|
||||
// return Collections.emptyList();
|
||||
// }
|
||||
// EmployeesApply modifyData = sourceList.get(0); // 修改后的数据
|
||||
|
||||
EmployeesApply usingEa = new EmployeesApply();
|
||||
usingEa.setEmployeeId(employeesApply.getEmployeeId());
|
||||
usingEa.setStatus("1");
|
||||
usingEa.setIzHistory("N");
|
||||
usingEa.setApplyType("2");
|
||||
EmployeesApply modifyData = baseMapper.getModifyData(usingEa);
|
||||
if (modifyData == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
EmployeesApply modifyData = sourceList.get(0); // 修改后的数据
|
||||
|
||||
// 2. 查询当前使用中数据(员工信息表中的正式数据)
|
||||
QueryWrapper<BizEmployeesInfo> nowUseQW = new QueryWrapper<>();
|
||||
nowUseQW.eq("id", employeesApply.getEmployeeId());
|
||||
nowUseQW.orderByDesc("create_time"); // ✅ 修正:原来是 sourceQW,应为 nowUseQW
|
||||
List<BizEmployeesInfo> nowUseList = employeesInfoService.list(nowUseQW);
|
||||
if (nowUseList == null || nowUseList.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
BizEmployeesInfo usingData = nowUseList.get(0); // 原始数据
|
||||
// QueryWrapper<BizEmployeesInfo> nowUseQW = new QueryWrapper<>();
|
||||
// nowUseQW.eq("id", employeesApply.getEmployeeId());
|
||||
// nowUseQW.orderByDesc("create_time"); // ✅ 修正:原来是 sourceQW,应为 nowUseQW
|
||||
// List<BizEmployeesInfo> nowUseList = employeesInfoService.list(nowUseQW);
|
||||
// if (nowUseList == null || nowUseList.isEmpty()) {
|
||||
// return Collections.emptyList();
|
||||
// }
|
||||
// BizEmployeesInfo usingData = nowUseList.get(0); // 原始数据
|
||||
BizEmployeesInfo bizEmployeesInfo = new BizEmployeesInfo();
|
||||
bizEmployeesInfo.setId(employeesApply.getEmployeeId());
|
||||
BizEmployeesInfo usingData = employeesInfoService.findById(bizEmployeesInfo);
|
||||
|
||||
// 3. 准备结果列表
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue