k94314517
2024-10-10 cdbd21ea73eef5d7cf4024654e1f31ab7be1ed81
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
@@ -6,7 +6,6 @@
import com.doumee.core.exception.BusinessException;
import com.doumee.core.haikang.model.HKConstants;
import com.doumee.core.haikang.model.param.BaseResponse;
import com.doumee.core.haikang.model.param.request.CarChargeAddRequest;
import com.doumee.core.haikang.model.param.request.ParkReservationAddRequest;
import com.doumee.core.haikang.model.param.respose.ParkReservationAddResponse;
import com.doumee.core.haikang.service.HKService;
@@ -33,19 +32,12 @@
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.doumee.service.business.impl.hksync.HkSyncParkServiceImpl;
import com.doumee.service.business.impl.hksync.fhk.HkSyncVehicleFromHKServiceImpl;
import com.doumee.service.system.NoticesService;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import io.swagger.models.auth.In;
import javafx.application.Platform;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.xpath.operations.Bool;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -106,6 +98,8 @@
    private PlatformLogMapper platformLogMapper;
    @Autowired
    private PlatformReasonMapper platformReasonMapper;
    @Autowired
    private PlatformGroupMapper platformGroupMapper;
    @Autowired
@@ -1521,11 +1515,25 @@
            platformBooks.setEditDate(new Date());
            platformBooks.setEditor(approveDTO.getLoginUserInfo().getMemberId());
            PlatformReason platformReason = platformReasonMapper.selectById(platformBooks.getReasonId());
            if(Objects.isNull(platformReason)){
                throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到入园原因数据");
            }
            PlatformGroup platformGroup = platformGroupMapper.selectById(platformReason.getGroupId());
            if(Objects.isNull(platformGroup)){
                throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到入园原因配置月台组数据");
            }
            //生成任务记录
            PlatformJob platformJob = platformBooks.toPlatformJob();
            platformJob.setId(null);
            platformJob.setPlatformGroupId(platformReason.getGroupId().intValue());
            platformJob.setType(Constants.platformJobType.sgscxh);
            if(Constants.equalsInteger(platformGroup.getType(),Constants.ZERO)){
                platformJob.setType(Constants.platformJobType.wxcxh);
            }else if(Constants.equalsInteger(platformGroup.getType(),Constants.ONE)){
                platformJob.setType(Constants.platformJobType.wxczh);
            }else{
                platformJob.setType(Constants.platformJobType.sgscxh);
            }
            platformJob.setStatus(Constants.PlatformJobStatus.WART_SIGN_IN.getKey());
            platformJobMapper.insert(platformJob);
            platformBooks.setJobId(platformJob.getId());
@@ -1541,7 +1549,6 @@
            platformLog.setObjId(platformJob.getId().toString());
            platformLog.setAfterContent(JSONObject.toJSONString(platformJob));
            platformLogMapper.insert(platformLog);
        }else{
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }