查询是否有扫码待入职人员

main
Administrator 2 weeks ago
parent 5af90ad077
commit 238ea8212f

@ -154,4 +154,37 @@ public class EmployeeRelationController {
return actionMap;
}
/**
*
* @return
*/
@WeaPermission(publicPermission = true)
@Produces(MediaType.APPLICATION_JSON)
@GetMapping("/queryIsNotHaveScanTheCodeInfo")
public Map<String, Object> queryIsNotHaveScanTheCodeInfo(
@RequestParam("mobile") String mobile,
@RequestParam("email") String email,
@RequestParam("identity") String identity){
log.error("queryIsNotHaveScanTheCodeInfo.mobile:{},email:{},identity:{}"+mobile,email,identity);
Map<String, Object> actionMap = new HashMap<>();
try {
//查询判断
boolean flag = employeeRelationService.queryIsNotHaveScanTheCodeInfo(mobile,email,identity);
log.error("queryIsNotHaveScanTheCodeInfo.flag:{}", flag);
if(flag){
actionMap.put("code","200");
actionMap.put("msg","您是待入职员工,请正常录入本人信息!");
}else {
actionMap.put("code","400");
actionMap.put("msg","您还不是待入职员工请联系对应hr");
}
}catch(Exception e){
log.error("接口调用失败-e:{}",e);
actionMap.put("code","201");
actionMap.put("msg","接口调用失败!");
}
return actionMap;
}
}

@ -16,4 +16,6 @@ public interface EmployeeRelationService {
List<ModuleField> getTableColumns(String tableName);
String getFormField(String formId,String fieldId,String title);
boolean queryIsNotHaveScanTheCodeInfo(String mobile,String email,String identity);
}

@ -126,6 +126,31 @@ public class EmployeeRelationServiceImpl implements EmployeeRelationService {
return fieldIdNew;
}
@Override
public boolean queryIsNotHaveScanTheCodeInfo(String mobile, String email, String identity) {
boolean flag = false;
String sql = "";
if (StringUtils.isNotBlank(identity)) {
sql = "select id from uf_jcl_rzgl where sfz_1mhf = '" + identity + "' and IS_DELETE = 0 and delete_type = 0 and TENANT_KEY = 't7n9jpeaoa' ";
log.error("queryLeaderPdByYear.sql:{}", sql);
} else {
if (StringUtils.isNotBlank(mobile)) {
sql = "select id from uf_jcl_rzgl where sj_woiy = '" + mobile + "' and IS_DELETE = 0 and delete_type = 0 and TENANT_KEY = 't7n9jpeaoa' ";
log.error("queryLeaderPdByYear.sql:{}", sql);
} else {
sql = "select id from uf_jcl_rzgl where yx_gvex = '" + email + "' and IS_DELETE = 0 and delete_type = 0 and TENANT_KEY = 't7n9jpeaoa' ";
log.error("queryLeaderPdByYear.sql:{}", sql);
}
}
Map<String, Object> rs = databaseUtils.execute("LOGIC", "weaver-ebuilder-form-service", sql);
List<Map<String, Object>> recordList = databaseUtils.getDataSourceList(rs);
log.error("queryIsNotHaveScanTheCodeInfo.recordList:{}", recordList);
if (CollectionUtils.isNotEmpty(recordList)) {
flag = true;
}
return flag;
}
private void GetTableAlterStatements() {
//1.获取连接池实例

Loading…
Cancel
Save