|
@@ -6,11 +6,8 @@ import com.ydtech.core.page.HttpResult;
|
|
|
import com.ydtech.core.page.PageResult;
|
|
import com.ydtech.core.page.PageResult;
|
|
|
import com.ydtech.exception.SystemException;
|
|
import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.base.controller.BaseController;
|
|
import com.ydtech.modules.base.controller.BaseController;
|
|
|
-import com.ydtech.modules.esm.model.EsmInsCompany;
|
|
|
|
|
import com.ydtech.modules.order.entity.po.InsUploadFiles;
|
|
import com.ydtech.modules.order.entity.po.InsUploadFiles;
|
|
|
import com.ydtech.modules.order.service.InsUploadFilesService;
|
|
import com.ydtech.modules.order.service.InsUploadFilesService;
|
|
|
-import com.ydtech.modules.protocol.entity.dto.PtlAgreementAttributionDto;
|
|
|
|
|
-import com.ydtech.modules.protocol.entity.dto.PtlAgreementSaveDto;
|
|
|
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreement;
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreement;
|
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreementNonCarProductCosts;
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreementNonCarProductCosts;
|
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreementProductCosts;
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreementProductCosts;
|
|
@@ -23,7 +20,6 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.poi.ss.formula.functions.T;
|
|
import org.apache.poi.ss.formula.functions.T;
|
|
|
-import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
@@ -113,8 +109,8 @@ public class PtlAgreementController extends BaseController {
|
|
|
@ApiOperation("校验登录")
|
|
@ApiOperation("校验登录")
|
|
|
public HttpResult<Object> checkLogin(@RequestBody PtlAgreementSaveVo agreement) {
|
|
public HttpResult<Object> checkLogin(@RequestBody PtlAgreementSaveVo agreement) {
|
|
|
String userName = getUserName();
|
|
String userName = getUserName();
|
|
|
- boolean result = ptlAgreementService.checkLogin(userName,agreement.getAgreementId(),agreement);
|
|
|
|
|
- return result ? HttpResult.ok("登录成功"):HttpResult.error("登录失败");
|
|
|
|
|
|
|
+ boolean result = ptlAgreementService.checkLogin(userName, agreement.getAgreementId(), agreement);
|
|
|
|
|
+ return result ? HttpResult.ok("登录成功") : HttpResult.error("登录失败");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/batch")
|
|
@PostMapping("/batch")
|
|
@@ -272,10 +268,10 @@ public class PtlAgreementController extends BaseController {
|
|
|
@PostMapping("/updateFeeFile")
|
|
@PostMapping("/updateFeeFile")
|
|
|
@ApiOperation("上传费用文件")
|
|
@ApiOperation("上传费用文件")
|
|
|
public HttpResult updateFeeFile(@CheckObjectNotNull(message = "上传文件不能为空") MultipartFile multipartFile, String agreementId) throws IOException {
|
|
public HttpResult updateFeeFile(@CheckObjectNotNull(message = "上传文件不能为空") MultipartFile multipartFile, String agreementId) throws IOException {
|
|
|
- agreementId = agreementId.replace(",","");
|
|
|
|
|
|
|
+ agreementId = agreementId.replace(",", "");
|
|
|
InsUploadFiles insUploadFiles = insUploadFilesService.uploadFile(multipartFile, getUserName(), "file");
|
|
InsUploadFiles insUploadFiles = insUploadFilesService.uploadFile(multipartFile, getUserName(), "file");
|
|
|
PtlAgreement byId = ptlAgreementService.getById(agreementId);
|
|
PtlAgreement byId = ptlAgreementService.getById(agreementId);
|
|
|
- if(Objects.isNull(byId)){
|
|
|
|
|
|
|
+ if (Objects.isNull(byId)) {
|
|
|
throw new SystemException("找不到协议");
|
|
throw new SystemException("找不到协议");
|
|
|
}
|
|
}
|
|
|
byId.setFeeFileId(insUploadFiles.getId());
|
|
byId.setFeeFileId(insUploadFiles.getId());
|