员工管理-审核管理,身高体重科学计数法问题调整
This commit is contained in:
parent
82e671590e
commit
7aa9bd5aa1
|
|
@ -70,13 +70,15 @@ public class EmployeesApplyController extends JeecgController<EmployeesApply, IE
|
||||||
@GetMapping(value = "/list")
|
@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) {
|
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<>();
|
// Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
// // 自定义多选的查询规则为:LIKE_WITH_OR
|
||||||
customeRuleMap.put("sex", QueryRuleEnum.LIKE_WITH_OR);
|
// customeRuleMap.put("sex", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
QueryWrapper<EmployeesApply> queryWrapper = QueryGenerator.initQueryWrapper(employeesApply, req.getParameterMap(), customeRuleMap);
|
// 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);
|
Page<EmployeesApply> page = new Page<EmployeesApply>(pageNo, pageSize);
|
||||||
queryWrapper.like(StringUtils.isNotBlank(employeesApply.getParamsTime()), "create_time", employeesApply.getParamsTime());
|
IPage<EmployeesApply> pageList = employeesApplyService.findPage(page, queryWrapper);
|
||||||
IPage<EmployeesApply> pageList = employeesApplyService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
*/
|
*/
|
||||||
public interface EmployeesApplyMapper extends BaseMapper<EmployeesApply> {
|
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);
|
IPage<EmployeesApply> listPage(Page<EmployeesApply> page, @Param(Constants.WRAPPER) QueryWrapper<EmployeesApply> queryWrapper);
|
||||||
|
|
||||||
int cleanErrorInvided(@Param("employeeId") String employeeId);
|
int cleanErrorInvided(@Param("employeeId") String employeeId);
|
||||||
|
|
||||||
|
EmployeesApply findById(@Param("id") String id);
|
||||||
|
|
||||||
|
EmployeesApply findOne(EmployeesApply employeesApply);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,46 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!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">
|
<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 id="listPage" resultType="com.nu.modules.employeesapply.entity.EmployeesApply">
|
||||||
SELECT sup.* FROM (
|
SELECT sup.* FROM (
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -14,8 +54,8 @@
|
||||||
a.national,
|
a.national,
|
||||||
a.id_card,
|
a.id_card,
|
||||||
a.married_or_not,
|
a.married_or_not,
|
||||||
a.height,
|
CONCAT(a.height, '') as height,
|
||||||
a.weight,
|
CONCAT(a.weight, '') as weight,
|
||||||
a.health_status,
|
a.health_status,
|
||||||
a.political_appearance,
|
a.political_appearance,
|
||||||
a.house_address,
|
a.house_address,
|
||||||
|
|
@ -51,8 +91,8 @@
|
||||||
b.national,
|
b.national,
|
||||||
b.id_card,
|
b.id_card,
|
||||||
b.married_or_not,
|
b.married_or_not,
|
||||||
b.height,
|
CONCAT(b.height, '') as height,
|
||||||
b.weight,
|
CONCAT(b.weight, '') as weight,
|
||||||
b.health_status,
|
b.health_status,
|
||||||
b.political_appearance,
|
b.political_appearance,
|
||||||
b.house_address,
|
b.house_address,
|
||||||
|
|
@ -85,4 +125,84 @@
|
||||||
<delete id="cleanErrorInvided">
|
<delete id="cleanErrorInvided">
|
||||||
delete from nu_biz_employees_apply where employee_id = #{employeeId} and iz_history = 'N' and apply_type = '1'
|
delete from nu_biz_employees_apply where employee_id = #{employeeId} and iz_history = 'N' and apply_type = '1'
|
||||||
</delete>
|
</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 < #{createTime}
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public interface IEmployeesApplyService extends IService<EmployeesApply> {
|
public interface IEmployeesApplyService extends IService<EmployeesApply> {
|
||||||
|
|
||||||
|
IPage<EmployeesApply> findPage(Page<EmployeesApply> page, QueryWrapper<EmployeesApply> queryWrapper);
|
||||||
|
|
||||||
IPage<EmployeesApply> listPage(Page<EmployeesApply> page, QueryWrapper<EmployeesApply> queryWrapper);
|
IPage<EmployeesApply> listPage(Page<EmployeesApply> page, QueryWrapper<EmployeesApply> queryWrapper);
|
||||||
|
|
||||||
void cleanErrorInvided(String employeeId);
|
void cleanErrorInvided(String employeeId);
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,11 @@ public class EmployeesApplyServiceImpl extends ServiceImpl<EmployeesApplyMapper,
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysUserAPI sysUserAPI;
|
private ISysUserAPI sysUserAPI;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<EmployeesApply> findPage(Page<EmployeesApply> page, QueryWrapper<EmployeesApply> queryWrapper){
|
||||||
|
return baseMapper.findPage(page, queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<EmployeesApply> listPage(Page<EmployeesApply> page, QueryWrapper<EmployeesApply> queryWrapper) {
|
public IPage<EmployeesApply> listPage(Page<EmployeesApply> page, QueryWrapper<EmployeesApply> queryWrapper) {
|
||||||
return baseMapper.listPage(page, queryWrapper);
|
return baseMapper.listPage(page, queryWrapper);
|
||||||
|
|
@ -234,15 +239,22 @@ public class EmployeesApplyServiceImpl extends ServiceImpl<EmployeesApplyMapper,
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> getModifyHistoryInfo(EmployeesApply employeesApply) {
|
public List<Map<String, Object>> getModifyHistoryInfo(EmployeesApply employeesApply) {
|
||||||
// 1. 查询变更后数据
|
// 1. 查询变更后数据
|
||||||
EmployeesApply modifyData = baseMapper.selectById(employeesApply.getId());
|
// EmployeesApply modifyData = baseMapper.selectById(employeesApply.getId());
|
||||||
|
EmployeesApply modifyData = baseMapper.findById(employeesApply.getId());
|
||||||
|
|
||||||
// 2. 查询当前使用中数据
|
// 2. 查询当前使用中数据
|
||||||
QueryWrapper<EmployeesApply> usingQW = new QueryWrapper<>();
|
// QueryWrapper<EmployeesApply> usingQW = new QueryWrapper<>();
|
||||||
usingQW.eq("employee_id", modifyData.getEmployeeId());
|
// usingQW.eq("employee_id", modifyData.getEmployeeId());
|
||||||
usingQW.eq("status", "2");
|
// usingQW.eq("status", "2");
|
||||||
usingQW.lt("create_time", modifyData.getCreateTime());
|
// usingQW.lt("create_time", modifyData.getCreateTime());
|
||||||
usingQW.last("limit 1");
|
// usingQW.last("limit 1");
|
||||||
EmployeesApply usingData = baseMapper.selectOne(usingQW);
|
// 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){
|
if(usingData == null || usingData.getId() == null){
|
||||||
usingData = modifyData;
|
usingData = modifyData;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue