批量上传附件,校验规则增加员工姓名

This commit is contained in:
dxfeng 2025-09-28 17:52:21 +08:00
parent 57b20384a4
commit 0312c83823
5 changed files with 14 additions and 5 deletions

View File

@ -27,8 +27,8 @@ public class EntryManageController {
HrComEstService hrComEstService;
@GetMapping("/checkJobNum")
public WeaResult<Map<String, Object>> checkJobNum(@RequestParam("jobNum") String jobNum) {
return entryManageService.checkJobNum(jobNum);
public WeaResult<Map<String, Object>> checkJobNum(@RequestParam("jobNum") String jobNum,@RequestParam("userName") String userName) {
return entryManageService.checkJobNum(jobNum,userName);
}
@PostMapping("/uploadFiles")

View File

@ -21,6 +21,8 @@ public interface EntryManageMapper {
*/
Long getEntryRecordIdByJobNum(@Param("param") BaseParam param, @Param("jobNum") String jobNum);
Long getEntryRecordIdByJobNumAndName(@Param("param") BaseParam param, @Param("jobNum") String jobNum,@Param("userName") String userName);
Long updateFilesInfo(@Param("param") BaseParam param, @Param("employeeId") Long employeeId);
}

View File

@ -15,9 +15,10 @@ public interface EntryManageService {
* 校验工号
*
* @param jobNum 工号
* @param userName 姓名
* @return
*/
WeaResult<Map<String, Object>> checkJobNum(String jobNum);
WeaResult<Map<String, Object>> checkJobNum(String jobNum,String userName);
/**
* 上传文件

View File

@ -60,14 +60,14 @@ public class EntryManageServiceImpl implements EntryManageService {
BaseParam baseParam = new BaseParam();
@Override
public WeaResult<Map<String, Object>> checkJobNum(String jobNum) {
public WeaResult<Map<String, Object>> checkJobNum(String jobNum,String userName) {
Map<String, Object> dataMap = new HashMap<>();
dataMap.put("isExist", false);
if (StringUtils.isBlank(jobNum)) {
return WeaResult.fail("工号获取异常", true);
}
Long empIdByJobNum = entryManageMapper.getEntryRecordIdByJobNum(baseParam, jobNum);
Long empIdByJobNum = entryManageMapper.getEntryRecordIdByJobNumAndName(baseParam, jobNum,userName);
dataMap.put("isExist", null != empIdByJobNum);
dataMap.put("empId", empIdByJobNum);
return WeaResult.success(dataMap);

View File

@ -26,4 +26,10 @@
where t1.tenant_key = #{param.tenantKey} and t1.delete_type = 0
and t1.job_num = #{jobNum}
</select>
<select id="getEntryRecordIdByJobNumAndName" resultType="java.lang.Long">
select t1.id from ${param.e10_common}.uf_jcl_employee_information t1
where t1.tenant_key = #{param.tenantKey} and t1.delete_type = 0
and t1.job_num = #{jobNum}
and t1.username = #{userName}
</select>
</mapper>