shiyunteng
2026-10-23 c5ea85558fea4d82b5368073c598a30f905c4bdc
platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ContractSubjectMatterController.java
@@ -5,10 +5,15 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.by4cloud.platformx.business.dto.ContractSubjectMatterAnnotateDTO;
import com.by4cloud.platformx.business.entity.ContractSubjectMatter;
import com.by4cloud.platformx.business.vo.ProductExcelVO;
import com.by4cloud.platformx.business.vo.SubjectMatterExcelVO;
import com.by4cloud.platformx.common.core.util.R;
import com.by4cloud.platformx.common.excel.annotation.RequestExcel;
import com.by4cloud.platformx.common.log.annotation.SysLog;
import com.by4cloud.platformx.business.service.ContractSubjectMatterService;
import com.by4cloud.platformx.common.security.annotation.Inner;
import org.springframework.security.access.prepost.PreAuthorize;
import com.by4cloud.platformx.common.excel.annotation.ResponseExcel;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
@@ -17,6 +22,7 @@
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -116,4 +122,54 @@
    public List<ContractSubjectMatter> export(ContractSubjectMatter contractSubjectMatter,Long[] ids) {
        return contractSubjectMatterService.list(Wrappers.lambdaQuery(contractSubjectMatter).in(ArrayUtil.isNotEmpty(ids), ContractSubjectMatter::getId, ids));
    }
   /**
    * 通过合同id查询标的物履约进度
    * @param id id
    * @return R
    */
   @GetMapping("/selectSubjectMatterProcess/{id}" )
   public R selectSubjectMatterProcess(@PathVariable("id" ) Long id) {
      return contractSubjectMatterService.selectSubjectMatterProcess(id);
   }
   /**
    * 通过合同id查询标的物履约进度
    * @param contractId id
    * @return R
    */
   @GetMapping("/selectSubjectMatter/{contractId}" )
   public R selectSubjectMatter(@PathVariable("contractId" ) Long contractId) {
      return contractSubjectMatterService.selectSubjectMatter(contractId);
   }
   /**
    * 导入标的物
    * @param excelVOList
    * @param bindingResult
    * @return
    */
   @PostMapping("/importSubjectMatter")
   public R importSubjectMatter(@RequestExcel List<SubjectMatterExcelVO> excelVOList, BindingResult bindingResult) {
      return contractSubjectMatterService.importSubjectMatter(excelVOList, bindingResult);
   }
   @Inner(value = false)
   @GetMapping("/smjProduct/{erpCode}" )
   public R smjProduct(@PathVariable("erpCode" ) String erpCode) {
      return contractSubjectMatterService.smjProduct(erpCode);
   }
   /**
    * 修改合同标的物明细表
    * @param annotateDTOList 合同标的物明细表
    * @return R
    */
   @Operation(summary = "合同标的物统计标注" , description = "合同标的物统计标注" )
   @SysLog("合同标的物统计标注" )
   @PostMapping("/annotate")
   public R annotate(@RequestBody List<ContractSubjectMatterAnnotateDTO> annotateDTOList) {
      return contractSubjectMatterService.annotate(annotateDTOList);
   }
}