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());
|
||||
});
|
||||
}
|
||||
|
||||
+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"));
|
||||
|
||||
+2
-2
@@ -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}
|
||||
|
||||
+4
-1
@@ -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>
|
||||
|
||||
|
||||
|
||||
+5
-1
@@ -271,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
|
||||
|
||||
Reference in New Issue
Block a user