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:
+4
@@ -19,6 +19,9 @@ import java.nio.charset.StandardCharsets;
|
||||
@Slf4j
|
||||
public class LoginUserRequestInterceptor implements RequestInterceptor {
|
||||
|
||||
//数据源编码
|
||||
private static final String DATA_SOURCE_CODE = "data-code";
|
||||
|
||||
@Override
|
||||
@SneakyThrows
|
||||
public void apply(RequestTemplate requestTemplate) {
|
||||
@@ -28,6 +31,7 @@ public class LoginUserRequestInterceptor implements RequestInterceptor {
|
||||
String userStr = JsonUtils.toJsonString(user);
|
||||
userStr = URLEncoder.encode(userStr, StandardCharsets.UTF_8.name()); // 编码,避免中文乱码
|
||||
requestTemplate.header(SecurityFrameworkUtils.LOGIN_USER_HEADER, userStr);
|
||||
requestTemplate.header(DATA_SOURCE_CODE, user.getDataCode());
|
||||
} catch (Exception ex) {
|
||||
log.error("[apply][序列化 LoginUser({}) 发生异常]", user, ex);
|
||||
throw ex;
|
||||
|
||||
+3
-3
@@ -15,8 +15,8 @@ public interface OrderProcessApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/order-process";
|
||||
|
||||
@GetMapping(PREFIX +"/get")
|
||||
@GetMapping(PREFIX +"/apiGet")
|
||||
@Operation(summary = "获得生产单中的加工组信息表")
|
||||
@Parameter(name = "id", description = "加工组id", required = true, example = "1024")
|
||||
CommonResult<Boolean> getOrderProcessByProcessGroupId(@RequestParam("id") Long id);
|
||||
@Parameter(name = "processGroupId", description = "加工组id", required = true, example = "1024")
|
||||
CommonResult<Boolean> getOrderProcessByProcessGroupId(@RequestParam("processGroupId") Long id);
|
||||
}
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ public class ApiConstants {
|
||||
*/
|
||||
public static final String NAME = "executor-server";
|
||||
|
||||
public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/executor";
|
||||
public static final String PREFIX = "/admin-api/executor";
|
||||
|
||||
public static final String VERSION = "1.0.0";
|
||||
|
||||
|
||||
+4
-3
@@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||
@@ -20,9 +22,8 @@ public class OrderProcessApiImpl implements OrderProcessApi{
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> getOrderProcessByProcessGroupId(Long id) {
|
||||
System.out.println(" Long id " + id);
|
||||
OrderProcessDO plateDO = orderProcessService.getOrderProcessByProcessGroupId(id);
|
||||
if (plateDO == null) {
|
||||
List<OrderProcessDO> plateDOS = orderProcessService.getOrderProcessByProcessGroupId(id);
|
||||
if (plateDOS == null) {
|
||||
return success(false);
|
||||
}
|
||||
return success(true);
|
||||
|
||||
+1
@@ -29,6 +29,7 @@ public interface OrderMapper extends BaseMapperX<OrderDO> {
|
||||
default PageResult<OrderDO> selectPage(OrderPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<OrderDO>()
|
||||
.eqIfPresent(OrderDO::getParentNo, reqVO.getParentNo())
|
||||
.likeIfPresent(OrderDO::getId, String.valueOf(reqVO.getId()) != null ? "" : String.valueOf(reqVO.getId()))
|
||||
.betweenIfPresent(OrderDO::getDeliveryDate, reqVO.getDeliveryDate())
|
||||
.betweenIfPresent(OrderDO::getOrderDate, reqVO.getOrderDate())
|
||||
.eqIfPresent(OrderDO::getId, reqVO.getId())
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ public interface OrderBodyMapper extends BaseMapperX<OrderBodyDO> {
|
||||
|
||||
int updatePlateNumById(@Param("orderId") Long orderId, @Param("plateNum") Double plateNum);
|
||||
|
||||
int deleteAllByOrderId(@Param("orderId") Long orderId, @Param("bodyId") Long bodyId);
|
||||
int deleteAllByOrderId(@Param("orderId") Long orderId, @Param("bodyId") Long bodyId); // item表数据未作筛选
|
||||
|
||||
List<OrderModuleRespVO> selectModuleByOrderId(@Param("orderId") Long orderId,
|
||||
@Param("organId") Long organId,
|
||||
|
||||
+3
-1
@@ -84,8 +84,10 @@ public interface OrderPartsMapper extends BaseMapperX<OrderPartsDO> {
|
||||
return update(wrapper);
|
||||
}
|
||||
|
||||
void updateDeletedById(@Param("bodyId") Long bodyId, @Param("deleted") Integer deleted, @Param("organId") Long organId);
|
||||
void updateDeletedById(@Param("bodyId") List<Long> bodyIds, @Param("deleted") Integer deleted, @Param("organId") Long organId);
|
||||
|
||||
List<PrintOrderPartsRespVO> selectPartList( @Param("orderIds") List<Long> orderIds,@Param("organId") Long organId);
|
||||
|
||||
List<Long> selectPartsIdListByBodyId(@Param("bodyId") Long bodyId, @Param("organId") Long organId);
|
||||
|
||||
}
|
||||
+3
-1
@@ -106,7 +106,7 @@ public interface PlateMapper extends BaseMapperX<PlateDO> {
|
||||
return update(wrapper);
|
||||
}
|
||||
|
||||
void updateDeletedById(@Param("bodyId") Long bodyId, @Param("deleted") Integer deleted, @Param("organId") Long organId);
|
||||
void updateDeletedById(@Param("bodyIds") List<Long> bodyId, @Param("deleted") Integer deleted, @Param("organId") Long organId);
|
||||
|
||||
int countPlateByOrderId(@Param("orderId") Long orderId, @Param("organId") Long organId, @Param("deleted") Integer deleted);
|
||||
|
||||
@@ -114,5 +114,7 @@ public interface PlateMapper extends BaseMapperX<PlateDO> {
|
||||
BigDecimal selectPlateSize( @Param("orderId") Long orderId);
|
||||
|
||||
|
||||
List<Long> selectPlateIdListByBodyId(@Param("bodyId") Long bodyId, @Param("organId") Long organId);
|
||||
|
||||
List<PlateResList> selectPlateListByPlanId(@Param("planId") Long planId, @Param("organId") Long organId);
|
||||
}
|
||||
+6
-2
@@ -322,8 +322,12 @@ public class OrderServiceImpl implements OrderService {
|
||||
// orderBodyMapper.deleteAllByOrderId(orderId, bodyId);
|
||||
orderBodyMapper.updateDeletedById(bodyId, OrderDeletedEnum.DELETED.getStatus(), SecurityFrameworkUtils.getLoginUser().getOrganId());
|
||||
orderGroupMapper.updateDeletedById(bodyId, OrderDeletedEnum.DELETED.getStatus(), SecurityFrameworkUtils.getLoginUser().getOrganId());
|
||||
plateMapper.updateDeletedById(bodyId, OrderDeletedEnum.DELETED.getStatus(), SecurityFrameworkUtils.getLoginUser().getOrganId());
|
||||
orderPartsMapper.updateDeletedById(bodyId, OrderDeletedEnum.DELETED.getStatus(), SecurityFrameworkUtils.getLoginUser().getOrganId());
|
||||
|
||||
// 先查再改
|
||||
List<Long> plateDOList = plateMapper.selectPlateIdListByBodyId(bodyId, SecurityFrameworkUtils.getLoginUser().getOrganId());
|
||||
plateMapper.updateDeletedById(plateDOList, OrderDeletedEnum.DELETED.getStatus(), SecurityFrameworkUtils.getLoginUser().getOrganId());
|
||||
List<Long> partsList = orderPartsMapper.selectPartsIdListByBodyId(bodyId, SecurityFrameworkUtils.getLoginUser().getOrganId());
|
||||
orderPartsMapper.updateDeletedById(partsList, OrderDeletedEnum.DELETED.getStatus(), SecurityFrameworkUtils.getLoginUser().getOrganId());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -4,6 +4,8 @@ import javax.validation.*;
|
||||
import com.cf.imes.module.executor.controller.admin.process.vo.*;
|
||||
import com.cf.imes.module.executor.dal.dataobject.process.OrderProcessDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产单工序 Service 接口
|
||||
*
|
||||
@@ -47,6 +49,6 @@ public interface OrderProcessService {
|
||||
* @param processGroupId 工序组Id
|
||||
* @return 生产单工序
|
||||
*/
|
||||
OrderProcessDO getOrderProcessByProcessGroupId(Long processGroupId);
|
||||
List<OrderProcessDO> getOrderProcessByProcessGroupId(Long processGroupId);
|
||||
|
||||
}
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
package com.cf.imes.module.executor.service.process;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
||||
import com.cf.imes.framework.common.enums.ProcessProcessingTypeEnum;
|
||||
import com.cf.imes.framework.security.core.util.SecurityFrameworkUtils;
|
||||
@@ -197,8 +198,10 @@ public class OrderProcessServiceImpl implements OrderProcessService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderProcessDO getOrderProcessByProcessGroupId(Long processGroupId) {
|
||||
return orderProcessMapper.selectOne("group_id", processGroupId,"organ_id",getUserOrganId());
|
||||
public List<OrderProcessDO> getOrderProcessByProcessGroupId(Long processGroupId) {
|
||||
return orderProcessMapper.selectList(new LambdaUpdateWrapper<OrderProcessDO>()
|
||||
.eq(OrderProcessDO::getGroupId, processGroupId)
|
||||
.eq(OrderProcessDO::getOrganId, getUserOrganId()));
|
||||
}
|
||||
|
||||
}
|
||||
+116
-97
@@ -78,7 +78,7 @@ public class ApiTypeRealize {
|
||||
List<OrderDO> order = new ArrayList<>();
|
||||
order.add(orderDO);
|
||||
// 商品信息数据 信息以全
|
||||
Map<String, Map<Integer, ?>> goodsInfoChange = rawGoodsInfoChange(dataGoods, orderId, dataBlocks);
|
||||
Map<String, Map<Long, ?>> goodsInfoChange = rawGoodsInfoChange(dataGoods, orderId, dataBlocks);
|
||||
// System.out.println(" goodsInfoChange " + goodsInfoChange);
|
||||
List<GoodsDO> goodsDO = (List<GoodsDO>) goodsInfoChange.get("goodsDOS").values().stream()
|
||||
.collect(Collectors.toList());
|
||||
@@ -87,36 +87,38 @@ public class ApiTypeRealize {
|
||||
.collect(Collectors.toList());
|
||||
map.put("rawGoodsDO", rawGoodsDO);
|
||||
// 柜体信息 少异形数量、板材数量
|
||||
Map<Integer, OrderBodyDO> bodyInfoChange = bodyInfoChange(dataBody, orderId);
|
||||
Map<Long, OrderBodyDO> bodyInfoChange = bodyInfoChange(dataBody, orderId);
|
||||
// System.out.println(" bodyInfoChange " + bodyInfoChange);
|
||||
// 加工组 少异形数量、板材数量
|
||||
Map<String, Map<Integer, ?>> group =
|
||||
|
||||
Map<String, Map<Long, ?>> group =
|
||||
groupInfoChange(dataModule, orderId, bodyInfoChange);
|
||||
Map<Integer, OrderGroupDO> orderGroupDO = (Map<Integer, OrderGroupDO>) group.get("orderGroup");
|
||||
Map<Long, OrderGroupDO> orderGroupDO = (Map<Long, OrderGroupDO>) group.get("orderGroup");
|
||||
map.put("groupDO", orderGroupDO.values().stream().collect(Collectors.toList()));
|
||||
Map<Integer, List<Integer>> groupLists = (Map<Integer, List<Integer>>) group.get("lists");
|
||||
Map<Long, List<Long>> groupLists = (Map<Long, List<Long>>) group.get("lists"); // 加工组中包含的板件、配件id
|
||||
// 配件
|
||||
Map<String, Map<Integer, ?>> partsDO = partsInfoChange(dataParts, orderId,
|
||||
(Map<Integer, GoodsDO>) goodsInfoChange.get("goodsDOS"), bodyInfoChange);
|
||||
Map<Integer, OrderPartsRemark> partsRemark = (Map<Integer, OrderPartsRemark>) partsDO.get("remarks"); // 配件备注
|
||||
Map<String, Map<Long, ?>> partsDO = partsInfoChange(dataParts, orderId,
|
||||
(Map<Long, GoodsDO>) goodsInfoChange.get("goodsDOS"), bodyInfoChange);
|
||||
|
||||
Map<Long, OrderPartsRemark> partsRemark = (Map<Long, OrderPartsRemark>) partsDO.get("remarks"); // 配件备注
|
||||
map.put("partsRemark", partsRemark.values().stream().collect(Collectors.toList()));
|
||||
Map<Integer, OrderPartsDO> orderPartsDO = (Map<Integer, OrderPartsDO>) partsDO.get("partsInfos");
|
||||
|
||||
Map<Long, OrderPartsDO> orderPartsDO = (Map<Long, OrderPartsDO>) partsDO.get("partsInfos");
|
||||
map.put("partsDO", orderPartsDO.values().stream().collect(Collectors.toList()));
|
||||
Map<Integer, OrderItemDO> partsItems = (Map<Integer, OrderItemDO>) partsDO.get("partsItems");
|
||||
|
||||
Map<Long, OrderItemDO> partsItems = (Map<Long, OrderItemDO>) partsDO.get("partsItems");
|
||||
|
||||
List<OrderItemDO> itemsList = new ArrayList<>();
|
||||
partsItems = orderPartsChange(bodyInfoChange, orderGroupDO, groupLists, partsItems);// item补充
|
||||
partsItems = orderPartsChange(orderGroupDO, groupLists, partsItems);// item补充
|
||||
itemsList.addAll(partsItems.values());
|
||||
// 板材 写库
|
||||
Map<String, Map<Integer, ?>> platesDO = platesInfoChange(dataPlates, plates, orderId,
|
||||
(Map<Integer, GoodsDO>) goodsInfoChange.get("goodsDOS"), bodyInfoChange, dataBlocks);
|
||||
Map<Integer, PlateDO> orderPlatesDO = (Map<Integer, PlateDO>) platesDO.get("platesInfos");
|
||||
Map<String, Map<Long, ?>> platesDO = platesInfoChange(dataPlates, plates, orderId,
|
||||
(Map<Long, GoodsDO>) goodsInfoChange.get("goodsDOS"), bodyInfoChange, dataBlocks);
|
||||
Map<Long, PlateDO> orderPlatesDO = (Map<Long, PlateDO>) platesDO.get("platesInfos");
|
||||
map.put("platesDO", orderPlatesDO.values().stream().collect(Collectors.toList()));
|
||||
map.put("plateDetail", platesDO.get("plateDetail").values().stream().collect(Collectors.toList()));
|
||||
Map<Integer, OrderItemDO> platesItems = (Map<Integer, OrderItemDO>) platesDO.get("platesItems");
|
||||
Map<Integer, OrderBodyDO> bodyItemsPlates = (Map<Integer, OrderBodyDO>) platesDO.get("bodyInfos");
|
||||
platesItems = orderPartsChange(bodyInfoChange, orderGroupDO, groupLists, platesItems);// item补充
|
||||
Map<Long, OrderItemDO> platesItems = (Map<Long, OrderItemDO>) platesDO.get("platesItems");
|
||||
Map<Long, OrderBodyDO> bodyItemsPlates = (Map<Long, OrderBodyDO>) platesDO.get("bodyInfos");
|
||||
platesItems = orderPartsChange(orderGroupDO, groupLists, platesItems);// item补充
|
||||
itemsList.addAll(platesItems.values());
|
||||
// System.out.println("生产单数据 " + orderDO+ " 商品信息1 " + goodsDO + " 商品信息2 "
|
||||
// + rawGoodsDO + " 板材信息 " + new ArrayList<>(orderPlatesDO.values())
|
||||
@@ -133,22 +135,38 @@ public class ApiTypeRealize {
|
||||
|
||||
|
||||
/**
|
||||
* @param bodyInfoChange: BoxId body
|
||||
* bodyInfoChange: BoxId body 暂时未用
|
||||
* @param orderGroupDO: ModuleID group
|
||||
* @param groupLists: ModuleID 板材、配件id
|
||||
* @param partsItems: ItemID item
|
||||
* @param items: ItemID item
|
||||
* @return Map<Integer, OrderItemDO>
|
||||
* @author Administrator
|
||||
* @date 2024/5/8
|
||||
*/
|
||||
public Map<Integer, OrderItemDO> orderPartsChange(Map<Integer, OrderBodyDO> bodyInfoChange, Map<Integer, OrderGroupDO> orderGroupDO,
|
||||
Map<Integer, List<Integer>> groupLists, Map<Integer, OrderItemDO> partsItems) {
|
||||
public Map<Long, OrderItemDO> orderPartsChange(Map<Long, OrderGroupDO> orderGroupDO,
|
||||
Map<Long, List<Long>> groupLists, Map<Long, OrderItemDO> items) {
|
||||
|
||||
groupLists.forEach((k, v) -> {
|
||||
v.forEach(v1 -> {
|
||||
if (partsItems.get(v1) != null) {
|
||||
partsItems.get(v1).setGroupId(orderGroupDO.get(k).getId());
|
||||
if (partsItems.get(v1).getPlateId() != null)
|
||||
if (items.get(v1) != null) {
|
||||
if (items.get(v1).getGroupId() != null){ // 已存在值
|
||||
OrderItemDO item = OrderItemDO.builder()
|
||||
.id((Long) identifierGenerator.nextId(null))
|
||||
.orderId(items.get(v1).getOrderId())
|
||||
.type(items.get(v1).getType())
|
||||
.roomId(items.get(v1).getRoomId())
|
||||
.bodyId(items.get(v1).getBodyId())
|
||||
.planId(items.get(v1).getPlanId())
|
||||
.packageId(items.get(v1).getPackageId())
|
||||
.groupId(items.get(v1).getGroupId())
|
||||
.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++;
|
||||
}
|
||||
});
|
||||
@@ -156,16 +174,17 @@ public class ApiTypeRealize {
|
||||
groupNum = 0;
|
||||
});
|
||||
|
||||
return partsItems;
|
||||
System.out.println(" item " + items);
|
||||
return items;
|
||||
}
|
||||
|
||||
/**
|
||||
* 加工组 信息转换
|
||||
*/
|
||||
private Map<String, Map<Integer, ?>> groupInfoChange(JSONObject dataModule, Long orderId, Map<Integer, OrderBodyDO> bodyInfoChange) {
|
||||
Map<String, Map<Integer, ?>> map = new HashMap<>();
|
||||
Map<Integer, OrderGroupDO> orderGroupDOs = new HashMap<>();// 加工组id 和 加工组信息
|
||||
Map<Integer, List<Integer>> groupLists = new HashMap<>();// 加工组id 和 详细信息
|
||||
private Map<String, Map<Long, ?>> groupInfoChange(JSONObject dataModule, Long orderId, Map<Long, OrderBodyDO> bodyInfoChange) {
|
||||
Map<String, Map<Long, ?>> map = new HashMap<>();
|
||||
Map<Long, OrderGroupDO> orderGroupDOs = new HashMap<>();// 加工组id 和 加工组信息
|
||||
Map<Long, List<Long>> groupLists = new HashMap<>();// 加工组id 和 详细信息
|
||||
|
||||
|
||||
if (dataModule.getJSONArray("value") != null &&
|
||||
@@ -177,8 +196,8 @@ public class ApiTypeRealize {
|
||||
OrderGroupDO bodyInfo = OrderGroupDO.builder()
|
||||
.id((Long) identifierGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.bodyId(bodyInfoChange.get(group.getInteger("BoxID")).getId())//group.getLong("BoxID")
|
||||
.groupTypeId(Long.valueOf(group.getInteger("ModuleTypeID")))
|
||||
.bodyId(bodyInfoChange.get(group.getLong("BoxID")).getId())//group.getLong("BoxID")
|
||||
.groupTypeId(Long.valueOf(group.getLong("ModuleTypeID")))
|
||||
.groupTypeName("无")
|
||||
.name(group.getString("ModuleTypeName"))
|
||||
.width(group.getDouble("Width"))
|
||||
@@ -190,8 +209,8 @@ public class ApiTypeRealize {
|
||||
.filename("无")
|
||||
.remark("无")
|
||||
.build();
|
||||
groupLists.put(group.getInteger("ModuleID"), jsonArrayToList(group.getJSONArray("ItemIDList")));
|
||||
orderGroupDOs.put(group.getInteger("ModuleID"), bodyInfo);
|
||||
groupLists.put(group.getLong("ModuleID"), jsonArrayToList(group.getJSONArray("ItemIDList")));
|
||||
orderGroupDOs.put(group.getLong("ModuleID"), bodyInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,13 +268,13 @@ public class ApiTypeRealize {
|
||||
/**
|
||||
* 板材数据转换成 Map<String, Object>
|
||||
*/
|
||||
public Map<Integer, JSONObject> getBlocksDataByGoodsID(JSONObject dataBlocks) {
|
||||
Map<Integer, JSONObject> map = new HashMap<>();
|
||||
public Map<Long, JSONObject> getBlocksDataByGoodsID(JSONObject dataBlocks) {
|
||||
Map<Long, JSONObject> map = new HashMap<>();
|
||||
JSONArray ordersArray = dataBlocks.getJSONArray("List");
|
||||
if (ordersArray != null && !ordersArray.isEmpty()) {
|
||||
for (int i = 0; i < ordersArray.size(); i++) {
|
||||
JSONObject block = ordersArray.getJSONObject(i);
|
||||
map.put(block.getInteger("GoodsID"), block);
|
||||
map.put(block.getLong("GoodsID"), block);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
@@ -271,10 +290,10 @@ public class ApiTypeRealize {
|
||||
* @author Administrator
|
||||
* @date 2024/4/30
|
||||
*/
|
||||
public Map<String, Map<Integer, ?>> rawGoodsInfoChange(JSONObject dataRawGoods, Long orderId , JSONObject dataBlocks) {
|
||||
Map<String, Map<Integer, ?>> map = new HashMap<>();
|
||||
Map<Integer, RawGoodsDO> rawGoodsDOS = new HashMap<>();
|
||||
Map<Integer, GoodsDO> goodsDOS = new HashMap<>();
|
||||
public Map<String, Map<Long, ?>> rawGoodsInfoChange(JSONObject dataRawGoods, Long orderId , JSONObject dataBlocks) {
|
||||
Map<String, Map<Long, ?>> map = new HashMap<>();
|
||||
Map<Long, RawGoodsDO> rawGoodsDOS = new HashMap<>();
|
||||
Map<Long, GoodsDO> goodsDOS = new HashMap<>();
|
||||
|
||||
if (dataRawGoods.getJSONArray("List") != null &&
|
||||
!dataRawGoods.getJSONArray("List").isEmpty()) {
|
||||
@@ -295,7 +314,7 @@ public class ApiTypeRealize {
|
||||
.brand(goods.getString("Brand"))
|
||||
.spec(goods.getString("Spec"))
|
||||
.build();
|
||||
rawGoodsDOS.put(goods.getInteger("GoodsID"), rawGoodsDO);
|
||||
rawGoodsDOS.put(goods.getLong("GoodsID"), rawGoodsDO);
|
||||
|
||||
GoodsDO goodsDO = GoodsDO.builder()
|
||||
.id((Long) identifierGenerator.nextId(null))
|
||||
@@ -313,7 +332,7 @@ public class ApiTypeRealize {
|
||||
.brand(goods.getString("Brand"))
|
||||
.spec(goods.getString("Spec"))
|
||||
.build();
|
||||
goodsDOS.put(goods.getInteger("GoodsID"), goodsDO);
|
||||
goodsDOS.put(goods.getLong("GoodsID"), goodsDO);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -331,8 +350,8 @@ public class ApiTypeRealize {
|
||||
* @author Administrator
|
||||
* @date 2024/4/30
|
||||
*/
|
||||
private Map<Integer, OrderBodyDO> bodyInfoChange(JSONObject dataBody, Long orderId) {
|
||||
Map<Integer, OrderBodyDO> bodyInfos = new HashMap<>();
|
||||
private Map<Long, OrderBodyDO> bodyInfoChange(JSONObject dataBody, Long orderId) {
|
||||
Map<Long, OrderBodyDO> bodyInfos = new HashMap<>();
|
||||
|
||||
if (dataBody.getJSONArray("List") != null &&
|
||||
!dataBody.getJSONArray("List").isEmpty()) {
|
||||
@@ -354,7 +373,7 @@ public class ApiTypeRealize {
|
||||
.filename("无")
|
||||
.remark("无")
|
||||
.build();
|
||||
bodyInfos.put(body.getInteger("BoxID"), bodyInfo);
|
||||
bodyInfos.put(body.getLong("BoxID"), bodyInfo);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -366,10 +385,10 @@ public class ApiTypeRealize {
|
||||
/**
|
||||
* JSONArray转List<Integer>
|
||||
*/
|
||||
public List<Integer> jsonArrayToList(JSONArray jsonArray) {
|
||||
List<Integer> list = new ArrayList<>();
|
||||
public List<Long> jsonArrayToList(JSONArray jsonArray) {
|
||||
List<Long> list = new ArrayList<>();
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
list.add(jsonArray.getInteger(i));
|
||||
list.add(jsonArray.getLong(i));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
@@ -384,11 +403,11 @@ public class ApiTypeRealize {
|
||||
* @author Administrator
|
||||
* @date 2024/4/30
|
||||
*/
|
||||
public Map<String, Map<Integer, ?>> partsInfoChange(JSONObject value, Long orderId, Map<Integer, GoodsDO> goodsDOMap, Map<Integer, OrderBodyDO> bodyInfos) {
|
||||
Map<String, Map<Integer, ?>> map = new HashMap<>();
|
||||
Map<Integer, OrderPartsDO> partsInfos = new HashMap<>();
|
||||
Map<Integer, OrderItemDO> partsItem = new HashMap<>();
|
||||
Map<Integer, OrderPartsRemark> remarks =new HashMap<>();
|
||||
public Map<String, Map<Long, ?>> partsInfoChange(JSONObject value, Long orderId, Map<Long, GoodsDO> goodsDOMap, Map<Long, OrderBodyDO> bodyInfos) {
|
||||
Map<String, Map<Long, ?>> map = new HashMap<>();
|
||||
Map<Long, OrderPartsDO> partsInfos = new HashMap<>();
|
||||
Map<Long, OrderItemDO> partsItem = new HashMap<>();
|
||||
Map<Long, OrderPartsRemark> remarks =new HashMap<>();
|
||||
|
||||
if (value != null && !value.isEmpty()) {
|
||||
JSONArray partsLists = value.getJSONArray("List");
|
||||
@@ -398,11 +417,11 @@ public class ApiTypeRealize {
|
||||
OrderPartsDO partsInfo = OrderPartsDO.builder()
|
||||
.id(partsId)
|
||||
.orderId(orderId)
|
||||
.goodsId(String.valueOf(goodsDOMap.get(parts.getInteger("GoodsID")) != null
|
||||
? goodsDOMap.get(parts.getInteger("GoodsID")).getId() : parts.getInteger("GoodsID")))
|
||||
.goodsId(String.valueOf(goodsDOMap.get(parts.getLong("GoodsID")) != null
|
||||
? goodsDOMap.get(parts.getLong("GoodsID")).getId() : parts.getLong("GoodsID")))
|
||||
.name(parts.getString("Name"))
|
||||
.material(String.valueOf(goodsDOMap.get(parts.getInteger("GoodsID")) != null
|
||||
? goodsDOMap.get(parts.getInteger("GoodsID")).getMaterial() : ""))
|
||||
.material(String.valueOf(goodsDOMap.get(parts.getLong("GoodsID")) != null
|
||||
? goodsDOMap.get(parts.getLong("GoodsID")).getMaterial() : ""))
|
||||
.type(parts.getString("ObjectType"))
|
||||
.model(parts.getString("Model"))
|
||||
.spec(parts.getString("Spec"))
|
||||
@@ -413,23 +432,23 @@ public class ApiTypeRealize {
|
||||
.isComposite(parts.getBoolean("IsComposite"))
|
||||
.remark(parts.getString("Remark"))
|
||||
.build();
|
||||
remarks.put(parts.getInteger("DataID"),partsRemarkChange(parts, orderId, partsId));
|
||||
partsInfos.put(parts.getInteger("DataID"), partsInfo);
|
||||
remarks.put(parts.getLong("ItemID"),partsRemarkChange(parts, orderId, partsId));
|
||||
partsInfos.put(parts.getLong("ItemID"), partsInfo);
|
||||
|
||||
// item 明细
|
||||
OrderItemDO item = OrderItemDO.builder()
|
||||
.id((Long) identifierGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.type(OrderItemTypeEnum.PARTS_ITEM.getStatus())
|
||||
.roomId(bodyInfos.get(parts.getInteger("BoxID")).getRoomId())
|
||||
.bodyId(bodyInfos.get(parts.getInteger("BoxID")).getId())
|
||||
.roomId(bodyInfos.get(parts.getLong("BoxID")).getRoomId())
|
||||
.bodyId(bodyInfos.get(parts.getLong("BoxID")).getId())
|
||||
.planId(0L)
|
||||
.packageId(0L)
|
||||
.groupId(0L)
|
||||
.partsId(partsId)
|
||||
.num(parts.getDouble("Num"))
|
||||
.build();
|
||||
partsItem.put(parts.getInteger("DataID"), item);
|
||||
partsItem.put(parts.getLong("ItemID"), item);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,18 +476,18 @@ public class ApiTypeRealize {
|
||||
/**
|
||||
* 板材信息转换 写表 Integer指板材的ItemID板id 加一个板材自定义编号
|
||||
*/
|
||||
private Map<String, Map<Integer, ?>> platesInfoChange(JSONObject value, JSONObject dataPlates, Long orderId,
|
||||
Map<Integer, GoodsDO> goodsDOMap, Map<Integer, OrderBodyDO> bodyInfos,
|
||||
private Map<String, Map<Long, ?>> platesInfoChange(JSONObject value, JSONObject dataPlates, Long orderId,
|
||||
Map<Long, GoodsDO> goodsDOMap, Map<Long, OrderBodyDO> bodyInfos,
|
||||
JSONObject dataBlocks) {
|
||||
// 板材 写ES
|
||||
Map<Integer, PlateDetail> plateDetail = platesDetailChange(value);
|
||||
Map<Long, PlateDetail> plateDetail = platesDetailChange(value);
|
||||
|
||||
// 板材数据
|
||||
Map<Integer, JSONObject> plateMap = getBlocksData(dataBlocks);
|
||||
Map<Long, JSONObject> plateMap = getBlocksData(dataBlocks);
|
||||
|
||||
Map<String, Map<Integer, ?>> map = new HashMap<>();
|
||||
Map<Integer, PlateDO> platesInfos = new HashMap<>();
|
||||
Map<Integer, OrderItemDO> platesItem = new HashMap<>();
|
||||
Map<String, Map<Long, ?>> map = new HashMap<>();
|
||||
Map<Long, PlateDO> platesInfos = new HashMap<>();
|
||||
Map<Long, OrderItemDO> platesItem = new HashMap<>();
|
||||
|
||||
if (dataPlates != null && !dataPlates.isEmpty()) {
|
||||
JSONArray plateLists = dataPlates.getJSONArray("List");
|
||||
@@ -490,12 +509,12 @@ public class ApiTypeRealize {
|
||||
.plateNo((obtainingTime)+ Long.toString(plateNo).substring(2))
|
||||
.type(type)
|
||||
|
||||
.goodsId(goodsDOMap.get(plate.getInteger("GoodsID")) != null
|
||||
? goodsDOMap.get(plate.getInteger("GoodsID")).getId() : plate.getInteger("GoodsID"))
|
||||
.goodsId(goodsDOMap.get(plate.getLong("GoodsID")) != null
|
||||
? goodsDOMap.get(plate.getLong("GoodsID")).getId() : plate.getLong("GoodsID"))
|
||||
// .width(BigDecimal.valueOf(plate.getDouble("CutWidth")))
|
||||
// .height(BigDecimal.valueOf(plate.getDouble("CutWidth")))
|
||||
// .thickness(goodsDOMap.get(plate.getInteger("GoodsID")) != null
|
||||
// ? goodsDOMap.get(plate.getInteger("GoodsID")).getThickness() : BigDecimal.valueOf(0L))
|
||||
// .thickness(goodsDOMap.get(plate.getLong("GoodsID")) != null
|
||||
// ? goodsDOMap.get(plate.getLong("GoodsID")).getThickness() : BigDecimal.valueOf(0L))
|
||||
.splitHeight(BigDecimal.valueOf(plate.getDouble("SpliteHeight")))
|
||||
.splitThickness(BigDecimal.valueOf(plate.getDouble("SpliteThickness")))
|
||||
.splitWidth(BigDecimal.valueOf(plate.getDouble("SpliteWidth")))
|
||||
@@ -503,10 +522,10 @@ public class ApiTypeRealize {
|
||||
.sealRight(BigDecimal.valueOf(plate.getDouble("SealedRight")))
|
||||
.sealUp(BigDecimal.valueOf(plate.getDouble("SealedUp")))
|
||||
.sealDown(BigDecimal.valueOf(plate.getDouble("SealedDown")))
|
||||
.area(plateDetail.get(plate.getInteger("BlockNo")).getSealAcreage())
|
||||
.texture(plateDetail.get(plate.getInteger("BlockNo")).getTexture())
|
||||
.area(plateDetail.get(plate.getLong("BlockNo")).getSealAcreage())
|
||||
.texture(plateDetail.get(plate.getLong("BlockNo")).getTexture())
|
||||
|
||||
.holeFace(plateDetail.get(plate.getInteger("BlockNo")).getTypographicFace()) // 孔面类型
|
||||
.holeFace(plateDetail.get(plate.getLong("BlockNo")).getTypographicFace()) // 孔面类型
|
||||
.holeArrange(0) // 排孔类型 值无实际含义,默认初始化值
|
||||
.unregularPointCount(0)// 异形孔个数 值无实际含义,默认初始化值
|
||||
|
||||
@@ -515,10 +534,10 @@ public class ApiTypeRealize {
|
||||
.sideHoleCount(plate.getInteger("SideHoleCount"))
|
||||
.frontModelCount(plate.getInteger("FrontModelCount"))
|
||||
.backModelCount(plate.getInteger("BackModelCount"))
|
||||
.isDoor(plateDetail.get(plate.getInteger("BlockNo")).getOpenDoorType() == 0)
|
||||
.isDoor(plateDetail.get(plate.getLong("BlockNo")).getOpenDoorType() == 0)
|
||||
.openDoorType(plate.getInteger("OpenDoorType"))
|
||||
.offsetX(plateDetail.get(plate.getInteger("BlockNo")).getOffsetX())
|
||||
.offsetY(plateDetail.get(plate.getInteger("BlockNo")).getOffsetY())
|
||||
.offsetX(plateDetail.get(plate.getLong("BlockNo")).getOffsetX())
|
||||
.offsetY(plateDetail.get(plate.getLong("BlockNo")).getOffsetY())
|
||||
.isArcAcross(false)
|
||||
.moduleTypeId(0L)
|
||||
.isSculpt(plate.getBoolean("IsModel"))
|
||||
@@ -532,8 +551,8 @@ public class ApiTypeRealize {
|
||||
.id((Long) identifierGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(bodyInfos.get(plate.getInteger("BoxID")).getRoomId())
|
||||
.bodyId(bodyInfos.get(plate.getInteger("BoxID")).getId())
|
||||
.roomId(bodyInfos.get(plate.getLong("BoxID")).getRoomId())
|
||||
.bodyId(bodyInfos.get(plate.getLong("BoxID")).getId())
|
||||
.planId(0L)
|
||||
.packageId(0L)
|
||||
.groupId(0L)
|
||||
@@ -542,29 +561,29 @@ public class ApiTypeRealize {
|
||||
.num(1.0)
|
||||
.build();
|
||||
|
||||
if (plateDetail.get(plate.getInteger("BlockNo")) != null) {
|
||||
plateDetail.get(plate.getInteger("BlockNo")).setPlateId(plateId)
|
||||
if (plateDetail.get(plate.getLong("BlockNo")) != null) {
|
||||
plateDetail.get(plate.getLong("BlockNo")).setPlateId(plateId)
|
||||
.setExtraRemark(plate.getString("ExtraRemark"))
|
||||
.setSpecialRemarkDei(plate.getString("SpecialRemark"))
|
||||
.setExtraHandleRemark(plate.getString("ExtraHandleRemark"))
|
||||
.setDrillsRemark(plate.getString("DrillsRemark"))
|
||||
.setInfoRemark(plate.getString("InfoRemark"))
|
||||
.setRemarkJsonDei(plate.getString("RemarkJson"));
|
||||
plateInfo.setRemark(plateDetail.get(plate.getInteger("BlockNo")).getRemark() != null ?
|
||||
plateDetail.get(plate.getInteger("BlockNo")).getRemark().toString() : "");
|
||||
plateInfo.setRemark(plateDetail.get(plate.getLong("BlockNo")).getRemark() != null ?
|
||||
plateDetail.get(plate.getLong("BlockNo")).getRemark().toString() : "");
|
||||
}
|
||||
if (plateMap.get(plate.getInteger("BlockNo")) != null) {
|
||||
JSONObject jsonObject = plateMap.get(plate.getInteger("BlockNo"));
|
||||
if (plateMap.get(plate.getLong("BlockNo")) != null) {
|
||||
JSONObject jsonObject = plateMap.get(plate.getLong("BlockNo"));
|
||||
plateInfo.setHeight(BigDecimal.valueOf(jsonObject.getDouble("Height")))
|
||||
.setWidth(BigDecimal.valueOf(jsonObject.getDouble("Width")))
|
||||
.setThickness(BigDecimal.valueOf(jsonObject.getDouble("Thickness")))
|
||||
.setArea(BigDecimal.valueOf(jsonObject.getDouble("Area")));
|
||||
plateDetail.get(plate.getInteger("BlockNo"))
|
||||
plateDetail.get(plate.getLong("BlockNo"))
|
||||
.setRemarkJson(jsonObject.getString("RemarkJson"))
|
||||
.setSpecialRemark(jsonObject.getString("SpecialRemark"));
|
||||
}
|
||||
platesInfos.put(plate.getInteger("ItemID"), plateInfo);
|
||||
platesItem.put(plate.getInteger("ItemID"), itemPlate);
|
||||
platesInfos.put(plate.getLong("ItemID"), plateInfo);
|
||||
platesItem.put(plate.getLong("ItemID"), itemPlate);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -597,13 +616,13 @@ public class ApiTypeRealize {
|
||||
/**
|
||||
* 板材数据转换成 Map<String, Object>
|
||||
*/
|
||||
public Map<Integer, JSONObject> getBlocksData(JSONObject dataBlocks) {
|
||||
Map<Integer, JSONObject> map = new HashMap<>();
|
||||
public Map<Long, JSONObject> getBlocksData(JSONObject dataBlocks) {
|
||||
Map<Long, JSONObject> map = new HashMap<>();
|
||||
JSONArray ordersArray = dataBlocks.getJSONArray("List");
|
||||
if (ordersArray != null && !ordersArray.isEmpty()) {
|
||||
for (int i = 0; i < ordersArray.size(); i++) {
|
||||
JSONObject block = ordersArray.getJSONObject(i);
|
||||
map.put(block.getInteger("BlockNo"), block);
|
||||
map.put(block.getLong("BlockNo"), block);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
@@ -612,8 +631,8 @@ public class ApiTypeRealize {
|
||||
/**
|
||||
* 板材设计数据转换成PlateDetail Integer指BlockID板id
|
||||
*/
|
||||
public Map<Integer, PlateDetail> platesDetailChange(JSONObject dataPlates) {
|
||||
Map<Integer, PlateDetail> plateDetails = new HashMap<>();
|
||||
public Map<Long, PlateDetail> platesDetailChange(JSONObject dataPlates) {
|
||||
Map<Long, PlateDetail> plateDetails = new HashMap<>();
|
||||
// 获取 Orders 字段对应的数组
|
||||
JSONArray ordersArray = dataPlates.getJSONArray("Orders");
|
||||
// System.err.println(dataPlates);
|
||||
@@ -674,7 +693,7 @@ public class ApiTypeRealize {
|
||||
.setRemark(remarkToMap(block))
|
||||
.setSideRemark(edgeRemarkToMap(block.getJSONObject("ExtraRemark").getJSONObject("extra")));
|
||||
}
|
||||
plateDetails.put(block.getInteger("BlockNo"), plateDetail);
|
||||
plateDetails.put(block.getLong("BlockNo"), plateDetail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -4,9 +4,9 @@
|
||||
|
||||
|
||||
<select id="selectPlatesDetailByOrderId" resultType="com.cf.imes.module.executor.controller.admin.plate.vo.PlateRespVO">
|
||||
SELECT i.order_id, p.id, p.plate_no, g.material, p.name, p.area, p.seal_left, p.seal_down,
|
||||
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,gp.name
|
||||
p.back_hole_count, p.side_hole_count,p.width,p.height,p.thickness
|
||||
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
|
||||
@@ -27,7 +27,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectPartsDetailByOrderId" resultType="com.cf.imes.module.executor.controller.admin.orderParts.vo.OrderPartsRespVO">
|
||||
SELECT i.order_id, p.id, p.model, p.spec, p.name,i.num, p.unit, p.brand, p.factory, p.remark,p.type,p.price,
|
||||
SELECT DISTINCT i.order_id, p.id, p.model, p.spec, p.name,i.num, p.unit, p.brand, p.factory, p.remark,p.type,p.price,
|
||||
p.is_composite,p.create_time
|
||||
FROM order_item i
|
||||
RIGHT JOIN `order_parts` p ON i.parts_id = p.id
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<select id="selectPartsByOrderId"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.order.vo.order.OrderPlatesDetailRespVO">
|
||||
SELECT 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
|
||||
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}
|
||||
|
||||
+7
-8
@@ -16,7 +16,7 @@
|
||||
|
||||
<select id="selectPartDetail"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.orderParts.vo.PartGoodsRespVO">
|
||||
SELECT a.id,
|
||||
SELECT DISTINCT a.id,
|
||||
a.goods_id,
|
||||
a.name,
|
||||
a.material,
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<select id="selectPartAll"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.orderParts.vo.PartGoodsRespVO">
|
||||
SELECT
|
||||
SELECT DISTINCT
|
||||
a.name,
|
||||
a.brand,
|
||||
a.model,
|
||||
@@ -68,10 +68,7 @@
|
||||
<update id="updateDeletedById">
|
||||
UPDATE order_parts
|
||||
SET deleted = #{deleted}
|
||||
WHERE id IN (
|
||||
SELECT parts_id FROM order_item
|
||||
WHERE body_id = #{bodyId} AND organ_id = #{organId}
|
||||
)
|
||||
WHERE id IN #{bodyIds} AND organ_id = #{organId}
|
||||
</update>
|
||||
|
||||
|
||||
@@ -102,8 +99,10 @@
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="selectPartsIdListByBodyId" resultType="java.lang.Long">
|
||||
SELECT parts_id FROM order_item
|
||||
WHERE body_id = #{bodyId} AND organ_id = #{organId}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
+6
-5
@@ -50,7 +50,7 @@
|
||||
|
||||
<select id="selectProductList"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.plate.vo.PlateRespVO">
|
||||
SELECT a.id, a.plate_no, a.height, a.thickness, a.width, a.name, a.area, a.seal_left, a.seal_right,
|
||||
SELECT DISTINCT a.id, a.plate_no, a.height, a.thickness, a.width, a.name, a.area, a.seal_left, a.seal_right,
|
||||
a.seal_up, a.seal_down, a.texture, a.hole_face, a.hole_arrange, a.unregular_point_count, a.front_hole_count, a.back_hole_count,
|
||||
a.side_hole_count, a.front_model_count, a.back_model_count, a.remark, c.material, c.color
|
||||
FROM order_plate a
|
||||
@@ -270,10 +270,7 @@
|
||||
<update id="updateDeletedById">
|
||||
UPDATE order_plate
|
||||
SET deleted = #{deleted}
|
||||
WHERE id IN (
|
||||
SELECT plate_id FROM order_item
|
||||
WHERE body_id = #{bodyId} AND organ_id = #{organId}
|
||||
)
|
||||
WHERE id IN #{bodyIds} AND organ_id = #{organId}
|
||||
</update>
|
||||
<select id="countPlateByOrderId" resultType="java.lang.Integer">
|
||||
SELECT count(*) FROM order_plate
|
||||
@@ -305,4 +302,8 @@
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectPlateIdListByBodyId" resultType="java.lang.Long">
|
||||
SELECT plate_id FROM order_item
|
||||
WHERE body_id = #{bodyId} AND organ_id = #{organId}
|
||||
</select>
|
||||
</mapper>
|
||||
+2
@@ -8,4 +8,6 @@ package com.cf.imes.module.manage.enums;
|
||||
public interface DictTypeConstants {
|
||||
|
||||
String SYNTHESIS_TYPE = "synthesisType";//加工组类型
|
||||
|
||||
String PLATE_TEXTURE = "product_manger_texture_type";// 板件纹路
|
||||
}
|
||||
|
||||
-1
@@ -1,7 +1,6 @@
|
||||
package com.cf.imes.module.manage.service.plate;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.cf.imes.framework.common.exception.ServiceException;
|
||||
import com.cf.imes.framework.common.exception.util.ServiceExceptionUtil;
|
||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||
import com.cf.imes.framework.organ.core.context.OrganContextHolder;
|
||||
|
||||
+1
-1
@@ -123,7 +123,7 @@ public class ProcessGroupServiceImpl implements ProcessGroupService {
|
||||
|
||||
// 判断是否在生产中使用这个加工组
|
||||
private void checkProcessGroupUsed(Long id) {
|
||||
if (orderProcessApi.getOrderProcessByProcessGroupId(id) != null){
|
||||
if (orderProcessApi.getOrderProcessByProcessGroupId(id).getData()){
|
||||
throw exception(PROCESS_GROUP_USED);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user