mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
语音播报,动态配置,定时任务,工序代码修改
This commit is contained in:
@@ -173,12 +173,16 @@
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||
<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>
|
||||
|
||||
|
||||
+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;
|
||||
|
||||
|
||||
}
|
||||
+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;*/
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+4
-3
@@ -87,11 +87,11 @@ public class ProductionProcessController {
|
||||
|
||||
@GetMapping("/selectPlateName")
|
||||
@Operation(summary = "查看板材信息的组合名称")
|
||||
@Parameter(name = "processStepId", description = "工序步骤ID", required = true, example = "1")
|
||||
@Parameter(name = "stepItemId", description = "工序明细ID", required = true, example = "1")
|
||||
@PreAuthorize("@ss.hasPermission('manage:process:query')")
|
||||
public CommonResult<List<OrderModuleVO>> selectPlateName(@Valid @RequestParam("processStepId") Long processStepId){
|
||||
public CommonResult<List<OrderModuleVO>> selectPlateName(@Valid @RequestParam("stepItemId") Long stepItemId){
|
||||
|
||||
return success(productionProcessService.selectPlateName(processStepId));
|
||||
return success(productionProcessService.selectPlateName(stepItemId));
|
||||
|
||||
}
|
||||
|
||||
@@ -106,4 +106,5 @@ public class ProductionProcessController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+8
@@ -13,7 +13,15 @@ public class OrderModuleVO {
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
+4
@@ -17,4 +17,8 @@ public class PlatePageVO extends PageParam {
|
||||
private Long bodyId ;
|
||||
|
||||
|
||||
@Schema(description = "加工组 id")
|
||||
private Long groupId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+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;
|
||||
}
|
||||
+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;
|
||||
|
||||
|
||||
}
|
||||
+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> {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
-3
@@ -19,9 +19,6 @@ import java.util.List;
|
||||
public interface ProcessStepItemMapper extends BaseMapperX<OrderProcessStepItemNDO> {
|
||||
|
||||
|
||||
List<ProcessRespVO> selectOrder(ProcessPageReqVO pageReqVO);
|
||||
|
||||
|
||||
List<OrderModuleVO> selectPlateName(Long processStepId);
|
||||
|
||||
|
||||
|
||||
+9
@@ -5,6 +5,8 @@ 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;
|
||||
@@ -30,6 +32,11 @@ public interface ProcessStepMapper extends BaseMapperX<OrderProcessStepNDO> {
|
||||
}
|
||||
|
||||
|
||||
List<ProcessRespVO> selectOrder(ProcessPageReqVO pageReqVO);
|
||||
|
||||
|
||||
|
||||
|
||||
void updateStatusById(@Param("id") Long id, @Param("status") Boolean status);
|
||||
|
||||
default List<OrderProcessStepNDO> selectProducitonList(Long orderNo) {
|
||||
@@ -49,4 +56,6 @@ public interface ProcessStepMapper extends BaseMapperX<OrderProcessStepNDO> {
|
||||
|
||||
List<PriceRateReqVO> selectSalaryList(PriceRatePageReqVO pageReqVO);
|
||||
|
||||
|
||||
|
||||
}
|
||||
+1
-13
@@ -11,6 +11,7 @@ import com.cf.imes.module.manage.controller.admin.patching.vo.PatchingPlateRespV
|
||||
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;
|
||||
|
||||
@@ -23,19 +24,6 @@ import java.util.List;
|
||||
public interface ProductionProcessMapper extends BaseMapperX<OrderDO> {
|
||||
|
||||
|
||||
|
||||
default PageResult<OrderDO> selectPage(ProcessPageReqVO 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())
|
||||
.orderByDesc(OrderDO::getId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
default PageResult<OrderDO> selectPageList(OrderPageReqVO pageReqVO) {
|
||||
return selectPage(pageReqVO, new LambdaQueryWrapperX<OrderDO>()
|
||||
.eqIfPresent(OrderDO::getId,pageReqVO.getOrderNo())
|
||||
|
||||
+2
-1
@@ -10,6 +10,7 @@ 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;
|
||||
@@ -27,7 +28,7 @@ public interface OrderItemMapper extends BaseMapperX<OrderItemDO> {
|
||||
List<OrderModuleVO> selectCombinationName(Long orderNo);
|
||||
|
||||
|
||||
List<OrderPlateRespVO> selectPlateList(Long bodyId);
|
||||
List<OrderPlateRespVO> selectPlateList(PlatePageVO pageReqVO);
|
||||
|
||||
|
||||
List<PlateDetailsRespVO> selectOrderPlateList(Long orderNo);
|
||||
|
||||
-1
@@ -25,7 +25,6 @@ public interface ProductionStatusMapper extends BaseMapperX<OrderDO> {
|
||||
.eqIfPresent(OrderDO::getCustomOrderNo, pageReqVO.getCustomOrderNo())
|
||||
.likeIfPresent(OrderDO::getCustomer, pageReqVO.getCustomer())
|
||||
.likeIfPresent(OrderDO::getAddress, pageReqVO.getAddress())
|
||||
.likeIfPresent(OrderDO::getDeleted, pageReqVO.getDealer())
|
||||
.and(wrapper -> {
|
||||
for (Long status : pageReqVO.getStatusList()) {
|
||||
wrapper.or().eq(OrderDO::getStatus, status);
|
||||
|
||||
+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();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+1
-1
@@ -31,7 +31,7 @@ public interface ProductionProcessService {
|
||||
|
||||
|
||||
// 查看板材信息的组合名称
|
||||
List<OrderModuleVO> selectPlateName(Long processStepId);
|
||||
List<OrderModuleVO> selectPlateName(Long stepItemId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+27
-27
@@ -4,6 +4,7 @@ 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;
|
||||
@@ -51,9 +52,8 @@ public class ProductionProcessServiceImpl implements ProductionProcessService {
|
||||
@Override
|
||||
public PageResult<ProcessRespVO> getProcessPage(ProcessPageReqVO pageReqVO) {
|
||||
|
||||
|
||||
PageHelper.startPage(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||
List<ProcessRespVO> processRespVOS = processStepItemMapper.selectOrder(pageReqVO);
|
||||
List<ProcessRespVO> processRespVOS = processStepMapper.selectOrder(pageReqVO);
|
||||
|
||||
// 判断生产步骤表在传入的状态查询后是否为空
|
||||
if(processRespVOS.isEmpty()){
|
||||
@@ -93,6 +93,7 @@ public class ProductionProcessServiceImpl implements ProductionProcessService {
|
||||
|
||||
|
||||
|
||||
|
||||
// 修改工序明细表的工序状态
|
||||
@Override
|
||||
public void updateProcessStatus(Long id) {
|
||||
@@ -118,26 +119,14 @@ public class ProductionProcessServiceImpl implements ProductionProcessService {
|
||||
processStepItemMapper.updateById(orderProcessStepItemNDO);
|
||||
|
||||
|
||||
// 判断生产单工序表的工序状态是否还有未加工
|
||||
// 获取当前工序 id 下的所有生产单工序步骤表
|
||||
// List<OrderProcessStepNDO> stepItemList = processStepMapper.getStepItemList(orderProcessStepNDO.getOrderNo(), ProcessingStatusEnum.RAW.getStatus());
|
||||
|
||||
// 集合剩余 1 ,代表当前工序步骤已全部加工,修改生产单工序表的状态为已加工
|
||||
/* if (stepItemList.size() == 1) {
|
||||
orderProcessMapper.updateStatusById(orderProcessStepNDO.getOrderProcessId(), ProcessingStatusEnum.PROCESSED.getStatus());
|
||||
return;
|
||||
}
|
||||
|
||||
// 遍历生产单工序步骤表,判断是否还有未加工的工序步骤
|
||||
for (OrderProcessStepNDO processStepNDO : stepItemList) {
|
||||
if (processStepNDO.getStatus().equals(ProcessingStatusEnum.RAW.getStatus())) {
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 修改生产步骤表的工序状态
|
||||
@Override
|
||||
public void updateAllProcessStatus(OrderProStepReqVO reqVO) {
|
||||
@@ -163,24 +152,35 @@ public class ProductionProcessServiceImpl implements ProductionProcessService {
|
||||
processStepItemMapper.updateStatus(reqVO);
|
||||
|
||||
|
||||
// 查询当前工序步骤表的工序状态是否还有未加工
|
||||
List<OrderProcessStepNDO> orderProcessStepNDOS = processStepMapper.selectStepList(reqVO, ProcessingStatusEnum.RAW.getStatus());
|
||||
// 如果为空,修改工序表的加工状态为已加工
|
||||
if(orderProcessStepNDOS.isEmpty()){
|
||||
orderProcessMapper.updateStatusById(orderProcessStepNDO.getOrderProcessId(),ProcessingStatusEnum.PROCESSED.getStatus());
|
||||
}
|
||||
/* // 查询当前工序步骤表的工序状态是否还有未加工
|
||||
List<OrderProcessStepNDO> orderProcessStepNDOS = processStepMapper.selectStepList(reqVO, ProcessingStatusEnum.RAW.getStatus());*/
|
||||
|
||||
|
||||
// 修改工序表的加工状态为已加工
|
||||
orderProcessMapper.updateStatusById(orderProcessStepNDO.getOrderProcessId(),ProcessingStatusEnum.PROCESSED.getStatus());
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 查看板材信息的组合名称
|
||||
@Override
|
||||
public List<OrderModuleVO> selectPlateName(Long processStepId) {
|
||||
public List<OrderModuleVO> selectPlateName(Long stepItemId) {
|
||||
|
||||
return processStepItemMapper.selectPlateName(processStepId);
|
||||
|
||||
List<OrderModuleVO> orderModuleVOS = processStepItemMapper.selectPlateName(stepItemId);
|
||||
|
||||
for (OrderModuleVO orderModuleVO : orderModuleVOS) {
|
||||
if(orderModuleVO.getGroupName().isEmpty()){
|
||||
return orderModuleVOS;
|
||||
}
|
||||
|
||||
// 修改组合名称为加工组的名称
|
||||
orderModuleVO.setName(orderModuleVO.getGroupName());
|
||||
}
|
||||
|
||||
return orderModuleVOS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -103,8 +103,9 @@ public class ProductionStatusServiceImpl implements ProductionStatusService {
|
||||
@Override
|
||||
public PageResult<OrderPlateRespVO> getOrderPlatePage(PlatePageVO pageReqVO) {
|
||||
|
||||
|
||||
PageHelper.startPage(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||
List<OrderPlateRespVO> orderPlateRespVOS = orderItemMapper.selectPlateList(pageReqVO.getBodyId());
|
||||
List<OrderPlateRespVO> orderPlateRespVOS = orderItemMapper.selectPlateList(pageReqVO);
|
||||
PageInfo<OrderPlateRespVO> pageInfo = new PageInfo<>(orderPlateRespVOS);
|
||||
PageResult<OrderPlateRespVO> priceRateReqVOPageResult = PageHelperUtil.convertToPageResult(pageInfo);
|
||||
|
||||
|
||||
+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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+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("定时任务测试");
|
||||
|
||||
}
|
||||
}
|
||||
+21
-24
@@ -8,10 +8,9 @@
|
||||
|
||||
<resultMap id="PlateDetailMap" type="com.cf.imes.module.manage.controller.admin.patching.vo.PatchingDetailRespVO">
|
||||
|
||||
<result property="orderId" column="orderId"/>
|
||||
<result property="cabinetName" column="cabinetName"/>
|
||||
<result property="plateNo" column="plateNo"/>
|
||||
<result property="name" column="plateName"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="height" column="height"/>
|
||||
<result property="width" column="width"/>
|
||||
<result property="thickness" column="thickness"/>
|
||||
@@ -23,7 +22,7 @@
|
||||
<result property="specialShaped" column="specialShaped"/>
|
||||
<result property="profiling" column="profiling"/>
|
||||
<result property="rowHole" column="rowHole"/>
|
||||
<result property="plateCombinationName" column="name"/>
|
||||
<result property="plateCombinationName" column="plateCombinationName"/>
|
||||
<result property="material" column="material"/>
|
||||
<result property="color" column="color"/>
|
||||
</resultMap>
|
||||
@@ -36,7 +35,7 @@
|
||||
o.id as orderId,
|
||||
ob.name as cabinetName,
|
||||
op.id as plateNo,
|
||||
op.name as plateName,
|
||||
op.name as name,
|
||||
op.height as height,
|
||||
op.width as width,
|
||||
op.thickness as thickness,
|
||||
@@ -47,11 +46,11 @@
|
||||
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 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,
|
||||
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 name,
|
||||
TRIM(TRAILING '.' from TRIM(TRAILING '0' FROM p.thickness)),'mm-',p.material,'-',p.color) AS plateCombinationName,
|
||||
|
||||
p.material as material,
|
||||
p.color as color
|
||||
@@ -95,24 +94,28 @@
|
||||
resultMap="PlateDetailMap">
|
||||
|
||||
select
|
||||
o.id as orderId,
|
||||
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.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,
|
||||
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 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,
|
||||
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 name,
|
||||
TRIM(TRAILING '.' from TRIM(TRAILING '0' FROM p.thickness)),'mm-',p.material,'-',p.color) AS plateCombinationName,
|
||||
|
||||
p.material as material,
|
||||
p.color as color
|
||||
@@ -129,18 +132,9 @@
|
||||
|
||||
|
||||
|
||||
<resultMap id="OtherPlateMap" type="com.cf.imes.module.manage.controller.admin.patching.vo.PatchingDetailRespVO">
|
||||
|
||||
<result property="roomName" column="roomName"/>
|
||||
<result property="roomId" column="roomId"/>
|
||||
<result property="cabinetName" column="cabinetName"/>
|
||||
<result property="bodyId" column="bodyId"/>
|
||||
<result property="material" column="material"/>
|
||||
<result property="color" column="color"/>
|
||||
|
||||
</resultMap>
|
||||
<select id="selectOtherPlateList"
|
||||
resultMap="OtherPlateMap"
|
||||
resultMap="PlateDetailMap"
|
||||
parameterType="java.lang.Long">
|
||||
|
||||
|
||||
@@ -150,7 +144,10 @@
|
||||
ob.room_name as roomName,
|
||||
ob.name as cabinetName,
|
||||
p.material as material,
|
||||
p.color as color
|
||||
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
|
||||
|
||||
+5
-51
@@ -8,62 +8,16 @@
|
||||
parameterType="java.lang.Long">
|
||||
|
||||
|
||||
select CONCAT(ob.room_name,'_',ob.name) as name ,ob.id as bodyId
|
||||
from order_process_step_item_n opsn join order_body ob on opsn.body_id = ob.id where opsn.process_step_id = #{processStepId};
|
||||
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="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 = #{customer}
|
||||
</if>
|
||||
<if test="address != null">
|
||||
and o.address = #{address}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<resultMap id="ItemMap" type="com.cf.imes.module.manage.controller.admin.process.vo.OrderProcessStepItemVO">
|
||||
<result property="id" column="id"/>
|
||||
|
||||
+53
-1
@@ -13,6 +13,58 @@
|
||||
|
||||
|
||||
|
||||
<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"/>
|
||||
@@ -55,7 +107,7 @@
|
||||
</if>
|
||||
</where>
|
||||
and ops.status = true
|
||||
/**/
|
||||
|
||||
group by name,piece_rate,piece_type,creator;
|
||||
|
||||
|
||||
|
||||
+116
-24
@@ -26,7 +26,7 @@
|
||||
|
||||
select
|
||||
|
||||
oi.body_id as groupId,
|
||||
p.goods_id,
|
||||
o.id as orderId,
|
||||
o.custom_order_no as customOrderId,
|
||||
o.customer as customer,
|
||||
@@ -47,33 +47,125 @@
|
||||
join order_plate op on oi.plate_id = op.id
|
||||
join plate p on op.goods_id = p.goods_id
|
||||
|
||||
|
||||
<where>
|
||||
<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>
|
||||
<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 groupId,orderId,customOrderId,customer,address,orderStatus,plateNum,plateName,thickness,material,color
|
||||
group by p.goods_id,orderId,customOrderId,customer,address,orderStatus,plateNum,plateName,thickness,material,color
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
+13
-3
@@ -80,7 +80,7 @@
|
||||
</resultMap>
|
||||
<select id="selectPlateList"
|
||||
resultMap="PlateMap"
|
||||
parameterType="java.lang.Long">
|
||||
parameterType="com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.PlatePageVO">
|
||||
|
||||
select
|
||||
op.id as palteId,
|
||||
@@ -93,12 +93,22 @@
|
||||
from order_item oi
|
||||
join order_plate op on oi.plate_id = op .id
|
||||
join plate p on op.goods_id = p.goods_id
|
||||
where oi.body_id = #{bodyId}
|
||||
|
||||
<where>
|
||||
<if test="bodyId != null">
|
||||
and oi.body_id = #{bodyId}
|
||||
</if>
|
||||
|
||||
<if test="groupId != null">
|
||||
and oi.group_id = #{groupId}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<!--where oi.body_id = #{bodyId}-->
|
||||
|
||||
|
||||
<resultMap id="PlateDetailsMap" type="com.cf.imes.module.manage.controller.admin.pack.vo.PlateDetailsRespVO">
|
||||
|
||||
Reference in New Issue
Block a user