admin/src/api/business/approve.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,8 @@ import request from '../../utils/request' // å建 export function approveDo (data) { return request.post('/visitsAdmin/cloudService/business/approve/approved', data) } admin/src/components/business/OperaCarUseBookWindow.vue
@@ -67,17 +67,17 @@ <div class="item" v-for="(item,index) in model.approveDateVO.approveList" :key="item.id"> <div class="separate" v-if=" (index < model.approveDateVO.approveList.length-1)"></div> <div class="info"> <img src="@/assets/icons/ic_tongguo.png" class="iconnew" v-if="(item.type !=1 &&item.status ==2)"/> <img src="@/assets/icons/ic_dangqian.png" class="iconnew" v-if="(item.type !=1 &&item.status==1)"/> <img src="@/assets/icons/ic_jujue.png" class="iconnew" v-if="(item.type !=1 &&item.status==3)"/> <img src="@/assets/icons/ic_grey.png" class="iconnew" v-if="item.type ==1 || (item.status==null || item.status==0 )"/> <img src="@/assets/icons/ic_tongguo.png" class="iconnew" v-if="( item.status ==2)"/> <img src="@/assets/icons/ic_dangqian.png" class="iconnew" v-if="( item.status==1)"/> <img src="@/assets/icons/ic_jujue.png" class="iconnew" v-if="( item.status==3)"/> <img src="@/assets/icons/ic_grey.png" class="iconnew" v-if=" (item.status==null || item.status==0 )"/> <div style="display: inline" v-if="item.approveType !=1"> <img v-if="item.faceImg!=null && item.faceImg !=''" :src="item.faceImg" class="avatar" alt="" /> <img v-if="item.faceImg ==null ||item.faceImg ==''" src="@/assets/avatar/man.png" class="avatar" alt="" /> </div> <div style="display: inline" v-if="item.approveType ==1"> <img v-if="item.status == 1" src="@/assets/icons/ic_chaosong.png" class="avatar" alt="" /> <img v-if="item.status != 1" src="@/assets/icons/ic_duoren.png" class="avatar" alt="" /> <div style="display: inline" v-if="item.approveType == 1"> <img v-if="item.type !=1" src="@/assets/icons/ic_duoren.png" class="avatar" alt="" /> <img v-if="item.type == 1" src="@/assets/icons/ic_chaosong.png" class="avatar" alt="" /> </div> <div class="content"> <div class="line"> @@ -177,6 +177,7 @@ import BaseOpera from '@/components/base/BaseOpera' import GlobalWindow from '@/components/common/GlobalWindow' import { driveList } from '@/api/business/member' import { approveDo } from '@/api/business/approve' import { mapState } from 'vuex' export default { name: 'OperaCarUseBookWindow', @@ -216,12 +217,13 @@ if (!valid) { return } this.$dialog.actionConfirm('æä½ç¡®è®¤', 'æ¨ç¡®è®¤æäº¤è¯¥éæ£å¤çæ åµåï¼') this.$dialog.actionConfirm('æä½ç¡®è®¤', 'æ¨ç¡®è®¤åæè¯¥ç³è¯·åï¼') .then(() => { this.dealing = true this.api.dealHiddenDanger({ id: this.dataId, status: 1, approveDo({ objId: this.dataId, objType: this.model.type == 1?4:3, status: 2, driverId: this.dealForm.driveId, checkInfo: this.dealForm.checkInfo }) @@ -241,26 +243,22 @@ if (!valid) { return } this.$dialog.actionConfirm('æä½ç¡®è®¤', 'æ¨ç¡®è®¤éåè¯¥éæ£å¤çæ åµåï¼') .then(() => { this.dealing = true this.api.dealHiddenDanger({ id: this.dataId, status: 2, checkInfo: this.backForm.checkInfo approveDo({ objId: this.dataId, objType: this.model.type == 1?4:3, status: 3, checkInfo: this.dealForm.checkInfo }).then(res => { this.$tip.apiSuccess('éåæå') this.getDetail() this.isBackProblem = false }) .then(res => { this.$tip.apiSuccess('éåæå') this.getDetail() this.isBackProblem = false }) .catch(e => { }) .finally(() => { this.dealing = false }) .catch(e => { }) .finally(() => { this.dealing = false }) }) }) }, open (title, target) { this.title = title server/meeting/meeting_service/src/main/java/com/doumee/service/business/impl/BookingsServiceImpl.java
@@ -125,7 +125,6 @@ @Transactional(rollbackFor = {BusinessException.class, Exception.class}) public Integer create(Bookings bookings) { LoginUserInfo user = bookings.getLoginUserInfo(); user.setId(bookings.getCreator()); isCreateParamValid(bookings, user); bookings.setCreateDate(new Date()); bookings.setCreator(user.getId()); @@ -201,7 +200,6 @@ for (int i = 0; i < bookings.getBookingTimeList().size(); i++) { BookingTime s = bookings.getBookingTimeList().get(i); if (!Objects.isNull(bookList) && bookList.size() > MeetConstants.ZERO) { List<Bookings> detailDataDtoStream = bookList.stream().filter(a -> MeetConstants.equalsInteger(s.getTimeId(), a.getRoomTimeId()) ).collect(Collectors.toList()); @@ -1145,7 +1143,7 @@ page.getRecords().forEach(j->{ j.setPrefixUrl(path); if(bookingsMapper.selectCount(new QueryWrapper<Bookings>() .exists(" select 1 from meeting_user_rel u where u.OBJ_ID = bookings.id and u.USER_ID = '"+j.getId()+"' and u.OBJ_TYPE = 1 ") .exists(" select 1 from meeting_user_rel u where u.OBJ_ID = meeting_book.id and u.USER_ID = '"+j.getId()+"' and u.OBJ_TYPE = 1 ") .and(i -> i.between("START_TIME", pageWrap.getModel().getStartTime()+":00",pageWrap.getModel().getEndTime()+":00") .or().between("END_TIME", pageWrap.getModel().getStartTime()+":00",pageWrap.getModel().getEndTime()+":00") ) server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/ApproveCloudController.java
@@ -47,7 +47,6 @@ approveService.deleteById(id); return ApiResponse.success(null); } @ApiOperation("æ¹éå é¤") @GetMapping("/delete/batch") @CloudRequiredPermission("business:approve:delete") server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/ApproveTemplCloudController.java
@@ -12,6 +12,7 @@ import com.doumee.service.business.ApproveTemplService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.poi.ss.formula.functions.T; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -85,6 +86,16 @@ ExcelExporter.build(ApproveTempl.class).export(approveTemplService.findPage(pageWrap).getRecords(), "å®¡æ¹æ¨¡çä¿¡æ¯è¡¨", response); } @ApiOperation("æ ¹æ®Typeæ¥è¯¢") @GetMapping("/{type}") @CloudRequiredPermission("business:approvetempl:query") public ApiResponse<ApproveTempl> findByType(@PathVariable Integer type,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ ApproveTempl templ =new ApproveTempl(); templ.setIsdeleted(Constants.ZERO); templ.setType(type); return ApiResponse.success(approveTemplService.findOne(templ)); } @ApiOperation("æ ¹æ®IDæ¥è¯¢") @GetMapping("/{id}") @CloudRequiredPermission("business:approvetempl:query") server/visits/dmvisit_service/src/main/java/com/doumee/service/business/ApproveTemplService.java
@@ -97,4 +97,5 @@ long count(ApproveTempl approveTempl); int save(ApproveTempl approveTempl); } server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
@@ -713,7 +713,8 @@ if(Constants.equalsInteger(approve.getType(),Constants.ONE)){ continue; } if(Constants.equalsInteger(approve.getChekorId(),memberId)){ if(Constants.equalsInteger(approve.getChekorId(),memberId) &&Constants.equalsInteger(approve.getStatus(), Constants.ONE)){ approveDataVO.setCanBeApproved(Constants.ONE); approveDataVO.setDriverParam(approve.getDriverParam()); } @@ -721,11 +722,9 @@ approveList.add(approve); } } if(CollectionUtils.isEmpty(approveList)){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"审æ¹ä¿¡æ¯ï¼çº§å«æ°æ®å¼å¸¸"); } return approveList; } @@ -779,8 +778,6 @@ .orderByAsc(Approve::getLevel) .orderByAsc(Approve::getId) ); String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() +systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode(); for (Approve approve:approveAllList ) { @@ -866,6 +863,9 @@ .lambda() .eq(Approve::getObjId,approveDTO.getObjId()) .eq(Approve::getObjType,approveDTO.getObjType()) .eq(Approve::getChekorId,approveDTO.getLoginUserInfo().getMemberId()) .eq(Approve::getType,Constants.ZERO) .eq(Approve::getStatus,Constants.approveStatus.auditIng) .last(" limit 1") ); if(Objects.isNull(approve)){ @@ -879,9 +879,9 @@ approve.setStatus(approveDTO.getStatus()); approve.setCheckInfo(approveDTO.getCheckInfo()); approve.setCheorId(approveDTO.getLoginUserInfo().getMemberId().toString()); approve.setCheckorName(approve.getLoginUserInfo().getRealname()); approve.setCheckorName(approveDTO.getLoginUserInfo().getRealname()); approve.setCheckDate(new Date()); approve.setStatusInfo(approveDTO.getStatus()==Constants.TWO?"审æ¹éè¿":approveDTO.getCheckInfo()); approve.setStatusInfo(approveDTO.getStatus()==Constants.TWO?"å·²åæ":approveDTO.getCheckInfo()); Visits visits = new Visits(); CarUseBook carUseBook = new CarUseBook(); this.dealBusinessData(approveDTO,approve,visits,carUseBook); @@ -962,10 +962,9 @@ }else if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals( Constants.approveObjectType.unCityUseCar)){ // å¸å å¤ç¨è½¦ç³è¯· carUseBookMapper.updateById(carUseBook); if(dealBusinessBean){ //TODO åé审æ¹éè¿æ¶æ¯ carUseBookMapper.updateById(carUseBook); }else if(approveDTO.getStatus().equals(Constants.THREE)){ //TODO å®¡æ¹æªéè¿éç¥ @@ -1062,7 +1061,7 @@ carUseBook.setEditDate(new Date()); carUseBook.setEditor(approveDTO.getLoginUserInfo().getMemberId()); //妿é 置修æ¹å¸æº ä¸ å ¥åäºæ´æ¢å叿ºä¿¡æ¯ if(approveDTO.getStatus()==Constants.TWO&&approve.getDriverParam().equals(Constants.ONE)){ if(approveDTO.getStatus()==Constants.TWO&&Constants.equalsInteger(approve.getDriverParam(),Constants.ONE)){ CarDriver carDriver = carDriverMapper.selectById(approveDTO.getDriverId()); if(Objects.isNull(carDriver)){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°å¸æºä¿¡æ¯"); server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveTemplServiceImpl.java
@@ -11,6 +11,7 @@ import com.doumee.dao.business.ApproveTemplMapper; import com.doumee.dao.business.MemberMapper; import com.doumee.dao.business.model.*; import com.doumee.dao.business.vo.ApproveParamDataVO; import com.doumee.service.business.ApproveTemplService; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; @@ -24,6 +25,8 @@ import java.util.Date; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; /** * å®¡æ¹æ¨¡çä¿¡æ¯è¡¨Serviceå®ç° @@ -67,6 +70,7 @@ template.setName(Constants.ApproveTmplType.getName(model.getType())); approveTemplMapper.insert(template); } int level = 0; if(model.getParamList()!=null && model.getParamList().size()>0){ for(ApproveParam param : model.getParamList()){ param.setCreateDate(date); @@ -74,11 +78,14 @@ param.setEditDate(date); param.setEditor(loginUserInfo.getId()); param.setIsdeleted(Constants.ZERO); // param.setLevel(level); param.setMemberType(Constants.formatIntegerNum(param.getMemberType())); param.setTemplId(template.getId()); param.setType(Constants.formatIntegerNum(param.getType())); param.setAddrParam(Constants.formatIntegerNum(param.getAddrParam())); param.setDriverParam(Constants.formatIntegerNum(param.getDriverParam())); param.setApproveType(Constants.formatIntegerNum(param.getApproveType())); level ++ ; } //å æ¸ é¤åæ¥ææçå°±éªé ç½® approveParamMapper.delete(new UpdateWrapper<ApproveParam>().lambda() @@ -86,7 +93,7 @@ //æ¹éæå ¥æ°çé ç½® approveParamMapper.insertBatchSomeColumn(model.getParamList()); } return model.getId(); return 1; } @Override @@ -144,7 +151,16 @@ @Override public ApproveTempl findOne(ApproveTempl approveTempl) { QueryWrapper<ApproveTempl> wrapper = new QueryWrapper<>(approveTempl); return approveTemplMapper.selectOne(wrapper); ApproveTempl model = approveTemplMapper.selectOne(wrapper.lambda().last("limit 1")); if(model!=null){ List<ApproveParam> approveParamList = approveParamMapper.selectList(new QueryWrapper<ApproveParam>() .lambda().eq(ApproveParam::getIsdeleted,Constants.ZERO) .eq(ApproveParam::getTemplId,model.getId()) .orderByAsc(ApproveParam::getLevel) ); model.setParamList(approveParamList); } return model; } @Override