old mode 100644
new mode 100755
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.attendanceClasses.AttendanceClassesDto; |
| | | import com.java110.entity.order.Business; |
| | | import com.java110.dto.attendance.AttendanceClassesDto; |
| | | 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.constant.StatusConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | |
| | | @Override |
| | | public void execute(Business business, List<Business> businesses) { |
| | | JSONObject data = business.getData(); |
| | | JSONArray businessOwnerAttendances = new JSONArray(); |
| | | if (data.containsKey(AttendanceClassesPo.class.getSimpleName())) { |
| | | Object bObj = data.get(AttendanceClassesPo.class.getSimpleName()); |
| | | JSONArray businessOwnerAttendances = null; |
| | | if (bObj instanceof JSONObject) { |
| | | businessOwnerAttendances = new JSONArray(); |
| | | businessOwnerAttendances.add(bObj); |
| | | } else if (bObj instanceof List) { |
| | | businessOwnerAttendances = JSONArray.parseArray(JSONObject.toJSONString(bObj)); |
| | | } else { |
| | | businessOwnerAttendances = (JSONArray) bObj; |
| | | } |
| | | //JSONObject businessOwnerAttendance = data.getJSONObject("businessOwnerAttendance"); |
| | | for (int bOwnerAttendanceIndex = 0; bOwnerAttendanceIndex < businessOwnerAttendances.size(); bOwnerAttendanceIndex++) { |
| | | JSONObject businessOwnerAttendance = businessOwnerAttendances.getJSONObject(bOwnerAttendanceIndex); |
| | | doSendOwnerAttendance(business, businessOwnerAttendance); |
| | | } else { |
| | | if (data instanceof JSONObject) { |
| | | businessOwnerAttendances.add(data); |
| | | } |
| | | } |
| | | //JSONObject businessOwnerAttendance = data.getJSONObject("businessOwnerAttendance"); |
| | | for (int bOwnerAttendanceIndex = 0; bOwnerAttendanceIndex < businessOwnerAttendances.size(); bOwnerAttendanceIndex++) { |
| | | JSONObject businessOwnerAttendance = businessOwnerAttendances.getJSONObject(bOwnerAttendanceIndex); |
| | | doSendOwnerAttendance(business, businessOwnerAttendance); |
| | | } |
| | | } |
| | | |
| | | private void doSendOwnerAttendance(Business business, JSONObject businessOwnerAttendance) { |