| | |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import VXETable from "vxe-table"; |
| | | let router=useRouter() |
| | | let produceList = ref([]) |
| | | let tableRef = ref([]) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | orderDetail:{ |
| | | orderNumber:'', |
| | | productName:'', |
| | | productId:'', |
| | | width:'', |
| | | height:'', |
| | | quantity:'' |
| | | }, |
| | | order:{ |
| | | orderId:'', |
| | | creater:'', |
| | | project:'', |
| | | area:'', |
| | | batch:'' |
| | | |
| | | } |
| | | }) |
| | | |
| | | |
| | | //第一次调用 |
| | | /*request.post("/FinishedGoodsInventory/getseletwarehousing/1/100",filterData.value).then((res) => { |
| | | request.post("/FinishedGoodsInventory/getseletwarehousing/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | })*/ |
| | | }) |
| | | |
| | | |
| | | //定义页面总页数 |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post("/FinishedGoodsInventory/getselet/1/100",filterData.value).then((res) => { |
| | | request.post("/FinishedGoodsInventory/getseletwarehousing/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data.data) |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | orderDetail:{ |
| | | orderNumber:'', |
| | | productName:'', |
| | | productId:'', |
| | | width:'', |
| | | height:'' |
| | | }, |
| | | order:{ |
| | | orderId:'', |
| | | orderType:'', |
| | | project:'' |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | // {title: '操作', width: '220', slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'SalesOrderNumber', width: '150',title: '销售单号', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'floorNumber', width: '120',title: '楼层编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedProductNumber',width: '100', title: '产品编号', filters:[{ data: '' }],showOverflow:"ellipsis",slots: { filter: 'num1_filter' }}, |
| | | {field: 'productName',width: '100', title: '产品名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'length', width: '100',title: '长度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'width',width: '100', title: '宽度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'salesperson', width: '100',title: '业务员', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'projectName', width: '100',title: '项目名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.orderId', width: '150',title: '销售单号', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.buildingNumber', width: '120',title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productId',width: '100', title: '产品编号', filters:[{ data: '' }],showOverflow:"ellipsis",slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productName',width: '100', title: '产品名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.width', width: '100',title: '宽度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.height',width: '100', title: '高度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.creater', width: '100',title: '业务员', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.project', width: '100',title: '项目名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderNumber',width: '140', title: '订序', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'totalOrders',width: '140', title: '订单总数', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'quantity',width: '100', title: '数量', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'completion',width: '140', title: '完工', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'area',width: '140', title: '面积', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'processCardNumber',width: '100', title: '流程卡号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'quantityEntered',width: '100', title: '已入数量', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'nextProcess',width: '100', title: ' 下工序', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'Batch',width: '100', title: '批次', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.quantity',width: '140', title: '订单总数', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'inventoryQuantity',width: '100', title: '完工数量', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.area',width: '140', title: '面积', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'processId',width: '100', title: '流程卡号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'receivedQuantity',width: '100', title: '已入数量', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.batch',width: '100', title: '批次', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [{ |
| | | 'name': '确认入库',status: 'primary', |
| | | |
| | | 'code':'add' |
| | | } |
| | | ], |
| | |
| | | if (columnIndex === 0) { |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | |
| | | return '' |
| | | }) |
| | | ] |
| | |
| | | |
| | | }) |
| | | const xGrid = ref(); |
| | | const storageRegion = ref(null); |
| | | const remark = ref(null); |
| | | const flowcard = ref(null); |
| | | const gridEvents = { |
| | | toolbarButtonClick ({ code }) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'add': { |
| | | alert('我接收到子组件传送的编辑信息') |
| | | return; |
| | | //判断输入框值不能为null |
| | | if(storageRegion.value!==null && storageRegion.value!=""){ |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | //循环获取选中的复选框 |
| | | for (let i=0;i<selectRecords.length;i++){ |
| | | //定义后端需要的参数 |
| | | let flowData = ref({ |
| | | finishedGoodsInventory:{ |
| | | storageRegion:storageRegion.value, |
| | | remark:remark.value |
| | | }, |
| | | |
| | | flowcard:selectRecords[0] |
| | | }) |
| | | console.log(flowcard.value) |
| | | request.post("/FinishedGoodsInventory/addseletwarehousing",flowData.value).then((res) => { |
| | | /* request.post("/FinishedGoodsInventory/addseletwarehousing/"+storageRegion.value+"/"+remark.value,flowData.value).then((res) => {*/ |
| | | if(res.code===200){ |
| | | alert(`入库成功`) |
| | | request.post("/FinishedGoodsInventory/getseletwarehousing/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code===200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | return; |
| | | |
| | | |
| | | }else{ |
| | | alert(`请输入库位`) |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <div id="selectForm"> |
| | | <el-input style="width: 200px" v-model="storageRegion" class="m-2" placeholder="请输入库位"> |
| | | </el-input> |
| | | <el-input style="width: 200px" v-model="remark" class="m-2" placeholder="请输入备注"> |
| | | </el-input> |
| | | |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row}"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,key,index) in row"> |
| | | <li v-for="(item,key,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | |
| | | {field: 'actualSignalArea',width: '140', title: '实际单片面积', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'area',width: '100', title: '总面积', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | |
| | | {field: 'warehouseNumber',width: '100', title: '仓库编号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | /*{field: 'warehouseNumber',width: '100', title: '仓库编号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},*/ |
| | | {field: 'storageRegion',width: '100', title: '库存区域', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'status',width: '100', title: '状态', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | |
| | |
| | | <version>3.5.1</version> |
| | | </dependency> |
| | | |
| | | <!-- SwaggerUi--> |
| | | <!-- SwaggerUi--> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger2</artifactId> |
| | |
| | | <artifactId>spring-boot-starter-cache</artifactId> |
| | | </dependency> |
| | | |
| | | <!--websocket--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>org.springframework.boot</groupId>--> |
| | | <!-- <artifactId>spring-boot-starter-websocket</artifactId>--> |
| | | <!-- </dependency>--> |
| | | <!--websocket--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>org.springframework.boot</groupId>--> |
| | | <!-- <artifactId>spring-boot-starter-websocket</artifactId>--> |
| | | <!-- </dependency>--> |
| | | |
| | | <dependency> |
| | | <groupId>io.netty</groupId> |
| | |
| | | <artifactId>fastjson</artifactId> |
| | | <version>1.2.24</version> |
| | | <scope>import</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.data</groupId> |
| | | <artifactId>spring-data-commons</artifactId> |
| | | <version>2.5.8</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | |
| | | </snapshots> |
| | | </pluginRepository> |
| | | </pluginRepositories>--> |
| | | </project> |
| | | </project> |
| | |
| | | package com.example.erp.controller.mm; |
| | | |
| | | |
| | | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.mm.FinishedGoodsInventoryService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | |
| | | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/FinishedGoodsInventory") |
| | |
| | | } |
| | | |
| | | @PostMapping("/getseletwarehousing/{pageNum}/{pageSize}") |
| | | public Result getseletwarehousing(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedGoodsInventory finishedGoodsInventory){ |
| | | System.out.println(finishedGoodsInventory); |
| | | return Result.seccess(finishedGoodsInventoryService.getseletwarehousing(pageNum,pageSize,finishedGoodsInventory)); |
| | | public Result getseletwarehousing(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FlowCard flowCard){ |
| | | System.out.println(flowCard); |
| | | return Result.seccess(finishedGoodsInventoryService.getseletwarehousing(pageNum,pageSize,flowCard)); |
| | | } |
| | | |
| | | @PostMapping("/addseletwarehousing") |
| | | public Result addseletwarehousing( @RequestBody Map<String,Map<String,Object>> object){ |
| | | if(finishedGoodsInventoryService.addseletwarehousing(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"入库失败"); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | private Long id; |
| | | private String operationOrderNumber; |
| | | private Long productNumber; |
| | | private Integer operationNumber ; |
| | | private Integer operationNumber; |
| | | private Integer quantity; |
| | | private String operateType; |
| | | private String operator; |
| | | private LocalDate operateTime; |
| | | private String staterOperationOrderNumber; |
| | | private String endOperationOrderNumber;; |
| | | |
| | | |
| | | } |
| | |
| | | package com.example.erp.mapper.mm; |
| | | |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.Product; |
| | | import com.example.erp.entity.userInfo.User; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.repository.CrudRepository; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface FinishedGoodsInventoryMapper { |
| | | public interface FinishedGoodsInventoryMapper extends CrudRepository<FinishedGoodsInventory,Long> { |
| | | |
| | | |
| | | |
| | | List<FinishedGoodsInventory> defaultfinishedGoods(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("finishedGoodsInventory") FinishedGoodsInventory finishedGoodsInventory); |
| | | |
| | | Integer getPageTotal(Integer offset, Integer pageSize,FinishedGoodsInventory finishedGoodsInventory); |
| | | |
| | | List<FlowCard> getseletwarehousing(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("flowCard") FlowCard flowCard); |
| | | |
| | | Integer getseletwarehousingPageTotal(Integer offset, Integer pageSize,FlowCard flowCard); |
| | | |
| | | Integer findOrderNumberdcount(Integer orderNumber); |
| | | |
| | | Boolean updateInventory(FlowCard flowCard); |
| | | Boolean updateflowcard(FlowCard flowCard); |
| | | |
| | | Boolean insertFinishedGoodsInventory(@Param("flowCard") FlowCard flowCard, |
| | | @Param("storageRegion") String storageRegion, |
| | | @Param("remark") String remark); |
| | | } |
| | | |
| | | |
| | |
| | | package com.example.erp.mapper.mm; |
| | | |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.repository.CrudRepository; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface FinishedOperateLogMapper { |
| | | List<FinishedOperateLog> defaultProduct(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize); |
| | | public interface FinishedOperateLogMapper extends CrudRepository<FinishedOperateLog,Long> { |
| | | FinishedOperateLog getselectFinishedOperateLog(); |
| | | |
| | | Boolean insertFinishedOperateLog(FlowCard flowCard); |
| | | } |
| | |
| | | package com.example.erp.service.mm; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper; |
| | | import com.example.erp.mapper.mm.FinishedOperateLogMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.SQLException; |
| | | import java.time.LocalDate; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | public class FinishedGoodsInventoryService { |
| | | @Autowired |
| | | FinishedGoodsInventoryMapper finishedGoodsInventoryMapper; |
| | | @Autowired |
| | | FinishedOperateLogMapper finishedOperateLogMapper; |
| | | public Map<String,Object> defaultDateFinishedGoodsInventory(Integer pageNum, Integer pageSize,FinishedGoodsInventory finishedGoodsInventory) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | Map<String,Object> map = new HashMap<>(); |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String,Object> getseletwarehousing(Integer pageNum, Integer pageSize, FinishedGoodsInventory finishedGoodsInventory) { |
| | | public Map<String,Object> getseletwarehousing(Integer pageNum, Integer pageSize, FlowCard flowCard) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",finishedGoodsInventoryMapper.defaultfinishedGoods(offset,pageSize,finishedGoodsInventory)); |
| | | map.put("total",finishedGoodsInventoryMapper.getPageTotal(offset,pageSize,finishedGoodsInventory)); |
| | | map.put("data",finishedGoodsInventoryMapper.getseletwarehousing(offset,pageSize,flowCard)); |
| | | map.put("total",finishedGoodsInventoryMapper.getseletwarehousingPageTotal(offset,pageSize,flowCard)); |
| | | |
| | | return map; |
| | | } |
| | | |
| | | public Boolean addseletwarehousing(Map<String,Map<String,Object>> object) { |
| | | |
| | | Map<String,Object> maps= object.get("finishedGoodsInventory"); |
| | | String storageRegion= maps.get("storageRegion").toString(); |
| | | String remark= maps.get("remark").toString(); |
| | | JSONObject jsonObject = new JSONObject(object.get("flowcard")); |
| | | FlowCard flowCard = JSONObject.parseObject(JSONObject.toJSONString(jsonObject), FlowCard.class); |
| | | System.out.println("数据2:"+flowCard); |
| | | //添加出入库记录 |
| | | finishedOperateLogMapper.insertFinishedOperateLog(flowCard); |
| | | System.out.println(flowCard.getOrder().getOrderId()); |
| | | Integer finishedGoodsInventorycount=finishedGoodsInventoryMapper.findOrderNumberdcount(flowCard.getOrderNumber()); |
| | | System.out.println("数量:"+finishedGoodsInventorycount); |
| | | if(finishedGoodsInventorycount>0){ |
| | | finishedGoodsInventoryMapper.updateInventory(flowCard); |
| | | finishedGoodsInventoryMapper.updateflowcard(flowCard); |
| | | return true; |
| | | }else{ |
| | | if (finishedGoodsInventoryMapper.insertFinishedGoodsInventory(flowCard,storageRegion,remark)){ |
| | | finishedGoodsInventoryMapper.updateflowcard(flowCard); |
| | | return true; |
| | | }else{ |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | /*Order order=finishedGoodsInventoryMapper.findOrderId(flowCard.getOrder().getOrderId()); |
| | | OrderDetail orderDetail=finishedGoodsInventoryMapper.findOrderNumber(flowCard.getOrderNumber());*/ |
| | | /*finishedGoodsInventory.setOrder(order); |
| | | finishedGoodsInventory.setOrderDetail(orderDetail); |
| | | finishedGoodsInventory.setInventory(flowCard.getInventoryQuantity()); |
| | | finishedGoodsInventory.setActualSignalArea(flowCard.getOrderDetail().getHeight()*flowCard.getOrderDetail().getWidth()); |
| | | finishedGoodsInventory.setArea(flowCard.getOrderDetail().getHeight()*flowCard.getOrderDetail().getWidth()*flowCard.getInventoryQuantity()); |
| | | finishedGoodsInventory.setQuantityAvailable(flowCard.getInventoryQuantity()); |
| | | finishedGoodsInventory.setWarehouseNumber(flowCard.getOrderDetail().getBuildingNumber()); |
| | | finishedGoodsInventory.setStorageRegion(flowCard.getOrderDetail().getBuildingNumber()); |
| | | finishedGoodsInventory.setStatus(0); |
| | | finishedGoodsInventory.setEnterStorageTime(LocalDate.now()); |
| | | finishedGoodsInventory.setUpdateTime(LocalDate.now()); |
| | | finishedGoodsInventory.setEndTime(null); |
| | | finishedGoodsInventory.setRemark("");*/ |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.example.erp.mapper.mm.FinishedGoodsInventoryMapper" > |
| | | <mapper namespace="com.example.erp.mapper.mm.FinishedGoodsInventoryMapper"> |
| | | |
| | | <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedGoodsInventory" > |
| | | <id column="id" property="id"/> |
| | | <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedGoodsInventory"> |
| | | <id column="fid" property="id"/> |
| | | <result column="inventory" property="inventory"/> |
| | | <result column="area" property="area"/> |
| | | <result column="actual_signal_area" property="actualSignalArea"/> |
| | |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="end_time" property="endTime"/> |
| | | |
| | | |
| | | <result column="order_id" property="order.orderId"/> |
| | | <result column="project" property="order.project"/> |
| | | <result column="order_type" property="order.orderType"/> |
| | | <result column="order_id" property="order.orderId"/> |
| | | <result column="project" property="order.project"/> |
| | | <result column="order_type" property="order.orderType"/> |
| | | |
| | | |
| | | <result column="order_number" property="orderDetail.orderNumber"/> |
| | | <result column="width" property="orderDetail.width"/> |
| | | <result column="height" property="orderDetail.height"/> |
| | | <result column="product_name" property="orderDetail.productName"/> |
| | | <result column="product_id" property="orderDetail.productId"/> |
| | | |
| | | |
| | | <result column="order_number" property="orderDetail.orderNumber"/> |
| | | <result column="width" property="orderDetail.width"/> |
| | | <result column="height" property="orderDetail.height"/> |
| | | <result column="product_name" property="orderDetail.productName"/> |
| | | <result column="product_id" property="orderDetail.productId"/> |
| | | |
| | | </resultMap> |
| | | |
| | | <resultMap id="selectFlowCard" type="com.example.erp.entity.pp.FlowCard"> |
| | | <id column="id" property="id"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="inventory_quantity" property="inventoryQuantity"/> |
| | | <result column="process_id" property="processId"/> |
| | | <result column="received_quantity" property="receivedQuantity"/> |
| | | |
| | | |
| | | <result column="order_id" property="order.orderId"/> |
| | | <result column="project" property="order.project"/> |
| | | <result column="creater" property="order.creater"/> |
| | | <result column="area" property="order.area"/> |
| | | <result column="batch" property="order.batch"/> |
| | | |
| | | <result column="building_number" property="orderDetail.buildingNumber"/> |
| | | <result column="width" property="orderDetail.width"/> |
| | | <result column="height" property="orderDetail.height"/> |
| | | <result column="product_name" property="orderDetail.productName"/> |
| | | <result column="product_id" property="orderDetail.productId"/> |
| | | <result column="quantity" property="orderDetail.quantity"/> |
| | | </resultMap> |
| | | |
| | | <update id="updateflowcard"> |
| | | update pp.flow_card |
| | | set received_quantity=received_quantity+${inventoryQuantity} |
| | | where order_number=#{orderNumber} and process_id=#{processId} |
| | | </update> |
| | | |
| | | <update id="updateInventory"> |
| | | update mm.finished_goods_inventory |
| | | set inventory=inventory+${inventoryQuantity},quantity_available=quantity_available+${inventoryQuantity}, |
| | | update_time=now(),area=area+actual_signal_area*${inventoryQuantity} |
| | | where order_number=#{orderNumber} |
| | | </update> |
| | | |
| | | <insert id="insertFinishedGoodsInventory" useGeneratedKeys="true" > |
| | | insert into mm.finished_goods_inventory (order_id, |
| | | order_number, |
| | | inventory, |
| | | actual_signal_area, |
| | | area, |
| | | quantity_available, |
| | | warehouse_number, |
| | | storage_region, |
| | | `status`, |
| | | enter_storage_time, |
| | | update_time, |
| | | end_time, |
| | | remark |
| | | ) |
| | | values ( |
| | | #{flowCard.order.orderId} ,#{flowCard.orderNumber},#{flowCard.inventoryQuantity},ROUND(#{flowCard.orderDetail.width}*#{flowCard.orderDetail.height}/1000000,2), |
| | | ROUND(#{flowCard.orderDetail.width}*#{flowCard.orderDetail.height}*#{flowCard.inventoryQuantity}/1000000,2), |
| | | #{flowCard.inventoryQuantity},null,#{storageRegion}, |
| | | 0,now(),now(),null,#{remark} |
| | | ) |
| | | </insert> |
| | | |
| | | <select id="findOrderNumberdcount" > |
| | | select count(*) |
| | | from mm.`finished_goods_inventory` |
| | | where order_number = #{orderNumber} |
| | | |
| | | </select> |
| | | |
| | | <select id="findOrderNumberd" > |
| | | select * |
| | | from sd.finished_goods_inventory |
| | | where order_number = #{orderNumber} |
| | | |
| | | </select> |
| | | |
| | | <select id="getseletwarehousing" resultMap="selectFlowCard"> |
| | | select |
| | | fc.id, |
| | | o.order_id, |
| | | od.building_number, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.width, |
| | | od.height, |
| | | o.creater, |
| | | o.project, |
| | | fc.order_number, |
| | | od.quantity, |
| | | fc.inventory_quantity, |
| | | o.area, |
| | | fc.process_id, |
| | | fc.received_quantity, |
| | | o.batch |
| | | from pp.flow_card fc left join sd.order_detail od on fc.order_number=od.order_number inner join sd.`order` o on |
| | | o.order_id=fc.order_id |
| | | <where> |
| | | and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity |
| | | <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''"> |
| | | and o.order_id regexp #{flowCard.order.orderId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.buildingNumber != null and flowCard.orderDetail.buildingNumber != ''"> |
| | | and od.building_number regexp #{flowCard.orderDetail.buildingNumber} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''"> |
| | | and od.product_id regexp #{flowCard.orderDetail.productId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName != ''"> |
| | | and od.product_name regexp #{flowCard.orderDetail.productName} |
| | | </if> |
| | | <if test="flowCard.orderDetail.width != null and flowCard.orderDetail.width != ''"> |
| | | and od.width regexp #{flowCard.orderDetail.width} |
| | | </if> |
| | | <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''"> |
| | | and od.height regexp #{flowCard.orderDetail.height} |
| | | </if> |
| | | <if test="flowCard.order.creater != null and flowCard.order.creater != ''"> |
| | | and o.creater regexp #{flowCard.order.creater} |
| | | </if> |
| | | <if test="flowCard.order.project != null and flowCard.order.project != ''"> |
| | | and o.project regexp #{flowCard.order.project} |
| | | </if> |
| | | <if test="flowCard.orderNumber != null and flowCard.orderNumber != ''"> |
| | | and fc.order_number regexp #{flowCard.orderNumber} |
| | | </if> |
| | | <if test="flowCard.orderDetail.quantity != null and flowCard.orderDetail.quantity != ''"> |
| | | and od.quantity regexp #{flowCard.orderDetail.quantity} |
| | | </if> |
| | | <if test="flowCard.inventoryQuantity != null and flowCard.inventoryQuantity != ''"> |
| | | and fc.inventory_quantity regexp #{flowCard.inventoryQuantity} |
| | | </if> |
| | | <if test="flowCard.order.area != null and flowCard.order.area != ''"> |
| | | and o.area regexp #{flowCard.order.area} |
| | | </if> |
| | | <if test="flowCard.order.batch != null and flowCard.order.batch != ''"> |
| | | and o.batch regexp #{flowCard.order.batch} |
| | | </if> |
| | | <if test="flowCard.processId != null and flowCard.processId != ''"> |
| | | and fc.process_id regexp #{flowCard.processId} |
| | | </if> |
| | | <if test="flowCard.receivedQuantity != null and flowCard.receivedQuantity != ''"> |
| | | and fc.received_quantity regexp #{flowCard.receivedQuantity} |
| | | </if> |
| | | |
| | | </where> |
| | | group by fc.order_number,fc.process_id order by fc.create_time |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | <select id="getseletwarehousingPageTotal" > |
| | | select CEILING(count(zu.order_number)/#{pageSize}) from ( |
| | | select fc.order_number as order_number,fc.process_id from pp.flow_card fc left join sd.order_detail od on |
| | | fc.order_number=od.order_number inner join sd.`order` o on o.order_id=fc.order_id |
| | | <where> |
| | | and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity |
| | | <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''"> |
| | | and o.order_id regexp #{flowCard.order.orderId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.buildingNumber != null and flowCard.orderDetail.buildingNumber != ''"> |
| | | and od.building_number regexp #{flowCard.orderDetail.buildingNumber} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''"> |
| | | and od.product_id regexp #{flowCard.orderDetail.productId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName != ''"> |
| | | and od.product_name regexp #{flowCard.orderDetail.productName} |
| | | </if> |
| | | <if test="flowCard.orderDetail.width != null and flowCard.orderDetail.width != ''"> |
| | | and od.width regexp #{flowCard.orderDetail.width} |
| | | </if> |
| | | <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''"> |
| | | and od.height regexp #{flowCard.orderDetail.height} |
| | | </if> |
| | | <if test="flowCard.order.creater != null and flowCard.order.creater != ''"> |
| | | and o.creater regexp #{flowCard.order.creater} |
| | | </if> |
| | | <if test="flowCard.order.project != null and flowCard.order.project != ''"> |
| | | and o.project regexp #{flowCard.order.project} |
| | | </if> |
| | | <if test="flowCard.orderNumber != null and flowCard.orderNumber != ''"> |
| | | and fc.order_number regexp #{flowCard.orderNumber} |
| | | </if> |
| | | <if test="flowCard.orderDetail.quantity != null and flowCard.orderDetail.quantity != ''"> |
| | | and od.quantity regexp #{flowCard.orderDetail.quantity} |
| | | </if> |
| | | <if test="flowCard.inventoryQuantity != null and flowCard.inventoryQuantity != ''"> |
| | | and fc.inventory_quantity regexp #{flowCard.inventoryQuantity} |
| | | </if> |
| | | <if test="flowCard.order.area != null and flowCard.order.area != ''"> |
| | | and o.area regexp #{flowCard.order.area} |
| | | </if> |
| | | <if test="flowCard.order.batch != null and flowCard.order.batch != ''"> |
| | | and o.batch regexp #{flowCard.order.batch} |
| | | </if> |
| | | <if test="flowCard.processId != null and flowCard.processId != ''"> |
| | | and fc.process_id regexp #{flowCard.processId} |
| | | </if> |
| | | <if test="flowCard.receivedQuantity != null and flowCard.receivedQuantity != ''"> |
| | | and fc.received_quantity regexp #{flowCard.receivedQuantity} |
| | | </if> |
| | | |
| | | </where> |
| | | group by fc.order_number,fc.process_id order by fc.create_time) as zu |
| | | </select> |
| | | |
| | | |
| | | <select id="defaultfinishedGoods" resultMap="selectFinishedGoodsInventory"> |
| | | select od.order_number, |
| | | o.order_id, |
| | | o.project, |
| | | o.order_type, |
| | | od.product_name, |
| | | od.product_id, |
| | | od.width, |
| | | od.height, |
| | | fgi.inventory, |
| | | fgi.quantity_available, |
| | | fgi.actual_signal_area, |
| | | fgi.area, |
| | | fgi.warehouse_number, |
| | | fgi.storage_region, |
| | | fgi.`status`, |
| | | fgi.update_time, |
| | | fgi.enter_storage_time, |
| | | fgi.end_time, |
| | | fgi.remark |
| | | o.order_id, |
| | | o.project, |
| | | o.order_type, |
| | | od.product_name, |
| | | od.product_id, |
| | | od.width, |
| | | od.height, |
| | | fgi.inventory, |
| | | fgi.quantity_available, |
| | | fgi.actual_signal_area, |
| | | fgi.area, |
| | | fgi.warehouse_number, |
| | | fgi.storage_region, |
| | | fgi.`status`, |
| | | fgi.update_time, |
| | | fgi.enter_storage_time, |
| | | fgi.end_time, |
| | | fgi.remark |
| | | from finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_number = od.order_number |
| | | inner join sd.`order` o on fgi.order_id = o.order_id |
| | | left join sd.order_detail od on fgi.order_number = od.order_number |
| | | inner join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedGoodsInventory.orderDetail.width} |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="getPageTotal" > |
| | | <select id="getPageTotal"> |
| | | select |
| | | CEILING(count(fgi.id)/#{pageSize}) |
| | | from finished_goods_inventory fgi |
| | |
| | | <result column="g_type" property="glassTypes.type"/>--> |
| | | |
| | | </resultMap> |
| | | <select id="defaultFinishedGoodsInventory" resultMap="selectFinishedGoodsInventory"> |
| | | <select id="getselectFinishedOperateLog" > |
| | | select |
| | | a.id, |
| | | prodID, |
| | | product, |
| | | glassType, |
| | | typeName, |
| | | totalThickness, |
| | | thickness, |
| | | Query, |
| | | remarks, |
| | | state, |
| | | creator, |
| | | date(a.createTime) as 'createTime', |
| | | updateTime |
| | | * |
| | | from |
| | | product as a |
| | | left join basic_glass_type bgt on bgt.typeID = a.glassType |
| | | |
| | | order by id desc |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | mm.finished_operate_log limit 0,1; |
| | | </select> |
| | | |
| | | <insert id="insertFinishedOperateLog" useGeneratedKeys="true" keyProperty="id" > |
| | | insert into mm.finished_operate_log(operation_order_number, |
| | | product_number, |
| | | operation_number, |
| | | operate_type, |
| | | operator, |
| | | quantity, |
| | | operate_time |
| | | ) |
| | | values ( |
| | | #{processId} ,#{orderDetail.productId},#{orderNumber},"入库","王五",#{inventoryQuantity},now() |
| | | ) |
| | | </insert> |
| | | </mapper> |
| | |
| | | <result column="g_type" property="glassTypes.type"/>--> |
| | | |
| | | </resultMap> |
| | | <select id="defaultFinishedGoodsInventory" resultMap="selectFinishedGoodsInventory"> |
| | | <select id="getselectFinishedOperateLog" > |
| | | select |
| | | a.id, |
| | | prodID, |
| | | product, |
| | | glassType, |
| | | typeName, |
| | | totalThickness, |
| | | thickness, |
| | | Query, |
| | | remarks, |
| | | state, |
| | | creator, |
| | | date(a.createTime) as 'createTime', |
| | | updateTime |
| | | * |
| | | from |
| | | product as a |
| | | left join basic_glass_type bgt on bgt.typeID = a.glassType |
| | | |
| | | order by id desc |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | mm.finished_operate_log limit 0,1; |
| | | </select> |
| | | |
| | | <insert id="insertFinishedOperateLog" useGeneratedKeys="true" keyProperty="id" > |
| | | insert into mm.finished_operate_log(operation_order_number, |
| | | product_number, |
| | | operation_number, |
| | | operate_type, |
| | | operator, |
| | | quantity, |
| | | operate_time |
| | | ) |
| | | values ( |
| | | #{processId} ,#{orderDetail.productId},#{orderNumber},"入库","王五",#{inventoryQuantity},now() |
| | | ) |
| | | </insert> |
| | | </mapper> |