mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
+1
-1
@@ -227,7 +227,7 @@ public class GlobalExceptionHandler {
|
|||||||
// 文件格式错误处理
|
// 文件格式错误处理
|
||||||
if (rootCause instanceof IOException) {
|
if (rootCause instanceof IOException) {
|
||||||
// 使用正则提取数值
|
// 使用正则提取数值
|
||||||
Pattern pattern = Pattern.compile("Numeric value \\((\\d+)\\) out of range");
|
Pattern pattern = Pattern.compile("Numeric value \\(([-+]?\\d*\\.?\\d+(?:[eE][-+]?\\d+)?)\\) out of range");
|
||||||
Matcher matcher = pattern.matcher(rootCause.getMessage());
|
Matcher matcher = pattern.matcher(rootCause.getMessage());
|
||||||
if (matcher.find()) {
|
if (matcher.find()) {
|
||||||
String invalidValue = matcher.group(1);
|
String invalidValue = matcher.group(1);
|
||||||
|
|||||||
+10
@@ -185,4 +185,14 @@ public class PlanController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("getPlanGoodsList")
|
||||||
|
@Operation(summary = "未排单混单获取分类的排单信息")
|
||||||
|
@PreAuthorize("@ss.hasPermission('manage:un-order-olan:create')")
|
||||||
|
public CommonResult<List<PlanActualGoodsResp>> getPlanGoodsList(@Valid @RequestBody SavePlanPlateList savePlanPlateList) {
|
||||||
|
|
||||||
|
return success(planService.getPlanGoodsList(savePlanPlateList));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+3
-3
@@ -309,9 +309,9 @@
|
|||||||
|
|
||||||
from order_body ob
|
from order_body ob
|
||||||
|
|
||||||
left join order_item oi on ob.organ_id = oi.organ_id and ob.order_id = oi.order_id and ob.id = oi.body_id and oi.organ_id = #{organId}
|
left join order_item oi on ob.order_id = oi.order_id and ob.id = oi.body_id and oi.organ_id = #{organId}
|
||||||
left join order_plate op on oi.organ_id = op.organ_id and oi.order_id = op.order_id and oi.plate_id = op.id and op.organ_id = #{organId}
|
left join order_plate op on oi.order_id = op.order_id and oi.plate_id = op.id and op.organ_id = #{organId}
|
||||||
left join order_plan_item opi on op.organ_id = opi.organ_id and op.order_id = opi.order_id and op.id = opi.plate_id and opi.organ_id = #{organId}
|
left join order_plan_item opi on op.order_id = opi.order_id and op.id = opi.plate_id and opi.organ_id = #{organId}
|
||||||
|
|
||||||
where ob.organ_id = #{organId}
|
where ob.organ_id = #{organId}
|
||||||
and ob.order_id in
|
and ob.order_id in
|
||||||
|
|||||||
+11
-11
@@ -168,10 +168,10 @@
|
|||||||
og.brand as brand
|
og.brand as brand
|
||||||
|
|
||||||
from orders o
|
from orders o
|
||||||
left join order_goods og on o.organ_id = og.organ_id and o.id = og.order_id and og.organ_id = #{organId}
|
left join order_goods og on o.id = og.order_id and og.organ_id = #{organId}
|
||||||
left join order_plate op on og.organ_id = op.organ_id and og.order_id = op.order_id and og.id = op.goods_id and op.organ_id = #{organId}
|
left join order_plate op on og.order_id = op.order_id and og.id = op.goods_id and op.organ_id = #{organId}
|
||||||
left join order_item oi on op.organ_id = oi.organ_id and op.order_id = oi.order_id and op.id = oi.plate_id and oi.organ_id = #{organId}
|
left join order_item oi on op.order_id = oi.order_id and op.id = oi.plate_id and oi.organ_id = #{organId}
|
||||||
left join order_plan_item opi on op.organ_id = opi.organ_id and op.order_id = opi.order_id and op.id = opi.plate_id and opi.organ_id = #{organId}
|
left join order_plan_item opi on op.order_id = opi.order_id and op.id = opi.plate_id and opi.organ_id = #{organId}
|
||||||
|
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
|
|
||||||
@@ -193,9 +193,9 @@
|
|||||||
og.brand as brand
|
og.brand as brand
|
||||||
|
|
||||||
from orders o
|
from orders o
|
||||||
left join order_goods og on o.organ_id = og.organ_id and o.id = og.order_id and og.organ_id = #{organId}
|
left join order_goods og on o.id = og.order_id and og.organ_id = #{organId}
|
||||||
left join order_plate op on og.organ_id = op.organ_id and og.order_id = op.order_id and og.id = op.goods_id and op.organ_id = #{organId}
|
left join order_plate op on og.order_id = op.order_id and og.id = op.goods_id and op.organ_id = #{organId}
|
||||||
left join order_plan_item opi on op.organ_id = opi.organ_id and op.order_id = opi.order_id and op.id = opi.plate_id and opi.organ_id = #{organId}
|
left join order_plan_item opi on op.order_id = opi.order_id and op.id = opi.plate_id and opi.organ_id = #{organId}
|
||||||
|
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
|
|
||||||
@@ -221,10 +221,10 @@
|
|||||||
og.order_id as orderId
|
og.order_id as orderId
|
||||||
|
|
||||||
from orders o
|
from orders o
|
||||||
left join order_goods og on o.organ_id = og.organ_id and o.id = og.order_id and og.organ_id = #{organId}
|
left join order_goods og on o.id = og.order_id and og.organ_id = #{organId}
|
||||||
left join order_plate op on og.organ_id = op.organ_id and og.order_id = op.order_id and og.id = op.goods_id and op.organ_id = #{organId}
|
left join order_plate op on og.order_id = op.order_id and og.id = op.goods_id and op.organ_id = #{organId}
|
||||||
left join order_item oi on op.organ_id = oi.organ_id and op.order_id = oi.order_id and op.id = oi.plate_id and oi.organ_id = #{organId}
|
left join order_item oi on op.order_id = oi.order_id and op.id = oi.plate_id and oi.organ_id = #{organId}
|
||||||
left join order_plan_item opi on op.organ_id = opi.organ_id and op.order_id = opi.order_id and op.id = opi.plate_id and opi.organ_id = #{organId}
|
left join order_plan_item opi on op.order_id = opi.order_id and op.id = opi.plate_id and opi.organ_id = #{organId}
|
||||||
|
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
|
|
||||||
|
|||||||
+8
@@ -144,4 +144,12 @@ public class PartsController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/cad/page")
|
||||||
|
@Operation(summary = "cad获得配件分页")
|
||||||
|
@PreAuthorize("@ss.hasAnyPermissions('system:accessory:query','base:accessory:query')")
|
||||||
|
public CommonResult<PageResult<PartsRespVO>> getCadPage(@Valid PartsCadPageReqVO pageReqVO) {
|
||||||
|
PageResult<PartsDO> pageResult = partsService.getCadPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, PartsRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+88
@@ -0,0 +1,88 @@
|
|||||||
|
package com.cf.imes.module.manage.controller.admin.parts.vo;
|
||||||
|
|
||||||
|
import com.cf.imes.framework.common.pojo.PageParam;
|
||||||
|
import com.cf.imes.module.manage.validation.parts.PartsNumberValid;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cad 传参
|
||||||
|
*/
|
||||||
|
@Schema(description = "管理后台 - 配件分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class PartsCadPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "商品名称", example = "张三")
|
||||||
|
@Size(max = 64, message = "配件名称长度不能超过64个字符")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "颜色")
|
||||||
|
@Size(max = 32, message = "颜色长度不能超过32个字符")
|
||||||
|
private String color;
|
||||||
|
|
||||||
|
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板")
|
||||||
|
@Size(max = 64, message = "材质长度不能超过64个字符")
|
||||||
|
private String material;
|
||||||
|
|
||||||
|
@Schema(description = "配件类型", example = "2")
|
||||||
|
@Size(max = 32, message = "配件类型长度不能超过323个字符")
|
||||||
|
private String category;
|
||||||
|
|
||||||
|
@Schema(description = "配件子类", example = "2")
|
||||||
|
@Size(max = 64, message = "配件子类长度不能超过64个字符")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@Schema(description = "型号")
|
||||||
|
@Size(max = 64, message = "配件型号长度不能超过64个字符")
|
||||||
|
private String model;
|
||||||
|
|
||||||
|
@Schema(description = "规格")
|
||||||
|
@Size(max = 64, message = "配件规格不能超过64个字符")
|
||||||
|
private String spec;
|
||||||
|
|
||||||
|
@Schema(description = "宽度")
|
||||||
|
@PartsNumberValid(name = "宽度")
|
||||||
|
private Double width;
|
||||||
|
|
||||||
|
@Schema(description = "长度")
|
||||||
|
@PartsNumberValid(name = "长度")
|
||||||
|
private Double length;
|
||||||
|
|
||||||
|
@Schema(description = "厚度")
|
||||||
|
@PartsNumberValid(name = "厚度")
|
||||||
|
private Double thickness;
|
||||||
|
|
||||||
|
@Schema(description = "品牌")
|
||||||
|
@Size(max = 64, message = "配件品牌不能超过64个字符")
|
||||||
|
private String brand;
|
||||||
|
|
||||||
|
@Schema(description = "厂家")
|
||||||
|
@Size(max = 128, message = "厂家长度不能超过64个字符")
|
||||||
|
private String factory;
|
||||||
|
|
||||||
|
@Schema(description = "单位")
|
||||||
|
@Size(max = 32, message = "单位长度不能超过64个字符")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@Schema(description = "是否复合部件:0 否 1 是")
|
||||||
|
private Boolean isComposite;
|
||||||
|
|
||||||
|
@Schema(description = "备注", example = "你说的对")
|
||||||
|
@Size(max = 255, message = "备注长度不能超过255个字符")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
private Long organId;
|
||||||
|
|
||||||
|
@Schema(description = "排序", example = "ascend")
|
||||||
|
private String order;
|
||||||
|
|
||||||
|
@Schema(description = "排序字段", example = "id")
|
||||||
|
private String field;
|
||||||
|
|
||||||
|
}
|
||||||
+11
-9
@@ -118,15 +118,17 @@ public class PlateController {
|
|||||||
// @PreAuthorize("@ss.hasPermission('manage:plate:export')")
|
// @PreAuthorize("@ss.hasPermission('manage:plate:export')")
|
||||||
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:export','base:plate:export')")
|
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:export','base:plate:export')")
|
||||||
public void importTemplate(HttpServletResponse response) throws IOException {
|
public void importTemplate(HttpServletResponse response) throws IOException {
|
||||||
// 手动创建导出 demo
|
// // 手动创建导出 demo
|
||||||
List<PlateImportExcelVO> list = Arrays.asList(
|
// List<PlateImportExcelVO> list = Arrays.asList(
|
||||||
PlateImportExcelVO.builder().goodsId("BD10010001").goodsName("18mm-多层板-暖白").material("多层板").width(String.valueOf(1220)).height(String.valueOf(2440))
|
// PlateImportExcelVO.builder().goodsId("BD10010001").goodsName("18mm-多层板-暖白").material("多层板").width(String.valueOf(1220)).height(String.valueOf(2440))
|
||||||
.thickness(String.valueOf(18)).brand("AAA").spec("2440*1220*18").color("暖白").price("120").texture("无").build(),
|
// .thickness(String.valueOf(18)).brand("AAA").spec("2440*1220*18").color("暖白").price("120").texture("无").build(),
|
||||||
PlateImportExcelVO.builder().goodsId("BD10010002").goodsName("18mm-颗粒板-高级灰").material("多层板").width(String.valueOf(1220)).height(String.valueOf(2750))
|
// PlateImportExcelVO.builder().goodsId("BD10010002").goodsName("18mm-颗粒板-高级灰").material("多层板").width(String.valueOf(1220)).height(String.valueOf(2750))
|
||||||
.thickness(String.valueOf(18)).brand("鸿达树").spec("2750*1220*18").color("高级灰").price("120").texture("无").build()
|
// .thickness(String.valueOf(18)).brand("鸿达树").spec("2750*1220*18").color("高级灰").price("120").texture("无").build()
|
||||||
);
|
// );
|
||||||
// 输出
|
// // 输出
|
||||||
ExcelUtils.write(response, IMPORT_TEMPLATE, "板材列表", PlateImportExcelVO.class, list);
|
// ExcelUtils.write(response, IMPORT_TEMPLATE, "板材列表", PlateImportExcelVO.class, list);
|
||||||
|
|
||||||
|
plateService.exportTemplate(response, "excel_plate_add.xlsx");
|
||||||
}
|
}
|
||||||
|
|
||||||
// @GetMapping("/get-import-template")
|
// @GetMapping("/get-import-template")
|
||||||
|
|||||||
+4
-5
@@ -40,16 +40,16 @@ public class PlateImportExcelVO {
|
|||||||
@NotEmpty(message = "颜色不能为空")
|
@NotEmpty(message = "颜色不能为空")
|
||||||
private String color;
|
private String color;
|
||||||
|
|
||||||
@ExcelProperty(value = "*纹理")
|
@ExcelProperty(value = "纹理")
|
||||||
@ColumnWidth(10)
|
@ColumnWidth(10)
|
||||||
private String texture;
|
private String texture;
|
||||||
|
|
||||||
@ExcelProperty("*宽度")
|
@ExcelProperty("宽度")
|
||||||
@ColumnWidth(10)
|
@ColumnWidth(10)
|
||||||
@NotEmpty(message = "宽度不能为空")
|
@NotEmpty(message = "宽度不能为空")
|
||||||
private String width;
|
private String width;
|
||||||
|
|
||||||
@ExcelProperty("*高度")// float(8,3)
|
@ExcelProperty("高度")// float(8,3)
|
||||||
@ColumnWidth(10)
|
@ColumnWidth(10)
|
||||||
@NotEmpty(message = "高度不能为空")
|
@NotEmpty(message = "高度不能为空")
|
||||||
private String height;
|
private String height;
|
||||||
@@ -79,8 +79,7 @@ public class PlateImportExcelVO {
|
|||||||
|
|
||||||
public boolean isValidGoods() {
|
public boolean isValidGoods() {
|
||||||
return !(goodsId == null || goodsId.isEmpty() || goodsName == null || goodsName.isEmpty() || material == null ||
|
return !(goodsId == null || goodsId.isEmpty() || goodsName == null || goodsName.isEmpty() || material == null ||
|
||||||
material.isEmpty() || color == null || color.isEmpty() || width == null ||width.isEmpty() || height == null ||
|
material.isEmpty() || color == null || color.isEmpty() ||thickness.isEmpty() );
|
||||||
height.isEmpty() || height == null ||thickness.isEmpty() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 数据长度判断
|
// 数据长度判断
|
||||||
|
|||||||
+3
-3
@@ -36,16 +36,16 @@ public class PlateSaveReqVO {
|
|||||||
private String color;
|
private String color;
|
||||||
|
|
||||||
@Schema(description = "纹理", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "纹理", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotNull(message = "纹理不能为空")
|
// @NotNull(message = "纹理不能为空")
|
||||||
private Boolean texture;
|
private Boolean texture;
|
||||||
|
|
||||||
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotNull(message = "宽度不能为空")
|
// @NotNull(message = "宽度不能为空")
|
||||||
@NumberValid(name = "宽度")
|
@NumberValid(name = "宽度")
|
||||||
private Double width;
|
private Double width;
|
||||||
|
|
||||||
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotNull(message = "高度不能为空")
|
// @NotNull(message = "高度不能为空")
|
||||||
@NumberValid(name = "高度")
|
@NumberValid(name = "高度")
|
||||||
private Double height;
|
private Double height;
|
||||||
|
|
||||||
|
|||||||
+69
@@ -3,6 +3,7 @@ package com.cf.imes.module.manage.dal.mysql.parts;
|
|||||||
import com.cf.imes.framework.common.pojo.PageResult;
|
import com.cf.imes.framework.common.pojo.PageResult;
|
||||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsCadPageReqVO;
|
||||||
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsPageReqVO;
|
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsPageReqVO;
|
||||||
import com.cf.imes.module.manage.dal.dataobject.parts.PartsDO;
|
import com.cf.imes.module.manage.dal.dataobject.parts.PartsDO;
|
||||||
|
|
||||||
@@ -103,4 +104,72 @@ public interface PartsMapper extends BaseMapperX<PartsDO> {
|
|||||||
.eq(PartsDO::getOrganId, organId));
|
.eq(PartsDO::getOrganId, organId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default PageResult<PartsDO> selectCadPage(PartsCadPageReqVO reqVO) {
|
||||||
|
LambdaQueryWrapperX<PartsDO> queryWrapper = new LambdaQueryWrapperX<PartsDO>()
|
||||||
|
.eqIfPresent(PartsDO::getOrganId, reqVO.getOrganId())
|
||||||
|
.eqIfPresent(PartsDO::getCategory, reqVO.getCategory())
|
||||||
|
.likeIfPresent(PartsDO::getColor, reqVO.getColor())
|
||||||
|
.likeIfPresent(PartsDO::getType, reqVO.getType())
|
||||||
|
.likeIfPresent(PartsDO::getName, reqVO.getName())
|
||||||
|
.likeIfPresent(PartsDO::getMaterial, reqVO.getMaterial())
|
||||||
|
.likeIfPresent(PartsDO::getModel, reqVO.getModel())
|
||||||
|
.likeIfPresent(PartsDO::getSpec, reqVO.getSpec())
|
||||||
|
.likeIfPresent(PartsDO::getBrand, reqVO.getBrand())
|
||||||
|
.likeIfPresent(PartsDO::getFactory, reqVO.getFactory())
|
||||||
|
.likeIfPresent(PartsDO::getUnit, reqVO.getUnit())
|
||||||
|
.eqIfPresent(PartsDO::getIsComposite, reqVO.getIsComposite())
|
||||||
|
.eqIfPresent(PartsDO::getWidth, reqVO.getWidth())
|
||||||
|
.eqIfPresent(PartsDO::getLength, reqVO.getLength())
|
||||||
|
.eqIfPresent(PartsDO::getThickness, reqVO.getThickness())
|
||||||
|
.likeIfPresent(PartsDO::getRemark, reqVO.getRemark());
|
||||||
|
|
||||||
|
if (reqVO.getOrder() == null) {
|
||||||
|
queryWrapper.orderByDesc(PartsDO::getId);
|
||||||
|
}else {
|
||||||
|
if (reqVO.getOrder().equals("ascend")) {
|
||||||
|
switch (reqVO.getField()) {
|
||||||
|
case "isComposite" -> queryWrapper.orderByAsc(PartsDO::getIsComposite);
|
||||||
|
case "category" -> queryWrapper.orderByAsc(PartsDO::getCategory);
|
||||||
|
case "type" -> queryWrapper.orderByAsc(PartsDO::getType);
|
||||||
|
case "name" -> queryWrapper.orderByAsc(PartsDO::getName);
|
||||||
|
case "model" -> queryWrapper.orderByAsc(PartsDO::getModel);
|
||||||
|
case "material" -> queryWrapper.orderByAsc(PartsDO::getMaterial);
|
||||||
|
case "color" -> queryWrapper.orderByAsc(PartsDO::getColor);
|
||||||
|
case "unit" -> queryWrapper.orderByAsc(PartsDO::getUnit);
|
||||||
|
case "spec" -> queryWrapper.orderByAsc(PartsDO::getSpec);
|
||||||
|
case "brand" -> queryWrapper.orderByAsc(PartsDO::getBrand);
|
||||||
|
case "factory" -> queryWrapper.orderByAsc(PartsDO::getFactory);
|
||||||
|
case "width" -> queryWrapper.orderByAsc(PartsDO::getWidth);
|
||||||
|
case "length" -> queryWrapper.orderByAsc(PartsDO::getLength);
|
||||||
|
case "thickness" -> queryWrapper.orderByAsc(PartsDO::getThickness);
|
||||||
|
default -> {
|
||||||
|
// default不排序
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else if (reqVO.getOrder().equals("descend")) {
|
||||||
|
switch (reqVO.getField()) {
|
||||||
|
case "isComposite" -> queryWrapper.orderByDesc(PartsDO::getIsComposite);
|
||||||
|
case "category" -> queryWrapper.orderByDesc(PartsDO::getCategory);
|
||||||
|
case "type" -> queryWrapper.orderByDesc(PartsDO::getType);
|
||||||
|
case "name" -> queryWrapper.orderByDesc(PartsDO::getName);
|
||||||
|
case "model" -> queryWrapper.orderByDesc(PartsDO::getModel);
|
||||||
|
case "material" -> queryWrapper.orderByDesc(PartsDO::getMaterial);
|
||||||
|
case "color" -> queryWrapper.orderByDesc(PartsDO::getColor);
|
||||||
|
case "unit" -> queryWrapper.orderByDesc(PartsDO::getUnit);
|
||||||
|
case "spec" -> queryWrapper.orderByDesc(PartsDO::getSpec);
|
||||||
|
case "brand" -> queryWrapper.orderByDesc(PartsDO::getBrand);
|
||||||
|
case "factory" -> queryWrapper.orderByDesc(PartsDO::getFactory);
|
||||||
|
case "width" -> queryWrapper.orderByDesc(PartsDO::getWidth);
|
||||||
|
case "length" -> queryWrapper.orderByDesc(PartsDO::getLength);
|
||||||
|
case "thickness" -> queryWrapper.orderByDesc(PartsDO::getThickness);
|
||||||
|
default -> {
|
||||||
|
// default不排序
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return selectPage(reqVO, queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+3
@@ -4,6 +4,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
|
||||||
import com.cf.imes.framework.common.pojo.PageResult;
|
import com.cf.imes.framework.common.pojo.PageResult;
|
||||||
|
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsCadPageReqVO;
|
||||||
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsImportExcelVO;
|
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsImportExcelVO;
|
||||||
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsPageReqVO;
|
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsPageReqVO;
|
||||||
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsSaveReqVO;
|
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsSaveReqVO;
|
||||||
@@ -60,6 +61,8 @@ public interface PartsService {
|
|||||||
*/
|
*/
|
||||||
PageResult<PartsDO> getPage(PartsPageReqVO pageReqVO);
|
PageResult<PartsDO> getPage(PartsPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
PageResult<PartsDO> getCadPage(PartsCadPageReqVO pageReqVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生产导入文件模板下载
|
* 生产导入文件模板下载
|
||||||
*/
|
*/
|
||||||
|
|||||||
+9
@@ -3,6 +3,7 @@ package com.cf.imes.module.manage.service.parts;
|
|||||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||||
import com.cf.imes.framework.organ.core.aop.OrganIgnore;
|
import com.cf.imes.framework.organ.core.aop.OrganIgnore;
|
||||||
import com.cf.imes.framework.organ.core.context.OrganContextHolder;
|
import com.cf.imes.framework.organ.core.context.OrganContextHolder;
|
||||||
|
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsCadPageReqVO;
|
||||||
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsImportExcelVO;
|
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsImportExcelVO;
|
||||||
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsPageReqVO;
|
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsPageReqVO;
|
||||||
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsSaveReqVO;
|
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsSaveReqVO;
|
||||||
@@ -156,6 +157,14 @@ public class PartsServiceImpl implements PartsService {
|
|||||||
return partsMapper.selectPage(pageReqVO);
|
return partsMapper.selectPage(pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@OrganIgnore
|
||||||
|
public PageResult<PartsDO> getCadPage(PartsCadPageReqVO pageReqVO) {
|
||||||
|
pageReqVO.setOrganId(getOrganId(BASE_PARTS_QUERY_PERMISSION, getLoginUser().getId(), pageReqVO.getOrganId()));
|
||||||
|
|
||||||
|
return partsMapper.selectCadPage(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OrganIgnore
|
@OrganIgnore
|
||||||
public void exportTemplate(HttpServletResponse response, String value) {
|
public void exportTemplate(HttpServletResponse response, String value) {
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
package com.cf.imes.module.manage.service.plate;
|
package com.cf.imes.module.manage.service.plate;
|
||||||
|
|
||||||
import com.alibaba.excel.context.AnalysisContext;
|
import com.alibaba.excel.context.AnalysisContext;
|
||||||
|
import com.cf.imes.module.manage.controller.admin.parts.vo.PartsImportExcelVO;
|
||||||
import com.cf.imes.module.manage.controller.admin.plate.vo.plate.PlateImportExcelVO;
|
import com.cf.imes.module.manage.controller.admin.plate.vo.plate.PlateImportExcelVO;
|
||||||
import com.cf.imes.module.manage.util.file.ExcelListener;
|
import com.cf.imes.module.manage.util.file.ExcelListener;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -98,7 +99,7 @@ public final class PlateExcelListener<T> extends ExcelListener<PlateImportExcelV
|
|||||||
*
|
*
|
||||||
* @return 返回读取的数据集合
|
* @return 返回读取的数据集合
|
||||||
**/
|
**/
|
||||||
public List<PlateImportExcelVO> getDatas() {
|
public List<PlateImportExcelVO> getDates() {
|
||||||
return datas;
|
return datas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
Binary file not shown.
+3
-1
@@ -368,6 +368,8 @@ public class CustomPlateNoServiceHandler extends AbstractSystemConfigServiceHand
|
|||||||
@Override
|
@Override
|
||||||
public void modifySystemConfig(ConfigSaveReqVO reqVO) {
|
public void modifySystemConfig(ConfigSaveReqVO reqVO) {
|
||||||
|
|
||||||
|
// 记录当前版本配置状态
|
||||||
|
int status = getSystemConfig(reqVO.getId()).getStatus();
|
||||||
// 校验规则
|
// 校验规则
|
||||||
checkValid(reqVO.getSetting());
|
checkValid(reqVO.getSetting());
|
||||||
// 系统配置保存前操作
|
// 系统配置保存前操作
|
||||||
@@ -382,7 +384,7 @@ public class CustomPlateNoServiceHandler extends AbstractSystemConfigServiceHand
|
|||||||
// 更新
|
// 更新
|
||||||
systemConfigMapper.updateById(systemConfigDO);
|
systemConfigMapper.updateById(systemConfigDO);
|
||||||
} else {
|
} else {
|
||||||
systemConfigDO = BeanUtils.toBean(reqVO, SystemConfigDO.class);
|
systemConfigDO = BeanUtils.toBean(reqVO, SystemConfigDO.class).setStatus(status);
|
||||||
// 新增
|
// 新增
|
||||||
systemConfigMapper.insert(systemConfigDO);
|
systemConfigMapper.insert(systemConfigDO);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user