diff --git a/ant-design-vue-jeecg/src/views/productplan/ProductplanManage.vue b/ant-design-vue-jeecg/src/views/productplan/ProductplanManage.vue new file mode 100644 index 00000000..dc64f755 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/productplan/ProductplanManage.vue @@ -0,0 +1,324 @@ + + + diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue index a4c2a0f4..d201af77 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue @@ -146,6 +146,7 @@ import {JeecgListMixin} from '@/mixins/JeecgListMixin' import ZyProductPlanModal from './modules/ZyProductPlanModal' import {getAction, putAction, httpAction, postAction} from "@api/manage"; import {filterObj} from "@/utils/util"; +import Area from "@comp/_util/Area"; export default { name: 'ZyProductPlanList', @@ -281,11 +282,12 @@ export default { // }, }, methods: { + jumpPage1(record) { this.$router.push({ - path: '/team/StationMachineList', + path: '/productplan/ProductplanManage', query: { // 路由携带参数 - 'plan': record.id, + 'planId': record.id, // 'stationName': record.stationName, // 'stationNum': record.stationNum, // 'departName': record.departName, diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java index 3a3a8d48..f3d062ee 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java @@ -32,6 +32,7 @@ import javax.servlet.http.HttpServletResponse; import java.util.Arrays; import java.util.LinkedList; import java.util.List; +import java.util.Map; /** * @Description: 生产计划工序 @@ -122,6 +123,14 @@ public class ZyPlanProcessController extends JeecgController getPlanInfo(ZyPlanProcess zyPlanProcess, + HttpServletRequest req) { + Map map = zyPlanProcessService.getPlanInfo(zyPlanProcess); + return Result.OK(map); + } + @ApiOperation(value = "计划班组管理-查询产品工序&班组", notes = "计划班组管理-查询产品工序&班组") @GetMapping(value = "/getTeamDatalist") public Result getTeamDatalist(ZyPlanProcess zyPlanProcess, diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessService.java index bf2bdbbf..cb06820e 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessService.java @@ -6,6 +6,7 @@ import org.jeecg.modules.productplan.entity.ZyPlanProcess; import org.jeecg.modules.productplan.entity.vo.ProcessDataVo; import java.util.List; +import java.util.Map; /** * @Description: 生产计划工序 @@ -16,6 +17,7 @@ import java.util.List; public interface IZyPlanProcessService extends IService { List getProcessDatalist(ZyPlanProcess zyPlanProcess); + Map getPlanInfo(ZyPlanProcess zyPlanProcess); List getTeamDatalist(ZyPlanProcess zyPlanProcess); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java index c9c82979..b08dfc98 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java @@ -6,10 +6,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.apache.commons.lang3.StringUtils; import org.jeecg.common.exception.JeecgBootException; import org.jeecg.modules.demo.base.service.IZyProcessService; +import org.jeecg.modules.demo.ordergoods.entity.OrderGoods; +import org.jeecg.modules.demo.ordergoods.service.IOrderGoodsService; +import org.jeecg.modules.demo.zyorders.entity.ZyOrders; +import org.jeecg.modules.demo.zyorders.service.IZyOrdersService; import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess; import org.jeecg.modules.product.zyproductprocess.service.IZyProductProcessService; import org.jeecg.modules.productplan.entity.ZyPlanProcess; import org.jeecg.modules.productplan.entity.ZyProductPlan; +import org.jeecg.modules.productplan.entity.vo.PaiWeiTuVo; import org.jeecg.modules.productplan.entity.vo.ProcessDataVo; import org.jeecg.modules.productplan.mapper.ZyPlanProcessMapper; import org.jeecg.modules.productplan.service.IZyPlanProcessService; @@ -18,6 +23,7 @@ import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.service.ISysDepartService; import org.jeecg.modules.system.service.ISysUserService; +import org.jeecg.modules.team.entity.Groupx; import org.jeecg.modules.team.entity.GroupxMember; import org.jeecg.modules.team.entity.Station; import org.jeecg.modules.team.service.IGroupxMemberService; @@ -25,17 +31,20 @@ import org.jeecg.modules.team.service.IGroupxService; import org.jeecg.modules.team.service.IStationService; import org.jeecg.modules.team.vo.GroupxMemeberVo; import org.jeecg.modules.team.vo.StationVo; +import org.jeecg.modules.workorder.entity.WorkOrder; +import org.jeecg.modules.workorder.service.IWorkOrderService; import org.jeecg.modules.workproduct.entity.ZyProduct; import org.jeecg.modules.workproduct.service.IZyProductService; -import org.springframework.beans.BeanUtils; +import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle; +import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.ObjectUtils; -import java.util.ArrayList; +import java.util.HashMap; import java.util.LinkedList; import java.util.List; -import java.util.Optional; +import java.util.Map; /** @@ -56,9 +65,24 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl stationList = iStationService.list(new LambdaQueryWrapper().eq(Station::getDepartId, departId)); List stationVoList = new LinkedList<>(); if (!ObjectUtils.isEmpty(stationList)) { @@ -131,13 +155,68 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl getPlanInfo(ZyPlanProcess planProcess) { + //生产计划id + String planId = planProcess.getPlanId(); + ZyProductPlan zyProductPlan = iZyProductPlanService.getById(planId); + if (ObjectUtils.isEmpty(zyProductPlan)) { + throw new JeecgBootException("生产计划不存在!"); + } + + //工单id + String workOrderId = zyProductPlan.getProductCode(); + String departId = zyProductPlan.getWorkshopId(); + ZyProduct zyProduct = iZyProductService.getOne(new LambdaQueryWrapper().eq(ZyProduct::getWorkOrderId, workOrderId)); + if (ObjectUtils.isEmpty(zyProduct)) { + throw new JeecgBootException("产品不存在!"); + } + + +// 工单信息 + WorkOrder workOrder = iWorkOrderService.getOne(new LambdaQueryWrapper().eq(WorkOrder::getProductCode, zyProductPlan.getProductCode())); + if (ObjectUtils.isEmpty(workOrder)) + throw new JeecgBootException(zyProductPlan.getProductCode() + "工单信息不存在"); + + String ordersId = workOrder.getOrdersId(); + //订单信息 + OrderGoods orderGoods = iOrderGoodsService.getOne(new LambdaQueryWrapper().eq(OrderGoods::getOrdersId, ordersId)); + if (ObjectUtils.isEmpty(orderGoods)) throw new JeecgBootException(ordersId + "订单商品信息不存在"); + + ZyOrders zyOrders = iZyOrdersService.getOne(new LambdaQueryWrapper().eq(ZyOrders::getId, ordersId)); + if (ObjectUtils.isEmpty(zyOrders)) throw new JeecgBootException(ordersId + "订单信息不存在"); + +// ZyClothsStyle zyClothsStyle = iZyClothsStyleService.getById(orderGoods.getStyleId()); + Map result = new HashMap<>(); + result.put("productName", zyProduct.getProductName()); + result.put("productOrg", zyProductPlan.getProductOrg()); + result.put("productName", zyProductPlan.getProductName()); + result.put("productNo", zyProductPlan.getProductNo()); + SysDepart depart = iSysDepartService.getById(departId); + Groupx groupx = iGroupxService.getById(zyProductPlan.getTeamId()); + result.put("Workshop", depart.getDepartName()); + result.put("team", groupx.getGroupName()); + result.put("teamLade", groupx.getEnterprisesManager()); + result.put("productType", groupx.getEnterprisesManager()); + result.put("workTime", zyProductPlan.getWorkTime()); + result.put("duration", zyProductPlan.getDuration()); + result.put("speedUp", zyProductPlan.getSpeedUp()); + result.put("orderTime", zyOrders.getOrderTime()); + SysDepart depart1 = iSysDepartService.getById(zyOrders.getSalesEnterpriseId()); + //销售门店 + result.put("salesEnterprise", depart1.getDepartName()); + result.put("auditBy", zyProductPlan.getAuditBy()); + result.put("auditTimr", zyProductPlan.getAuditTimr()); + return result; + } + @Override public List getTeamDatalist(ZyPlanProcess zyPlanProcess) { //生产计划id