| | |
| | | package com.ltkj.web.controller.system; |
| | | |
| | | import java.awt.peer.LabelPeer; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | import cn.hutool.core.date.DateUnit; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ltkj.common.annotation.RepeatSubmit; |
| | | import com.ltkj.common.core.domain.entity.SysDept; |
| | |
| | | private ITjOrderService tjOrderService; |
| | | @Autowired |
| | | private TjCustomerMapper tjCustomerMapper; |
| | | @Autowired |
| | | private ISysConfigService sysConfigService; |
| | | |
| | | /** |
| | | * 登录方法 |
| | |
| | | if (loginBody.getMobile()) { |
| | | token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getType(), loginBody.getCode(), loginBody.getUuid()); |
| | | } else { |
| | | token = loginService.Cuslogin(loginBody.getUsername(), loginBody.getPassword(), loginBody.getType(), loginBody.getCode(), loginBody.getUuid()); |
| | | token = loginService.Cuslogin(loginBody.getUsername(),loginBody.getSfzh(), loginBody.getPassword(), loginBody.getType(), loginBody.getCode(), loginBody.getUuid()); |
| | | LambdaQueryWrapper<TjCustomer> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjCustomer::getCusPhone, loginBody.getUsername()); |
| | | wq.eq(TjCustomer::getCusIdcard, loginBody.getSfzh()); |
| | | TjCustomer tjCustomer = customerService.getOne(wq); |
| | | List<Map<String ,Object>> customer = tjCustomerMapper.getCusInfoListByCardAndName(tjCustomer.getCusIdcard(),tjCustomer.getCusName()); |
| | | ajax.put("orderList",customer); |
| | | String key = sysConfigService.selectConfigByKey("h5OrXcxQueryDate"); |
| | | if (StrUtil.isBlank(key)){ |
| | | key = "2025-05-01"; |
| | | } |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | Date date = sdf.parse(key); |
| | | List<Map<String ,Object>> customer = tjCustomerMapper.getCusInfoListByCardAndName(tjCustomer.getCusIdcard(),tjCustomer.getCusName(),date); |
| | | ajax.put("orderList",customer); |
| | | } catch (ParseException e) { |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | if (null == token) { |
| | | return success("该账号正在使用中"); |
| | | return AjaxResult.error("登录失败!"); |
| | | } |
| | | ajax.put(Constants.TOKEN, token); |
| | | return ajax; |