Merge remote-tracking branch 'origin/zycrm' into zycrm
| | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.core.common.*; |
| | | import com.core.domain.KeyValueVo; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.crm.common.model.SettleDto; |
| | |
| | | }); |
| | | } |
| | | |
| | | @RequestMapping(value = "/plan/assistantPlan/view/auth") |
| | | @ManagerAuth(memo = "查看副规划申请单") |
| | | @Transactional |
| | | public R assistantPlanView(@RequestParam Long hostPlanId) { |
| | | Plan plan = planService.selectById(hostPlanId); |
| | | if (plan.getAssistantHostSign()==1){ |
| | | EntityWrapper<Plan> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("id",plan.getHostPlanId()); |
| | | Page<Plan> planPage = planService.selectPage(new Page<>(1, 1), wrapper); |
| | | return R.ok(planPage); |
| | | } |
| | | EntityWrapper<Plan> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("id",plan.getAssistantPlanId()); |
| | | Page<Plan> planPage = planService.selectPage(new Page<>(1, 1), wrapper); |
| | | return R.ok(planPage); |
| | | } |
| | | |
| | | @RequestMapping(value = "/plan/add/auth") |
| | | @ManagerAuth(memo = "添加规划申请单") |
| | | @Transactional |
| | |
| | | manager = getUser(); |
| | | } |
| | | PlanType planType = planTypeService.selectById(plan.getPlanType()); |
| | | if (planType.getType().equals(2)) { |
| | | plan.setStatus2(0); |
| | | }else { |
| | | plan.setStatus2(10); |
| | | } |
| | | User planLeader = planTypeService.findPlanLeader(planType); |
| | | plan.setSettleMsg(JSON.toJSONString(SettleDto.init(plan, manager, planLeader))); |
| | | |
| | |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/plan/assistantPlan/add/auth") |
| | | @ManagerAuth(memo = "添加副规划申请单") |
| | | @Transactional |
| | | public R assistantPlanAdd(@RequestParam Long hostPlanId) { |
| | | Plan hostPlan = planService.selectById(hostPlanId); |
| | | if (hostPlan.getAssistantHostSign()!=0){ |
| | | return R.error("此规划单不需要创建副流程"); |
| | | } |
| | | PlanType planType2 = planTypeService.selectById(hostPlan.getPlanType()); |
| | | if (planType2.getType()!=2){ |
| | | return R.error("此规划单不需要创建副流程"); |
| | | } |
| | | if (!Cools.isEmpty(hostPlan.getAssistantPlanId()) && hostPlan.getAssistantPlanId()!=0){ |
| | | return R.error("此规划单已存在副规划单,id为"+hostPlan.getAssistantPlanId()); |
| | | } |
| | | // pre |
| | | Plan plan = new Plan(hostPlan); |
| | | // begin |
| | | Long hostId = getHostId(); |
| | | if (planService.selectByUuid(hostId, plan.getUuid()) != null) { |
| | | throw new CoolException("规划单已存在"); |
| | | } |
| | | |
| | | Order order = orderService.selectById(plan.getOrderId()); |
| | | if (Cools.isEmpty(order)) { |
| | | throw new CoolException("跟踪项目不存在"); |
| | | } |
| | | |
| | | if (!order.getDirector().equals(getUserId())){ |
| | | throw new CoolException("只允许跟踪项目负责人添加所选项目规划申请单"); |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | plan.setHostId(hostId); |
| | | plan.setUuid(planService.getUuid(hostId)); // 规划单代号 |
| | | plan.setDeptId(getDeptId()); // 所属部门 |
| | | plan.setUserId(getUserId()); // 所属人员 |
| | | |
| | | plan.setAppleTime(now); |
| | | plan.setCreateBy(getUserId()); |
| | | plan.setCreateTime(now); |
| | | plan.setUpdateBy(getUserId()); |
| | | plan.setUpdateTime(now); |
| | | plan.setStatus(0); |
| | | plan.setStatus2(0); |
| | | plan.setStep(1); |
| | | plan.setSettle(1); // 1.开始 |
| | | plan.setAssistantHostSign(1);//副规划单 |
| | | |
| | | User manager = new User(); |
| | | try{ |
| | | manager = userService.getDeptManager(getHostId(), getUser().getDeptId()); // 获取部门领导 |
| | | }catch (Exception e){ |
| | | manager = getUser(); |
| | | } |
| | | PlanType planType = new PlanType(hostPlan.getHostId(),1);//1:货架 |
| | | User planLeader = planTypeService.findPlanLeader(planType); |
| | | plan.setSettleMsg(JSON.toJSONString(SettleDto.init(plan, manager, planLeader))); |
| | | |
| | | plan.setDirector(planLeader.getId()); |
| | | |
| | | if (!planService.insert(plan)) { |
| | | throw new CoolException("保存失败,请重试"); |
| | | } |
| | | plan.setAssistantPlanId(plan.getId()); |
| | | plan.setHostPlanId(hostPlanId); |
| | | if (!planService.updateById(plan)) { |
| | | throw new CoolException("更新失败,请重试"); |
| | | } |
| | | // 自动添加跟进人 |
| | | PlanFoll planFoll = new PlanFoll(); |
| | | planFoll.setPlanId(plan.getId()); |
| | | planFoll.setUserId(planLeader.getId()); |
| | | if (!planFollService.insert(planFoll)) { |
| | | throw new CoolException("保存失败,请重试"); |
| | | } |
| | | |
| | | hostPlan.setAssistantPlanId(plan.getId()); |
| | | hostPlan.setHostPlanId(hostPlanId); |
| | | if (!planService.updateById(hostPlan)) { |
| | | throw new CoolException("更新失败,请重试"); |
| | | } |
| | | return R.ok("保存成功"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/plan/update/auth") |
| | |
| | | int priOnline2 = priOnline2Service.selectCount(new EntityWrapper<PriOnline2>().eq("item_id", id)); |
| | | if (priOnline2!=0){ |
| | | return R.error("存在关联的核价单,禁止删除!!!"); |
| | | } |
| | | Plan planA = planService.selectById(id); |
| | | if (planA.getAssistantHostSign()==1){ |
| | | Plan planB = planService.selectById(planA.getHostPlanId()); |
| | | planB.setAssistantPlanId(0L); |
| | | planB.setHostPlanId(0L); |
| | | planB.setStatus2(0); |
| | | planService.updateById(planB); |
| | | }else { |
| | | if (!Cools.isEmpty(planA.getAssistantPlanId()) && planA.getAssistantPlanId()!=0){ |
| | | Plan planB = planService.selectById(planA.getAssistantPlanId()); |
| | | if (!Cools.isEmpty(planB)){ |
| | | return R.error("存在关联的副规划单,禁止删除!!! 副规划单ID:"+planB.getId()); |
| | | } |
| | | } |
| | | } |
| | | planService.deleteById(id); |
| | | } |
| | |
| | | // break; |
| | | case 1: |
| | | // 查找规划组长 |
| | | PlanType planType = planTypeService.selectById(plan.getPlanType()); |
| | | User planLeader = planTypeService.findPlanLeader(planType); |
| | | User planLeader = userService.selectById(plan.getDirector()); |
| | | if (Cools.isEmpty(planLeader)) { |
| | | throw new CoolException("未查找到规划组长,请联系管理员"); |
| | | } |
| | |
| | | plan.setUpdateBy(getUserId()); |
| | | plan.setUpdateTime(new Date()); |
| | | |
| | | if (plan.getAssistantHostSign()==1){ |
| | | Plan planHost = planService.selectById(plan.getHostPlanId()); |
| | | planHost.setStatus2(1); |
| | | planService.updateById(planHost); |
| | | } |
| | | |
| | | if (!planService.updateById(plan)) { |
| | | throw new CoolException("审核失败,请联系管理员"); |
| | | } |
| | |
| | | } |
| | | // 查找规划组长 |
| | | PlanType planType = planTypeService.selectById(plan.getPlanType()); |
| | | if (plan.getAssistantHostSign()==1){ |
| | | planType.setType(1); |
| | | } |
| | | User planLeader = planTypeService.findPlanLeader(planType); |
| | | if (Cools.isEmpty(planLeader)) { |
| | | throw new CoolException("未查找到规划组长,请联系管理员"); |
| | |
| | | EntityWrapper<Plan> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("name", condition); |
| | | wrapper.eq("status",1); |
| | | wrapper.eq("assistant_host_sign",0); |
| | | |
| | | List<ProcessPermissions> processPermissionsList = processPermissionsService.selectList(new EntityWrapper<ProcessPermissions>().eq("process_memo", 4).or().eq("process_memo", 5));//2:核价流程 |
| | | int type =0; |
| | |
| | | map.put("value", plan.getName()); |
| | | result.add(map); |
| | | } |
| | | if (type==1){ |
| | | EntityWrapper<Plan> wrapper2 = new EntityWrapper<>(); |
| | | wrapper2.like("name", condition); |
| | | wrapper2.eq("status",1); |
| | | wrapper2.eq("assistant_host_sign",1); |
| | | List<Plan> plan2s = planService.selectList(wrapper2); |
| | | for (Plan plan : plan2s){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", plan.getId()); |
| | | // map.put("value", plan.getName()+"---"+plan.getId()); |
| | | map.put("value", plan.getName()); |
| | | result.add(map); |
| | | } |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | |
| | | @Autowired |
| | | private UserService userService; |
| | | |
| | | @Autowired |
| | | private PriOnline2FollService priOnline2FollService; |
| | | |
| | | String PZH = " ———————————————————————————————————————————————————————————————————————————————— "; |
| | | |
| | | @RequestMapping(value = "/priOnline2/{id}/auth") |
| | |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam(required = false) String allSwitch, |
| | | @RequestParam(required = false) String condition, |
| | | @RequestParam Map<String, Object> param) { |
| | | @RequestParam Map<String, Object> paramSou) { |
| | | EntityWrapper<PriOnline2> wrapper = new EntityWrapper<>(); |
| | | wrapper.setSqlSelect("id,title,create_time as createTime,filepath,settle,settle_size as settleSize,item_id as itemId,order_num as orderNum,template_name as templateName,user_id as userId,dept_id as deptId,status,update_time as updateTime,check_data as checkData,update_user_id as updateUserId,member_id as memberId"); |
| | | wrapper.setSqlSelect("id,title,create_time as createTime,assistant_plan_id as assistantPlanId,host_plan_id as hostPlanId,assistant_host_sign as assistantHostSign,filepath,settle,settle_size as settleSize,item_id as itemId,order_num as orderNum,template_name as templateName,user_id as userId,dept_id as deptId,status,update_time as updateTime,check_data as checkData,update_user_id as updateUserId,member_id as memberId"); |
| | | // wrapper.in("member_id", getUserRoleBelongsToUserId("allopen")); |
| | | excludeTrash(param); |
| | | excludeTrash(paramSou); |
| | | Map<String, Object> param = convertallSwitch(paramSou); |
| | | |
| | | if (!Cools.isEmpty(allSwitch)){ |
| | | List<PriOnline2> priOnline2List = priOnline2Service.listByAll(getUserId()); |
| | | Page<PriOnline2> page1 = new Page<PriOnline2>(curr, limit).setRecords(priOnline2List); |
| | | page1.setTotal(priOnline2Service.listByAllTotal(getUserId())); |
| | | return R.ok(page1); |
| | | } |
| | | |
| | | convert(param, wrapper); |
| | | allLike(PriOnline2.class, param.keySet(), wrapper, condition); |
| | | wrapper.or().eq("member_id", getUserId()); |
| | |
| | | return R.ok(priOnline2Service.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private Map<String, Object> convertallSwitch(Map<String, Object> map) { |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | if (entry.getKey().equals("allSwitch")) { |
| | | map.remove("allSwitch"); |
| | | } |
| | | } |
| | | return map; |
| | | } |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper) { |
| | | boolean signUserId = false; |
| | | boolean signDeptId = false; |
| | |
| | | wrapper.or().eq("host_id", 1); |
| | | } |
| | | } |
| | | @RequestMapping(value = "/priOnline2/HJ/add/auth") |
| | | @ManagerAuth(memo = "接取集成核价任务") |
| | | public R addHJ(PriOnline2 priOnline2) { |
| | | PriOnline2 priOnline21 = priOnline2Service.selectById(priOnline2.getId()); |
| | | if (priOnline21.getSettle()!=1 || !priOnline21.getMemberId().equals(0L)){ |
| | | return R.error("此集成核价单状态已改变,请刷新页面重新选择!"); |
| | | } |
| | | Date now = new Date(); |
| | | priOnline21.setMemberId(getUserId()); |
| | | // @RequestMapping(value = "/priOnline2/HJ/add/auth") |
| | | // @ManagerAuth(memo = "接取集成核价任务") |
| | | // public R addHJ(PriOnline2 priOnline2) { |
| | | // PriOnline2 priOnline21 = priOnline2Service.selectById(priOnline2.getId()); |
| | | // if (priOnline21.getSettle()!=1 || !priOnline21.getMemberId().equals(0L)){ |
| | | // return R.error("此集成核价单状态已改变,请刷新页面重新选择!"); |
| | | // } |
| | | // Date now = new Date(); |
| | | // priOnline21.setMemberId(getUserId()); |
| | | // |
| | | // |
| | | // List<SettleDto> planDtos = JSON.parseArray(priOnline21.getSettleMsg(), SettleDto.class); |
| | | // List<SettleDto> planDtoList = new ArrayList<>(); |
| | | // for (SettleDto dto : planDtos) { |
| | | // if (dto.getStep().equals(2)) { |
| | | // dto.setUserId(getUserId()); |
| | | // dto.setUsername(getUser().getNickname()); |
| | | // if (Cools.isEmpty(dto.getMsg())) { |
| | | // dto.setMsg(getUser().getNickname() + "接取核价"); |
| | | // } else { |
| | | // dto.setMsg(dto.getMsg() + PZH + DateUtils.convert(now) + " " + getUser().getNickname() + "接取核价"); |
| | | // } |
| | | // dto.setTime(DateUtils.convert(new Date())); |
| | | // } |
| | | // planDtoList.add(dto); |
| | | // } |
| | | // priOnline21.setSettleMsg(JSON.toJSONString(planDtoList)); |
| | | // priOnline21.setUpdateUserId(getUserId()); |
| | | // priOnline21.setUpdateTime(now); |
| | | // priOnline2Service.updateById(priOnline21); |
| | | // return R.ok("接取成功"); |
| | | // } |
| | | |
| | | |
| | | List<SettleDto> planDtos = JSON.parseArray(priOnline21.getSettleMsg(), SettleDto.class); |
| | | List<SettleDto> planDtoList = new ArrayList<>(); |
| | | for (SettleDto dto : planDtos) { |
| | | if (dto.getStep().equals(2)) { |
| | | dto.setUserId(getUserId()); |
| | | dto.setUsername(getUser().getNickname()); |
| | | if (Cools.isEmpty(dto.getMsg())) { |
| | | dto.setMsg(getUser().getNickname() + "接取核价"); |
| | | } else { |
| | | dto.setMsg(dto.getMsg() + PZH + DateUtils.convert(now) + " " + getUser().getNickname() + "接取核价"); |
| | | } |
| | | dto.setTime(DateUtils.convert(new Date())); |
| | | } |
| | | planDtoList.add(dto); |
| | | } |
| | | priOnline21.setSettleMsg(JSON.toJSONString(planDtoList)); |
| | | priOnline21.setUpdateUserId(getUserId()); |
| | | priOnline21.setUpdateTime(now); |
| | | priOnline2Service.updateById(priOnline21); |
| | | return R.ok("接取成功"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/priOnline2/HJ/search/auth") |
| | | @ManagerAuth |
| | | public R priOnline2Search(String condition) { |
| | | EntityWrapper<PriOnline2> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("template_name", condition); |
| | | wrapper.eq("member_id",0L); |
| | | |
| | | List<ProcessPermissions> processPermissionsList = processPermissionsService.selectList(new EntityWrapper<ProcessPermissions>().eq("process_memo", 5));//2:核价流程 |
| | | int type =0; |
| | | for (ProcessPermissions processPermissions:processPermissionsList){ |
| | | if (getUserId().equals(processPermissions.getUserId())){ |
| | | type=1; |
| | | break; |
| | | } |
| | | } |
| | | if (type==0){ |
| | | return R.error("你不是核价员,无权接任务"); |
| | | } |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | |
| | | List<PriOnline2> priOnline2s = priOnline2Service.selectList(wrapper); |
| | | for (PriOnline2 priOnline2 : priOnline2s){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", priOnline2.getId()); |
| | | map.put("name", priOnline2.getTemplateName()+" - ID:"+priOnline2.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | // @RequestMapping(value = "/priOnline2/HJ/search/auth") |
| | | // @ManagerAuth |
| | | // public R priOnline2Search(String condition) { |
| | | // EntityWrapper<PriOnline2> wrapper = new EntityWrapper<>(); |
| | | // wrapper.like("template_name", condition); |
| | | // wrapper.eq("member_id",0L); |
| | | // |
| | | // List<ProcessPermissions> processPermissionsList = processPermissionsService.selectList(new EntityWrapper<ProcessPermissions>().eq("process_memo", 5));//2:核价流程 |
| | | // int type =0; |
| | | // for (ProcessPermissions processPermissions:processPermissionsList){ |
| | | // if (getUserId().equals(processPermissions.getUserId())){ |
| | | // type=1; |
| | | // break; |
| | | // } |
| | | // } |
| | | // if (type==0){ |
| | | // return R.error("你不是核价员,无权接任务"); |
| | | // } |
| | | // List<Map<String, Object>> result = new ArrayList<>(); |
| | | // |
| | | // List<PriOnline2> priOnline2s = priOnline2Service.selectList(wrapper); |
| | | // for (PriOnline2 priOnline2 : priOnline2s){ |
| | | // Map<String, Object> map = new HashMap<>(); |
| | | // map.put("id", priOnline2.getId()); |
| | | // map.put("name", priOnline2.getTemplateName()+" - ID:"+priOnline2.getId()); |
| | | // result.add(map); |
| | | // } |
| | | // return R.ok(result); |
| | | // } |
| | | |
| | | |
| | | @RequestMapping(value = "/priOnline2/add/auth") |
| | |
| | | // Item item = itemService.selectById(priOnline.getItemId()); |
| | | Plan plan = planService.selectById(priOnline2.getItemId()); |
| | | User userUp = userService.selectById(plan.getUserId()); |
| | | priOnline2.setAssistantHostSign(plan.getAssistantHostSign()); |
| | | priOnline2.setAssistantPlanId(plan.getAssistantPlanId()); |
| | | priOnline2.setHostPlanId(plan.getHostPlanId()); |
| | | |
| | | |
| | | //业务员 |
| | | priOnline2.setUserId(userUp.getId()); |
| | |
| | | List<String> initNames = new ArrayList<>(); |
| | | initNames.add("接取核价任务"); |
| | | initNames.add("完成核价"); |
| | | if (planType.getType().equals(2)) { |
| | | initNames.add("完成核价"); |
| | | } |
| | | // initNames.add("经理审核"); |
| | | initNames.add("业务员确认"); |
| | | List<User> users = new ArrayList<>(); |
| | | users.add(getUser()); |
| | | users.add(getUser()); |
| | | if (planType.getType().equals(2)) { |
| | | users.add(new User()); |
| | | } |
| | | users.add(userUp); |
| | | priOnline2.setSettleMsg(JSON.toJSONString(SettleDto.InItFlowPath(users, initNames, users.size()))); |
| | | priOnline2.setSettleSize(users.size()); |
| | |
| | | planService.updateById(plan); |
| | | |
| | | priOnline2Service.insert(priOnline2); |
| | | |
| | | // 自动添加跟进人 |
| | | for (User user:users){ |
| | | List<PriOnline2Foll> priOnline2Folls = priOnline2FollService.selectList(new EntityWrapper<PriOnline2Foll>().eq("pri_online2_id", plan.getId()).eq("user_id", user.getId())); |
| | | if (Cools.isEmpty(priOnline2Folls) || priOnline2Folls.size()==0){ |
| | | PriOnline2Foll priOnline2Foll = new PriOnline2Foll(); |
| | | priOnline2Foll.setPriOnline2Id(plan.getId()); |
| | | priOnline2Foll.setUserId(user.getId()); |
| | | if (!priOnline2FollService.insert(priOnline2Foll)) { |
| | | throw new CoolException("保存失败,请重试"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | if (plan.getAssistantHostSign()==1){ |
| | | Plan plan1 = planService.selectById(plan.getHostPlanId()); |
| | | plan1.setStatus2(2); |
| | | planService.updateById(plan1); |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/priOnline2/addOther/auth") |
| | | @ManagerAuth(memo = "另存核价管理") |
| | | public R addOther(@RequestBody Map<String, Object> map) { |
| | | if (true){ |
| | | return R.error("禁止!"); |
| | | } |
| | | PriOnline2 online = priOnline2Service.selectById(Long.parseLong(map.get("id").toString())); |
| | | |
| | | PriOnline2 priOnline2 = new PriOnline2(); |
| | |
| | | Plan plan = planService.selectById(priOnline2.getItemId()); |
| | | plan.setStatus(1); |
| | | planService.updateById(plan); |
| | | if (plan.getAssistantHostSign()==1){ |
| | | Plan planHost = planService.selectById(priOnline2.getHostPlanId()); |
| | | planHost.setStatus2(1); |
| | | planService.updateById(planHost); |
| | | } |
| | | } |
| | | |
| | | priOnline2Service.deleteBatchIds(Arrays.asList(ids)); |
| | |
| | | if (!priOnline2Service.updateById(priOnline2)) { |
| | | throw new CoolException("确认失败,请联系管理员"); |
| | | } |
| | | |
| | | Plan plan = planService.selectById(priOnline2.getItemId()); |
| | | plan.setStatus(3); |
| | | planService.selectById(plan); |
| | | |
| | | if (user.getId().equals(priOnline2.getUserId())) { |
| | | try { |
| | | priQuoteAdd(priOnline2.getId(), plannerId); |
| | | } catch (Exception e) { |
| | | return R.error("自动生成报价单失败"); |
| | | if (priOnline2.getAssistantHostSign()==0){ |
| | | try { |
| | | priQuoteAdd(priOnline2.getId(), plannerId); |
| | | } catch (Exception e) { |
| | | return R.error("自动生成报价单失败"); |
| | | } |
| | | }else { |
| | | try { |
| | | Plan planHost = planService.selectById(priOnline2.getHostPlanId()); |
| | | planHost.setStatus2(3); |
| | | planService.selectById(planHost); |
| | | } catch (Exception e) { |
| | | return R.error("更新主表失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | return R.ok("审批成功"); |
| | |
| | | } |
| | | |
| | | ProcessPermissions processPermissions3 = processPermissionsService.selectOne(new EntityWrapper<ProcessPermissions>().eq("process_memo", 3).eq("process", param.getCheckData().equals("否")? "3-1" : "3-2"));//3:报销流程 |
| | | User president3 = userService.selectById(processPermissions3.getUserId()); // 获取报价流程节点3确认人 |
| | | User president3 = userService.selectById(processPermissions3.getUserId()); // 获取流程节点3确认人 |
| | | |
| | | ProcessPermissions processPermissions4 = processPermissionsService.selectOne(new EntityWrapper<ProcessPermissions>().eq("process_memo", 3).eq("process", "4-1"));//3:报销流程 |
| | | User president4 = userService.selectById(processPermissions4.getUserId()); // 获取报价流程节点4确认人 |
| | | User president4 = userService.selectById(processPermissions4.getUserId()); // 获取流程节点4确认人 |
| | | |
| | | ProcessPermissions processPermissions5 = processPermissionsService.selectOne(new EntityWrapper<ProcessPermissions>().eq("process_memo", 3).eq("process", "5-1"));//3:报销流程 |
| | | User president5 = userService.selectById(processPermissions5.getUserId()); // 获取报价流程节点5确认人 |
| | | User president5 = userService.selectById(processPermissions5.getUserId()); // 获取流程节点5确认人 |
| | | |
| | | ProcessPermissions processPermissions6 = processPermissionsService.selectOne(new EntityWrapper<ProcessPermissions>().eq("process_memo", 3).eq("process", "6-1"));//3:报销流程 |
| | | User president6 = userService.selectById(processPermissions6.getUserId()); // 获取报价流程节点6确认人 |
| | | User president6 = userService.selectById(processPermissions6.getUserId()); // 获取流程节点6确认人 |
| | | |
| | | reimburseOnline.setSettleMsg(JSON.toJSONString(SettleDto.initPriQuote(reimburseOnline, manager,president3,president4,president5,president6,getUser()))); |
| | | reimburseOnline.setMemberId(manager.getId()); |
New file |
| | |
| | | package com.zy.crm.manager.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import com.zy.crm.system.entity.User; |
| | | import com.zy.crm.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("man_all_foll") |
| | | public class AllFoll implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 规划单 |
| | | */ |
| | | @ApiModelProperty(value= "规划单") |
| | | @TableField("plan_id") |
| | | private Long planId; |
| | | |
| | | /** |
| | | * 跟进人 |
| | | */ |
| | | @ApiModelProperty(value= "跟进人") |
| | | @TableField("user_id") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * memo |
| | | */ |
| | | @ApiModelProperty(value= "表类") |
| | | @TableField("memo") |
| | | private Long memo; |
| | | |
| | | public AllFoll() {} |
| | | |
| | | public AllFoll(Long planId, Long userId) { |
| | | this.planId = planId; |
| | | this.userId = userId; |
| | | } |
| | | |
| | | // PlanFoll planFoll = new PlanFoll( |
| | | // null, // 规划单 |
| | | // null // 跟进人[非空] |
| | | // ); |
| | | |
| | | public String getPlanId$(){ |
| | | PlanService service = SpringUtils.getBean(PlanService.class); |
| | | Plan plan = service.selectById(this.planId); |
| | | if (!Cools.isEmpty(plan)){ |
| | | return String.valueOf(plan.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUserId$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.userId); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @ApiModelProperty(value = "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 所属商户 |
| | | */ |
| | | @ApiModelProperty(value= "所属商户") |
| | | @ApiModelProperty(value = "所属商户") |
| | | @TableField("host_id") |
| | | private Long hostId; |
| | | |
| | | /** |
| | | * 所属部门 |
| | | */ |
| | | @ApiModelProperty(value= "所属部门") |
| | | @ApiModelProperty(value = "所属部门") |
| | | @TableField("dept_id") |
| | | private Long deptId; |
| | | |
| | | /** |
| | | * 业务类型 |
| | | */ |
| | | @ApiModelProperty(value= "业务类型") |
| | | @ApiModelProperty(value = "业务类型") |
| | | @TableField("plan_type") |
| | | private Long planType; |
| | | |
| | | /** |
| | | * 业务员 |
| | | */ |
| | | @ApiModelProperty(value= "业务员") |
| | | @ApiModelProperty(value = "业务员") |
| | | @TableField("user_id") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 跟踪项目 |
| | | */ |
| | | @ApiModelProperty(value= "跟踪项目") |
| | | @ApiModelProperty(value = "跟踪项目") |
| | | @TableField("order_id") |
| | | private Long orderId; |
| | | |
| | | /** |
| | | * 甲方单位 |
| | | */ |
| | | @ApiModelProperty(value= "甲方单位") |
| | | @ApiModelProperty(value = "甲方单位") |
| | | @TableField("cstmr_id") |
| | | private Long cstmrId; |
| | | |
| | | /** |
| | | * 规划单代号 |
| | | */ |
| | | @ApiModelProperty(value= "规划单代号") |
| | | @ApiModelProperty(value = "规划单代号") |
| | | private String uuid; |
| | | |
| | | /** |
| | | * 规划单名称 |
| | | */ |
| | | @ApiModelProperty(value= "规划单名称") |
| | | @ApiModelProperty(value = "规划单名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 申请日期 |
| | | */ |
| | | @ApiModelProperty(value= "申请日期") |
| | | @ApiModelProperty(value = "申请日期") |
| | | @TableField("apple_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date appleTime; |
| | | |
| | | /** |
| | | * 方案所需 |
| | | */ |
| | | @ApiModelProperty(value= "方案所需") |
| | | @ApiModelProperty(value = "方案所需") |
| | | @TableField("plan_need") |
| | | private String planNeed; |
| | | |
| | | /** |
| | | * 立项 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "立项 1: 是 0: 否 ") |
| | | @ApiModelProperty(value = "立项 1: 是 0: 否 ") |
| | | @TableField("be_item") |
| | | private Integer beItem; |
| | | |
| | | /** |
| | | * 表单内容 |
| | | */ |
| | | @ApiModelProperty(value= "表单内容") |
| | | @ApiModelProperty(value = "表单内容") |
| | | private String form; |
| | | |
| | | /** |
| | | * 规划员 |
| | | */ |
| | | @ApiModelProperty(value= "规划员") |
| | | @ApiModelProperty(value = "规划员") |
| | | private Long planner; |
| | | |
| | | /** |
| | | * 完成时间 |
| | | */ |
| | | @ApiModelProperty(value= "完成时间") |
| | | @ApiModelProperty(value = "完成时间") |
| | | @TableField("finish_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date finishTime; |
| | | |
| | | /** |
| | | * 更改方案 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "更改方案 1: 是 0: 否 ") |
| | | @ApiModelProperty(value = "更改方案 1: 是 0: 否 ") |
| | | private Integer change; |
| | | |
| | | /** |
| | | * 更改次数 |
| | | */ |
| | | @ApiModelProperty(value= "更改次数") |
| | | @ApiModelProperty(value = "更改次数") |
| | | @TableField("change_time") |
| | | private Integer changeTime; |
| | | |
| | | /** |
| | | * 更改方案原因 |
| | | */ |
| | | @ApiModelProperty(value= "更改方案原因") |
| | | @ApiModelProperty(value = "更改方案原因") |
| | | @TableField("change_reason") |
| | | private String changeReason; |
| | | |
| | | /** |
| | | * 规格奖金 |
| | | */ |
| | | @ApiModelProperty(value= "规格奖金") |
| | | @ApiModelProperty(value = "规格奖金") |
| | | @TableField("plan_bonus") |
| | | private Double planBonus; |
| | | |
| | | /** |
| | | * 规格组长奖金 |
| | | */ |
| | | @ApiModelProperty(value= "规格组长奖金") |
| | | @ApiModelProperty(value = "规格组长奖金") |
| | | @TableField("plan_leader_bonus") |
| | | private Double planLeaderBonus; |
| | | |
| | | /** |
| | | * 附件 |
| | | */ |
| | | @ApiModelProperty(value= "附件") |
| | | @ApiModelProperty(value = "附件") |
| | | private String files; |
| | | |
| | | /** |
| | | * 进度 1: 开始 2: 组长审核 3: 售前组长审核 4: 规划员审核 5: 审批通过 |
| | | */ |
| | | @ApiModelProperty(value= "进度 1: 开始 2: 组长审核 3: 售前审核 4: 规划员审核 5: 审批通过 ") |
| | | @ApiModelProperty(value = "进度 1: 开始 2: 组长审核 3: 售前审核 4: 规划员审核 5: 审批通过 ") |
| | | private Integer settle; |
| | | |
| | | /** |
| | | * 审核进度 |
| | | */ |
| | | @ApiModelProperty(value= "审核进度") |
| | | @ApiModelProperty(value = "审核进度") |
| | | @TableField("settle_msg") |
| | | private String settleMsg; |
| | | |
| | | /** |
| | | * 评论 |
| | | */ |
| | | @ApiModelProperty(value= "评论") |
| | | @ApiModelProperty(value = "评论") |
| | | private String comment; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | @ApiModelProperty(value = "状态 1: 正常 0: 禁用 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @ApiModelProperty(value = "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 注释 |
| | | */ |
| | | @ApiModelProperty(value= "注释") |
| | | @ApiModelProperty(value = "注释") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 项目进度流程{1:项目创建,2:核价处理,3:产品费用明细,4:报价预算单,5:报价单} |
| | | */ |
| | | @ApiModelProperty(value= "项目进度流程{1:项目创建,2:核价处理,3:产品费用明细,4:报价预算单,5:报价单}") |
| | | @ApiModelProperty(value = "项目进度流程{1:项目创建,2:核价处理,3:产品费用明细,4:报价预算单,5:报价单}") |
| | | private Integer step; |
| | | |
| | | /** |
| | | * 业务员联系方式 |
| | | */ |
| | | @ApiModelProperty(value= "业务员联系方式") |
| | | @ApiModelProperty(value = "业务员联系方式") |
| | | private String userXmlSelPhone; |
| | | |
| | | /** |
| | | * 节点负责人 |
| | | */ |
| | | @ApiModelProperty(value= "节点负责人") |
| | | @ApiModelProperty(value = "节点负责人") |
| | | private Long director; |
| | | |
| | | public Plan() {} |
| | | /** |
| | | * 集成项目货架核价状态 |
| | | */ |
| | | @ApiModelProperty(value = "状态 3: 完成核价 2: 开始核价 1: 等待核价 0: 初始 ") |
| | | private Integer status2; |
| | | |
| | | public String getHostId$(){ |
| | | /** |
| | | * 节点负责人 |
| | | */ |
| | | @ApiModelProperty(value = "副planId") |
| | | @TableField("assistant_plan_id") |
| | | private Long assistantPlanId; |
| | | |
| | | /** |
| | | * 节点负责人 |
| | | */ |
| | | @ApiModelProperty(value = "主planId") |
| | | @TableField("host_plan_id") |
| | | private Long hostPlanId; |
| | | |
| | | /** |
| | | * 节点负责人 |
| | | */ |
| | | @ApiModelProperty(value = "主planId") |
| | | @TableField("assistant_host_sign") |
| | | private Integer assistantHostSign; |
| | | |
| | | public Plan() { |
| | | } |
| | | |
| | | public Plan(Plan plan) { |
| | | this.hostId = plan.getHostId(); |
| | | this.deptId = plan.getDeptId(); |
| | | this.planType = plan.getPlanType(); |
| | | this.userId = plan.getUserId(); |
| | | this.orderId = plan.getOrderId(); |
| | | this.cstmrId = plan.getCstmrId(); |
| | | this.name = plan.getName(); |
| | | this.planNeed = plan.getPlanNeed(); |
| | | this.beItem = plan.getBeItem(); |
| | | this.form = plan.getForm(); |
| | | this.finishTime = plan.getFinishTime(); |
| | | this.change = plan.getChange(); |
| | | this.changeTime = plan.getChangeTime(); |
| | | this.changeReason = plan.getChangeReason(); |
| | | this.planBonus = plan.getPlanBonus(); |
| | | this.planLeaderBonus = plan.getPlanLeaderBonus(); |
| | | this.files = plan.getFiles(); |
| | | this.comment = plan.getComment(); |
| | | this.memo = plan.getMemo(); |
| | | this.userXmlSelPhone = plan.getUserXmlSelPhone(); |
| | | } |
| | | |
| | | public String getHostId$() { |
| | | HostService service = SpringUtils.getBean(HostService.class); |
| | | Host host = service.selectById(this.hostId); |
| | | if (!Cools.isEmpty(host)){ |
| | | if (!Cools.isEmpty(host)) { |
| | | return String.valueOf(host.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getDirector$(){ |
| | | if (this.director==null) return ""; |
| | | public String getDirector$() { |
| | | if (this.director == null) return ""; |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.director); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getDeptId$(){ |
| | | public String getDeptId$() { |
| | | DeptService service = SpringUtils.getBean(DeptService.class); |
| | | Dept dept = service.selectById(this.deptId); |
| | | if (!Cools.isEmpty(dept)){ |
| | | if (!Cools.isEmpty(dept)) { |
| | | return String.valueOf(dept.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getPlanType$(){ |
| | | public String getPlanType$() { |
| | | PlanTypeService service = SpringUtils.getBean(PlanTypeService.class); |
| | | PlanType planType = service.selectById(this.planType); |
| | | if (!Cools.isEmpty(planType)){ |
| | | if (!Cools.isEmpty(planType)) { |
| | | return String.valueOf(planType.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public Integer getPLType$(){ |
| | | public Integer getPLType$() { |
| | | PlanTypeService service = SpringUtils.getBean(PlanTypeService.class); |
| | | PlanType planType = service.selectById(this.planType); |
| | | if (!Cools.isEmpty(planType)){ |
| | | if (!Cools.isEmpty(planType)) { |
| | | return planType.getType(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUserId$(){ |
| | | public String getStatusAll$(){ |
| | | if (this.status2>3 || this.getAssistantHostSign()==1){ |
| | | return getStatus$(); |
| | | }else { |
| | | return "集成"+getStatus$()+"/"+"货架"+getStatus2$(); |
| | | } |
| | | |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 3: |
| | | return "完成核价"; |
| | | case 2: |
| | | return "开始核价"; |
| | | case 1: |
| | | return "等待核价"; |
| | | case 0: |
| | | return "初始"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getStatus2$(){ |
| | | if (null == this.status2){ return null; } |
| | | switch (this.status2){ |
| | | case 3: |
| | | return "完成核价"; |
| | | case 2: |
| | | return "开始核价"; |
| | | case 1: |
| | | return "等待核价"; |
| | | case 0: |
| | | return "初始"; |
| | | default: |
| | | return String.valueOf(this.status2); |
| | | } |
| | | } |
| | | |
| | | public String getUserId$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.userId); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getOrderId$(){ |
| | | public String getOrderId$() { |
| | | OrderService service = SpringUtils.getBean(OrderService.class); |
| | | Order order = service.selectById(this.orderId); |
| | | if (!Cools.isEmpty(order)){ |
| | | if (!Cools.isEmpty(order)) { |
| | | return String.valueOf(order.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCstmrId$(){ |
| | | public String getCstmrId$() { |
| | | CstmrService service = SpringUtils.getBean(CstmrService.class); |
| | | Cstmr cstmr = service.selectById(this.cstmrId); |
| | | if (!Cools.isEmpty(cstmr)){ |
| | | if (!Cools.isEmpty(cstmr)) { |
| | | return String.valueOf(cstmr.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppleTime$(){ |
| | | if (Cools.isEmpty(this.appleTime)){ |
| | | public String getAppleTime$() { |
| | | if (Cools.isEmpty(this.appleTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd").format(this.appleTime); |
| | | } |
| | | |
| | | public String getPlanNeed$(){ |
| | | if (Cools.isEmpty(this.planNeed)){ |
| | | public String getPlanNeed$() { |
| | | if (Cools.isEmpty(this.planNeed)) { |
| | | return null; |
| | | } |
| | | PlanNeedService service = SpringUtils.getBean(PlanNeedService.class); |
| | | String[] planNeeds = this.planNeed.split("-"); |
| | | String name=""; |
| | | for (String planNeeda : planNeeds){ |
| | | String name = ""; |
| | | for (String planNeeda : planNeeds) { |
| | | PlanNeed planNeed = service.selectById(Integer.parseInt(planNeeda)); |
| | | if (!Cools.isEmpty(planNeed)){ |
| | | if (!Cools.isEmpty(planNeed)) { |
| | | // return String.valueOf(planNeed.getName()); |
| | | name = name+planNeed.getName()+";"; |
| | | name = name + planNeed.getName() + ";"; |
| | | } |
| | | } |
| | | return name; |
| | | } |
| | | |
| | | public String getBeItem$(){ |
| | | if (null == this.beItem){ return null; } |
| | | switch (this.beItem){ |
| | | public String getBeItem$() { |
| | | if (null == this.beItem) { |
| | | return null; |
| | | } |
| | | switch (this.beItem) { |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getFinishTime$(){ |
| | | if (Cools.isEmpty(this.finishTime)){ |
| | | public String getAssistantHostSign$() { |
| | | if (null == this.assistantHostSign) { |
| | | return null; |
| | | } |
| | | switch (this.assistantHostSign) { |
| | | case 1: |
| | | return "副流程"; |
| | | case 0: |
| | | return "主流程"; |
| | | default: |
| | | return String.valueOf(this.assistantHostSign); |
| | | } |
| | | } |
| | | |
| | | public String getFinishTime$() { |
| | | if (Cools.isEmpty(this.finishTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd").format(this.finishTime); |
| | | } |
| | | |
| | | public String getChange$(){ |
| | | if (null == this.change){ return null; } |
| | | switch (this.change){ |
| | | public String getChange$() { |
| | | if (null == this.change) { |
| | | return null; |
| | | } |
| | | switch (this.change) { |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getSettle$(){ |
| | | if (null == this.settle){ return null; } |
| | | switch (this.settle){ |
| | | public String getSettle$() { |
| | | if (null == this.settle) { |
| | | return null; |
| | | } |
| | | switch (this.settle) { |
| | | // case 1: |
| | | // return "等待组长审核"; |
| | | case 1: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getPlanner$(){ |
| | | if (this.planner==null) return "未分配"; |
| | | public String getPlanner$() { |
| | | if (this.planner == null) return "未分配"; |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.planner); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | public String getNowHeadman$(){ |
| | | public String getNowHeadman$() { |
| | | PlanTypeService planTypeService = SpringUtils.getBean(PlanTypeService.class); |
| | | PlanType planType = planTypeService.selectById(this.planType); |
| | | User user = planTypeService.findPlanLeader(planType); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 2: |
| | | return "开始核价"; |
| | | case 1: |
| | | return "等待核价"; |
| | | case 0: |
| | | return "未完成"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | public String getCreateBy$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | public String getCreateTime$() { |
| | | if (Cools.isEmpty(this.createTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | public String getUpdateBy$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | public String getUpdateTime$() { |
| | | if (Cools.isEmpty(this.updateTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | |
| | | |
| | | public PlanType() {} |
| | | |
| | | public PlanType(Long hostId,Integer type) { |
| | | this.hostId = hostId; |
| | | this.type = type; |
| | | } |
| | | |
| | | public PlanType(Long hostId,String name,String flag,String formId,String data,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.hostId = hostId; |
| | | this.name = name; |
| | |
| | | @ApiModelProperty(value= "") |
| | | private String form; |
| | | |
| | | /** |
| | | * 集成项目货架核价状态 |
| | | */ |
| | | @ApiModelProperty(value = "状态 3: 完成核价 2: 开始核价 1: 等待核价 0: 初始 ") |
| | | private Integer status2; |
| | | |
| | | /** |
| | | * 节点负责人 |
| | | */ |
| | | @ApiModelProperty(value = "副planId") |
| | | @TableField("assistant_plan_id") |
| | | private Long assistantPlanId; |
| | | |
| | | /** |
| | | * 节点负责人 |
| | | */ |
| | | @ApiModelProperty(value = "主planId") |
| | | @TableField("host_plan_id") |
| | | private Long hostPlanId; |
| | | |
| | | /** |
| | | * 节点负责人 |
| | | */ |
| | | @ApiModelProperty(value = "副planId") |
| | | @TableField("assistant_pri_id") |
| | | private Long assistantPriId; |
| | | |
| | | /** |
| | | * 节点负责人 |
| | | */ |
| | | @ApiModelProperty(value = "主planId") |
| | | @TableField("host_pri_id") |
| | | private Long hostPriId; |
| | | |
| | | /** |
| | | * 节点负责人 |
| | | */ |
| | | @ApiModelProperty(value = "主planId") |
| | | @TableField("assistant_host_sign") |
| | | private Integer assistantHostSign; |
| | | |
| | | public PriOnline2() {} |
| | | |
| | | public PriOnline2(String title, String sheetData, Date createTime, String filepath,Integer settle,Integer settleSize) { |
| | |
| | | return "审批通过"; |
| | | default: |
| | | return String.valueOf(this.settle); |
| | | } |
| | | } |
| | | |
| | | public String getAssistantHostSign$() { |
| | | if (null == this.assistantHostSign) { |
| | | return null; |
| | | } |
| | | switch (this.assistantHostSign) { |
| | | case 1: |
| | | return "副流程"; |
| | | case 0: |
| | | return "主流程"; |
| | | default: |
| | | return String.valueOf(this.assistantHostSign); |
| | | } |
| | | } |
| | | |
| | |
| | | return null; |
| | | } |
| | | |
| | | public String getStatus$() { |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | public String getStatusAll$(){ |
| | | PlanService planService = SpringUtils.getBean(PlanService.class); |
| | | Plan plan = planService.selectById(this.itemId); |
| | | if (plan.getStatus2()>3 || (!Cools.isEmpty(this.getAssistantHostSign()) && this.getAssistantHostSign()==1)){ |
| | | return getStatus$(); |
| | | }else { |
| | | return "集成"+getStatus$()+"/"+"货架"+getStatus2$(); |
| | | } |
| | | |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | PlanService planService = SpringUtils.getBean(PlanService.class); |
| | | Plan plan = planService.selectById(this.itemId); |
| | | if (null == plan.getStatus()){ return null; } |
| | | switch (plan.getStatus()){ |
| | | case 3: |
| | | return "完成核价"; |
| | | case 2: |
| | | return "开始核价"; |
| | | case 1: |
| | | return "已完成"; |
| | | return "等待核价"; |
| | | case 0: |
| | | return "未完成"; |
| | | return "初始"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | return String.valueOf(plan.getStatus()); |
| | | } |
| | | } |
| | | |
| | | public String getStatus2$(){ |
| | | PlanService planService = SpringUtils.getBean(PlanService.class); |
| | | Plan plan = planService.selectById(this.itemId); |
| | | if (null == plan.getStatus2()){ return null; } |
| | | switch (plan.getStatus2()){ |
| | | case 3: |
| | | return "完成核价"; |
| | | case 2: |
| | | return "开始核价"; |
| | | case 1: |
| | | return "等待核价"; |
| | | case 0: |
| | | return "初始"; |
| | | default: |
| | | return String.valueOf(plan.getStatus2()); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.zy.crm.manager.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.crm.manager.service.PriOnline2Service; |
| | | import com.zy.crm.system.entity.User; |
| | | import com.zy.crm.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("man_pri_online2_foll") |
| | | public class PriOnline2Foll implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 规划单 |
| | | */ |
| | | @ApiModelProperty(value= "规划单") |
| | | @TableField("pri_online2_id") |
| | | private Long priOnline2Id; |
| | | |
| | | /** |
| | | * 跟进人 |
| | | */ |
| | | @ApiModelProperty(value= "跟进人") |
| | | @TableField("user_id") |
| | | private Long userId; |
| | | |
| | | public PriOnline2Foll() {} |
| | | |
| | | public PriOnline2Foll(Long priOnline2Id, Long userId) { |
| | | this.priOnline2Id = priOnline2Id; |
| | | this.userId = userId; |
| | | } |
| | | |
| | | // PlanFoll planFoll = new PlanFoll( |
| | | // null, // 规划单 |
| | | // null // 跟进人[非空] |
| | | // ); |
| | | |
| | | public String getPriOnline2Id$(){ |
| | | PriOnline2Service service = SpringUtils.getBean(PriOnline2Service.class); |
| | | PriOnline2 priOnline2 = service.selectById(this.priOnline2Id); |
| | | if (!Cools.isEmpty(priOnline2)){ |
| | | return String.valueOf(priOnline2.getTemplateName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUserId$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.userId); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty(value= "税率") |
| | | @TableField("tax_rate") |
| | | private Long taxRate; |
| | | private Double taxRate; |
| | | |
| | | /** |
| | | * 未税本币金额 |
| | | */ |
| | | @ApiModelProperty(value= "未税本币金额") |
| | | @TableField("untaxed_amount_in_local_currency") |
| | | private Long untaxedAmountInLocalCurrency; |
| | | private Double untaxedAmountInLocalCurrency; |
| | | |
| | | /** |
| | | * 未税金额 |
| | | */ |
| | | @ApiModelProperty(value= "未税金额") |
| | | @TableField("untaxed_amount") |
| | | private Long untaxedAmount; |
| | | private Double untaxedAmount; |
| | | |
| | | /** |
| | | * 税额 |
| | | */ |
| | | @ApiModelProperty(value= "税额") |
| | | @TableField("tax_amount") |
| | | private Long taxAmount; |
| | | private Double taxAmount; |
| | | |
| | | /** |
| | | * 发票金额 |
| | | */ |
| | | @ApiModelProperty(value= "发票金额") |
| | | @TableField("invoice_value") |
| | | private Long invoiceValue; |
| | | private Double invoiceValue; |
| | | |
| | | /** |
| | | * 发票本币金额 |
| | | */ |
| | | @ApiModelProperty(value= "发票本币金额") |
| | | @TableField("invoice_amount_in_local_currency") |
| | | private Long invoiceAmountInLocalCurrency; |
| | | private Double invoiceAmountInLocalCurrency; |
| | | |
| | | /** |
| | | * 报销比例 |
| | | */ |
| | | @ApiModelProperty(value= "报销比例") |
| | | @TableField("reimbursement_ratio") |
| | | private Long reimbursementRatio; |
| | | private Double reimbursementRatio; |
| | | |
| | | /** |
| | | * 报销金额 |
| | | */ |
| | | @ApiModelProperty(value= "报销金额") |
| | | @TableField("reimbursement_amount") |
| | | private Long reimbursementAmount; |
| | | private Double reimbursementAmount; |
| | | |
| | | /** |
| | | * 报销本币金额 |
| | | */ |
| | | @ApiModelProperty(value= "报销本币金额") |
| | | @TableField("reimbursement_amount_in_local_currency") |
| | | private Long reimbursementAmountInLocalCurrency; |
| | | private Double reimbursementAmountInLocalCurrency; |
| | | |
| | | /** |
| | | * 出纳确认金额 |
| | | */ |
| | | @ApiModelProperty(value= "出纳确认金额") |
| | | @TableField("cashier_confirmation_amount") |
| | | private Long cashierConfirmationAmount; |
| | | private Double cashierConfirmationAmount; |
| | | |
| | | /** |
| | | * 出纳币种 |
| | |
| | | |
| | | public ReimburseOnlineDetl() {} |
| | | |
| | | public ReimburseOnlineDetl(String occupation,Integer expenseType,Integer userId,Integer deptId,Integer hostId,Long orderId,Long taxRate,Long untaxedAmountInLocalCurrency,Long untaxedAmount,Long taxAmount,Long invoiceValue,Long invoiceAmountInLocalCurrency,Long reimbursementRatio,Long reimbursementAmount,Long reimbursementAmountInLocalCurrency,Long cashierConfirmationAmount,Integer cashierCurrency,Date departureTime,Date updateTime,Integer updateUserId,String updateUserName,Date creationTime,Integer creationUserId,String creationUserName,Integer reimburseId) { |
| | | public ReimburseOnlineDetl(String occupation,Integer expenseType,Integer userId,Integer deptId,Integer hostId,Long orderId,Double taxRate,Double untaxedAmountInLocalCurrency,Double untaxedAmount,Double taxAmount,Double invoiceValue,Double invoiceAmountInLocalCurrency,Double reimbursementRatio,Double reimbursementAmount,Double reimbursementAmountInLocalCurrency,Double cashierConfirmationAmount,Integer cashierCurrency,Date departureTime,Date updateTime,Integer updateUserId,String updateUserName,Date creationTime,Integer creationUserId,String creationUserName,Integer reimburseId) { |
| | | this.occupation = occupation; |
| | | this.expenseType = expenseType; |
| | | this.userId = userId; |
| | |
| | | public ReimburseOnlineDetl(Integer reminburseCostTypeId) { |
| | | this.occupation = ""; |
| | | this.expenseType = reminburseCostTypeId; |
| | | this.taxRate = (long)0.0; |
| | | this.untaxedAmountInLocalCurrency = (long)0.0; |
| | | this.untaxedAmount = (long)0.0; |
| | | this.taxAmount = (long)0.0; |
| | | this.invoiceValue = (long)0.0; |
| | | this.invoiceAmountInLocalCurrency = (long)0.0; |
| | | this.reimbursementRatio = (long)0.0; |
| | | this.reimbursementAmount = (long)0.0; |
| | | this.reimbursementAmountInLocalCurrency = (long)0.0; |
| | | this.cashierConfirmationAmount = (long)0.0; |
| | | this.taxRate = 0.0; |
| | | this.untaxedAmountInLocalCurrency = 0.0; |
| | | this.untaxedAmount = 0.0; |
| | | this.taxAmount = 0.0; |
| | | this.invoiceValue = 0.0; |
| | | this.invoiceAmountInLocalCurrency = 0.0; |
| | | this.reimbursementRatio = 0.0; |
| | | this.reimbursementAmount = 0.0; |
| | | this.reimbursementAmountInLocalCurrency = 0.0; |
| | | this.cashierConfirmationAmount = 0.0; |
| | | } |
| | | |
| | | |
| | |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.creationTime); |
| | | } |
| | | |
| | | public void setTaxRate(String taxRate){ |
| | | String[] splitTaxRate = taxRate.split("%"); |
| | | this.taxRate=Double.parseDouble(splitTaxRate[0]); |
| | | } |
| | | |
| | | public void setTaxRate(Double taxRate){ |
| | | this.taxRate=taxRate; |
| | | } |
| | | |
| | | public String getTaxRate$(){ |
| | | return taxRate.toString()+"%"; |
| | | } |
| | | |
| | | public void setReimbursementRatio(String reimbursementRatio){ |
| | | String[] splitReimbursementRatio = reimbursementRatio.split("%"); |
| | | this.reimbursementRatio=Double.parseDouble(splitReimbursementRatio[0]); |
| | | } |
| | | |
| | | public void setReimbursementRatio(Double reimbursementRatio){ |
| | | this.reimbursementRatio=reimbursementRatio; |
| | | } |
| | | |
| | | public String getReimbursementRatio$(){ |
| | | return reimbursementRatio.toString()+"%"; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.crm.manager.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.crm.manager.entity.AllFoll; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface AllFollMapper extends BaseMapper<AllFoll> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.crm.manager.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.crm.manager.entity.PriOnline2Foll; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface PriOnline2FollMapper extends BaseMapper<PriOnline2Foll> { |
| | | |
| | | } |
| | |
| | | public interface PriOnline2Mapper extends BaseMapper<PriOnline2> { |
| | | |
| | | List<PriOnline2> listByPage(Page<PriOnline2> page, @Param("userIds") ArrayList<Long> userIds , @Param("condition") String condition); |
| | | List<PriOnline2> listByAll( @Param("userId") Long userId ); |
| | | Integer listByAllTotal( @Param("userId") Long userId ); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.crm.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.crm.manager.entity.AllFoll; |
| | | |
| | | public interface AllFollService extends IService<AllFoll> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.crm.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.crm.manager.entity.PriOnline2Foll; |
| | | |
| | | public interface PriOnline2FollService extends IService<PriOnline2Foll> { |
| | | |
| | | } |
| | |
| | | import com.zy.crm.manager.entity.PriOnline2; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public interface PriOnline2Service extends IService<PriOnline2> { |
| | | |
| | | Page<PriOnline2> listByPage(Page<PriOnline2> page, ArrayList<Long> userIds , String condition); |
| | | List<PriOnline2> listByAll(Long userId); |
| | | Integer listByAllTotal(Long userId); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.crm.manager.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.crm.manager.entity.AllFoll; |
| | | import com.zy.crm.manager.mapper.AllFollMapper; |
| | | import com.zy.crm.manager.service.AllFollService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("allFollService") |
| | | public class AllFollServiceImpl extends ServiceImpl<AllFollMapper, AllFoll> implements AllFollService { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.crm.manager.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.crm.manager.entity.PriOnline2Foll; |
| | | import com.zy.crm.manager.mapper.PriOnline2FollMapper; |
| | | import com.zy.crm.manager.service.PriOnline2FollService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("priOnline2FollService") |
| | | public class PriOnline2FollServiceImpl extends ServiceImpl<PriOnline2FollMapper, PriOnline2Foll> implements PriOnline2FollService { |
| | | |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service("priOnline2Service") |
| | | public class PriOnline2ServiceImpl extends ServiceImpl<PriOnline2Mapper, PriOnline2> implements PriOnline2Service { |
| | |
| | | public Page<PriOnline2> listByPage(Page<PriOnline2> page, ArrayList<Long> userIds, String condition) { |
| | | return page.setRecords(this.baseMapper.listByPage(page, userIds, condition)); |
| | | } |
| | | |
| | | @Override |
| | | public List<PriOnline2> listByAll(Long userId) { |
| | | return this.baseMapper.listByAll(userId); |
| | | } |
| | | |
| | | @Override |
| | | public Integer listByAllTotal(Long userId) { |
| | | return this.baseMapper.listByAllTotal(userId); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.crm.manager.mapper.AllFollMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.crm.manager.entity.AllFoll"> |
| | | <id column="id" property="id" /> |
| | | <result column="plan_id" property="planId" /> |
| | | <result column="user_id" property="userId" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <result column="memo" property="memo" /> |
| | | <result column="user_xml_sel_phone" property="userXmlSelPhone" /> |
| | | <result column="director" property="director" /> |
| | | <result column="status2" property="status2" /> |
| | | <result column="assistant_plan_id" property="assistantPlanId" /> |
| | | <result column="host_plan_id" property="hostPlanId" /> |
| | | <result column="assistant_host_sign" property="assistantHostSign" /> |
| | | |
| | | </resultMap> |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.crm.manager.mapper.PriOnline2FollMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.crm.manager.entity.PriOnline2Foll"> |
| | | <id column="id" property="id" /> |
| | | <result column="pri_online2_id" property="priOnline2Id" /> |
| | | <result column="user_id" property="userId" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <result column="check_data" property="checkData" /> |
| | | <result column="settle" property="settle" /> |
| | | <result column="settle_size" property="settleSize" /> |
| | | <result column="assistant_plan_id" property="assistantPlanId" /> |
| | | <result column="host_plan_id" property="hostPlanId" /> |
| | | <result column="assistant_pri_id" property="assistantPriId" /> |
| | | <result column="host_pri_id" property="hostPriId" /> |
| | | <result column="assistant_host_sign" property="assistantHostSign" /> |
| | | </resultMap> |
| | | |
| | | <!-- 查询结果不包含excel数据data,以免结果集过大 --> |
| | |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="settle" property="settle" /> |
| | | <result column="settle_size" property="settleSize" /> |
| | | <result column="assistant_plan_id" property="assistantPlanId" /> |
| | | <result column="host_plan_id" property="hostPlanId" /> |
| | | <result column="assistant_host_sign" property="assistantHostSign" /> |
| | | <result column="assistant_plan_id" property="assistantPlanId" /> |
| | | <result column="host_plan_id" property="hostPlanId" /> |
| | | <result column="assistant_pri_id" property="assistantPriId" /> |
| | | <result column="host_pri_id" property="hostPriId" /> |
| | | <result column="assistant_host_sign" property="assistantHostSign" /> |
| | | </resultMap> |
| | | |
| | | <select id="listByPage" resultMap="NoDataResultMap"> |
| | |
| | | ORDER BY id DESC |
| | | </select> |
| | | |
| | | <select id="listByAll" resultMap="NoDataResultMap"> |
| | | SELECT |
| | | * |
| | | FROM man_pri_online2 mp |
| | | WHERE 1=1 |
| | | and |
| | | mp.id in |
| | | ( |
| | | select |
| | | pri_online2_id |
| | | from man_pri_online2_foll |
| | | where 1=1 |
| | | and user_id = #{userId} |
| | | ) |
| | | ORDER BY id DESC |
| | | </select> |
| | | |
| | | <select id="listByAllTotal" resultType="java.lang.Integer"> |
| | | SELECT |
| | | count (1) |
| | | FROM man_pri_online2 mp |
| | | WHERE 1=1 |
| | | and |
| | | mp.id in |
| | | ( |
| | | select |
| | | pri_online2_id |
| | | from man_pri_online2_foll |
| | | where 1=1 |
| | | and user_id = #{userId} |
| | | ) |
| | | </select> |
| | | </mapper> |
| | |
| | | skin: 'line', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | // ,{field: 'id', align: 'center',title: 'ID'} |
| | | ,{field: 'id', align: 'center',title: 'ID'} |
| | | // ,{field: 'hostId$', align: 'center',title: '所属商户'} |
| | | ,{field: 'userId$', align: 'left',title: '业务员',hide: false, width: 100} |
| | | ,{field: 'planType$', align: 'left',title: '业务类型', width: 150,hide: false} |
| | |
| | | ,{field: 'settle$', align: 'center',title: '进度', width: 150} |
| | | // ,{field: 'settleMsg', align: 'center',title: '审核进度'} |
| | | // ,{field: 'comment', align: 'center',title: '评论'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'statusAll$', align: 'center',title: '状态'} |
| | | ,{field: 'createTime$', align: 'left',title: '添加日期', width: 160, hide: true} |
| | | ,{field: 'updateBy$', align: 'left',title: '修改人', width: 100} |
| | | ,{field: 'updateTime$', align: 'left',title: '修改时间', hide: true} |
| | | ,{field: 'memo', align: 'left',title: '注释', hide: true} |
| | | |
| | | ,{field: 'center', align: 'left',title: '关联流程', toolbar: '#tbLook', minWidth: 160, hide: false} |
| | | ,{field: 'assistantHostSign$', align: 'left',title: '主副标记', hide: false} |
| | | ,{field: 'assistantHostSign', align: 'left',title: '主副标记', hide: true} |
| | | ,{field: 'hostPlanId', align: 'left',title: '主ID', hide: true} |
| | | ,{field: 'assistantPlanId', align: 'left',title: '副ID', hide: true} |
| | | // ,{field: 'assistantPlanIdSignType', align: 'left',title: '集成货架标志', hide: true} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 340} |
| | | ]], |
| | | request: { |
| | |
| | | approvalEnd(data.id); |
| | | }); |
| | | break; |
| | | case 'assistantPlan': |
| | | assistantPlan(data); |
| | | break; |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | |
| | | del([data.id]); |
| | | break; |
| | | case "uploadLink": |
| | | var planIdSign = data.id; |
| | | if (data.assistantHostSign==1){ |
| | | planIdSign = data.hostPlanId; |
| | | } |
| | | // 打开弹窗 |
| | | // 构建带参数的内容 |
| | | layer.open({ |
| | | type: 1, |
| | | title: '上传文件-'+data.id, |
| | | title: '上传文件-'+planIdSign, |
| | | content: $('#myModal') |
| | | }); |
| | | // 获取路径下的文件列表,使用 jQuery 的 ajax 方法 |
| | | $.ajax({ |
| | | url: '/plan/view/file/auth', |
| | | data:{ |
| | | planId:data.id |
| | | planId:planIdSign |
| | | }, |
| | | success: function(response) { |
| | | if (response.code==200){ |
| | |
| | | }, |
| | | error: function() { |
| | | console.log('Failed to get file list.'); |
| | | } |
| | | }); |
| | | break; |
| | | case "look": |
| | | var $a = $(obj.tr).find('a[lay-event="look"]'); |
| | | var offset = $a.offset(); |
| | | var top2 = offset.top; |
| | | var left = offset.left; |
| | | layer.open({ |
| | | type: 1, |
| | | title: false, |
| | | area: '2100px', |
| | | offset: [top2 + 'px', (left - 1430 + $a.outerWidth()) + 'px'], |
| | | shade: .01, |
| | | shadeClose: true, |
| | | fixed: false, |
| | | content: '<table id="lookSSXMTable" lay-filter="lookSSXMTable"></table>', |
| | | success: function (layero) { |
| | | table.render({ |
| | | elem: '#lookSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/plan/assistantPlan/view/auth', |
| | | where: { |
| | | hostPlanId: data.id |
| | | }, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {field: 'id', align: 'center',title: 'ID'} |
| | | ,{field: 'userId$', align: 'left',title: '业务员',hide: false, width: 100} |
| | | ,{field: 'planType$', align: 'left',title: '业务类型', width: 150,hide: false} |
| | | ,{ |
| | | field: 'name', |
| | | align: 'left', |
| | | title: '售前规划申请单名称', |
| | | width: 220, |
| | | style: 'cursor:pointer', |
| | | event: 'more', |
| | | hide: false |
| | | } |
| | | ,{field: 'uuid', align: 'left',title: '规划单号', width: 100,hide: false} |
| | | ,{ |
| | | field: 'planNeed$', |
| | | align: 'left', |
| | | title: '所需', |
| | | templet:function(d){ |
| | | return emptyShow(d.planNeed$) |
| | | }, |
| | | hide: false |
| | | } |
| | | ,{field: 'deptId$', align: 'left',title: '所属部门',hide: true} |
| | | ,{field: 'planner$', align: 'left',title: '规划员',hide: false, width: 100} |
| | | ,{ |
| | | field: 'orderId$', |
| | | align: 'left', |
| | | title: '跟踪项目', |
| | | width: 220, |
| | | style: 'cursor:pointer', |
| | | event: 'orderMore',hide: false |
| | | } |
| | | ,{field: 'appleTime$', align: 'left',title: '申请日期', hide: false} |
| | | ,{field: 'settle$', align: 'center',title: '进度', width: 150} |
| | | ,{field: 'statusAll$', align: 'center',title: '状态'} |
| | | ,{field: 'createTime$', align: 'left',title: '添加日期', width: 160, hide: true} |
| | | ,{field: 'updateBy$', align: 'left',title: '修改人', width: 100} |
| | | ,{field: 'updateTime$', align: 'left',title: '修改时间', hide: true} |
| | | ,{field: 'memo', align: 'left',title: '注释', hide: true} |
| | | ,{field: 'assistantHostSign', align: 'left',title: '主副标记', hide: true} |
| | | ,{field: 'hostPlanId', align: 'left',title: '主ID', hide: true} |
| | | ,{field: 'assistantPlanId', align: 'left',title: '副ID', hide: true} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 340} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | console.log(res) |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function () { |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | | }, |
| | | size: '' |
| | | }); |
| | | } |
| | | }); |
| | | break; |
| | |
| | | }); |
| | | } |
| | | |
| | | /* 新建 */ |
| | | function assistantPlan(data) { |
| | | layer.confirm('确定要新建货架规划审批吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/plan/assistantPlan/add/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | hostPlanId: data.id |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | |
| | | |
| | | // 树形图 |
| | | var organizationTree; |
| | | window.loadTree = function (condition) { |
| | | window.loadTree = function (condition,allSwitch) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl + "/dept/user/tree/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | 'condition': condition |
| | | 'condition': condition, |
| | | 'allSwitch': allSwitch |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | |
| | | hide: false |
| | | } |
| | | , {field: 'itemId', align: 'center', title: '规划单号', hide: true} |
| | | , {field: 'status$', align: 'center', title: '状态', hide: false} |
| | | , {field: 'statusAll$', align: 'center',title: '状态'} |
| | | // ,{field: 'memberId$', align: 'center',title: ''} |
| | | , { |
| | | field: 'settle$', |
| | |
| | | , {field: 'createTime$', align: 'center', title: '创建时间', hide: true} |
| | | , {field: 'updateUserId$', align: 'center', title: '更新人员', hide: false} |
| | | , {field: 'updateTime$', align: 'center', title: '更新时间', hide: false} |
| | | ,{field: 'assistantHostSign$', align: 'left',title: '主副标记', hide: false} |
| | | ,{field: 'assistantHostSign', align: 'left',title: '主副标记', hide: true} |
| | | ,{field: 'hostPlanId', align: 'left',title: '主ID', hide: true} |
| | | ,{field: 'assistantPlanId', align: 'left',title: '副ID', hide: true} |
| | | , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 350} |
| | | ]], |
| | | request: { |
| | |
| | | console.log(data) |
| | | layer.close(i); |
| | | // 指定模板 |
| | | if ((data.settle === 1 && data.settleSize===3) || (data.settle===2 && data.settleSize===4)) { |
| | | if (((data.settle === 1 && data.settleSize===3) || (data.settle===2 && data.settleSize===4)) && data.assistantHostSign==0) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '300px', |
| | |
| | | case "uploadLink": |
| | | // 打开弹窗 |
| | | // 构建带参数的内容 |
| | | console.log(data) |
| | | var planIdSign = data.id; |
| | | if (data.assistantHostSign==1){ |
| | | planIdSign = data.hostPlanId; |
| | | } |
| | | layer.open({ |
| | | type: 1, |
| | | title: '上传文件-'+data.itemId, |
| | | title: '上传文件-'+planIdSign, |
| | | content: $('#myModal') |
| | | }); |
| | | // 获取路径下的文件列表,使用 jQuery 的 ajax 方法 |
| | | $.ajax({ |
| | | url: '/plan/view/file/auth', |
| | | data:{ |
| | | planId:data.itemId |
| | | planId:planIdSign |
| | | }, |
| | | success: function(response) { |
| | | if (response.code==200){ |
| | |
| | | }); |
| | | } |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel2(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '800px', |
| | | title: '接取' + '核价', |
| | | content: $('#editDialogHJ').html(), |
| | | success: function (layero, dIndex) { |
| | | let loadNameXml = loadNameXmlSel() |
| | | form.val('detailHJ', mData); |
| | | form.on('submit(editSubmitHJ)', function (data) { |
| | | data.field.id = loadNameXml.getValue()[0] ? loadNameXml.getValue()[0].id : null; |
| | | $.ajax({ |
| | | url: baseUrl+"/priOnline2/HJ/add/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload() |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | // /* 弹窗 - 新增、修改 */ |
| | | // function showEditModel2(mData) { |
| | | // admin.open({ |
| | | // type: 1, |
| | | // area: '800px', |
| | | // title: '接取' + '核价', |
| | | // content: $('#editDialogHJ').html(), |
| | | // success: function (layero, dIndex) { |
| | | // let loadNameXml = loadNameXmlSel() |
| | | // form.val('detailHJ', mData); |
| | | // form.on('submit(editSubmitHJ)', function (data) { |
| | | // data.field.id = loadNameXml.getValue()[0] ? loadNameXml.getValue()[0].id : null; |
| | | // $.ajax({ |
| | | // url: baseUrl+"/priOnline2/HJ/add/auth", |
| | | // headers: {'token': localStorage.getItem('token')}, |
| | | // data: data.field, |
| | | // method: 'POST', |
| | | // success: function (res) { |
| | | // if (res.code === 200){ |
| | | // layer.close(dIndex); |
| | | // layer.msg(res.msg, {icon: 1}); |
| | | // tableReload() |
| | | // } else if (res.code === 403){ |
| | | // top.location.href = baseUrl+"/"; |
| | | // }else { |
| | | // layer.msg(res.msg, {icon: 2}); |
| | | // } |
| | | // } |
| | | // }) |
| | | // }); |
| | | // $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | // layui.form.render('select'); |
| | | // } |
| | | // }); |
| | | // } |
| | | |
| | | //更新form |
| | | function showEditForm(mData) { |
| | |
| | | }) |
| | | } |
| | | |
| | | window.loadNameXmlSel = function () { |
| | | return xmSelect.render({ |
| | | el: '#nameXmlSel', |
| | | autoRow: true, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | clickClose: true, |
| | | radio: true, |
| | | remoteMethod: function (val, cb, show) { |
| | | $.ajax({ |
| | | url: baseUrl + "/priOnline2/HJ/search/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | condition: val |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | cb(res.data) |
| | | } else { |
| | | cb([]); |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | // window.loadNameXmlSel = function () { |
| | | // return xmSelect.render({ |
| | | // el: '#nameXmlSel', |
| | | // autoRow: true, |
| | | // filterable: true, |
| | | // remoteSearch: true, |
| | | // clickClose: true, |
| | | // radio: true, |
| | | // remoteMethod: function (val, cb, show) { |
| | | // $.ajax({ |
| | | // url: baseUrl + "/priOnline2/HJ/search/auth", |
| | | // headers: {'token': localStorage.getItem('token')}, |
| | | // data: { |
| | | // condition: val |
| | | // }, |
| | | // method: 'POST', |
| | | // success: function (res) { |
| | | // if (res.code === 200) { |
| | | // cb(res.data) |
| | | // } else { |
| | | // cb([]); |
| | | // layer.msg(res.msg, {icon: 2}); |
| | | // } |
| | | // } |
| | | // }); |
| | | // } |
| | | // }); |
| | | // } |
| | | |
| | | }); |
| | | |
| | |
| | | {field: 'occupation', title: '事由', width: 200}, |
| | | // {field: 'expenseType', title: '费用类型', width: 100}, |
| | | {field: 'expenseType$', title: '费用类型', width: 100}, |
| | | {field: 'taxRate', title: '税率', width: 60}, |
| | | {field: 'taxRate$', title: '税率', width: 60}, |
| | | {field: 'untaxedAmountInLocalCurrency', title: '未税本币金额', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | {field: 'untaxedAmount', title: '未税金额', width: 100}, |
| | | {field: 'taxAmount', title: '税额', width: 60}, |
| | | {field: 'invoiceValue', title: '发票金额', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | {field: 'invoiceAmountInLocalCurrency', title: '发票本币金额', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | {field: 'reimbursementRatio', title: '报销比例', width: 100}, |
| | | {field: 'reimbursementRatio$', title: '报销比例', width: 100}, |
| | | {field: 'reimbursementAmount', title: '报销金额', width: 100}, |
| | | {field: 'reimbursementAmountInLocalCurrency', title: '报销本币金额', width: 120}, |
| | | {field: 'cashierConfirmationAmount', title: '出纳确认金额', width: 120}, |
| | | {field: 'cashierCurrency', title: '出纳币种', width: 100}, |
| | | {field: 'departureTime', title: '出发日期', width: 100}, |
| | | // {field: 'cashierCurrency', title: '出纳币种', width: 100}, |
| | | // {field: 'departureTime', title: '出发日期', width: 100}, |
| | | {field: 'cashierConfirmationAmount', title: '出纳确认金额', width: 120}, |
| | | {field: 'userId', title: '列支人员', width: 120}, |
| | | {field: 'deptId', title: '列支部门', width: 120}, |
| | |
| | | {field: 'reimbursementAmount', title: '报销金额', width: 100, edit: true}, |
| | | {field: 'reimbursementAmountInLocalCurrency', title: '报销本币金额', width: 120, edit: true}, |
| | | {field: 'cashierConfirmationAmount', title: '出纳确认金额', width: 120, edit: true}, |
| | | {field: 'cashierCurrency', title: '出纳币种', width: 100, edit: true}, |
| | | {field: 'departureTime', title: '出发日期', width: 100}, |
| | | // {field: 'cashierCurrency', title: '出纳币种', width: 100, edit: true}, |
| | | // {field: 'departureTime', title: '出发日期', width: 100}, |
| | | {field: 'cashierConfirmationAmount', title: '出纳确认金额', width: 120, edit: true}, |
| | | {field: 'userId', title: '列支人员', width: 120}, |
| | | {field: 'deptId', title: '列支部门', width: 120}, |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="tbLook"> |
| | | <span class="layui-text"> |
| | | <a href="javascript:;" lay-event="look"> |
| | | <i class="layui-icon" style="font-size: 12px;"></i> 查看关联流程 |
| | | </a> |
| | | </span> |
| | | </script> |
| | | |
| | | <div id="myModal" style="display: none;"> |
| | | <div style="padding: 10px"> |
| | | <div class="layui-upload"> |
| | |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | {{# } }} |
| | | {{# if (d.assistantHostSign == 0 && d.assistantPlanId==0) { }} |
| | | <a class="layui-btn layui-btn-xs btn-edit" lay-event="assistantPlan">创建货架规划任务</a> |
| | | {{# } }} |
| | | |
| | | </script> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off" |
| | | style="border-color: #e1e1e1"> |
| | | </div> |
| | | <label class="layui-form-label">ALL:</label> |
| | | <div class="layui-input-inline" style="text-align: left"> |
| | | <input id="allSwitch" name="allSwitch" class="layui-input" type="checkBox" lay-skin="primary" lay-filter='detailCheckbox'> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" lay-event="addBlank">新增核价</button> |
| | | <button class="layui-btn layui-btn-sm" lay-event="addBlank2">接取集成核价任务</button> |
| | | <!-- <button class="layui-btn layui-btn-sm" lay-event="addBlank2">接取集成核价任务</button>--> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="deleteData">删除</button> |
| | | </div> |
| | | </script> |