日历排班

zm_dev
liuliang 10 months ago
parent ad5de70136
commit 85754e8feb

@ -1 +1 @@
<EFBFBD><EFBFBD>Y<EFBFBD>Y<EFBFBD>Y<EFBFBD>r<EFBFBD>t<EFBFBD><EFBFBD><EFBFBD>~<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
аyГ~цЭ|дй~Й~хд|И}фЛ~ш}Т~М|юй~с}С}юЯ}У}Ь~к~Х}Н~г}ЭЖ|б}О}ЪрqчhаjЖkЛjВhТjгiлjфkзiУhЭlЩkуoжpжxЯuЭtЧvВvтwЛvа{иxяyТxЙvЮxЦvБyиxрzпwЧvзxаЫЧшСжМЧСъмЖСЪзнНШзЭдДоЩЪДвкдЩРыщчАяПЬэяЮчцПГЗУЪлощбЭхдЪтзЖТНБУщПсЩлэррЦькмИпЙПРжпАлиШФмюмШдшжиИЖъВнлОЙНиwбsСsЪvцsЕwаtПsщyАlГtДoфsшqлlЬqЦpЗrКlыsЖsвuрsХmхoьqЛrщlйjНZК\т^Й\ФZоVфZХXШ\РVИhбwчxкzБyп{Шzб|ш{оxОxЙ|фzд|яwи{ЗvБyК|ЦVеZюUаYфSТYхXе\цXэaцcвeщ_ЮWхWц^бTмRюTЫTПZсWж[ъTЕ]ы[ЪWТRДWгVоZГZЧUЮYСQсXЮWБYЦ[кZшgО~В~ыzю~л{РzвyК{Бxи~ц|М{ъ~тж|Ф}к~н}ычaчdВ]вhп]вaь^ГaК`гaй^ж_Ш]С]И]в^Т^в^и]Т]Х`ЯkКgшgюgЩgюhШcТ]жWЬkшiцqжh

@ -12,21 +12,16 @@
<list default="true" id="baeb3dfb-5097-46c5-933e-6d1dab18b815" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat.values" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat.values" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat.values.at" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat.values.at" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat.values.s" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat.values.s" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat_i" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat_i" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/WEB-INF/sqllog/ecologysql" beforeDir="false" afterPath="$PROJECT_DIR$/WEB-INF/sqllog/ecologysql" afterDir="false" />
<change beforePath="$PROJECT_DIR$/log/sdk.log" beforeDir="false" afterPath="$PROJECT_DIR$/log/sdk.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/artifacts/hrm_attendance/hrm-attendance.jar" beforeDir="false" afterPath="$PROJECT_DIR$/out/artifacts/hrm_attendance/hrm-attendance.jar" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/ComputeAttendanceDurationCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/ComputeAttendanceDurationCmd.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/service/impl/AbnormalAttendanceServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/service/impl/AbnormalAttendanceServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/web/AttendanceanalysisAction.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/web/AttendanceanalysisAction.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/component/calendarscheduling/web/WorkRulesController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/component/calendarscheduling/web/WorkRulesController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/component/persongroup/commonutil/PersongroupCommonUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/component/persongroup/commonutil/PersongroupCommonUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/common/util/DbTools.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/common/util/DbTools.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/common/util/Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/common/util/Utils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/common/cmd/GetPersonDateBySuitOrganzation.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/common/cmd/GetPersonDateBySuitOrganzation.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/common/util/CommonUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/common/util/CommonUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/web/AttendanceanalysisAction.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/web/AttendanceanalysisAction.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$2.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$2.class" afterDir="false" />
@ -38,12 +33,10 @@
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/web/WorkRulesController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/web/WorkRulesController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/persongroup/commonutil/PersongroupCommonUtil.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/persongroup/commonutil/PersongroupCommonUtil.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/common/util/DbTools.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/common/util/DbTools.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/test-classes/calendarscheduling/Test1.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/test-classes/calendarscheduling/Test1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/test-classes/vocation/Test1.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/test-classes/vocation/Test1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/calendarscheduling/Test1.java" beforeDir="false" afterPath="$PROJECT_DIR$/test/calendarscheduling/Test1.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/common/cmd/GetPersonDateBySuitOrganzation.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/common/cmd/GetPersonDateBySuitOrganzation.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/common/util/CommonUtil.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/common/util/CommonUtil.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/test-classes/calendarscheduling/TestgetDepartSchedule.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/test-classes/calendarscheduling/TestgetDepartSchedule.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/calendarscheduling/TestgetDepartSchedule.java" beforeDir="false" afterPath="$PROJECT_DIR$/test/calendarscheduling/TestgetDepartSchedule.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/vocation/Test1.java" beforeDir="false" afterPath="$PROJECT_DIR$/test/vocation/Test1.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -86,7 +79,7 @@
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File" value="PLAIN_TEXT" />
<property name="last_directory_selection" value="$PROJECT_DIR$/src/com/engine/kq" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../../easyentry" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../上海考勤产品/考勤分支代码" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="project.structure.last.edited" value="Artifacts" />
<property name="project.structure.proportion" value="0.15" />
@ -686,7 +679,9 @@
<workItem from="1717589991214" duration="2702000" />
<workItem from="1717638933204" duration="5993000" />
<workItem from="1717651863418" duration="15566000" />
<workItem from="1717724528067" duration="11539000" />
<workItem from="1717724528067" duration="12939000" />
<workItem from="1717743947608" duration="9652000" />
<workItem from="1718070961854" duration="6848000" />
</task>
<servers />
</component>
@ -735,11 +730,6 @@
<line>221</line>
<option name="timeStamp" value="108" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/test/calendarscheduling/TestgetDepartSchedule.java</url>
<line>29</line>
<option name="timeStamp" value="122" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/com/engine/common/util/DateUtil.java</url>
<line>158</line>
@ -755,20 +745,10 @@
<line>38</line>
<option name="timeStamp" value="161" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/ComputeAttendanceDurationCmd.java</url>
<line>65</line>
<option name="timeStamp" value="162" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl.java</url>
<line>86</line>
<option name="timeStamp" value="163" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/com/engine/common/util/Utils.java</url>
<line>576</line>
<option name="timeStamp" value="165" />
<line>111</line>
<option name="timeStamp" value="167" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
@ -786,6 +766,9 @@
</watches-manager>
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/hrm_attendance$TestgetDepartSchedule_test2.ic" NAME="TestgetDepartSchedule.test2 Coverage Results" MODIFIED="1718071420719" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false">
<FILTER>calendarscheduling.*</FILTER>
</SUITE>
<SUITE FILE_PATH="coverage/hrm_attendance$Test_testAnalysis.ic" NAME="Test.testAnalysis Coverage Results" MODIFIED="1716174480378" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false">
<FILTER>TestAttendanceAllowance.*</FILTER>
</SUITE>

File diff suppressed because one or more lines are too long

@ -187,7 +187,7 @@ public class AttendanceanalysisAction {
return null;
}catch (Exception e){
log.error("execute fail,catch error: [{}]",e);
return ApiReturnTools.error("500","attendanceAnalysisByHrmAndDate error");
return ApiReturnTools.error("500",e.getMessage());
}
}

@ -22,6 +22,7 @@ import com.google.common.collect.Sets;
import lombok.extern.slf4j.Slf4j;
import weaver.conn.RecordSet;
import weaver.conn.constant.DBConstant;
import weaver.general.BaseBean;
import weaver.general.PageIdConst;
import weaver.general.Util;
@ -90,30 +91,55 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
String deparmentId = Util.null2String(params.get("deparment"));
String subcompanyId = Util.null2String(params.get("subcompany"));
String employeeIds = Util.null2String(params.get("employeeIds"));
String username = Util.null2String(params.get("username"));
String psersongroup = Util.null2String(params.get("psersongroup"));
String userId = Util.null2String(user.getUID());
//0:全体人员、1分部、2部门,3:人员
String type = Util.null2String(params.get("type"));
String conditions =" 1=1";
// if (type.equals("0")){
// conditions = " 1=1 ";
// }else if (type.equals("1")){
// conditions = " subcompanyid1="+subcompanyId;
// }else if (type.equals("2")){
// conditions = " departmentid="+deparmentId;
// }
if (!"".equals(subcompanyId)){
conditions = conditions +" and subcompanyid1="+subcompanyId;
}
if (!"".equals(deparmentId)){
conditions = conditions +" and departmentid="+deparmentId;
}
if (!"".equals(employeeIds)){
conditions = conditions +" and id in ("+employeeIds+")";
if (!"".equals(username)){
conditions = conditions +" and lastname like '%"+username+"%'";
}
RecordSet rs = new RecordSet();
List<Map<String,Object>> dataTable = null;
Set<String> psersongroupUserIds = null;
if (!"".equals(psersongroup)){
psersongroupUserIds = CommonUtil.getEmpGroupUserIds(psersongroup);
if (!"".equals(employeeIds)){
Set<String> ids = Sets.newHashSet();
for (String employeeId:employeeIds.split(",")){
if (psersongroupUserIds.contains(employeeId)){
ids.add(employeeId);
}
}
psersongroupUserIds = ids;
}
}else {
if (!"".equals(employeeIds)){
conditions = conditions +" and id in ("+employeeIds+")";
}
}
List<Map<String,Object>> dataTable = Lists.newArrayList();
if (psersongroupUserIds != null && psersongroupUserIds.size()>0){
String querySql = "select id,subcompanyid1,departmentid,workcode,lastname from hrmresource where "+conditions+" and id in (";
List<List<String>> userIdPartitions= Lists.partition(Lists.newArrayList(psersongroupUserIds),200);
for (List<String> userIdPartition :userIdPartitions){
String sql = querySql+String.join(",",userIdPartition)+")";
dataTable.addAll(DbTools.getSqlToList(sql));
}
}
int startindex = (pageindex-1)*pageSize;
int endindex = pageindex*pageSize;
int monthDays = DateUtil.getDays(dateTime, Calendar.DAY_OF_MONTH);
@ -121,38 +147,21 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
String endTime = dateTime+"-"+monthDays;
//当为系统管理员用户登录时
if ("1".equals(userId)){
// if ("oracle".equals(dbType) || "dm".equals(dbType) || "jc".equals(dbType) || "st".equals(dbType)){
//
//
// String sql = "select id,subcompanyid1,departmentid,workcode,lastname,ROWNUM rn from hrmresource where 1=1 and ROWNUM<="+endindex;
// sql = sql+" and "+conditions;
// String queryDatatablesql = "select * from ("+sql+") where rn >"+startindex;
// log.info("queryDatatablesql : {}",queryDatatablesql);
// dataTable = DbTools.getSqlToList(queryDatatablesql);
//
// }else if ("sqlserver".equals(dbType)){
// String sql = "select row_number() over(order by id asc) rownum,id from hrmresource where "+conditions;
// sql = "select top 1 a.id from ( "+sql+" ) a where a.rownum>"+startindex;
// String queryDatatablesql = "select top "+pageSize+" id,subcompanyid1,departmentid,workcode,lastname from hrmresource where id >=("+sql+") and "+conditions;
// log.info("queryDatatablesql : {}",queryDatatablesql);
// dataTable = DbTools.getSqlToList(queryDatatablesql);
// }else {
// String sql = "select id from hrmresource where "+conditions+" limit "+startindex+",1";
// String querySql = "select id,subcompanyid1,departmentid,workcode,lastname from hrmresource where id >=("+sql+") and "+conditions+" limit "+pageSize;
// log.info("queryDatatablesql : {}",querySql);
// dataTable = DbTools.getSqlToList(querySql);
// }
String querySql = "select id,subcompanyid1,departmentid,workcode,lastname from hrmresource ";
if (!conditions.equals("")){
querySql = querySql+" where "+conditions;
if ("".equals(psersongroup)){
String querySql = "select id,subcompanyid1,departmentid,workcode,lastname from hrmresource ";
if (!conditions.equals("")){
querySql = querySql+" where "+conditions;
}
dataTable = DbTools.getSqlToList(querySql);
}
dataTable = DbTools.getSqlToList(querySql);
}else {
String querySql = "select id,subcompanyid1,departmentid,workcode,lastname from hrmresource ";
if (!conditions.equals("")){
querySql = querySql+" where "+conditions;
if ("".equals(psersongroup)){
String querySql = "select id,subcompanyid1,departmentid,workcode,lastname from hrmresource ";
if (!conditions.equals("")){
querySql = querySql+" where "+conditions;
}
dataTable = DbTools.getSqlToList(querySql);
}
dataTable = DbTools.getSqlToList(querySql);
String sql = "select a.list_type,b.mainid,b.empid,b.filters,b.bdate,b.edate from uf_ryqz a left join uf_ryqz_dt1 b on a.id=b.mainid where a.userfor=5 and a.fzgly=?";
List<Map<String,Object>> personnelGrouping = DbTools.getSqlToList(sql,userId);
@ -184,10 +193,8 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
filters = filters.replace("","or");
sql = "select id,seclevel from hrmresource where "+conditions;
if (filters.contains("field")){
sql = "select a.id from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and scopeid=-1 and "+filters+" and "+conditions;
sql = "select a.id from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and "+filters+" and "+conditions;
}else {
filters = filters.replace("","and");
filters = filters.replace("","or");
sql = sql+ " and "+filters;
}
log.info("getPersonnelGroupingByPerson filter sql : {}",sql);
@ -215,7 +222,6 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
if (endindex > total){
endindex = total;
}
startindex = endindex-pageSize;
if (startindex < 0){
startindex = 0;
}
@ -304,10 +310,17 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
}
public List<Map<String,Object>> getCloumns(int monthDays,String startTime){
BaseBean bb = new BaseBean();
String numberWidth = bb.getPropValue("jclAttendance", "numberWidth");
String nameWidth = bb.getPropValue("jclAttendance", "nameWidth");
String subcompantWidth = bb.getPropValue("jclAttendance", "subcompantWidth");
String departmentWidth = bb.getPropValue("jclAttendance", "departmentWidth");
String classWidth = bb.getPropValue("jclAttendance", "classWidth");
List<Map<String,Object>> cloumns = Lists.newArrayList();
cloumns.add(new HashMap(){{
put("title","编号");
put("width",60);
put("width",numberWidth);
put("dataIndex","workcode");
put("key","workcode");
put("fixed","left");
@ -315,7 +328,7 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
}});
cloumns.add(new HashMap(){{
put("title","姓名");
put("width",40);
put("width",nameWidth);
put("dataIndex","lastname");
put("key","lastname");
put("fixed","left");
@ -323,7 +336,7 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
}});
cloumns.add(new HashMap(){{
put("title","分部");
put("width",50);
put("width",subcompantWidth);
put("dataIndex","subcompany");
put("key","subcompany");
put("fixed","left");
@ -331,7 +344,7 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
}});
cloumns.add(new HashMap(){{
put("title","部门");
put("width",50);
put("width",departmentWidth);
put("dataIndex","department");
put("key","department");
put("fixed","left");
@ -343,7 +356,7 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
map.put("title",i+1);
map.put("dataIndex",DateUtil.AfterDay(startTime,i));
map.put("key",i+1);
map.put("width",50);
map.put("width",classWidth);
map.put("isCalendar",0);
cloumns.add(map);
}

@ -5,10 +5,9 @@ import com.engine.attendance.component.calendarscheduling.service.impl.WorkRules
import com.engine.common.util.ParamUtil;
import com.engine.common.util.ResponseResult;
import com.engine.common.util.ServiceUtil;
import oracle.jdbc.proxy.annotation.Post;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.ws.rs.POST;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.GET;
@ -50,7 +49,7 @@ public class WorkRulesController {
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getReportCollectService(user) :: getDepartSchedule,paramMap);
}
@GET
@POST
@Path("/saveCalendarWork")
@Produces(MediaType.APPLICATION_JSON)
public String saveCalendarWork(@Context HttpServletRequest request, @Context HttpServletResponse response) {

@ -321,10 +321,8 @@ public class PersongroupCommonUtil {
//条件清单
String sql = "select id,seclevel from hrmresource where 1=1 ";
if (filters.contains("field")){
sql = "select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and scopeid=-1 and "+filters;
sql = "select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and "+filters;
}else {
filters = filters.replace("","and");
filters = filters.replace("","or");
sql = sql+ " and "+filters;
}
log.info("getPersonnelGroupingByPerson filter sql : {}",sql);

@ -260,11 +260,11 @@ public class GetPersonDateBySuitOrganzation extends AbstractCommonCommand<Map<St
}else if ("1".equals(list_type) && !"".equals(filters)){
//条件清单
sql = "select id,seclevel from hrmresource where 1=1 ";
filters = filters.replace("","and");
filters = filters.replace("","or");
if (filters.contains("field")){
sql = "select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and scopeid=-1 and "+filters;
sql = "select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and "+filters;
}else {
filters = filters.replace("","and");
filters = filters.replace("","or");
sql = sql+ " and "+filters;
}
log.info("getPersonnelGroupingByPerson filter sql : {}",sql);

@ -414,7 +414,7 @@ public class CommonUtil {
String minSecurityLevel = map.get("minSecurityLevel");
String maxSecurityLevel = map.get("maxSecurityLevel");
//获取分组包含人员id
List<String> empIdsByGroup = getEmpGroupUserIds(id);
Set<String> empIdsByGroup = getEmpGroupUserIds(id);
log.info("empGroupId : " + id + ", empIdsByGroup : " + empIdsByGroup);
//查询目标人员信息
if (empIdsByGroup.size() > 0) {
@ -484,12 +484,12 @@ public class CommonUtil {
* @param empGroupId
* @return id
*/
public static List<String> getEmpGroupUserIds(String empGroupId){
public static Set<String> getEmpGroupUserIds(String empGroupId){
String sql = "select b.mainid,b.empid,b.filters,b.bdate,b.edate,a.list_type from uf_ryqz a left join uf_ryqz_dt1 b on a.id=b.mainid where mainid = " + empGroupId;
List<Map<String,Object>> personGroupDataList = DbTools.getSqlToListKeySmallLetter(sql);
List<String> empIdList = new ArrayList<>();
Set<String> empIdList = Sets.newHashSet();
for (Map<String,Object> personGroupData :personGroupDataList){
String id = Util.null2String(personGroupData.get("mainid"));
String empid = Util.null2String(personGroupData.get("empid"));
@ -502,11 +502,11 @@ public class CommonUtil {
}else if ("1".equals(list_type) && !"".equals(filters)){
//条件清单
sql = "select id,seclevel from hrmresource where 1=1 ";
filters = filters.replace("","and");
filters = filters.replace("","or");
if (filters.contains("field")){
sql = "select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and scopeid=-1 and "+filters;
sql = "select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and "+filters;
}else {
filters = filters.replace("","and");
filters = filters.replace("","or");
sql = sql+ " and "+filters;
}
log.info("getPersonnelGroupingByPerson filter sql : {}",sql);
@ -552,11 +552,11 @@ public class CommonUtil {
empGroupUserInfo.put("listType", PersonGroupListTypeEnum.CONDITION.getKey());
//条件清单
sql = "select id,seclevel from hrmresource where 1=1 ";
filters = filters.replace("","and");
filters = filters.replace("","or");
if (filters.contains("field")){
sql = "select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and scopeid=-1 and "+filters;
sql = "select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and "+filters;
}else {
filters = filters.replace("","and");
filters = filters.replace("","or");
sql = sql+ " and "+filters;
}
log.info("getPersonnelGroupingByPerson filter sql : {}",sql);

@ -17,14 +17,15 @@ public class TestgetDepartSchedule extends beforlog {
public void test2() throws Exception{
Map<String,Object> param = Maps.newHashMap();
param.put("dateTime","2024-06");
param.put("pageSize","10");
param.put("pageSize","20");
param.put("pageindex","1");
param.put("deparment","1");
param.put("type","2");
param.put("deparment","");
param.put("type","0");
param.put("subcompany","");
param.put("employeeIds","");
param.put("employeeIds","23");
param.put("tableName","uf_pbjg");
param.put("total","0");
param.put("total","61");
param.put("psersongroup","8");
User user = new User(1);
Map<String, Object> result =getReportCollectService(user).getDepartSchedule(param);
System.out.println(result);

Loading…
Cancel
Save