mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
取消板件自动写入,bug1255,1225
This commit is contained in:
+4
-3
@@ -61,14 +61,15 @@ public class ErrorCodeConstants {
|
||||
public static final ErrorCode ORDER_DATE_ERR = new ErrorCode(1_002_029_008, "获取订单列表,时间超出范围,请在30天范围内选择");
|
||||
public static final ErrorCode ORDER_TIME_ERR = new ErrorCode(1_002_029_009, "获取订单列表,时间格式输入出错,请更换格式");
|
||||
public static final ErrorCode FILE_TYPE_ERR = new ErrorCode(1_002_029_010, "当前文件类型尚未开发,敬请期待");
|
||||
public static final ErrorCode ORDER_DETAIL_DATE_ERR = new ErrorCode(1_002_029_006, "板件生产数据缺失,请确认数据源中是否存在相关数据");
|
||||
public static final ErrorCode ORDER_DETAIL_DATE_ERR = new ErrorCode(1_002_029_011, "板件生产数据缺失,请确认数据源中是否存在相关数据");
|
||||
|
||||
public static final ErrorCode SOURCE_NOT_EXITS_ERROR = new ErrorCode(1_002_029_013, "源数据查询失败");
|
||||
public static final ErrorCode ORDER_DELETED_ERR = new ErrorCode(1_002_029_006, "生产单删除失败");
|
||||
public static final ErrorCode ORDER_RESTORE_ERR = new ErrorCode(1_002_029_006, "生产单还原失败");
|
||||
public static final ErrorCode ORDER_DELETED_ERR = new ErrorCode(1_002_029_014, "生产单删除失败");
|
||||
public static final ErrorCode ORDER_RESTORE_ERR = new ErrorCode(1_002_029_015, "生产单还原失败");
|
||||
public static final ErrorCode LOCK_ERR = new ErrorCode(1_002_030_001, "当前存在导入情况,请稍后");
|
||||
public static final ErrorCode API_MES_ERR = new ErrorCode(1_002_031_001, "MES接口数据出错:{}");
|
||||
public static final ErrorCode CHANGE_DETAILS_ITEM_ERROR = new ErrorCode(1_002_032_001, "明细转换失败");
|
||||
public static final ErrorCode ORDER_MATCH_NOT = new ErrorCode(1_002_033_001, "板材库缺少相关板材,请在板材库中进行添加之后再进行导入");
|
||||
|
||||
// ========== 自定义板编号生成 ==========
|
||||
public static final ErrorCode CUSTOM_PLATENO_GENERATE_ORDERNO_RULE_NOT_SUPPORT_RESETMODE = new ErrorCode(1_002_030_001, "自定义版编号生产单序号规则中存在不支持的复位类型:{}");
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.cf.imes.module.executor.controller.admin.order.vo.type;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.cf.imes.module.executor.controller.admin.orderParts.vo.OrderPartsPrintRespVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 房间-柜体 -- 配件
|
||||
*/
|
||||
@Schema(description = "管理后台 - 房间-柜体 -- 配件 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@Builder
|
||||
public class PartsByRoomBodyRespVO {
|
||||
|
||||
@Schema(description = "房间名称")
|
||||
private String roomName ;
|
||||
|
||||
@Schema(description = "柜体名称")
|
||||
private String bodyName ;
|
||||
|
||||
@Schema(description = "配件集合")
|
||||
private List<OrderPartsPrintRespVO> partsRespVO ;
|
||||
|
||||
@Schema(description = "小计")
|
||||
private Double total ;
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.cf.imes.module.executor.controller.admin.order.vo.type;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.cf.imes.module.executor.controller.admin.plate.vo.PlateGoodsRespVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 板材 -- 小板明细
|
||||
*/
|
||||
@Schema(description = "管理后台 - 板材 -- 小板明细 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@Builder
|
||||
public class PlateByGoodsDetRespVO {
|
||||
|
||||
@Schema(description = "商品编号")
|
||||
private String goodsId ;
|
||||
|
||||
@Schema(description = "板材名称")
|
||||
private String name ;
|
||||
|
||||
@Schema(description = "板材颜色")
|
||||
private String color ;
|
||||
|
||||
@Schema(description = "板材厚度")
|
||||
private BigDecimal thickness;
|
||||
|
||||
@Schema(description = "小计")
|
||||
private Integer number ;
|
||||
|
||||
@Schema(description = "小板集合")
|
||||
private List<PlateGoodsRespVO> plateRespVO ;
|
||||
|
||||
@Schema(description = "小计面积")
|
||||
private BigDecimal totalArea ;
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.cf.imes.module.executor.controller.admin.order.vo.type;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.cf.imes.module.executor.controller.admin.plate.vo.PlateGoodsRespVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 房间-柜体 -- 小板明细
|
||||
*/
|
||||
@Schema(description = "管理后台 - 房间-柜体 -- 小板明细 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@Builder
|
||||
public class PlateByRoomBodyDetRespVO {
|
||||
|
||||
@Schema(description = "房间名称")
|
||||
private String roomName ;
|
||||
|
||||
@Schema(description = "柜体名称")
|
||||
private String bodyName ;
|
||||
|
||||
@Schema(description = "小计")
|
||||
private Integer number ;
|
||||
|
||||
@Schema(description = "小板集合")
|
||||
private List<PlateGoodsRespVO> plateRespVO ;
|
||||
|
||||
@Schema(description = "小计面积")
|
||||
private BigDecimal totalArea ;
|
||||
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package com.cf.imes.module.executor.controller.admin.orderParts.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 总价 -- 配件明细
|
||||
*/
|
||||
@Schema(description = "管理后台 - 总价 -- 配件明细 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@Builder
|
||||
public class OrderPartsPrintRespVO {
|
||||
|
||||
@Schema(description = "配件id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "配件编号")
|
||||
private String goodsId;
|
||||
|
||||
@Schema(description = "配件名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "配件材质")
|
||||
private String material;
|
||||
|
||||
@Schema(description = "配件类型")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "型号")
|
||||
private String model;
|
||||
|
||||
@Schema(description = "规格")
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "品牌")
|
||||
private String brand;
|
||||
|
||||
@Schema(description = "厂家")
|
||||
private String factory;
|
||||
|
||||
@Schema(description = "单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "单价")
|
||||
private Double price;
|
||||
|
||||
@Schema(description = "金额")
|
||||
private Double amount;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private Double num;
|
||||
|
||||
}
|
||||
+7
@@ -202,4 +202,11 @@ public interface GoodsMapper extends BaseMapperX<GoodsDO> {
|
||||
|
||||
List<Long> selectInsertGoodsIds(@Param("orderIds") List<Long> orderIds,@Param("goodsIds") List<Long> goodsIds,@Param("organId") Long organId);
|
||||
|
||||
// 通过orderId查找板材
|
||||
default List<GoodsDO> selectGoodsByOrderId(Long orderId, Long organId, Integer deleted) {
|
||||
return selectList(new LambdaQueryWrapperX<GoodsDO>()
|
||||
.eq(GoodsDO::getOrderId, orderId)
|
||||
.eq(GoodsDO::getDeleted, deleted)
|
||||
.eq(GoodsDO::getOrganId, organId));
|
||||
}
|
||||
}
|
||||
+7
@@ -6,6 +6,7 @@ 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.executor.controller.admin.orderParts.vo.OrderPartsPageReqVO;
|
||||
import com.cf.imes.module.executor.controller.admin.orderParts.vo.OrderPartsPrintRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.orderParts.vo.PartGoodsRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.plan.saveOptimize.PrintOrderPartsRespVO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.orderParts.OrderPartsDO;
|
||||
@@ -104,4 +105,10 @@ public interface OrderPartsMapper extends BaseMapperX<OrderPartsDO> {
|
||||
.select(OrderPartsDO::getId));
|
||||
}
|
||||
|
||||
// 柜体查找配件
|
||||
List<OrderPartsPrintRespVO> selectOrderPartsListByBody(@Param("orderId")Long orderId,
|
||||
@Param("organId")Long organId,
|
||||
@Param("deleted")Integer deleted,
|
||||
@Param("roomId")Long roomId,
|
||||
@Param("bodyId")Long bodyId);
|
||||
}
|
||||
+17
@@ -50,6 +50,23 @@ public interface PlateGoodMapper extends BaseMapperX<PlateGoodDO> {
|
||||
}
|
||||
|
||||
|
||||
default List<PlateGoodDO> selectGood(String material, String color, BigDecimal thickness,
|
||||
String brand, String goodsName, Long organId) {
|
||||
LambdaQueryWrapper<PlateGoodDO> queryWrapper = new LambdaQueryWrapper<PlateGoodDO>()
|
||||
.eq(PlateGoodDO::getGoodsName, goodsName)
|
||||
.eq(PlateGoodDO::getMaterial, material)
|
||||
.eq(PlateGoodDO::getColor, color)
|
||||
.eq(PlateGoodDO::getThickness, thickness)
|
||||
.eq(PlateGoodDO::getDeleted, 0)
|
||||
.eq(PlateGoodDO::getOrganId, organId);
|
||||
if (brand == null) {
|
||||
queryWrapper.eq(PlateGoodDO::getBrand,"");
|
||||
}else {
|
||||
queryWrapper.eq(PlateGoodDO::getBrand, brand);
|
||||
}
|
||||
return selectList(queryWrapper);
|
||||
}
|
||||
|
||||
default PageResult<PlateGoodDO> selectGoodsPage(GoodsPlateFilterPageReqVO pageReqVO, Long organId) {
|
||||
return selectPage(pageReqVO, new LambdaQueryWrapperX<PlateGoodDO>()
|
||||
.eq(PlateGoodDO::getOrganId,organId)
|
||||
|
||||
+14
@@ -281,4 +281,18 @@ public interface PlateMapper extends BaseMapperX<PlateDO> {
|
||||
}
|
||||
|
||||
|
||||
List<PlateGoodsRespVO> selectOrderPlateList(@Param("orderId") Long orderId,
|
||||
@Param("organId") Long organId,
|
||||
@Param("deleted") Integer deleted,
|
||||
@Param("roomId")Long roomId,
|
||||
@Param("bodyId")Long bodyId,
|
||||
@Param("plateId")Long goodsId); // 明细
|
||||
|
||||
List<PlateGoodsRespVO> selectOrderPlateListSummary(@Param("orderId") Long orderId,
|
||||
@Param("organId") Long organId,
|
||||
@Param("deleted") Integer deleted,
|
||||
@Param("roomId")Long roomId,
|
||||
@Param("bodyId")Long bodyId,
|
||||
@Param("plateId")Long goodsId); // 汇总
|
||||
|
||||
}
|
||||
+1
-1
@@ -166,7 +166,7 @@ public class OrderInputProcessor {
|
||||
insertInBatches(plateDOS, 1000, (batch, index) -> plateMapper.insertBatch((Collection<PlateDO>) batch));
|
||||
insertInBatches(itemDOS, 1000, (batch, index) -> orderItemMapper.insertBatch((Collection<OrderItemDO>) batch));
|
||||
insertInBatches(goodsDOS, 1000, (batch, index) -> goodsMapper.insertBatch((Collection<GoodsDO>) batch));
|
||||
insertInBatches(plateGoodDOS, 1000, (batch, index) -> plateGoodMapper.insertBatch((Collection<PlateGoodDO>) batch));
|
||||
// insertInBatches(plateGoodDOS, 1000, (batch, index) -> plateGoodMapper.insertBatch((Collection<PlateGoodDO>) batch));
|
||||
insertInBatches(partsDOS, 1000, (batch, index) -> partsMapper.insertBatch((Collection<PartsDO>) batch));
|
||||
}
|
||||
|
||||
|
||||
+138
-27
File diff suppressed because one or more lines are too long
+25
@@ -220,4 +220,29 @@
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectOrderPartsListByBody" resultType="com.cf.imes.module.executor.controller.admin.orderParts.vo.OrderPartsPrintRespVO">
|
||||
SELECT DISTINCT a.id,
|
||||
a.goods_id,
|
||||
a.name,
|
||||
a.material,
|
||||
a.category,
|
||||
a.model,
|
||||
a.spec,
|
||||
a.brand,
|
||||
a.factory,
|
||||
a.unit,
|
||||
a.remark,
|
||||
a.price,
|
||||
a.price * b.num as amount,
|
||||
b.num
|
||||
|
||||
FROM order_parts a
|
||||
LEFT JOIN order_item b ON a.id = b.parts_id
|
||||
LEFT JOIN order_body c on c.id = b.body_id
|
||||
WHERE b.order_id = #{orderId}
|
||||
and b.organ_id = #{organId}
|
||||
and a.deleted = #{deleted}
|
||||
and b.room_id = #{roomId}
|
||||
and b.body_id = #{bodyId}
|
||||
</select>
|
||||
</mapper>
|
||||
+105
@@ -730,5 +730,110 @@
|
||||
|
||||
</update>
|
||||
|
||||
<select id="selectOrderPlateListByBody" resultType="com.cf.imes.module.executor.controller.admin.plate.vo.PlateGoodsRespVO">
|
||||
select distinct
|
||||
op.id,
|
||||
op.name,
|
||||
op.goods_id,
|
||||
ogs.goods_name,
|
||||
op.front_hole_count,
|
||||
op.back_hole_count,
|
||||
op.side_hole_count,
|
||||
op.unregular_point_count,
|
||||
op.front_model_count,
|
||||
op.back_model_count,
|
||||
op.hole_arrange,
|
||||
op.hole_face,
|
||||
op.texture,
|
||||
op.type,
|
||||
op.open_door_type,
|
||||
op.filter_type,
|
||||
op.seal_left,
|
||||
op.seal_right,
|
||||
op.seal_up,
|
||||
op.seal_down,
|
||||
op.offset_x,
|
||||
op.offset_y,
|
||||
op.is_arc_across,
|
||||
op.is_door,
|
||||
op.is_cancel,
|
||||
op.remark,
|
||||
op.plate_no,
|
||||
op.split_height,
|
||||
op.split_width,
|
||||
op.split_thickness,
|
||||
op.module_type_id,
|
||||
op.height,
|
||||
op.width,
|
||||
op.thickness,
|
||||
op.area,
|
||||
op.is_special_shaped,
|
||||
op.is_sculpt,
|
||||
ogs.price,
|
||||
ogs.brand,
|
||||
ogs.height as goods_height,
|
||||
ogs.width as goods_width,
|
||||
ogs.thickness as goods_thickness,
|
||||
ogs.color,
|
||||
ogs.material,
|
||||
ogs.spec,
|
||||
bdy.id as body_id,
|
||||
bdy.`name` as body_name,
|
||||
bdy.room_id,
|
||||
bdy.room_name
|
||||
from order_plate op
|
||||
left join order_goods ogs on op.organ_id = ogs.organ_id and op.order_id = ogs.order_id and op.goods_id = ogs.id
|
||||
left join order_item its on op.organ_id = its.organ_id and op.order_id = its.order_id and op.id = its.plate_id
|
||||
left join order_body bdy on its.organ_id = bdy.organ_id and its.order_id = bdy.order_id and its.body_id = bdy.id
|
||||
where op.organ_id = #{organId}
|
||||
and op.deleted = #{deleted}
|
||||
and op.order_id = #{orderId}
|
||||
<if test="roomId != null">
|
||||
and its.room_id = #{roomId}
|
||||
</if>
|
||||
<if test="bodyId != null">
|
||||
and its.body_id = #{bodyId}
|
||||
</if>
|
||||
<if test="bodyId == null">
|
||||
and its.id = #{plateId}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectOrderPlateListSummary" resultType="com.cf.imes.module.executor.controller.admin.plate.vo.PlateGoodsRespVO">
|
||||
|
||||
select distinct
|
||||
op.id,
|
||||
op.name,
|
||||
op.open_door_type,
|
||||
op.height,
|
||||
op.width,
|
||||
op.thickness,
|
||||
op.area,
|
||||
ogs.thickness as goods_thickness,
|
||||
ogs.color,
|
||||
ogs.material,
|
||||
ogs.spec,
|
||||
bdy.id as body_id,
|
||||
bdy.`name` as body_name,
|
||||
bdy.room_id,
|
||||
bdy.room_name
|
||||
from order_plate op
|
||||
left join order_goods ogs on op.organ_id = ogs.organ_id and op.order_id = ogs.order_id and op.goods_id = ogs.id
|
||||
left join order_item its on op.organ_id = its.organ_id and op.order_id = its.order_id and op.id = its.plate_id
|
||||
left join order_body bdy on its.organ_id = bdy.organ_id and its.order_id = bdy.order_id and its.body_id = bdy.id
|
||||
where op.order_id = #{orderId}
|
||||
and op.organ_id = #{organId}
|
||||
and op.deleted = #{deleted}
|
||||
<if test="roomId != null">
|
||||
and its.room_id = #{roomId}
|
||||
</if>
|
||||
<if test="bodyId != null">
|
||||
and its.body_id = #{bodyId}
|
||||
</if>
|
||||
<if test="bodyId == null">
|
||||
and its.id = #{plateId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user