| | |
| | | |
| | | } |
| | | } |
| | | if (user.equals("无")); |
| | | if (!user.equals("无")){ |
| | | QueryWrapper qw = new QueryWrapper<SysUser>(); |
| | | qw.eq("id", user); |
| | | String userName = ((SysUser)((Page) sysUserService.queryPageList(req, qw, 1, 1).getResult()).getRecords().get(0)).getUsername(); |
| | | queryWrapper.eq("create_by", userName); |
| | | } |
| | | if (role.equals("无")); |
| | | else if (role.equals("1972228581703651330")){//销售 |
| | | // else{ |
| | | // if (user.equals("无")){ |
| | |
| | | // 内层 OR 条件:(create_by = 最后一个name AND review_status = 2) |
| | | wrapper.or(w2 -> w2.eq("create_by", name.get(name.size()-1)).eq("review_status", 2)); |
| | | }); |
| | | } |
| | | if (role.equals("1972228688033452034")){//财务 |
| | | queryWrapper.ne("review_status", "8"); |
| | | } |
| | | queryWrapper.orderBy( |
| | | true, // condition:是否启用该排序(true=启用) |
| | |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import opennlp.tools.dictionary.serializer.Entry; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.core.io.ByteArrayResource; |
| | | import org.springframework.http.*; |
| | |
| | | private ICopywritingService copywritingService; |
| | | @Autowired |
| | | private ISemanticWordService semanticWordService;; |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | /** |
| | | * 分页列表查询 |
| | |
| | | @Operation(summary="文案-查询发送门户文章总量") |
| | | @GetMapping(value = "/count") |
| | | public Result<IPage<Copywriting>> count(Copywriting copywriting, |
| | | @RequestParam(name="role", defaultValue="无") String role, |
| | | @RequestParam(name="user", defaultValue="无") String user, |
| | | HttpServletRequest req) { |
| | | |
| | | QueryWrapper<Copywriting> queryWrapper = QueryGenerator.initQueryWrapper(copywriting, req.getParameterMap()); |
| | |
| | | "AND semantic_word.word LIKE '%" + copywriting.getWordLike() + "%'"); |
| | | |
| | | } |
| | | |
| | | if (!user.equals("无")){ |
| | | QueryWrapper qw = new QueryWrapper<SysUser>(); |
| | | qw.eq("id", user); |
| | | String userName = ((SysUser)((Page) sysUserService.queryPageList(req, qw, 1, 1).getResult()).getRecords().get(0)).getUsername(); |
| | | queryWrapper.eq("create_by", userName); |
| | | } |
| | | long count = copywritingService.count(queryWrapper); |
| | | return Result.OK(count+""); |
| | | } |
| | |
| | | |
| | | import org.jeecg.modules.system.controller.SysUserController; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | |
| | | public class CustomerController extends JeecgController<Customer, ICustomerService> { |
| | | @Autowired |
| | | private ICustomerService customerService; |
| | | |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | /** |
| | | * 分页列表查询 |
| | | * |
| | |
| | | @Operation(summary="客户表-查询总客户数") |
| | | @GetMapping(value = "/count") |
| | | public Result<IPage<Customer>> count(Customer customer, |
| | | @RequestParam(name="role", defaultValue="无") String role, |
| | | @RequestParam(name="user", defaultValue="无") String user, |
| | | HttpServletRequest req) { |
| | | if (customer.getAgentsNameToCustomer() != null) { |
| | | // 1. 构建Lambda查询条件,指定查询enterpriseName字段并去重 |
| | |
| | | .collect(Collectors.toList()).toString()); |
| | | } |
| | | QueryWrapper<Customer> queryWrapper = QueryGenerator.initQueryWrapper(customer, req.getParameterMap()); |
| | | |
| | | if (!user.equals("无")){ |
| | | QueryWrapper qw = new QueryWrapper<SysUser>(); |
| | | qw.eq("id", user); |
| | | String userName = ((SysUser)((Page) sysUserService.queryPageList(req, qw, 1, 1).getResult()).getRecords().get(0)).getUsername(); |
| | | queryWrapper.eq("create_by", userName); |
| | | } |
| | | long count = customerService.count(queryWrapper); |
| | | return Result.OK(count+""); |
| | | } |
| | |
| | | |
| | | } |
| | | } |
| | | if (user.equals("无")); |
| | | if (!user.equals("无")){ |
| | | QueryWrapper qw = new QueryWrapper<SysUser>(); |
| | | qw.eq("id", user); |
| | | String userName = ((SysUser)((Page) sysUserService.queryPageList(req, qw, 1, 1).getResult()).getRecords().get(0)).getUsername(); |
| | | queryWrapper.eq("create_by", userName); |
| | | } |
| | | if (role.equals("无")); |
| | | else if (role.equals("1972228581703651330")){//销售 |
| | | // else{ |
| | | // if (user.equals("无")){ |