|
@@ -20,8 +20,10 @@ import com.jeeplus.modules.sys.entity.HpMember;
|
|
|
import com.jeeplus.modules.sys.service.HpMemberService;
|
|
import com.jeeplus.modules.sys.service.HpMemberService;
|
|
|
import com.jeeplus.modules.sys.utils.businessAccountUtils;
|
|
import com.jeeplus.modules.sys.utils.businessAccountUtils;
|
|
|
import com.jeeplus.modules.sys.wxUtils.TokenUtil;
|
|
import com.jeeplus.modules.sys.wxUtils.TokenUtil;
|
|
|
|
|
+import com.jeeplus.modules.wscompany.entity.WsCompany;
|
|
|
import com.jeeplus.modules.wscompany.entity.WsCompanyFence;
|
|
import com.jeeplus.modules.wscompany.entity.WsCompanyFence;
|
|
|
import com.jeeplus.modules.wscompany.service.WsCompanyFenceService;
|
|
import com.jeeplus.modules.wscompany.service.WsCompanyFenceService;
|
|
|
|
|
+import com.jeeplus.modules.wscompany.service.WsCompanyService;
|
|
|
import com.jeeplus.modules.wssetting.entity.WsSetting;
|
|
import com.jeeplus.modules.wssetting.entity.WsSetting;
|
|
|
import com.jeeplus.modules.wssetting.service.WsSettingService;
|
|
import com.jeeplus.modules.wssetting.service.WsSettingService;
|
|
|
import net.sf.json.JSONArray;
|
|
import net.sf.json.JSONArray;
|
|
@@ -52,6 +54,8 @@ public class WsPunchClockService extends CrudService<WsPunchClockMapper, WsPunch
|
|
|
private HpMemberService hpMemberService;
|
|
private HpMemberService hpMemberService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private WsCompanyFenceService wsCompanyFenceService;
|
|
private WsCompanyFenceService wsCompanyFenceService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private WsCompanyService wsCompanyService;
|
|
|
|
|
|
|
|
public WsPunchClock get(String id) {
|
|
public WsPunchClock get(String id) {
|
|
|
return super.get(id);
|
|
return super.get(id);
|
|
@@ -250,6 +254,13 @@ public class WsPunchClockService extends CrudService<WsPunchClockMapper, WsPunch
|
|
|
return mapper.getListByMemberId(memberId);
|
|
return mapper.getListByMemberId(memberId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 3.4.5版本不再考虑最大工时相关
|
|
|
|
|
+ * @param requestMap
|
|
|
|
|
+ * @param request
|
|
|
|
|
+ * @param response
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
@Transactional(readOnly = false)
|
|
@Transactional(readOnly = false)
|
|
|
public Map<String,Object> savePunchClock(Map<String,String> requestMap, HttpServletRequest request, HttpServletResponse response) {
|
|
public Map<String,Object> savePunchClock(Map<String,String> requestMap, HttpServletRequest request, HttpServletResponse response) {
|
|
|
Map<String, Object> returnMap = new HashMap<String, Object>();
|
|
Map<String, Object> returnMap = new HashMap<String, Object>();
|
|
@@ -290,6 +301,9 @@ public class WsPunchClockService extends CrudService<WsPunchClockMapper, WsPunch
|
|
|
wsPunchClock.setEndPunchLongitude(longitude);
|
|
wsPunchClock.setEndPunchLongitude(longitude);
|
|
|
wsPunchClock.setEndPunchLatitude(latitude);
|
|
wsPunchClock.setEndPunchLatitude(latitude);
|
|
|
wsPunchClock.setDuration(hour);
|
|
wsPunchClock.setDuration(hour);
|
|
|
|
|
+ WsCompany wsCompany=wsCompanyService.get(wsCompanyFenceList.get(i).getCompanyId());
|
|
|
|
|
+ wsPunchClock.setCompanyName(wsCompany.getCompanyName());
|
|
|
|
|
+ wsPunchClock.setFenceName(wsCompanyFenceList.get(i).getFenceName());
|
|
|
returnMap.put("startPunchClock", wsPunchClock.getStartPunchClock()); //上班卡时间
|
|
returnMap.put("startPunchClock", wsPunchClock.getStartPunchClock()); //上班卡时间
|
|
|
returnMap.put("endPunchClock", wsPunchClock.getEndPunchClock()); //下班卡时间
|
|
returnMap.put("endPunchClock", wsPunchClock.getEndPunchClock()); //下班卡时间
|
|
|
save(wsPunchClock);
|
|
save(wsPunchClock);
|
|
@@ -313,8 +327,10 @@ public class WsPunchClockService extends CrudService<WsPunchClockMapper, WsPunch
|
|
|
}else{
|
|
}else{
|
|
|
todayMoney=businessAccountUtils.add(todayMoney,wsSetting.getDailyAvailableMaxHour()*wsSetting.getHourlySalary());
|
|
todayMoney=businessAccountUtils.add(todayMoney,wsSetting.getDailyAvailableMaxHour()*wsSetting.getHourlySalary());
|
|
|
}
|
|
}
|
|
|
|
|
+ //3.4.5版本不在使用此参数
|
|
|
returnMap.put("todayMoney",todayMoney);
|
|
returnMap.put("todayMoney",todayMoney);
|
|
|
}else{
|
|
}else{
|
|
|
|
|
+ //3.4.5版本不在使用此参数
|
|
|
returnMap.put("todayMoney",todayMoney);
|
|
returnMap.put("todayMoney",todayMoney);
|
|
|
}
|
|
}
|
|
|
returnMap.put("duration",wsPunchClock.getDuration());
|
|
returnMap.put("duration",wsPunchClock.getDuration());
|
|
@@ -341,6 +357,9 @@ public class WsPunchClockService extends CrudService<WsPunchClockMapper, WsPunch
|
|
|
wsPunchClock.setStartPunchLongitude(longitude);
|
|
wsPunchClock.setStartPunchLongitude(longitude);
|
|
|
wsPunchClock.setStartPunchLatitude(latitude);
|
|
wsPunchClock.setStartPunchLatitude(latitude);
|
|
|
wsPunchClock.setStartPunchClock(new Date());
|
|
wsPunchClock.setStartPunchClock(new Date());
|
|
|
|
|
+ WsCompany wsCompany=wsCompanyService.get(wsCompanyFence.getCompanyId());
|
|
|
|
|
+ wsPunchClock.setCompanyName(wsCompany.getCompanyName());
|
|
|
|
|
+ wsPunchClock.setFenceName(wsCompanyFence.getFenceName());
|
|
|
save(wsPunchClock);
|
|
save(wsPunchClock);
|
|
|
returnMap.put("startPunchClock", wsPunchClock.getStartPunchClock()); //上班卡时间
|
|
returnMap.put("startPunchClock", wsPunchClock.getStartPunchClock()); //上班卡时间
|
|
|
distanceTrue=true;
|
|
distanceTrue=true;
|
|
@@ -368,6 +387,7 @@ public class WsPunchClockService extends CrudService<WsPunchClockMapper, WsPunch
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ //3.4.5版本不在使用此参数
|
|
|
returnMap.put("sumMoney", sumMoney);
|
|
returnMap.put("sumMoney", sumMoney);
|
|
|
} else {
|
|
} else {
|
|
|
returnMap.put("success", "1004");
|
|
returnMap.put("success", "1004");
|