Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
New file |
| | |
| | | # ERP_OVERRIDE |
| | | |
| | | #### Description |
| | | {**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} |
| | | |
| | | #### Software Architecture |
| | | Software architecture description |
| | | |
| | | #### Installation |
| | | |
| | | 1. xxxx |
| | | 2. xxxx |
| | | 3. xxxx |
| | | |
| | | #### Instructions |
| | | |
| | | 1. xxxx |
| | | 2. xxxx |
| | | 3. xxxx |
| | | |
| | | #### Contribution |
| | | |
| | | 1. Fork the repository |
| | | 2. Create Feat_xxx branch |
| | | 3. Commit your code |
| | | 4. Create Pull Request |
| | | |
| | | |
| | | #### Gitee Feature |
| | | |
| | | 1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md |
| | | 2. Gitee blog [blog.gitee.com](https://blog.gitee.com) |
| | | 3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) |
| | | 4. The most valuable open source project [GVP](https://gitee.com/gvp) |
| | | 5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) |
| | | 6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) |
New file |
| | |
| | | # ERP_OVERRIDE |
| | | |
| | | #### 介绍 |
| | | {**以下是 Gitee 平台说明,您可以替换此简介** |
| | | Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 |
| | | 无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} |
| | | |
| | | #### 软件架构 |
| | | 软件架构说明 |
| | | |
| | | |
| | | #### 安装教程 |
| | | |
| | | 1. xxxx |
| | | 2. xxxx |
| | | 3. xxxx |
| | | |
| | | #### 使用说明 |
| | | |
| | | 1. xxxx |
| | | 2. xxxx |
| | | 3. xxxx |
| | | |
| | | #### 参与贡献 |
| | | |
| | | 1. Fork 本仓库 |
| | | 2. 新建 Feat_xxx 分支 |
| | | 3. 提交代码 |
| | | 4. 新建 Pull Request |
| | | |
| | | |
| | | #### 特技 |
| | | |
| | | 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md |
| | | 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) |
| | | 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 |
| | | 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 |
| | | 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) |
| | | 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) |
| | |
| | | export default { |
| | | serverUrl:"localhost:8080" |
| | | serverUrl:"10.153.19.150:8086" |
| | | //serverUrl:"res.abeim.cn" |
| | | } |
| | |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | > |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!==undefined && index>9"> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | <!-- 下拉筛选插槽--> |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | |
| | | let materialStore={ |
| | | id:ruleForm.value.id, |
| | | type:value.value, |
| | | json:productName |
| | | json:productName, |
| | | width:BasicData.value[0].Type, |
| | | height:BasicData.value[1].Type |
| | | } |
| | | console.log(materialStore) |
| | | if(isBool){ |
| | | request.post("/MaterialStore/saveMaterialStore", materialStore).then((res) => { |
| | | if(res.code==200){ |
| | |
| | | |
| | | |
| | | //页面第一次加载 |
| | | request.get(`/BasicWarehouse/BasicWarehouseTypes/材料返库类型`).then((res) => { |
| | | request.get(`/BasicWarehouse/BasicWarehouseTypes/库存组织|材料返库类型`).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | |
| | | getStoreWork() |
| | | |
| | | getStoreWorks() |
| | | getInventoryOrganization() |
| | | //getInventoryOrganization() |
| | | |
| | | |
| | | }else{ |
| | |
| | | //库存组织 |
| | | const getInventoryOrganization=()=>{ |
| | | //页面第一次加载 |
| | | request.get(`/BasicWarehouse/BasicWarehouseTypes/库存组织`).then((res) => { |
| | | request.get(`/BasicWarehouse/BasicWarehouseTypes/库存组织|材料返库类型`).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | titleSelectJson.value=deepClone(res.data) |
| | | // for(let i=0;i<titleSelectJson.value.inventoryOrganization.length;i++){ |
| | | // this.$set(this.produceList[i], "inventoryOrganization", titleSelectJson.value["inventoryOrganization"][i].operateTypeName); |
| | |
| | | }) |
| | | } |
| | | |
| | | const getWork = () => { |
| | | getStoreWork() |
| | | getStoreWorks() |
| | | } |
| | | |
| | | //列查询 |
| | | const getStoreWork = () => { |
| | | filterData.value.type=value.value |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/${value.value}`).then((res) => { |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | gridOptions.columns=[] |
| | | BasicData.value = res.data |
| | | //添加列 |
| | |
| | | materialStore.value[i].json=(JSON.parse(res.data.data[i].json)) |
| | | |
| | | } |
| | | materialStore.value.forEach(item => { |
| | | item['inventoryOrganization'] = titleSelectJson.value["inventoryOrganization"][0].operateTypeName |
| | | }) |
| | | if(value.value==='原片'){ |
| | | materialStore.value.forEach(item => { |
| | | item['inventoryOrganization'] = titleSelectJson.value["inventoryOrganization"][0].operateTypeName |
| | | }) |
| | | }else if(value.value==='辅料'){ |
| | | materialStore.value.forEach(item => { |
| | | item['inventoryOrganization'] = titleSelectJson.value["inventoryOrganization"][1].operateTypeName |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | produceList = deepClone(materialStore.value) |
| | |
| | | request.post("/MaterialInventory/saveReturningWarehouse", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success('保存成功') |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | router.push({path: '/main/ingredientsStock/ReturnToStorage', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | |
| | | request.post("/MaterialInventory/updateReturningWarehouseToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('basicData.msg.ReviewSuccess')) |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | router.push({path: '/main/ingredientsStock/ReturnToStorage', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | |
| | | request.post("/MaterialInventory/updateReturningWarehouseToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('basicData.msg.cancelReviewSuccess')) |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | router.push({path: '/main/ingredientsStock/ReturnToStorage', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | |
| | | |
| | | |
| | | <el-row> |
| | | <el-select v-model="value" placeholder="请选择类别" @change="getStoreWork" style="margin-top: 10px;border: #181818 1px solid;"> |
| | | <el-select v-model="value" placeholder="请选择类别" @change="getWork" style="margin-top: 10px;border: #181818 1px solid;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | |
| | | <script setup> |
| | | import BasicTable from "@/components/BasicTable.vue" |
| | | import request from "@/utils/request" |
| | | import { ref} from "vue" |
| | | |
| | | const childrenData = ref({ |
| | | columns:[ |
| | | {type:'expand',fixed:"left",width: 80}, |
| | | {type:'expand',fixed:"left",width: 80,slots: { content:'content' }}, |
| | | {type: 'seq',fixed:"left", title: '自序', width: 80 }, |
| | | {field: 'order.orderType',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.customerName',width:120, title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | |
| | | } |
| | | }, |
| | | server: { |
| | | port: 80,//端口号 |
| | | port: 5173,//端口号 |
| | | host: true,//ip地址 或 '0.0.0.0' 或 "loaclhost" |
| | | open: false, //启动后是否自动打开浏览器 |
| | | https: false, // 是否开启 https |
| | |
| | | @Param("totalArea") Double totalArea, |
| | | @Param("returningWarehouseDetail") ReturningWarehouseDetail returningWarehouseDetail); |
| | | |
| | | Boolean updateMaterialInventoryArea(@Param("materialCode") Long materialCode,@Param("singlePieceArea") Double singlePieceArea); |
| | | |
| | | } |
| | |
| | | List<MaterialOutboundDetail> materialOutboundDetailLists = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId); |
| | | if (!materialOutboundDetailLists.isEmpty()) { |
| | | for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailLists) { |
| | | if(materialOutboundDetail.getUseId()!=null){ |
| | | //还原物料库存数 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableInt(materialOutboundDetail.getId(), materialOutboundDetail.getOutboundQuantity()); |
| | | /*if(materialOutboundDetail.getUseId()!=null){ |
| | | //还原优化工程库存数 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableOptInt(materialOutboundDetail.getUseId(), materialOutboundDetail.getOutboundQuantity()); |
| | | }else{ |
| | | //还原物料库存数 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableInt(materialOutboundDetail.getId(), materialOutboundDetail.getOutboundQuantity()); |
| | | } |
| | | }*/ |
| | | |
| | | } |
| | | } |
| | |
| | | if (!returningWarehouseDetailList.isEmpty()) { |
| | | for (ReturningWarehouseDetail returningWarehouseDetail : returningWarehouseDetailList) { |
| | | //修改物料库存数量 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableInt(returningWarehouseDetail.getInventoryId(), returningWarehouseDetail.getReturnQuantity()); |
| | | materialInventoryMapper.updateMaterialInventoryInventoryInt(returningWarehouseDetail.getInventoryId(), returningWarehouseDetail.getReturnQuantity()); |
| | | } |
| | | } |
| | | materialInventoryMapper.updateReturningWarehouseToExamine(returningId,type,reviewed); |
| | |
| | | if (!returningWarehouseDetailList.isEmpty()) { |
| | | for (ReturningWarehouseDetail returningWarehouseDetail : returningWarehouseDetailList) { |
| | | //修改物料库存数量 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableOut(returningWarehouseDetail.getInventoryId(), returningWarehouseDetail.getReturnQuantity()); |
| | | materialInventoryMapper.updateMaterialInventoryInventoryOut(returningWarehouseDetail.getInventoryId(), returningWarehouseDetail.getReturnQuantity()); |
| | | } |
| | | } |
| | | materialInventoryMapper.updateReturningWarehouseCounterExamination(returningId,type,reviewed); |
| | |
| | | import com.example.erp.entity.mm.MaterialStore; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.mm.BasicWarehouseTypeMapper; |
| | | import com.example.erp.mapper.mm.MaterialInventoryMapper; |
| | | import com.example.erp.mapper.mm.MaterialStoreMapper; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | |
| | | public class MaterialStoreService { |
| | | @Autowired |
| | | MaterialStoreMapper materialStoreMapper; |
| | | @Autowired |
| | | MaterialInventoryMapper materialInventoryMapper; |
| | | @Autowired |
| | | BasicWarehouseTypeMapper basicWarehouseTypeMapper; |
| | | @Autowired |
| | |
| | | String id = ""; |
| | | String type = ""; |
| | | String json = ""; |
| | | double width = 0.0; |
| | | double height = 0.0; |
| | | double singlePieceArea=0.0; |
| | | if (object.get("id") != null) { |
| | | id = object.get("id").toString(); |
| | | } |
| | |
| | | if (object.get("json") != null) { |
| | | json = object.get("json").toString(); |
| | | } |
| | | if (object.get("width") != null) { |
| | | width = Double.parseDouble(object.get("width").toString()); |
| | | } |
| | | if (object.get("height") != null) { |
| | | height = Double.parseDouble(object.get("height").toString()); |
| | | } |
| | | DecimalFormat decimalFormat = new DecimalFormat("#0.00"); |
| | | singlePieceArea= Double.parseDouble(decimalFormat.format(width * height / 100000)); |
| | | if(Long.parseLong(id)>0){ |
| | | materialStoreMapper.updateMaterialStore(type,json, Long.valueOf(id)); |
| | | if (Objects.equals(type, "原片")){ |
| | | materialInventoryMapper.updateMaterialInventoryArea(Long.valueOf(id),singlePieceArea); |
| | | } |
| | | }else{ |
| | | materialStoreMapper.insertMaterialStore(type,json); |
| | | } |
| | |
| | | |
| | | server: |
| | | port: 8080 |
| | | port: 8086 |
| | | |
| | | |
| | | spring: |
| | |
| | | </select> |
| | | |
| | | <select id="getBasicWarehouse" > |
| | | select operate_type from mm.basic_warehouse_type where type=#{type}; |
| | | select operate_type from mm.basic_warehouse_type where type regexp #{type}; |
| | | </select> |
| | | |
| | | |
| | |
| | | |
| | | <update id="updateMaterialInventoryInventoryOut"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity-#{quantity},plan_quantity=if(plan_quantity-#{quantity}>=0,plan_quantity-#{quantity},0) |
| | | set inventory_quantity=inventory_quantity-#{quantity},plan_quantity=if(plan_quantity-#{quantity}>=0,plan_quantity-#{quantity},0),total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryInt"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity+#{quantity},plan_quantity=plan_quantity+#{quantity} |
| | | set inventory_quantity=inventory_quantity+#{quantity},plan_quantity=plan_quantity+#{quantity},total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableInventoryOut"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity-#{quantity},inventory_quantity=inventory_quantity-#{quantity} |
| | | set available_quantity=available_quantity-#{quantity},inventory_quantity=inventory_quantity-#{quantity},total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableInventoryInt"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity+#{quantity},inventory_quantity=inventory_quantity+#{quantity} |
| | | set available_quantity=available_quantity+#{quantity},inventory_quantity=inventory_quantity+#{quantity},total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryReturning" > |
| | | update mm.material_inventory set inventory_quantity=inventory_quantity+#{returningWarehouseDetail.returnQuantity}, |
| | | update mm.material_inventory set available_quantity=available_quantity+#{returningWarehouseDetail.returnQuantity}, |
| | | total_area=total_area+#{totalArea} |
| | | where material_code=#{materialCode} and |
| | | date_of_manufacture=#{returningWarehouseDetail.dateOfManufacture} |
| | |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryReturningNull" > |
| | | update mm.material_inventory set inventory_quantity=inventory_quantity+#{returningWarehouseDetail.returnQuantity}, |
| | | update mm.material_inventory set available_quantity=available_quantity+#{returningWarehouseDetail.returnQuantity}, |
| | | total_area=total_area+#{totalArea} |
| | | where material_code=#{materialCode} and |
| | | date_of_manufacture is null |
| | |
| | | where returning_id=#{number} and returning_number=#{returningWarehouseNumber} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryArea" > |
| | | update mm.material_inventory set single_piece_area=#{singlePieceArea}, |
| | | total_area=inventory_quantity*#{singlePieceArea} |
| | | where material_code=#{materialCode} |
| | | </update> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | |
| | | server: |
| | | port: 8080 |
| | | port: 8086 |
| | | |
| | | |
| | | spring: |
| | |
| | | </select> |
| | | |
| | | <select id="getBasicWarehouse" > |
| | | select operate_type from mm.basic_warehouse_type where type=#{type}; |
| | | select operate_type from mm.basic_warehouse_type where type regexp #{type}; |
| | | </select> |
| | | |
| | | |
| | |
| | | |
| | | <update id="updateMaterialInventoryInventoryOut"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity-#{quantity},plan_quantity=if(plan_quantity-#{quantity}>=0,plan_quantity-#{quantity},0) |
| | | set inventory_quantity=inventory_quantity-#{quantity},plan_quantity=if(plan_quantity-#{quantity}>=0,plan_quantity-#{quantity},0),total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryInt"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity+#{quantity},plan_quantity=plan_quantity+#{quantity} |
| | | set inventory_quantity=inventory_quantity+#{quantity},plan_quantity=plan_quantity+#{quantity},total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableInventoryOut"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity-#{quantity},inventory_quantity=inventory_quantity-#{quantity} |
| | | set available_quantity=available_quantity-#{quantity},inventory_quantity=inventory_quantity-#{quantity},total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableInventoryInt"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity+#{quantity},inventory_quantity=inventory_quantity+#{quantity} |
| | | set available_quantity=available_quantity+#{quantity},inventory_quantity=inventory_quantity+#{quantity},total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryReturning" > |
| | | update mm.material_inventory set inventory_quantity=inventory_quantity+#{returningWarehouseDetail.returnQuantity}, |
| | | update mm.material_inventory set available_quantity=available_quantity+#{returningWarehouseDetail.returnQuantity}, |
| | | total_area=total_area+#{totalArea} |
| | | where material_code=#{materialCode} and |
| | | date_of_manufacture=#{returningWarehouseDetail.dateOfManufacture} |
| | |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryReturningNull" > |
| | | update mm.material_inventory set inventory_quantity=inventory_quantity+#{returningWarehouseDetail.returnQuantity}, |
| | | update mm.material_inventory set available_quantity=available_quantity+#{returningWarehouseDetail.returnQuantity}, |
| | | total_area=total_area+#{totalArea} |
| | | where material_code=#{materialCode} and |
| | | date_of_manufacture is null |
| | |
| | | where returning_id=#{number} and returning_number=#{returningWarehouseNumber} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryArea" > |
| | | update mm.material_inventory set single_piece_area=#{singlePieceArea}, |
| | | total_area=inventory_quantity*#{singlePieceArea} |
| | | where material_code=#{materialCode} |
| | | </update> |
| | | |
| | | |
| | | </mapper> |