Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/haizhentong
| | |
| | | } |
| | | crmBranchService.updateById(crmBranch); |
| | | changePoints.setUserType(1); |
| | | changePoints.setChangeReason(3); |
| | | crmChangePointsService.save(changePoints); |
| | | return R.ok(); |
| | | } |
| | |
| | | } |
| | | crmSalespersonService.updateById(crmSalesperson); |
| | | changePoints.setUserType(2); |
| | | changePoints.setChangeReason(3); |
| | | crmChangePointsService.save(changePoints); |
| | | return R.ok(); |
| | | } |
| | |
| | | @ApiOperation(value = "获取用户管理分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TSysAppUserVO>> pageList(@RequestBody TSysAppUserQuery query) { |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | query.setRoleType(roleType); |
| | | return R.ok(sysAppUserService.pageList(query)); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "获取慢性病患者分页列表") |
| | | @PostMapping(value = "/pageChronicDiseaseUserList") |
| | | public R<PageInfo<TSysAppUserVO>> pageChronicDiseaseUserList(@RequestBody TSysAppUserQuery query) { |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | query.setRoleType(roleType); |
| | | return R.ok(sysAppUserService.pageChronicDiseaseUserList(query)); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "慢性病患者导出-平台") |
| | | @PostMapping("/exportList") |
| | | public void exportList(@RequestBody TSysAppUserQuery query){ |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | query.setRoleType(roleType); |
| | | List<TSysAppUserListExport> sysAppUserListExports = sysAppUserService.exportList(query); |
| | | Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TSysAppUserListExport.class, sysAppUserListExports); |
| | | HttpServletResponse response = WebUtils.response(); |
| | |
| | | @ApiOperation(value = "慢性病患者导出-诊所") |
| | | @PostMapping("/exportListClinic") |
| | | public void exportListClinic(@RequestBody TSysAppUserQuery query){ |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | query.setRoleType(roleType); |
| | | List<TSysAppUserClinicExport> sysAppUserClinicExports = sysAppUserService.exportListClinic(query); |
| | | for (TSysAppUserClinicExport sysAppUserClinicExport : sysAppUserClinicExports) { |
| | | String lastReminderTime = sysAppUserClinicExport.getLastReminderTime(); |
| | |
| | | public void exportListAppUser(@RequestBody TSysAppUserQuery query){ |
| | | List<TSysAppUserExport> sysAppUserExports = sysAppUserService.exportListAppUser(query); |
| | | for (TSysAppUserExport sysAppUserExport : sysAppUserExports) { |
| | | String lastInspectionTime = sysAppUserExport.getLastInspectionTime(); |
| | | if(StringUtils.isNotEmpty(lastInspectionTime)){ |
| | | lastInspectionTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(lastInspectionTime); |
| | | sysAppUserExport.setLastInspectionTime(lastInspectionTime); |
| | | } |
| | | // String lastInspectionTime = sysAppUserExport.getLastInspectionTime(); |
| | | // if(StringUtils.isNotEmpty(lastInspectionTime)){ |
| | | // lastInspectionTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(lastInspectionTime); |
| | | // sysAppUserExport.setLastInspectionTime(lastInspectionTime); |
| | | // } |
| | | sysAppUserExport.setCreateTimeStr(sysAppUserExport.getCreateTime().toLocalDate().toString()); |
| | | } |
| | | Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TSysAppUserExport.class, sysAppUserExports); |
| | |
| | | sysAppUser.setNickName(appletUserDecodeData.getPhoneNumber().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2")); |
| | | sysAppUserService.save(sysAppUser); |
| | | }else { |
| | | // 判断账号是否被冻结 |
| | | if (sysAppUser.getStatus() == 2){ |
| | | return R.fail("账号已冻结,请联系管理员"); |
| | | } |
| | | // 手机号相同但openId为空的情况 |
| | | sysAppUser.setOpenId(appletUserDecodeData.getOpenId()); |
| | | sysAppUserService.updateById(sysAppUser); |
| | | } |
| | | LoginUserApplet loginUserApplet = new LoginUserApplet(); |
| | | TSysUserResp sysUserResp = new TSysUserResp(); |
| | |
| | | private String monthPurchaseAmountStr; |
| | | private BigDecimal monthPurchaseAmount; |
| | | @Excel(name = "业绩状态",width = 20,replace = {"未达成_1","已达成_2"}) |
| | | private Integer performanceStatus; |
| | | private Integer performanceStatus=1; |
| | | @Excel(name = "状态",width = 20,replace = {"待审核_1","已拒绝_2","使用中_3","冻结_4"}) |
| | | private Integer status; |
| | | } |
| | |
| | | package com.ruoyi.system.model; |
| | | |
| | | import cn.afterturn.easypoi.excel.annotation.Excel; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | |
| | | @TableField("position_id") |
| | | private String positionId; |
| | | |
| | | @Excel(name = "底薪", width = 20,orderNum = "2") |
| | | @ApiModelProperty(value = "底薪") |
| | | @TableField("base_salary") |
| | | private BigDecimal baseSalary; |
| | | |
| | | @Excel(name = "差旅补助", width = 20,orderNum = "3") |
| | | @ApiModelProperty(value = "差旅补助") |
| | | @TableField("travel_allowance") |
| | | private BigDecimal travelAllowance; |
| | | |
| | | @Excel(name = "职位名称", width = 20,orderNum = "1") |
| | | @ApiModelProperty(value = "职位名称") |
| | | @TableField(exist = false) |
| | | private String positionName; |
| | |
| | | @ApiModelProperty(value = "前端忽略") |
| | | private Integer roleType; |
| | | @ApiModelProperty(value = "前端忽略") |
| | | private LocalDate createTime; |
| | | private String createTime; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "慢性病id") |
| | | private String inspectionId; |
| | | @ApiModelProperty(value = "前端忽略") |
| | | private Integer roleType; |
| | | |
| | | } |
| | |
| | | if(!CollectionUtils.isEmpty(crmBranchAreas)){ |
| | | List<String> branchIds = crmBranchAreas.stream().map(TCrmBranchArea::getBranchId).collect(Collectors.toList()); |
| | | query.setBranchIds(branchIds); |
| | | }else { |
| | | return new ArrayList<>(); |
| | | } |
| | | List<TCrmBranchExport> list = this.baseMapper.exportList(query); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | |
| | | |
| | | @Override |
| | | public PageInfo<TCrmClinicVO> pageList(TCrmClinicQuery query) { |
| | | query.setCreateTime(LocalDate.now()); |
| | | String monthDate = new SimpleDateFormat("yyyy-MM").format(new Date()); |
| | | query.setCreateTime(monthDate); |
| | | PageInfo<TCrmClinicVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TCrmClinicVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | List<String> clinicIds = list.stream().map(TCrmClinicVO::getId).collect(Collectors.toList()); |
| | | String monthDate = new SimpleDateFormat("yyyy-MM").format(new Date()); |
| | | List<TErpProcurement> procurements = erpProcurementService.list(Wrappers.lambdaQuery(TErpProcurement.class) |
| | | .in(TErpProcurement::getClinicId, clinicIds) |
| | | .in(TErpProcurement::getStatus, Arrays.asList(3,4,5)) |
| | |
| | | |
| | | @Override |
| | | public List<TCrmClinicListExport> exportList(TCrmClinicQuery query) { |
| | | query.setCreateTime(LocalDate.now()); |
| | | String monthDate = new SimpleDateFormat("yyyy-MM").format(new Date()); |
| | | query.setCreateTime(monthDate); |
| | | List<TCrmClinicListExport> list = this.baseMapper.exportList(query); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | return list; |
| | | } |
| | | |
| | | List<String> clinicIds = list.stream().map(TCrmClinicListExport::getId).collect(Collectors.toList()); |
| | | String monthDate = new SimpleDateFormat("yyyy-MM").format(new Date()); |
| | | List<TErpProcurement> procurements = erpProcurementService.list(Wrappers.lambdaQuery(TErpProcurement.class) |
| | | .in(TErpProcurement::getClinicId, clinicIds) |
| | | .in(TErpProcurement::getStatus, Arrays.asList(3,4,5)) |
| | |
| | | and tcc.salesperson_id = #{query.salespersonId} |
| | | </if> |
| | | <if test="query.performanceStatus != null and query.performanceStatus == 1"> |
| | | and tcc.low_procurement_money < (SELECT IFNULL(SUM(pay_money),0) FROM |
| | | and tcc.low_procurement_money >= (SELECT IFNULL(SUM(pay_money),0) FROM |
| | | t_erp_procurement |
| | | WHERE clinic_id = tcc.id AND status in (3,4,5) |
| | | AND create_time LIKE concat(#{query.createTime},'%') |
| | |
| | | ) |
| | | </if> |
| | | <if test="query.performanceStatus != null and query.performanceStatus == 2"> |
| | | and tcc.low_procurement_money >= (SELECT IFNULL(SUM(pay_money),0) FROM |
| | | and tcc.low_procurement_money < (SELECT IFNULL(SUM(pay_money),0) FROM |
| | | t_erp_procurement |
| | | WHERE clinic_id = tcc.id AND status in (3,4,5) |
| | | AND create_time LIKE concat(#{query.createTime},'%') |
| | |
| | | <if test="query.status != null"> |
| | | and tcc.status = #{query.status} |
| | | </if> |
| | | <if test="query.branchId != null and query.userId == 2"> |
| | | <if test="query.branchId != null and query.roleType == 2"> |
| | | and tcc.branch_id = #{query.branchId} |
| | | </if> |
| | | <if test="query.salespersonId != null and query.userId == 3"> |
| | | <if test="query.salespersonId != null and query.roleType == 3"> |
| | | and tcc.salesperson_id = #{query.salespersonId} |
| | | </if> |
| | | and tcc.status in (3,4) |
| | | <if test="query.roleType != null and query.roleType == 1"> |
| | | and tcc.status in (3,4) |
| | | </if> |
| | | AND tcc.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tcc.create_time DESC |
| | |
| | | and tcc.salesperson_id = #{query.salespersonId} |
| | | </if> |
| | | <if test="query.performanceStatus != null and query.performanceStatus == 1"> |
| | | and tcc.low_procurement_money < (SELECT IFNULL(SUM(pay_money),0) FROM |
| | | and tcc.low_procurement_money >= (SELECT IFNULL(SUM(pay_money),0) FROM |
| | | t_erp_procurement |
| | | WHERE clinic_id = tcc.id AND status in (3,4,5) |
| | | AND create_time LIKE concat(#{query.createTime},'%') |
| | |
| | | ) |
| | | </if> |
| | | <if test="query.performanceStatus != null and query.performanceStatus == 2"> |
| | | and tcc.low_procurement_money >= (SELECT IFNULL(SUM(pay_money),0) FROM |
| | | and tcc.low_procurement_money < (SELECT IFNULL(SUM(pay_money),0) FROM |
| | | t_erp_procurement |
| | | WHERE clinic_id = tcc.id AND status in (3,4,5) |
| | | AND create_time LIKE concat(#{query.createTime},'%') |
| | |
| | | <if test="query.status != null"> |
| | | and tsau.status = #{query.status} |
| | | </if> |
| | | <if test="query.roleType != null and query.roleType != 1"> |
| | | and tsau.status = 1 |
| | | </if> |
| | | AND tsau.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tsau.create_time DESC |
| | |
| | | </if> |
| | | <if test="query.inspectionId != null and query.inspectionId != ''"> |
| | | and FIND_IN_SET(#{query.inspectionId},tsau.chronic_disease_id) |
| | | </if> |
| | | <if test="query.roleType != null and query.roleType != 1"> |
| | | and tsau.status = 1 |
| | | </if> |
| | | AND tsau.chronic_disease_id IS NOT NULL |
| | | AND tsau.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | |
| | | <if test="query.inspectionId != null and query.inspectionId != ''"> |
| | | and FIND_IN_SET(#{query.inspectionId},tsau.chronic_disease_id) |
| | | </if> |
| | | <if test="query.roleType != null and query.roleType != 1"> |
| | | and tsau.status = 1 |
| | | </if> |
| | | AND tsau.chronic_disease_id IS NOT NULL |
| | | AND tsau.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | |
| | | <if test="query.status != null"> |
| | | and tsau.status = #{query.status} |
| | | </if> |
| | | <if test="query.roleType != null and query.roleType != 1"> |
| | | and tsau.status = 1 |
| | | </if> |
| | | AND tsau.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tsau.create_time DESC |