合并供应链代码
This commit is contained in:
@@ -131,21 +131,21 @@
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<!-- <plugins>-->
|
||||
<!-- <!– 打包 –>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <version>${spring.boot.version}</version>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>repackage</goal> <!– 将引入的 jar 打入其中 –>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@SpringBootApplication
|
||||
//@SpringBootApplication
|
||||
public class ReceiveDeliverServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
package cn.iocoder.yudao.module.receivedeliver.controller.admin.assay;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.business.annotation.FileUploadController;
|
||||
import cn.iocoder.yudao.framework.business.controller.AbstractFileUploadController;
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo.AssayPageReqVO;
|
||||
import cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo.AssayRespVO;
|
||||
import cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo.AssaySaveReqVO;
|
||||
import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.assay.AssayDO;
|
||||
import cn.iocoder.yudao.module.receivedeliver.service.assay.AssayService;
|
||||
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.servlet.http.HttpServletResponse;
|
||||
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.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 品位")
|
||||
@RestController
|
||||
@RequestMapping("/supply/assay")
|
||||
@FileUploadController(source = "sply.assay")
|
||||
public class AssayController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
@Resource
|
||||
private AssayService assayService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建品位")
|
||||
public CommonResult<AssayRespVO> createAssay(@Valid @RequestBody AssaySaveReqVO createReqVO) {
|
||||
return success(assayService.createAssay(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新品位")
|
||||
public CommonResult<Boolean> updateAssay(@Valid @RequestBody AssaySaveReqVO updateReqVO) {
|
||||
assayService.updateAssay(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除品位")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
public CommonResult<Boolean> deleteAssay(@RequestParam("id") Long id) {
|
||||
assayService.deleteAssay(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除品位")
|
||||
public CommonResult<Boolean> deleteAssayList(@RequestBody BatchDeleteReqVO req) {
|
||||
assayService.deleteAssayListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得品位")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<AssayRespVO> getAssay(@RequestParam("id") Long id) {
|
||||
AssayDO assay = assayService.getAssay(id);
|
||||
return success(BeanUtils.toBean(assay, AssayRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得品位分页")
|
||||
public CommonResult<PageResult<AssayRespVO>> getAssayPage(@Valid AssayPageReqVO pageReqVO) {
|
||||
PageResult<AssayDO> pageResult = assayService.getAssayPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AssayRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出品位 Excel")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportAssayExcel(@Valid AssayPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AssayDO> list = assayService.getAssayPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "品位.xls", "数据", AssayRespVO.class,
|
||||
BeanUtils.toBean(list, AssayRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 品位分页 Request VO")
|
||||
@Data
|
||||
public class AssayPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "品味类型", example = "2")
|
||||
private String gradeType;
|
||||
|
||||
@Schema(description = "订单号")
|
||||
private String orderNumber;
|
||||
|
||||
@Schema(description = "订单类型;销售/采购/委托加工", example = "1")
|
||||
private String orderType;
|
||||
|
||||
@Schema(description = "运单号")
|
||||
private String waybillNumber;
|
||||
|
||||
@Schema(description = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@Schema(description = "小协议号")
|
||||
private String agreementNumber;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "芋艿")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "检验结果")
|
||||
private BigDecimal result;
|
||||
|
||||
@Schema(description = "品位单位")
|
||||
private String gradeUnit;
|
||||
|
||||
@Schema(description = "小数位数")
|
||||
private Long countLocation;
|
||||
|
||||
@Schema(description = "小数位数(ERP)")
|
||||
private Long countLocationErp;
|
||||
|
||||
@Schema(description = "检验时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] inspectionDatetime;
|
||||
|
||||
@Schema(description = "实验室代码")
|
||||
private String laboratoryCode;
|
||||
|
||||
@Schema(description = "实验室名称", example = "王五")
|
||||
private String laboratoryName;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 品位 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AssayRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18214")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "品味类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("品味类型")
|
||||
private String gradeType;
|
||||
|
||||
@Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("订单号")
|
||||
private String orderNumber;
|
||||
|
||||
@Schema(description = "订单类型;销售/采购/委托加工", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("订单类型;销售/采购/委托加工")
|
||||
private String orderType;
|
||||
|
||||
@Schema(description = "运单号")
|
||||
@ExcelProperty("运单号")
|
||||
private String waybillNumber;
|
||||
|
||||
@Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@Schema(description = "小协议号")
|
||||
@ExcelProperty("小协议号")
|
||||
private String agreementNumber;
|
||||
|
||||
@Schema(description = "金属元素缩写", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("金属元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
@Schema(description = "金属元素名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("金属元素名称")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "检验结果", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("检验结果")
|
||||
private BigDecimal result;
|
||||
|
||||
@Schema(description = "品位单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("品位单位")
|
||||
private String gradeUnit;
|
||||
|
||||
@Schema(description = "小数位数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("小数位数")
|
||||
private Long countLocation;
|
||||
|
||||
@Schema(description = "小数位数(ERP)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("小数位数(ERP)")
|
||||
private Long countLocationErp;
|
||||
|
||||
@Schema(description = "检验时间")
|
||||
@ExcelProperty("检验时间")
|
||||
private LocalDateTime inspectionDatetime;
|
||||
|
||||
@Schema(description = "实验室代码")
|
||||
@ExcelProperty("实验室代码")
|
||||
private String laboratoryCode;
|
||||
|
||||
@Schema(description = "实验室名称", example = "王五")
|
||||
@ExcelProperty("实验室名称")
|
||||
private String laboratoryName;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 品位新增/修改 Request VO")
|
||||
@Data
|
||||
public class AssaySaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18214")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "品味类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "品味类型不能为空")
|
||||
private String gradeType;
|
||||
|
||||
@Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "订单号不能为空")
|
||||
private String orderNumber;
|
||||
|
||||
@Schema(description = "订单类型;销售/采购/委托加工", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "订单类型;销售/采购/委托加工不能为空")
|
||||
private String orderType;
|
||||
|
||||
@Schema(description = "运单号")
|
||||
private String waybillNumber;
|
||||
|
||||
@Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "批次号不能为空")
|
||||
private String batchNumber;
|
||||
|
||||
@Schema(description = "小协议号")
|
||||
private String agreementNumber;
|
||||
|
||||
@Schema(description = "金属元素缩写", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "金属元素缩写不能为空")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "金属元素编码不能为空")
|
||||
private String elementNumber;
|
||||
|
||||
@Schema(description = "金属元素名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@NotEmpty(message = "金属元素名称不能为空")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "检验结果", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "检验结果不能为空")
|
||||
private BigDecimal result;
|
||||
|
||||
@Schema(description = "品位单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "品位单位不能为空")
|
||||
private String gradeUnit;
|
||||
|
||||
@Schema(description = "小数位数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "小数位数不能为空")
|
||||
private Long countLocation;
|
||||
|
||||
@Schema(description = "小数位数(ERP)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "小数位数(ERP)不能为空")
|
||||
private Long countLocationErp;
|
||||
|
||||
@Schema(description = "检验时间")
|
||||
private LocalDateTime inspectionDatetime;
|
||||
|
||||
@Schema(description = "实验室代码")
|
||||
private String laboratoryCode;
|
||||
|
||||
@Schema(description = "实验室名称", example = "王五")
|
||||
private String laboratoryName;
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user