# OcapServiceImpl.java

    package com.mycim.server.ocap.service;

    import com.alipay.sofa.runtime.api.annotation.SofaService;
    import com.alipay.sofa.runtime.api.annotation.SofaServiceBinding;
    import com.mycim.framework.jdbc.Page;
    import com.mycim.server.ocap.manager.OcapManager;
    import com.mycim.server.ocap.manager.RadCommentManager;
    import com.mycim.valueobject.ocap.OcapCard;
    import com.mycim.valueobject.ocap.dto.*;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.stereotype.Service;

    import java.util.List;
    import java.util.Map;

    /**
     * @author songpy
     * @version 1.0.0
     * @date 2021/1/14
     **/
    @Service
    @SofaService(interfaceType = OcapService.class, bindings = {@SofaServiceBinding(bindingType = "bolt")})
    public class OcapServiceImpl implements OcapService {
        @Autowired
        OcapManager ocapManager;

        @Autowired
        RadCommentManager radCommentManager;

        @Override
        public Map<String, List<Map<String, String>>> getQuerySelectItems() {
            return ocapManager.getQuerySelectItems();
        }

        @Override
        public String getNextSignerId(OcapCard ocap) {
            return ocapManager.getNextSignerId(ocap);
        }

        @Override
        public OcapCardDTO getOcapInfo(Long facilityRrn, String userId, String ocapId, String lotId) {
            return ocapManager.getOcapInfo(facilityRrn, userId, ocapId, lotId);
        }

        @Override
        public OcapCardDTO getOcapInfo(long facilityRrn, String userId, Long ocapRrn) {
            return ocapManager.getOcapInfo(facilityRrn, userId, ocapRrn);
        }

        @Override
        public List<RADCommentDTO> queryRADComment(Map<String, List> conditions) {
            return radCommentManager.queryRADComment(conditions);
        }

        @Override
        public void doReviewAction(Long facilityRrn, OcapDoActionDTO actionDTO) {
            ocapManager.doReviewAction(facilityRrn, actionDTO);
        }

        @Override
        public void doWithdraw(long facilityRrn, long userRrn, String userId, Long ocapRrn) {
            ocapManager.doWithdraw(facilityRrn, userRrn, userId, ocapRrn);
        }

        @Override
        public List<OcapDataCollectionDTO> getAllDataCollectionPointInfo(Long dcolRrn) {
            return ocapManager.getAllDataCollectionPointInfo(dcolRrn);
        }

        @Override
        public void doRemeasurement(OcapDoActionDTO ocapDoActionDTO) {
            ocapManager.doRemeasurement(ocapDoActionDTO);
        }

        @Override
        public OcapDoActionDTO collectReKeyInData(long facilityRrn, long userRrn, String userId, Long ocapRrn,
                                                  List<Map> dataCollectionList, Map parameters) {
            return ocapManager.collectReKeyInData(facilityRrn, userRrn, userId, ocapRrn, dataCollectionList, parameters);
        }

        @Override
        public Page queryRADCommentByPage(RadCommentQueryDTO queryDTO) {
            return radCommentManager.queryRADCommentByPage(queryDTO);
        }

        @Override
        public void addRADComment(RADCommentDTO radCommentDTO) {
            radCommentManager.addRADComment(radCommentDTO);
        }

        @Override
        public void modifyRADComment(RADCommentDTO radCommentDTO) {
            radCommentManager.modifyRADComment(radCommentDTO);
        }

        @Override
        public void deleteRADComment(RADCommentDTO radCommentDTO) {
            radCommentManager.deleteRADComment(radCommentDTO);
        }

        @Override
        public List<Map<String, Object>> getRADComent(String userGroupIds, String type, RADCommentDTO radCommentDto) {
            return radCommentManager.getRADComent(userGroupIds, type, radCommentDto);
        }

        @Override
        public void maintainOcapExecutionRrn(Long ocapRrn, Long executionRrn) {
            ocapManager.maintainOcapExecutionRrn(ocapRrn, executionRrn);
        }

        @Override
        public void endOcapCard(Long ocapRrn) {
            ocapManager.endOcapCard(ocapRrn);
        }

        @Override
        public List<UnitIdDTO> getRemeasurementDatas(Long ocapRrn) {
            return ocapManager.getRemeasurementDatas(ocapRrn);
        }

        @Override
        public void startWorkflowCase(OcapCard ocapCard) {
            ocapManager.startWorkflowCase(ocapCard);
        }

    }