diff --git a/ant-design-vue-jeecg/src/views/delivery/DeliveryList.vue b/ant-design-vue-jeecg/src/views/delivery/DeliveryList.vue index 30dc49a3..16bf0339 100644 --- a/ant-design-vue-jeecg/src/views/delivery/DeliveryList.vue +++ b/ant-design-vue-jeecg/src/views/delivery/DeliveryList.vue @@ -95,6 +95,8 @@ + 确定出库 + 编辑 @@ -115,7 +117,7 @@ - + @@ -126,13 +128,15 @@ import { mixinDevice } from '@/utils/mixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import DeliveryModal from './modules/DeliveryModal' + import DeliveryModal1 from './modules/DeliveryModal1' import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' export default { name: 'DeliveryList', mixins:[JeecgListMixin, mixinDevice], components: { - DeliveryModal + DeliveryModal, + DeliveryModal1 }, data () { return { @@ -227,6 +231,11 @@ }, }, methods: { + qdck: function (record) { + this.$refs.modalFormqdck.edit(record); + this.$refs.modalFormqdck.title = "确定出库"; + this.$refs.modalFormqdck.disableSubmit = false; + }, initDictConfig(){ }, getSuperFieldList(){ diff --git a/ant-design-vue-jeecg/src/views/delivery/modules/DeliveryForm1.vue b/ant-design-vue-jeecg/src/views/delivery/modules/DeliveryForm1.vue new file mode 100644 index 00000000..86771266 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/delivery/modules/DeliveryForm1.vue @@ -0,0 +1,141 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/delivery/modules/DeliveryModal1.vue b/ant-design-vue-jeecg/src/views/delivery/modules/DeliveryModal1.vue new file mode 100644 index 00000000..ea35d415 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/delivery/modules/DeliveryModal1.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/delivery/mapper/DeliveryMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/delivery/mapper/DeliveryMapper.java index b84bdb31..e5515bb2 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/delivery/mapper/DeliveryMapper.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/delivery/mapper/DeliveryMapper.java @@ -4,6 +4,7 @@ package org.jeecg.modules.demo.delivery.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import org.jeecg.modules.demo.delivery.entity.Delivery; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -15,4 +16,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ public interface DeliveryMapper extends BaseMapper { + @Select("select storehouse_id from storage where item_type=#{s} and item_code=#{fabricNumber} and amount > #{doubleValue}") + String findStorehouseId(String s, double doubleValue, String fabricNumber); + + @Select("select user_id from storehouse where id =#{storehouseId}") + String getadminid(String storehouseId); + + + + @Select("select storehouse_id from storage where item_type=#{s} and item_code=#{fabricNumber} and amount > #{doubleValue}") + String findStorehouseId2(String s, double doubleValue, String fabricNumber); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/delivery/service/impl/DeliveryServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/delivery/service/impl/DeliveryServiceImpl.java index 7aa4f2bd..b7cba37b 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/delivery/service/impl/DeliveryServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/delivery/service/impl/DeliveryServiceImpl.java @@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.ObjectUtils; +import java.util.Date; import java.util.LinkedList; import java.util.List; import java.util.Optional; @@ -34,6 +35,10 @@ import java.util.Optional; @Service public class DeliveryServiceImpl extends ServiceImpl implements IDeliveryService { + + @Autowired + DeliveryMapper deliveryMapper; + @Autowired private IZyProductPlanService iZyProductPlanService; @@ -62,14 +67,28 @@ public class DeliveryServiceImpl extends ServiceImpl i delivery.setDeliveryReason("0"); delivery.setItemType("0"); delivery.setAmount(e.getAmount().doubleValue()); -// delivery.setDeliveryTime(new Date()); -// delivery.setCarrierId("TODO"); -// delivery.setAdminId("TODO"); -// delivery.setStorehouseId("TODO"); + delivery.setDeliveryTime(new Date()); + ZyFabric zyFabric = iZyFabricService.getById(e.getFabricId()); if (!ObjectUtils.isEmpty(zyFabric)) { delivery.setItemCode(zyFabric.getFabricNumber()); } + + //取货人 +// delivery.setCarrierId("TODO"); + //管理员 +// delivery.setAdminId("TODO"); + //仓库id +// delivery.setStorehouseId("TODO"); + /*=====================开始=============================王家东添加*/ + /* String StorehouseId = deliveryMapper.findStorehouseId("0",e.getAmount().doubleValue(),zyFabric.getFabricNumber()); + if (StorehouseId!=""){ + delivery.setStorehouseId(StorehouseId); + String adminid =deliveryMapper.getadminid(StorehouseId); + delivery.setStorehouseId(adminid); + }*/ + + /*=====================结束=============================王家东添加*/ deliveryList4Fabric.add(delivery); }); this.saveBatch(deliveryList4Fabric); @@ -82,7 +101,7 @@ public class DeliveryServiceImpl extends ServiceImpl i delivery2.setDeliveryReason("0"); delivery2.setItemType("1"); delivery2.setAmount(e.getAmount().doubleValue()); -// delivery2.setDeliveryTime(new Date()); + delivery2.setDeliveryTime(new Date()); // delivery2.setCarrierId("TODO"); // delivery2.setAdminId("TODO"); // delivery2.setStorehouseId("TODO"); @@ -90,6 +109,15 @@ public class DeliveryServiceImpl extends ServiceImpl i if (!ObjectUtils.isEmpty(zyAccessories)) { delivery2.setItemCode(zyAccessories.getNums()); } + + /* String StorehouseId = deliveryMapper.findStorehouseId2("0",e.getAmount().doubleValue(),zyFabric.getFabricNumber()); + if (StorehouseId!=""){ + delivery2.setStorehouseId(StorehouseId); + String adminid =deliveryMapper.getadminid(StorehouseId); + delivery2.setStorehouseId(adminid); + }*/ + + deliveryList4accessories.add(delivery2); }); this.saveBatch(deliveryList4accessories);