mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
Merge branch 'LiuZt' into 'main'
生产工序代码提交 See merge request cf_devdept2/cf_imes_server!2
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
package com.cf.imes.framework.common.enums;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum OrderPackageStatusEnum {
|
||||
|
||||
UNPACKED(0,"未封包"),
|
||||
PACKAGED(1, "已封包");
|
||||
private Integer status;
|
||||
private String description;
|
||||
|
||||
public boolean equals(Integer status) {
|
||||
return this.status .equals(status) ;
|
||||
}
|
||||
|
||||
public boolean equals(OrderPackageStatusEnum enableStatusEnum) {
|
||||
return enableStatusEnum != null && enableStatusEnum.status .equals(this.getStatus()) ;
|
||||
}
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.cf.imes.framework.common.enums;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum OrderPackageTypeEnum {
|
||||
|
||||
UNDEFINED(-1,"未定义"),
|
||||
PLATE(0,"板材"),
|
||||
PARTS(1,"配件"),
|
||||
OTHER_ACCESSORIES(2,"其他配件");
|
||||
private Integer type;
|
||||
private String description;
|
||||
|
||||
public boolean equals(Integer type) {
|
||||
return this.type .equals(type) ;
|
||||
}
|
||||
|
||||
public boolean equals(OrderPackageTypeEnum enableTypeEnum) {
|
||||
return enableTypeEnum != null && enableTypeEnum.type .equals(this.getType()) ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.cf.imes.framework.common.enums;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum ProcessingStatusEnum {
|
||||
|
||||
RAW(false,"未加工"),
|
||||
PROCESSED(true, "已加工");
|
||||
private Boolean status;
|
||||
private String description;
|
||||
|
||||
public boolean equals(Integer status) {
|
||||
return this.status .equals(status) ;
|
||||
}
|
||||
|
||||
public boolean equals(ProcessingStatusEnum enableStatusEnum) {
|
||||
return enableStatusEnum != null && enableStatusEnum.status .equals(this.getStatus()) ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,6 +136,54 @@
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-excel</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- pagehelper分页插件-->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper</artifactId>
|
||||
<version>6.1.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.github.jsqlparser</groupId>
|
||||
<artifactId>jsqlparser</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>sqlparser4.5</artifactId>
|
||||
<version>6.1.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.jacob/jacob -->
|
||||
<dependency>
|
||||
<groupId>com.hynnet</groupId>
|
||||
<artifactId>jacob</artifactId>
|
||||
<version>1.18</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.8</version> <!-- 使用最新版本 -->
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-job</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.cf.imes.module.manage.config;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "voices.parameters")
|
||||
public class VocieParameters {
|
||||
|
||||
// 设置音频的质量( 越大越好,目前最大好像 22,最小为 4 )
|
||||
private Long quality;
|
||||
|
||||
// 朗读声音大小
|
||||
private Long soundSize;
|
||||
|
||||
// 朗读速度
|
||||
private Long readingSpeed;
|
||||
|
||||
// 音频保存的路径
|
||||
private String path;
|
||||
|
||||
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package com.cf.imes.module.manage.config;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "job.parameters")
|
||||
public class XxlJobParameter {
|
||||
|
||||
|
||||
/**
|
||||
* 是否开启,默认为 true 关闭
|
||||
*/
|
||||
private Boolean enabled;
|
||||
|
||||
/**
|
||||
* 访问令牌
|
||||
*/
|
||||
private String accessToken;
|
||||
|
||||
/* *//**
|
||||
* 控制器配置
|
||||
*//*
|
||||
@NotNull(message = "控制器配置不能为空")
|
||||
private AdminProperties admin;
|
||||
|
||||
*//**
|
||||
* 执行器配置
|
||||
*//*
|
||||
@NotNull(message = "执行器配置不能为空")
|
||||
private ExecutorProperties executor;*/
|
||||
|
||||
@NotEmpty(message = "调度器地址不能为空")
|
||||
private String addresses;
|
||||
|
||||
/**
|
||||
* 应用名
|
||||
*/
|
||||
@NotEmpty(message = "应用名不能为空")
|
||||
private String appName;
|
||||
/**
|
||||
* 执行器的 IP
|
||||
*/
|
||||
private String ip;
|
||||
/**
|
||||
* 执行器的 Port
|
||||
*/
|
||||
private Long port;
|
||||
/**
|
||||
* 日志地址
|
||||
*/
|
||||
@NotEmpty(message = "日志地址不能为空")
|
||||
private String logPath;
|
||||
/**
|
||||
* 日志保留天数
|
||||
*/
|
||||
private Long logRetentionDays;
|
||||
|
||||
|
||||
}
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
package com.cf.imes.module.manage.controller.admin.grouping;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||
import com.cf.imes.module.manage.controller.admin.grouping.vo.*;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.ProcessRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleReqVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderDO;
|
||||
import com.cf.imes.module.manage.service.grouping.GroupingService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 分堆 ")
|
||||
@RestController
|
||||
@RequestMapping("/manage/grouping")
|
||||
@Validated
|
||||
public class GroupingController {
|
||||
|
||||
|
||||
|
||||
@Resource
|
||||
private GroupingService groupingService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/select")
|
||||
@Operation(summary = "查询订单")
|
||||
@PreAuthorize("@ss.hasPermission('manage:grouping:query')")
|
||||
public CommonResult<PageResult<ProcessRespVO>> getGroupingList(@Valid OrderPageReqVO pageReqVO) {
|
||||
|
||||
PageResult<OrderDO> groupingList = groupingService.getGroupingList(pageReqVO);
|
||||
|
||||
return success(BeanUtils.toBean(groupingList, ProcessRespVO.class));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/notJoinedPlate")
|
||||
@Operation(summary = "查看订单的板材信息(未加入包裹的板材信息)")
|
||||
@PreAuthorize("@ss.hasPermission('manage:grouping:query')")
|
||||
public CommonResult<PageResult<OrderPlateListRespVO>> notJoinedGroupingPlateList(@Valid OrderModuleReqVO reqVO) {
|
||||
|
||||
return success(groupingService.notJoinedGroupingPlateList(reqVO));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/joinedPlate")
|
||||
@Operation(summary = "查看订单的板材信息(已将加入包裹的板材信息)")
|
||||
@PreAuthorize("@ss.hasPermission('manage:grouping:query')")
|
||||
public CommonResult<PageResult<OrderPlateListRespVO>> joinedGroupPlateList(@Valid JoinedPlateReqVO reqVO) {
|
||||
|
||||
return success(groupingService.joinedGroupPlateList(reqVO));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PutMapping("/insertPlate")
|
||||
@Operation(summary = "包裹表新增板件(加入)")
|
||||
@Parameter(name = "plateId", description = "板材id", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('manage:grouping:create')")
|
||||
public CommonResult<Boolean> insertPackPlate(@Valid @RequestParam("plateId") Long plateId) {
|
||||
|
||||
groupingService.insertPackPlate(plateId);
|
||||
|
||||
return success(true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "移除包裹板材信息")
|
||||
@Parameter(name = "plateId", description = "板材id", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('manage:grouping:update')")
|
||||
public CommonResult<Boolean> removePackPlate(@Valid @RequestParam("plateId") Long plateId) {
|
||||
|
||||
groupingService.removePackPlate(plateId);
|
||||
|
||||
return success(true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/insert")
|
||||
@Operation(summary = "新增分堆(包裹)")
|
||||
@PreAuthorize("@ss.hasPermission('manage:grouping:create')")
|
||||
public CommonResult<Long> insertGrouping(@Valid @RequestBody OrderPackageReqVO packageReqVO) {
|
||||
|
||||
return success(groupingService.insertGrouping(packageReqVO));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.cf.imes.module.manage.controller.admin.grouping.vo;
|
||||
|
||||
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PlateDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 数据导出 Request VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class ExportJsonReqVO {
|
||||
|
||||
|
||||
@Schema(description = "板材信息", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<OrderPlateListRespVO> Plates;
|
||||
|
||||
|
||||
@Schema(description = "模块信息", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<OrderModuleVO> modules;
|
||||
|
||||
@Schema(description = "已分堆", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<Long> alreadyGrouping;
|
||||
|
||||
|
||||
@Schema(description = "未分堆", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<Long> notYetGrouping;
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.cf.imes.module.manage.controller.admin.grouping.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 新增包裹板材信息 Request VO")
|
||||
@Data
|
||||
public class GroupPlateReqVO {
|
||||
|
||||
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
@NotNull(message = "生产单号不能为空")
|
||||
private Long orderNo;
|
||||
|
||||
|
||||
@Schema(description = "板件id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
@NotNull(message = "板件id不能为空")
|
||||
private Long plateId;
|
||||
|
||||
|
||||
@Schema(description = "房间名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
@NotNull(message = "房间名称不能为空")
|
||||
private String roomName;
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.cf.imes.module.manage.controller.admin.grouping.vo;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - Request VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class JoinedPlateReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long orderNo;
|
||||
|
||||
|
||||
@Schema(description = "包裹ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3,4,5")
|
||||
private List<Long> packageIdList;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package com.cf.imes.module.manage.controller.admin.grouping.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 生产单包裹表 order_package_{N}新增/修改 Request VO")
|
||||
@Data
|
||||
public class OrderPackageReqVO {
|
||||
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4399")
|
||||
private Long id;
|
||||
|
||||
|
||||
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
@NotNull(message = "生产单号不能为空")
|
||||
private Long orderNo;
|
||||
|
||||
|
||||
/* @Schema(description = "包裹编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
@NotNull(message = "包裹编号不能为空")
|
||||
private Long packageNo;*/
|
||||
|
||||
|
||||
@Schema(description = "包裹类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
@NotNull(message = "包裹类型不能为空(0:板材)")
|
||||
private Long type;
|
||||
|
||||
|
||||
@Schema(description = "包裹名", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
@NotNull(message = "包裹名不能为空")
|
||||
private String name;
|
||||
|
||||
|
||||
@Schema(description = "包裹状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
@NotNull(message = "包裹状态不能为空(默认为:0:未打包")
|
||||
private Long status;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.cf.imes.module.manage.controller.admin.grouping.vo;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
|
||||
@Schema(description = "管理后台 - 生产单表 order_{N} 分页 Request VO ")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class OrderPageReqVO extends PageParam {
|
||||
|
||||
|
||||
@Schema(description = "生产单号")
|
||||
private Long orderNo;
|
||||
|
||||
@Schema(description = "自定义单号")
|
||||
private String customOrderNo;
|
||||
|
||||
@Schema(description = "客户")
|
||||
private String customer;
|
||||
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
|
||||
|
||||
@Schema(description = "经销商")
|
||||
private String dealer;
|
||||
|
||||
@Schema(description = "开始时间",requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDateTime[] startTime;
|
||||
|
||||
@Schema(description = "结束时间",requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDateTime[] endTime;
|
||||
|
||||
@Schema(description = "订单状态-默认全都显示",requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<Long> statusList;
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.cf.imes.module.manage.controller.admin.grouping.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 生产单板件表 Response VO")
|
||||
@Data
|
||||
public class OrderPlateListRespVO {
|
||||
|
||||
|
||||
@Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
private Long orderNo;
|
||||
|
||||
|
||||
@Schema(description = "生产单明细ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long ItemID;
|
||||
|
||||
|
||||
@Schema(description = "板编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "板材名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
private String plateName;
|
||||
|
||||
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String color;
|
||||
|
||||
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double width;
|
||||
|
||||
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double height;
|
||||
|
||||
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double thickness;
|
||||
|
||||
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String material;
|
||||
|
||||
|
||||
@Schema(description = "加工组", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
private String groupName;
|
||||
|
||||
|
||||
@Schema(description = "房间名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
private String roomName;
|
||||
|
||||
|
||||
@Schema(description = "柜体名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
private String bodyName;
|
||||
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
+306
@@ -0,0 +1,306 @@
|
||||
package com.cf.imes.module.manage.controller.admin.pack;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||
import com.cf.imes.framework.excel.core.util.ExcelUtils;
|
||||
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
|
||||
import com.cf.imes.module.manage.controller.admin.grouping.vo.OrderPackageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.*;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.OrderPackageVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleReqVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.query.OrderPackageDO;
|
||||
import com.cf.imes.module.manage.service.pack.PackService;
|
||||
import com.cf.imes.module.manage.service.query.ProductionStatusService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
||||
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
|
||||
@Tag(name = "管理后台 - 生产打包 ")
|
||||
@RestController
|
||||
@RequestMapping("/manage/pack")
|
||||
@Validated
|
||||
public class PackController {
|
||||
|
||||
|
||||
|
||||
@Resource
|
||||
private PackService packService;
|
||||
|
||||
|
||||
|
||||
@Resource
|
||||
private ProductionStatusService productionStatusService;
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "打包分页查询")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:query')")
|
||||
public CommonResult<PageResult<PackRespVO>> getPlatePage(@Valid PackPageReqVO pageReqVO) {
|
||||
|
||||
return CommonResult.success(packService.getPackPage(pageReqVO));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/getOrderPack")
|
||||
@Operation(summary = "查看生产订单对应的包裹信息")
|
||||
@Parameter(name = "orderId", description = "生产单Id", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:query')")
|
||||
public CommonResult<List<OrderPackageVO>> getOrderPack(@Valid @RequestParam("orderId") Long orderId) {
|
||||
List<OrderPackageDO> orderPack = packService.getOrderPack(orderId);
|
||||
return success(BeanUtils.toBean(orderPack,OrderPackageVO.class));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/getOrderPlate")
|
||||
@Operation(summary = "查看生产订单对应的板材信息")
|
||||
@Parameter(name = "orderId", description = "生产单Id", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:query')")
|
||||
public CommonResult<List<PlateDetailsRespVO>> getOrderPlateList(@Valid @RequestParam("orderId") Long orderId) {
|
||||
|
||||
return success(packService.getOrderPlateList(orderId));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/export")
|
||||
@Operation(summary = "导出缺板")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportPlateExcel(@Valid OrderPartsReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PlateDetailsRespVO> list = productionStatusService.getMissingBoard(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "缺板信息表.xlsx", "数据", PlateDetailsRespVO.class, list);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/pagePlate")
|
||||
@Operation(summary = "查看板材列表分页")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:query')")
|
||||
public CommonResult<PageResult<PlateDetailsRespVO>> queryPlateDetails(@Valid OrderModuleReqVO pageReqVO){
|
||||
|
||||
PageResult<PlateDetailsRespVO> packageDetailsRespVOPageResult = packService.queryPlateDetails(pageReqVO);
|
||||
|
||||
return success(packageDetailsRespVOPageResult);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/getParts")
|
||||
@Operation(summary = "查看配件列表分页")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:query')")
|
||||
public CommonResult<PageResult<OrderPartsRespVO>> getParts(@Valid OrderPartsReqVO reqVO) {
|
||||
|
||||
return success(packService.getPartsList(reqVO));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// TODO 目前前端接口只有查询配件包裹时会调用,板材是否会调用待确认
|
||||
@GetMapping("/getPartsPack")
|
||||
@Operation(summary = "查看配件包裹详情")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:query')")
|
||||
public CommonResult<List<OrderPartsRespVO>> queryPackageDetails(@Valid PrintOrderPackReqVO reqVO){
|
||||
|
||||
return success(packService.queryPackageDetails(reqVO));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PutMapping("/insert")
|
||||
@Operation(summary = "包裹封包-板材包裹封包")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:update')")
|
||||
public CommonResult<OrderPackageDO> updatePackStatus(@Valid @RequestBody OrderPackReqVO packageVO) {
|
||||
|
||||
return success(packService.updatePackStatus(packageVO));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PutMapping("/unpacking")
|
||||
@Operation(summary = "拆包")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:update')")
|
||||
public CommonResult<Boolean> unpacking(@Valid Long packageID) {
|
||||
|
||||
packService.unpacking(packageID);
|
||||
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/GetOrderPlateGroup")
|
||||
@Operation(summary = "显示分组房间名称")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:query')")
|
||||
public CommonResult<List<OrderPlateGroupRespVO>> GetOrderPlateGroup(@Valid Long orderId) {
|
||||
|
||||
return success(packService.GetOrderPlateGroup(orderId));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/print")
|
||||
@Operation(summary = "包裹订单打印")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:query')")
|
||||
public CommonResult<PrintOrderPackRespVO> printOrderPack (@Valid PrintOrderPackReqVO reqVO) {
|
||||
|
||||
return success(packService.printOrderPack(reqVO));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/insertParts")
|
||||
@Operation(summary = "新增配件-即新增一个包裹")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:insert')")
|
||||
public CommonResult<OrderPackageDO> addNewPartsPack (@Valid @RequestBody OrderPackReqVO reqVO) {
|
||||
|
||||
return success(packService.addNewPartsPack(reqVO));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/insertOther")
|
||||
@Operation(summary = "新增外部配件-即新增一个包裹")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:insert')")
|
||||
public CommonResult<OrderPackageDO> addNewOtherParts (@Valid @RequestBody OtherPackReqVO reqVO) {
|
||||
|
||||
return success(packService.addNewOtherParts(reqVO));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除包裹及其关联的包裹信息(删除全部)")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:delete')")
|
||||
public CommonResult<Boolean> deleteOrderPack (@Valid @RequestBody PackReqVO reqVO) {
|
||||
|
||||
packService.deleteOrderPack(reqVO);
|
||||
return success(true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@DeleteMapping("/deleteOtherParts")
|
||||
@Operation(summary = "删除配件包裹中的配件(删除某一个)")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:delete')")
|
||||
public CommonResult<Boolean> deleteOtherParts (@Valid @RequestBody DeleteOtherPartsReqVO reqVO) {
|
||||
|
||||
packService.deleteOtherParts(reqVO);
|
||||
return success(true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// TODO 查询接口是否需要定义
|
||||
/*
|
||||
@GetMapping("/query")
|
||||
@Operation(summary = "板材列表下的查询")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:query')")
|
||||
public CommonResult<List<OrderPlateGroupRespVO>> GetOrderPlateGroup(@Valid Long orderId) {
|
||||
|
||||
return success(packService.GetOrderPlateGroup(orderId));
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.cf.imes.module.manage.controller.admin.pack.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 删除其他配件 Request VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class DeleteOtherPartsReqVO {
|
||||
|
||||
|
||||
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long orderId;
|
||||
|
||||
|
||||
@Schema(description = "包裹Id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long packageId;
|
||||
|
||||
|
||||
@Schema(description = "明细ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long itemId;
|
||||
|
||||
|
||||
@Schema(description = "是否是其他类型的包裹", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean isOther;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.cf.imes.module.manage.controller.admin.pack.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 包裹新增 Request VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class OrderPackReqVO {
|
||||
|
||||
|
||||
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long orderId;
|
||||
|
||||
|
||||
@Schema(description = "包裹ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long packId;
|
||||
|
||||
|
||||
@Schema(description = "包裹类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long packageType;
|
||||
|
||||
|
||||
@Schema(description = "新增的板件ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<Long> addPlateIdList;
|
||||
|
||||
|
||||
@Schema(description = "移除的板件ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<Long> deletePlateIdList;
|
||||
|
||||
|
||||
@Schema(description = "新增的配件包裹ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<Long> addPartsIdList;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.cf.imes.module.manage.controller.admin.pack.vo;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 生产单模块表 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class OrderPartsReqVO extends PageParam {
|
||||
|
||||
|
||||
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long orderNo;
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.cf.imes.module.manage.controller.admin.pack.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 配件列表详情 Response VO")
|
||||
@Data
|
||||
public class OrderPartsRespVO {
|
||||
|
||||
|
||||
@Schema(description = "配件ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long partsId;
|
||||
|
||||
@Schema(description = "配件名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String partsName;
|
||||
|
||||
@Schema(description = "型号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String model;
|
||||
|
||||
@Schema(description = "规格", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long num;
|
||||
|
||||
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String brand;
|
||||
|
||||
@Schema(description = "厂家", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String factory;
|
||||
|
||||
|
||||
@Schema(description = "配件类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String type;
|
||||
|
||||
|
||||
@Schema(description = "是否复合配件", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean isComposite;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.cf.imes.module.manage.controller.admin.pack.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.apache.poi.ss.formula.functions.Value;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Schema(description = "管理后台 - 板材列表显示 Response VO")
|
||||
@Data
|
||||
public class OrderPlateGroupRespVO {
|
||||
|
||||
|
||||
@Schema(description = "房间id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long roomId;
|
||||
|
||||
|
||||
@Schema(description = "房间名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String roomName;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.cf.imes.module.manage.controller.admin.pack.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 新增外部配件 Request VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class OtherPackReqVO {
|
||||
|
||||
|
||||
|
||||
@Schema(description = "配件ID,主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
|
||||
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
@NotNull(message = "生产单号不能为空")
|
||||
private Long orderId;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "配件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
@NotEmpty(message = "配件名称不能为空")
|
||||
private String name;
|
||||
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
/* @Schema(description = "包裹编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
@NotNull(message = "包裹编号不能为空")
|
||||
private String packNo;*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.cf.imes.module.manage.controller.admin.pack.vo;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 打包分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PackPageReqVO extends PageParam {
|
||||
|
||||
|
||||
@Schema(description = "生产状态(2:生产中,3:生产完成)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
private Long status;
|
||||
|
||||
|
||||
@Schema(description = "订单号")
|
||||
private Long orderNo;
|
||||
|
||||
|
||||
@Schema(description = "自定义单号")
|
||||
private String customOrderNo;
|
||||
|
||||
|
||||
@Schema(description = "客户")
|
||||
private String customer;
|
||||
|
||||
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.cf.imes.module.manage.controller.admin.pack.vo;
|
||||
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 删除订单包裹 Request VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class PackReqVO {
|
||||
|
||||
|
||||
|
||||
@Schema(description = "包裹ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long packageId;
|
||||
|
||||
|
||||
@Schema(description = "包裹编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long packageNo;
|
||||
|
||||
|
||||
@Schema(description = "是否是其他类型的包裹", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean isOther;
|
||||
|
||||
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.cf.imes.module.manage.controller.admin.pack.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "管理后台 - 生产单表 order_{N} Response VO")
|
||||
@Data
|
||||
public class PackRespVO {
|
||||
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7788")
|
||||
private Long id;
|
||||
|
||||
|
||||
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
|
||||
private String customOrderNo;
|
||||
|
||||
|
||||
@Schema(description = "经销商", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
|
||||
private String dealer;
|
||||
|
||||
|
||||
@Schema(description = "交付日期", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
|
||||
private LocalDateTime deliveryDate;
|
||||
|
||||
|
||||
@Schema(description = "订单状态", requiredMode = Schema.RequiredMode.REQUIRED,example = "0")
|
||||
private Long status;
|
||||
|
||||
|
||||
@Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED,example = "张三")
|
||||
private String customer;
|
||||
|
||||
|
||||
@Schema(description = "客户地址", requiredMode = Schema.RequiredMode.REQUIRED,example = "AABB")
|
||||
private String address;
|
||||
|
||||
|
||||
@Schema(description = "客户电话", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
|
||||
private String phoneNumber;
|
||||
|
||||
|
||||
@Schema(description = "业务员", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
|
||||
private String salesman;
|
||||
|
||||
|
||||
@Schema(description = "拆单员", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
|
||||
private String splitter;
|
||||
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "已打包数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long packCount;
|
||||
|
||||
|
||||
@Schema(description = "已打包片数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long packPieceCount;
|
||||
|
||||
|
||||
@Schema(description = "总片数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long totalPieceCount;
|
||||
|
||||
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
package com.cf.imes.module.manage.controller.admin.pack.vo;
|
||||
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Schema(description = "管理后台 - 板材详情(导出板材表) Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PlateDetailsRespVO {
|
||||
|
||||
@Schema(description = "房间名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("房间名称")
|
||||
private String roomName;
|
||||
|
||||
@Schema(description = "柜体名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("柜体名称")
|
||||
private String cabinetName;
|
||||
|
||||
@Schema(description = "板编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("板编号")
|
||||
private String plateNo;
|
||||
|
||||
@Schema(description = "板名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("板名称")
|
||||
private String plateName;
|
||||
|
||||
@Schema(description = "材料", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("材料")
|
||||
private String material;
|
||||
|
||||
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("颜色")
|
||||
private String color;
|
||||
|
||||
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("宽度")
|
||||
private Double width;
|
||||
|
||||
@Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("长度")
|
||||
private Double height;
|
||||
|
||||
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("厚度")
|
||||
private Double thickness;
|
||||
|
||||
@Schema(description = "面积", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("面积")
|
||||
private Double area;
|
||||
|
||||
@Schema(description = "纹路", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("纹路")
|
||||
private String texture;
|
||||
|
||||
@Schema(description = "异形数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("异形")
|
||||
private String specialShaped;
|
||||
|
||||
@Schema(description = "造型数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("造型")
|
||||
private String profiling;
|
||||
|
||||
@Schema(description = "排孔数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("排孔")
|
||||
private String rowHole;
|
||||
|
||||
@Schema(description = "加工组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("加工组")
|
||||
private String processGroup;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.cf.imes.module.manage.controller.admin.pack.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 打印生产单的包裹 Request VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class PrintOrderPackReqVO {
|
||||
|
||||
|
||||
|
||||
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
private Long orderNo;
|
||||
|
||||
|
||||
@Schema(description = "包裹id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
private Long packageNo;
|
||||
|
||||
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.cf.imes.module.manage.controller.admin.pack.vo;
|
||||
|
||||
|
||||
import com.cf.imes.module.manage.controller.admin.grouping.vo.OrderPlateListRespVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 包裹打印显示 Response VO")
|
||||
@Data
|
||||
public class PrintOrderPackRespVO {
|
||||
|
||||
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String customOrderNo;
|
||||
|
||||
|
||||
@Schema(description = "经销商", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
|
||||
private String dealer;
|
||||
|
||||
|
||||
@Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7788")
|
||||
private Long orderNo;
|
||||
|
||||
|
||||
@Schema(description = "包裹ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7788")
|
||||
private Long packNo;
|
||||
|
||||
|
||||
@Schema(description = "包裹序号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7788")
|
||||
private Long packNum;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "客户地址", requiredMode = Schema.RequiredMode.REQUIRED,example = "AABB")
|
||||
private String address;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "板材列表", requiredMode = Schema.RequiredMode.REQUIRED,example = "AABB")
|
||||
private List<OrderPlateListRespVO> plateList;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
package com.cf.imes.module.manage.controller.admin.patching;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.module.manage.controller.admin.patching.vo.*;
|
||||
import com.cf.imes.module.manage.service.patching.PatchingPlateService;
|
||||
import com.cf.imes.module.manage.dal.dataobject.patching.MachineDO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 补板")
|
||||
@RestController
|
||||
@RequestMapping("/manage/patching")
|
||||
@Validated
|
||||
public class PatchingPlateController {
|
||||
|
||||
|
||||
@Resource
|
||||
private PatchingPlateService patchingPlateService;
|
||||
|
||||
|
||||
|
||||
@GetMapping("/searchPage")
|
||||
@Operation(summary = "批量加入补板查询")
|
||||
@PreAuthorize("@ss.hasPermission('manage:patching:query')")
|
||||
public CommonResult<PageResult<PatchingPlateRespVO>> patchingSearchPlate(@Valid PatchingPlatePageReqVO pageReqVO){
|
||||
|
||||
PageResult<PatchingPlateRespVO> patchingPlateRespVOPageResult = patchingPlateService.patchingSearchPlate(pageReqVO);
|
||||
|
||||
return success(patchingPlateRespVOPageResult);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/searchPlate")
|
||||
@Operation(summary = "查询详细的板件")
|
||||
@PreAuthorize("@ss.hasPermission('manage:patching:query')")
|
||||
public CommonResult<PageResult<PatchingDetailRespVO>> searchPlateDetail(@Valid PatchingPlatePageReqVO pageReqVO){
|
||||
|
||||
PageResult<PatchingDetailRespVO> plateDetailsRespVOPageResult = patchingPlateService.searchPlateDetail(pageReqVO);
|
||||
|
||||
return success(plateDetailsRespVOPageResult);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/searchPatchingList")
|
||||
@Operation(summary = "加入的板件信息")
|
||||
@Parameter(name = "plateId", description = "板件ID", required = true, example = "1")
|
||||
@PreAuthorize("@ss.hasPermission('manage:patching:query')")
|
||||
public CommonResult<PatchingDetailRespVO> searchPatchingList(@Valid @RequestParam("plateId") Long plateId){
|
||||
|
||||
return success(patchingPlateService.searchPatchingList(plateId));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/optimizeLayout")
|
||||
@Operation(summary = "优化排版")
|
||||
@PreAuthorize("@ss.hasPermission('manage:patching:query')")
|
||||
public CommonResult<List<PatchingDetailRespVO>> optimizeLayout(@Valid PatchingDetailReqVO reqVO){
|
||||
|
||||
List<PatchingDetailRespVO> patchingDetailRespVOS = patchingPlateService.optimizeLayout(reqVO);
|
||||
|
||||
return success(patchingDetailRespVOS);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/insertPatching")
|
||||
@Operation(summary = "新增补板详情表")
|
||||
@PreAuthorize("@ss.hasPermission('manage:patching:query')")
|
||||
public CommonResult<Boolean> insertPatching(@Valid @RequestBody PatchingReqVO reqVO){
|
||||
|
||||
patchingPlateService.insertPatching(reqVO);
|
||||
|
||||
return success(true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/search")
|
||||
@Operation(summary = "查询所有的机台")
|
||||
@PreAuthorize("@ss.hasPermission('manage:patching:query')")
|
||||
public CommonResult<List<MachineDO>> searchMachine(){
|
||||
|
||||
return success(patchingPlateService.searchMachine());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/searchPatchNC")
|
||||
@Operation(summary = "导出 NC 所需要的数据")
|
||||
@PreAuthorize("@ss.hasPermission('manage:patching:query')")
|
||||
public CommonResult<List<PatchingDetailRespVO>> searchPatchNC(@Valid PatchingDetailReqVO reqVO){
|
||||
|
||||
List<PatchingDetailRespVO> patchingDetailRespVOS = patchingPlateService.optimizeLayout(reqVO);
|
||||
|
||||
return success(patchingDetailRespVOS);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.cf.imes.module.manage.controller.admin.patching.vo;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class DataRangeList {
|
||||
|
||||
// 最大值
|
||||
private Long maxaa;
|
||||
|
||||
// 最小值
|
||||
private Long minbb;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.cf.imes.module.manage.controller.admin.patching.vo;
|
||||
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - Response VO")
|
||||
@Data
|
||||
public class MachineRespVO {
|
||||
|
||||
|
||||
@Schema(description = "机台主键ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
|
||||
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "机台类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean machineType;
|
||||
|
||||
@Schema(description = "标签id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long labelId;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String creator;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.cf.imes.module.manage.controller.admin.patching.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 优化排版 Request VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class PatchingDetailReqVO {
|
||||
|
||||
|
||||
@Schema(description = "板编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<Long> plateIdList;
|
||||
|
||||
|
||||
}
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
package com.cf.imes.module.manage.controller.admin.patching.vo;
|
||||
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 补板详情 Response VO")
|
||||
@Data
|
||||
public class PatchingDetailRespVO {
|
||||
|
||||
|
||||
@Schema(description = "房间名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String roomName;
|
||||
|
||||
@Schema(description = "房间ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long roomId;
|
||||
|
||||
@Schema(description = "柜体名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String cabinetName;
|
||||
|
||||
@Schema(description = "柜体ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long bodyId;
|
||||
|
||||
@Schema(description = "材料", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String material;
|
||||
|
||||
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String color;
|
||||
|
||||
|
||||
|
||||
// 需要添加的额外字段
|
||||
@Schema(description = "板件组合名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String plateCombinationName;
|
||||
|
||||
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long customOrderId;
|
||||
|
||||
@Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String customer;
|
||||
|
||||
@Schema(description = "地址", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String address;
|
||||
|
||||
|
||||
|
||||
// 用于进行判断是否为异形等
|
||||
@Schema(description = "异形数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String specialShaped;
|
||||
|
||||
@Schema(description = "造型数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String profiling;
|
||||
|
||||
@Schema(description = "排孔数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String rowHole;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "主键-板件ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "组织 ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long organId;
|
||||
|
||||
@Schema(description = "板名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "自定义板编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String plateNo;
|
||||
|
||||
@Schema(description = "板类型,0 层板 1 立板 2 背板", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long goodsId;
|
||||
|
||||
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double width;
|
||||
|
||||
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double height;
|
||||
|
||||
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double thickness;
|
||||
|
||||
@Schema(description = "拆单宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double splitWidth;
|
||||
|
||||
@Schema(description = "拆单高度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double splitHeight;
|
||||
|
||||
@Schema(description = "拆单厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double splitThickness;
|
||||
|
||||
@Schema(description = "左封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double sealLeft;
|
||||
|
||||
@Schema(description = "右封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double sealRight;
|
||||
|
||||
@Schema(description = "上封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double sealUp;
|
||||
|
||||
@Schema(description = "下封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double sealDown;
|
||||
|
||||
@Schema(description = "面积", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double area;
|
||||
|
||||
@Schema(description = "纹路类型,0 正纹 1 可翻转 2 反纹", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer texture;
|
||||
|
||||
@Schema(description = "孔面类型,0 正面 1 反面 2 侧面", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer holeFace;
|
||||
|
||||
@Schema(description = "排孔类型,0 正纹 1 反面 2 随意面", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer holeArrange;
|
||||
|
||||
@Schema(description = "异型孔数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer unregularPointCount;
|
||||
|
||||
@Schema(description = "正面孔数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer frontHoleCount;
|
||||
|
||||
@Schema(description = "背面孔数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer backHoleCount;
|
||||
|
||||
@Schema(description = "侧面孔数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer sideHoleCount;
|
||||
|
||||
@Schema(description = "正面造型量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer frontModelCount;
|
||||
|
||||
@Schema(description = "背面造型量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer backModelCount;
|
||||
|
||||
@Schema(description = "是否门板", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean isDoor;
|
||||
|
||||
@Schema(description = "开门类型,0 无 1 左 2 右 3 上 4 下", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer openDoorType;
|
||||
|
||||
@Schema(description = "异型偏移 x", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Float offsetX;
|
||||
|
||||
@Schema(description = "异型偏移 y", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Float offsetY;
|
||||
|
||||
@Schema(description = "是否孤形对角", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean isArcAcross;
|
||||
|
||||
@Schema(description = "模块类型 ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long moduleTypeId;
|
||||
|
||||
@Schema(description = "排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer filterType;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
package com.cf.imes.module.manage.controller.admin.patching.vo;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.core.util.Json;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.apache.ibatis.type.TypeHandler;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 补板 分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PatchingPlatePageReqVO extends PageParam {
|
||||
|
||||
|
||||
|
||||
@Schema(description = "订单号")
|
||||
private Long orderNo;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "自定义单号")
|
||||
private String customOrderNo;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "状态-生产中,加工完成,打包完成", requiredMode = Schema.RequiredMode.REQUIRED,example = "3,4,5")
|
||||
private List<Long> statusList;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "客户")
|
||||
private String customer;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "收货地址")
|
||||
private String address;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "开始时间"/*, requiredMode = Schema.RequiredMode.REQUIRED*/)
|
||||
private String startTime;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "结束时间"/*, requiredMode = Schema.RequiredMode.REQUIRED*/)
|
||||
private String endTime;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "矩形")
|
||||
private Boolean isRectangle;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "异形")
|
||||
private Boolean isSpecialShaped;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "造型")
|
||||
private Boolean isProfiling;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "有挖穿造型")
|
||||
private Boolean isDigThrough;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "有挖穿孔")
|
||||
private Boolean isDiggingHoles;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "有二维刀路")
|
||||
private Boolean is2DCuttingPath;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "门板")
|
||||
private Boolean isDoor;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "长范围")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<DataRangeList> longRangeList;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "宽范围")
|
||||
private List<DataRangeList> WidthRangeList;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.cf.imes.module.manage.controller.admin.patching.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 补板 Response VO")
|
||||
@Data
|
||||
public class PatchingPlateRespVO {
|
||||
|
||||
@Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long customOrderId;
|
||||
|
||||
@Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String customer;
|
||||
|
||||
@Schema(description = "地址", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String address;
|
||||
|
||||
@Schema(description = "订单状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long orderStatus;
|
||||
|
||||
@Schema(description = "柜体ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long groupId;
|
||||
|
||||
@Schema(description = "板件显示名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String plateName;
|
||||
|
||||
@Schema(description = "材料", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String material;
|
||||
|
||||
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String color;
|
||||
|
||||
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double width;
|
||||
|
||||
@Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double height;
|
||||
|
||||
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double thickness;
|
||||
|
||||
@Schema(description = "面积", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double area;
|
||||
|
||||
@Schema(description = "板件数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long plateNum;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.cf.imes.module.manage.controller.admin.patching.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Schema(description = "管理后台 - 新增补板详情 Request VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class PatchingReqVO {
|
||||
|
||||
|
||||
@Schema(description = "板编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<Long> idList;
|
||||
|
||||
@Schema(description = "计划ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long planId;
|
||||
|
||||
|
||||
@Schema(description = "机台", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long machineId;
|
||||
|
||||
|
||||
/* @Schema(description = "板材详情", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String detail;*/
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.cf.imes.module.manage.controller.admin.process;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.*;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderPlateRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.PlatePageVO;
|
||||
import com.cf.imes.module.manage.service.process.ProductionProcessService;
|
||||
import com.cf.imes.module.manage.service.query.ProductionStatusService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 生产单工序 process")
|
||||
@RestController
|
||||
@RequestMapping("/manage/process")
|
||||
@Validated
|
||||
public class ProductionProcessController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ProductionProcessService productionProcessService;
|
||||
|
||||
@Resource
|
||||
private ProductionStatusService productionStatusService;
|
||||
|
||||
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "查看生产工序分页")
|
||||
@PreAuthorize("@ss.hasPermission('manage:process:query')")
|
||||
public CommonResult<PageResult<ProcessRespVO>> getUserPage(@Valid ProcessPageReqVO pageReqVO) {
|
||||
|
||||
return success(productionProcessService.getProcessPage(pageReqVO));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/select")
|
||||
@Operation(summary = "根据工序号查看生产工序下的加工项")
|
||||
@PreAuthorize("@ss.hasPermission('manage:process:query')")
|
||||
public CommonResult<List<OrderProcessStepItemVO>> selectProcess(@Valid OrderProcessReqVO reqVO){
|
||||
List<OrderProcessStepItemVO> orderProcessById = productionProcessService.getOrderProcessById(reqVO);
|
||||
return CommonResult.success(orderProcessById);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "根据工序明细 ID 修改生产工序明细表的状态")
|
||||
@Parameter(name = "id", description = "工序明细ID", required = true, example = "1")
|
||||
@PreAuthorize("@ss.hasPermission('manage:process:update')")
|
||||
public CommonResult<Boolean> updateProcessStatus(@Valid @RequestParam("id") Long id){
|
||||
productionProcessService.updateProcessStatus(id);
|
||||
return success(true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PutMapping("/updateAll")
|
||||
@Operation(summary = "修改生产步骤表的工序状态")
|
||||
@PreAuthorize("@ss.hasPermission('manage:process:update')")
|
||||
public CommonResult<Boolean> updateAllProcessStatus(@Valid @RequestBody OrderProStepReqVO reqVO){
|
||||
productionProcessService.updateAllProcessStatus(reqVO);
|
||||
return success(true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/selectPlateName")
|
||||
@Operation(summary = "查看板材信息的组合名称")
|
||||
@Parameter(name = "stepItemId", description = "工序明细ID", required = true, example = "1")
|
||||
@PreAuthorize("@ss.hasPermission('manage:process:query')")
|
||||
public CommonResult<List<OrderModuleVO>> selectPlateName(@Valid @RequestParam("stepItemId") Long stepItemId){
|
||||
|
||||
return success(productionProcessService.selectPlateName(stepItemId));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/pagePlate")
|
||||
@Operation(summary = "查看板材信息分页")
|
||||
@PreAuthorize("@ss.hasPermission('manage:process:query')")
|
||||
public CommonResult<PageResult<OrderPlateRespVO>> queryPlate(@Valid PlatePageVO pageReqVO){
|
||||
return success(productionStatusService.getOrderPlatePage(pageReqVO));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.cf.imes.module.manage.controller.admin.process.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 修改生产步骤表 ")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class OrderProStepReqVO {
|
||||
|
||||
|
||||
@Schema(description = "工序步骤id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long processStepId;
|
||||
|
||||
|
||||
@Schema(description = "生产单工序ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long orderProcessId;
|
||||
|
||||
|
||||
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long orderId;
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.cf.imes.module.manage.controller.admin.process.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 生产单工序明细表 Request VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class OrderProcessReqVO {
|
||||
|
||||
|
||||
@Schema(description = "工序步骤ID", requiredMode = Schema.RequiredMode.REQUIRED,example = "12")
|
||||
private Long processStepId;
|
||||
|
||||
@Schema(description = "工序状态",requiredMode = Schema.RequiredMode.REQUIRED, example = "false")
|
||||
private Boolean status;
|
||||
|
||||
@Schema(description = "生产单工序ID",requiredMode = Schema.RequiredMode.REQUIRED, example = "1234")
|
||||
private Long orderProcessId;
|
||||
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.cf.imes.module.manage.controller.admin.process.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Schema(description = "管理后台 - 生产单工序步骤表 order_process_step_{N} Response VO")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderProcessStepItemVO {
|
||||
|
||||
|
||||
@Schema(description = "主键-工序明细ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "加工项名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "工序组ID")
|
||||
private Long orderProcessId;
|
||||
|
||||
@Schema(description = "工序名称")
|
||||
private String stepName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.cf.imes.module.manage.controller.admin.process.vo;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 生产单表 分页 Request VO ")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ProcessPageReqVO extends PageParam {
|
||||
|
||||
|
||||
@Schema(description = "工序 id", requiredMode = Schema.RequiredMode.REQUIRED,example = "12")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "订单状态",requiredMode = Schema.RequiredMode.REQUIRED, example = "false")
|
||||
private Boolean status;
|
||||
|
||||
@Schema(description = "生产单号")
|
||||
private Long orderNo;
|
||||
|
||||
@Schema(description = "自定义单号")
|
||||
private String customOrderNo;
|
||||
|
||||
@Schema(description = "客户")
|
||||
private String customer;
|
||||
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
package com.cf.imes.module.manage.controller.admin.process.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Schema(description = "管理后台 - 生产单表 order_{N} Response VO")
|
||||
@Data
|
||||
public class ProcessRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7788")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "生产单工序步骤ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7788")
|
||||
private Long processStepId;
|
||||
|
||||
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
|
||||
private String customOrderNo;
|
||||
|
||||
|
||||
@Schema(description = "经销商", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
|
||||
private String dealer;
|
||||
|
||||
|
||||
@Schema(description = "交付日期", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
|
||||
private LocalDateTime deliveryDate;
|
||||
|
||||
|
||||
@Schema(description = "订单状态", requiredMode = Schema.RequiredMode.REQUIRED,example = "0")
|
||||
private Long status;
|
||||
|
||||
|
||||
@Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED,example = "张三")
|
||||
private String customer;
|
||||
|
||||
|
||||
@Schema(description = "客户地址", requiredMode = Schema.RequiredMode.REQUIRED,example = "AABB")
|
||||
private String address;
|
||||
|
||||
|
||||
@Schema(description = "客户电话", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
|
||||
private String phoneNumber;
|
||||
|
||||
|
||||
@Schema(description = "业务员", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
|
||||
private String salesman;
|
||||
|
||||
|
||||
@Schema(description = "拆单员", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
|
||||
private String splitter;
|
||||
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "已打包数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long packCount;
|
||||
|
||||
|
||||
@Schema(description = "已打包片数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long packPieceCount;
|
||||
|
||||
|
||||
@Schema(description = "总片数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long totalPieceCount;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.cf.imes.module.manage.controller.admin.process.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "更改状态")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class ProcessStepVo {
|
||||
|
||||
|
||||
@Schema(description = "步骤ID", requiredMode = Schema.RequiredMode.REQUIRED,example = "3344")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "订单状态",requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean Status;
|
||||
|
||||
|
||||
}
|
||||
+195
@@ -0,0 +1,195 @@
|
||||
package com.cf.imes.module.manage.controller.admin.query;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||
import com.cf.imes.framework.excel.core.util.ExcelUtils;
|
||||
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.OrderPartsReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PlateDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.ProcessRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.OrderPackagePageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.OrderPackageVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.PackageDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.PrintOrderRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.*;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.salary.PriceRatePageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.salary.PriceRateReqVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderDO;
|
||||
import com.cf.imes.module.manage.service.query.ProductionStatusService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
||||
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
|
||||
@Tag(name = "管理后台 - 生产查询")
|
||||
@RestController
|
||||
@RequestMapping("/manage/query")
|
||||
@Validated
|
||||
public class ProductionStatusController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ProductionStatusService productionStatusService;
|
||||
|
||||
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "生产状态查询分页")
|
||||
@PreAuthorize("@ss.hasPermission('manage:query:query')")
|
||||
public CommonResult<PageResult<ProcessRespVO>> pageProductionStatus(@Valid OrderPlatePageReqVO pageReqVO){
|
||||
PageResult<OrderDO> pageResult = productionStatusService.getProductionPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ProcessRespVO.class));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/select")
|
||||
@Operation(summary = "查看生产单下的工序组工序")
|
||||
@Parameter(name = "orderNo", description = "生产单Id", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('manage:query:query')")
|
||||
public CommonResult<List<ProductionGroupVO>> selectProduction(@Valid @RequestParam("orderNo") Long orderNo){
|
||||
|
||||
List<ProductionGroupVO> orderProcessById = productionStatusService.selectProduction(orderNo);
|
||||
|
||||
return CommonResult.success(orderProcessById);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/selectPlateName")
|
||||
@Operation(summary = "查看板材信息的组合名称")
|
||||
@PreAuthorize("@ss.hasPermission('manage:query:query')")
|
||||
public CommonResult<List<OrderModuleVO>> selectPlateName(@Valid OrderModuleReqVO reqVO){
|
||||
|
||||
return success(productionStatusService.selectPlateName(reqVO));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/pagePlate")
|
||||
@Operation(summary = "查看板材信息分页")
|
||||
@PreAuthorize("@ss.hasPermission('manage:query:query')")
|
||||
public CommonResult<PageResult<OrderPlateRespVO>> queryPlate(@Valid PlatePageVO pageReqVO){
|
||||
return success(productionStatusService.getOrderPlatePage(pageReqVO));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/pageSalary")
|
||||
@Operation(summary = "计件工资分页查询")
|
||||
@PreAuthorize("@ss.hasPermission('manage:query:query')")
|
||||
public CommonResult<PageResult<PriceRateReqVO>> StepSalary(@Valid PriceRatePageReqVO pageReqVO){
|
||||
|
||||
PageResult<PriceRateReqVO> salaryPage = productionStatusService.getSalaryPage(pageReqVO);
|
||||
|
||||
return CommonResult.success(salaryPage);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/pagePackage")
|
||||
@Operation(summary = "打包查询分页")
|
||||
@PreAuthorize("@ss.hasPermission('manage:query:query')")
|
||||
public CommonResult<PageResult<ProcessRespVO>> queryPackage(@Valid OrderPlatePageReqVO pageReqVO){
|
||||
|
||||
PageResult<OrderDO> pageResult = productionStatusService.queryPackage(pageReqVO);
|
||||
|
||||
return success(BeanUtils.toBean(pageResult, ProcessRespVO.class));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/queryPackageList")
|
||||
@Operation(summary = "生产单打包完成包裹查看")
|
||||
@Parameter(name = "orderNo", description = "生产单Id", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('manage:query:query')")
|
||||
public CommonResult<List<OrderPackageVO>> queryPackageList(@Valid @RequestParam("orderNo") Long orderNo){
|
||||
|
||||
List<OrderPackageVO> orderProcessById = productionStatusService.getPackageList(orderNo);
|
||||
|
||||
return CommonResult.success(orderProcessById);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/queryPackageDetails")
|
||||
@Operation(summary = "查看包裹详情分页")
|
||||
@Parameter(name = "packId", description = "包裹Id", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('manage:query:query')")
|
||||
public CommonResult<List<PackageDetailsRespVO>> queryPackageDetails(@Valid @RequestParam("packId") Long packId){
|
||||
|
||||
return CommonResult.success(productionStatusService.queryPackageDetails(packId));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/printOrder")
|
||||
@Operation(summary = "打印订单")
|
||||
@Parameter(name = "orderNo", description = "生产单Id", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('manage:query:export')")
|
||||
public CommonResult<PrintOrderRespVO> printOrder(@Valid @RequestParam("orderNo") Long orderNo){
|
||||
|
||||
return CommonResult.success(productionStatusService.printOrder(orderNo));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/export")
|
||||
@Operation(summary = "导出缺板")
|
||||
@PreAuthorize("@ss.hasPermission('manage:query:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportPlateExcel(@Valid OrderPartsReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PlateDetailsRespVO> list = productionStatusService.getMissingBoard(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "缺板信息表.xls", "数据", PlateDetailsRespVO.class, list);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.cf.imes.module.manage.controller.admin.query.vo.pack;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 查看包裹详情分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class OrderPackagePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "包裹Id")
|
||||
private Long packageNo;
|
||||
|
||||
/* @Schema(description = "包裹类型")
|
||||
private Integer type;*/
|
||||
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.cf.imes.module.manage.controller.admin.query.vo.pack;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 生产单包裹表 Response VO")
|
||||
@Data
|
||||
public class OrderPackageVO {
|
||||
|
||||
|
||||
|
||||
@Schema(description = "主键-包裹ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long orderNo;
|
||||
|
||||
@Schema(description = "包裹编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String packageNo;
|
||||
|
||||
@Schema(description = "包裹类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long type;
|
||||
|
||||
@Schema(description = "包裹状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long status;
|
||||
|
||||
@Schema(description = "组织ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long organId;
|
||||
|
||||
@Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "出库人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String updater;
|
||||
|
||||
@Schema(description = "出库时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
package com.cf.imes.module.manage.controller.admin.query.vo.pack;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 包裹详情 Response VO")
|
||||
@Data
|
||||
public class PackageDetailsRespVO {
|
||||
|
||||
@Schema(description = "房间名称-板材类型显示", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String roomName;
|
||||
|
||||
@Schema(description = "柜体名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String cabinetName;
|
||||
|
||||
@Schema(description = "板编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String plateNo;
|
||||
|
||||
@Schema(description = "板名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String plateName;
|
||||
|
||||
@Schema(description = "材料", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String material;
|
||||
|
||||
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String color;
|
||||
|
||||
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double width;
|
||||
|
||||
@Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double height;
|
||||
|
||||
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double thickness;
|
||||
|
||||
@Schema(description = "面积", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double area;
|
||||
|
||||
@Schema(description = "纹路", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String texture;
|
||||
|
||||
@Schema(description = "异形数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String specialShaped;
|
||||
|
||||
@Schema(description = "造型数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String profiling;
|
||||
|
||||
@Schema(description = "排孔数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String rowHole;
|
||||
|
||||
@Schema(description = "加工组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String processGroup;
|
||||
|
||||
|
||||
@Schema(description = "备注(板材和配件都要传递)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "配件名称-配件类型显示", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String partsName;
|
||||
|
||||
@Schema(description = "型号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String model;
|
||||
|
||||
@Schema(description = "规格", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long num;
|
||||
|
||||
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String brand;
|
||||
|
||||
@Schema(description = "厂家", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String factory;
|
||||
|
||||
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.cf.imes.module.manage.controller.admin.query.vo.pack;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 打印订单 Response VO")
|
||||
@Data
|
||||
public class PrintOrderRespVO {
|
||||
|
||||
|
||||
@Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long orderNo;
|
||||
|
||||
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String customOrderNo;
|
||||
|
||||
@Schema(description = "经销商", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String dealer;
|
||||
|
||||
@Schema(description = "收货地址", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String address;
|
||||
|
||||
@Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String customer;
|
||||
|
||||
@Schema(description = "客户手机号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String customerPhone;
|
||||
|
||||
|
||||
@Schema(description = "包裹数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer packageQuantity;
|
||||
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.cf.imes.module.manage.controller.admin.query.vo.productionStatus;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
|
||||
@Schema(description = "管理后台 - 生产单模块表 Request VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class OrderModuleReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
private Long orderNo;
|
||||
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.cf.imes.module.manage.controller.admin.query.vo.productionStatus;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "管理后台 - 生产单模块表 order_module_{N} Response VO")
|
||||
@Data
|
||||
public class OrderModuleVO {
|
||||
|
||||
@Schema(description = "柜体 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "嘿嘿")
|
||||
private Long bodyId;
|
||||
|
||||
|
||||
@Schema(description = "加工组 id", example = "嘿嘿")
|
||||
private Long groupId;
|
||||
|
||||
|
||||
@Schema(description = "组合名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "嘿嘿")
|
||||
private String name;
|
||||
|
||||
|
||||
@Schema(description = "加工组名称", example = "嘿嘿")
|
||||
private String groupName;
|
||||
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.cf.imes.module.manage.controller.admin.query.vo.productionStatus;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Schema(description = "管理后台 - 生产单表 order_{N} 分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class OrderPlatePageReqVO extends PageParam {
|
||||
|
||||
|
||||
|
||||
@Schema(description = "生产状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2,3")
|
||||
private List<Long> statusList;
|
||||
|
||||
|
||||
@Schema(description = "订单号")
|
||||
private Long orderNo;
|
||||
|
||||
|
||||
@Schema(description = "自定义单号")
|
||||
private String customOrderNo;
|
||||
|
||||
|
||||
@Schema(description = "客户")
|
||||
private String customer;
|
||||
|
||||
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
|
||||
|
||||
@Schema(description = "经销商")
|
||||
private String dealer;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.cf.imes.module.manage.controller.admin.query.vo.productionStatus;
|
||||
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 板材信息表 Response VO")
|
||||
@Data
|
||||
public class OrderPlateRespVO {
|
||||
|
||||
@Schema(description = "板编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
private String name;
|
||||
|
||||
|
||||
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String color;
|
||||
|
||||
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double width;
|
||||
|
||||
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double height;
|
||||
|
||||
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double thickness;
|
||||
|
||||
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String material;
|
||||
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.cf.imes.module.manage.controller.admin.query.vo.productionStatus;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 板材信息表分页")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PlatePageVO extends PageParam {
|
||||
|
||||
@Schema(description = "柜体 id",requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long bodyId ;
|
||||
|
||||
|
||||
@Schema(description = "加工组 id")
|
||||
private Long groupId;
|
||||
|
||||
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.cf.imes.module.manage.controller.admin.query.vo.productionStatus;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 生产单工序步骤表 order_process_step_{N} Response VO")
|
||||
@Data
|
||||
public class ProductionGroupVO {
|
||||
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4399")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工序组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "嘿嘿")
|
||||
private String groupName;
|
||||
|
||||
@Schema(description = "工序名", requiredMode = Schema.RequiredMode.REQUIRED, example = "嘿嘿")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "加工状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean status;
|
||||
|
||||
@Schema(description = "工序负责人", requiredMode = Schema.RequiredMode.REQUIRED, example = "cfy_cf")
|
||||
private String manager;
|
||||
|
||||
@Schema(description = "加工时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime processDate;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.cf.imes.module.manage.controller.admin.query.vo.salary;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import static com.cf.imes.framework.common.util.date.DateUtils.*;
|
||||
|
||||
@Schema(description = "管理后台 - 计件工资查询分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PriceRatePageReqVO extends PageParam {
|
||||
|
||||
|
||||
@Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String startTime;
|
||||
|
||||
|
||||
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String endTime;
|
||||
|
||||
|
||||
@Schema(description = "加工人")
|
||||
private String creator;
|
||||
|
||||
|
||||
@Schema(description = "工序名称")
|
||||
private String name;
|
||||
|
||||
|
||||
@Schema(description = "显示零单价(默认不显示-false)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean noShowZero;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.cf.imes.module.manage.controller.admin.query.vo.salary;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 计件工资查询 Response VO")
|
||||
@Data
|
||||
public class PriceRateReqVO {
|
||||
|
||||
|
||||
@Schema(description = "工序名", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "计件工资", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long priceRate;
|
||||
|
||||
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long num;
|
||||
|
||||
@Schema(description = "计件类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer priceType;
|
||||
|
||||
@Schema(description = "金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long amount;
|
||||
|
||||
|
||||
@Schema(description = "加工人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String manager;
|
||||
|
||||
|
||||
}
|
||||
+212
@@ -1,14 +1,53 @@
|
||||
package com.cf.imes.module.manage.controller.admin.test;
|
||||
|
||||
import com.cf.imes.framework.common.util.json.JsonUtils;
|
||||
import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||
import com.cf.imes.framework.quartz.config.XxlJobProperties;
|
||||
import com.cf.imes.module.manage.config.XxlJobParameter;
|
||||
import com.cf.imes.module.manage.controller.admin.patching.vo.PatchingDetailRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.patching.vo.PatchingPlateRespVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderProcessStepItemNDO;
|
||||
import com.cf.imes.module.manage.dal.mysql.plate.OrderPlateMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.process.ProcessStepItemMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.test.TestMapper;
|
||||
import com.jacob.com.ComThread;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.annotation.security.PermitAll;
|
||||
import javax.sound.sampled.AudioInputStream;
|
||||
|
||||
import com.jacob.activeX.ActiveXComponent;
|
||||
import com.jacob.com.Dispatch;
|
||||
import com.jacob.com.Variant;
|
||||
|
||||
import javax.sound.sampled.*;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import java.net.Socket;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
/**
|
||||
* @author there
|
||||
@@ -22,10 +61,183 @@ public class TestController {
|
||||
@Resource
|
||||
private TestMapper testMapper;
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/get")
|
||||
@PermitAll
|
||||
@Operation(summary = "测试")
|
||||
public Object get() {
|
||||
return testMapper.selectList();
|
||||
}
|
||||
|
||||
|
||||
public class JacobTestController {
|
||||
/* *
|
||||
* 语音转文字并播放
|
||||
*
|
||||
* @param text
|
||||
*/
|
||||
private static void convertTextToSpeech(String text) {
|
||||
|
||||
|
||||
try {
|
||||
|
||||
//jacob.dll没成功安装,执行这一步会出错
|
||||
//构建音频格式 调用注册表应用
|
||||
Dispatch spAudioFormat = new ActiveXComponent("Sapi.SpAudioFormat").getObject();
|
||||
//音频文件输出流
|
||||
Dispatch spFileStream = new ActiveXComponent("Sapi.SpFileStream").getObject();
|
||||
//构建音频对象
|
||||
Dispatch spVoice = new ActiveXComponent("Sapi.SpVoice").getObject();
|
||||
|
||||
//设置spAudioFormat音频流格式类型22
|
||||
Dispatch.put(spAudioFormat, "Type", new Variant(22));
|
||||
//设置spFileStream文件输出流的音频格式
|
||||
Dispatch.putRef(spFileStream, "Format", spAudioFormat);
|
||||
|
||||
//设置spFileStream文件输出流参数地址等
|
||||
Dispatch.call(spFileStream, "Open", new Variant("E:AAAAA\48641486.wav"), new Variant(3), new Variant(true));
|
||||
//设置spVoice声音对象的音频输出流为输出文件对象
|
||||
Dispatch.putRef(spVoice, "AudioOutputStream", spFileStream);
|
||||
//设置spVoice声音对象的音量大小100
|
||||
Dispatch.put(spVoice, "Volume", new Variant(100));
|
||||
//设置spVoice声音对象的速度 0为正常速度,范围【..-2 -1 0 1 2..】
|
||||
Dispatch.put(spVoice, "Rate", new Variant(0));
|
||||
//设置spVoice声音对象中的文本内容
|
||||
Dispatch.call(spVoice, "Speak", new Variant(text));
|
||||
//关闭spFileStream输出文件
|
||||
Dispatch.call(spFileStream, "Close");
|
||||
|
||||
//释放资源
|
||||
spVoice.safeRelease();
|
||||
spAudioFormat.safeRelease();
|
||||
spFileStream.safeRelease();
|
||||
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private static XxlJobProperties aabb(){
|
||||
|
||||
XxlJobParameter xxlJobParameter = new XxlJobParameter();
|
||||
|
||||
xxlJobParameter.setEnabled(false);
|
||||
xxlJobParameter.setAccessToken("1122");
|
||||
xxlJobParameter.setAddresses("五阿里乌");
|
||||
xxlJobParameter.setAppName("aaappn");
|
||||
XxlJobProperties bean = BeanUtils.toBean(xxlJobParameter, XxlJobProperties.class);
|
||||
return bean;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void deleteFiles(List<String> filePaths) {
|
||||
// 检查文件路径集合是否为空
|
||||
if (filePaths == null || filePaths.isEmpty()) {
|
||||
System.out.println("文件路径集合为空");
|
||||
return;
|
||||
}
|
||||
|
||||
for (String filePath : filePaths) {
|
||||
// 检查文件路径是否为空
|
||||
if (filePath == null || filePath.isEmpty()) {
|
||||
System.out.println("文件路径为空");
|
||||
continue;
|
||||
}
|
||||
|
||||
File file = new File(filePath);
|
||||
|
||||
// 检查文件是否存在
|
||||
if (!file.exists()) {
|
||||
System.out.println("文件不存在:" + filePath);
|
||||
continue;
|
||||
}
|
||||
|
||||
// 检查是否是文件
|
||||
if (!file.isFile()) {
|
||||
System.out.println("路径指向的不是文件:" + filePath);
|
||||
continue;
|
||||
}
|
||||
|
||||
// 尝试删除文件
|
||||
if (file.delete()) {
|
||||
System.out.println("文件删除成功:" + filePath);
|
||||
} else {
|
||||
System.out.println("文件删除失败:" + filePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static Integer aacc(){
|
||||
|
||||
RedisTemplate<Object, Object> re = new RedisTemplate<>();
|
||||
|
||||
int randomInt = new Random(System.currentTimeMillis()).nextInt(900) + 100;// 生成100到999之间的随机数
|
||||
|
||||
|
||||
|
||||
return randomInt;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@TestOnly
|
||||
public static void main(String[] args) {
|
||||
|
||||
// // 创建文件路径集合并添加文件路径
|
||||
// List<String> filePaths = new ArrayList<>();
|
||||
// filePaths.add("E:/BBBBBBB/1.txt");
|
||||
// filePaths.add("E:/BBBBBBB/2.txt");
|
||||
// filePaths.add("E:/BBBBBBB/4.txt");
|
||||
|
||||
List<Integer> filePaths = new ArrayList<>();
|
||||
filePaths.add(aacc());
|
||||
|
||||
System.out.println(filePaths);
|
||||
|
||||
// // 调用 deleteFiles 方法,传入文件路径集合
|
||||
// deleteFiles(filePaths);
|
||||
// System.out.println(JacobTestController.aabb());
|
||||
|
||||
|
||||
|
||||
|
||||
/* PatchingPlateRespVO patchingPlateRespVO = new PatchingPlateRespVO();
|
||||
|
||||
patchingPlateRespVO.setGroupId(11L);
|
||||
patchingPlateRespVO.setArea(11.2);
|
||||
patchingPlateRespVO.setColor("红色");
|
||||
patchingPlateRespVO.setHeight(11.2);
|
||||
|
||||
String jsonString = JsonUtils.toJsonString(patchingPlateRespVO);
|
||||
System.out.println(jsonString);*/
|
||||
|
||||
//
|
||||
/*byte[] 测试测试s = JacobTestController.convertTextToSpeech("测试测试");*/
|
||||
|
||||
// JacobTestController.convertTextToSpeech("测试测试");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.cf.imes.module.manage.controller.admin.voice;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||
import com.cf.imes.module.manage.controller.admin.voice.vo.VoiceReqVO;
|
||||
import com.cf.imes.module.manage.service.voice.VoiceService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 语音播报")
|
||||
@RestController
|
||||
@RequestMapping("/manage/voice")
|
||||
@Validated
|
||||
public class VoiceController {
|
||||
|
||||
|
||||
@Resource
|
||||
private VoiceService voiceService;
|
||||
|
||||
|
||||
@PostMapping("/")
|
||||
@Operation(summary = "语音播报")
|
||||
@PreAuthorize("@ss.hasPermission('manage:voice:insert')")
|
||||
public CommonResult<String> voiceAnnouncements(@Valid @RequestBody VoiceReqVO reqVO ) throws Exception {
|
||||
|
||||
String sourceFile = voiceService.voiceAnnouncements(reqVO.getText());
|
||||
|
||||
String gzipFile = sourceFile+".zip";
|
||||
|
||||
voiceService.zipFiles(sourceFile, gzipFile);
|
||||
|
||||
return CommonResult.success(gzipFile);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.cf.imes.module.manage.controller.admin.voice.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 语音播报 Request VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class VoiceReqVO {
|
||||
|
||||
|
||||
@Schema(description = "语音数据", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String text;
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.cf.imes.module.manage.dal.dataobject.pack;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
@TableName("order_body")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderBodyDO extends BaseDO {
|
||||
|
||||
@TableId
|
||||
// 主键
|
||||
private Long id;
|
||||
|
||||
// 生产单号
|
||||
private Long orderId;
|
||||
|
||||
// 组织 ID,默认为1
|
||||
private Long organId;
|
||||
|
||||
// 房间ID
|
||||
private Long roomId;
|
||||
|
||||
// 房间名称
|
||||
private String roomName;
|
||||
|
||||
// 模块名称
|
||||
private String name;
|
||||
|
||||
// 模块宽度
|
||||
private Float width;
|
||||
|
||||
// 模块高度
|
||||
private Float height;
|
||||
|
||||
// 模块深度
|
||||
private Float depth;
|
||||
|
||||
// 模块复制数量
|
||||
private Integer multiNum;
|
||||
|
||||
// 板材数量
|
||||
private Integer plateNum;
|
||||
|
||||
// 异型数量
|
||||
private Integer unregularNum;
|
||||
|
||||
// 文件名
|
||||
private String filename;
|
||||
|
||||
// 备注
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.cf.imes.module.manage.dal.dataobject.patching;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.organ.core.db.OrganBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
@TableName("imes_base.system_machine")
|
||||
@KeySequence("machine_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MachineDO extends OrganBaseDO {
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 1机台设备 2CNC设备
|
||||
*/
|
||||
private Boolean machineType;
|
||||
/**
|
||||
* 标签id
|
||||
*/
|
||||
private Long labelId;
|
||||
|
||||
|
||||
// 配置
|
||||
private String setting;
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.cf.imes.module.manage.dal.dataobject.patching;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.cf.imes.framework.organ.core.db.OrganBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
@TableName("order_patch_detail_n")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PatchDetailDO extends OrganBaseDO {
|
||||
|
||||
|
||||
// 补板ID
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
// 生产单号
|
||||
private Long orderId;
|
||||
|
||||
// 组织 ID
|
||||
private Long organId;
|
||||
|
||||
// 总面积
|
||||
private Double area;
|
||||
|
||||
// 计划 ID
|
||||
private Long planId;
|
||||
|
||||
// 机台 ID
|
||||
private Long machineId;
|
||||
|
||||
// 板材详情
|
||||
private String detail;
|
||||
|
||||
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
package com.cf.imes.module.manage.dal.dataobject.plate;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
@TableName("order_plate")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderPlateDO extends BaseDO {
|
||||
|
||||
|
||||
// 板件 ID
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
// 生产单号
|
||||
private Long orderId;
|
||||
|
||||
// 组织 ID
|
||||
private Long organId;
|
||||
|
||||
// 板名称
|
||||
private String name;
|
||||
|
||||
// 自定义板编号
|
||||
private String plateNo;
|
||||
|
||||
// 板类型,0 层板 1 立板 2 背板
|
||||
private Integer type;
|
||||
|
||||
// 商品 ID
|
||||
private String goodsId;
|
||||
|
||||
// 宽度
|
||||
private Double width;
|
||||
|
||||
// 高度
|
||||
private Double height;
|
||||
|
||||
// 厚度
|
||||
private Double thickness;
|
||||
|
||||
// 拆单宽度
|
||||
private Double splitWidth;
|
||||
|
||||
// 拆单高度
|
||||
private Double splitHeight;
|
||||
|
||||
// 拆单厚度
|
||||
private Double splitThickness;
|
||||
|
||||
// 左封边厚度
|
||||
private Double sealLeft;
|
||||
|
||||
// 右封边厚度
|
||||
private Double sealRight;
|
||||
|
||||
// 上封边厚度
|
||||
private Double sealUp;
|
||||
|
||||
// 下封边厚度
|
||||
private Double sealDown;
|
||||
|
||||
// 面积
|
||||
private Double area;
|
||||
|
||||
// 纹路类型,0 正纹 1 可翻转 2 反纹
|
||||
private Integer texture;
|
||||
|
||||
// 孔面类型,0 正面 1 反面 2 侧面
|
||||
private Integer holeFace;
|
||||
|
||||
// 排孔类型,0 正纹 1 反面 2 随意面
|
||||
private Integer holeArrange;
|
||||
|
||||
// 异型孔数量
|
||||
private Integer unregularPointCount;
|
||||
|
||||
// 正面孔数量
|
||||
private Integer frontHoleCount;
|
||||
|
||||
// 背面孔数量
|
||||
private Integer backHoleCount;
|
||||
|
||||
// 侧面孔数量
|
||||
private Integer sideHoleCount;
|
||||
|
||||
// 正面造型量
|
||||
private Integer frontModelCount;
|
||||
|
||||
// 背面造型量
|
||||
private Integer backModelCount;
|
||||
|
||||
// 是否门板
|
||||
private Boolean isDoor;
|
||||
|
||||
// 开门类型,0 无 1 左 2 右 3 上 4 下
|
||||
private Integer openDoorType;
|
||||
|
||||
// 异型偏移 x
|
||||
private Float offsetX;
|
||||
|
||||
// 异型偏移 y
|
||||
private Float offsetY;
|
||||
|
||||
// 是否孤形对角
|
||||
private Boolean isArcAcross;
|
||||
|
||||
// 模块类型 ID
|
||||
private Long moduleTypeId;
|
||||
|
||||
// 排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠
|
||||
private Integer filterType;
|
||||
|
||||
// 备注
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package com.cf.imes.module.manage.dal.dataobject.process;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
@TableName(value = "`order`") // 由于 SQL Server 的 system_user 是关键字,所以使用 system_users
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderDO extends BaseDO {
|
||||
|
||||
@TableId()
|
||||
// 生产单号
|
||||
private Long id;
|
||||
|
||||
// 订单状态
|
||||
private Long status;
|
||||
|
||||
// 自定义单号
|
||||
private String customOrderNo;
|
||||
|
||||
// 客户
|
||||
private String customer;
|
||||
|
||||
// 客户地址
|
||||
private String address;
|
||||
|
||||
// 客户电话
|
||||
private String phoneNumber;
|
||||
|
||||
// 组织 id
|
||||
private Long organId;
|
||||
|
||||
// 经销商
|
||||
private String dealer;
|
||||
|
||||
// 经销商电话
|
||||
private String dealerPhoneNumber;
|
||||
|
||||
// 业务员
|
||||
private String salesman;
|
||||
|
||||
// 拆单员
|
||||
private String splitter;
|
||||
|
||||
// 备注
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.cf.imes.module.manage.dal.dataobject.process;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
@TableName(value = "order_process") // 由于 SQL Server 的 system_user 是关键字,所以使用 system_users
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderProcessNDO extends BaseDO {
|
||||
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
// 生产单号
|
||||
private Long orderId;
|
||||
|
||||
// 工序名
|
||||
private String name;
|
||||
|
||||
// 工序状态
|
||||
private Boolean status;
|
||||
|
||||
// 工序组 id
|
||||
private Long groupId;
|
||||
|
||||
// 板材大小
|
||||
private Float size;
|
||||
|
||||
// 下一工序Id
|
||||
private Long nextStepId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.cf.imes.module.manage.dal.dataobject.process;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
@TableName(value = "order_process_step_item", autoResultMap = true) // 由于 SQL Server 的 system_user 是关键字,所以使用 system_users
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderProcessStepItemNDO {
|
||||
|
||||
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
// 工序项目名
|
||||
private String name;
|
||||
|
||||
// 生产单工序 id
|
||||
private Long orderProcessId;
|
||||
|
||||
// 工序状态
|
||||
private Boolean status;
|
||||
|
||||
// 工序步骤 id
|
||||
private Long processStepId;
|
||||
|
||||
// 工序组名
|
||||
private String groupName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.cf.imes.module.manage.dal.dataobject.process;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
@TableName(value = "order_process_step") // 由于 SQL Server 的 system_user 是关键字,所以使用 system_users
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderProcessStepNDO extends BaseDO {
|
||||
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
// 生产单号
|
||||
private Long orderId;
|
||||
|
||||
//组织ID
|
||||
private Long organId;
|
||||
|
||||
// 完成时间
|
||||
private LocalDateTime finishTime;
|
||||
|
||||
//工序状态
|
||||
private Boolean status;
|
||||
|
||||
// 加工类型
|
||||
private Integer type;
|
||||
|
||||
// 计件工资
|
||||
private Float pieceRate;
|
||||
|
||||
// 计件工资类型
|
||||
private Integer pieceType;
|
||||
|
||||
// 排序优先级
|
||||
private Integer sort;
|
||||
|
||||
// 工序名称
|
||||
private String name;
|
||||
|
||||
// 工序ID
|
||||
private Long processinfoId;
|
||||
|
||||
// 生产单工序ID
|
||||
private Long orderProcessId;
|
||||
|
||||
// 计划日期
|
||||
private Date scheduleDate;
|
||||
|
||||
// 工序处理时长
|
||||
private Float duration;
|
||||
|
||||
// 工序负责人
|
||||
private String manager;
|
||||
|
||||
// 工序处理日期
|
||||
private Date processDate;
|
||||
|
||||
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.cf.imes.module.manage.dal.dataobject.query;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
@TableName("order_item")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderItemDO {
|
||||
|
||||
// 明细编号
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
// 生产单号
|
||||
private Long orderId;
|
||||
|
||||
// 房间 ID
|
||||
private Long roomId;
|
||||
|
||||
// 柜体 ID
|
||||
private Long bodyId;
|
||||
|
||||
// 板件 id
|
||||
private Long plateId;
|
||||
|
||||
// 配件 id
|
||||
private Long partsId;
|
||||
|
||||
// 加工组 id
|
||||
private Long groupId;
|
||||
|
||||
// 排单 ID
|
||||
private Long planId;
|
||||
|
||||
// 包裹 ID
|
||||
private Long packageId;
|
||||
|
||||
// 部件数量
|
||||
private Float num;
|
||||
|
||||
// 组织 ID
|
||||
private Long organId;
|
||||
|
||||
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.cf.imes.module.manage.dal.dataobject.query;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
@TableName("order_package_n")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderPackageDO extends BaseDO {
|
||||
|
||||
|
||||
// 包裹ID
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
// 生产单号
|
||||
private Long orderNo;
|
||||
|
||||
// 包裹编号
|
||||
private String packageNo;
|
||||
|
||||
// 包裹类型,-1未定义,0板材,1配件,2其他配件
|
||||
private Long type;
|
||||
|
||||
// 包裹名
|
||||
private String name;
|
||||
|
||||
// 包裹状态,0未封包,1已封包,2已入库,3已出库
|
||||
private Integer status;
|
||||
|
||||
// 组织ID
|
||||
private Long organId;
|
||||
|
||||
// 备注
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package com.cf.imes.module.manage.dal.dataobject.query;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
@TableName("order_parts")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderPartsNDO extends BaseDO {
|
||||
|
||||
@TableId
|
||||
// 配件 ID
|
||||
private Long id;
|
||||
|
||||
// 生产单号
|
||||
private Long orderId;
|
||||
|
||||
// 组织 ID
|
||||
private Long organId;
|
||||
|
||||
// 商品ID
|
||||
private Long goodsId;
|
||||
|
||||
// 配件名称
|
||||
private String name;
|
||||
|
||||
// 材质
|
||||
private String material;
|
||||
|
||||
// 配件类型
|
||||
private String type;
|
||||
|
||||
// 型号
|
||||
private String model;
|
||||
|
||||
// 规格
|
||||
private String spec;
|
||||
|
||||
// 品牌
|
||||
private String brand;
|
||||
|
||||
// 厂家
|
||||
private String factory;
|
||||
|
||||
// 单位
|
||||
private String unit;
|
||||
|
||||
// 价格
|
||||
private Float price;
|
||||
|
||||
// 是否复合部件:0 否 1 是
|
||||
private Boolean isComposite;
|
||||
|
||||
// 备注
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.cf.imes.module.manage.dal.mysql.pack;
|
||||
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.manage.dal.dataobject.pack.OrderBodyDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface OrderBodyMapper extends BaseMapperX<OrderBodyDO> {
|
||||
|
||||
default List<OrderBodyDO> selectGroup(Long orderId) {
|
||||
return selectList(new LambdaQueryWrapperX<OrderBodyDO>()
|
||||
.eqIfPresent(OrderBodyDO::getOrderId, orderId)
|
||||
.orderByDesc(OrderBodyDO::getId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.cf.imes.module.manage.dal.mysql.pack;
|
||||
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.OtherPackReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PackRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PlateDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.OrderPackageVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderProcessStepNDO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.query.OrderPackageDO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.query.OrderPartsNDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface OrderPackageMapper extends BaseMapperX<OrderPackageDO> {
|
||||
|
||||
|
||||
|
||||
default List<OrderPackageDO> selectByOrderNo(Long orderNo) {
|
||||
return selectList(new LambdaQueryWrapperX<OrderPackageDO>()
|
||||
.eqIfPresent(OrderPackageDO::getOrderNo, orderNo)
|
||||
.orderByDesc(OrderPackageDO::getId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
default OrderPackageDO selectByPackNo(Long packId) {
|
||||
return selectOne(new LambdaQueryWrapperX<OrderPackageDO>()
|
||||
.eqIfPresent(OrderPackageDO::getId, packId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
List<PackRespVO> selectPackPage(@Param("collect") List<Long> collect);
|
||||
|
||||
|
||||
List<PlateDetailsRespVO> selectMissingBoard(Long orderNo);
|
||||
|
||||
|
||||
|
||||
|
||||
default OrderPackageDO selectByPackId(Long packId) {
|
||||
return selectOne(new LambdaQueryWrapperX<OrderPackageDO>()
|
||||
.eqIfPresent(OrderPackageDO::getId, packId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void updateParts(@Param("packageId") Long packageId, @Param("packageNo") Long packageNo);
|
||||
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.cf.imes.module.manage.dal.mysql.patching;
|
||||
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.module.manage.dal.dataobject.patching.MachineDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface MachineMapper extends BaseMapperX<MachineDO> {
|
||||
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.cf.imes.module.manage.dal.mysql.patching;
|
||||
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.module.manage.dal.dataobject.patching.PatchDetailDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface PatchDetailMapper extends BaseMapperX<PatchDetailDO> {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.cf.imes.module.manage.dal.mysql.plate;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.manage.controller.admin.grouping.vo.OrderPageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PlateDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.patching.vo.PatchingDetailReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.patching.vo.PatchingDetailRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.patching.vo.PatchingPlatePageReqVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.plate.OrderPlateDO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface OrderPlateMapper extends BaseMapperX<OrderPlateDO> {
|
||||
|
||||
|
||||
|
||||
List<PatchingDetailRespVO> selectPlateDetail(PatchingPlatePageReqVO pageReqVO);
|
||||
|
||||
|
||||
|
||||
PatchingDetailRespVO selectPlate(@Param("plateId") Long plateId);
|
||||
|
||||
|
||||
|
||||
default List<OrderPlateDO> selectPlateList(PatchingDetailReqVO reqVO) {
|
||||
return selectList( new LambdaQueryWrapperX<OrderPlateDO>()
|
||||
.and(wrapper -> {
|
||||
for (Long plateId : reqVO.getPlateIdList()) {
|
||||
wrapper.or().eq(OrderPlateDO::getId, plateId);
|
||||
}
|
||||
})
|
||||
.orderByDesc(OrderPlateDO::getId));
|
||||
}
|
||||
|
||||
|
||||
List<PatchingDetailRespVO> selectOtherPlateList(@Param("plateIdList") List<Long> plateIdList);
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package com.cf.imes.module.manage.dal.mysql.process;
|
||||
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderProcessNDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产单工序表 order_process_{N} Mapper
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderProcessMapper extends BaseMapperX<OrderProcessNDO> {
|
||||
|
||||
|
||||
default OrderProcessNDO queryProcess( Long processId , Long orderNo) {
|
||||
return selectOne(new LambdaQueryWrapperX<OrderProcessNDO>()
|
||||
.eqIfPresent(OrderProcessNDO::getId, processId)
|
||||
.eqIfPresent(OrderProcessNDO::getOrderId,orderNo));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
default OrderProcessNDO selectByProcessId(Long id) {
|
||||
return selectOne(new LambdaQueryWrapperX<OrderProcessNDO>()
|
||||
.eqIfPresent(OrderProcessNDO::getId, id));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
default OrderProcessNDO selectStatusById( Long id ) {
|
||||
return selectOne(new LambdaQueryWrapperX<OrderProcessNDO>()
|
||||
.eqIfPresent(OrderProcessNDO::getId, id));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Update("UPDATE order_process SET status = #{status} WHERE id = #{id}")
|
||||
void updateStatusById(@Param("id") Long id, @Param("status") Boolean status);
|
||||
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.cf.imes.module.manage.dal.mysql.process;
|
||||
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.*;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderProcessStepItemNDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产单工序明细表 order_process_step_item_{N} Mapper
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProcessStepItemMapper extends BaseMapperX<OrderProcessStepItemNDO> {
|
||||
|
||||
|
||||
List<OrderModuleVO> selectPlateName(Long processStepId);
|
||||
|
||||
|
||||
List<OrderProcessStepItemVO> selectItemProcess(OrderProcessReqVO reqVO);
|
||||
|
||||
|
||||
|
||||
void updateStatus(OrderProStepReqVO reqVO);
|
||||
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.cf.imes.module.manage.dal.mysql.process;
|
||||
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.OrderProStepReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.OrderProcessStepItemVO;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.ProcessPageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.ProcessRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.salary.PriceRatePageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.salary.PriceRateReqVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderProcessStepNDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产单工序步骤表 order_process_step_{N} Mapper
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProcessStepMapper extends BaseMapperX<OrderProcessStepNDO> {
|
||||
|
||||
|
||||
default OrderProcessStepNDO selectStatusById(Long id) {
|
||||
return selectOne(new LambdaQueryWrapperX<OrderProcessStepNDO>()
|
||||
.eqIfPresent(OrderProcessStepNDO::getId, id));
|
||||
|
||||
}
|
||||
|
||||
|
||||
List<ProcessRespVO> selectOrder(ProcessPageReqVO pageReqVO);
|
||||
|
||||
|
||||
|
||||
|
||||
void updateStatusById(@Param("id") Long id, @Param("status") Boolean status);
|
||||
|
||||
default List<OrderProcessStepNDO> selectProducitonList(Long orderNo) {
|
||||
return selectList(new LambdaQueryWrapperX<OrderProcessStepNDO>()
|
||||
.eqIfPresent(OrderProcessStepNDO::getOrderId, orderNo));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
default List<OrderProcessStepNDO> selectStepList(OrderProStepReqVO reqVO, Boolean status) {
|
||||
return selectList(new LambdaQueryWrapperX<OrderProcessStepNDO>()
|
||||
.eqIfPresent(OrderProcessStepNDO::getId,reqVO.getProcessStepId())
|
||||
.eqIfPresent(OrderProcessStepNDO::getStatus, status)
|
||||
.eqIfPresent(OrderProcessStepNDO::getOrderId, reqVO.getOrderId()));
|
||||
}
|
||||
|
||||
List<PriceRateReqVO> selectSalaryList(PriceRatePageReqVO pageReqVO);
|
||||
|
||||
|
||||
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.cf.imes.module.manage.dal.mysql.process;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.manage.controller.admin.grouping.vo.OrderPageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PlateDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.patching.vo.PatchingPlatePageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.patching.vo.PatchingPlateRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.ProcessPageReqVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产单表 order_{N} Mapper
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductionProcessMapper extends BaseMapperX<OrderDO> {
|
||||
|
||||
|
||||
default PageResult<OrderDO> selectPageList(OrderPageReqVO pageReqVO) {
|
||||
return selectPage(pageReqVO, new LambdaQueryWrapperX<OrderDO>()
|
||||
.eqIfPresent(OrderDO::getId,pageReqVO.getOrderNo())
|
||||
.eqIfPresent(OrderDO::getCustomOrderNo,pageReqVO.getCustomOrderNo())
|
||||
.likeIfPresent(OrderDO::getCustomer,pageReqVO.getCustomer())
|
||||
.likeIfPresent(OrderDO::getAddress,pageReqVO.getAddress())
|
||||
.likeIfPresent(OrderDO::getDealer,pageReqVO.getDealer())
|
||||
.and(wrapper -> {
|
||||
for (Long status : pageReqVO.getStatusList()) {
|
||||
wrapper.or().eq(OrderDO::getStatus, status);
|
||||
}
|
||||
})
|
||||
.orderByDesc(OrderDO::getId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
List<PatchingPlateRespVO> selectPatchingPlate(PatchingPlatePageReqVO pageReqVO);
|
||||
|
||||
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.cf.imes.module.manage.dal.mysql.query;
|
||||
|
||||
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.module.manage.controller.admin.grouping.vo.OrderPlateListRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.DeleteOtherPartsReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PackReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PlateDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.PackageDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderPlateRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.PlatePageVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.query.OrderItemDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface OrderItemMapper extends BaseMapperX<OrderItemDO> {
|
||||
|
||||
|
||||
List<PackageDetailsRespVO> selectByPackageId(Long packageId);
|
||||
|
||||
|
||||
List<OrderModuleVO> selectCombinationName(Long orderNo);
|
||||
|
||||
|
||||
List<OrderPlateRespVO> selectPlateList(PlatePageVO pageReqVO);
|
||||
|
||||
|
||||
List<PlateDetailsRespVO> selectOrderPlateList(Long orderNo);
|
||||
|
||||
|
||||
List<OrderPlateListRespVO> selectGroupingPlateList(Long orderNo);
|
||||
|
||||
|
||||
|
||||
void insertPackPlate(Long plateId);
|
||||
|
||||
|
||||
List<OrderPlateListRespVO> selectJoinedGroupPlateList(@Param("orderNo") Long orderNo , @Param("packageIdList") List<Long> packageIdList);
|
||||
|
||||
|
||||
|
||||
@Update("update order_item set package_id =0 where plate_id =#{plateId}")
|
||||
void removePackPlate(Long plateId);
|
||||
|
||||
|
||||
List<OrderPlateListRespVO> selectPrintPlateList(@Param("orderNo")Long orderNo,@Param("packageNo") Long packageNo);
|
||||
|
||||
|
||||
|
||||
void deleteOrderPack(@Param("reqVO") PackReqVO reqVO);
|
||||
|
||||
|
||||
void updateParts(@Param("reqVO") DeleteOtherPartsReqVO reqVO);
|
||||
|
||||
|
||||
void deleteOtherParts(@Param("itemId") Long itemId);
|
||||
|
||||
|
||||
void deleteParts(@Param("reqVO") PackReqVO reqVO);
|
||||
|
||||
|
||||
void insertPackId(@Param("plateIdList") List<Long> plateIdList, @Param("packId") Long packId);
|
||||
|
||||
|
||||
void deletePackId(@Param("deletePlateIdList") List<Long> deletePlateIdList,@Param("packId") Long packId);
|
||||
|
||||
|
||||
|
||||
void insertPartsId(@Param("packId") Long packId, @Param("addPartsIdList") List<Long> addPartsIdList);
|
||||
|
||||
|
||||
String selectBodyName(@Param("plateId") Long plateId);
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.cf.imes.module.manage.dal.mysql.query;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.OrderPartsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.plate.vo.plate.PlatePageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.PackageDetailsRespVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.plate.PlateDO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.query.OrderPartsNDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface OrderPartsMapper extends BaseMapperX<OrderPartsNDO> {
|
||||
|
||||
|
||||
List<PackageDetailsRespVO> selectParts(String packageNo);
|
||||
|
||||
|
||||
List<OrderPartsRespVO> selectPartsList(Long orderId);
|
||||
|
||||
|
||||
|
||||
List<OrderPartsRespVO> selectOrderParts(@Param("orderNo")Long orderNo,@Param("packageNo") Long packageNo);
|
||||
|
||||
|
||||
void deleteOrderParts(@Param("packageId") Long packageId);
|
||||
|
||||
|
||||
default OrderPartsNDO selectOneParts(String otherPartsName) {
|
||||
return selectOne(new LambdaQueryWrapperX<OrderPartsNDO>()
|
||||
.eqIfPresent(OrderPartsNDO::getName,otherPartsName));
|
||||
|
||||
}
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package com.cf.imes.module.manage.dal.mysql.query;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PackPageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PackRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PrintOrderPackRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderPlatePageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.PrintOrderRespVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ProductionStatusMapper extends BaseMapperX<OrderDO> {
|
||||
|
||||
|
||||
default PageResult<OrderDO> selectProductionPage(OrderPlatePageReqVO pageReqVO) {
|
||||
return selectPage(pageReqVO, new LambdaQueryWrapperX<OrderDO>()
|
||||
.eqIfPresent(OrderDO::getId, pageReqVO.getOrderNo())
|
||||
.eqIfPresent(OrderDO::getCustomOrderNo, pageReqVO.getCustomOrderNo())
|
||||
.likeIfPresent(OrderDO::getCustomer, pageReqVO.getCustomer())
|
||||
.likeIfPresent(OrderDO::getAddress, pageReqVO.getAddress())
|
||||
.and(wrapper -> {
|
||||
for (Long status : pageReqVO.getStatusList()) {
|
||||
wrapper.or().eq(OrderDO::getStatus, status);
|
||||
}
|
||||
})
|
||||
.orderByDesc(OrderDO::getCreateTime));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* default PageResult<OrderDO> selectPackage(OrderPlatePageReqVO pageReqVO) {
|
||||
return selectPage(pageReqVO, new LambdaQueryWrapperX<OrderDO>()
|
||||
.orderByDesc(OrderDO::getId));
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
PrintOrderRespVO selectPrintOrder(Long orderNo);
|
||||
|
||||
|
||||
default List<OrderDO> selectPackPage(PackPageReqVO pageReqVO) {
|
||||
return selectList(new LambdaQueryWrapperX<OrderDO>()
|
||||
.eqIfPresent(OrderDO::getId, pageReqVO.getOrderNo())
|
||||
.eqIfPresent(OrderDO::getCustomOrderNo, pageReqVO.getCustomOrderNo())
|
||||
.likeIfPresent(OrderDO::getCustomer, pageReqVO.getCustomer())
|
||||
.likeIfPresent(OrderDO::getAddress, pageReqVO.getAddress())
|
||||
.eqIfPresent(OrderDO::getStatus, pageReqVO.getStatus())
|
||||
.orderByDesc(OrderDO::getCreateTime));
|
||||
}
|
||||
|
||||
List<PackRespVO> selectOrderPlate(@Param("collect") List<Long> collect);
|
||||
|
||||
|
||||
|
||||
|
||||
PrintOrderPackRespVO selectOrderPack(@Param("orderNo")Long orderNo,@Param("packageNo") Long packageNo);
|
||||
|
||||
|
||||
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.cf.imes.module.manage.service.grouping;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.module.manage.controller.admin.grouping.vo.*;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleReqVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface GroupingService {
|
||||
|
||||
|
||||
// 查询订单
|
||||
PageResult<OrderDO> getGroupingList( OrderPageReqVO pageReqVO);
|
||||
|
||||
|
||||
// 新增包裹
|
||||
Long insertGrouping(OrderPackageReqVO packageReqVO);
|
||||
|
||||
|
||||
// 查看订单的板材信息(未加入包裹的板材信息)
|
||||
PageResult<OrderPlateListRespVO> notJoinedGroupingPlateList(OrderModuleReqVO reqVO);
|
||||
|
||||
|
||||
// 包裹表新增板件
|
||||
void insertPackPlate(Long plateId);
|
||||
|
||||
|
||||
// 查看订单的板材信息(已将加入包裹的板材信息)
|
||||
PageResult<OrderPlateListRespVO> joinedGroupPlateList(JoinedPlateReqVO reqVO);
|
||||
|
||||
|
||||
// 移除包裹板材信息
|
||||
void removePackPlate(Long plateId);
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
package com.cf.imes.module.manage.service.grouping;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||
import com.cf.imes.framework.common.util.object.PageUtils;
|
||||
import com.cf.imes.module.manage.controller.admin.grouping.vo.*;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PlateDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleReqVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderDO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.query.OrderPackageDO;
|
||||
import com.cf.imes.module.manage.dal.mysql.pack.OrderPackageMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.process.ProductionProcessMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.query.OrderItemMapper;
|
||||
import com.cf.imes.module.manage.util.packageNo.PackageNoUtil;
|
||||
import com.cf.imes.module.manage.util.page.PageHelperUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Validated
|
||||
public class GroupingServiceImpl implements GroupingService{
|
||||
|
||||
|
||||
@Resource
|
||||
private ProductionProcessMapper productionProcessMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private OrderPackageMapper orderPackageMapper;
|
||||
|
||||
@Resource
|
||||
private OrderItemMapper orderItemMapper;
|
||||
|
||||
|
||||
|
||||
// 查询订单分页
|
||||
@Override
|
||||
public PageResult<OrderDO> getGroupingList(OrderPageReqVO pageReqVO) {
|
||||
|
||||
return productionProcessMapper.selectPageList(pageReqVO);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 新增包裹
|
||||
@Override
|
||||
public Long insertGrouping(OrderPackageReqVO packageReqVO) {
|
||||
|
||||
//
|
||||
OrderPackageDO packageDO = BeanUtils.toBean(packageReqVO, OrderPackageDO.class);
|
||||
packageDO.setPackageNo(PackageNoUtil.randomPageNo());
|
||||
|
||||
orderPackageMapper.insert(packageDO);
|
||||
|
||||
return packageDO.getId();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 查看订单的板材信息
|
||||
@Override
|
||||
public PageResult<OrderPlateListRespVO> notJoinedGroupingPlateList(OrderModuleReqVO reqVO) {
|
||||
|
||||
//
|
||||
PageHelper.startPage(reqVO.getPageNo(),reqVO.getPageSize());
|
||||
List<OrderPlateListRespVO> orderPlateListRespVOS = orderItemMapper.selectGroupingPlateList(reqVO.getOrderNo());
|
||||
PageInfo<OrderPlateListRespVO> pageInfo = new PageInfo<>(orderPlateListRespVOS);
|
||||
PageResult<OrderPlateListRespVO> priceRateReqVOPageResult = PageHelperUtil.convertToPageResult(pageInfo);
|
||||
|
||||
return priceRateReqVOPageResult;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 包裹表新增板件
|
||||
@Override
|
||||
public void insertPackPlate(Long plateId) {
|
||||
|
||||
orderItemMapper.insertPackPlate(plateId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 查看订单的板材信息(已将加入包裹的板材信息)
|
||||
@Override
|
||||
public PageResult<OrderPlateListRespVO> joinedGroupPlateList(JoinedPlateReqVO reqVO) {
|
||||
|
||||
|
||||
PageHelper.startPage(reqVO.getPageNo(),reqVO.getPageSize());
|
||||
List<OrderPlateListRespVO> orderPlateListRespVOS = orderItemMapper.selectJoinedGroupPlateList(reqVO.getOrderNo(), reqVO.getPackageIdList());
|
||||
|
||||
PageInfo<OrderPlateListRespVO> pageInfo = new PageInfo<>(orderPlateListRespVOS);
|
||||
PageResult<OrderPlateListRespVO> priceRateReqVOPageResult = PageHelperUtil.convertToPageResult(pageInfo);
|
||||
|
||||
return priceRateReqVOPageResult;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 移除包裹板材信息
|
||||
@Override
|
||||
public void removePackPlate(Long plateId) {
|
||||
|
||||
|
||||
orderItemMapper.removePackPlate(plateId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package com.cf.imes.module.manage.service.pack;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.module.manage.controller.admin.grouping.vo.OrderPackageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.*;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleReqVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.query.OrderPackageDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PackService {
|
||||
|
||||
|
||||
// 打包分页查询
|
||||
PageResult<PackRespVO> getPackPage(PackPageReqVO pageReqVO);
|
||||
|
||||
|
||||
// 查看生产订单对应的包裹信息
|
||||
List<OrderPackageDO> getOrderPack(Long orderId);
|
||||
|
||||
|
||||
|
||||
// 查看生产订单对应的板材信息
|
||||
List<PlateDetailsRespVO> getOrderPlateList(Long orderId);
|
||||
|
||||
|
||||
|
||||
// 查看板材列表分页
|
||||
PageResult<PlateDetailsRespVO> queryPlateDetails(OrderModuleReqVO pageReqVO);
|
||||
|
||||
|
||||
|
||||
// 查看配件列表分页
|
||||
PageResult<OrderPartsRespVO> getPartsList(OrderPartsReqVO reqVO);
|
||||
|
||||
|
||||
// 拆包
|
||||
void unpacking(Long packageID);
|
||||
|
||||
|
||||
|
||||
|
||||
// 显示分组房间名称
|
||||
List<OrderPlateGroupRespVO> GetOrderPlateGroup(Long orderId);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 查看配件包裹详情
|
||||
List<OrderPartsRespVO> queryPackageDetails(PrintOrderPackReqVO reqVO);
|
||||
|
||||
|
||||
|
||||
// 包裹封包
|
||||
OrderPackageDO updatePackStatus(OrderPackReqVO packageVO);
|
||||
|
||||
|
||||
|
||||
// 包裹订单打印
|
||||
PrintOrderPackRespVO printOrderPack(PrintOrderPackReqVO reqVO);
|
||||
|
||||
|
||||
// 删除包裹及其关联的包裹信息(删除全部)
|
||||
void deleteOrderPack(PackReqVO reqVO);
|
||||
|
||||
|
||||
|
||||
// 新增外部配件
|
||||
OrderPackageDO addNewOtherParts(OtherPackReqVO reqVO);
|
||||
|
||||
|
||||
Long testpack(OrderPackageReqVO reqVO);
|
||||
|
||||
|
||||
// 删除配件包裹中的配件(删除某一个)
|
||||
void deleteOtherParts(DeleteOtherPartsReqVO reqVO);
|
||||
|
||||
|
||||
|
||||
// 新增配件-即新增一个包裹
|
||||
OrderPackageDO addNewPartsPack(OrderPackReqVO reqVO);
|
||||
}
|
||||
+343
@@ -0,0 +1,343 @@
|
||||
package com.cf.imes.module.manage.service.pack;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.enums.OrderPackageStatusEnum;
|
||||
import com.cf.imes.framework.common.enums.OrderPackageTypeEnum;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||
import com.cf.imes.module.manage.controller.admin.grouping.vo.OrderPackageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.*;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleReqVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.pack.OrderBodyDO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderDO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.query.OrderItemDO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.query.OrderPackageDO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.query.OrderPartsNDO;
|
||||
import com.cf.imes.module.manage.dal.mysql.pack.OrderBodyMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.pack.OrderPackageMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.query.OrderItemMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.query.OrderPartsMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.query.ProductionStatusMapper;
|
||||
import com.cf.imes.module.manage.util.packageNo.PackageNoUtil;
|
||||
import com.cf.imes.module.manage.util.page.PageHelperUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.cf.imes.module.system.enums.ErrorCodeConstants.THE_ACCESSORY_NAME_CANNOT_BE_DUPLICATED;
|
||||
|
||||
@Service
|
||||
@Validated
|
||||
@Transactional
|
||||
public class PackServiceImpl implements PackService {
|
||||
|
||||
@Resource
|
||||
private OrderPackageMapper orderPackageMapper;
|
||||
|
||||
@Resource
|
||||
private ProductionStatusMapper productionStatusMapper;
|
||||
|
||||
@Resource
|
||||
private OrderItemMapper orderItemMapper;
|
||||
|
||||
@Resource
|
||||
private OrderPartsMapper orderPartsMapper;
|
||||
|
||||
@Resource
|
||||
private OrderBodyMapper orderBodyMapper;
|
||||
|
||||
|
||||
// 打包分页查询
|
||||
@Override
|
||||
public PageResult<PackRespVO> getPackPage(PackPageReqVO pageReqVO) {
|
||||
|
||||
// 根据生产状态查询生产单号
|
||||
List<Long> collect = productionStatusMapper.selectPackPage(pageReqVO).stream().map(OrderDO::getId).collect(Collectors.toList());
|
||||
|
||||
PageHelper.startPage(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||
|
||||
// 查询包裹的已打包数和已打片数
|
||||
List<PackRespVO> packRespVOS = orderPackageMapper.selectPackPage(collect);
|
||||
|
||||
// 查询打包首页分页数据信息和总片数
|
||||
List<PackRespVO> packRespVOS1 = productionStatusMapper.selectOrderPlate(collect);
|
||||
|
||||
PageInfo<PackRespVO> pageInfo = new PageInfo<>(packRespVOS);
|
||||
pageInfo.setList(packRespVOS1);
|
||||
|
||||
// 转换成 PageResult 分页类型
|
||||
PageResult<PackRespVO> priceRateReqVOPageResult = PageHelperUtil.convertToPageResult(pageInfo);
|
||||
|
||||
return priceRateReqVOPageResult;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 查看生产订单对应的包裹信息
|
||||
@Override
|
||||
public List<OrderPackageDO> getOrderPack(Long orderId) {
|
||||
return orderPackageMapper.selectByOrderNo(orderId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 查看生产订单对应的板材信息
|
||||
@Override
|
||||
public List<PlateDetailsRespVO> getOrderPlateList(Long orderId) {
|
||||
|
||||
return orderItemMapper.selectOrderPlateList(orderId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 查看板材列表分页
|
||||
@Override
|
||||
public PageResult<PlateDetailsRespVO> queryPlateDetails(OrderModuleReqVO pageReqVO) {
|
||||
|
||||
|
||||
PageHelper.startPage(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||
List<PlateDetailsRespVO> plateDetailsRespVOS = orderItemMapper.selectOrderPlateList(pageReqVO.getOrderNo());
|
||||
PageInfo<PlateDetailsRespVO> pageInfo = new PageInfo<>(plateDetailsRespVOS);
|
||||
PageResult<PlateDetailsRespVO> priceRateReqVOPageResult = PageHelperUtil.convertToPageResult(pageInfo);
|
||||
|
||||
return priceRateReqVOPageResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 查看配件列表分页
|
||||
@Override
|
||||
public PageResult<OrderPartsRespVO> getPartsList(OrderPartsReqVO reqVO) {
|
||||
|
||||
|
||||
PageHelper.startPage(reqVO.getPageNo(), reqVO.getPageSize());
|
||||
List<OrderPartsRespVO> orderPartsRespVOS = orderPartsMapper.selectPartsList(reqVO.getOrderNo());
|
||||
PageInfo<OrderPartsRespVO> pageInfo = new PageInfo<>(orderPartsRespVOS);
|
||||
return PageHelperUtil.convertToPageResult(pageInfo);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 拆包
|
||||
@Override
|
||||
public void unpacking(Long packageID) {
|
||||
|
||||
OrderPackageDO packageDO = orderPackageMapper.selectById(packageID);
|
||||
packageDO.setStatus((OrderPackageStatusEnum.UNPACKED.getStatus()));
|
||||
orderPackageMapper.updateById(packageDO);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 显示分组房间名称
|
||||
@Override
|
||||
public List<OrderPlateGroupRespVO> GetOrderPlateGroup(Long orderId) {
|
||||
|
||||
/*List<String> collect = orderBodyMapper.selectGroup(orderId).stream().map(OrderBodyDO::getRoomName).collect(Collectors.toList());*/
|
||||
|
||||
List<OrderBodyDO> orderBodyDOS = orderBodyMapper.selectGroup(orderId);
|
||||
|
||||
|
||||
return BeanUtils.toBean(orderBodyDOS, OrderPlateGroupRespVO.class);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 查看配件包裹详情
|
||||
@Override
|
||||
public List<OrderPartsRespVO> queryPackageDetails(PrintOrderPackReqVO reqVO) {
|
||||
|
||||
return orderPartsMapper.selectOrderParts(reqVO.getOrderNo(), reqVO.getPackageNo());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 包裹封包
|
||||
@Override
|
||||
public OrderPackageDO updatePackStatus(OrderPackReqVO packageVO) {
|
||||
|
||||
// 当传入的包裹ID为 -1 ,走新增的逻辑
|
||||
if (packageVO.getPackId() == -1) {
|
||||
OrderPackageDO orderPackageDO = new OrderPackageDO();
|
||||
orderPackageDO.setOrderNo(packageVO.getOrderId());
|
||||
orderPackageDO.setType(packageVO.getPackageType());
|
||||
orderPackageDO.setPackageNo(PackageNoUtil.randomPageNo());
|
||||
orderPackageDO.setStatus((OrderPackageStatusEnum.PACKAGED.getStatus()));
|
||||
orderPackageMapper.insert(orderPackageDO);
|
||||
// 生产单明细表新增包裹 ID
|
||||
orderItemMapper.insertPackId(packageVO.getAddPlateIdList(), orderPackageDO.getId());
|
||||
|
||||
return orderPackageDO;
|
||||
|
||||
}
|
||||
|
||||
// 不为 -1 ,有包裹存在,走更新逻辑
|
||||
|
||||
// 生产明细表新增包裹ID
|
||||
orderItemMapper.insertPackId(packageVO.getAddPlateIdList(), packageVO.getPackId());
|
||||
// 移除包裹ID
|
||||
orderItemMapper.deletePackId(packageVO.getDeletePlateIdList(), packageVO.getPackId());
|
||||
|
||||
return orderPackageMapper.selectByPackId(packageVO.getPackId()).setStatus(OrderPackageStatusEnum.PACKAGED.getStatus());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 包裹订单打印
|
||||
@Override
|
||||
public PrintOrderPackRespVO printOrderPack(PrintOrderPackReqVO reqVO) {
|
||||
|
||||
PrintOrderPackRespVO printOrderPackRespVO = productionStatusMapper.selectOrderPack(reqVO.getOrderNo(), reqVO.getPackageNo());
|
||||
printOrderPackRespVO.setPlateList(orderItemMapper.selectPrintPlateList(reqVO.getOrderNo(), reqVO.getPackageNo()));
|
||||
return printOrderPackRespVO;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 删除包裹及其关联的包裹信息(删除全部)
|
||||
@Override
|
||||
public void deleteOrderPack(PackReqVO reqVO) {
|
||||
|
||||
// 判断包裹的类型是否为其他类型,如果是,则删除其包裹信息
|
||||
if (reqVO.getIsOther() == true) {
|
||||
|
||||
orderPartsMapper.deleteOrderParts(reqVO.getPackageId());
|
||||
orderPackageMapper.updateParts(reqVO.getPackageId(), reqVO.getPackageNo());
|
||||
orderItemMapper.deleteParts(reqVO);
|
||||
return;
|
||||
}
|
||||
|
||||
orderItemMapper.deleteOrderPack(reqVO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 新增外部配件包裹表
|
||||
@Override
|
||||
public OrderPackageDO addNewOtherParts(OtherPackReqVO reqVO) {
|
||||
|
||||
|
||||
// 判断配件名称是否重复
|
||||
OrderPartsNDO orderPartsNDO = orderPartsMapper.selectOneParts(reqVO.getName());
|
||||
if (orderPartsNDO != null) {
|
||||
throw exception(THE_ACCESSORY_NAME_CANNOT_BE_DUPLICATED);
|
||||
}
|
||||
|
||||
// 配件表新增数据
|
||||
OrderPartsNDO orderParts = BeanUtils.toBean(reqVO, OrderPartsNDO.class);
|
||||
orderPartsMapper.insert(orderParts);
|
||||
|
||||
|
||||
// 在包裹表中添加包裹编号和生产单号,修改包裹类型未其他配件类型
|
||||
OrderPackageDO orderPackageDO = new OrderPackageDO();
|
||||
orderPackageDO.setPackageNo(PackageNoUtil.randomPageNo());
|
||||
orderPackageDO.setOrderNo(reqVO.getOrderId());
|
||||
orderPackageDO.setType(OrderPackageTypeEnum.OTHER_ACCESSORIES.getType().longValue());
|
||||
|
||||
|
||||
// 新增包裹
|
||||
orderPackageMapper.insert(orderPackageDO);
|
||||
|
||||
|
||||
// 在生产单明细表中添加数据(生产单号,配件ID,包裹ID,部件数量(目前一直为1))
|
||||
OrderItemDO orderItemDO = new OrderItemDO();
|
||||
orderItemDO.setOrderId(reqVO.getOrderId());
|
||||
orderItemDO.setPartsId(orderParts.getId());
|
||||
orderItemDO.setPackageId(orderPackageDO.getId());
|
||||
orderItemDO.setNum(Float.valueOf(1));
|
||||
|
||||
|
||||
// 在生产单明细表中新增数据
|
||||
orderItemMapper.insert(orderItemDO);
|
||||
|
||||
// 查看新增的包裹信息
|
||||
/* return orderPackageMapper.selectByPackId(orderPackageDO.getId());*/
|
||||
return orderPackageDO;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long testpack(OrderPackageReqVO reqVO) {
|
||||
|
||||
OrderPackageDO packageDO = BeanUtils.toBean(reqVO, OrderPackageDO.class);
|
||||
orderPackageMapper.insert(packageDO);
|
||||
return packageDO.getId();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 删除配件包裹中的配件(删除某一个)
|
||||
@Override
|
||||
public void deleteOtherParts(DeleteOtherPartsReqVO reqVO) {
|
||||
|
||||
// 判断,如果为true 为其他配件
|
||||
if (reqVO.getIsOther() == true) {
|
||||
|
||||
orderItemMapper.updateParts(reqVO);
|
||||
orderItemMapper.deleteOtherParts(reqVO.getItemId());
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
orderItemMapper.updateParts(reqVO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 新增配件-即新增一个包裹
|
||||
@Override
|
||||
public OrderPackageDO addNewPartsPack(OrderPackReqVO reqVO) {
|
||||
|
||||
OrderPackageDO orderPackageDO = new OrderPackageDO();
|
||||
orderPackageDO.setOrderNo(reqVO.getOrderId());
|
||||
orderPackageDO.setType(reqVO.getPackageType());
|
||||
orderPackageDO.setStatus(OrderPackageStatusEnum.PACKAGED.getStatus());
|
||||
orderPackageDO.setPackageNo(PackageNoUtil.randomPageNo());
|
||||
orderPackageMapper.insert(orderPackageDO);
|
||||
|
||||
orderItemMapper.insertPartsId(orderPackageDO.getId(),reqVO.getAddPartsIdList());
|
||||
|
||||
return orderPackageDO;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.cf.imes.module.manage.service.patching;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.module.manage.controller.admin.patching.vo.*;
|
||||
import com.cf.imes.module.manage.dal.dataobject.patching.MachineDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PatchingPlateService {
|
||||
|
||||
|
||||
// 批量加入补板查询
|
||||
PageResult<PatchingPlateRespVO> patchingSearchPlate(PatchingPlatePageReqVO pageReqVO);
|
||||
|
||||
|
||||
// 查询详细的板件
|
||||
PageResult<PatchingDetailRespVO> searchPlateDetail(PatchingPlatePageReqVO pageReqVO);
|
||||
|
||||
|
||||
// 加入的板件信息
|
||||
PatchingDetailRespVO searchPatchingList(Long plateId);
|
||||
|
||||
|
||||
// 优化排版
|
||||
List<PatchingDetailRespVO> optimizeLayout(PatchingDetailReqVO reqVO);
|
||||
|
||||
|
||||
// 新增补板详情表
|
||||
void insertPatching(PatchingReqVO reqVO);
|
||||
|
||||
|
||||
// 查询所有的机台
|
||||
List<MachineDO> searchMachine();
|
||||
|
||||
|
||||
|
||||
}
|
||||
+162
@@ -0,0 +1,162 @@
|
||||
package com.cf.imes.module.manage.service.patching;
|
||||
|
||||
|
||||
import com.alibaba.nacos.shaded.com.google.gson.Gson;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.common.util.json.JsonUtils;
|
||||
import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PlateDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.patching.vo.*;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderPlateRespVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.patching.PatchDetailDO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.plate.OrderPlateDO;
|
||||
import com.cf.imes.module.manage.dal.mysql.patching.MachineMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.patching.PatchDetailMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.plate.OrderPlateMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.plate.PlateMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.process.ProductionProcessMapper;
|
||||
import com.cf.imes.module.manage.util.page.PageHelperUtil;
|
||||
import com.cf.imes.module.manage.dal.dataobject.patching.MachineDO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Validated
|
||||
public class PatchingPlateServiceImpl implements PatchingPlateService{
|
||||
|
||||
|
||||
@Resource
|
||||
private ProductionProcessMapper productionProcessMapper;
|
||||
|
||||
@Resource
|
||||
private OrderPlateMapper orderPlateMapper;
|
||||
|
||||
@Resource
|
||||
private MachineMapper machineMapper;
|
||||
|
||||
@Resource
|
||||
private PatchDetailMapper patchDetailMapper;
|
||||
|
||||
|
||||
|
||||
// 批量加入补板查询
|
||||
@Override
|
||||
public PageResult<PatchingPlateRespVO> patchingSearchPlate(PatchingPlatePageReqVO pageReqVO) {
|
||||
|
||||
|
||||
// 查询板件和订单的基础信息
|
||||
PageHelper.startPage(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||
List<PatchingPlateRespVO> patchingPlateRespVOS = productionProcessMapper.selectPatchingPlate(pageReqVO);
|
||||
|
||||
//
|
||||
PageInfo<PatchingPlateRespVO> pageInfo = new PageInfo<>(patchingPlateRespVOS);
|
||||
return PageHelperUtil.convertToPageResult(pageInfo);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 查询详细的板件
|
||||
@Override
|
||||
public PageResult<PatchingDetailRespVO> searchPlateDetail(PatchingPlatePageReqVO pageReqVO) {
|
||||
|
||||
// 查询每个订单对应的板件的详细信息
|
||||
PageHelper.startPage(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||
List<PatchingDetailRespVO> plateDetailsRespVOS = orderPlateMapper.selectPlateDetail(pageReqVO);
|
||||
|
||||
//
|
||||
PageInfo<PatchingDetailRespVO> pageInfo = new PageInfo<>(plateDetailsRespVOS);
|
||||
return PageHelperUtil.convertToPageResult(pageInfo);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 加入的板件信息
|
||||
@Override
|
||||
public PatchingDetailRespVO searchPatchingList(Long plateId) {
|
||||
|
||||
|
||||
return orderPlateMapper.selectPlate(plateId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 优化排版
|
||||
@Override
|
||||
public List<PatchingDetailRespVO> optimizeLayout(PatchingDetailReqVO reqVO) {
|
||||
|
||||
// 查询板件的的信息
|
||||
return orderPlateMapper.selectOtherPlateList(reqVO.getPlateIdList());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 新增补板详情表
|
||||
@Override
|
||||
public void insertPatching(PatchingReqVO reqVO) {
|
||||
|
||||
PatchDetailDO patchDetailDO = new PatchDetailDO();
|
||||
|
||||
// 循环查询板件的信息,并加入补板详情表中
|
||||
for (Long ids : reqVO.getIdList()) {
|
||||
|
||||
PatchingDetailRespVO patchingDetailRespVO = orderPlateMapper.selectPlate(ids);
|
||||
String jsonString = JsonUtils.toJsonString(patchingDetailRespVO);
|
||||
|
||||
patchDetailDO.setId(ids);
|
||||
patchDetailDO.setOrderId(patchingDetailRespVO.getOrderId());
|
||||
patchDetailDO.setArea(patchDetailDO.getArea());
|
||||
patchDetailDO.setPlanId(reqVO.getPlanId());
|
||||
patchDetailDO.setMachineId(reqVO.getMachineId());
|
||||
|
||||
patchDetailDO.setDetail(jsonString);
|
||||
|
||||
patchDetailMapper.insert(patchDetailDO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 查询所有的机台
|
||||
@Override
|
||||
public List<MachineDO> searchMachine() {
|
||||
|
||||
return machineMapper.selectList();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.cf.imes.module.manage.service.process;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.*;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ProductionProcessService {
|
||||
|
||||
|
||||
// 生产工序单分页查询
|
||||
PageResult<ProcessRespVO> getProcessPage(ProcessPageReqVO pageReqVO);
|
||||
|
||||
|
||||
|
||||
// 查询工序订单下的加工项的详情
|
||||
List<OrderProcessStepItemVO> getOrderProcessById(OrderProcessReqVO reqVO);
|
||||
|
||||
|
||||
|
||||
// 修改工序明细表的工序状态
|
||||
void updateProcessStatus(Long id);
|
||||
|
||||
|
||||
|
||||
|
||||
// 修改生产步骤表的工序状态
|
||||
void updateAllProcessStatus(OrderProStepReqVO reqVO);
|
||||
|
||||
|
||||
// 查看板材信息的组合名称
|
||||
List<OrderModuleVO> selectPlateName(Long stepItemId);
|
||||
|
||||
|
||||
}
|
||||
+191
@@ -0,0 +1,191 @@
|
||||
package com.cf.imes.module.manage.service.process;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.enums.ProcessingStatusEnum;
|
||||
import com.cf.imes.framework.common.exception.util.ServiceExceptionUtil;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.module.manage.config.VocieParameters;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.*;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderProcessStepItemNDO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderProcessStepNDO;
|
||||
import com.cf.imes.module.manage.dal.mysql.process.OrderProcessMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.process.ProcessStepItemMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.process.ProcessStepMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.process.ProductionProcessMapper;
|
||||
import com.cf.imes.module.manage.util.page.PageHelperUtil;
|
||||
import com.cf.imes.module.system.enums.ErrorCodeConstants;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.baomidou.mybatisplus.core.toolkit.Wrappers.update;
|
||||
|
||||
|
||||
/**
|
||||
* 生产单工序表 order_process_{N} 实现类
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ProductionProcessServiceImpl implements ProductionProcessService {
|
||||
|
||||
|
||||
@Resource
|
||||
private ProcessStepMapper processStepMapper;
|
||||
|
||||
@Resource
|
||||
private OrderProcessMapper orderProcessMapper;
|
||||
|
||||
@Resource
|
||||
private ProcessStepItemMapper processStepItemMapper;
|
||||
|
||||
|
||||
|
||||
// 生产工序单分页查询
|
||||
@Override
|
||||
public PageResult<ProcessRespVO> getProcessPage(ProcessPageReqVO pageReqVO) {
|
||||
|
||||
PageHelper.startPage(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||
List<ProcessRespVO> processRespVOS = processStepMapper.selectOrder(pageReqVO);
|
||||
|
||||
// 判断生产步骤表在传入的状态查询后是否为空
|
||||
if(processRespVOS.isEmpty()){
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
PageInfo<ProcessRespVO> pageInfo = new PageInfo<>(processRespVOS);
|
||||
|
||||
|
||||
// 转换成 PageResult 分页类型
|
||||
return PageHelperUtil.convertToPageResult(pageInfo);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 查询工序订单下的加工项的详情
|
||||
@Override
|
||||
public List<OrderProcessStepItemVO> getOrderProcessById(OrderProcessReqVO reqVO) {
|
||||
|
||||
|
||||
List<OrderProcessStepItemVO> orderProcessStepItemVOS = processStepItemMapper.selectItemProcess(reqVO);
|
||||
|
||||
// 判断生产明细表在传入的状态查询后是否为空
|
||||
if(orderProcessStepItemVOS.isEmpty()){
|
||||
// 修改生产步骤表的工序状态
|
||||
processStepMapper.updateStatusById(reqVO.getProcessStepId(),ProcessingStatusEnum.PROCESSED.getStatus());
|
||||
return null;
|
||||
}
|
||||
|
||||
return orderProcessStepItemVOS;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 修改工序明细表的工序状态
|
||||
@Override
|
||||
public void updateProcessStatus(Long id) {
|
||||
|
||||
|
||||
// 根据步骤 id 查询当前生产单工序的状态
|
||||
OrderProcessStepItemNDO orderProcessStepItemNDO = processStepItemMapper.selectById(id);
|
||||
|
||||
|
||||
// 未加工状态
|
||||
Boolean status = orderProcessStepItemNDO.getStatus();
|
||||
|
||||
|
||||
// 未加工状态才可进行加工
|
||||
if (ProcessingStatusEnum.PROCESSED.getStatus().equals(status)) {
|
||||
|
||||
throw ServiceExceptionUtil.exception(ErrorCodeConstants.UNPROCESSED_BEFORE_PROCESSING);
|
||||
}
|
||||
|
||||
|
||||
// 更新加工状态
|
||||
orderProcessStepItemNDO.setStatus(ProcessingStatusEnum.PROCESSED.getStatus());
|
||||
processStepItemMapper.updateById(orderProcessStepItemNDO);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 修改生产步骤表的工序状态
|
||||
@Override
|
||||
public void updateAllProcessStatus(OrderProStepReqVO reqVO) {
|
||||
|
||||
|
||||
OrderProcessStepNDO orderProcessStepNDO = processStepMapper.selectStatusById(reqVO.getProcessStepId());
|
||||
// 未加工状态
|
||||
Boolean status = orderProcessStepNDO.getStatus();
|
||||
|
||||
// 未加工状态才可进行加工
|
||||
if (ProcessingStatusEnum.PROCESSED.getStatus().equals(status)) {
|
||||
|
||||
throw ServiceExceptionUtil.exception(ErrorCodeConstants.UNPROCESSED_BEFORE_PROCESSING);
|
||||
}
|
||||
|
||||
|
||||
// 修改生产单工序步骤表的状态为已加工
|
||||
orderProcessStepNDO.setStatus(ProcessingStatusEnum.PROCESSED.getStatus());
|
||||
processStepMapper.updateById(orderProcessStepNDO);
|
||||
|
||||
|
||||
// 修改生产单明细表的生产状态
|
||||
processStepItemMapper.updateStatus(reqVO);
|
||||
|
||||
|
||||
/* // 查询当前工序步骤表的工序状态是否还有未加工
|
||||
List<OrderProcessStepNDO> orderProcessStepNDOS = processStepMapper.selectStepList(reqVO, ProcessingStatusEnum.RAW.getStatus());*/
|
||||
|
||||
|
||||
// 修改工序表的加工状态为已加工
|
||||
orderProcessMapper.updateStatusById(orderProcessStepNDO.getOrderProcessId(),ProcessingStatusEnum.PROCESSED.getStatus());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 查看板材信息的组合名称
|
||||
@Override
|
||||
public List<OrderModuleVO> selectPlateName(Long stepItemId) {
|
||||
|
||||
|
||||
List<OrderModuleVO> orderModuleVOS = processStepItemMapper.selectPlateName(stepItemId);
|
||||
|
||||
for (OrderModuleVO orderModuleVO : orderModuleVOS) {
|
||||
if(orderModuleVO.getGroupName().isEmpty()){
|
||||
return orderModuleVOS;
|
||||
}
|
||||
|
||||
// 修改组合名称为加工组的名称
|
||||
orderModuleVO.setName(orderModuleVO.getGroupName());
|
||||
}
|
||||
|
||||
return orderModuleVOS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.cf.imes.module.manage.service.query;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.OrderPartsReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PlateDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.OrderPackagePageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.OrderPackageVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.PackageDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.PrintOrderRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.*;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.salary.PriceRatePageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.salary.PriceRateReqVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ProductionStatusService {
|
||||
|
||||
|
||||
// 生产状态分页查询
|
||||
PageResult<OrderDO> getProductionPage(OrderPlatePageReqVO pageReqVO);
|
||||
|
||||
// 查看生产单下的加工的工序组
|
||||
List<ProductionGroupVO> selectProduction(Long orderNo);
|
||||
|
||||
|
||||
// 查看板材信息的组合名称
|
||||
List<OrderModuleVO> selectPlateName(OrderModuleReqVO reqVO);
|
||||
|
||||
|
||||
// 查看板材信息分页
|
||||
PageResult<OrderPlateRespVO> getOrderPlatePage(PlatePageVO pageReqVO);
|
||||
|
||||
|
||||
// 计件工资分页查询
|
||||
PageResult<PriceRateReqVO> getSalaryPage(PriceRatePageReqVO pageReqVO);
|
||||
|
||||
|
||||
|
||||
// 打包查询分页
|
||||
PageResult<OrderDO> queryPackage(OrderPlatePageReqVO pageReqVO);
|
||||
|
||||
|
||||
|
||||
// 生产单打包完成包裹查看
|
||||
List<OrderPackageVO> getPackageList(Long orderNo);
|
||||
|
||||
|
||||
|
||||
// 查看包裹详情
|
||||
List<PackageDetailsRespVO> queryPackageDetails(Long packId);
|
||||
|
||||
|
||||
// 打印订单
|
||||
PrintOrderRespVO printOrder(Long orderNo);
|
||||
|
||||
|
||||
|
||||
// 导出缺板
|
||||
PageResult<PlateDetailsRespVO> getMissingBoard(OrderPartsReqVO pageReqVO);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+224
@@ -0,0 +1,224 @@
|
||||
package com.cf.imes.module.manage.service.query;
|
||||
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.OrderPartsReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.PlateDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.OrderPackagePageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.OrderPackageVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.PackageDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.PrintOrderRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.*;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.salary.PriceRatePageReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.salary.PriceRateReqVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderDO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.process.OrderProcessStepNDO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.query.OrderPackageDO;
|
||||
import com.cf.imes.module.manage.dal.mysql.pack.OrderPackageMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.process.ProcessStepItemMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.process.ProcessStepMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.query.*;
|
||||
import com.cf.imes.module.manage.util.page.PageHelperUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@Validated
|
||||
public class ProductionStatusServiceImpl implements ProductionStatusService {
|
||||
|
||||
@Resource
|
||||
private ProductionStatusMapper productionStatusMapper;
|
||||
|
||||
@Resource
|
||||
private ProcessStepMapper processStepMapper;
|
||||
|
||||
@Resource
|
||||
private ProcessStepItemMapper processStepItemMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private OrderPackageMapper orderPackageMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private OrderItemMapper orderItemMapper;
|
||||
|
||||
@Resource
|
||||
private OrderPartsMapper orderPartsMapper;
|
||||
|
||||
|
||||
|
||||
// 生产状态分页查询
|
||||
@Override
|
||||
public PageResult<OrderDO> getProductionPage(OrderPlatePageReqVO pageReqVO) {
|
||||
|
||||
return productionStatusMapper.selectProductionPage(pageReqVO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 查看生产单下的加工的工序组
|
||||
@Override
|
||||
public List<ProductionGroupVO> selectProduction(Long orderNo) {
|
||||
|
||||
List<OrderProcessStepNDO> orderProcessStepNDOS = processStepMapper.selectProducitonList(orderNo);
|
||||
|
||||
List<ProductionGroupVO> productionGroupVOS = BeanUtils.toBean(orderProcessStepNDOS, ProductionGroupVO.class);
|
||||
|
||||
Long id = orderProcessStepNDOS.get(0).getId();
|
||||
|
||||
String name = processStepItemMapper.selectById(id).getGroupName();
|
||||
|
||||
for (int i = 0; i < 1; i++) {
|
||||
productionGroupVOS.get(i).setGroupName(name);
|
||||
}
|
||||
|
||||
return productionGroupVOS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 查询板材信息的组合名称
|
||||
@Override
|
||||
public List<OrderModuleVO> selectPlateName(OrderModuleReqVO reqVO) {
|
||||
|
||||
return orderItemMapper.selectCombinationName(reqVO.getOrderNo());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 查看板材信息分页
|
||||
@Override
|
||||
public PageResult<OrderPlateRespVO> getOrderPlatePage(PlatePageVO pageReqVO) {
|
||||
|
||||
|
||||
PageHelper.startPage(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||
List<OrderPlateRespVO> orderPlateRespVOS = orderItemMapper.selectPlateList(pageReqVO);
|
||||
PageInfo<OrderPlateRespVO> pageInfo = new PageInfo<>(orderPlateRespVOS);
|
||||
PageResult<OrderPlateRespVO> priceRateReqVOPageResult = PageHelperUtil.convertToPageResult(pageInfo);
|
||||
|
||||
return priceRateReqVOPageResult;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 计件工资分页查询
|
||||
@Override
|
||||
public PageResult<PriceRateReqVO> getSalaryPage(PriceRatePageReqVO pageReqVO) {
|
||||
|
||||
PageHelper.startPage(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||
List<PriceRateReqVO> priceRateReqVOS = processStepMapper.selectSalaryList(pageReqVO);
|
||||
|
||||
// 判断是否显示计件工资为0的工序
|
||||
if(pageReqVO.getNoShowZero().equals(true)){
|
||||
for (PriceRateReqVO priceRateReqVO : priceRateReqVOS) {
|
||||
if(priceRateReqVO.getPriceRate() == 0){
|
||||
priceRateReqVOS.remove(priceRateReqVO);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
PageInfo<PriceRateReqVO> pageInfo = new PageInfo<>(priceRateReqVOS);
|
||||
return PageHelperUtil.convertToPageResult(pageInfo);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 打包查询分页
|
||||
@Override
|
||||
public PageResult<OrderDO> queryPackage(OrderPlatePageReqVO pageReqVO) {
|
||||
|
||||
return productionStatusMapper.selectProductionPage(pageReqVO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 生产单打包完成包裹查看
|
||||
@Override
|
||||
public List<OrderPackageVO> getPackageList(Long orderNo) {
|
||||
|
||||
List<OrderPackageDO> orderPackageDOS = orderPackageMapper.selectByOrderNo(orderNo);
|
||||
|
||||
return BeanUtils.toBean(orderPackageDOS, OrderPackageVO.class);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 查看包裹详情
|
||||
@Override
|
||||
public List<PackageDetailsRespVO> queryPackageDetails(Long packId) {
|
||||
|
||||
OrderPackageDO orderPackageDO = orderPackageMapper.selectByPackNo(packId);
|
||||
|
||||
// 查看配件包裹
|
||||
if(orderPackageDO.getType() == 1 || orderPackageDO.getType() == 2){
|
||||
//
|
||||
List<PackageDetailsRespVO> packageDetailsRespVOS = orderPartsMapper.selectParts(orderPackageDO.getPackageNo());
|
||||
|
||||
return packageDetailsRespVOS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 查看板材包裹
|
||||
List<PackageDetailsRespVO> packageDetailsRespVOS = orderItemMapper.selectByPackageId(orderPackageDO.getId());
|
||||
|
||||
return packageDetailsRespVOS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 打印订单
|
||||
@Override
|
||||
public PrintOrderRespVO printOrder(Long orderNo) {
|
||||
|
||||
return productionStatusMapper.selectPrintOrder(orderNo);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 导出缺板
|
||||
@Override
|
||||
public PageResult<PlateDetailsRespVO> getMissingBoard(OrderPartsReqVO pageReqVO) {
|
||||
|
||||
|
||||
PageHelper.startPage(pageReqVO.getPageNo(),pageReqVO.getPageSize());
|
||||
List<PlateDetailsRespVO> plateDetailsRespVOS = orderPackageMapper.selectMissingBoard(pageReqVO.getOrderNo());
|
||||
PageInfo<PlateDetailsRespVO> pageInfo = new PageInfo<>(plateDetailsRespVOS);
|
||||
PageResult<PlateDetailsRespVO> priceRateReqVOPageResult = PageHelperUtil.convertToPageResult(pageInfo);
|
||||
|
||||
return priceRateReqVOPageResult;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.cf.imes.module.manage.service.voice;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public interface VoiceService {
|
||||
|
||||
|
||||
// 生成音频文件
|
||||
String voiceAnnouncements(String text);
|
||||
|
||||
|
||||
// 把生成的音频文件进行压缩
|
||||
void zipFiles(String sourceFile, String gzipFile) throws IOException;
|
||||
|
||||
}
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
package com.cf.imes.module.manage.service.voice;
|
||||
|
||||
|
||||
import com.cf.imes.framework.quartz.config.XxlJobProperties;
|
||||
import com.cf.imes.module.manage.config.VocieParameters;
|
||||
import com.cf.imes.module.manage.config.XxlJobParameter;
|
||||
import com.jacob.activeX.ActiveXComponent;
|
||||
import com.jacob.com.ComThread;
|
||||
import com.jacob.com.Dispatch;
|
||||
import com.jacob.com.Variant;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
|
||||
import java.net.http.WebSocket;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.Channels;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.nio.channels.WritableByteChannel;
|
||||
import java.util.Objects;
|
||||
import java.util.Random;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class VoiceServiceImpl implements VoiceService{
|
||||
|
||||
@Resource
|
||||
private VocieParameters vocieParameters;
|
||||
|
||||
|
||||
|
||||
// 生成音频文件
|
||||
@Override
|
||||
public String voiceAnnouncements(String text) {
|
||||
//
|
||||
// 音频保存的路径
|
||||
String path = vocieParameters.getPath();
|
||||
|
||||
// 设置音频的质量( 越大越好,目前最大好像 22,最小为 4 )
|
||||
Long quality = vocieParameters.getQuality();;
|
||||
|
||||
// 朗读声音大小
|
||||
Long soundSize = vocieParameters.getSoundSize();
|
||||
|
||||
// 朗读速度
|
||||
Long readingSpeed = vocieParameters.getReadingSpeed();
|
||||
|
||||
ActiveXComponent ax = null;
|
||||
Dispatch spFileStream = null;
|
||||
Dispatch spAudioFormat = null;
|
||||
Dispatch spVoice = null;
|
||||
try{
|
||||
ax = new ActiveXComponent("Sapi.SpFileStream");
|
||||
spFileStream = ax.getObject();
|
||||
|
||||
ax = new ActiveXComponent("Sapi.SpAudioFormat");
|
||||
spAudioFormat = ax.getObject();
|
||||
|
||||
spVoice = new ActiveXComponent("Sapi.SpVoice").getObject();
|
||||
// 设置音频流格式
|
||||
Dispatch.put(spAudioFormat, "Type", new Variant(quality));
|
||||
// 设置文件输出流格式
|
||||
Dispatch.putRef(spFileStream, "Format", spAudioFormat);
|
||||
// 随机数,控制文件的名字
|
||||
int randomInt = new Random(System.currentTimeMillis()).nextInt(900) + 100;// 生成100到999之间的随机数
|
||||
// 文件的路径
|
||||
String filePath = path + randomInt + ".mp3";
|
||||
|
||||
// 调用输出文件流打开方法,创建一个.wav文件
|
||||
Dispatch.call(spFileStream, "Open", new Variant(filePath), new Variant(3), new Variant(true));
|
||||
// 设置声音对象的音频输出流为输出文件对象
|
||||
Dispatch.putRef(spVoice, "AudioOutputStream", spFileStream);
|
||||
// 设置音量 0 ~ 100
|
||||
Dispatch.put(spVoice, "Volume", new Variant(soundSize));
|
||||
// 设置朗读速度 -10 ~ +10
|
||||
Dispatch.put(spVoice, "Rate", new Variant(readingSpeed));
|
||||
|
||||
Dispatch.call(spVoice, "Speak", new Variant(text));
|
||||
|
||||
System.out.println("输出语音文件成功!");
|
||||
|
||||
return filePath;
|
||||
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
// 关闭输出文件
|
||||
Dispatch.call(Objects.requireNonNull(spFileStream), "Close");
|
||||
Dispatch.putRef(Objects.requireNonNull(spVoice), "AudioOutputStream", null);
|
||||
|
||||
Objects.requireNonNull(spAudioFormat).safeRelease();
|
||||
spFileStream.safeRelease();
|
||||
spVoice.safeRelease();
|
||||
ax.safeRelease();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 把生成的音频文件进行压缩
|
||||
* @param fileNames 需要压缩的文件名称列表(包含相对路径)
|
||||
* @param zipOutName 压缩后的文件名称
|
||||
**/
|
||||
@Override
|
||||
public void zipFiles(String fileNames, String zipOutName) throws IOException {
|
||||
ZipOutputStream zipOutputStream = null;
|
||||
WritableByteChannel writableByteChannel = null;
|
||||
ByteBuffer buffer = ByteBuffer.allocate(2048);
|
||||
try {
|
||||
zipOutputStream = new ZipOutputStream(new FileOutputStream(zipOutName));
|
||||
writableByteChannel = Channels.newChannel(zipOutputStream);
|
||||
File source = new File(fileNames);
|
||||
zipOutputStream.putNextEntry(new ZipEntry(source.getName()));
|
||||
FileChannel fileChannel = new FileInputStream(fileNames).getChannel();
|
||||
while (fileChannel.read(buffer) != -1) {
|
||||
//更新缓存区位置
|
||||
buffer.flip();
|
||||
while (buffer.hasRemaining()) {
|
||||
writableByteChannel.write(buffer);
|
||||
}
|
||||
buffer.rewind();
|
||||
}
|
||||
fileChannel.close();
|
||||
|
||||
System.out.println("文件压缩成功");
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("batchZipFiles error fileNames:");
|
||||
} finally {
|
||||
zipOutputStream.close();
|
||||
writableByteChannel.close();
|
||||
buffer.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.cf.imes.module.manage.util.packageNo;
|
||||
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* 生成包裹编号 工具类
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
public class PackageNoUtil {
|
||||
|
||||
|
||||
public static String randomPageNo(){
|
||||
|
||||
// 获取当前日期
|
||||
String DateNum = LocalDateTime.now().toLocalDate().toString().replace("-", "");
|
||||
|
||||
// 获取当前时间戳并使用Random类生成随机数
|
||||
int randomInt = new Random(System.currentTimeMillis()).nextInt(900000) + 100000; // 生成100000到999999之间的随机数
|
||||
|
||||
|
||||
return DateNum+randomInt;
|
||||
}
|
||||
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.cf.imes.module.manage.util.page;
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
|
||||
/**
|
||||
* PageHelper 工具类
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
public class PageHelperUtil {
|
||||
|
||||
// 转换分页数据类型
|
||||
public static <T> PageResult<T> convertToPageResult(PageInfo<T> pageInfo) {
|
||||
PageResult<T> pageResult = new PageResult<>();
|
||||
pageResult.setTotal(pageInfo.getTotal());
|
||||
pageResult.setList(pageInfo.getList());
|
||||
return pageResult;
|
||||
}
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.cf.imes.module.manage.util.xxjJob;
|
||||
|
||||
|
||||
import com.cf.imes.framework.quartz.config.XxlJobProperties;
|
||||
import com.cf.imes.module.manage.config.XxlJobParameter;
|
||||
import com.xxl.job.core.handler.IJobHandler;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
public class XxlJobUtil extends IJobHandler {
|
||||
|
||||
@Resource
|
||||
private XxlJobParameter xxlJobParameter;
|
||||
|
||||
|
||||
// 定时删除
|
||||
public void deleteFile(){
|
||||
|
||||
XxlJobProperties xxlJobProperties = new XxlJobProperties();
|
||||
|
||||
xxlJobProperties.setEnabled(xxlJobParameter.getEnabled());
|
||||
xxlJobProperties.setAccessToken(xxlJobParameter.getAccessToken());
|
||||
xxlJobProperties.getAdmin().setAddresses(xxlJobParameter.getAddresses());
|
||||
xxlJobProperties.getExecutor().setAppName(xxlJobParameter.getAppName());
|
||||
xxlJobProperties.getExecutor().setPort(xxlJobParameter.getPort().intValue());
|
||||
xxlJobProperties.getExecutor().setIp(xxlJobParameter.getIp());
|
||||
xxlJobProperties.getExecutor().setLogPath(xxlJobParameter.getLogPath());
|
||||
xxlJobProperties.getExecutor().setLogRetentionDays(xxlJobParameter.getLogRetentionDays().intValue());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@XxlJob("demoJobHandler")
|
||||
public void execute() throws Exception {
|
||||
deleteFile();
|
||||
|
||||
System.out.println("定时任务测试");
|
||||
|
||||
}
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.cf.imes.module.manage.dal.mysql.pack.OrderPackageMapper">
|
||||
|
||||
<resultMap id="PackMap" type="com.cf.imes.module.manage.controller.admin.pack.vo.PackRespVO">
|
||||
|
||||
<result property="packCount" column="numberOfPackages"/>
|
||||
<result property="packPieceCount" column="packagedBoard"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectPackPage" resultType="com.cf.imes.module.manage.controller.admin.pack.vo.PackRespVO"
|
||||
parameterType="java.util.List"
|
||||
resultMap="PackMap">
|
||||
|
||||
|
||||
select
|
||||
count(DISTINCT oi.package_id ) as numberOfPackages,
|
||||
count(DISTINCT oi.plate_id) as packagedBoard
|
||||
|
||||
from order_package_n opn
|
||||
join order_item oi on opn.id = oi.package_id
|
||||
WHERE opn.order_no IN
|
||||
<foreach item="id" collection="collect" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
and opn.status <> 0;
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="PlateDetailsMap" type="com.cf.imes.module.manage.controller.admin.pack.vo.PlateDetailsRespVO">
|
||||
<result property="roomName" column="roomName"/>
|
||||
<result property="cabinetName" column="bodyName"/>
|
||||
<result property="plateNo" column="palteId"/>
|
||||
<result property="plateName" column="plateName"/>
|
||||
<result property="material" column="plateMaterial"/>
|
||||
<result property="color" column="palteColor"/>
|
||||
<result property="width" column="plateWidth"/>
|
||||
<result property="height" column="plateHeight"/>
|
||||
<result property="thickness" column="plateThickness"/>
|
||||
<result property="area" column="plateArea"/>
|
||||
<result property="texture" column="texture"/>
|
||||
<result property="specialShaped" column="specialShaped"/>
|
||||
<result property="profiling" column="profiling"/>
|
||||
<result property="rowHole" column="rowHole"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="processGroup" column="name"/>
|
||||
</resultMap>
|
||||
<select id="selectMissingBoard"
|
||||
parameterType="java.lang.Long"
|
||||
resultMap="PlateDetailsMap">
|
||||
|
||||
select
|
||||
ob.room_name as roomName,
|
||||
ob.name as bodyName,
|
||||
op.id as palteId,
|
||||
op.name as plateName,
|
||||
p.material as plateMaterial,
|
||||
p.color as palteColor,
|
||||
p.height as plateHeight,
|
||||
p.width as plateWidth,
|
||||
p.thickness as plateThickness,
|
||||
op.area as plateArea,
|
||||
op.texture as texture,
|
||||
op.remark as remark,
|
||||
CASE WHEN op.unregular_point_count = 0 THEN '否' ELSE '是' END AS specialShaped,
|
||||
CASE WHEN front_model_count = 0 or op.back_hole_count or op.side_hole_count THEN '否' ELSE '是' END AS profiling,
|
||||
CASE WHEN front_hole_count = 0 or op.back_model_count THEN '否' ELSE '是' END AS rowHole
|
||||
|
||||
from order_plate op
|
||||
join plate p on op.goods_id = p.goods_id
|
||||
join order_item oi on op.id = oi.plate_id
|
||||
join order_body ob on oi.body_id = ob.id
|
||||
|
||||
where
|
||||
oi.order_id = #{orderNo}
|
||||
and
|
||||
op.id not in (
|
||||
select oi2.plate_id
|
||||
from order_item oi2
|
||||
where oi2.order_id = #{orderNo} and oi2.package_id <> '');
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="updateParts"
|
||||
parameterType="java.lang.Long">
|
||||
|
||||
UPDATE order_package_n
|
||||
SET deleted = true
|
||||
WHERE id = #{packageId} AND package_no = #{packageNo};
|
||||
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.cf.imes.module.manage.dal.mysql.plate.OrderPlateMapper">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="PlateDetailMap" type="com.cf.imes.module.manage.controller.admin.patching.vo.PatchingDetailRespVO">
|
||||
|
||||
<result property="cabinetName" column="cabinetName"/>
|
||||
<result property="plateNo" column="plateNo"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="height" column="height"/>
|
||||
<result property="width" column="width"/>
|
||||
<result property="thickness" column="thickness"/>
|
||||
<result property="area" column="area"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="customOrderId" column="customOrderId"/>
|
||||
<result property="customer" column="customer"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="specialShaped" column="specialShaped"/>
|
||||
<result property="profiling" column="profiling"/>
|
||||
<result property="rowHole" column="rowHole"/>
|
||||
<result property="plateCombinationName" column="plateCombinationName"/>
|
||||
<result property="material" column="material"/>
|
||||
<result property="color" column="color"/>
|
||||
</resultMap>
|
||||
<select id="selectPlateDetail"
|
||||
resultMap="PlateDetailMap"
|
||||
parameterType="com.cf.imes.module.manage.controller.admin.patching.vo.PatchingPlatePageReqVO">
|
||||
|
||||
|
||||
select
|
||||
o.id as orderId,
|
||||
ob.name as cabinetName,
|
||||
op.id as plateNo,
|
||||
op.name as name,
|
||||
op.height as height,
|
||||
op.width as width,
|
||||
op.thickness as thickness,
|
||||
op.area as area,
|
||||
op.remark as remark,
|
||||
o.custom_order_no as customOrderId,
|
||||
o.customer as customer,
|
||||
o.address as address,
|
||||
|
||||
CASE WHEN op.unregular_point_count = 0 THEN '否' ELSE '是' END AS specialShaped,
|
||||
CASE WHEN front_model_count = 0 or op.back_hole_count = 0 or op.side_hole_count = 0 THEN '否' ELSE '是' END AS profiling,
|
||||
CASE WHEN front_hole_count = 0 or op.back_model_count = 0 THEN '否' ELSE '是' END AS rowHole,
|
||||
|
||||
CONCAT(
|
||||
TRIM(TRAILING '.' from TRIM(TRAILING '0' FROM p.thickness)),'mm-',p.material,'-',p.color) AS plateCombinationName,
|
||||
|
||||
p.material as material,
|
||||
p.color as color
|
||||
from order_plate op
|
||||
|
||||
join order_item oi on op.id = oi.plate_id
|
||||
join order_body ob on oi.body_id = ob.id
|
||||
join `order` o on op.order_id = o.id
|
||||
join plate p on op.goods_id = p.goods_id
|
||||
|
||||
|
||||
<where>
|
||||
<if test="orderNo != null">
|
||||
and op.order_id = #{orderNo}
|
||||
</if>
|
||||
<if test="customOrderNo != null">
|
||||
and o.custom_order_no = #{customOrderNo}
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
and oi.body_id = #{groupId}
|
||||
</if>
|
||||
<if test="customer != null">
|
||||
and o.customer = #{customer}
|
||||
</if>
|
||||
<if test="address != null">
|
||||
and o.address = #{address}
|
||||
</if>
|
||||
<if test="startTime != null and endTime != null">
|
||||
and op.update_time between #{startTime} and #{endTime}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="selectPlate"
|
||||
resultMap="PlateDetailMap">
|
||||
|
||||
select
|
||||
op.*,
|
||||
oi.room_id as roomId,
|
||||
oi.body_id as bodyId,
|
||||
ob.room_name as roomName,
|
||||
ob.name as cabinetName,
|
||||
/* op.id as plateNo,
|
||||
op.name as plateName,
|
||||
op.height as height,
|
||||
op.width as width,
|
||||
op.thickness as thickness,
|
||||
op.area as area,
|
||||
op.remark as remark,*/
|
||||
o.custom_order_no as customOrderId,
|
||||
o.customer as customer,
|
||||
o.address as address,
|
||||
|
||||
CASE WHEN op.unregular_point_count = 0 THEN '否' ELSE '是' END AS specialShaped,
|
||||
CASE WHEN front_model_count = 0 or op.back_hole_count = 0 or op.side_hole_count = 0 THEN '否' ELSE '是' END AS profiling,
|
||||
CASE WHEN front_hole_count = 0 or op.back_model_count = 0 THEN '否' ELSE '是' END AS rowHole,
|
||||
|
||||
CONCAT(
|
||||
TRIM(TRAILING '.' from TRIM(TRAILING '0' FROM p.thickness)),'mm-',p.material,'-',p.color) AS plateCombinationName,
|
||||
|
||||
p.material as material,
|
||||
p.color as color
|
||||
from order_plate op
|
||||
|
||||
join order_item oi on op.id = oi.plate_id
|
||||
join order_body ob on oi.body_id = ob.id
|
||||
join `order` o on op.order_id = o.id
|
||||
join plate p on op.goods_id = p.goods_id
|
||||
|
||||
where op.id = #{plateId}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="selectOtherPlateList"
|
||||
resultMap="PlateDetailMap"
|
||||
parameterType="java.lang.Long">
|
||||
|
||||
|
||||
select op.*,
|
||||
oi.room_id as roomId,
|
||||
oi.body_id as bodyId,
|
||||
ob.room_name as roomName,
|
||||
ob.name as cabinetName,
|
||||
p.material as material,
|
||||
p.color as color,
|
||||
|
||||
CONCAT(
|
||||
TRIM(TRAILING '.' from TRIM(TRAILING '0' FROM p.thickness)),'mm-',p.material,'-',p.color) AS plateCombinationName
|
||||
|
||||
from order_plate op
|
||||
join order_item oi on op.id = oi.plate_id
|
||||
join order_body ob on oi.body_id = ob.id
|
||||
join plate p on op.goods_id = p.goods_id
|
||||
|
||||
where op.id in
|
||||
<foreach item="id" collection="plateIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.cf.imes.module.manage.dal.mysql.process.ProcessStepItemMapper">
|
||||
|
||||
|
||||
<select id="selectPlateName"
|
||||
resultType="com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleVO"
|
||||
parameterType="java.lang.Long">
|
||||
|
||||
|
||||
select CONCAT(ob.room_name,'_',ob.name) as name ,ob.id as bodyId,og.name as groupName,og.id as groupId
|
||||
from order_process_step_item opsn
|
||||
join order_body ob on opsn.body_id = ob.id
|
||||
left join order_group og on ob.id = og.body_id
|
||||
where opsn.process_step_id = #{processStepId};
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<resultMap id="ItemMap" type="com.cf.imes.module.manage.controller.admin.process.vo.OrderProcessStepItemVO">
|
||||
<result property="id" column="id"/>
|
||||
<result property="stepName" column="processName"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="orderProcessId" column="orderProcessId"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectItemProcess"
|
||||
resultMap="ItemMap"
|
||||
parameterType="com.cf.imes.module.manage.controller.admin.process.vo.OrderProcessReqVO">
|
||||
|
||||
select opsi.name as name,
|
||||
opsi.id as id,
|
||||
ops.Name as processName,
|
||||
op.group_id as orderProcessId
|
||||
from order_process_step_item opsi
|
||||
join order_process op on opsi.order_process_id = op.id
|
||||
join order_process_step ops on opsi.process_step_id = ops.id
|
||||
where opsi.status = #{status} and opsi.process_step_id= #{processStepId} and ops.order_process_id = #{orderProcessId};
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="updateStatus"
|
||||
parameterType= "com.cf.imes.module.manage.controller.admin.process.vo.OrderProStepReqVO">
|
||||
|
||||
|
||||
update order_process_step_item set status = true where process_step_id = #{processStepId} and order_process_id = #{orderProcessId};
|
||||
|
||||
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.cf.imes.module.manage.dal.mysql.process.ProcessStepMapper">
|
||||
|
||||
|
||||
|
||||
<update id="updateStatusById">
|
||||
|
||||
UPDATE order_process_step SET status = #{status} WHERE id = #{id}
|
||||
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="OrderMap" type="com.cf.imes.module.manage.controller.admin.process.vo.ProcessRespVO">
|
||||
|
||||
<result property="id" column="id"/>
|
||||
<result property="processStepId" column="processStepId"/>
|
||||
<result property="customOrderNo" column="customOrderNo"/>
|
||||
<result property="customer" column="customer"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="status" column="status"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<select id="selectOrder" resultMap="OrderMap" parameterType="com.cf.imes.module.manage.controller.admin.process.vo.ProcessPageReqVO">
|
||||
|
||||
|
||||
select distinct
|
||||
ops.order_id as id,
|
||||
ops.id as processStepId,
|
||||
o.custom_order_no as customOrderNo,
|
||||
o.customer as customer,
|
||||
o.address as address,
|
||||
ops.status as status
|
||||
from order_process_step ops
|
||||
join `order` o on ops.order_id = o.id
|
||||
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and ops.processinfo_id = #{id}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and ops.status = #{status}
|
||||
</if>
|
||||
<if test="orderNo != null">
|
||||
and ops.order_id = #{orderNo}
|
||||
</if>
|
||||
<if test="customOrderNo != null">
|
||||
and o.custom_order_no = #{customOrderNo}
|
||||
</if>
|
||||
<if test="customer != null">
|
||||
and o.customer like concat('%',#{customer},'%')
|
||||
</if>
|
||||
<if test="address != null">
|
||||
and o.address like concat('%',#{address},'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="priceResultMap" type="com.cf.imes.module.manage.controller.admin.query.vo.salary.PriceRateReqVO">
|
||||
<result property="name" column="name"/>
|
||||
<result property="priceRate" column="piece_rate"/>
|
||||
<result property="num" column="total_piece_num"/>
|
||||
<result property="priceType" column="piece_type"/>
|
||||
<result property="amount" column="total_piece_rate"/>
|
||||
<result property="manager" column="creator"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectSalaryList"
|
||||
resultMap="priceResultMap"
|
||||
parameterType="com.cf.imes.module.manage.controller.admin.query.vo.salary.PriceRatePageReqVO">
|
||||
|
||||
select ops.name as name ,
|
||||
ops.piece_rate as piece_rate ,
|
||||
ops.piece_type as piece_type,
|
||||
ops.creator as creator,
|
||||
SUM(CASE
|
||||
WHEN ops.piece_type = 1 THEN ops.piece_rate
|
||||
ELSE ROUND((op.size / ops.piece_rate), 2) * ops.piece_rate
|
||||
END) AS total_piece_rate,
|
||||
|
||||
SUM(CASE
|
||||
WHEN ops.piece_type = 1 THEN 1
|
||||
ELSE ROUND((op.size / ops.piece_rate), 2)
|
||||
END) AS total_piece_num
|
||||
|
||||
from order_process_step ops
|
||||
join order_process op on ops.order_process_id = op.id
|
||||
|
||||
<where>
|
||||
<if test="creator != null">
|
||||
and ops.creator = #{creator}
|
||||
</if>
|
||||
<if test="name != null">
|
||||
and ops.name = #{name}
|
||||
</if>
|
||||
<if test="startTime != null and endTime != null">
|
||||
and ops.update_time between #{startTime} and #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
and ops.status = true
|
||||
|
||||
group by name,piece_rate,piece_type,creator;
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.cf.imes.module.manage.dal.mysql.process.ProductionProcessMapper">
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="PatchingPlateMap" type="com.cf.imes.module.manage.controller.admin.patching.vo.PatchingPlateRespVO">
|
||||
|
||||
<result property="groupId" column="groupId"/>
|
||||
<result property="orderId" column="orderId"/>
|
||||
<result property="customOrderId" column="customOrderId"/>
|
||||
<result property="customer" column="customer"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="orderStatus" column="orderStatus"/>
|
||||
<result property="plateName" column="plateName"/>
|
||||
<result property="plateNum" column="plateNum"/>
|
||||
<result property="thickness" column="thickness"/>
|
||||
<result property="material" column="material"/>
|
||||
<result property="color" column="color"/>
|
||||
|
||||
</resultMap>
|
||||
<select id="selectPatchingPlate"
|
||||
resultMap="PatchingPlateMap"
|
||||
parameterType="com.cf.imes.module.manage.controller.admin.patching.vo.PatchingPlatePageReqVO">
|
||||
|
||||
select
|
||||
|
||||
p.goods_id,
|
||||
o.id as orderId,
|
||||
o.custom_order_no as customOrderId,
|
||||
o.customer as customer,
|
||||
o.address as address,
|
||||
o.status as orderStatus,
|
||||
oi.num as plateNum,
|
||||
<![CDATA[
|
||||
CONCAT(
|
||||
TRIM(TRAILING '.' from TRIM(TRAILING '0' FROM p.thickness)),'mm-',p.material,'-',p.color) AS plateName,
|
||||
]]>
|
||||
p.thickness as thickness,
|
||||
p.material as material,
|
||||
p.color as color
|
||||
|
||||
from `order` o
|
||||
|
||||
join order_item oi on o.id = oi.order_id
|
||||
join order_plate op on oi.plate_id = op.id
|
||||
join plate p on op.goods_id = p.goods_id
|
||||
|
||||
<where>
|
||||
<choose>
|
||||
<!-- 挖穿,挖孔,二维刀路判断 -->
|
||||
<when test="isDigThrough == true">
|
||||
(op.filter_type = 1
|
||||
<if test="isDiggingHoles == true ">
|
||||
or op.filter_type = 2
|
||||
</if>
|
||||
<if test="is2DCuttingPath == true ">
|
||||
or op.filter_type = 4
|
||||
</if>)
|
||||
|
||||
<!-- 其他的判断 -->
|
||||
<if test="orderNo != null">
|
||||
and o.id = #{orderNo}
|
||||
</if>
|
||||
<if test="customOrderNo != null">
|
||||
and o.custom_order_no = #{customOrderNo}
|
||||
</if>
|
||||
<if test="customer != null">
|
||||
and o.customer = #{customer}
|
||||
</if>
|
||||
<if test="address != null">
|
||||
and o.address = #{address}
|
||||
</if>
|
||||
<if test="statusList != null">
|
||||
and o.status in
|
||||
<foreach item="id" collection="statusList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="startTime != null and endTime != null">
|
||||
and o.update_time between #{startTime} and #{endTime}
|
||||
</if>
|
||||
|
||||
<if test="isRectangle == true ">
|
||||
and op.unregular_point_count = 0
|
||||
</if>
|
||||
|
||||
<if test="isSpecialShaped == true ">
|
||||
and op.unregular_point_count > 0
|
||||
</if>
|
||||
|
||||
<if test="isProfiling == true ">
|
||||
and front_model_count > 0 or op.back_hole_count > 0 or op.side_hole_count > 0
|
||||
</if>
|
||||
|
||||
<if test="isDoor == true ">
|
||||
and op.is_door = 1
|
||||
</if>
|
||||
|
||||
<!-- <if test="longRangeList != null and !longRangeList.isEmpty()">
|
||||
AND (
|
||||
<!– 根据 DataRangeList 中的属性进行条件判断 –>
|
||||
<foreach collection="longRangeList" item="range" separator=" OR ">
|
||||
(#{op.width} <= #{range.maxaa} AND #{op.width} >= #{range.minbb})
|
||||
</foreach>
|
||||
)
|
||||
</if>-->
|
||||
|
||||
|
||||
</when>
|
||||
<!-- 不传入挖穿等判断,走另一个判断逻辑 -->
|
||||
<otherwise>
|
||||
|
||||
<if test="orderNo != null">
|
||||
and o.id = #{orderNo}
|
||||
</if>
|
||||
<if test="customOrderNo != null">
|
||||
and o.custom_order_no = #{customOrderNo}
|
||||
</if>
|
||||
<if test="customer != null">
|
||||
and o.customer = #{customer}
|
||||
</if>
|
||||
<if test="address != null">
|
||||
and o.address = #{address}
|
||||
</if>
|
||||
<if test="statusList != null">
|
||||
and o.status in
|
||||
<foreach item="id" collection="statusList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="startTime != null and endTime != null">
|
||||
and o.update_time between #{startTime} and #{endTime}
|
||||
</if>
|
||||
|
||||
<if test="isRectangle == true ">
|
||||
and op.unregular_point_count = 0
|
||||
</if>
|
||||
|
||||
<if test="isSpecialShaped == true ">
|
||||
and op.unregular_point_count > 0
|
||||
</if>
|
||||
|
||||
<if test="isProfiling == true ">
|
||||
and front_model_count > 0 or op.back_hole_count > 0 or op.side_hole_count > 0
|
||||
</if>
|
||||
|
||||
<if test="isDoor == true ">
|
||||
and op.is_door = 1
|
||||
</if>
|
||||
<!--
|
||||
<if test="longRangeList != null and !longRangeList.isEmpty()">
|
||||
AND
|
||||
<!– 根据 DataRangeList 中的属性进行条件判断 –>
|
||||
<foreach collection="longRangeList" item="range" open="(" separator="," close=")">
|
||||
op.width between #{range.minbb} AND #{range.maxaa}
|
||||
</foreach>
|
||||
|
||||
</if>-->
|
||||
|
||||
</otherwise>
|
||||
|
||||
</choose>
|
||||
|
||||
</where>
|
||||
|
||||
group by p.goods_id,orderId,customOrderId,customer,address,orderStatus,plateNum,plateName,thickness,material,color
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user