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 'main' of ssh://192.168.1.205:9922/cf_devdept2/cf_imes_server
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()) ;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,11 +19,11 @@ public class ESDocument {
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
private String createTime;
|
||||
private Long creator;
|
||||
private String creator;
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
private String updateTime;
|
||||
private Long updater;
|
||||
private String updater;
|
||||
private Long organId;
|
||||
|
||||
}
|
||||
|
||||
+7
-7
@@ -48,8 +48,8 @@ public class ESDocumentServiceImpl implements ESDocumentService {
|
||||
public <T> IndexResponse createByFluentDSL(String idxName, String idxId, ESDocument document) throws Exception {
|
||||
Date date = new Date();
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
document.setCreator(loginUser.getId());
|
||||
document.setUpdater(loginUser.getId());
|
||||
document.setCreator(loginUser.getNickname());
|
||||
document.setUpdater(loginUser.getNickname());
|
||||
document.setOrganId(loginUser.getOrganId());
|
||||
document.setCreateTime(simpleDateFormat.format(date));
|
||||
document.setUpdateTime(simpleDateFormat.format(date));
|
||||
@@ -73,8 +73,8 @@ public class ESDocumentServiceImpl implements ESDocumentService {
|
||||
public <T> IndexResponse createByBuilderPattern(String idxName, String idxId, ESDocument document) throws Exception {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
Date date = new Date();
|
||||
document.setCreator(loginUser.getId());
|
||||
document.setUpdater(loginUser.getId());
|
||||
document.setCreator(loginUser.getNickname());
|
||||
document.setUpdater(loginUser.getNickname());
|
||||
document.setOrganId(loginUser.getOrganId());
|
||||
document.setCreateTime(simpleDateFormat.format(date));
|
||||
document.setUpdateTime(simpleDateFormat.format(date));
|
||||
@@ -142,14 +142,14 @@ public class ESDocumentServiceImpl implements ESDocumentService {
|
||||
if (StrUtil.isBlank(esDocument.getId())) {
|
||||
esDocument.setId(snowflake.nextIdStr());
|
||||
}
|
||||
esDocument.setCreator(loginUser.getId());
|
||||
esDocument.setCreator(loginUser.getNickname());
|
||||
esDocument.setCreateTime(simpleDateFormat.format(date));
|
||||
esDocument.setUpdater(loginUser.getId());
|
||||
esDocument.setUpdater(loginUser.getNickname());
|
||||
|
||||
esDocument.setUpdateTime(simpleDateFormat.format(date));
|
||||
br.operations(op -> op.index(idx -> idx
|
||||
.index(idxName)
|
||||
.id(esDocument.getId().toString())
|
||||
.id(esDocument.getId())
|
||||
.document(esDocument)));
|
||||
});
|
||||
return elasticsearchClient.bulk(br.build());
|
||||
|
||||
+5
-4
@@ -32,7 +32,7 @@ public class DefaultDBFieldHandler implements MetaObjectHandler {
|
||||
baseDO.setUpdateTime(current);
|
||||
}
|
||||
|
||||
Long userId = WebFrameworkUtils.getLoginUserId();
|
||||
//Long userId = WebFrameworkUtils.getLoginUserId();
|
||||
String loginUserName = WebFrameworkUtils.getLoginUserName();
|
||||
// 当前登录用户不为空,创建人为空,则当前登录用户为创建人
|
||||
if (Objects.nonNull(loginUserName) && Objects.isNull(baseDO.getCreator())) {
|
||||
@@ -55,9 +55,10 @@ public class DefaultDBFieldHandler implements MetaObjectHandler {
|
||||
|
||||
// 当前登录用户不为空,更新人为空,则当前登录用户为更新人
|
||||
Object modifier = getFieldValByName("updater", metaObject);
|
||||
Long userId = WebFrameworkUtils.getLoginUserId();
|
||||
if (Objects.nonNull(userId) && Objects.isNull(modifier)) {
|
||||
setFieldValByName("updater", userId.toString(), metaObject);
|
||||
//Long userId = WebFrameworkUtils.getLoginUserId();
|
||||
String loginUserName = WebFrameworkUtils.getLoginUserName();
|
||||
if (Objects.nonNull(loginUserName) && Objects.isNull(modifier)) {
|
||||
setFieldValByName("updater", loginUserName, metaObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -19,6 +19,8 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.security.web.AuthenticationEntryPoint;
|
||||
import org.springframework.security.web.access.AccessDeniedHandler;
|
||||
import org.springframework.security.web.firewall.DefaultHttpFirewall;
|
||||
import org.springframework.security.web.firewall.HttpFirewall;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@@ -100,4 +102,10 @@ public class ChenfengSecurityAutoConfiguration {
|
||||
return methodInvokingFactoryBean;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public HttpFirewall httpFirewall() {
|
||||
return new DefaultHttpFirewall();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+7
-4
@@ -23,6 +23,8 @@ import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* Token 过滤器,验证 token 的有效性
|
||||
@@ -92,10 +94,10 @@ public class TokenAuthenticationFilter extends OncePerRequestFilter {
|
||||
&& ObjectUtil.notEqual(accessToken.getUserType(), userType)) {
|
||||
throw new AccessDeniedException("错误的用户类型");
|
||||
}
|
||||
CommonResult<Boolean> superAdmin = permissionApi.hasAnyRoles(accessToken.getUserId(), "super_admin");
|
||||
//CommonResult<Boolean> superAdmin = permissionApi.hasAnyRoles(accessToken.getUserId(), "super_admin");
|
||||
// 构建登录用户
|
||||
return new LoginUser().setId(accessToken.getUserId()).setUserType(accessToken.getUserType())
|
||||
.setOrganId(accessToken.getOrganId()).setScopes(accessToken.getScopes()).setIsSupAdmin(superAdmin.getCheckedData())
|
||||
.setOrganId(accessToken.getOrganId()).setScopes(accessToken.getScopes()).setIsSupAdmin(accessToken.getIsSupAdmin())
|
||||
.setLarge(accessToken.getLarge()).setDbNo(accessToken.getDbNo()).setTableNo(accessToken.getTableNo());
|
||||
} catch (ServiceException serviceException) {
|
||||
// 校验 Token 不通过时,考虑到一些接口是无需登录的,所以直接返回 null 即可
|
||||
@@ -131,8 +133,9 @@ public class TokenAuthenticationFilter extends OncePerRequestFilter {
|
||||
String loginUserStr = request.getHeader(SecurityFrameworkUtils.LOGIN_USER_HEADER);
|
||||
if(StrUtil.isNotEmpty(loginUserStr)) {
|
||||
LoginUser loginUser = JsonUtils.parseObject(loginUserStr, LoginUser.class);
|
||||
CommonResult<Boolean> superAdmin = permissionApi.hasAnyRoles(loginUser.getId(), "super_admin");
|
||||
loginUser.setIsSupAdmin(superAdmin.getCheckedData());
|
||||
//CommonResult<Boolean> superAdmin = permissionApi.hasAnyRoles(loginUser.getId(), "super_admin");
|
||||
//loginUser.setIsSupAdmin(superAdmin.getCheckedData());
|
||||
loginUser.setNickname(URLDecoder.decode(loginUser.getNickname(),StandardCharsets.UTF_8));
|
||||
return loginUser;
|
||||
}
|
||||
return null;
|
||||
|
||||
+10
@@ -41,6 +41,16 @@ public interface SecurityFrameworkService {
|
||||
*/
|
||||
boolean hasAnyRoles(String... roles);
|
||||
|
||||
|
||||
/**
|
||||
* 判断是否有角色,任一一个即可
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param roles 角色数组
|
||||
* @return 是否
|
||||
*/
|
||||
boolean hasAnyRoles(Long userId, String... roles);
|
||||
|
||||
/**
|
||||
* 判断是否有授权
|
||||
*
|
||||
|
||||
+6
@@ -76,6 +76,12 @@ public class SecurityFrameworkServiceImpl implements SecurityFrameworkService {
|
||||
return hasAnyRolesCache.get(new KeyValue<>(SecurityFrameworkUtils.getLoginUserId(), Arrays.asList(roles)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SneakyThrows
|
||||
public boolean hasAnyRoles(Long userId, String... roles) {
|
||||
return hasAnyRolesCache.get(new KeyValue<>(userId, Arrays.asList(roles)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasScope(String scope) {
|
||||
return hasAnyScopes(scope);
|
||||
|
||||
+12
-2
@@ -2,24 +2,31 @@ package com.cf.imes.framework.web.core.filter;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||
import com.cf.imes.framework.common.exception.enums.GlobalErrorCodeConstants;
|
||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||
import com.cf.imes.framework.common.util.servlet.ServletUtils;
|
||||
import com.cf.imes.framework.web.config.WebProperties;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.filter.OncePerRequestFilter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import static com.cf.imes.framework.common.exception.enums.GlobalErrorCodeConstants.DATA_SOURCE_CODE_NOT_FOUND;
|
||||
|
||||
/**
|
||||
* @author there
|
||||
* 多数据源过滤器
|
||||
*/
|
||||
@Slf4j
|
||||
public class DataSourceFilter extends OncePerRequestFilter {
|
||||
//数据源编码
|
||||
private static final String DATA_SOURCE_CODE = "data-code";
|
||||
/**
|
||||
* HEADER 认证头 value 的前缀
|
||||
*/
|
||||
public static final String AUTHORIZATION_BEARER = "Bearer";
|
||||
|
||||
|
||||
private WebProperties webProperties;
|
||||
|
||||
@@ -38,11 +45,14 @@ public class DataSourceFilter extends OncePerRequestFilter {
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
|
||||
String dataCode = request.getHeader(DATA_SOURCE_CODE);
|
||||
if(StrUtil.isEmpty(dataCode)) {
|
||||
ServletUtils.writeJSON(response, CommonResult.error(DATA_SOURCE_CODE_NOT_FOUND));
|
||||
ServletUtils.writeJSON(response, CommonResult.error(GlobalErrorCodeConstants.UNAUTHORIZED.getCode(), "访问令牌已过期"));
|
||||
log.info("Let the user log in because there is no data-code! requestURI==>{}", request.getRequestURI());
|
||||
return;
|
||||
}
|
||||
DynamicDataSourceContextHolder.push(dataCode);
|
||||
filterChain.doFilter(request, response);
|
||||
DynamicDataSourceContextHolder.clear();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -50,5 +50,9 @@ public class LoginUser {
|
||||
* 用户nic
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 是否超级管理员
|
||||
*/
|
||||
private Boolean isSupAdmin;
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -22,6 +22,9 @@ import org.springframework.web.reactive.function.client.WebClient;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -171,7 +174,8 @@ public class TokenAuthenticationFilter implements GlobalFilter, Ordered {
|
||||
return new LoginUser().setId(tokenInfo.getUserId()).setUserType(tokenInfo.getUserType())
|
||||
.setOrganId(tokenInfo.getOrganId()).setScopes(tokenInfo.getScopes())
|
||||
.setLarge(tokenInfo.getLarge()).setDbNo(tokenInfo.getDbNo()).setTableNo(tokenInfo.getTableNo())
|
||||
.setDataCode(tokenInfo.getDataCode()).setNickname(tokenInfo.getNickname());
|
||||
.setDataCode(tokenInfo.getDataCode()).setIsSupAdmin(tokenInfo.getIsSupAdmin())
|
||||
.setNickname(URLEncoder.encode(tokenInfo.getNickname(), StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+10
-1
@@ -1,5 +1,8 @@
|
||||
package com.cf.imes.module.executor.controller.admin.plan;
|
||||
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderPageReqVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderRespVO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
||||
import com.cf.imes.module.executor.service.order.OrderInputProcessor;
|
||||
import com.cf.imes.module.executor.util.RandomUtils;
|
||||
import com.cf.imes.module.executor.util.deviseData.Detail;
|
||||
@@ -85,12 +88,18 @@ public class PlanController {
|
||||
|
||||
@GetMapping("getPlateByPlanId")
|
||||
@Operation(summary = "根据排单id获取板材列表")
|
||||
@Parameter(name = "id", description = "排单id", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('executor:plan:query')")
|
||||
public CommonResult<List<PlateResList>> getPlateByPlanId(@Valid GetPlateByPlanIdVO vo) {
|
||||
return success(planService.getPlateByPlanId(vo));
|
||||
}
|
||||
|
||||
@GetMapping("getOrderByPlan")
|
||||
@Operation(summary = "根据排单获取生产单分页")
|
||||
@PreAuthorize("@ss.hasPermission('executor:plan:query')")
|
||||
public CommonResult<PageResult<OrderRespVO>> getOrderByPlanId(@Valid PlanOrderPageReqVO pageReqVO) {
|
||||
return success(planService.getOrderByPlanId(pageReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得排单分页")
|
||||
@PreAuthorize("@ss.hasPermission('executor:plan:query')")
|
||||
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package com.cf.imes.module.executor.controller.admin.plan.vo;
|
||||
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* @author Beal
|
||||
*/
|
||||
@Data
|
||||
public class PlanOrderPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "排单id")
|
||||
@NotNull(message = "排单id不能空")
|
||||
private Long planId;
|
||||
|
||||
/*@Schema(description = "交付日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] deliveryDate;
|
||||
|
||||
@Schema(description = "生产单类型,1主单 2子单", example = "1")
|
||||
private Boolean type;
|
||||
|
||||
@Schema(description = "生产单排序号")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "CAD数据类型,1CAD 2WebCAD 3Excel", example = "1")
|
||||
private Integer dataType;
|
||||
|
||||
@Schema(description = "订单状态,0未排单1已排单2生产中3加工完成4打包完成5入库完成6出库完成", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "自定义单号")
|
||||
private String customOrderNo;
|
||||
|
||||
@Schema(description = "客户")
|
||||
private String customer;
|
||||
|
||||
@Schema(description = "客户地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "客户电话")
|
||||
private String phoneNumber;
|
||||
|
||||
@Schema(description = "经销商")
|
||||
private String dealer;
|
||||
|
||||
@Schema(description = "经销商电话")
|
||||
private String dealerPhoneNumber;
|
||||
|
||||
@Schema(description = "业务员")
|
||||
private String salesman;
|
||||
|
||||
@Schema(description = "拆单员")
|
||||
private String splitter;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;*/
|
||||
|
||||
}
|
||||
+3
@@ -40,6 +40,9 @@ public class PlanPageReqVO extends PageParam {
|
||||
@Schema(description = "生产单号")
|
||||
private String orderNos;
|
||||
|
||||
@Schema(description = "生产单客户")
|
||||
private String customer;
|
||||
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
private String remark;
|
||||
|
||||
+4
@@ -60,6 +60,10 @@ public class PlanRespVO {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
@ExcelProperty("创建人")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
+3
@@ -34,6 +34,9 @@ public class PlateInfoVO {
|
||||
@Schema(description = "面积")
|
||||
private BigDecimal area;
|
||||
|
||||
@Schema(description = "颜色")
|
||||
private String color;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private Integer count;
|
||||
|
||||
|
||||
+29
@@ -2,10 +2,15 @@ package com.cf.imes.module.executor.dal.mysql.plan;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.orderItem.OrderItemDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.plan.PlanDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.planitem.PlanItemDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.cf.imes.module.executor.controller.admin.plan.vo.*;
|
||||
|
||||
@@ -18,6 +23,29 @@ import com.cf.imes.module.executor.controller.admin.plan.vo.*;
|
||||
public interface PlanMapper extends BaseMapperX<PlanDO> {
|
||||
|
||||
default PageResult<PlanDO> selectPage(PlanPageReqVO reqVO) {
|
||||
if(StrUtil.isNotBlank(reqVO.getCustomer())) {
|
||||
return selectJoinPage(reqVO, PlanDO.class, new MPJLambdaWrapperX<PlanDO>()
|
||||
.eqIfPresent(PlanDO::getPlanNo, reqVO.getPlanNo())
|
||||
.eqIfPresent(PlanDO::getSort, reqVO.getSort())
|
||||
.eqIfPresent(PlanDO::getType, reqVO.getType())
|
||||
.eqIfPresent(PlanDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(PlanDO::getIsPay, reqVO.getIsPay())
|
||||
.eqIfPresent(PlanDO::getMachineId, reqVO.getMachineId())
|
||||
.betweenIfPresent(PlanDO::getPlanTime, reqVO.getPlanTime())
|
||||
.eqIfPresent(PlanDO::getOrderNos, reqVO.getOrderNos())
|
||||
.eqIfPresent(PlanDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(PlanDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(PlanDO::getOperator, reqVO.getOperator())
|
||||
.betweenIfPresent(PlanDO::getProduceTime, reqVO.getProduceTime())
|
||||
.leftJoin(PlanItemDO.class, PlanItemDO::getPlanId, PlanDO::getId)
|
||||
.leftJoin(OrderItemDO.class, OrderItemDO::getId, PlanItemDO::getItemId)
|
||||
.leftJoin(OrderDO.class, OrderDO::getId, OrderItemDO::getOrderId)
|
||||
.like(OrderDO::getCustomer, reqVO.getCustomer())
|
||||
.orderByAsc(PlanDO::getSort)
|
||||
.orderByDesc(PlanDO::getId)
|
||||
);
|
||||
}
|
||||
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<PlanDO>()
|
||||
.eqIfPresent(PlanDO::getPlanNo, reqVO.getPlanNo())
|
||||
.eqIfPresent(PlanDO::getSort, reqVO.getSort())
|
||||
@@ -31,6 +59,7 @@ public interface PlanMapper extends BaseMapperX<PlanDO> {
|
||||
.betweenIfPresent(PlanDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(PlanDO::getOperator, reqVO.getOperator())
|
||||
.betweenIfPresent(PlanDO::getProduceTime, reqVO.getProduceTime())
|
||||
.orderByAsc(PlanDO::getSort)
|
||||
.orderByDesc(PlanDO::getId));
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -2,8 +2,11 @@ package com.cf.imes.module.executor.service.plan;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.plan.vo.*;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
||||
|
||||
/**
|
||||
* 生产单开料排单 Service 接口
|
||||
@@ -59,4 +62,6 @@ public interface PlanService {
|
||||
Boolean cancellation(Long id);
|
||||
|
||||
List<PlateResList> getPlateByPlanId(GetPlateByPlanIdVO vo);
|
||||
|
||||
PageResult<OrderRespVO> getOrderByPlanId(PlanOrderPageReqVO pageReqVO);
|
||||
}
|
||||
+14
-1
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.QueryWrapperX;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderRespVO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.goods.GoodsDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.orderBody.OrderBodyDO;
|
||||
@@ -225,6 +226,7 @@ public class PlanServiceImpl implements PlanService {
|
||||
.width(p.getWidth())
|
||||
.height(p.getHeight())
|
||||
.thickness(p.getThickness())
|
||||
.color(p.getColor())
|
||||
.area(p.getHeight().multiply(p.getWidth()).setScale(2, RoundingMode.HALF_UP))
|
||||
.count(plateDOS.stream().filter(f -> Objects.equals(f.getGoodsId(), p.getGoodsId())).collect(Collectors.toSet()).size())
|
||||
.build())
|
||||
@@ -338,7 +340,7 @@ public class PlanServiceImpl implements PlanService {
|
||||
List<PlateResList> list = plateMapper.selectPlateByPlanId(queryWrapperX);
|
||||
Set<Long> bodyIds = list.stream().map(PlateResList::getBodyId).collect(Collectors.toSet());
|
||||
Set<Long> roomIds = list.stream().map(PlateResList::getRoomId).collect(Collectors.toSet());
|
||||
if(CollectionUtil.isNotEmpty(bodyIds)) {
|
||||
if (CollectionUtil.isNotEmpty(bodyIds)) {
|
||||
List<OrderBodyDO> orderBodyDOS = orderBodyMapper.selectBatchIds(bodyIds);
|
||||
for (PlateResList resList : list) {
|
||||
resList.setBodyName(orderBodyDOS.stream().filter(e -> Objects.equals(e.getId(), resList.getBodyId())).map(OrderBodyDO::getName).findAny().orElse(null));
|
||||
@@ -356,4 +358,15 @@ public class PlanServiceImpl implements PlanService {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<OrderRespVO> getOrderByPlanId(PlanOrderPageReqVO pageReqVO) {
|
||||
MPJLambdaWrapperX<OrderDO> lambdaWrapperX = new MPJLambdaWrapperX<>();
|
||||
lambdaWrapperX.leftJoin(OrderItemDO.class, OrderItemDO::getOrderId, OrderDO::getId)
|
||||
.leftJoin(PlanItemDO.class, PlanItemDO::getItemId, OrderItemDO::getId)
|
||||
.eq(PlanItemDO::getPlanId, pageReqVO.getPlanId());
|
||||
|
||||
PageResult<OrderDO> pageResult = orderMapper.selectJoinPage(pageReqVO, OrderDO.class, lambdaWrapperX);
|
||||
return BeanUtils.toBean(pageResult, OrderRespVO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+2
-1
@@ -7,7 +7,8 @@
|
||||
c.goods_name, c.material, c.color, c.goods_id
|
||||
from order_plate a
|
||||
LEFT JOIN order_plan_item p on a.id = p.item_id
|
||||
LEFT JOIN `order` b on a.order_id = b.id
|
||||
LEFT JOIN order_item oi on p.item_id = oi.id
|
||||
LEFT JOIN `order` b on oi.order_id = b.id
|
||||
LEFT JOIN order_goods c on a.order_id = c.order_id
|
||||
<where>
|
||||
p.id is null
|
||||
|
||||
@@ -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("测试测试");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
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.getData());
|
||||
|
||||
String gzipFile = sourceFile+".zip";
|
||||
|
||||
// 压缩语音文件
|
||||
voiceService.zipFiles(sourceFile, gzipFile);
|
||||
|
||||
// 删除生成的 mp3 文件
|
||||
voiceService.deleteFiles(sourceFile);
|
||||
|
||||
return CommonResult.success(gzipFile);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
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 data;
|
||||
|
||||
}
|
||||
+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);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user