五院杭州中心 引入产品功能 建模导入更新人员卡片
This commit is contained in:
parent
fc1e776611
commit
2118b56a94
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.api.wysecond.web;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/3/6 11:32
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Path("/wysecond/resourceCard")
|
||||||
|
public class ResourceCardAction extends com.engine.wysecond.web.ResourceCardAction{
|
||||||
|
}
|
||||||
|
|
@ -22,4 +22,10 @@ public interface ResourceCardService {
|
||||||
* @return: int
|
* @return: int
|
||||||
*/
|
*/
|
||||||
int upDateCard(List<ResourcesPo> resourcesPo);
|
int upDateCard(List<ResourcesPo> resourcesPo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建模业务职务信息导入更新人员卡片字段
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int modeExport();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ public class PostionMatrixServiceImpl extends Service implements PostionMatrixSe
|
||||||
@Override
|
@Override
|
||||||
public PostionMatrixVo postionMatrix() {
|
public PostionMatrixVo postionMatrix() {
|
||||||
|
|
||||||
PostionMatrixVo postionMatrixVo = new PostionMatrixVo();
|
|
||||||
|
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
//1.人员信息获取
|
//1.人员信息获取
|
||||||
|
|
|
||||||
|
|
@ -23,16 +23,15 @@ public class ResourceCardServiceImpl extends Service implements ResourceCardServ
|
||||||
return ServiceUtil.getService(PostionMatrixServiceImpl.class, user);
|
return ServiceUtil.getService(PostionMatrixServiceImpl.class, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int upDateCard(List<ResourcesPo> resourcesPo) {
|
public int upDateCard(List<ResourcesPo> resourcesPo) {
|
||||||
|
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
|
|
||||||
List<ResourcesPo> resourcesPoList = getService(user).postionPeoples();
|
|
||||||
|
|
||||||
String postionType = rs.getPropValue("wysecond", "postionType");
|
String postionType = rs.getPropValue("wysecond", "postionType");
|
||||||
String postion = rs.getPropValue("wysecond", "postion");
|
String postion = rs.getPropValue("wysecond", "postion");
|
||||||
resourcesPoList.forEach(resources -> {
|
resourcesPo.forEach(resources -> {
|
||||||
rs.executeQuery("select count(1) as sums from cus_fielddata where id = ? and scopeid =3 and scope = 'HrmCustomFieldByInfoType'",resources.getResourceId());
|
rs.executeQuery("select count(1) as sums from cus_fielddata where id = ? and scopeid =3 and scope = 'HrmCustomFieldByInfoType'",resources.getResourceId());
|
||||||
rs.next();
|
rs.next();
|
||||||
|
|
||||||
|
|
@ -50,6 +49,13 @@ public class ResourceCardServiceImpl extends Service implements ResourceCardServ
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return resourcesPoList.size();
|
return resourcesPo.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int modeExport() {
|
||||||
|
//导入Excel完成后回调 获取全量数据
|
||||||
|
List<ResourcesPo> resourcesPoList = getService(user).postionPeoples();
|
||||||
|
return upDateCard(resourcesPoList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.engine.wysecond.web;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.wysecond.service.ResourceCardService;
|
||||||
|
import com.engine.wysecond.service.impl.ResourceCardServiceImpl;
|
||||||
|
import weaver.hrm.HrmUserVarify;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.core.Context;
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/3/6 11:33
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ResourceCardAction {
|
||||||
|
|
||||||
|
private ResourceCardService getService(User user) {
|
||||||
|
return ServiceUtil.getService(ResourceCardServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/modeExport")
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public String modeExport(@Context HttpServletRequest request, @Context HttpServletResponse response){
|
||||||
|
Map<String, Object> data = new HashMap<>(8);
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
getService(user).modeExport();
|
||||||
|
data.put("api_status", true);
|
||||||
|
} catch (Exception e) {
|
||||||
|
data.put("api_status", false);
|
||||||
|
data.put("msg", "catch exception : " + e.getMessage());
|
||||||
|
}
|
||||||
|
return JSONObject.toJSONString(data, SerializerFeature.DisableCircularReferenceDetect);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue