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:
+2
-2
@@ -123,12 +123,12 @@ public class OptimizationSavePlateReqVO {
|
||||
|
||||
|
||||
@Schema(description = "备注1")
|
||||
@Length(max = 127, message = "备注长度不能超过 127 个字符")
|
||||
@Length(max = 127, message = "备注1长度不能超过 127 个字符")
|
||||
private String remake1;
|
||||
|
||||
|
||||
@Schema(description = "备注2")
|
||||
@Length(max = 127, message = "备注长度不能超过 127 个字符")
|
||||
@Length(max = 127, message = "备注2长度不能超过 127 个字符")
|
||||
private String remake2;
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -18,6 +18,7 @@ import com.cf.imes.module.executor.controller.admin.plan.bo.OrderIds;
|
||||
import com.cf.imes.module.executor.controller.admin.plan.vo.OrderGoodsResp;
|
||||
import com.cf.imes.module.executor.controller.admin.plan.vo.OrderPageReqVOCopy;
|
||||
import com.cf.imes.module.executor.controller.admin.plan.vo.OrderRespVOCopy;
|
||||
import com.cf.imes.module.executor.controller.admin.plan.vo.PlanOrderRespVO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
||||
import com.cf.imes.module.executor.enums.OrderDeletedEnum;
|
||||
import com.cf.imes.module.executor.enums.OrderStatusEnum;
|
||||
@@ -280,4 +281,5 @@ public interface OrderMapper extends BaseMapperX<OrderDO> {
|
||||
}
|
||||
|
||||
|
||||
List<PlanOrderRespVO> selectPlanOrderList(@Param("planIds") List<Long> planIds, @Param("organId") Long organId);
|
||||
}
|
||||
|
||||
+1
-10
@@ -37,7 +37,6 @@ public interface PlanMapper extends BaseMapperX<PlanDO> {
|
||||
.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())
|
||||
.likeIfPresent(PlanDO::getOrderNos, reqVO.getOrderNos())
|
||||
@@ -45,14 +44,11 @@ public interface PlanMapper extends BaseMapperX<PlanDO> {
|
||||
.betweenIfPresent(PlanDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(PlanDO::getOperator, reqVO.getOperator())
|
||||
.betweenIfPresent(PlanDO::getProduceTime, reqVO.getProduceTime())
|
||||
|
||||
// todo 如果后续生产单加入排单状态,这里可以更改只连 orders 表
|
||||
.leftJoin(GoodsDO.class, GoodsDO::getPlanId, PlanDO::getId)
|
||||
// .leftJoin(OrderItemDO.class, OrderItemDO::getId, PlanItemDO::getItemId)
|
||||
.leftJoin(OrderDO.class, OrderDO::getId, GoodsDO::getOrderId)
|
||||
.like(OrderDO::getCustomer, reqVO.getCustomer())
|
||||
// .orderBy(true, true, PlanDO::getSort)
|
||||
.orderByDesc(PlanDO::getCreateTime)
|
||||
.distinct()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -63,7 +59,6 @@ public interface PlanMapper extends BaseMapperX<PlanDO> {
|
||||
.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())
|
||||
.likeIfPresent(PlanDO::getOrderNos, reqVO.getOrderNos())
|
||||
@@ -71,7 +66,6 @@ public interface PlanMapper extends BaseMapperX<PlanDO> {
|
||||
.betweenIfPresent(PlanDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(PlanDO::getOperator, reqVO.getOperator())
|
||||
.betweenIfPresent(PlanDO::getProduceTime, reqVO.getProduceTime())
|
||||
// .orderBy(true, true, PlanDO::getSort)
|
||||
.orderByDesc(PlanDO::getCreateTime));
|
||||
}
|
||||
|
||||
@@ -124,7 +118,4 @@ public interface PlanMapper extends BaseMapperX<PlanDO> {
|
||||
|
||||
|
||||
|
||||
|
||||
// List<PlanDO> seleTestSQL(@Param("sql") String sql);
|
||||
|
||||
}
|
||||
-6
@@ -1,12 +1,8 @@
|
||||
package com.cf.imes.module.executor.dal.mysql.planitem;
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.module.executor.controller.admin.plan.vo.PlanOrderRespVO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.planitem.PlanItemDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产单开料排单明细 Mapper
|
||||
@@ -17,6 +13,4 @@ import java.util.List;
|
||||
public interface PlanItemMapper extends BaseMapperX<PlanItemDO> {
|
||||
|
||||
|
||||
List<PlanOrderRespVO> selectOrderList(@Param("planIds") List<Long> planIds, @Param("organId") Long userOrganId);
|
||||
|
||||
}
|
||||
-1
@@ -389,7 +389,6 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
||||
}
|
||||
|
||||
|
||||
// todo 待确认,是否要达到这样的需求 : 生产单的状态也应该更改,如果大板变为未开料,生产单对应的状态应该变为已排单(这时取消开料对应的大板对应的生产单应该在其他排单中不存在,可修改)
|
||||
|
||||
}
|
||||
|
||||
|
||||
-11
@@ -301,17 +301,6 @@ public class OrderServiceImpl implements OrderService {
|
||||
|
||||
AssertUtils.notEmpty(orderDO,ORDER_NOT_EXISTS);
|
||||
|
||||
// List<Long> bodyIds = new ArrayList<>();
|
||||
//
|
||||
// Integer index = status == 1 ? 0 : 1;
|
||||
//
|
||||
// if (roomIds != null && !roomIds.isEmpty()) {
|
||||
// bodyIds = orderBodyMapper.selectBodyIdByRoomId(orderId, roomIds, getUserOrganId(), index);
|
||||
// } else if (bodyId != null && bodyId != 0) {
|
||||
// validateOrderBodyExists(orderId, bodyId, getUserOrganId(), roomIds,index);
|
||||
// bodyIds.add(bodyId);
|
||||
// }
|
||||
|
||||
|
||||
List<Long> bodyIds = validateOrderBodyExists(orderId, bodyId, getUserOrganId(), roomIds, OrderDeletedEnum.DELETED.getStatus());
|
||||
|
||||
|
||||
+2
-62
@@ -289,69 +289,9 @@ public class PlanServiceImpl implements PlanService {
|
||||
planMapper.updateById(plan);
|
||||
|
||||
|
||||
|
||||
// // todo 目前只解决非混单的情况,混单的情况待解决,这个逻辑目前应该不用(这个逻辑用于判断大板下的小板是否开料,后期应该可用于混单时增加的判断),排单是否开料判断了,可保留,万一以后需求更改
|
||||
// if(!updateReqVO.getItemList().isEmpty()){
|
||||
//
|
||||
// List<OptimizeBoardModelDO> optimizeBoardModelDOS = buildBoardByPlanId(plan.getId(), ORDER_REMAIN_PLATE_MODEL, 10);
|
||||
//
|
||||
// OptimizeBoardModelDO optimizeBoardModelDO = optimizeBoardModelDOS.get(0);
|
||||
//
|
||||
// List<Long> goodsNo = optimizeBoardModelDO.getCutedBoardInfo().getCutedBoardList();
|
||||
//
|
||||
// List<Long> plateNo = new ArrayList<>();
|
||||
//
|
||||
// // 创建一个列表存储 BlockPlaceInfo 对象,将优化的小板信息拿出,获取到小板编号,查询生产单,修改生产单的状态
|
||||
// List<BlockPlaceInfo> outputList = new ArrayList<>();
|
||||
//
|
||||
// ObjectMapper mapper = new ObjectMapper();
|
||||
//
|
||||
// try {
|
||||
// // 解析 JSON 字符串
|
||||
// JsonNode jsonArray = mapper.readTree(optimizeBoardModelDO.getBlockPlaceInfo());
|
||||
//
|
||||
// // 遍历 JSON 数组并提取所需字段
|
||||
// if (jsonArray.isArray()) {
|
||||
// for (JsonNode jsonNode : jsonArray) {
|
||||
// Long bi = jsonNode.get("bi").asLong();
|
||||
// Long bo = jsonNode.get("bo").asLong();
|
||||
// outputList.add(new BlockPlaceInfo(bi,bo));
|
||||
// }
|
||||
// }
|
||||
// } catch (JsonProcessingException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// for (Long goods : goodsNo) {
|
||||
// plateNo.addAll(outputList.stream().filter(f -> f.getBi().equals(goods)).map(BlockPlaceInfo::getBo).distinct().toList());
|
||||
// }
|
||||
//
|
||||
// if(updateReqVO.getDeleteIds() != null) {
|
||||
//
|
||||
// List<PlateDO> plateDOS = plateMapper.selectPlateListByGoodsIds(updateReqVO.getDeleteIds(), getUserOrganId());
|
||||
//
|
||||
// List<Long> deletePlateNos = plateDOS.stream().map(PlateDO::getPlateNo).map(Long::valueOf).toList();
|
||||
//
|
||||
// List<Long> plateNoCopyList = new ArrayList<>(plateNo);
|
||||
//
|
||||
// // 使用retainAll方法保留 plateNo 中与 deletePlateNos 相同的元素
|
||||
// plateNoCopyList.retainAll(deletePlateNos);
|
||||
//
|
||||
// // 如果 plateNoCopyList 不为空,说明两个List有共同的元素
|
||||
// boolean b = !plateNoCopyList.isEmpty();
|
||||
//
|
||||
// if (b) {
|
||||
//
|
||||
// throw exception(THE_BOARD_HAS_BEEN_CUT_INTO_PIECES);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deletePlan(List<Long> ids) {
|
||||
@@ -510,7 +450,7 @@ public class PlanServiceImpl implements PlanService {
|
||||
|
||||
|
||||
// 获取排单对应的生产单的信息
|
||||
List<PlanOrderRespVO> planOrderRespVOS = planItemMapper.selectOrderList(planIds, getUserOrganId());
|
||||
List<PlanOrderRespVO> planOrderRespVOS = orderMapper.selectPlanOrderList(planIds, getUserOrganId());
|
||||
|
||||
|
||||
PageResult<PlanRespVO> planRespVOPageResult = BeanUtils.toBean(planDOPageResult, PlanRespVO.class);
|
||||
|
||||
+32
@@ -285,4 +285,36 @@
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectPlanOrderList"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.plan.vo.PlanOrderRespVO">
|
||||
|
||||
|
||||
select distinct
|
||||
o.id,
|
||||
og.plan_id,
|
||||
o.order_date,
|
||||
o.delivery_date,
|
||||
o.custom_order_no,
|
||||
o.customer,
|
||||
o.address,
|
||||
o.phone_number,
|
||||
o.salesman,
|
||||
o.splitter,
|
||||
o.remark
|
||||
from orders o
|
||||
|
||||
left join order_goods og on o.organ_id = og.organ_id and o.id = og.order_id
|
||||
|
||||
where og.organ_id = #{organId}
|
||||
and og.deleted = false
|
||||
and og.plan_id in
|
||||
<foreach collection="planIds" item="ids" open="(" close=")" separator=",">
|
||||
#{ids}
|
||||
</foreach>
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
-31
@@ -5,36 +5,5 @@
|
||||
|
||||
|
||||
|
||||
<select id="selectOrderList"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.plan.vo.PlanOrderRespVO">
|
||||
|
||||
|
||||
|
||||
select distinct
|
||||
o.id,
|
||||
og.plan_id,
|
||||
o.order_date,
|
||||
o.delivery_date,
|
||||
o.custom_order_no,
|
||||
o.customer,
|
||||
o.address,
|
||||
o.phone_number,
|
||||
o.salesman,
|
||||
o.splitter,
|
||||
o.remark
|
||||
from orders o
|
||||
|
||||
left join order_goods og on o.organ_id = og.organ_id and o.id = og.order_id
|
||||
|
||||
where og.organ_id = #{organId}
|
||||
|
||||
and og.plan_id in
|
||||
<foreach collection="planIds" item="ids" open="(" close=")" separator=",">
|
||||
#{ids}
|
||||
</foreach>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user