diff --git a/.idea/artifacts/hrm_attendance.xml b/.idea/artifacts/hrm_attendance.xml
new file mode 100644
index 0000000..41e0413
--- /dev/null
+++ b/.idea/artifacts/hrm_attendance.xml
@@ -0,0 +1,8 @@
+
+
+ $PROJECT_DIR$/out/artifacts/hrm_attendance
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index cf41ff0..8fde53a 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -2,6 +2,7 @@
+
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
new file mode 100644
index 0000000..e96534f
--- /dev/null
+++ b/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/out/artifacts/hrm_attendance/hrm-attendance.jar b/out/artifacts/hrm_attendance/hrm-attendance.jar
new file mode 100644
index 0000000..7dcf697
Binary files /dev/null and b/out/artifacts/hrm_attendance/hrm-attendance.jar differ
diff --git a/src/com/api/attendance/common/CommonActionApi.java b/src/com/api/attendance/common/CommonActionApi.java
new file mode 100644
index 0000000..9951e9e
--- /dev/null
+++ b/src/com/api/attendance/common/CommonActionApi.java
@@ -0,0 +1,9 @@
+package com.api.attendance.common;
+
+import com.engine.common.web.CommonAction;
+
+import javax.ws.rs.Path;
+
+@Path("/operate/common")
+public class CommonActionApi extends CommonAction{
+}
diff --git a/src/com/api/attendance/persongroup/web/PersonGroupActionApi.java b/src/com/api/attendance/persongroup/web/PersonGroupActionApi.java
new file mode 100644
index 0000000..039d41b
--- /dev/null
+++ b/src/com/api/attendance/persongroup/web/PersonGroupActionApi.java
@@ -0,0 +1,11 @@
+package com.api.attendance.persongroup.web;
+
+import com.engine.attendance.persongroup.web.PersonGroupAction;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.ws.rs.Path;
+
+@Path("/attendance/persongroup")
+@Slf4j
+public class PersonGroupActionApi extends PersonGroupAction {
+}
diff --git a/src/com/attendance/engine/util/SendEmMessage.java b/src/com/attendance/engine/util/SendEmMessage.java
deleted file mode 100644
index d4d5c04..0000000
--- a/src/com/attendance/engine/util/SendEmMessage.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.util;
-
-import com.cloudstore.dev.api.bean.MessageBean;
-import com.cloudstore.dev.api.bean.MessageType;
-import com.cloudstore.dev.api.util.Util_Message;
-import com.engine.dto.BaseResult;
-import com.google.common.collect.Maps;
-import com.google.gson.Gson;
-import lombok.extern.slf4j.Slf4j;
-import weaver.general.BaseBean;
-
-import java.io.IOException;
-import java.lang.reflect.Type;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * 消息中心
- */
-@Slf4j
-public class SendEmMessage {
-
-
- /**
- *
- * @param userIdsSet 接收人id 必填
- * @param title 标题
- * @param context 内容
- * @param pcLinkUrl PC端链接
- * @param linkMobileUrl 移动端链接
- */
- public static void sendEmMessage(Set userIdsSet,int messageType,int creater, String title,String context,String pcLinkUrl,String linkMobileUrl){
- MessageType type = MessageType.newInstance(messageType); // 消息来源(见文档第四点补充 必填)
-
- try {
- MessageBean messageBean = Util_Message.createMessage(type, userIdsSet, title, context, pcLinkUrl, linkMobileUrl);
- messageBean.setCreater(creater);// 创建人id
-
- Util_Message.store(messageBean);
- } catch (IOException e) {
- log.error("sendEmMessage error: [{}]",e);
- e.printStackTrace();
- }
- }
-
- public static BaseResult sendWxMessage(String chatId,String messageContent){
- BaseBean baseBean = new BaseBean();
- //发送消息接口
- String sendMessageToWxGroupUrl = baseBean.getPropValue("weComConf","sendMessageToWxGroupUrl");
- Map sendMessageParamMap = Maps.newHashMap();
- sendMessageParamMap.put("chatid",chatId);
- sendMessageParamMap.put("msgtype","markdown");
- Map content = Maps.newHashMap();
- content.put("content",messageContent);
- sendMessageParamMap.put("markdown",content);
- Gson gson = new Gson();
- BaseResult baseResult = gson.fromJson(TokenUtil.post(sendMessageToWxGroupUrl,gson.toJson(sendMessageParamMap)),(Type) BaseResult.class);
- return baseResult;
- }
-}
diff --git a/src/com/attendance/engine/util/TokenUtil.java b/src/com/attendance/engine/util/TokenUtil.java
deleted file mode 100644
index 3b56deb..0000000
--- a/src/com/attendance/engine/util/TokenUtil.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.util;
-
-import com.cloudstore.dev.api.util.Util_DataCache;
-import com.engine.dto.TokenResult;
-import com.google.gson.Gson;
-import lombok.extern.slf4j.Slf4j;
-import weaver.general.BaseBean;
-import weaver.general.Util;
-
-import java.lang.reflect.Type;
-import java.util.HashMap;
-import java.util.Map;
-
-@Slf4j
-public class TokenUtil {
-
- private static final int timeOutSecond = 3600;
-
- /**
- * 配置文件名称
- */
- private static final String confFileName = "weComConf";
-
- private static BaseBean baseBean = new BaseBean();
-
- private static Gson gson = new Gson();
-
- public static final String TOKEN_URL = "https://qyapi.weixin.qq.com/cgi-bin/gettoken";
-
- private static String corpid = "";
-
- private static String corpsecret = "";
-
- static {
- corpid = baseBean.getPropValue(confFileName,"corpid");
- corpsecret = baseBean.getPropValue(confFileName,"corpsecret");
-// Util_DataCache.setObjVal("corpid",corpid);
-// Util_DataCache.setObjVal("corpsecret",corpsecret);
- }
-
- public static String post(String url,String paramJson){
- String token = Util.null2String(Util_DataCache.getObjVal("wx_access_token"));
- if ("".equals(token)){
- token = getAccessToken();
- Util_DataCache.setObjVal("wx_access_token",token);
- }
- url = url + "?access_token="+token;
- return HttpRequestUtil.doPost(url,paramJson);
- }
-
-
- public static String getAccessToken(){
- Map map = new HashMap<>();
- map.put("corpid",corpid);
- map.put("corpsecret",corpsecret);
-// map.put("corpid","wx22cd58d9bee18c0f");
-// map.put("corpsecret","n4ueR_AnNWXtmYpwr01dRA6i2v9kephxRKbW23n_ZTM");
-
- String response = HttpRequestUtil.doGet(TOKEN_URL,map);
- TokenResult tokenResult = gson.fromJson(response,(Type) TokenResult.class);
- if ("0".equals(tokenResult.getErrcode())){
- return tokenResult.getAccess_token();
- }else {
- return "";
- }
- }
-
-}
diff --git a/src/com/engine/attendance/persongroup/service/PersonGroupService.java b/src/com/engine/attendance/persongroup/service/PersonGroupService.java
new file mode 100644
index 0000000..a9b3af6
--- /dev/null
+++ b/src/com/engine/attendance/persongroup/service/PersonGroupService.java
@@ -0,0 +1,10 @@
+package com.engine.attendance.persongroup.service;
+
+
+import weaver.hrm.User;
+
+import java.util.Map;
+
+public interface PersonGroupService {
+ Map getHrmCondition(Map params, User user);
+}
diff --git a/src/com/engine/attendance/persongroup/service/impl/PersonGroupServiceImpl.java b/src/com/engine/attendance/persongroup/service/impl/PersonGroupServiceImpl.java
new file mode 100644
index 0000000..61df061
--- /dev/null
+++ b/src/com/engine/attendance/persongroup/service/impl/PersonGroupServiceImpl.java
@@ -0,0 +1,65 @@
+package com.engine.attendance.persongroup.service.impl;
+
+
+import com.engine.attendance.persongroup.service.PersonGroupService;
+import com.engine.common.util.DbTools;
+import com.engine.core.impl.Service;
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import weaver.general.Util;
+import weaver.hrm.User;
+import weaver.systeminfo.SystemEnv;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+
+@Slf4j
+public class PersonGroupServiceImpl extends Service implements PersonGroupService {
+ @Override
+ public Map getHrmCondition(Map params, User user) {
+ //获取字段类型 0:日期类型,1:下拉选择类型,2:手工自由输入类型
+ String type = Util.null2String(params.get("fieldType"));
+ String condition = "";
+ if ("0".equals(type)){
+ condition = " and fieldhtmltype='3' and type=2 ";
+ }else if ("1".equals(type)){
+ condition = " and fieldhtmltype = '5' ";
+ }else if ("2".equals(type)){
+ condition = " and fieldhtmltype <> '3' and fieldhtmltype <> '5' ";
+ }
+
+ Map data = Maps.newHashMap();
+ String sql = "select * from (select t1.fieldid,t2.fieldname,t1.fieldlable,t1.ismand,t2.fielddbtype,t2.fieldhtmltype,t2.type, t1.dmlurl, t1.fieldorder, t1.isuse, t1.isModify,'1' as allowModify, t1.groupid, 1 as allowhide from cus_formfield t1, cus_formdict t2 where t1.fieldid=t2.id and t1.scope='HrmCustomFieldByInfoType' and (t1.scopeid='1' or t1.scopeid='-1' or t1.scopeid='3' ) " +
+ " UNION all " +
+ " select fieldid, fieldname, fieldlabel ,ismand ,fielddbtype ,fieldhtmltype ,type , dmlurl,fieldorder ,isuse ,isModify ,allowModify, groupid, allowhide from hrm_formfield) hrmallfield where groupid in (select id from hrm_fieldgroup where (grouptype = '1' or grouptype = '-1' or grouptype = '3')) ";
+
+ sql = sql +condition+" order by hrmallfield.groupid, hrmallfield.fieldorder ";
+ log.info("sql :[{}]",sql);
+ List