1. 新增帆软报表导入功能
2. 新增物料扩展牌号属性功能
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
package com.zt.plat.module.base.api.materialgradeext;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.base.api.materialgradeext.dto.MaterialGradeExtPageReqDTO;
|
||||
import com.zt.plat.module.base.api.materialgradeext.dto.MaterialGradeExtRespDTO;
|
||||
import com.zt.plat.module.base.api.materialgradeext.dto.MaterialGradeExtSaveReqDTO;
|
||||
import com.zt.plat.module.base.controller.admin.materialgradeext.vo.MaterialGradeExtPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.materialgradeext.vo.MaterialGradeExtRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.materialgradeext.vo.MaterialGradeExtSaveReqVO;
|
||||
import com.zt.plat.module.base.service.materialgradeext.MaterialGradeExtService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
public class MaterialGradeExtApiImpl implements MaterialGradeExtApi {
|
||||
|
||||
@Resource
|
||||
private MaterialGradeExtService materialGradeExtService;
|
||||
|
||||
@Override
|
||||
public CommonResult<MaterialGradeExtRespDTO> create(MaterialGradeExtSaveReqDTO reqDTO) {
|
||||
MaterialGradeExtRespVO respVO = materialGradeExtService.create(BeanUtils.toBean(reqDTO, MaterialGradeExtSaveReqVO.class));
|
||||
return success(BeanUtils.toBean(respVO, MaterialGradeExtRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> update(MaterialGradeExtSaveReqDTO reqDTO) {
|
||||
materialGradeExtService.update(BeanUtils.toBean(reqDTO, MaterialGradeExtSaveReqVO.class));
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> delete(Long id) {
|
||||
materialGradeExtService.delete(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> deleteList(List<Long> ids) {
|
||||
materialGradeExtService.deleteByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<MaterialGradeExtRespDTO> get(Long id) {
|
||||
MaterialGradeExtRespVO respVO = materialGradeExtService.get(id);
|
||||
return success(BeanUtils.toBean(respVO, MaterialGradeExtRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<PageResult<MaterialGradeExtRespDTO>> getPage(@RequestBody MaterialGradeExtPageReqDTO pageReqDTO) {
|
||||
MaterialGradeExtPageReqVO pageReqVO = BeanUtils.toBean(pageReqDTO, MaterialGradeExtPageReqVO.class);
|
||||
PageResult<MaterialGradeExtRespVO> pageResult = materialGradeExtService.getPage(pageReqVO);
|
||||
PageResult<MaterialGradeExtRespDTO> dtoResult = BeanUtils.toBean(pageResult, MaterialGradeExtRespDTO.class);
|
||||
return success(dtoResult);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.zt.plat.module.base.config;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 帆软上传配置
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "finereport.upload")
|
||||
public class FineReportUploadProperties {
|
||||
|
||||
/**
|
||||
* 上传目标地址(sidecar 内部 Service),默认指向集群内 fine-report-upload 服务
|
||||
*/
|
||||
private String url = "http://fine-report-upload.ns-f16a3067ca7b434aad127d15eac82503.svc.cluster.local:8081/upload";
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,20 @@
|
||||
package com.zt.plat.module.base.controller.admin.finereport.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FineReportUploadRespVO {
|
||||
|
||||
@Schema(description = "文件名")
|
||||
private String filename;
|
||||
|
||||
@Schema(description = "上传字节数")
|
||||
private Long bytes;
|
||||
|
||||
@Schema(description = "目标路径")
|
||||
private String targetPath;
|
||||
|
||||
@Schema(description = "sidecar 返回的状态")
|
||||
private String status;
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.zt.plat.module.base.controller.admin.materialgradeext;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.datapermission.core.annotation.CompanyDataPermissionIgnore;
|
||||
import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore;
|
||||
import com.zt.plat.module.base.controller.admin.materialgradeext.vo.MaterialGradeExtPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.materialgradeext.vo.MaterialGradeExtRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.materialgradeext.vo.MaterialGradeExtSaveReqVO;
|
||||
import com.zt.plat.module.base.service.materialgradeext.MaterialGradeExtService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 物料牌号扩展")
|
||||
@RestController
|
||||
@RequestMapping("/base/material-grade-ext")
|
||||
@Validated
|
||||
@CompanyDataPermissionIgnore
|
||||
@DeptDataPermissionIgnore
|
||||
public class MaterialGradeExtController {
|
||||
|
||||
@Resource
|
||||
private MaterialGradeExtService materialGradeExtService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建物料牌号扩展")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-grade-ext:create')")
|
||||
public CommonResult<MaterialGradeExtRespVO> create(@Valid @RequestBody MaterialGradeExtSaveReqVO reqVO) {
|
||||
return success(materialGradeExtService.create(reqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新物料牌号扩展")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-grade-ext:update')")
|
||||
public CommonResult<Boolean> update(@Valid @RequestBody MaterialGradeExtSaveReqVO reqVO) {
|
||||
materialGradeExtService.update(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除物料牌号扩展")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:material-grade-ext:delete')")
|
||||
public CommonResult<Boolean> delete(@RequestParam("id") Long id) {
|
||||
materialGradeExtService.delete(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Operation(summary = "批量删除物料牌号扩展")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-grade-ext:delete')")
|
||||
public CommonResult<Boolean> deleteList(@RequestBody BatchDeleteReqVO req) {
|
||||
materialGradeExtService.deleteByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得物料牌号扩展")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:material-grade-ext:query')")
|
||||
public CommonResult<MaterialGradeExtRespVO> get(@RequestParam("id") Long id) {
|
||||
return success(materialGradeExtService.get(id));
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/page", method = {RequestMethod.GET, RequestMethod.POST})
|
||||
@Operation(summary = "获得物料牌号扩展分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-grade-ext:query')")
|
||||
public CommonResult<PageResult<MaterialGradeExtRespVO>> getPage(@Valid @RequestBody(required = false) MaterialGradeExtPageReqVO pageReqVO) {
|
||||
if (pageReqVO == null) {
|
||||
pageReqVO = new MaterialGradeExtPageReqVO();
|
||||
}
|
||||
return success(materialGradeExtService.getPage(pageReqVO));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.zt.plat.module.base.controller.admin.materialgradeext.vo;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 物料牌号扩展分页 Request VO")
|
||||
@Data
|
||||
public class MaterialGradeExtPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "公司编码")
|
||||
private String companyCode;
|
||||
|
||||
@Schema(description = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "中文牌号")
|
||||
private String chineseBrand;
|
||||
|
||||
@Schema(description = "英文牌号")
|
||||
private String englishBrand;
|
||||
|
||||
@Schema(description = "规格型号")
|
||||
private String specificationModel;
|
||||
|
||||
@Schema(description = "线别")
|
||||
private String lineType;
|
||||
|
||||
@Schema(description = "包装描述")
|
||||
private String packageDesc;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.zt.plat.module.base.controller.admin.materialgradeext.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 物料牌号扩展 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MaterialGradeExtRespVO {
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "公司编码")
|
||||
private String companyCode;
|
||||
|
||||
@Schema(description = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "中文牌号")
|
||||
private String chineseBrand;
|
||||
|
||||
@Schema(description = "英文牌号")
|
||||
private String englishBrand;
|
||||
|
||||
@Schema(description = "规格型号")
|
||||
private String specificationModel;
|
||||
|
||||
@Schema(description = "线别")
|
||||
private String lineType;
|
||||
|
||||
@Schema(description = "包装描述")
|
||||
private String packageDesc;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.zt.plat.module.base.controller.admin.materialgradeext.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 物料牌号扩展新增/修改 Request VO")
|
||||
@Data
|
||||
public class MaterialGradeExtSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "公司编码")
|
||||
@NotEmpty(message = "公司编码不能为空")
|
||||
private String companyCode;
|
||||
|
||||
@Schema(description = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
@NotEmpty(message = "物料编码不能为空")
|
||||
private String materialCode;
|
||||
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "中文牌号")
|
||||
private String chineseBrand;
|
||||
|
||||
@Schema(description = "英文牌号")
|
||||
private String englishBrand;
|
||||
|
||||
@Schema(description = "规格型号")
|
||||
private String specificationModel;
|
||||
|
||||
@Schema(description = "线别(业务字典: material_line_type)")
|
||||
private String lineType;
|
||||
|
||||
@Schema(description = "包装描述")
|
||||
private String packageDesc;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.zt.plat.module.base.dal.dao.materialgradeext;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.materialgradeext.vo.MaterialGradeExtPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.materialgradeext.MaterialGradeExtDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 物料牌号扩展 Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface MaterialGradeExtMapper extends BaseMapperX<MaterialGradeExtDO> {
|
||||
|
||||
default PageResult<MaterialGradeExtDO> selectPage(MaterialGradeExtPageReqVO reqVO) {
|
||||
LambdaQueryWrapperX<MaterialGradeExtDO> query = new LambdaQueryWrapperX<MaterialGradeExtDO>()
|
||||
.eqIfPresent(MaterialGradeExtDO::getCompanyCode, reqVO.getCompanyCode())
|
||||
.likeIfPresent(MaterialGradeExtDO::getCompanyName, reqVO.getCompanyName())
|
||||
.eqIfPresent(MaterialGradeExtDO::getMaterialCode, reqVO.getMaterialCode())
|
||||
.likeIfPresent(MaterialGradeExtDO::getMaterialName, reqVO.getMaterialName())
|
||||
.likeIfPresent(MaterialGradeExtDO::getChineseBrand, reqVO.getChineseBrand())
|
||||
.likeIfPresent(MaterialGradeExtDO::getEnglishBrand, reqVO.getEnglishBrand())
|
||||
.likeIfPresent(MaterialGradeExtDO::getSpecificationModel, reqVO.getSpecificationModel())
|
||||
.eqIfPresent(MaterialGradeExtDO::getLineType, reqVO.getLineType())
|
||||
.likeIfPresent(MaterialGradeExtDO::getPackageDesc, reqVO.getPackageDesc())
|
||||
.betweenIfPresent(MaterialGradeExtDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(MaterialGradeExtDO::getId);
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.materialgradeext;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 物料牌号扩展 DO
|
||||
*/
|
||||
@TableName("bse_mtrl_grade_ext")
|
||||
@KeySequence("bse_mtrl_grade_ext_seq")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MaterialGradeExtDO extends BusinessBaseDO {
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 公司编码 */
|
||||
@TableField("CMP_CD")
|
||||
private String companyCode;
|
||||
|
||||
/** 公司名称 */
|
||||
@TableField("CMP_NM")
|
||||
private String companyName;
|
||||
|
||||
/** 物料编码 */
|
||||
@TableField("MTRL_CD")
|
||||
private String materialCode;
|
||||
|
||||
/** 物料名称 */
|
||||
@TableField("MTRL_NM")
|
||||
private String materialName;
|
||||
|
||||
/** 中文牌号 */
|
||||
@TableField("ZH_BRAND")
|
||||
private String chineseBrand;
|
||||
|
||||
/** 英文牌号 */
|
||||
@TableField("EN_BRAND")
|
||||
private String englishBrand;
|
||||
|
||||
/** 规格型号 */
|
||||
@TableField("SPC_MDL")
|
||||
private String specificationModel;
|
||||
|
||||
/** 线别(业务字典:material_line_type) */
|
||||
@TableField("LINE_TP")
|
||||
private String lineType;
|
||||
|
||||
/** 包装描述 */
|
||||
@TableField("PKG")
|
||||
private String packageDesc;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user