| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.attendanceClasses.AttendanceClassesDto; |
| | | import com.java110.dto.attendance.AttendanceClassesDto; |
| | | import com.java110.dto.org.OrgStaffRelDto; |
| | | import com.java110.entity.order.Business; |
| | | import com.java110.dto.system.Business; |
| | | import com.java110.intf.common.IAttendanceClassesInnerServiceSMO; |
| | | import com.java110.intf.user.IOrgStaffRelInnerServiceSMO; |
| | | import com.java110.job.adapt.DatabusAdaptImpl; |
| | | import com.java110.job.adapt.hcIot.asyn.IIotSendAsyn; |
| | | import com.java110.po.attendanceClasses.AttendanceClassesPo; |
| | | import com.java110.po.attendance.AttendanceClassesPo; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | Assert.listOnlyOne(attendanceDtos, "未找到考勤班组"); |
| | | |
| | | //查询考勤组下的员工 |
| | | String classObjType = attendanceDtos.get(0).getClassesObjType(); |
| | | List<JSONObject> staffs = null; |
| | | switch (classObjType) { |
| | | case AttendanceClassesDto.CLASSES_OBJ_TYPE_PARTMENT: |
| | | staffs = getPartmentStaff(attendanceDtos.get(0)); |
| | | break; |
| | | default: |
| | | staffs = new ArrayList<>(); |
| | | } |
| | | // String classObjType = attendanceDtos.get(0).getClassesObjType(); |
| | | // List<JSONObject> staffs = null; |
| | | // switch (classObjType) { |
| | | // case AttendanceClassesDto.CLASSES_OBJ_TYPE_PARTMENT: |
| | | // staffs = getPartmentStaff(attendanceDtos.get(0)); |
| | | // break; |
| | | // default: |
| | | // staffs = new ArrayList<>(); |
| | | // } |
| | | |
| | | |
| | | JSONObject postParameters = new JSONObject(); |
| | |
| | | postParameters.put("extClassesId", attendanceDtos.get(0).getClassesId()); |
| | | postParameters.put("extCommunityId", "-1"); |
| | | postParameters.put("attrs", JSONArray.parseArray(JSONArray.toJSONString(attendanceDtos.get(0).getAttrs()))); |
| | | hcOwnerAttendanceAsynImpl.addAttendance(postParameters, staffs); |
| | | hcOwnerAttendanceAsynImpl.addAttendance(postParameters, null); |
| | | } |
| | | |
| | | private List<JSONObject> getPartmentStaff(AttendanceClassesDto attendanceClassesDto) { |