| | |
| | | <div id="div-title"> |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/warehouseBasicData/warehouseSearchBasicData' }">基础数据</el-breadcrumb-item> |
| | | <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">{{$t('productStock.reportForms')}}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | |
| | |
| | | :to="{path:'/main/stockReport/SubsidiaryMonthReport'}"> |
| | | 辅料月结报表 |
| | | </el-breadcrumb-item>--> |
| | | <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">{{$t('productStock.reportForms')}}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | |
| | |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/Replenish/SelectReplenish' }">{{$t('replenish.patchManagement')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/Replenish/AddReplenish' }">{{$t('replenish.addPatches')}}</el-breadcrumb-item> |
| | | <!-- <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/Replenish/PrintReplenishFlowCard' }">{{$t('replenish.printPatches')}}</el-breadcrumb-item>--> |
| | | |
| | | <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">{{$t('productStock.reportForms')}}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | |
| | |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/rework/SelectRework' }">{{$t('rework.reworkManagement')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/rework/AddRework' }">{{$t('rework.addRework')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item :to="{ path: '/main/processCard/SelectPrintFlowCard' }" style="display: none">{{$t('rework.printRework')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">{{$t('productStock.reportForms')}}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | |
| | |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/customer/selectCustomer' }">{{ $t('customer.customerHomePage') }}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/customer/CreateCustomer' }">{{ $t('customer.increaseCustomers') }}</el-breadcrumb-item> |
| | | |
| | | <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">{{$t('productStock.reportForms')}}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | |
| | |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/delivery/selectDelivery' }">{{$t('delivery.shippingHomepage')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/delivery/selectOrderList' }">{{$t('delivery.orderShipment')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/delivery/deliveryReport' }">{{$t('productStock.reportForms')}}</el-breadcrumb-item> |
| | | |
| | | <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">{{$t('productStock.reportForms')}}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | |
| | |
| | | |
| | | List<Map<String,Object>> getSelectMaterialInventory(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("materialInventory") MaterialInventory materialInventory); |
| | | @Param("materialInventory") MaterialInventory materialInventory, @Param("ids") List<Long> ids); |
| | | |
| | | |
| | | Map<String,Integer> getSelectMaterialInventoryPageTotal(Integer offset, Integer pageSize, MaterialInventory materialInventory); |
| | | Map<String,Integer> getSelectMaterialInventoryPageTotal(Integer offset, Integer pageSize, MaterialInventory materialInventory, @Param("ids") List<Long> ids); |
| | | |
| | | List<Map<String,Object>> getSelectMaterialInventoryEngineering(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("optimizeUse") OptimizeUse optimizeUse); |
| | | @Param("optimizeUse") OptimizeUse optimizeUse, @Param("ids") List<Long> ids); |
| | | |
| | | |
| | | Map<String,Integer> getSelectMaterialInventoryEngineeringPageTotal(Integer offset, Integer pageSize, OptimizeUse optimizeUse); |
| | | Map<String,Integer> getSelectMaterialInventoryEngineeringPageTotal(Integer offset, Integer pageSize, OptimizeUse optimizeUse, @Param("ids") List<Long> ids); |
| | | |
| | | Boolean insertMaterialStore(@Param("type") String type, |
| | | @Param("json") String json); |
| | |
| | | package com.example.erp.service.mm; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @DS("mm") |
| | |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", materialInventoryMapper.getSelectMaterialInventory(offset, pageSize, materialInventory)); |
| | | map.put("total", materialInventoryMapper.getSelectMaterialInventoryPageTotal(offset, pageSize, materialInventory)); |
| | | List<Long> ids=new ArrayList<>();; |
| | | if(materialInventory.getStockId()!=null && !materialInventory.getStockId().isEmpty()){ |
| | | List<String> result = StrUtil.split(materialInventory.getStockId(), '|'); |
| | | ids=result.stream().map(Long::valueOf).collect(Collectors.toList()); |
| | | } |
| | | map.put("data", materialInventoryMapper.getSelectMaterialInventory(offset, pageSize, materialInventory,ids)); |
| | | map.put("total", materialInventoryMapper.getSelectMaterialInventoryPageTotal(offset, pageSize, materialInventory,ids)); |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getSelectMaterialInventoryEngineering(Integer pageNum, Integer pageSize, OptimizeUse optimizeUse) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", materialInventoryMapper.getSelectMaterialInventoryEngineering(offset, pageSize, optimizeUse)); |
| | | map.put("total", materialInventoryMapper.getSelectMaterialInventoryEngineeringPageTotal(offset, pageSize, optimizeUse)); |
| | | List<Long> ids=new ArrayList<>();; |
| | | if(optimizeUse.getRawStockCode()!=null && !optimizeUse.getRawStockCode().isEmpty()){ |
| | | List<String> result = StrUtil.split(optimizeUse.getRawStockCode(), '|'); |
| | | ids=result.stream().map(Long::valueOf).collect(Collectors.toList()); |
| | | } |
| | | map.put("data", materialInventoryMapper.getSelectMaterialInventoryEngineering(offset, pageSize, optimizeUse,ids)); |
| | | map.put("total", materialInventoryMapper.getSelectMaterialInventoryEngineeringPageTotal(offset, pageSize, optimizeUse,ids)); |
| | | return map; |
| | | } |
| | | |
| | |
| | | select |
| | | ou.id as useId, |
| | | ou.project_no as projectNo, |
| | | ou.use_count AS inventoryQuantity, |
| | | mi.inventory_quantity AS inventoryQuantity, |
| | | mi.plan_quantity AS availableQuantity, |
| | | mi.plan_quantity AS planQuantity, |
| | | mi.id, |
| | |
| | | mi.dead_stock AS deadStock, |
| | | mi.remarks, |
| | | date(mi.create_time) AS createTime, |
| | | ms.json from pp.optimize_use ou left join mm.material_inventory mi on ou.stock_code=mi.id left join mm.material_store ms on mi.material_code=ms.id |
| | | ms.json from pp.optimize_use ou left join mm.material_inventory mi on ou.raw_stock_code=mi.id left join mm.material_store ms on mi.material_code=ms.id |
| | | left join pp.optimize_project op on op.project_no=ou.project_no |
| | | <where> |
| | | ou.not_use_count>0 and ou.state=1 and |
| | | mi.plan_quantity>0 and op.state>=100 and |
| | | date(ou.create_time)>=#{startDate} and date(ou.create_time) <= #{endDate} |
| | | |
| | | </where> |
| | |
| | | from mm.material_inventory mi left join mm.material_store ms on mi.material_code=ms.id |
| | | <where> |
| | | <if test="materialInventory.stockId != null and materialInventory.stockId != ''"> |
| | | and mi.id regexp #{materialInventory.stockId} |
| | | and mi.id in |
| | | <foreach item="id" collection="ids" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | |
| | | </where> |
| | |
| | | select |
| | | ou.id as useId, |
| | | ou.project_no as projectNo, |
| | | ou.use_count AS inventoryQuantity, |
| | | mi.inventory_quantity AS inventoryQuantity, |
| | | mi.plan_quantity AS availableQuantity, |
| | | mi.plan_quantity AS planQuantity, |
| | | mi.id, |
| | |
| | | mi.dead_stock AS deadStock, |
| | | mi.remarks, |
| | | date(mi.create_time) AS createTime, |
| | | ms.json from pp.optimize_use ou left join mm.material_inventory mi on ou.stock_code=mi.id left join mm.material_store ms on mi.material_code=ms.id |
| | | ms.json from pp.optimize_use ou left join mm.material_inventory mi on ou.raw_stock_code=mi.id left join mm.material_store ms on mi.material_code=ms.id |
| | | |
| | | <where> |
| | | <if test="optimizeUse.rawStockCode != null and optimizeUse.rawStockCode != ''"> |
| | | and ou.id regexp #{optimizeUse.rawStockCode} |
| | | and ou.id in |
| | | <foreach item="id" collection="ids" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | |
| | | </where> |
| | |
| | | pp.optimize_use ou |
| | | <where> |
| | | <if test="optimizeUse.rawStockCode != null and optimizeUse.rawStockCode != ''"> |
| | | and ou.id regexp #{optimizeUse.rawStockCode} |
| | | and ou.id in |
| | | <foreach item="id" collection="ids" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | |
| | | </where> |
| | |
| | | select |
| | | ou.id as useId, |
| | | ou.project_no as projectNo, |
| | | ou.use_count AS inventoryQuantity, |
| | | mi.inventory_quantity AS inventoryQuantity, |
| | | mi.plan_quantity AS availableQuantity, |
| | | mi.plan_quantity AS planQuantity, |
| | | mi.id, |
| | |
| | | mi.dead_stock AS deadStock, |
| | | mi.remarks, |
| | | date(mi.create_time) AS createTime, |
| | | ms.json from pp.optimize_use ou left join mm.material_inventory mi on ou.stock_code=mi.id left join mm.material_store ms on mi.material_code=ms.id |
| | | ms.json from pp.optimize_use ou left join mm.material_inventory mi on ou.raw_stock_code=mi.id left join mm.material_store ms on mi.material_code=ms.id |
| | | left join pp.optimize_project op on op.project_no=ou.project_no |
| | | <where> |
| | | ou.not_use_count>0 and ou.state=1 and |
| | | mi.plan_quantity>0 and op.state>=100 and |
| | | date(ou.create_time)>=#{startDate} and date(ou.create_time) <= #{endDate} |
| | | |
| | | </where> |
| | |
| | | from mm.material_inventory mi left join mm.material_store ms on mi.material_code=ms.id |
| | | <where> |
| | | <if test="materialInventory.stockId != null and materialInventory.stockId != ''"> |
| | | and mi.id regexp #{materialInventory.stockId} |
| | | and mi.id in |
| | | <foreach item="id" collection="ids" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | |
| | | </where> |
| | |
| | | select |
| | | ou.id as useId, |
| | | ou.project_no as projectNo, |
| | | ou.use_count AS inventoryQuantity, |
| | | mi.inventory_quantity AS inventoryQuantity, |
| | | mi.plan_quantity AS availableQuantity, |
| | | mi.plan_quantity AS planQuantity, |
| | | mi.id, |
| | |
| | | mi.dead_stock AS deadStock, |
| | | mi.remarks, |
| | | date(mi.create_time) AS createTime, |
| | | ms.json from pp.optimize_use ou left join mm.material_inventory mi on ou.stock_code=mi.id left join mm.material_store ms on mi.material_code=ms.id |
| | | ms.json from pp.optimize_use ou left join mm.material_inventory mi on ou.raw_stock_code=mi.id left join mm.material_store ms on mi.material_code=ms.id |
| | | |
| | | <where> |
| | | <if test="optimizeUse.rawStockCode != null and optimizeUse.rawStockCode != ''"> |
| | | and ou.id regexp #{optimizeUse.rawStockCode} |
| | | and ou.id in |
| | | <foreach item="id" collection="ids" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | |
| | | </where> |
| | |
| | | pp.optimize_use ou |
| | | <where> |
| | | <if test="optimizeUse.rawStockCode != null and optimizeUse.rawStockCode != ''"> |
| | | and ou.id regexp #{optimizeUse.rawStockCode} |
| | | and ou.id in |
| | | <foreach item="id" collection="ids" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | |
| | | </where> |
| | |
| | | <select id="getOrderList"> |
| | | select |
| | | *, |
| | | sum(fgi.quantity_available) as goodsQuantity |
| | | ifnull(sum(fgi.quantity_available),0) as goodsQuantity |
| | | from |
| | | `order` as o |
| | | left join mm.finished_goods_inventory as fgi |