| | |
| | | import com.stylefeng.guns.modular.system.service.ITDriverService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.service.ITRegionService; |
| | | import org.apache.commons.io.FileUtils; |
| | | import org.apache.poi.hdf.extractor.TC; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.math.BigDecimal; |
| | | import java.net.URL; |
| | | import java.net.URLConnection; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.Period; |
| | |
| | | @Autowired |
| | | private TCashWithdrawalMapper tCashWithdrawalMapper; |
| | | |
| | | private Logger log = LoggerFactory.getLogger(this.getClass()); |
| | | @Override |
| | | public EntityWrapper<TDriver> getPageList(String createTime, String phone, Integer status) { |
| | | EntityWrapper<TDriver> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public JSONObject ocr(String imgUrl) { |
| | | File file = new File(imgUrl); |
| | | public JSONObject ocr(File file) { |
| | | String result = httpUtils.ocr("2", file); |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | return jsonObject; |
| | | return JSONObject.parseObject(result); |
| | | } |
| | | |
| | | @Override |
| | |
| | | // commissionResp.setAccumulatedCommission(BigDecimal.ZERO); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void getDataStatistics(Integer agentId, Model model,Map<String, Object> map) { |
| | | // 司机总数 |
| | | Integer driverTotal = tDriverMapper.selectCount(new EntityWrapper<TDriver>() |
| | | .eq("agentId", agentId)); |
| | | // 司机最近一月数量 |
| | | LocalDate now = LocalDate.now(); |
| | | LocalDate localDate = now.plusMonths(1); |
| | | Integer driverMonthTotal = tDriverMapper.selectCount(new EntityWrapper<TDriver>() |
| | | .eq("agentId", agentId) |
| | | .between("createTime", localDate, now)); |
| | | model.addAttribute("driverTotal",driverTotal); |
| | | model.addAttribute("driverMonthTotal",driverMonthTotal); |
| | | map.put("driverTotal",driverTotal); |
| | | map.put("driverMonthTotal",driverMonthTotal); |
| | | } |
| | | |
| | | @Override |
| | | public void getDataStatisticsByIds(List<Integer> ids, Model model, Map<String, Object> map) { |
| | | // 司机总数 |
| | | Integer driverTotal = tDriverMapper.selectCount(new EntityWrapper<TDriver>() |
| | | .in("agentId", ids)); |
| | | // 司机最近一月数量 |
| | | LocalDate now = LocalDate.now(); |
| | | LocalDate localDate = now.plusMonths(1); |
| | | Integer driverMonthTotal = tDriverMapper.selectCount(new EntityWrapper<TDriver>() |
| | | .in("agentId", ids) |
| | | .between("createTime", localDate, now)); |
| | | model.addAttribute("driverTotal",driverTotal); |
| | | model.addAttribute("driverMonthTotal",driverMonthTotal); |
| | | map.put("driverTotal",driverTotal); |
| | | map.put("driverMonthTotal",driverMonthTotal); |
| | | } |
| | | } |