@ -2,7 +2,6 @@ package com.weaver.seconddev.jcl.organization.controller;
import com.weaver.common.authority.annotation.WeaPermission ;
import com.weaver.common.authority.annotation.WeaPermission ;
import com.weaver.seconddev.jcl.organization.service.EmployeeRelationService ;
import com.weaver.seconddev.jcl.organization.service.EmployeeRelationService ;
import org.apache.commons.collections.CollectionUtils ;
import org.slf4j.Logger ;
import org.slf4j.Logger ;
import org.slf4j.LoggerFactory ;
import org.slf4j.LoggerFactory ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.beans.factory.annotation.Autowired ;
@ -10,11 +9,9 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping ;
import org.springframework.web.bind.annotation.RequestMapping ;
import org.springframework.web.bind.annotation.RequestParam ;
import org.springframework.web.bind.annotation.RequestParam ;
import org.springframework.web.bind.annotation.RestController ;
import org.springframework.web.bind.annotation.RestController ;
import javax.ws.rs.Produces ;
import javax.ws.rs.Produces ;
import javax.ws.rs.core.MediaType ;
import javax.ws.rs.core.MediaType ;
import java.util.HashMap ;
import java.util.HashMap ;
import java.util.List ;
import java.util.Map ;
import java.util.Map ;
@RestController
@RestController
@ -27,29 +24,48 @@ public class EmployeeRelationController {
private EmployeeRelationService employeeRelationService ;
private EmployeeRelationService employeeRelationService ;
/ * *
/ * *
* 查 询 结 果 回 写 数 据
* 员 工 管 理 - 根 据 姓 名 + 手 机 号 / 姓 名 + 邮 箱 / 身 份 证 号 判 断 是 否 黑 名 单
* @return
* /
@WeaPermission ( publicPermission = true )
@Produces ( MediaType . APPLICATION_JSON )
@GetMapping ( "/getStringValue" )
public String getStringValue (
@RequestParam ( "userName" ) String userName ) {
log . error ( "checkIsNotBlackList111.userName:{}" + userName ) ;
log . info ( "checkIsNotBlackList222.userName:{}" + userName ) ;
log . debug ( "checkIsNotBlackList333.userName:{}" + userName ) ;
return userName ;
}
/ * *
* 员 工 管 理 - 根 据 姓 名 + 手 机 号 / 姓 名 + 邮 箱 / 身 份 证 号 判 断 是 否 黑 名 单
* @return
* @return
* /
* /
@WeaPermission ( publicPermission = true )
@WeaPermission ( publicPermission = true )
@Produces ( MediaType . APPLICATION_JSON )
@Produces ( MediaType . APPLICATION_JSON )
@GetMapping ( "/writeBackRecord" )
@GetMapping ( "/checkIsNotBlackList" )
public Map < String , Object > writeBackRecord (
public Map < String , Object > checkIsNotBlackList (
@RequestParam ( "yearMonth" ) String yearMonth ) {
@RequestParam ( "userName" ) String userName ,
log . error ( "writeBackRecord.yearMonth:" + yearMonth ) ;
@RequestParam ( "mobile" ) String mobile ,
@RequestParam ( "email" ) String email ,
@RequestParam ( "identity" ) String identity ) {
log . error ( "checkIsNotBlackList111.userName:{},mobile:{},email:{},identity:{}" + userName , mobile , email , identity ) ;
log . info ( "checkIsNotBlackList222.userName:{},mobile:{},email:{},identity:{}" + userName , mobile , email , identity ) ;
log . debug ( "checkIsNotBlackList333.userName:{},mobile:{},email:{},identity:{}" + userName , mobile , email , identity ) ;
Map < String , Object > actionMap = new HashMap < > ( ) ;
Map < String , Object > actionMap = new HashMap < > ( ) ;
try {
try {
//查询干部绩效评定结果
//查询 判断
List < Map < String , Object > > leaderPdInfo = employeeRelationService . queryLeaderPdByYear ( yearMonth ) ;
boolean flag = employeeRelationService . checkIsNotBlackList ( userName , mobile , email , identity ) ;
log . error ( "resultCalculAtion.leaderPdInfo:{}" , leaderPdInfo ) ;
log . error ( " checkIsNotBlackList.flag:{}", flag ) ;
//循环计算干部总分及等级
if ( flag ) {
if ( CollectionUtils . isNotEmpty ( leaderPdInfo ) ) {
actionMap . put ( "code" , "200" ) ;
for ( Map < String , Object > map : leaderPdInfo ) {
actionMap . put ( "msg" , "当前人员存在黑名单!" ) ;
//将得分、等级回写到干部考核备案表
} else {
employeeRelationService . updateLeaderDaInfo ( map ) ;
actionMap . put ( "code" , "400" ) ;
}
actionMap . put ( "msg" , "不在黑名单!" ) ;
}
}
actionMap . put ( "code" , "200" ) ;
actionMap . put ( "msg" , "接口调用成功!" ) ;
} catch ( Exception e ) {
} catch ( Exception e ) {
log . error ( "接口调用失败-e:{}" , e ) ;
log . error ( "接口调用失败-e:{}" , e ) ;
actionMap . put ( "code" , "201" ) ;
actionMap . put ( "code" , "201" ) ;