mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ public class OrderProcessApiImpl implements OrderProcessApi{
|
||||
@Override
|
||||
public CommonResult<Boolean> getOrderProcessByProcessGroupId(Long id) {
|
||||
List<OrderProcessDO> plateDOS = orderProcessService.getOrderProcessByProcessGroupId(id);
|
||||
if (plateDOS == null) {
|
||||
if (plateDOS.size() == 0) {
|
||||
return success(false);
|
||||
}
|
||||
return success(true);
|
||||
|
||||
+4
@@ -67,4 +67,8 @@ public class OrderPlatesDetailReqVO {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
|
||||
@ExcelProperty("颜色")
|
||||
private String color;
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -24,6 +24,9 @@ public class OrderPlatesDetailRespVO {
|
||||
@Schema(description = "配件名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String partName;
|
||||
|
||||
@Schema(description = "配件单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "柜体中的配件数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Double plateNum;
|
||||
}
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ public interface OrderPartsMapper extends BaseMapperX<OrderPartsDO> {
|
||||
return update(wrapper);
|
||||
}
|
||||
|
||||
void updateDeletedById(@Param("bodyId") List<Long> bodyIds, @Param("deleted") Integer deleted, @Param("organId") Long organId);
|
||||
void updateDeletedById(@Param("partsIds") List<Long> partsIds, @Param("deleted") Integer deleted, @Param("organId") Long organId);
|
||||
|
||||
List<PrintOrderPartsRespVO> selectPartList( @Param("orderIds") List<Long> orderIds,@Param("organId") Long organId);
|
||||
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ public interface PlateMapper extends BaseMapperX<PlateDO> {
|
||||
return update(wrapper);
|
||||
}
|
||||
|
||||
void updateDeletedById(@Param("bodyIds") List<Long> bodyId, @Param("deleted") Integer deleted, @Param("organId") Long organId);
|
||||
void updateDeletedById(@Param("plateIds") List<Long> plateIds, @Param("deleted") Integer deleted, @Param("organId") Long organId);
|
||||
|
||||
int countPlateByOrderId(@Param("orderId") Long orderId, @Param("organId") Long organId, @Param("deleted") Integer deleted);
|
||||
|
||||
|
||||
+2
@@ -325,8 +325,10 @@ public class OrderServiceImpl implements OrderService {
|
||||
|
||||
// 先查再改
|
||||
List<Long> plateDOList = plateMapper.selectPlateIdListByBodyId(bodyId, SecurityFrameworkUtils.getLoginUser().getOrganId());
|
||||
System.out.println(" plateDOList " + plateDOList);
|
||||
plateMapper.updateDeletedById(plateDOList, OrderDeletedEnum.DELETED.getStatus(), SecurityFrameworkUtils.getLoginUser().getOrganId());
|
||||
List<Long> partsList = orderPartsMapper.selectPartsIdListByBodyId(bodyId, SecurityFrameworkUtils.getLoginUser().getOrganId());
|
||||
System.out.println(" partsList " + partsList);
|
||||
orderPartsMapper.updateDeletedById(partsList, OrderDeletedEnum.DELETED.getStatus(), SecurityFrameworkUtils.getLoginUser().getOrganId());
|
||||
});
|
||||
}
|
||||
|
||||
+2
-2
@@ -444,8 +444,8 @@ public class PlanServiceImpl implements PlanService {
|
||||
.betweenIfPresent("a.width", new BigDecimal[]{vo.getWidthMinRang(), vo.getWidthMaxRang()})
|
||||
.betweenIfPresent("a.height", new BigDecimal[]{vo.getLongMinRang(), vo.getLongMaxRang()})
|
||||
.inIfPresent("a.filter_type", filterTypes)
|
||||
.betweenIfPresent("f.delivery_date", new Date[]{vo.getBeginDate(), vo.getEndDate()});
|
||||
|
||||
.betweenIfPresent("f.delivery_date", new Date[]{vo.getBeginDate(), vo.getEndDate()})
|
||||
.orderByDesc("a.name");
|
||||
PageDTO<PlateResList> page = new PageDTO<>(vo.getPageNo(), vo.getPageSize());
|
||||
IPage<PlateResList> pageResult = plateMapper.selectPlateByPlanId(page, queryWrapperX);
|
||||
Set<Long> bodyIds = pageResult.getRecords().stream().map(PlateResList::getBodyId).collect(Collectors.toSet());
|
||||
|
||||
+10
-7
@@ -3,6 +3,7 @@ package com.cf.imes.module.executor.util.fileConversion.admin.api.webcad;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import com.cf.imes.module.executor.enums.ErrorCodeConstants;
|
||||
import com.cf.imes.module.system.api.application.ApplicationApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
@@ -46,12 +47,13 @@ public class ApiDataAchieve {
|
||||
}
|
||||
|
||||
// 获取板件生产数据信息
|
||||
@Async
|
||||
// @Async
|
||||
public Future<JSONObject> getApiPlateProData(String token, String orderNo) {
|
||||
JSONObject jsonPlatesData = new JSONObject();
|
||||
jsonPlatesData.put("order_no", orderNo);//生产单号需要传入赋值
|
||||
jsonPlatesData.put("format", "json");
|
||||
JSONObject dataPlates = apiDataProduction.getApiOrderMessage(token, jsonPlatesData);
|
||||
System.out.println(" dataPlates " + dataPlates);
|
||||
if (!dataPlates.getString("err_code").equals("0")) {
|
||||
throw exception(PLATE_PLAN_DATA_ERROR);
|
||||
}
|
||||
@@ -59,7 +61,7 @@ public class ApiDataAchieve {
|
||||
}
|
||||
|
||||
// 获取配件信息 分页获取
|
||||
@Async
|
||||
// @Async
|
||||
public Future<JSONObject> getApiPartsMessage(String token, String orderNo) {
|
||||
JSONObject jsonParts = new JSONObject();
|
||||
jsonParts.put("curr_page", 1);
|
||||
@@ -79,7 +81,7 @@ public class ApiDataAchieve {
|
||||
}
|
||||
|
||||
// 柜体信息转换
|
||||
@Async
|
||||
// @Async
|
||||
public Future<JSONObject> getApiBodyMessage(String token, String orderNo) {
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("curr_page", 1);
|
||||
@@ -99,7 +101,7 @@ public class ApiDataAchieve {
|
||||
}
|
||||
|
||||
// 商品信息转换
|
||||
@Async
|
||||
// @Async
|
||||
public Future<JSONObject> getApiGoodsMessage(String token, String orderNo) {
|
||||
JSONObject jsonGoods = new JSONObject();
|
||||
jsonGoods.put("curr_page", 1);
|
||||
@@ -119,7 +121,7 @@ public class ApiDataAchieve {
|
||||
}
|
||||
|
||||
// 板材明细信息转换
|
||||
@Async
|
||||
// @Async
|
||||
public Future<JSONObject> getApiPlateDetailMessage(String token, String orderNo) {
|
||||
JSONObject jsonPlates = new JSONObject();
|
||||
jsonPlates.put("curr_page", 1);
|
||||
@@ -139,7 +141,7 @@ public class ApiDataAchieve {
|
||||
}
|
||||
|
||||
// 加工组信息转换
|
||||
@Async
|
||||
// @Async
|
||||
public Future<JSONObject> getApiGroupMessage(String token, String orderNo) {
|
||||
JSONObject jsonModule = new JSONObject();
|
||||
jsonModule.put("order_no", orderNo);
|
||||
@@ -156,7 +158,8 @@ public class ApiDataAchieve {
|
||||
jsonBlocks.put("order_no", orderNo);
|
||||
JSONObject blocks = apiDataProduction.getApiBlocksMessage(token, jsonBlocks);
|
||||
if (!blocks.getString("err_code").equals("0")) {
|
||||
throw exception(PLATE_DATA_ERROR);
|
||||
throw new IllegalArgumentException(String.valueOf(ErrorCodeConstants.PLATE_DATA_ERROR));
|
||||
// throw exception(PLATE_DATA_ERROR);
|
||||
}
|
||||
JSONObject block = new JSONObject();
|
||||
for (int i = 1; i <= blocks.getJSONObject("value").getInteger("PageCount"); i++) {
|
||||
|
||||
+9
-7
@@ -149,7 +149,10 @@ public class ApiTypeRealize {
|
||||
groupLists.forEach((k, v) -> {
|
||||
v.forEach(v1 -> {
|
||||
if (items.get(v1) != null) {
|
||||
if (items.get(v1).getGroupId() != null){ // 已存在值
|
||||
|
||||
if (items.containsKey(v1) && (items.get(v1).getGroupId() == null || items.get(v1).getGroupId() == 0)) {
|
||||
items.get(v1).setGroupId(orderGroupDO.get(k).getId());
|
||||
} else { // 如果groupId已存在值(即不为null),则创建一个新的OrderItemDO对象
|
||||
OrderItemDO item = OrderItemDO.builder()
|
||||
.id((Long) identifierGenerator.nextId(null))
|
||||
.orderId(items.get(v1).getOrderId())
|
||||
@@ -158,14 +161,14 @@ public class ApiTypeRealize {
|
||||
.bodyId(items.get(v1).getBodyId())
|
||||
.planId(items.get(v1).getPlanId())
|
||||
.packageId(items.get(v1).getPackageId())
|
||||
.groupId(items.get(v1).getGroupId())
|
||||
.groupId(orderGroupDO.get(k).getId())
|
||||
.partsId(items.get(v1).getPartsId())
|
||||
.plateId(items.get(v1).getPlateId())
|
||||
.num(items.get(v1).getNum())
|
||||
.build();
|
||||
items.put(orderGroupDO.get(k).getId(), item); //再复查
|
||||
}
|
||||
items.get(v1).setGroupId(orderGroupDO.get(k).getId());
|
||||
|
||||
if (items.get(v1).getPlateId() != null)
|
||||
groupNum++;
|
||||
}
|
||||
@@ -174,7 +177,7 @@ public class ApiTypeRealize {
|
||||
groupNum = 0;
|
||||
});
|
||||
|
||||
System.out.println(" item " + items);
|
||||
System.err.println(" item " + items);
|
||||
return items;
|
||||
}
|
||||
|
||||
@@ -543,7 +546,7 @@ public class ApiTypeRealize {
|
||||
.isSculpt(plate.getBoolean("IsModel"))
|
||||
.isSpecialShaped(plate.getBoolean("UnRegular"))
|
||||
.isCancel(false)
|
||||
.remark("无")
|
||||
.remark(plate.getString("RemarkJson"))
|
||||
.build();
|
||||
|
||||
// item 明细
|
||||
@@ -569,8 +572,7 @@ public class ApiTypeRealize {
|
||||
.setDrillsRemark(plate.getString("DrillsRemark"))
|
||||
.setInfoRemark(plate.getString("InfoRemark"))
|
||||
.setRemarkJsonDei(plate.getString("RemarkJson"));
|
||||
plateInfo.setRemark(plateDetail.get(plate.getLong("BlockNo")).getRemark() != null ?
|
||||
plateDetail.get(plate.getLong("BlockNo")).getRemark().toString() : "");
|
||||
|
||||
}
|
||||
if (plateMap.get(plate.getLong("BlockNo")) != null) {
|
||||
JSONObject jsonObject = plateMap.get(plate.getLong("BlockNo"));
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.cf.imes.module.executor.dal.mysql.order.OrderMapper">
|
||||
|
||||
<select id="selectOrderPage" resultType="com.cf.imes.module.executor.controller.admin.plan.vo.OrderRespVOCopy">
|
||||
select a.id as orderId, a.order_date, a.delivery_date, a.customer, a.address, a.custom_order_no as defineId,
|
||||
select distinct a.id as orderId, a.order_date, a.delivery_date, a.customer, a.address, a.custom_order_no as defineId,
|
||||
count(op.id) as num, sum(op.area) as area
|
||||
from `orders` a
|
||||
left join order_item oi on a.id = oi.order_id and a.organ_id = oi.organ_id
|
||||
|
||||
+4
-4
@@ -6,7 +6,7 @@
|
||||
<select id="selectPlatesDetailByOrderId" resultType="com.cf.imes.module.executor.controller.admin.plate.vo.PlateRespVO">
|
||||
SELECT DISTINCT i.order_id, p.id, p.plate_no, g.material, p.name, p.area, p.seal_left, p.seal_down,
|
||||
p.seal_right, p.seal_up, p.texture, p.is_special_shaped, p.is_sculpt, p.unregular_point_count, p.front_hole_count,
|
||||
p.back_hole_count, p.side_hole_count,p.width,p.height,p.thickness
|
||||
p.back_hole_count, p.side_hole_count,p.width,p.height,p.thickness,p.remark,g.color
|
||||
FROM order_item i
|
||||
RIGHT JOIN `order_plate` p ON i.plate_id = p.id
|
||||
LEFT JOIN `order_goods` g ON g.id = p.goods_id
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<select id="selectPartsByOrderId"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.order.vo.order.OrderPlatesDetailRespVO">
|
||||
SELECT DISTINCT i.order_id, i.room_id, i.body_id, i.parts_id, p.`name` as part_name, i.num as plate_num
|
||||
SELECT DISTINCT i.order_id, i.room_id, i.body_id, i.parts_id, p.`name` as part_name, i.num as plate_num, p.unit
|
||||
FROM `order_item` i
|
||||
RIGHT JOIN `order_parts` p ON i.parts_id = p.id
|
||||
WHERE i.order_id = #{orderId} AND i.organ_id = #{organId} AND p.deleted = #{deleted}
|
||||
@@ -171,13 +171,13 @@
|
||||
from order_item oi
|
||||
left join order_package op on oi.order_id = op.order_id and oi.organ_id = op.organ_id
|
||||
|
||||
where oi.parts_id = '' and oi.organ_id = #{organId}
|
||||
where oi.parts_id = 0 and oi.organ_id = #{organId}
|
||||
and oi.order_id in
|
||||
|
||||
<foreach item="orderIds" collection="orderIds" open="(" separator="," close=")">
|
||||
#{orderIds}
|
||||
</foreach>
|
||||
group by oi.order_id,oi.plate_id,op.id,op.package_no;
|
||||
group by oi.order_id,oi.plate_id,op.id,op.package_no,op.status;
|
||||
|
||||
|
||||
|
||||
|
||||
+5
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
<select id="selectProductList"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.orderParts.vo.OrderPartsRespVO">
|
||||
SELECT a.id, a.goods_id, a.name, a.material, a.type, a.model, a.spec, a.brand, a.factory,
|
||||
SELECT distinct a.id, a.goods_id, a.name, a.material, a.type, a.model, a.spec, a.brand, a.factory,
|
||||
a.unit, a.price, a.is_composite, a.remark, b.num
|
||||
FROM order_parts a
|
||||
LEFT JOIN order_item b ON a.id = b.parts_id and a.organ_id = b.organ_id
|
||||
@@ -68,7 +68,10 @@
|
||||
<update id="updateDeletedById">
|
||||
UPDATE order_parts
|
||||
SET deleted = #{deleted}
|
||||
WHERE id IN #{bodyIds} AND organ_id = #{organId}
|
||||
WHERE id IN
|
||||
<foreach collection="partsIds" item="partsId" open="(" separator="," close=")">
|
||||
#{partsId}
|
||||
</foreach>AND organ_id = #{organId}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -90,7 +90,7 @@
|
||||
|
||||
|
||||
<select id="getOptimizePlanParam" resultMap="optimizeMap">
|
||||
select op.id as plan_id, op.plan_no, op.type as op_type, op.status as op_status, op.machine_id, op.plan_time, op.produce_time, op.remark as op_remark, op.operator,
|
||||
select distinct op.id as plan_id, op.plan_no, op.type as op_type, op.status as op_status, op.machine_id, op.plan_time, op.produce_time, op.remark as op_remark, op.operator,
|
||||
oi.order_id, opl.id as plateId, opl.order_id opl_order_id, opl.name opl_name, opl.plate_no, opl.type as opl_type, opl.goods_id as opl_goods_id, opl.width opl_width,
|
||||
opl.height opl_height, opl.thickness as opl_thickness, opl.split_width, opl.split_height, opl.split_thickness, opl.seal_left, opl.seal_right,
|
||||
opl.seal_up, opl.seal_down, opl.area, opl.texture, opl.hole_face, opl.hole_arrange, opl.unregular_point_count, opl.front_hole_count,
|
||||
@@ -111,7 +111,7 @@
|
||||
resultType="com.cf.imes.module.executor.controller.admin.plan.vo.PlateOptimize"
|
||||
parameterType="java.lang.Long">
|
||||
|
||||
select a.id, a.goods_name, a.material, a.color, a.width, a.height, a.thickness, count(b.id) as plateNum, d.*
|
||||
select distinct a.id, a.goods_name, a.material, a.color, a.width, a.height, a.thickness, count(b.id) as plateNum, d.*
|
||||
from order_goods a
|
||||
left join order_plate b on a.id = b.goods_id and a.organ_id = b.organ_id
|
||||
left join order_item c on c.order_id = b.order_id and c.organ_id = b.organ_id
|
||||
|
||||
+15
-10
@@ -5,7 +5,7 @@
|
||||
|
||||
<select id="selectPlatePage" resultType="com.cf.imes.module.executor.controller.admin.plan.vo.PlatePage">
|
||||
|
||||
select a.id as plateId, a.name, a.width, a.height, a.thickness, a.area,
|
||||
select distinct a.id as plateId, a.name, a.width, a.height, a.thickness, a.area,
|
||||
b.custom_order_no, b.customer, b.address, b.remark, b.id as orderId,
|
||||
c.goods_name, c.material, c.color, a.goods_id,oi.num,a.is_special_shaped as specialShaped,a.is_sculpt as profiling
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<select id="selectPlateByPlanId"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.plan.vo.PlateResList">
|
||||
select a.order_id, a.plate_no , a.name as plateName,a.is_special_shaped,a.is_sculpt,a.area,a.seal_left,a.seal_right,a.seal_up,a.seal_down, e.material, e.color, a.width, a.height, a.thickness, b.room_id, b.body_id
|
||||
select distinct a.order_id, a.plate_no , a.name as plateName,a.is_special_shaped,a.is_sculpt,a.area,a.seal_left,a.seal_right,a.seal_up,a.seal_down, e.material, e.color, a.width, a.height, a.thickness, b.room_id, b.body_id
|
||||
from order_plate a
|
||||
LEFT JOIN order_item b ON a.id = b.plate_id AND a.order_id = b.order_id and a.organ_id = b.organ_id
|
||||
LEFT JOIN order_goods e ON e.id = a.goods_id AND e.order_id = a.order_id and e.organ_id = a.organ_id
|
||||
@@ -40,7 +40,7 @@
|
||||
</select>
|
||||
<select id="selectPlateList"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.plan.vo.PlateParam">
|
||||
select a.id, a.plate_no, a.height length, a.width, a.texture, a.hole_arrange, a.hole_face, if ( (count(a.unregular_point_count) = 0), 1, 0) as isRect
|
||||
select distinct a.id, a.plate_no, a.height length, a.width, a.texture, a.hole_arrange, a.hole_face, if ( (count(a.unregular_point_count) = 0), 1, 0) as isRect
|
||||
from order_plate a
|
||||
left join order_item b on a.id = b.plate_id
|
||||
where b.plan_id = #{planId}
|
||||
@@ -63,7 +63,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectBatchOrderIdsAndGoodsIds" resultType="java.lang.Long">
|
||||
select oi.id from order_plate op
|
||||
select distinct oi.id from order_plate op
|
||||
join order_item oi on op.id = oi.plate_id and op.order_id = oi.order_id and op.organ_id = oi.organ_id
|
||||
where op.organ_id = #{organId} and op.order_id in
|
||||
<foreach collection="itemList" item="item" open="(" close=")" separator=",">
|
||||
@@ -181,7 +181,8 @@
|
||||
|
||||
<select id="selectPlateGoodsList" resultType="com.cf.imes.module.executor.controller.admin.plate.vo.PlateGoodsRespVO">
|
||||
|
||||
select op.id,
|
||||
select distinct
|
||||
op.id,
|
||||
op.name,
|
||||
op.goods_id,
|
||||
ogs.goods_name,
|
||||
@@ -242,7 +243,7 @@
|
||||
|
||||
<select id="selectPlateGoodsListSummary" resultType="com.cf.imes.module.executor.controller.admin.plate.vo.PlateGoodsRespVO">
|
||||
|
||||
select
|
||||
select distinct
|
||||
op.name,
|
||||
op.open_door_type,
|
||||
op.height,
|
||||
@@ -270,7 +271,11 @@
|
||||
<update id="updateDeletedById">
|
||||
UPDATE order_plate
|
||||
SET deleted = #{deleted}
|
||||
WHERE id IN #{bodyIds} AND organ_id = #{organId}
|
||||
WHERE id IN
|
||||
<foreach collection="plateIds" item="plateId" open="(" separator="," close=")">
|
||||
#{plateId}
|
||||
</foreach>
|
||||
AND organ_id = #{organId}
|
||||
</update>
|
||||
<select id="countPlateByOrderId" resultType="java.lang.Integer">
|
||||
SELECT count(*) FROM order_plate
|
||||
@@ -289,15 +294,15 @@
|
||||
parameterType="java.lang.Long">
|
||||
|
||||
|
||||
select a.order_id, a.plate_no , a.name as plateName,a.is_special_shaped,a.is_sculpt,a.area,a.seal_left,a.seal_right,a.seal_up,a.seal_down, e.material, e.color, a.width, a.height, a.thickness, b.room_id, b.body_id
|
||||
select distinct a.order_id, a.plate_no , a.name as plateName,a.is_special_shaped,a.is_sculpt,a.area,a.seal_left,a.seal_right,a.seal_up,a.seal_down, e.material, e.color, a.width, a.height, a.thickness, b.room_id, b.body_id
|
||||
from order_plan_item p
|
||||
left join order_item b on p.item_id = b.id and b.organ_id = p.organ_id
|
||||
left join order_plate a on b.plate_id = a.id and b.order_id = a.order_id and b.organ_id = a.organ_id
|
||||
left join order_goods e on a.goods_id = e.id and a.order_id = e.order_id and a.organ_id = e.organ_id
|
||||
|
||||
where p.plan_id = #{planId} and p.organ_id = #{organId} ;
|
||||
|
||||
where p.plan_id = #{planId} and p.organ_id = #{organId}
|
||||
|
||||
order by a.order_id,plateName;
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user