代码备份

dengbao
anthonywj 1 year ago
parent ee6a7a6775
commit 1eea81cef6

@ -177,6 +177,7 @@ public class SupProductController {
supProductEntity.setProductType(udiRelevanceResponse.getQxlb()); supProductEntity.setProductType(udiRelevanceResponse.getQxlb());
supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm()); supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm());
supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc()); supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc());
supProductEntity.setManufactory(selectProductBindRequest.getCompanyName());
supProductEntity.setSpecification(udiRelevanceResponse.getGgxh()); supProductEntity.setSpecification(udiRelevanceResponse.getGgxh());
supProductEntity.setCreateTime(new Date()); supProductEntity.setCreateTime(new Date());
supProductEntity.setUpdateTime(new Date()); supProductEntity.setUpdateTime(new Date());

@ -99,7 +99,7 @@ public class BasicCorpEntity {
private String thirdName4; private String thirdName4;
/** /**
* 1.23,4. * 1.23,4.
*/ */
@TableField(value = "corpType") @TableField(value = "corpType")
private Integer corpType; private Integer corpType;

@ -5,7 +5,6 @@ import lombok.Data;
//选入产品补充信息 //选入产品补充信息
@Data @Data
public class SupplementRequest { public class SupplementRequest {
//补充信息: //补充信息:
private String basicPrductRemak1; private String basicPrductRemak1;
private String basicPrductRemak2; private String basicPrductRemak2;

@ -147,10 +147,12 @@ public class SupProductServiceImpl extends ServiceImpl<SupProductDao, SupProduct
public boolean insertRegistration(SupProductEntity companyEntity) { public boolean insertRegistration(SupProductEntity companyEntity) {
return supProductDao.insert(companyEntity) > 0 ? true : false; return supProductDao.insert(companyEntity) > 0 ? true : false;
} }
@Override @Override
public int findProduct(SupProductEntity supProductEntity) { public int findProduct(SupProductEntity supProductEntity) {
return supProductDao.findProduct(supProductEntity); return supProductDao.findProduct(supProductEntity);
} }
@Override @Override
public boolean deleteById(String id) { public boolean deleteById(String id) {
return supProductDao.deleteById(id); return supProductDao.deleteById(id);

@ -1,10 +1,13 @@
package com.glxp.api.upload; package com.glxp.api.upload;
import cn.hutool.core.exceptions.ExceptionUtil;
import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.util.MinioUtil; import com.glxp.api.util.MinioUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
@ -21,6 +24,7 @@ import java.util.UUID;
/** /**
* *
*/ */
@Slf4j
@RestController @RestController
public class uploadController { public class uploadController {
@ -41,7 +45,8 @@ public class uploadController {
*/ */
@PostMapping("/udiwms/upload/pdf/template/jasper") @PostMapping("/udiwms/upload/pdf/template/jasper")
public BaseResponse uploadPDFTemplate(@RequestParam("file") MultipartFile file) throws UnsupportedEncodingException { public BaseResponse uploadPDFTemplate(@RequestParam("file") MultipartFile file) {
log.error("上传jasper文件了");
if (file.isEmpty()) { if (file.isEmpty()) {
return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件不能为空"); return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件不能为空");
} }
@ -60,6 +65,8 @@ public class uploadController {
file1.mkdirs();// 创建多层目录 file1.mkdirs();// 创建多层目录
} }
file1 = new File(savePath + "/" + newName); file1 = new File(savePath + "/" + newName);
log.error("创建文件了");
try { try {
file.transferTo(file1); file.transferTo(file1);
Map<String, String> rMap = new HashMap<>(); Map<String, String> rMap = new HashMap<>();
@ -68,6 +75,7 @@ public class uploadController {
return ResultVOUtils.success(rMap); return ResultVOUtils.success(rMap);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
log.error("异常" + ExceptionUtils.getStackTrace(e));
} }
return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传失败"); return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传失败");
} }

Loading…
Cancel
Save