commit
303a0833d8
15 changed files with 454 additions and 201 deletions
@ -0,0 +1,48 @@ |
|||||||
|
<template> |
||||||
|
<div class="orderDetails"> |
||||||
|
<Header fontColor="#000"></Header> |
||||||
|
<div style="padding-top: 88px"></div> |
||||||
|
<div class="orderMain"> |
||||||
|
<div class="jz"> |
||||||
|
<el-breadcrumb class="breadcrumb" separator="/"> |
||||||
|
<el-breadcrumb-item :to="{ path: '/shopping/views/clothType' }">上级页面</el-breadcrumb-item> |
||||||
|
<el-breadcrumb-item :to="{ path: '/shopping/views/clothType' }">上级页面</el-breadcrumb-item> |
||||||
|
<el-breadcrumb-item :to="{ path: '/shopping/views/clothType' }">上级页面</el-breadcrumb-item> |
||||||
|
<!-- <el-breadcrumb-item>{{this.$route.query.title }}</el-breadcrumb-item>--> |
||||||
|
</el-breadcrumb> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<Footer></Footer> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
<script> |
||||||
|
import Header from "../components/Header/HeaderView"; |
||||||
|
import Footer from "../components/Footer/FooterView" |
||||||
|
export default { |
||||||
|
name: "orderDetails", |
||||||
|
components: { Header,Footer }, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
}; |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
|
||||||
|
}, |
||||||
|
}; |
||||||
|
</script> |
||||||
|
<style> |
||||||
|
.orderDetails .top .middle .router-link-exact-active.router-link-active { |
||||||
|
border-bottom: 2px solid #000; |
||||||
|
} |
||||||
|
</style> |
||||||
|
<style lang="less" scoped> |
||||||
|
@import '../assets/common.css'; |
||||||
|
.orderMain{ |
||||||
|
background: #F6F6F6; |
||||||
|
.breadcrumb{ |
||||||
|
padding-top: 50px; |
||||||
|
padding-bottom: 50px; |
||||||
|
} |
||||||
|
} |
||||||
|
</style> |
||||||
|
|
@ -1,20 +1,97 @@ |
|||||||
package org.jeecg.modules.demo.delivery.service.impl; |
package org.jeecg.modules.demo.delivery.service.impl; |
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||||
|
import org.jeecg.common.exception.JeecgBootException; |
||||||
|
import org.jeecg.modules.demo.accessories.entity.ZyAccessories; |
||||||
|
import org.jeecg.modules.demo.accessories.service.IZyAccessoriesService; |
||||||
import org.jeecg.modules.demo.delivery.entity.Delivery; |
import org.jeecg.modules.demo.delivery.entity.Delivery; |
||||||
import org.jeecg.modules.demo.delivery.mapper.DeliveryMapper; |
import org.jeecg.modules.demo.delivery.mapper.DeliveryMapper; |
||||||
import org.jeecg.modules.demo.delivery.service.IDeliveryService; |
import org.jeecg.modules.demo.delivery.service.IDeliveryService; |
||||||
|
import org.jeecg.modules.demo.fabric.entity.ZyFabric; |
||||||
|
import org.jeecg.modules.demo.fabric.service.IZyFabricService; |
||||||
|
import org.jeecg.modules.productplan.entity.ZyPlanAccessories; |
||||||
|
import org.jeecg.modules.productplan.entity.ZyPlanFabric; |
||||||
|
import org.jeecg.modules.productplan.entity.ZyProductPlan; |
||||||
|
import org.jeecg.modules.productplan.service.IZyPlanAccessoriesService; |
||||||
|
import org.jeecg.modules.productplan.service.IZyPlanFabricService; |
||||||
|
import org.jeecg.modules.productplan.service.IZyProductPlanService; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
import org.springframework.stereotype.Service; |
import org.springframework.stereotype.Service; |
||||||
|
import org.springframework.util.ObjectUtils; |
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
import java.util.LinkedList; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Optional; |
||||||
|
|
||||||
/** |
/** |
||||||
* @Description: 出库表 |
* @Description: 出库表 |
||||||
* @Author: jeecg-boot |
* @Author: jeecg-boot |
||||||
* @Date: 2023-01-10 |
* @Date: 2023-01-10 |
||||||
* @Version: V1.0 |
* @Version: V1.0 |
||||||
*/ |
*/ |
||||||
@Service |
@Service |
||||||
public class DeliveryServiceImpl extends ServiceImpl<DeliveryMapper, Delivery> implements IDeliveryService { |
public class DeliveryServiceImpl extends ServiceImpl<DeliveryMapper, Delivery> implements IDeliveryService { |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private IZyProductPlanService iZyProductPlanService; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private IZyPlanFabricService iZyPlanFabricService; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private IZyPlanAccessoriesService iZyPlanAccessoriesService; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
IZyFabricService iZyFabricService; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private IZyAccessoriesService iZyAccessoriesService; |
||||||
|
|
||||||
|
@Override |
||||||
|
public void sendToRepository(String planId) { |
||||||
|
ZyProductPlan zyProductPlan = iZyProductPlanService.getById(planId); |
||||||
|
Optional.ofNullable(zyProductPlan).orElseThrow(() -> new JeecgBootException("生产计划不存在!")); |
||||||
|
|
||||||
|
List<ZyPlanFabric> fabricList = iZyPlanFabricService.list(new LambdaQueryWrapper<ZyPlanFabric>() |
||||||
|
.eq(ZyPlanFabric::getPlanId, planId)); |
||||||
|
List<Delivery> deliveryList4Fabric = new LinkedList<>(); |
||||||
|
Optional.ofNullable(fabricList).orElse(new LinkedList<>()).forEach(e -> { |
||||||
|
Delivery delivery = new Delivery(); |
||||||
|
delivery.setDeliveryReason("0"); |
||||||
|
delivery.setItemType("0"); |
||||||
|
delivery.setAmount(e.getAmount().doubleValue()); |
||||||
|
// delivery.setDeliveryTime(new Date());
|
||||||
|
// delivery.setCarrierId("TODO");
|
||||||
|
// delivery.setAdminId("TODO");
|
||||||
|
// delivery.setStorehouseId("TODO");
|
||||||
|
ZyFabric zyFabric = iZyFabricService.getById(e.getFabricId()); |
||||||
|
if (!ObjectUtils.isEmpty(zyFabric)) { |
||||||
|
delivery.setItemCode(zyFabric.getFabricNumber()); |
||||||
|
} |
||||||
|
deliveryList4Fabric.add(delivery); |
||||||
|
}); |
||||||
|
this.saveBatch(deliveryList4Fabric); |
||||||
|
|
||||||
|
List<ZyPlanAccessories> accessoriesList = iZyPlanAccessoriesService.list(new LambdaQueryWrapper<ZyPlanAccessories>() |
||||||
|
.eq(ZyPlanAccessories::getPlanId, planId)); |
||||||
|
List<Delivery> deliveryList4accessories = new LinkedList<>(); |
||||||
|
Optional.ofNullable(accessoriesList).orElse(new LinkedList<>()).forEach(e -> { |
||||||
|
Delivery delivery2 = new Delivery(); |
||||||
|
delivery2.setDeliveryReason("0"); |
||||||
|
delivery2.setItemType("1"); |
||||||
|
delivery2.setAmount(e.getAmount().doubleValue()); |
||||||
|
// delivery2.setDeliveryTime(new Date());
|
||||||
|
// delivery2.setCarrierId("TODO");
|
||||||
|
// delivery2.setAdminId("TODO");
|
||||||
|
// delivery2.setStorehouseId("TODO");
|
||||||
|
ZyAccessories zyAccessories = iZyAccessoriesService.getById(e.getAccessoriesId()); |
||||||
|
if (!ObjectUtils.isEmpty(zyAccessories)) { |
||||||
|
delivery2.setItemCode(zyAccessories.getNums()); |
||||||
|
} |
||||||
|
deliveryList4accessories.add(delivery2); |
||||||
|
}); |
||||||
|
this.saveBatch(deliveryList4accessories); |
||||||
|
} |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue