员工管理-审核管理,身高体重科学计数法问题调整

This commit is contained in:
曹磊 2026-02-25 16:42:10 +08:00
parent 82e671590e
commit 7aa9bd5aa1
5 changed files with 159 additions and 17 deletions

View File

@ -70,13 +70,15 @@ public class EmployeesApplyController extends JeecgController<EmployeesApply, IE
@GetMapping(value = "/list")
public Result<IPage<EmployeesApply>> queryPageList(EmployeesApply employeesApply, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
// 自定义查询规则
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
// 自定义多选的查询规则为LIKE_WITH_OR
customeRuleMap.put("sex", QueryRuleEnum.LIKE_WITH_OR);
QueryWrapper<EmployeesApply> queryWrapper = QueryGenerator.initQueryWrapper(employeesApply, req.getParameterMap(), customeRuleMap);
// Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
// // 自定义多选的查询规则为LIKE_WITH_OR
// customeRuleMap.put("sex", QueryRuleEnum.LIKE_WITH_OR);
// QueryWrapper<EmployeesApply> queryWrapper = QueryGenerator.initQueryWrapper(employeesApply, req.getParameterMap(), customeRuleMap);
// Page<EmployeesApply> page = new Page<EmployeesApply>(pageNo, pageSize);
// queryWrapper.like(StringUtils.isNotBlank(employeesApply.getParamsTime()), "create_time", employeesApply.getParamsTime());
QueryWrapper<EmployeesApply> queryWrapper = QueryGenerator.initQueryWrapper(employeesApply, req.getParameterMap());
Page<EmployeesApply> page = new Page<EmployeesApply>(pageNo, pageSize);
queryWrapper.like(StringUtils.isNotBlank(employeesApply.getParamsTime()), "create_time", employeesApply.getParamsTime());
IPage<EmployeesApply> pageList = employeesApplyService.page(page, queryWrapper);
IPage<EmployeesApply> pageList = employeesApplyService.findPage(page, queryWrapper);
return Result.OK(pageList);
}

View File

@ -16,7 +16,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface EmployeesApplyMapper extends BaseMapper<EmployeesApply> {
IPage<EmployeesApply> findPage(Page<EmployeesApply> page, @Param(Constants.WRAPPER) QueryWrapper<EmployeesApply> queryWrapper);
IPage<EmployeesApply> listPage(Page<EmployeesApply> page, @Param(Constants.WRAPPER) QueryWrapper<EmployeesApply> queryWrapper);
int cleanErrorInvided(@Param("employeeId") String employeeId);
EmployeesApply findById(@Param("id") String id);
EmployeesApply findOne(EmployeesApply employeesApply);
}

View File

@ -2,6 +2,46 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nu.modules.employeesapply.mapper.EmployeesApplyMapper">
<select id="findPage" resultType="com.nu.modules.employeesapply.entity.EmployeesApply">
SELECT sup.* FROM (
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
) sup
${ew.customSqlSegment}
</select>
<select id="listPage" resultType="com.nu.modules.employeesapply.entity.EmployeesApply">
SELECT sup.* FROM (
SELECT
@ -14,8 +54,8 @@
a.national,
a.id_card,
a.married_or_not,
a.height,
a.weight,
CONCAT(a.height, '') as height,
CONCAT(a.weight, '') as weight,
a.health_status,
a.political_appearance,
a.house_address,
@ -51,8 +91,8 @@
b.national,
b.id_card,
b.married_or_not,
b.height,
b.weight,
CONCAT(b.height, '') as height,
CONCAT(b.weight, '') as weight,
b.health_status,
b.political_appearance,
b.house_address,
@ -85,4 +125,84 @@
<delete id="cleanErrorInvided">
delete from nu_biz_employees_apply where employee_id = #{employeeId} and iz_history = 'N' and apply_type = '1'
</delete>
<select id="findById" 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.id = #{id}
</select>
<select id="findOne" 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.create_time &lt; #{createTime}
limit 1
</select>
</mapper>

View File

@ -18,6 +18,8 @@ import java.util.Map;
*/
public interface IEmployeesApplyService extends IService<EmployeesApply> {
IPage<EmployeesApply> findPage(Page<EmployeesApply> page, QueryWrapper<EmployeesApply> queryWrapper);
IPage<EmployeesApply> listPage(Page<EmployeesApply> page, QueryWrapper<EmployeesApply> queryWrapper);
void cleanErrorInvided(String employeeId);

View File

@ -60,6 +60,11 @@ public class EmployeesApplyServiceImpl extends ServiceImpl<EmployeesApplyMapper,
@Autowired
private ISysUserAPI sysUserAPI;
@Override
public IPage<EmployeesApply> findPage(Page<EmployeesApply> page, QueryWrapper<EmployeesApply> queryWrapper){
return baseMapper.findPage(page, queryWrapper);
}
@Override
public IPage<EmployeesApply> listPage(Page<EmployeesApply> page, QueryWrapper<EmployeesApply> queryWrapper) {
return baseMapper.listPage(page, queryWrapper);
@ -234,15 +239,22 @@ public class EmployeesApplyServiceImpl extends ServiceImpl<EmployeesApplyMapper,
@Override
public List<Map<String, Object>> getModifyHistoryInfo(EmployeesApply employeesApply) {
// 1. 查询变更后数据
EmployeesApply modifyData = baseMapper.selectById(employeesApply.getId());
// EmployeesApply modifyData = baseMapper.selectById(employeesApply.getId());
EmployeesApply modifyData = baseMapper.findById(employeesApply.getId());
// 2. 查询当前使用中数据
QueryWrapper<EmployeesApply> usingQW = new QueryWrapper<>();
usingQW.eq("employee_id", modifyData.getEmployeeId());
usingQW.eq("status", "2");
usingQW.lt("create_time", modifyData.getCreateTime());
usingQW.last("limit 1");
EmployeesApply usingData = baseMapper.selectOne(usingQW);
// QueryWrapper<EmployeesApply> usingQW = new QueryWrapper<>();
// usingQW.eq("employee_id", modifyData.getEmployeeId());
// usingQW.eq("status", "2");
// usingQW.lt("create_time", modifyData.getCreateTime());
// usingQW.last("limit 1");
// EmployeesApply usingData = baseMapper.selectOne(usingQW);
EmployeesApply usingEa = new EmployeesApply();
usingEa.setEmployeeId(modifyData.getEmployeeId());
usingEa.setCreateTime(modifyData.getCreateTime());
usingEa.setStatus("2");
EmployeesApply usingData = baseMapper.findOne(usingEa);
if(usingData == null || usingData.getId() == null){
usingData = modifyData;
}