零件采购订单计划
This commit is contained in:
parent
da94a7b417
commit
2ec805965f
@ -2,6 +2,7 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermake;
|
|||||||
|
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermake.vo.PartPurchaseOrderPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermake.vo.PartPurchaseOrderPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermakedetail.vo.PurchaseOrderMakeDetailRespVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermakedetail.vo.PurchaseOrderMakeDetailRespVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordermakedetail.PurchaseOrderMakeDetailDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.partpurchaseorder.PartPurchaseOrderService;
|
import com.chanko.yunxi.mes.module.heli.service.partpurchaseorder.PartPurchaseOrderService;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -101,12 +102,12 @@ public class PurchaseOrderMakeController {
|
|||||||
@GetMapping("/getPartPurchaseOrderPage")
|
@GetMapping("/getPartPurchaseOrderPage")
|
||||||
@Operation(summary = "获得零件采购订单生成分页")
|
@Operation(summary = "获得零件采购订单生成分页")
|
||||||
// @PreAuthorize("@ss.hasPermission('heli:material-plan:query')")
|
// @PreAuthorize("@ss.hasPermission('heli:material-plan:query')")
|
||||||
public CommonResult<PageResult<PurchaseOrderMakeDetailRespVO>> getPartPurchaseOrderPage(@Valid PartPurchaseOrderPageReqVO partPurchaseOrderPageReqVO) {
|
public CommonResult<PageResult<PurchaseOrderMakeDetailDO>> getPartPurchaseOrderPage(@Valid PartPurchaseOrderPageReqVO partPurchaseOrderPageReqVO) {
|
||||||
// PageResult<TaskDispatchDetailDO> pageResult = materialPlanService.getPartPage(pageReqVO);
|
// PageResult<TaskDispatchDetailDO> pageResult = materialPlanService.getPartPage(pageReqVO);
|
||||||
// return success(pageResult);
|
// return success(pageResult);
|
||||||
|
|
||||||
|
PageResult<PurchaseOrderMakeDetailDO> pageResult = partPurchaseOrderService.getPartPurchaseOrderPage(partPurchaseOrderPageReqVO);
|
||||||
return null;
|
return success(pageResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,16 @@ package com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseordermakedetail;
|
|||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.alibaba.excel.util.StringUtils;
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermake.vo.PartPurchaseOrderPageReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordermake.PurchaseOrderMakeDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordermakedetail.PurchaseOrderMakeDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordermakedetail.PurchaseOrderMakeDetailDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||||
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermakedetail.vo.*;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermakedetail.vo.*;
|
||||||
|
|
||||||
@ -51,4 +57,18 @@ public interface PurchaseOrderMakeDetailMapper extends BaseMapperX<PurchaseOrder
|
|||||||
.orderByDesc(PurchaseOrderMakeDetailDO::getId));
|
.orderByDesc(PurchaseOrderMakeDetailDO::getId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default PageResult<PurchaseOrderMakeDetailDO> selectPartPurchaseOrderPage(PartPurchaseOrderPageReqVO pageReqVO) {
|
||||||
|
MPJLambdaWrapper<PurchaseOrderMakeDetailDO> query = new MPJLambdaWrapper<>();
|
||||||
|
query.selectAll(PurchaseOrderMakeDetailDO.class)
|
||||||
|
.leftJoin(PurchaseOrderMakeDO.class,"a",PurchaseOrderMakeDO::getId,PurchaseOrderMakeDetailDO::getPurchaseOrderId)
|
||||||
|
.disableLogicDel()
|
||||||
|
.disableSubLogicDel()
|
||||||
|
.eq(PurchaseOrderMakeDO::getGoodsType, 2)
|
||||||
|
.eq(StringUtils.isNotBlank(pageReqVO.getProjectName()), PurchaseOrderMakeDO::getProjectName, pageReqVO.getProjectName())
|
||||||
|
.eq(StringUtils.isNotBlank(pageReqVO.getProjectSubName()), PurchaseOrderMakeDetailDO::getName, pageReqVO.getProjectSubName())
|
||||||
|
.eq(StringUtils.isNotBlank(pageReqVO.getMaterialName()), PurchaseOrderMakeDetailDO::getBoomName, pageReqVO.getMaterialName())
|
||||||
|
.eq(Objects.nonNull(pageReqVO.getStatus()), PurchaseOrderMakeDetailDO::getOrderStatus, pageReqVO.getStatus());
|
||||||
|
return selectPage(pageReqVO, query);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -5,6 +5,7 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermake.vo.Pa
|
|||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermake.vo.PurchaseOrderMakePageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermake.vo.PurchaseOrderMakePageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermakedetail.vo.PurchaseOrderMakeDetailRespVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermakedetail.vo.PurchaseOrderMakeDetailRespVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordermake.PurchaseOrderMakeDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordermake.PurchaseOrderMakeDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordermakedetail.PurchaseOrderMakeDetailDO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 零件采购订单 Service 接口
|
* 零件采购订单 Service 接口
|
||||||
@ -18,6 +19,6 @@ public interface PartPurchaseOrderService {
|
|||||||
* @param pageReqVO 分页查询
|
* @param pageReqVO 分页查询
|
||||||
* @return 零件采购订单生成分页
|
* @return 零件采购订单生成分页
|
||||||
*/
|
*/
|
||||||
PageResult<PurchaseOrderMakeDetailRespVO> getPartPurchaseOrderPage(PartPurchaseOrderPageReqVO pageReqVO);
|
PageResult<PurchaseOrderMakeDetailDO> getPartPurchaseOrderPage(PartPurchaseOrderPageReqVO pageReqVO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,16 +3,26 @@ package com.chanko.yunxi.mes.module.heli.service.partpurchaseorder;
|
|||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermake.vo.PartPurchaseOrderPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermake.vo.PartPurchaseOrderPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermakedetail.vo.PurchaseOrderMakeDetailRespVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermakedetail.vo.PurchaseOrderMakeDetailRespVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordermakedetail.PurchaseOrderMakeDetailDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseordermake.PurchaseOrderMakeMapper;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseordermakedetail.PurchaseOrderMakeDetailMapper;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Validated
|
@Validated
|
||||||
public class PartPurchaseOrderServiceImpl implements PartPurchaseOrderService{
|
public class PartPurchaseOrderServiceImpl implements PartPurchaseOrderService{
|
||||||
|
@Resource
|
||||||
|
private PurchaseOrderMakeMapper purchaseOrderMakeMapper;
|
||||||
|
@Resource
|
||||||
|
private PurchaseOrderMakeDetailMapper purchaseOrderMakeDetailMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<PurchaseOrderMakeDetailRespVO> getPartPurchaseOrderPage(PartPurchaseOrderPageReqVO pageReqVO) {
|
public PageResult<PurchaseOrderMakeDetailDO> getPartPurchaseOrderPage(PartPurchaseOrderPageReqVO pageReqVO) {
|
||||||
return null;
|
|
||||||
|
return purchaseOrderMakeDetailMapper.selectPartPurchaseOrderPage(pageReqVO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card class="hl-card">
|
<el-card class="hl-card">
|
||||||
<template #header>
|
<template #header>
|
||||||
<span>零件采购订单计划</span>
|
<span>零件采购订单生成</span>
|
||||||
</template>
|
</template>
|
||||||
<ContentWrap class="borderxx">
|
<ContentWrap class="borderxx">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
@ -192,28 +192,28 @@ const submitForm = async () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. 检查子项目一致性
|
// 2. 检查供应商一致性
|
||||||
const firstProjectSubId = list[0].projectSubId;
|
const firstSupplierId = list[0].supplierId;
|
||||||
if (list.some(item => item.projectSubId !== firstProjectSubId)) {
|
if (list.some(item => item.supplierId !== firstSupplierId)) {
|
||||||
message.error("零件明细不属于同一个子项目,请确认");
|
message.error("零件采购订单不属于同一个供应商,请确认");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. 校验每个零件
|
// // 3. 校验每个零件
|
||||||
for (const item of list) {
|
// for (const item of list) {
|
||||||
if (item.projectMaterialPlanNo) {
|
// if (item.projectMaterialPlanNo) {
|
||||||
message.error(`工序${item.procedureName}中零件 ${item.materialName} 已生成物料需求计划,请确认`);
|
// message.error(`工序${item.procedureName}中零件 ${item.materialName} 已生成物料需求计划,请确认`);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
if (!item.boomArriveDate) { // 注意:原代码是 boomArriveDate,确保拼写正确
|
// if (!item.boomArriveDate) { // 注意:原代码是 boomArriveDate,确保拼写正确
|
||||||
message.error(`工序${item.procedureName}中零件 ${item.materialName} 要求完成日期为空,请确认`);
|
// message.error(`工序${item.procedureName}中零件 ${item.materialName} 要求完成日期为空,请确认`);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
if (!item.duEmpId) {
|
// if (!item.duEmpId) {
|
||||||
message.error(`工序${item.procedureName}中零件 ${item.materialName} 责任人为空,请确认`);
|
// message.error(`工序${item.procedureName}中零件 ${item.materialName} 责任人为空,请确认`);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 4. 添加加载状态(Element Plus 兼容处理)
|
// 4. 添加加载状态(Element Plus 兼容处理)
|
||||||
formLoading.value = true;
|
formLoading.value = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user