|
|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import io.swagger.annotations.Api;
|
|
|
@@ -24,6 +25,7 @@ import org.jeecg.modules.smscheck.configs.CheckStateCode;
|
|
|
import org.jeecg.modules.smscheck.entity.*;
|
|
|
import org.jeecg.modules.smscheck.service.ISmsCheckCustomerInfoLogService;
|
|
|
import org.jeecg.modules.smscheck.service.ISmsCheckCustomerInfoService;
|
|
|
+import org.jeecg.modules.smscheck.service.ISmsCheckTaskService;
|
|
|
import org.jeecg.modules.smscheck.service.ISmsCheckWorkLogService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -32,8 +34,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.List;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* @author jeecg-boot
|
|
|
@@ -58,6 +59,9 @@ public class SmsCheckCustomerInfoController extends JeecgController<SmsCheckCust
|
|
|
@Autowired
|
|
|
private ISmsCheckCustomerInfoService smsCheckCustomerInfoService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISmsCheckTaskService taskService;
|
|
|
+
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
*
|
|
|
@@ -418,4 +422,61 @@ public class SmsCheckCustomerInfoController extends JeecgController<SmsCheckCust
|
|
|
List<SmsCheckTaskVo> smsCheckTaskVos = smsCheckCustomerInfoService.checkInfoWarningCountStaff(smsCheckCustomerInfo);
|
|
|
return Result.ok(smsCheckTaskVos);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询客户公司
|
|
|
+ * @param smsCheckCustomerInfo
|
|
|
+ * @param pageNo
|
|
|
+ * @param pageSize
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/selectCompanyList")
|
|
|
+ public Result<IPage<SmsCheckCustomerInfo>> selectCompanyList (SmsCheckCustomerInfo smsCheckCustomerInfo,
|
|
|
+ @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
+ @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize){
|
|
|
+ List<SmsCheckCustomerInfo> smsCheckCustomerInfos = smsCheckCustomerInfoService.selectCompanyList(smsCheckCustomerInfo);
|
|
|
+ Page<SmsCheckCustomerInfo> page = new Page<>();
|
|
|
+ page.setRecords(smsCheckCustomerInfos);
|
|
|
+ return Result.ok(page);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取稽核任务
|
|
|
+ * @param smsCheckCustomerInfo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/selectTaskList")
|
|
|
+ public Result<IPage<SmsCheckTask>> selectTaskList (SmsCheckCustomerInfo smsCheckCustomerInfo,
|
|
|
+ @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
+ @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize){
|
|
|
+ Set<String> TaskIdSet = this.selectTaskId(smsCheckCustomerInfo);
|
|
|
+ ArrayList<SmsCheckTask> list = new ArrayList<>();
|
|
|
+ for (String taskId: TaskIdSet) {
|
|
|
+ list.add(taskService.getById(taskId));
|
|
|
+ }
|
|
|
+ return Result.ok(new Page<SmsCheckTask>(pageNo,pageSize).setRecords(list));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取稽核任务id
|
|
|
+ * @param smsCheckCustomerInfo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private Set<String> selectTaskId(SmsCheckCustomerInfo smsCheckCustomerInfo){
|
|
|
+ QueryWrapper<SmsCheckCustomerInfo> queryWrapper = new QueryWrapper<>();
|
|
|
+ String customerNo = smsCheckCustomerInfo.getCustomerNo();
|
|
|
+ String customerName = smsCheckCustomerInfo.getCustomerName();
|
|
|
+ if (!StringUtils.isEmpty(customerNo)){
|
|
|
+ queryWrapper.eq("customer_no",customerNo);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(customerName)){
|
|
|
+ queryWrapper.eq("customer_name",customerName);
|
|
|
+ }
|
|
|
+ List<SmsCheckCustomerInfo> list = smsCheckCustomerInfoService.getBaseMapper().selectList(queryWrapper);
|
|
|
+ Set<String> set = new HashSet<>();
|
|
|
+ for (SmsCheckCustomerInfo info:list) {
|
|
|
+ set.add(info.getTaskId());
|
|
|
+ }
|
|
|
+ return set;
|
|
|
+ }
|
|
|
}
|