| | |
| | | public static final String HEADER_USER_TOKEN = "dm_user_token"; |
| | | public static final String REDIS_TOKEN_KEY = "token_"; |
| | | public static final String REDIS_HK_TOKEN_KEY = "hk_token_"; |
| | | public static final String HK_TOKEN_VALIDITY = "HK_TOKEN_VALIDITY"; |
| | | public static final String[] ALL_SPELL_LIST_FIRST = new String[]{"A", "B", "C", "D", "E", "F", "G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}; |
| | | public static final int ZERO = 0 ; |
| | | public static final int ONE = 1 ; |
| | |
| | | AUTHED_LEAVE(9, "å·²ææç¦»å","å·²ææç¦»å" ), |
| | | LEAVED(10, "已离å ","已离å " ), |
| | | OVER_NUMBER(11, "å·²è¿å·","å·²è¿å·" ), |
| | | CANCEL(12, "已忶","已忶" ), |
| | | ; |
| | | |
| | | // æååé |
| | |
| | | package com.doumee.core.utils; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | |
| | | import javax.crypto.Cipher; |
| | | import javax.crypto.CipherInputStream; |
| | | import javax.crypto.CipherOutputStream; |
| | |
| | | import java.io.*; |
| | | import java.security.Key; |
| | | import java.util.Base64; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | public class DESUtil { |
| | | |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 海康å å¯ |
| | | * @param userName |
| | | * @param hour |
| | | * @return |
| | | */ |
| | | public static String generateTokenToHk(String userName,Integer hour, RedisTemplate<String,Object> redisTemplate){ |
| | | long currentTimeMillis = System.currentTimeMillis() + 1000*60*60*hour; |
| | | String encrypt = DESUtil.encrypt("12345678",currentTimeMillis + "_" + userName ); |
| | | redisTemplate.opsForValue().set(Constants.REDIS_HK_TOKEN_KEY+encrypt, encrypt,1000*60*60*hour, TimeUnit.MILLISECONDS); |
| | | return encrypt; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 海康解ç |
| | | * @param token |
| | | * @return |
| | | */ |
| | | public static String verifyHkToken(String token){ |
| | | String decrypt = DESUtil.decrypt("12345678",token); |
| | | if(StringUtils.isBlank(decrypt)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"tokenè§£æå¤±è´¥"); |
| | | } |
| | | try{ |
| | | Integer index_ = decrypt.indexOf("_"); |
| | | long currentTimeMillis = Long.valueOf(decrypt.substring(Constants.ZERO,index_)); |
| | | if(currentTimeMillis<=System.currentTimeMillis()){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"tokenå·²è¿æ"); |
| | | } |
| | | String userName = decrypt.substring(index_+Constants.ONE); |
| | | return userName ; |
| | | }catch (Exception e){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"tokenè§£æå¤±è´¥"); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | return DateToStr(date, "yyyyMMdd"); |
| | | } |
| | | |
| | | public static String afterDateHourToStr(Integer hour){ |
| | | Date date = new Date(); |
| | | Long l = date.getTime()+1000*60*60*hour; |
| | | date.setTime(l); |
| | | return DateToStr(date, "yyyyMMdd"); |
| | | } |
| | | |
| | | public static String beforeDateToStr(Integer days){ |
| | | Date date = new Date(); |
| | | Long l = date.getTime()-1000*60*60*24*days; |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | |
| | | import com.doumee.core.haikang.model.param.request.event.visit.EventVisitRequest; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.dao.business.model.Device; |
| | | import com.doumee.service.business.impl.hksync.*; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | private HkSyncPushServiceImpl hkSyncPushService; |
| | | @Autowired |
| | | private HkSyncLoginAuthServiceImpl hkSyncLoginAuthService; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String,Object> redisTemplate; |
| | | |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("ãæµ·åº·ãå
¨é忥æå°ä¿¡æ¯æ¥å£") |
| | | @PostMapping("/syncPlatforms") |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type",example = "0",value = "èåç±»å", required = true), |
| | | }) |
| | | public ApiResponse<String> getHkMenuLink(Integer type){ |
| | | String token = "";//------------TODO----------康康继ç»å |
| | | return ApiResponse.success( HKService.getMenuUrl(type,token)); |
| | | public ApiResponse<String> getHkMenuLink(Integer type,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | LoginUserInfo loginUserInfo = this.getLoginUser(token); |
| | | String hkToken = DESUtil.generateTokenToHk(loginUserInfo.getUsername(),Integer.valueOf( |
| | | systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_TOKEN_VALIDITY).getCode() |
| | | ),redisTemplate); |
| | | return ApiResponse.success( HKService.getMenuUrl(type,hkToken)); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.PlatformBooks; |
| | | import com.doumee.dao.business.model.PlatformReason; |
| | | import com.doumee.dao.web.reqeust.PlatformBooksApplyDTO; |
| | | import com.doumee.dao.web.reqeust.PlatformBooksCheckNumDTO; |
| | | import com.doumee.dao.web.response.DriverHomeVO; |
| | | import com.doumee.service.business.PlatformBooksService; |
| | | import com.doumee.service.business.PlatformReasonService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private PlatformBooksService platformBooksService; |
| | | @Autowired |
| | | private PlatformReasonService platformReasonService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:platformbooks:create") |
| | | @CloudRequiredPermission("business:platformbooks:create") |
| | | public ApiResponse create(@RequestBody PlatformBooks platformBooks) { |
| | | return ApiResponse.success(platformBooksService.create(platformBooks)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:platformbooks:delete") |
| | | @CloudRequiredPermission("business:platformbooks:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | platformBooksService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:platformbooks:delete") |
| | | @CloudRequiredPermission("business:platformbooks:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:platformbooks:update") |
| | | @CloudRequiredPermission("business:platformbooks:update") |
| | | public ApiResponse updateById(@RequestBody PlatformBooks platformBooks) { |
| | | platformBooksService.updateById(platformBooks); |
| | | return ApiResponse.success(null); |
| | |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:platformbooks:query") |
| | | public ApiResponse<PageData<PlatformBooks>> findPage (@RequestBody PageWrap<PlatformBooks> pageWrap) { |
| | | @CloudRequiredPermission("business:platformbooks:query") |
| | | public ApiResponse<PageData<PlatformBooks>> findPage (@RequestBody PageWrap<PlatformBooks> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(platformBooksService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:platformbooks:exportExcel") |
| | | @CloudRequiredPermission("business:platformbooks:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<PlatformBooks> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(PlatformBooks.class).export(platformBooksService.findPage(pageWrap).getRecords(), "æå°å
¥åé¢çº¦ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:platformbooks:query") |
| | | @CloudRequiredPermission("business:platformbooks:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(platformBooksService.findById(id)); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("å
¥ååå ") |
| | | @GetMapping("/platformReasonList") |
| | | public ApiResponse<List<PlatformReason>> platformReasonList (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | List<PlatformReason> platformReasons = platformReasonService.findList(null); |
| | | return ApiResponse.success(platformReasons); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢å¯é¢çº¦é") |
| | | @PostMapping("/checkSurplusNum") |
| | | public ApiResponse<BigDecimal> checkSurplusNum (@RequestBody PlatformBooksCheckNumDTO platformBooksCheckNumDTO , @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(platformBooksService.checkNum(platformBooksCheckNumDTO)); |
| | | } |
| | | |
| | | @ApiOperation("ç©æµè½¦é¢çº¦") |
| | | @PostMapping("/apply") |
| | | public ApiResponse<Integer> apply (@RequestBody PlatformBooksApplyDTO platformBooksApplyDTO , @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | LoginUserInfo loginUserInfo = getLoginUser(token); |
| | | platformBooksApplyDTO.setUserId(loginUserInfo.getMemberId()); |
| | | platformBooksApplyDTO.setDriverId(loginUserInfo.getMemberId()); |
| | | return ApiResponse.success(platformBooksService.apply(platformBooksApplyDTO)); |
| | | } |
| | | |
| | | @ApiOperation("ç©æµè½¦é¢çº¦è¯¦æ
") |
| | | @GetMapping("/getDetail") |
| | | public ApiResponse<PlatformBooks> getDetail (@RequestParam Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | PlatformBooks platformBooks = platformBooksService.getDetail(id,getLoginUser(token).getMemberId()); |
| | | return ApiResponse.success(platformBooks); |
| | | } |
| | | } |
| | |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import com.doumee.dao.web.reqeust.JobOperateDTO; |
| | | import com.doumee.dao.web.reqeust.PlatformDataDTO; |
| | | import com.doumee.dao.web.response.PlatformGroupWorkVO; |
| | | import com.doumee.dao.web.response.PlatformWorkVO; |
| | | import com.doumee.service.business.PlatformGroupService; |
| | | import com.doumee.service.business.PlatformJobService; |
| | |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | @ApiOperation("ææç¦»åº") |
| | | @PostMapping("/powerLevel") |
| | | public ApiResponse powerLevel (@RequestBody JobOperateDTO jobOperateDTO, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | jobOperateDTO.setLoginUserInfo(getLoginUser(token)); |
| | | platformJobService.powerLevel(jobOperateDTO); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | @ApiOperation("è·åæå°ç» çå¾
ä¸å¼å¸¸æèµ·æ°æ®") |
| | | @GetMapping("/getPlatformGroupWork") |
| | | public ApiResponse<PlatformGroupWorkVO> getPlatformGroupWork (@RequestParam Integer platformGroupId, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(platformGroupService.getPlatformGroupWork(platformGroupId)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import com.doumee.dao.web.reqeust.JobDetailDTO; |
| | | import com.doumee.service.business.PlatformJobService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:platformjob:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | platformJobService.deleteById(id); |
| | | platformJobService.delete(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(platformJobService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation("ä»»å¡è¯¦æ
") |
| | | @PostMapping("/jobDetail") |
| | | @CloudRequiredPermission("business:platformjob:query") |
| | | public ApiResponse<PlatformJob> jobDetail (@RequestBody JobDetailDTO jobDetailDTO, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(platformJobService.getDetail(jobDetailDTO)); |
| | | } |
| | | } |
| | |
| | | package com.doumee.cloud.openapi; |
| | | |
| | | import cn.emay.sdk.util.AES; |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.config.jwt.JwtTokenUtil; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.dao.openapi.request.*; |
| | | import com.doumee.dao.openapi.response.*; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.PlatformJobService; |
| | | import com.doumee.service.business.PlatformLogService; |
| | | import com.doumee.service.business.PlatformService; |
| | | import com.doumee.service.business.PlatformWaterGasService; |
| | | import com.doumee.service.system.SystemUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | |
| | | @Autowired |
| | | private PlatformWaterGasService platformWaterGasService; |
| | | |
| | | @Autowired |
| | | private SystemUserService systemUserService; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String,Object> redisTemplate; |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("tokenè§£æ") |
| | | @GetMapping("/water/decodeToken") |
| | | public ApiResponse<Map<String,Object>> decodeToken(@RequestParam String token) { |
| | | HkBaseTokenRequest hkBaseTokenRequest = new HkBaseTokenRequest(); |
| | | hkBaseTokenRequest.setToken(token); |
| | | return ApiResponse.success(this.decodeTokenForHk(hkBaseTokenRequest)); |
| | | } |
| | | |
| | | |
| | | public Map<String,Object> decodeTokenForHk(HkBaseTokenRequest hkBaseTokenRequest){ |
| | | if(Objects.isNull(hkBaseTokenRequest)||StringUtils.isBlank(hkBaseTokenRequest.getToken())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"tokenåæ°ä¸ºç©º"); |
| | | } |
| | | String redisToken = (String) redisTemplate.opsForValue().get(Constants.REDIS_HK_TOKEN_KEY+hkBaseTokenRequest.getToken()); |
| | | if(StringUtils.isBlank(redisToken)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"tokenè§£æå¤±è´¥"); |
| | | } |
| | | |
| | | String userName = DESUtil.verifyHkToken(hkBaseTokenRequest.getToken()); |
| | | if(StringUtils.isBlank(userName)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"tokenè§£æå¤±è´¥"); |
| | | } |
| | | //æ¥è¯¢ç¨æ·ä¿¡æ¯æ¯å¦åå¨ |
| | | SystemUser systemUser = new SystemUser(); |
| | | systemUser.setUsername(userName); |
| | | systemUser.setDeleted(Boolean.FALSE); |
| | | SystemUser queryBean = systemUserService.findOne(systemUser); |
| | | if(Objects.isNull(queryBean)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"tokenè§£æå¤±è´¥"); |
| | | } |
| | | if(Constants.equalsInteger(queryBean.getStatus(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"ç¨æ·å·²ç¦ç¨"); |
| | | } |
| | | redisTemplate.delete(Constants.REDIS_HK_TOKEN_KEY+hkBaseTokenRequest.getToken()); |
| | | Map<String,Object> result = new HashMap<>(); |
| | | result.put("userId",userName); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("ãç¨æ°´éãæ¬æã䏿åå»å¹´åæ") |
| | | @PostMapping("/water/dataByMonth") |
| | | @LoginNoRequired |
| | | public ApiResponse<WaterByMonthResponse> waterDataByMonth(@RequestBody WaterByMonthRequest param) { |
| | | return ApiResponse.success(platformWaterGasService.waterDataByMonth(param)); |
| | | } |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("ãç¨æ°éãæ¬æã䏿åå»å¹´åæ") |
| | | @PostMapping("/gas/dataByMonth") |
| | | @LoginNoRequired |
| | | public ApiResponse<GasByMonthResponse> gasDataByMonth(@RequestBody GasByMonthRequest param) { |
| | | return ApiResponse.success(platformWaterGasService.gasDataByMonth(param)); |
| | | } |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("ãæå°ãæå¤©ç»è®¡è¿å请æ±åæ°") |
| | | @PostMapping("/platform/orderNumByDate") |
| | | @LoginNoRequired |
| | | public ApiResponse<PlatformOrderNumByDateResponse> orderNumByDate(@RequestBody PlatformOrderNumByDateRequest param) { |
| | | return ApiResponse.success(platformJobService.orderNumByDate(param)); |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("ãæå°ãæå°ç¶ææ°éç»è®¡") |
| | | @PostMapping("/platform/totalNumByStatus") |
| | | @LoginNoRequired |
| | | public ApiResponse<PlatformNumByStatusResponse> totalNumByStatus(@RequestBody PlatformNumByStatusRequest param) { |
| | | return ApiResponse.success(platformService.getPlatformNumByStatusResponse()); |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("ãæå°ãæå°å½åä½ä¸ä¿¡æ¯å表") |
| | | @PostMapping("/platform/workingDataList") |
| | | @LoginNoRequired |
| | | public ApiResponse<List<PlatformDataListResponse>> platformWorkingDataList(@RequestBody PlatformDataListRequest param) { |
| | | return ApiResponse.success(platformJobService.platformWorkingDataList(param)); |
| | | } |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("ãæå°ãæå°ä½ä¸è¯¦æ
ä¿¡æ¯") |
| | | @PostMapping("/platform/workDataInfo") |
| | | @LoginNoRequired |
| | | public ApiResponse<PlatformDataInfoResponse> platformWorkingDataList(@RequestBody PlatformDataInfoRequest param) { |
| | | return ApiResponse.success(platformJobService.platformWorkingDataList(param)); |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("ãæå°ãå½å车è¾ç¶ææ°éç»è®¡") |
| | | @PostMapping("/platform/carStatusNum") |
| | | @LoginNoRequired |
| | | public ApiResponse<CarNumByStatusResponse> carStatusNum(@RequestBody CarNumByStatusRequest param) { |
| | | return ApiResponse.success(platformJobService.carStatusNum(param)); |
| | | } |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("ãæå°ã车è¾äºä»¶åè¡¨æ°æ®éåï¼ææ°Næ¡ï¼") |
| | | @PostMapping("/platform/carLogsList") |
| | | @LoginNoRequired |
| | | public ApiResponse<List<CarLogsListResponse>> carLogsList(@RequestBody CarLogsListRequest param) { |
| | | return ApiResponse.success(platformLogService.getCarLogsListResponse(param)); |
| | | } |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("ãæå°ãæééåå表éå") |
| | | @PostMapping("/platform/queueList") |
| | | @LoginNoRequired |
| | | public ApiResponse<PlatformQueuingListResponse> queueList(@RequestBody PlatformQueuingListRequest param) { |
| | | return ApiResponse.success(platformJobService.queueList(param)); |
| | | } |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("ãæå°ãé¢è¦äºä»¶éåå表") |
| | | @PostMapping("/platform/warningEventList") |
| | | @LoginNoRequired |
| | | public ApiResponse<List<PlatformWarnEventListResponse>> warningEventList(@RequestBody PlatformWarnEventListRequest param) { |
| | | return ApiResponse.success(new ArrayList<>()); |
| | | } |
| | |
| | | .apiInfo(this.getApiInfo()).groupName("default") |
| | | .host(host) |
| | | .select() |
| | | .apis( basePackage("com.doumee.cloud.openapi;com.doumee.api.common")) |
| | | // .apis( basePackage("com.doumee.cloud.openapi;")) |
| | | .apis( basePackage("com.doumee.cloud")) |
| | | // .apis( basePackage("com.doumee.api.common")) |
| | | |
| | | // .apis( basePackage("com.doumee.cloud.openapi;com.doumee.api.common")) |
| | | // .apis( basePackage("com.doumee.cloud.openapi")) |
| | | // 设置éè¦è¢«æ«æçç±»ï¼è¿é设置为添å äº@Api注解çç±» |
| | | // .apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) |
| | | .paths(PathSelectors.any()) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.admin.response; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/2/26 11:02 |
| | | */ |
| | | @Data |
| | | @ApiModel("PC端工ä½å°æ°æ®") |
| | | public class PCWorkPlatformDataVO { |
| | | |
| | | @ApiModelProperty(value = "仿¥å¨å人æ°") |
| | | private Long todayInParkUserNum; |
| | | |
| | | @ApiModelProperty(value = "仿¥å
¥å人æ°") |
| | | private Long todayInUserNum; |
| | | |
| | | @ApiModelProperty(value = "仿¥ç¦»å人æ°") |
| | | private Long todayOutUserNum; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å¨å访客人æ°") |
| | | private Long inParkVisitUserNum; |
| | | |
| | | @ApiModelProperty(value = "访客人次") |
| | | private Long visitUserNum; |
| | | |
| | | @ApiModelProperty(value = "ç¾ç¦»äººæ¬¡") |
| | | private Long signLevelNum; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å¨åé¿æç¸å
³æ¹äººæ°") |
| | | private Long inParkLwUserNum; |
| | | |
| | | @ApiModelProperty(value = "å
¥å人次") |
| | | private Long lwUserInNum; |
| | | |
| | | @ApiModelProperty(value = "åºå人次") |
| | | private Long lwUserOutNum; |
| | | |
| | | |
| | | @ApiModelProperty(value = "仿¥å¨å车è¾") |
| | | private Long todayInParkCarNum; |
| | | |
| | | @ApiModelProperty(value = "å
¥å车次") |
| | | private Long todayInCarNum; |
| | | |
| | | @ApiModelProperty(value = "åºå车次") |
| | | private Long todayOutCarNum; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "访客人å") |
| | | private Long visitorCount; |
| | | |
| | | @ApiModelProperty(value = "å³å¡äººå") |
| | | private Long lwCount; |
| | | |
| | | @ApiModelProperty(value = "å¨åºè½¦è¾") |
| | | private Long presenceCarCount; |
| | | |
| | | @ApiModelProperty(value = "é¢çº¦è½¦è¾") |
| | | private Long visitorCarCount; |
| | | |
| | | @ApiModelProperty(value = "é¿æè½¦è¾") |
| | | private Long longCarCount; |
| | | |
| | | @ApiModelProperty(value = "ä¾åºåæ°é") |
| | | private Long supplierCount; |
| | | |
| | | @ApiModelProperty(value = "å³å¡å
¬å¸äººåæ°") |
| | | private List<Map<String,Object>> companyUsers; |
| | | |
| | | @ApiModelProperty(value = "æ»çäººåæ°æ®") |
| | | private List<Map<String,Object>> retentionUsers; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "é¢è®¡å°åºæ¶é´") |
| | | @ExcelColumn(name="é¢è®¡å°åºæ¶é´") |
| | | |
| | | private Date arriveDate; |
| | | |
| | | @ApiModelProperty(value = "å
¥åºç±»å 0æ´æç 1ä»¶ç", example = "1") |
| | |
| | | @TableField(exist = false) |
| | | private String prefixUrl; |
| | | |
| | | @ApiModelProperty(value = "é¢è®¡å°åºå¼å§æ¶é´") |
| | | @TableField(exist = false) |
| | | private Date arriveDateStart; |
| | | |
| | | @ApiModelProperty(value = "é¢è®¡å°åºç»ææ¶é´") |
| | | @TableField(exist = false) |
| | | private Date arriveDateEnd; |
| | | |
| | | @ApiModelProperty(value = "审æ¹äººåç§°") |
| | | @TableField(exist = false) |
| | | private String auditName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "审æ¹ä¿¡æ¯æ°æ®") |
| | | @TableField(exist = false) |
| | | private ApproveDataVO approveDateVO; |
| | |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¾
确认 1å¾
ç¾å° 2çå¾
å«å· 3å
¥åçå¾
4å·²å«å· 5ä½ä¸ä¸ 6ä½ä¸å®æ 7è½¬ç§»ä¸ 8å¼å¸¸æèµ· 9å·²ææç¦»å 10已离å 11 å·²è¿å·", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0å¾
确认 1å¾
ç¾å° 2çå¾
å«å· 3å
¥åçå¾
4å·²å«å· 5ä½ä¸ä¸ 6ä½ä¸å®æ 7è½¬ç§»ä¸ 8å¼å¸¸æèµ· 9å·²ææç¦»å 10已离å 11 å·²è¿å·") |
| | | @ApiModelProperty(value = "ç¶æ 0å¾
确认 1å¾
ç¾å° 2çå¾
å«å· 3å
¥åçå¾
4å·²å«å· 5ä½ä¸ä¸ 6ä½ä¸å®æ 7è½¬ç§»ä¸ 8å¼å¸¸æèµ· 9å·²ææç¦»å 10已离å 11 å·²è¿å· 12åæ¶ï¼WMSï¼" , example = "1") |
| | | @ExcelColumn(name="ç¶æ 0å¾
确认 1å¾
ç¾å° 2çå¾
å«å· 3å
¥åçå¾
4å·²å«å· 5ä½ä¸ä¸ 6ä½ä¸å®æ 7è½¬ç§»ä¸ 8å¼å¸¸æèµ· 9å·²ææç¦»å 10已离å 11 å·²è¿å· 12åæ¶ï¼WMSï¼") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | |
| | | |
| | | @ApiModelProperty(value = "车è¾ç¦»åä¸åæ¶é´") |
| | | @ExcelColumn(name="车è¾ç¦»åä¸åæ¶é´") |
| | | |
| | | private Date outHkdate; |
| | | |
| | | @ApiModelProperty(value = "车è¾ç¦»åä¸å夿³¨") |
| | | @ExcelColumn(name="车è¾ç¦»åä¸å夿³¨") |
| | | private String outHkinfo; |
| | | |
| | | |
| | | @ApiModelProperty(value = "离åºä¸åæä½äºº", example = "1") |
| | | @ExcelColumn(name="离åºä¸åæä½äºº") |
| | | private Integer outUserId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "车è¾è¿åä¸åç¶æ 0å¾
ä¸å 1ä¸åä¸ 2ä¸åæå 3ä¸å失败", example = "1") |
| | | @ExcelColumn(name="车è¾è¿åä¸åç¶æ 0å¾
ä¸å 1ä¸åä¸ 2ä¸åæå 3ä¸å失败") |
| | |
| | | @ExcelColumn(name="æ»è¿è¾é") |
| | | private BigDecimal totalNum; |
| | | |
| | | @ApiModelProperty(value = "ç¡®è®¤ä»»å¡æ¶é´") |
| | | @ExcelColumn(name="ç¡®è®¤ä»»å¡æ¶é´") |
| | | private Date confirmTaskDate; |
| | | |
| | | |
| | | @ApiModelProperty(value = "åæ¹æéæ°é", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer lineUpNum; |
| | |
| | | @ApiModelProperty(value = "ä½ä¸æå°åç§°") |
| | | @TableField(exist = false) |
| | | private String platformName ; |
| | | |
| | | |
| | | @ApiModelProperty(value = "离åºä¸åæä½äººåç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String outUserName; |
| | | |
| | | @ApiModelProperty(value = "wmsä¸å¡ä¸»é®") |
| | | @TableField(exist = false) |
| | |
| | | @TableField(exist = false) |
| | | private Integer callType; |
| | | |
| | | @ApiModelProperty(value = "ä½ä¸ç±»å 0=宿³°ç©æµè½¦ä»»å¡ï¼1=å¸å
¬å¸è½¦", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer jobType; |
| | | |
| | | @ApiModelProperty(value = "å¼å§ä»»å¡æ¶é´èµ·") |
| | | @TableField(exist = false) |
| | | private Date beginWorkDateStart; |
| | | |
| | | @ApiModelProperty(value = "å¼å§ä»»å¡æ¶é´æ¢") |
| | | @TableField(exist = false) |
| | | private Date beginWorkDateEnd; |
| | | |
| | | @ApiModelProperty(value = "å¤ç¶ææ¥è¯¢ å¤ä¸ªä»¥,åå²") |
| | | @TableField(exist = false) |
| | | private String queryStatus; |
| | | |
| | | @ApiModelProperty(value = "çµåéç¶æï¼0=æªä¸é 1=ä¸åä¸é 2=å
¨é¨ä¸é") |
| | | @TableField(exist = false) |
| | | private Integer lockStatus; |
| | | |
| | | public void dealTime(){ |
| | | if(Constants.equalsInteger(this.getStatus(),Constants.PlatformJobStatus.WAIT_CONFIRM.getKey()) |
| | | || Constants.equalsInteger(this.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey()) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.openapi.request; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2023/12/7 11:19 |
| | | */ |
| | | @Data |
| | | @ApiModel("海康大å±BaseToken") |
| | | public class HkBaseTokenRequest { |
| | | |
| | | @ApiModelProperty(value = "token") |
| | | private String token; |
| | | |
| | | } |
| | |
| | | */ |
| | | @Data |
| | | @ApiModel("æ¬æã䏿ãå»å¹´åæç¨æ°´é请æ±åæ°") |
| | | public class WaterByMonthRequest { |
| | | public class WaterByMonthRequest extends HkBaseTokenRequest{ |
| | | |
| | | @ApiModelProperty(value = "å¹´æä¿¡æ¯ï¼æ ¼å¼ï¼yyyy-MM",example = "2024-08") |
| | | @JsonFormat(pattern = "yyyy-MM") |
| | | private Date timeInfo; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response; |
| | | |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("æå°ä»»å¡æ°æ®") |
| | | public class PlatformGroupWorkVO { |
| | | |
| | | @ApiModelProperty(value = "çå¾
æ°é") |
| | | private Long waitNum ; |
| | | |
| | | @ApiModelProperty(value = "å¼å¸¸æ°é") |
| | | private Long exceptionNum ; |
| | | |
| | | } |
| | |
| | | ApproveDataVO arrangeApprovedData(Integer businessId, Integer businessType, Integer memberId); |
| | | |
| | | void approved(ApproveDTO approveDTO); |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸å¡ä¸»é®æ¥è¯¢ 审æ¹äººåç§° |
| | | * @param businessId |
| | | * @param businessType |
| | | * @return |
| | | */ |
| | | String getApproveUserName(Integer businessId,Integer businessType); |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.PlatformGroup; |
| | | import com.doumee.dao.web.reqeust.PlatformDataDTO; |
| | | import com.doumee.dao.web.response.PlatformGroupWorkVO; |
| | | import com.doumee.dao.web.response.PlatformWorkVO; |
| | | |
| | | import java.util.List; |
| | |
| | | List<PlatformGroup> getAllPlatformGroup(PlatformDataDTO platformDataDTO, LoginUserInfo loginUserInfo); |
| | | |
| | | |
| | | |
| | | /** |
| | | * è·åæå°ç» çå¾
ä¸å¼å¸¸æ°æ® |
| | | * @param platformGroupId |
| | | * @return |
| | | */ |
| | | PlatformGroupWorkVO getPlatformGroupWork(Integer platformGroupId); |
| | | |
| | | } |
| | |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | void delete(Integer id); |
| | | /** |
| | | * å é¤ |
| | | * |
| | |
| | | void finishWork(JobOperateDTO jobOperateDTO); |
| | | |
| | | /** |
| | | * æå¨ææè½¦è¾ç¦»åº |
| | | * @param jobOperateDTO |
| | | */ |
| | | void powerLevel(JobOperateDTO jobOperateDTO); |
| | | /** |
| | | * è·åæå°ä¸çä»»å¡ä¿¡æ¯ |
| | | * @param groupId |
| | | * @param loginUserInfo |
| | |
| | | return Constants.ZERO; |
| | | } |
| | | |
| | | @Override |
| | | public String getApproveUserName(Integer businessId,Integer businessType){ |
| | | List<Approve> approveList = approveJoinMapper.selectJoinList(Approve.class,new MPJLambdaWrapper<Approve>() |
| | | .selectAll(Approve.class) |
| | | .selectAs(Member::getName,Approve::getMemberName) |
| | | .leftJoin(Member.class,Member::getId,Approve::getChekorId) |
| | | .eq(Approve::getObjId,businessId) |
| | | .eq(Approve::getObjType,businessType) |
| | | .eq(Approve::getType,Constants.ZERO) |
| | | .eq(Approve::getStatus,Constants.approveStatus.auditIng) |
| | | ); |
| | | if(CollectionUtils.isNotEmpty(approveList)){ |
| | | List<String> names = approveList.stream().map(m->m.getMemberName()).collect(Collectors.toList()); |
| | | return String.join(",",names); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | import com.doumee.dao.business.join.ApproveJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.ApproveDataVO; |
| | | import com.doumee.dao.system.join.NoticesJoinMapper; |
| | | import com.doumee.dao.web.reqeust.ConfirmTaskDTO; |
| | | import com.doumee.dao.web.reqeust.PlatformBooksApplyDTO; |
| | | import com.doumee.dao.web.reqeust.PlatformBooksCheckNumDTO; |
| | |
| | | |
| | | @Autowired |
| | | private PlatformBooksMapper platformBooksMapper; |
| | | |
| | | @Autowired |
| | | private NoticesJoinMapper noticesJoinMapper; |
| | | |
| | | @Autowired |
| | | private ApproveTemplMapper approveTemplMapper; |
| | |
| | | .eq(pageWrap.getModel().getPlateNum() != null, PlatformBooks::getPlateNum, pageWrap.getModel().getPlateNum()) |
| | | .eq(pageWrap.getModel().getDriverPhone() != null, PlatformBooks::getDriverPhone, pageWrap.getModel().getDriverPhone()) |
| | | .ge(pageWrap.getModel().getQueryDate() != null, PlatformBooks::getCreateDate, pageWrap.getModel().getQueryDate()) |
| | | .ge(pageWrap.getModel().getArriveDateStart() != null, PlatformBooks::getArriveDate, Utils.Date.getStart(pageWrap.getModel().getArriveDateStart())) |
| | | .le(pageWrap.getModel().getArriveDateEnd() != null, PlatformBooks::getArriveDate, Utils.Date.getEnd(pageWrap.getModel().getArriveDateEnd())) |
| | | .orderByDesc(PlatformBooks::getCreateDate) |
| | | ; |
| | | return PageData.from(platformBooksMapper.selectPage(page, queryWrapper)); |
| | | PageData<PlatformBooks> pageData = PageData.from(platformBooksMapper.selectPage(page, queryWrapper)); |
| | | for (PlatformBooks platformBooks:pageData.getRecords()) { |
| | | if(Constants.equalsInteger(platformBooks.getStatus(),Constants.ONE)){ |
| | | String auditName = approveService.getApproveUserName(platformBooks.getId(),Constants.approveObjectType.reason); |
| | | platformBooks.setAuditName(auditName); |
| | | } |
| | | } |
| | | |
| | | return pageData; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public long count(PlatformBooks platformBooks) { |
| | |
| | | platformBooks.setIsdeleted(Constants.ZERO); |
| | | platformBooks.setStatus(Constants.ZERO); |
| | | platformBooks.setDriverId(platformBooksApplyDTO.getUserId()); |
| | | platformBooks.setEditDate(new Date()); |
| | | platformBooksMapper.insert(platformBooks); |
| | | |
| | | //åå»ºå®¡æ¹æµä¿¡æ¯ |
| | |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import com.doumee.dao.business.model.PlatformShowParam; |
| | | import com.doumee.dao.web.reqeust.PlatformDataDTO; |
| | | import com.doumee.dao.web.response.PlatformGroupWorkVO; |
| | | import com.doumee.dao.web.response.PlatformWorkVO; |
| | | import com.doumee.service.business.PlatformGroupService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public PlatformGroupWorkVO getPlatformGroupWork(Integer platformGroupId){ |
| | | PlatformGroupWorkVO platformGroupWorkVO = new PlatformGroupWorkVO(); |
| | | platformGroupWorkVO.setExceptionNum(platformJobJoinMapper.selectCount(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getPlatformGroupId,platformGroupId) |
| | | .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.EXCEPTION.getKey()) |
| | | ) |
| | | ); |
| | | |
| | | platformGroupWorkVO.setWaitNum(platformJobJoinMapper.selectCount(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getPlatformGroupId,platformGroupId) |
| | | .in(PlatformJob::getStatus, |
| | | Constants.PlatformJobStatus.WAIT_CALL.getKey(), |
| | | Constants.PlatformJobStatus.IN_WAIT.getKey(), |
| | | Constants.PlatformJobStatus.CALLED.getKey() |
| | | |
| | | ) |
| | | ) |
| | | ); |
| | | return platformGroupWorkVO; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.openapi.request.*; |
| | | import com.doumee.dao.openapi.response.*; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.web.reqeust.*; |
| | | import com.doumee.dao.web.response.DriverHomeVO; |
| | | import com.doumee.dao.web.response.LineUpVO; |
| | |
| | | platformJobMapper.deleteById(id); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void delete(Integer id) { |
| | | platformJobMapper.update(null,new UpdateWrapper<PlatformJob>().lambda() |
| | | .set(PlatformJob::getIsdeleted,Constants.ONE) |
| | | .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.CANCEL.getKey()) |
| | | .eq(PlatformJob::getId,id)); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(PlatformJob platformJob) { |
| | | UpdateWrapper<PlatformJob> deleteWrapper = new UpdateWrapper<>(platformJob); |
| | |
| | | .selectAs(Platform::getName,PlatformJob::getPlatformName) |
| | | .selectAs(Platform::getWorkRate,PlatformJob::getWorkRate) |
| | | .selectAs(PlatformWmsJob::getCarrierName,PlatformJob::getCarrierName) |
| | | .selectAs(SystemUser::getUsername,PlatformJob::getOutUserName) |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .leftJoin(PlatformWmsJob.class,PlatformWmsJob::getCarryBillCode,PlatformJob::getBillCode) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,PlatformJob::getOutUserId) |
| | | .eq(pageWrap.getModel().getId() != null, PlatformJob::getId, pageWrap.getModel().getId()) |
| | | .eq(pageWrap.getModel().getCreator() != null, PlatformJob::getCreator, pageWrap.getModel().getCreator()) |
| | | .ge(pageWrap.getModel().getCreateDate() != null, PlatformJob::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())) |
| | |
| | | .eq(pageWrap.getModel().getInType() != null, PlatformJob::getInType, pageWrap.getModel().getInType()) |
| | | .eq(pageWrap.getModel().getTotalNum() != null, PlatformJob::getTotalNum, pageWrap.getModel().getTotalNum()) |
| | | .eq(pageWrap.getModel().getPlatformGroupId() != null, PlatformJob::getPlatformGroupId, pageWrap.getModel().getPlatformGroupId()) |
| | | |
| | | .apply(pageWrap.getModel().getQueryStatus() != null, " find_in_set(t.`STATUS`,'"+pageWrap.getModel().getQueryStatus()+"')") |
| | | .ge(pageWrap.getModel().getBeginWorkDateStart() != null, PlatformJob::getStartDate, Utils.Date.getStart(pageWrap.getModel().getBeginWorkDateStart())) |
| | | .le(pageWrap.getModel().getBeginWorkDateEnd() != null, PlatformJob::getStartDate, Utils.Date.getEnd(pageWrap.getModel().getBeginWorkDateEnd())) |
| | | .eq(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ONE,pageWrap.getModel().getJobType()), PlatformJob::getType, Constants.platformJobType.sgscxh) |
| | | .ne(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ZERO,pageWrap.getModel().getJobType()), PlatformJob::getType, Constants.platformJobType.sgscxh) |
| | | ; |
| | | |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | |
| | | .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey()).or() |
| | | .apply(" ( t.status = "+Constants.PlatformJobStatus.TRANSFERING.getKey()+" and t.PLATFORM_GROUP_ID = "+pageWrap.getModel().getPlatformGroupId()+" ) ") |
| | | ) |
| | | .like(PlatformJob::getArriveDate,DateUtil.dateTypeToString(new Date(),"yyyy-MM-dd")) |
| | | // .like(PlatformJob::getArriveDate,DateUtil.dateTypeToString(new Date(),"yyyy-MM-dd")) |
| | | .orderByDesc(PlatformJob::getStatus) |
| | | ; |
| | | IPage<PlatformJob> platformJobIPage = platformJobJoinMapper.selectJoinPage(page,PlatformJob.class,queryWrapper); |
| | |
| | | |
| | | |
| | | /** |
| | | * ææç¦»å |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void powerLevel(JobOperateDTO jobOperateDTO){ |
| | | if(Objects.isNull(jobOperateDTO) |
| | | || Objects.isNull(jobOperateDTO.getJobId())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.DONE.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·,ä¸å¡ç¶æå·²æµè½¬ï¼"); |
| | | } |
| | | PlatformJob oldPlatformJob = new PlatformJob(); |
| | | BeanUtils.copyProperties(platformJob,oldPlatformJob); |
| | | platformJob.setOutUserId(jobOperateDTO.getLoginUserInfo().getId()); |
| | | platformJob.setOutHkdate(new Date()); |
| | | platformJob.setStatus(Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()); |
| | | platformJob.setEditDate(new Date()); |
| | | platformJobMapper.updateById(platformJob); |
| | | //å卿使¥å¿ |
| | | savePlatformLog(Constants.PlatformJobLogType.AUTHED_LEAVE.getKey(),oldPlatformJob,platformJob , |
| | | Constants.PlatformJobLogType.AUTHED_LEAVE.getInfo()); |
| | | |
| | | //TODO ææè½¦è¾ç¦»åºæé |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æå°ç¸æºæ¨é å¼å§ä½ä¸ |
| | | * @param jobOperateDTO |
| | | */ |