| | |
| | | æææå
å«éæ©æ¥æ |
| | | </el-form-item> |
| | | </div> |
| | | <div class="tip-line"> |
| | | <el-form-item label="å¼éç¨æ·æ°" prop="openUserNum"> |
| | | <el-input v-model="form.openUserNum" placeholder="请è¾å
¥å¼éç¨æ·æ°" v-trim/> |
| | | 注ï¼ä¸º0ä¸éå¶äººæ° |
| | | </el-form-item> |
| | | </div> |
| | | <div class="tip-line"> |
| | | <el-form-item label="éå®äººå" prop="salesperson"> |
| | | <el-select v-model="form.salesperson" filterable clearable placeholder="è¯·éæ©ç±»å"> |
| | |
| | | linkPhone: '', |
| | | fileStoreAddr: '', |
| | | fileurlfull: '', |
| | | openUserNum:0 |
| | | // fileList: [], |
| | | }, |
| | | isEdit: false, |
| | |
| | | creditCode: [ |
| | | { required: true, validator: creditCode, trigger: 'blur' } |
| | | ], |
| | | |
| | | openUserNum: [ |
| | | { pattern: /^[0-9]+$/, message: 'åªå¯ä»¥è¾å
¥æ°å', trigger: 'change'} |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="short-line"> |
| | | <el-form-item label="å¼éç¨æ·æ°" prop="openUserNum"> |
| | | <el-input v-model="form.openUserNum" placeholder="请è¾å
¥å¼éç¨æ·æ°" v-trim/> |
| | | <span style="display:inline;font-size:10px;color:red">注ï¼ä¸º0ä¸éå¶äººæ°</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-line"> |
| | | <el-form-item label="æææ" prop="oepnValidDate"> |
| | | <el-date-picker |
| | |
| | | |
| | | oepnType: '1', |
| | | remark: '', |
| | | oepnValidDate: '' |
| | | oepnValidDate: '', |
| | | openUserNum:0 |
| | | }, |
| | | types:[], |
| | | // éªè¯è§å |
| | | rules: { |
| | | |
| | | openUserNum: [ |
| | | { pattern: /^[0-9]+$/, message: 'åªå¯ä»¥è¾å
¥æ°å', trigger: 'change' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | |
| | | update({ |
| | | ...this.form, |
| | | companyId: this.form.id, |
| | | validDate: this.form.oepnValidDate |
| | | validDate: this.form.oepnValidDate, |
| | | userNum:this.form.openUserNum |
| | | }) |
| | | .then(() => { |
| | | this.visible = false |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="phone" label="主账å·" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="phone" label="人æ°éå¶" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="linkName" label="è系人" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="linkPhone" label="èç³»çµè¯" align="center" min-width="120px"></el-table-column> |
| | | <el-table-column prop="oepnValidDate" label="æææ" align="center" min-width="140px"></el-table-column> |
| | | <el-table-column prop="openUserNum" label="å¼éç¨æ·æ°" align="center" min-width="140px"></el-table-column> |
| | | <el-table-column prop="salespersonName" label="éå®äººå" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createTime" label="å建æ¶é´" align="center" min-width="140px"></el-table-column> |
| | | <el-table-column prop="status" label="ç¶æ" align="center" min-width="100px"> |
| | |
| | | <template slot-scope="{ row }"> |
| | | <!-- <el-button type="text" @click="$refs.operaClientMangerWindow.open('ç¼è¾å®¢æ·', row)">ç¼è¾</el-button> --> |
| | | <el-button type="text" @click="showDetail(row, true)">ç¼è¾</el-button> |
| | | <el-button type="text" @click="$refs.operaClientValidDateWindow.open('è°æ´æææ', row)">è°æ´æææ</el-button> |
| | | <el-button type="text" @click="$refs.operaClientValidDateWindow.open('è°æ´', row)">è°æ´</el-button> |
| | | <el-button type="text" @click="$refs.operaDDSettingWindow.open('ééé
ç½®', row)">ééé
ç½®</el-button> |
| | | <el-button type="text" style="color:red" :loading="isWorking.delete" |
| | | @click="deleteById(row, false)">å é¤</el-button> |
| | |
| | | <el-option value="false" label="ç»å½å¤±è´¥"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥æº" prop="success"> |
| | | <el-select v-model="searchForm.orgin" placeholder="è¯·éæ©ç»å½æ¥æº" clearable @change="search"> |
| | | <el-option value="0" label="PCç»é"/> |
| | | <el-option value="1" label="ééå¹³å°"/> |
| | | <el-option value="2" label="ç¾ç¾å¹³å°"/> |
| | | <el-option value="3" label="EDGPå¹³å°"/> |
| | | <el-option value="4" label="微信å°ç¨åº"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç»å½æ¶é´" prop="loginTime"> |
| | | <el-date-picker |
| | | v-model="searchDateRange" |
| | |
| | | :default-sort="{prop: 'loginTime', order: 'descending'}" |
| | | @sort-change="handleSortChange" |
| | | > |
| | | <el-table-column prop="orgin" label="æ¥æº" align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{row.orgin | orginText}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="companyName" label="ä¼ä¸åç§°" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="loginUsername" label="ç»å½ç¨æ·å" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="ip" label="ç»å½IP" align="center" min-width="120px"></el-table-column> |
| | | <el-table-column prop="location" label="ç»å½å°å" align="center" min-width="160px"></el-table-column> |
| | |
| | | serverIp: '', |
| | | success: '', |
| | | startTime: null, |
| | | endTime: null |
| | | endTime: null, |
| | | orgin:'' |
| | | } |
| | | } |
| | | }, |
| | |
| | | return 'ç»å½æå' |
| | | } |
| | | return 'ç»å½å¤±è´¥' |
| | | }, |
| | | orginText (value) { |
| | | if (value ==0) { |
| | | return 'pcå¹³å°' |
| | | }else if (value == 1) { |
| | | return 'ééå¹³å°' |
| | | }else if (value == 2) { |
| | | return 'ç¾ç¾å¹³å°' |
| | | }else if (value == 3) { |
| | | return 'EDGPå¹³å°' |
| | | }else{ |
| | | return 'pc-å¹³å°'; |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | <groupId>com.github.pagehelper</groupId> |
| | | <artifactId>pagehelper-spring-boot-starter</artifactId> |
| | | <version>1.2.13</version> |
| | | <exclusions> |
| | | <exclusion> |
| | | <artifactId>mybatis-spring</artifactId> |
| | | <groupId>org.mybatis</groupId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <!-- è¿æ¥æ± --> |
| | | <dependency> |
| | |
| | | <systemPath>${project.basedir}/lib/antelope-other-client-20230203.0.1.jar |
| | | </systemPath> |
| | | </dependency> |
| | | <!-- https://mvnrepository.com/artifact/com.github.yulichang/mybatis-plus-join --> |
| | | <dependency> |
| | | <groupId>com.github.yulichang</groupId> |
| | | <artifactId>mybatis-plus-join</artifactId> |
| | | <version>1.4.2.2</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | <build> |
| | | <resources> |
| | |
| | | import doumeemes.core.model.PageWrap; |
| | | import doumeemes.dao.business.dto.statistics.*; |
| | | import doumeemes.dao.ext.dto.*; |
| | | import doumeemes.dao.ext.vo.DepartmentExtListVO; |
| | | import doumeemes.dao.ext.vo.DeviceCheckExtListVO; |
| | | import doumeemes.dao.ext.vo.PlansExtListVO; |
| | | import doumeemes.service.ext.StatisticsService; |
| | |
| | | } |
| | | @ApiOperation("æ°æ®ç»è®¡-å·¥åºè®¡åï¼æ§è¡ä¸ãå»¶æè®¡åæ°ã仿¥ç产人æ°ã仿¥çäº§è®¾å¤æ°ã仿¥ä¸è¯å") |
| | | @GetMapping("/getProcedurePlanData/{companyId}/{departId}") |
| | | public ApiResponse<StatisticsPlanDataModel> getProcedurePlanData(@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam Integer procedureId) { |
| | | public ApiResponse<StatisticsPlanDataModel> getProcedurePlanData(@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam(required = false) Integer procedureId) { |
| | | return ApiResponse.success(statisticsService.getProcedurePlanData(companyId,departId,procedureId)); |
| | | } |
| | | @ApiOperation("å工产åç»è®¡TOP10") |
| | | @GetMapping("/userProduceTop/{companyId}/{departId}") |
| | | public ApiResponse<List<UserProduceTopModel>> getUserProducceTop(@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam Integer procedureId) { |
| | | public ApiResponse<List<UserProduceTopModel>> getUserProducceTop(@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam(required = false) Integer procedureId) { |
| | | return ApiResponse.success(statisticsService.getUserProduceTopData(companyId,departId,procedureId)); |
| | | } |
| | | @ApiOperation("è¿7天ä¸è¯ååå¸-ä¸è¯åæ°éç»è®¡") |
| | | @GetMapping("/getUnqualified7DayData/{companyId}/{departId}") |
| | | public ApiResponse<List<Unqualified7DayModel>> getUnqualified7DayData(@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam Integer procedureId) { |
| | | public ApiResponse<List<Unqualified7DayModel>> getUnqualified7DayData(@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam(required = false) Integer procedureId) { |
| | | return ApiResponse.success(statisticsService.getUnqualified7DayData(companyId,departId,procedureId)); |
| | | } |
| | | @ApiOperation("è¿7天ä¸è¯ååå¸-ä¸è¯åæ°é-æä¸è¯é¡¹ç»è®¡") |
| | | @GetMapping("/getUnqualifiedCateData/{companyId}/{departId}") |
| | | public ApiResponse<List<UnqualifiedCateModel>> getUnqualifiedCateData(@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam Integer procedureId) { |
| | | public ApiResponse<List<UnqualifiedCateModel>> getUnqualifiedCateData(@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam(required = false) Integer procedureId) { |
| | | return ApiResponse.success(statisticsService.getUnqualifiedCateData(companyId,departId,procedureId)); |
| | | } |
| | | @ApiOperation("æ¥å·¥æ¥å¿å页æ¥è¯¢") |
| | |
| | | } |
| | | @ApiOperation("å·¥åºè®¡åè¿åº¦æ¥è¯¢") |
| | | @GetMapping("/getProcedurePlansList/{companyId}/{departId}") |
| | | public ApiResponse<List<ProcedurePlansPageModel>> getProcedurePlansList (@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam Integer procedureId) { |
| | | public ApiResponse<List<ProcedurePlansPageModel>> getProcedurePlansList (@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam(required = false) Integer procedureId) { |
| | | return ApiResponse.success(statisticsService.getProcedurePlansPage(companyId,departId,procedureId)); |
| | | } |
| | | @ApiOperation("æå计åè¿åº¦æ¥è¯¢") |
| | |
| | | return ApiResponse.success(statisticsService.getStockList(companyId,departId)); |
| | | } |
| | | |
| | | @ApiOperation("æ¡ä»¶æ¥è¯¢ä¼ä¸å
¨é¨å
¬å¸é¨é¨") |
| | | @GetMapping("/getDepartmentList/{companyId}") |
| | | public ApiResponse<List<DepartmentExtListVO>> getDepartmentList (@PathVariable Integer companyId ) { |
| | | return ApiResponse.success(statisticsService.getDepartmentList(companyId)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | CompanyUser cu = new CompanyUser(); |
| | | cu.setDeleted(Constants.ZERO); |
| | | cu.setRootDepartId(loginUser.getRootDepartment().getId()); |
| | | //éå¶äººæ° |
| | | int limitUserNum = Constants.formatIntegerNum(loginUser.getCompany().getOpenUserNum()); |
| | | if(limitUserNum > 0){ |
| | | //人æ°éå¶è¾å
¥0ï¼è¡¨ç¤ºä¸éå¶äººæ° |
| | | if(companyUserExtMapper.selectCount(new QueryWrapper<>(cu)) +1 > limitUserNum ){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·æ°éè¶
è¿è´ä¹°æ°éï¼è¯·èç³»ä¸å¡ç»çç»è´!"); |
| | | } |
| | | } |
| | | if(user ==null){ |
| | | //å¦æç¨æ·è´¦å·ä¸åå¨ï¼æ°å¢ç¨æ· |
| | | // çæå¯ç ç |
| | |
| | | public class Constants { |
| | | |
| | | |
| | | // public static String REDIS_VERSION="alks_"; |
| | | public static final String LINGYANG_USERNUM_LIMIT = "LINGYANG_USERNUM_LIMIT"; |
| | | // public static String REDIS_VERSION="alks_"; |
| | | public static String REDIS_VERSION="dm_"; |
| | | public static final int ZERO = 0 ; |
| | | public static final int ONE = 1 ; |
| | |
| | | |
| | | @ApiModelProperty(value = "éå®äººå ï¼å
³èsystem_user表ï¼å¹³å°ç®¡çåç±»ç¨æ·ï¼", example = "1") |
| | | private Integer salesperson; |
| | | |
| | | @ApiModelProperty(value = "å½åå¼éç¨æ·æ°", example = "1") |
| | | private Integer openUserNum; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "éå®äººå") |
| | | private Integer salesperson; |
| | | @ApiModelProperty(value = "å¼éç¨æ·æ°") |
| | | private Integer openUserNum; |
| | | |
| | | @ApiModelProperty(value = "éå®äººå") |
| | | private String salespersonName; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package doumeemes.dao.system.join; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.github.yulichang.base.mapper.MPJJoinMapper; |
| | | import doumeemes.dao.system.model.SystemLoginLog; |
| | | |
| | | public interface SystemLoginLogJoinMapper extends MPJJoinMapper<SystemLoginLog> { |
| | | |
| | | } |
| | |
| | | package doumeemes.dao.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import doumeemes.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | @ApiModelProperty(value = "ä¼ä¸ç¼ç ", example = "1") |
| | | private Integer companyId; |
| | | @ApiModelProperty(value = "æ¥æº 0pc 1éé 2ç¾ç¾å¹³å° 3EDGPå¹³å°", example = "1") |
| | | |
| | | @ExcelColumn(name="æ¥æº", valueMapping = "0=PCå¹³å°;1=ééå¹³å°;2=ç¾ç¾å¹³å°;3=EDGPå¹³å°;4=微信å°ç¨åº", align = HorizontalAlignment.CENTER) |
| | | private Integer orgin; |
| | | @ApiModelProperty(value = "ä¼ä¸ç¨æ·ç¼ç ", example = "1") |
| | | private Integer companyUserId; |
| | |
| | | @ApiModelProperty(value = "ç»å½æ¶é´") |
| | | @ExcelColumn(name="ç»å½æ¶é´", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 10) |
| | | private Date loginTime; |
| | | @ApiModelProperty(value = "ä¼ä¸åç§°") |
| | | @ExcelColumn(name="ä¼ä¸åç§°", color = IndexedColors.RED, width = 16) |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | |
| | | } |
| | |
| | | LoginUserInfo principal = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | UpdateWrapper<CompanyOpen> wrapper = new UpdateWrapper<>(); |
| | | wrapper.lambda().eq(CompanyOpen::getCompanyId,companyOpen.getCompanyId()) |
| | | .set(CompanyOpen::getUserNum,companyOpen.getUserNum()) |
| | | .set(CompanyOpen::getValidDate,companyOpen.getValidDate()) |
| | | .set(CompanyOpen::getOepnType,companyOpen.getOepnType()); |
| | | companyOpenMapper.update(null,wrapper); |
| | |
| | | company.setId(companyOpen.getCompanyId()); |
| | | company.setOepnValidDate(companyOpen.getValidDate()); |
| | | company.setOepnType(companyOpen.getOepnType()); |
| | | company.setOpenUserNum(companyOpen.getUserNum()); |
| | | companyMapper.updateById(company); |
| | | Company company1 = companyMapper.selectById(companyOpen.getCompanyId()); |
| | | |
| | |
| | | companyLog.setRemark("æææä»"+format.format(cyResult.getOepnValidDate())+"æ¥è°æ´è³"+format.format(companyOpen.getValidDate())); |
| | | companyLog.setCompanyId(company.getId()); |
| | | companyLog.setUpdateType(Constants.CompanyUpdateType.UPDATE_VAIL_DATE.getKey()); |
| | | companyLog.setDetail("æææä»"+format.format(cyResult.getOepnValidDate())+"æ¥è°æ´è³"+format.format(companyOpen.getValidDate())); |
| | | companyLog.setDetail("æææä»"+format.format(cyResult.getOepnValidDate())+"æ¥è°æ´è³"+format.format(companyOpen.getValidDate())+"\n"+ |
| | | "ç¨æ·å¼é人æ°ä»"+format.format(cyResult.getOpenUserNum())+"è°æ´è³"+format.format(companyOpen.getUserNum())); |
| | | companyLogService.create(companyLog); |
| | | |
| | | initRedisCache(company1); |
| | |
| | | |
| | | List<ProcedureProcessModel> getProcedureProcessList(Integer companyId, Integer departId); |
| | | List<StockDataModel> getStockList(Integer companyId, Integer departId); |
| | | |
| | | List<DepartmentExtListVO> getDepartmentList(Integer companyId); |
| | | } |
| | |
| | | com.setOepnValidDate(user.getOepnValidDate()); |
| | | com.setLinker(user.getLinkName()); |
| | | com.setLinkPhone(user.getLinkPhone()); |
| | | com.setOpenUserNum(user.getOpenUserNum()); |
| | | com.setAddr(user.getAddr()); |
| | | com.setFileStoreAddr(user.getFileStoreAddr()); |
| | | com.setShortName(user.getRemark()); |
| | |
| | | com.setName(user.getOrgName()); |
| | | com.setLingyangInfo(user.getUserinfo()); |
| | | com.setLegalPersonPhone(user.getPhone()); |
| | | com.setOpenUserNum(-1); |
| | | //é»è®¤éå¶äººå10 |
| | | if(user.getOrigin() == Constants.COMPANY_ORIGIN.lingyang){ |
| | | int userNum = 10; |
| | | try { |
| | | userNum =Integer.parseInt(systemDictDataBiz.queryByCode(Constants.LINGYANG_PARAM, Constants.LINGYANG_USERNUM_LIMIT).getCode()); |
| | | }catch (Exception e){ |
| | | } |
| | | com.setOpenUserNum(userNum); |
| | | }else{ |
| | | com.setOpenUserNum(-1); |
| | | } |
| | | com.setOpenModules(Constants.ONE+""); |
| | | com.setOepnValidDate(DateUtil.StringToDate("2099-12-31 09:25:09")); |
| | | com.setOepnType(Constants.ONE); |
| | | com.setStatus(Constants.ONE); |
| | | com.setChannelId(Constants.TWO); |
| | | com.setOrigin(user.getOrigin()); |
| | | // com.setDingdingId(user.getco); |
| | | //æå
¥ä¼ä¸ä¿¡æ¯ |
| | | companyExtMapper.insert(com); |
| | | |
| | |
| | | @Autowired |
| | | private WorkPlansExtMapper workPlansExtMapper; |
| | | @Autowired |
| | | private CompanyExtService companyExtService; |
| | | @Autowired |
| | | private DepartmentExtService departmentExtService; |
| | | @Autowired |
| | | private RouteProcedureExtMapper routeProcedureExtMapper; |
| | | @Autowired |
| | | private PlansExtMapper plansExtMapper; |
| | |
| | | private WStockExtMapper stockExtMapper; |
| | | @Autowired |
| | | private WorkorderRecordExtMapper workorderRecordExtMapper; |
| | | @Autowired |
| | | private DepartmentExtService departmentExtService; |
| | | @Autowired |
| | | private DeviceCheckExtService deviceCheckExtService; |
| | | @Autowired |
| | |
| | | return result; |
| | | } |
| | | @Override |
| | | public List<DepartmentExtListVO> getDepartmentList(Integer companyId){ |
| | | CompanyExtListVO companyExtListVO = companyExtService.getModelById(companyId); |
| | | if(companyExtListVO == null || Constants.equalsInteger(companyExtListVO.getDeleted(), Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼ä¼ä¸æè
é¨é¨ä¿¡æ¯ä¸åæ³ï¼å¦æçé®ï¼è¯·è系系ç»ç®¡çå"); |
| | | } |
| | | QueryDepartmentExtDTO param = new QueryDepartmentExtDTO(); |
| | | param.setDeleted(Constants.ZERO); |
| | | param.setCompanyId(companyId); |
| | | param.setType(Constants.DEPART_TYPE.com); |
| | | List<DepartmentExtListVO> result = departmentExtService.findList(param); |
| | | return result; |
| | | } |
| | | @Override |
| | | public List<Unqualified7DayModel> getUnqualified7DayData(Integer companyId, Integer departId, Integer procedureId) { |
| | | DepartmentExtListVO department = departmentExtService.getModelById(companyId,departId); |
| | | if(department == null || Constants.equalsInteger(department.getDeleted(), Constants.ONE)){ |
| | |
| | | package doumeemes.service.system.impl; |
| | | |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import doumeemes.core.model.PageData; |
| | | import doumeemes.core.model.PageWrap; |
| | | import doumeemes.core.utils.Utils; |
| | | import doumeemes.dao.business.model.Company; |
| | | import doumeemes.dao.system.SystemLoginLogMapper; |
| | | import doumeemes.dao.system.dto.QuerySystemLoginLogDTO; |
| | | import doumeemes.dao.system.join.SystemLoginLogJoinMapper; |
| | | import doumeemes.dao.system.model.SystemLoginLog; |
| | | import doumeemes.dao.system.model.SystemTraceLog; |
| | | import doumeemes.service.system.SystemLoginLogService; |
| | |
| | | |
| | | @Autowired |
| | | private SystemLoginLogMapper systemLoginLogMapper; |
| | | @Autowired |
| | | private SystemLoginLogJoinMapper systemLoginLogJoinMapper; |
| | | |
| | | @Override |
| | | public Integer create(SystemLoginLog systemLoginLog) { |
| | |
| | | @Override |
| | | public PageData<SystemLoginLog> findPage(PageWrap<QuerySystemLoginLogDTO> pageWrap) { |
| | | IPage<SystemLoginLog> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<SystemLoginLog> queryWrapper = new QueryWrapper<>(); |
| | | |
| | | MPJLambdaWrapper<SystemLoginLog> mpjLambdaWrapper = new MPJLambdaWrapper<>(); |
| | | mpjLambdaWrapper.selectAll(SystemLoginLog.class); |
| | | mpjLambdaWrapper.leftJoin(Company.class,Company::getId,SystemLoginLog::getCompanyId); |
| | | mpjLambdaWrapper.selectAs(Company::getName, SystemLoginLog::getCompanyName); |
| | | // ç»å½ç¨æ·å |
| | | if (StringUtils.isNotBlank(pageWrap.getModel().getLoginUsername())) { |
| | | queryWrapper.lambda().like(SystemLoginLog::getLoginUsername, pageWrap.getModel().getLoginUsername()); |
| | | mpjLambdaWrapper.like(SystemLoginLog::getLoginUsername, pageWrap.getModel().getLoginUsername()); |
| | | } |
| | | // ç»å½IP |
| | | if (StringUtils.isNotBlank(pageWrap.getModel().getIp())) { |
| | | queryWrapper.lambda().eq(SystemLoginLog::getIp, pageWrap.getModel().getIp()); |
| | | mpjLambdaWrapper.eq(SystemLoginLog::getIp, pageWrap.getModel().getIp()); |
| | | } |
| | | if ( pageWrap.getModel().getOrgin() !=null) { |
| | | mpjLambdaWrapper.eq(SystemLoginLog::getOrgin, pageWrap.getModel().getOrgin()); |
| | | } |
| | | // æå¡å¨IP |
| | | if (StringUtils.isNotBlank(pageWrap.getModel().getServerIp())) { |
| | | queryWrapper.lambda().eq(SystemLoginLog::getServerIp, pageWrap.getModel().getServerIp()); |
| | | mpjLambdaWrapper.eq(SystemLoginLog::getServerIp, pageWrap.getModel().getServerIp()); |
| | | } |
| | | // ç»å½ç¶æ |
| | | if (pageWrap.getModel().getSuccess() != null) { |
| | | queryWrapper.lambda().eq(SystemLoginLog::getSuccess, pageWrap.getModel().getSuccess()); |
| | | mpjLambdaWrapper.eq(SystemLoginLog::getSuccess, pageWrap.getModel().getSuccess()); |
| | | } |
| | | // ç»å½å¼å§æ¶é´ |
| | | if (pageWrap.getModel().getStartTime() != null) { |
| | | queryWrapper.lambda().ge(SystemLoginLog::getLoginTime, pageWrap.getModel().getStartTime()); |
| | | mpjLambdaWrapper.ge(SystemLoginLog::getLoginTime, pageWrap.getModel().getStartTime()); |
| | | } |
| | | // ç»å½ç»ææ¶é´ |
| | | if (pageWrap.getModel().getStartTime() != null) { |
| | | queryWrapper.lambda().lt(SystemLoginLog::getLoginTime, pageWrap.getModel().getEndTime()); |
| | | mpjLambdaWrapper.lt(SystemLoginLog::getLoginTime, pageWrap.getModel().getEndTime()); |
| | | } |
| | | // åæ®µæåº |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase("DESC")) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(systemLoginLogMapper.selectPage(page, queryWrapper)); |
| | | |
| | | mpjLambdaWrapper.orderByDesc(SystemLoginLog::getLoginTime); |
| | | return PageData.from(systemLoginLogJoinMapper.selectJoinPage(page, SystemLoginLog.class,mpjLambdaWrapper)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | <select id="selectCompanyInfoList" parameterType="doumeemes.dao.ext.dto.QueryCompanyExtDTO" resultType="doumeemes.dao.ext.vo.CompanyInfoListVO" > |
| | | SELECT |
| | | comp.ID, |
| | | comp.OPEN_USER_NUM as openUserNum, |
| | | comp.NAME as companyName, |
| | | dept.name AS remark, |
| | | comp.ADDR, |