diff --git a/ant-design-vue-jeecg/src/views/customerpayment/admin/CustomerPaymentList.vue b/ant-design-vue-jeecg/src/views/customerpayment/admin/CustomerPaymentList.vue index 87572524..f1199cec 100644 --- a/ant-design-vue-jeecg/src/views/customerpayment/admin/CustomerPaymentList.vue +++ b/ant-design-vue-jeecg/src/views/customerpayment/admin/CustomerPaymentList.vue @@ -203,8 +203,7 @@ } ], url: { - up: "/customerpayment/customerPayment/up", - down: "/customerpayment/customerPayment/down", + list: "/customerpayment/customerPayment/list", delete: "/customerpayment/customerPayment/delete", deleteBatch: "/customerpayment/customerPayment/deleteBatch", diff --git a/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentList1.vue b/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentList1.vue index 738d4944..a969c57a 100644 --- a/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentList1.vue +++ b/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentList1.vue @@ -194,6 +194,8 @@ } ], url: { + up: "/customerpayment/customerPayment/up", + down: "/customerpayment/customerPayment/down", list: "/customerpayment/customerPayment/list1", delete: "/customerpayment/customerPayment/delete", deleteBatch: "/customerpayment/customerPayment/deleteBatch", diff --git a/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/CustomerReceivingAddressList.vue b/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/CustomerReceivingAddressList.vue index 81a099c0..7d097d5f 100644 --- a/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/CustomerReceivingAddressList.vue +++ b/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/CustomerReceivingAddressList.vue @@ -98,6 +98,8 @@ + 排序 + 编辑 @@ -119,7 +121,7 @@ - + @@ -130,6 +132,7 @@ import { mixinDevice } from '@/utils/mixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import CustomerReceivingAddressModal from './modules/CustomerReceivingAddressModal' + import CustomerReceivingAddressModal1 from './modules/CustomerReceivingAddressModal1' import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' import Area from '@/components/_util/Area' @@ -137,7 +140,8 @@ name: 'CustomerReceivingAddressList', mixins:[JeecgListMixin, mixinDevice], components: { - CustomerReceivingAddressModal + CustomerReceivingAddressModal, + CustomerReceivingAddressModal1 }, data () { return { @@ -227,6 +231,11 @@ }, }, methods: { + paixu: function (record) { + this.$refs.modalFormpaixu.edit(record.userId); + this.$refs.modalFormpaixu.title = record.userId_dictText+"测体管理"; + this.$refs.modalFormpaixu.disableSubmit = false; + }, getPcaText(code){ return this.pcaData.getText(code); }, diff --git a/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressForm.vue b/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressForm.vue index e3fbe59b..370a9d1e 100644 --- a/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressForm.vue +++ b/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressForm.vue @@ -121,10 +121,7 @@ { required: false}, { validator: (rule, value, callback) => validateDuplicateValue('customer_receiving_address', 'sort', value, this.model.id, callback)}, ], - labelcl: [ - { required: false}, - { validator: (rule, value, callback) => validateDuplicateValue('customer_receiving_address', 'labelcl', value, this.model.id, callback)}, - ], + }, url: { add: "/customerreceivingaddress/customerReceivingAddress/add", diff --git a/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressList1.vue b/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressList1.vue new file mode 100644 index 00000000..8f08a4b3 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressList1.vue @@ -0,0 +1,279 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressModal1.vue b/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressModal1.vue new file mode 100644 index 00000000..baa2b214 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressModal1.vue @@ -0,0 +1,61 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/ordergoods/OrderGoodsList.vue b/ant-design-vue-jeecg/src/views/ordergoods/OrderGoodsList.vue index 2677c4df..2dade959 100644 --- a/ant-design-vue-jeecg/src/views/ordergoods/OrderGoodsList.vue +++ b/ant-design-vue-jeecg/src/views/ordergoods/OrderGoodsList.vue @@ -112,7 +112,15 @@ 下载 - + + + 详情 @@ -279,6 +287,21 @@ align:"center", dataIndex: 'payTotalPrice' }, + { + title: '订单商品模块', + align: "center", + scopedSlots: {customRender: 'mk'} + }, + { + title: '订单商品面料', + align: "center", + scopedSlots: {customRender: 'ml'} + }, + { + title: '订单商品辅料', + align: "center", + scopedSlots: {customRender: 'fl'} + }, { title: '操作', dataIndex: 'action', @@ -289,7 +312,7 @@ } ], url: { - list: "/ordergoods/orderGoods/list", + list: "/ordergoods/orderGoods/list?orderid="+this.$route.query.orderid+"&ischild="+this.$route.query.ischild, delete: "/ordergoods/orderGoods/delete", deleteBatch: "/ordergoods/orderGoods/deleteBatch", exportXlsUrl: "/ordergoods/orderGoods/exportXls", @@ -309,6 +332,36 @@ }, }, methods: { + goodsModule(record) + { + this.$router.push({ + path: '/ordergoodsmodule/OrderGoodsModuleList', + query: { // 路由携带参数 + 'ordergoodsid': record.id, + 'goodsname':record.goodsName, + } + }); + }, + goodsModule2(record) + { + this.$router.push({ + path: '/ordergoodsfabric/OrderGoodsFabricList', + query: { // 路由携带参数 + 'ordergoodsid': record.id, + 'goodsname':record.goodsName, + } + }); + }, + goodsModule3(record) + { + this.$router.push({ + path: '/ordergoodsaccessories/OrderGoodsAccessoriesList', + query: { // 路由携带参数 + 'ordergoodsid': record.id, + 'goodsname':record.goodsName, + } + }); + }, initDictConfig(){ }, getSuperFieldList(){ diff --git a/ant-design-vue-jeecg/src/views/ordergoodsaccessories/OrderGoodsAccessoriesList.vue b/ant-design-vue-jeecg/src/views/ordergoodsaccessories/OrderGoodsAccessoriesList.vue index 90646e4a..632e2380 100644 --- a/ant-design-vue-jeecg/src/views/ordergoodsaccessories/OrderGoodsAccessoriesList.vue +++ b/ant-design-vue-jeecg/src/views/ordergoodsaccessories/OrderGoodsAccessoriesList.vue @@ -1,34 +1,19 @@ - 编辑 - - - - 更多 - - - 详情 - - - - 删除 - - - - + 详情 @@ -174,12 +138,12 @@ } ], url: { - list: "/ordergoodsaccessories/orderGoodsAccessories/list", + list: "/ordergoodsaccessories/orderGoodsAccessories/list?ordergoodsid="+this.$route.query.ordergoodsid, delete: "/ordergoodsaccessories/orderGoodsAccessories/delete", deleteBatch: "/ordergoodsaccessories/orderGoodsAccessories/deleteBatch", exportXlsUrl: "/ordergoodsaccessories/orderGoodsAccessories/exportXls", importExcelUrl: "ordergoodsaccessories/orderGoodsAccessories/importExcel", - + }, dictOptions:{}, superFieldList:[], @@ -187,6 +151,7 @@ }, created() { this.getSuperFieldList(); + this.biaoTi = this.$route.query.goodsname+"订单商品辅料管理"; }, computed: { importExcelUrl: function(){ diff --git a/ant-design-vue-jeecg/src/views/ordergoodsfabric/OrderGoodsFabricList.vue b/ant-design-vue-jeecg/src/views/ordergoodsfabric/OrderGoodsFabricList.vue index 3defa2a9..4a8be7ea 100644 --- a/ant-design-vue-jeecg/src/views/ordergoodsfabric/OrderGoodsFabricList.vue +++ b/ant-design-vue-jeecg/src/views/ordergoodsfabric/OrderGoodsFabricList.vue @@ -1,34 +1,19 @@ - 编辑 - - - - 更多 - - - 详情 - - - - 删除 - - - - + 详情 @@ -174,12 +138,12 @@ } ], url: { - list: "/ordergoodsfabric/orderGoodsFabric/list", + list: "/ordergoodsfabric/orderGoodsFabric/list?ordergoodsid="+this.$route.query.ordergoodsid, delete: "/ordergoodsfabric/orderGoodsFabric/delete", deleteBatch: "/ordergoodsfabric/orderGoodsFabric/deleteBatch", exportXlsUrl: "/ordergoodsfabric/orderGoodsFabric/exportXls", importExcelUrl: "ordergoodsfabric/orderGoodsFabric/importExcel", - + }, dictOptions:{}, superFieldList:[], @@ -187,6 +151,7 @@ }, created() { this.getSuperFieldList(); + this.biaoTi = this.$route.query.goodsname+"订单商品面料管理"; }, computed: { importExcelUrl: function(){ diff --git a/ant-design-vue-jeecg/src/views/ordergoodsmodule/OrderGoodsModuleList.vue b/ant-design-vue-jeecg/src/views/ordergoodsmodule/OrderGoodsModuleList.vue index 082ef795..0c40654e 100644 --- a/ant-design-vue-jeecg/src/views/ordergoodsmodule/OrderGoodsModuleList.vue +++ b/ant-design-vue-jeecg/src/views/ordergoodsmodule/OrderGoodsModuleList.vue @@ -1,44 +1,24 @@ - 编辑 - - - - 更多 - - - 详情 - - - - 删除 - - - - + 详情 @@ -148,6 +107,7 @@ return { description: '订单商品模块表管理页面', // 表头 + biaoTi: '', columns: [ { title: '#', @@ -189,7 +149,7 @@ } ], url: { - list: "/ordergoodsmodule/orderGoodsModule/list", + list: "/ordergoodsmodule/orderGoodsModule/list?ordergoodsid="+this.$route.query.ordergoodsid, delete: "/ordergoodsmodule/orderGoodsModule/delete", deleteBatch: "/ordergoodsmodule/orderGoodsModule/deleteBatch", exportXlsUrl: "/ordergoodsmodule/orderGoodsModule/exportXls", @@ -202,6 +162,7 @@ }, created() { this.getSuperFieldList(); + this.biaoTi = this.$route.query.goodsname+"订单商品模块管理"; }, computed: { importExcelUrl: function(){ diff --git a/ant-design-vue-jeecg/src/views/productplan/ProductplanManage.vue b/ant-design-vue-jeecg/src/views/productplan/ProductplanManage.vue index 3e66ef30..25ae73e0 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ProductplanManage.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ProductplanManage.vue @@ -51,9 +51,9 @@ 自动排位 生成物料单 - 查看物料单(计划面料&计划辅料) + 查看物料单 - 发送到仓库 + 发送到仓库 导出 返回 @@ -205,6 +205,7 @@ export default { syncProductProcess: "/org.jeecg.modules.productplan/zyPlanProcess/syncProductProcess", autoFilling: "/org.jeecg.modules.productplan/zyPlanProcess/autoFilling", createMaterialBill: "/org.jeecg.modules.productplan/zyPlanProcess/createMaterialBill", + sendToRepository: "/org.jeecg.modules.productplan/zyPlanProcess/sendToRepository", stationToolslist: "/stationTool/list2", stationMachinelist: "/stationMachine/list2", addProcessBatch: "/org.jeecg.modules.productplan/zyPlanProcess/addProcessBatch", @@ -351,9 +352,30 @@ export default { }, //查看物料单 - viewMaterialBill(props) { - // alert("deatil row id:"+props.row.id); - this.$refs.zyPlanProcessDataDetail.showModal(props.row.id) + viewMaterialBill() { + // alert("deatil this.planId:"+this.planId); + // this.$refs.zyPlanProcessDataDetail.showModal(this.planId) + this.$router.push({ + path: '/productplan/ZyPlanWuLiaoDataDetail', + query: { // 路由携带参数 + 'planId': this.planId, + }, + }); + }, + + //发送到仓库 + sendToRepository(){ + this.loading = true; + getAction(this.url.sendToRepository, {"planId": this.planId}).then((res) => { + if (res.success) { + this.$message.success("操作成功"); + this.loadData(); + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) }, //加载传递参数 @@ -361,7 +383,6 @@ export default { // debugger; if (this.loadRouteType === false) { this.planId = this.$route.query.planId; - // this.biaoTi = this.$route.query.styleNames+"款式面料管理"; console.log("*******传递的planId:" + this.planId) this.loadRouteType = true; } diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanWuLiaoDataDetail.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanWuLiaoDataDetail.vue new file mode 100644 index 00000000..7fd1dc3b --- /dev/null +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanWuLiaoDataDetail.vue @@ -0,0 +1,291 @@ + + + + diff --git a/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleListDetail.vue b/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleListDetail.vue index d88b9f72..e305d82c 100644 --- a/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleListDetail.vue +++ b/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleListDetail.vue @@ -8,44 +8,6 @@ :width='1000' @ok="handleOk" @cancel="handleCancel"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

款式详情

生产 + 商品 + 详情 @@ -188,6 +190,14 @@ return parseInt(index)+1; } }, + { + title:'下单时间', + align:"center", + dataIndex: 'orderTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, { title:'是否子单', align:"center", @@ -198,14 +208,6 @@ align:"center", dataIndex: 'orderId_dictText' }, - { - title:'下单时间', - align:"center", - dataIndex: 'orderTime', - customRender:function (text) { - return !text?"":(text.length>10?text.substr(0,10):text) - } - }, { title:'订单编号', align:"center", @@ -424,6 +426,15 @@ } }, + shangpin(record){ + this.$router.push({ + path: '/ordergoods/OrderGoodsList', + query: { // 路由携带参数 + 'orderid': record.id, + 'ischild':record.ischild, + } + }); + }, getPcaText(code){ return this.pcaData.getText(code); }, diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java index 4c67e11e..b9c45c65 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java @@ -1,5 +1,6 @@ package org.jeecg.modules.demo.base.controller; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -24,6 +25,7 @@ import javax.servlet.http.HttpServletResponse; import java.util.Arrays; import java.util.HashSet; import java.util.List; +import java.util.stream.Collectors; /** * @Description: zy_cloths_type @@ -147,6 +149,13 @@ public class ZyClothsTypeController extends JeecgController delete(@RequestParam(name = "id", required = true) String id) { zyClothsTypeService.removeById(id); + //如果这是父级 连带子集一起删除 + String parentId = zyClothsTypeMapper.getParentId(id); + if (StringUtils.isEmpty(parentId)){ + List zyClothsTypeList = zyClothsTypeService.list(new LambdaQueryWrapper().eq(ZyClothsType::getTypeId,id)); + List collect = zyClothsTypeList.stream().map(ZyClothsType::getId).collect(Collectors.toList()); + zyClothsTypeService.removeByIds(collect); + } return Result.OK("删除成功!"); } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java index 41357cf9..a8f3f0bc 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java @@ -43,4 +43,7 @@ public interface ZyClothsTypeMapper extends BaseMapper { /**根据type_id拿到类型名称*/ @Select("select type_name from zy_cloths_type where id = #{id} ") String getNameByTypeId(String id); + + @Select("select type_id from zy_cloths_type where id = #{id} ") + String getParentId(String id); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/controller/CustomerReceivingAddressController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/controller/CustomerReceivingAddressController.java index 50a0198e..9baa9022 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/controller/CustomerReceivingAddressController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/controller/CustomerReceivingAddressController.java @@ -49,7 +49,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; public class CustomerReceivingAddressController extends JeecgController { @Autowired private ICustomerReceivingAddressService customerReceivingAddressService; - + /** * 分页列表查询 * @@ -71,7 +71,33 @@ public class CustomerReceivingAddressController extends JeecgController pageList = customerReceivingAddressService.page(page, queryWrapper); return Result.OK(pageList); } - + + + /** + * 分页列表查询 + * + * @param customerReceivingAddress + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "顾客地址表-分页列表查询") + @ApiOperation(value="顾客地址表-分页列表查询", notes="顾客地址表-分页列表查询") + @GetMapping(value = "/list1") + public Result queryPageList1(CustomerReceivingAddress customerReceivingAddress, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(customerReceivingAddress, req.getParameterMap()); + System.out.println(customerReceivingAddress.getUserId()); + queryWrapper.eq("user_id",customerReceivingAddress.getUserId()); + Page page = new Page(pageNo, pageSize); + IPage pageList = customerReceivingAddressService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** * 添加 * @@ -89,7 +115,7 @@ public class CustomerReceivingAddressController extends JeecgController shang(@RequestParam(name="id",required=true) String id) { + customerReceivingAddressService.up(id); + return Result.ok("升序成功"); + } + + + @AutoLog(value = "排序") + @ApiOperation(value="排序", notes="排序") + @GetMapping(value = "/down") + public Result xia(@RequestParam(name="id",required=true) String id) { + int a=customerReceivingAddressService.findSort(id); + if(a==0){ + return Result.error("当前已经是最低级别!!!");}else { + customerReceivingAddressService.down(id); + return Result.ok("降序成功"); + } + } + + } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/mapper/CustomerReceivingAddressMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/mapper/CustomerReceivingAddressMapper.java index 7445d1ab..27ef59ec 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/mapper/CustomerReceivingAddressMapper.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/mapper/CustomerReceivingAddressMapper.java @@ -3,6 +3,8 @@ package org.jeecg.modules.demo.customerreceivingaddress.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -14,4 +16,20 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ public interface CustomerReceivingAddressMapper extends BaseMapper { + @Select("select sort from customer_receiving_address where id=#{id} ") + Integer upfindsort(String id); + + @Select("select id from customer_receiving_address where sort=#{i} ") + String findproid(int i); + + @Update("update customer_receiving_address set sort =#{i} where id = #{id} ") + void innew(String id, int i); + + @Update("update customer_receiving_address set sort =#{sort} where id = #{proid} ") + void innewpro(String proid, Integer sort); + + @Select("select sort from customer_receiving_address where id=#{id} ") + int findSort(String id); + + } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/service/ICustomerReceivingAddressService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/service/ICustomerReceivingAddressService.java index 1047e84a..c052b63b 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/service/ICustomerReceivingAddressService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/service/ICustomerReceivingAddressService.java @@ -11,4 +11,9 @@ import com.baomidou.mybatisplus.extension.service.IService; */ public interface ICustomerReceivingAddressService extends IService { + void up(String id); + + int findSort(String id); + + void down(String id); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/service/impl/CustomerReceivingAddressServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/service/impl/CustomerReceivingAddressServiceImpl.java index 4b7e966f..05d7ca61 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/service/impl/CustomerReceivingAddressServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/service/impl/CustomerReceivingAddressServiceImpl.java @@ -3,6 +3,7 @@ package org.jeecg.modules.demo.customerreceivingaddress.service.impl; import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress; import org.jeecg.modules.demo.customerreceivingaddress.mapper.CustomerReceivingAddressMapper; import org.jeecg.modules.demo.customerreceivingaddress.service.ICustomerReceivingAddressService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -16,4 +17,38 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @Service public class CustomerReceivingAddressServiceImpl extends ServiceImpl implements ICustomerReceivingAddressService { + + @Autowired + CustomerReceivingAddressMapper customerReceivingAddressMapper; + + @Override + public void up(String id) { + Integer sort = customerReceivingAddressMapper.upfindsort(id); + if (sort>0) { + //升序前找到后一个排序 + String proid = customerReceivingAddressMapper.findproid(sort + 1); + if (proid!="") { + //调换排序 + customerReceivingAddressMapper.innew(id,sort+1); + customerReceivingAddressMapper.innewpro(proid,sort); + } + } + } + + @Override + public int findSort(String id) { + return customerReceivingAddressMapper.findSort(id); + } + + @Override + public void down(String id) { + Integer sort = customerReceivingAddressMapper.upfindsort(id); + if (sort>0) { + String proid = customerReceivingAddressMapper.findproid(sort - 1); + if (proid!="") { + customerReceivingAddressMapper.innew(id,sort-1); + customerReceivingAddressMapper.innewpro(proid,sort); + } + } + } } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoods/controller/OrderGoodsController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoods/controller/OrderGoodsController.java index 1a241bd3..1317f815 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoods/controller/OrderGoodsController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoods/controller/OrderGoodsController.java @@ -20,6 +20,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; +import org.jeecg.modules.demo.zyorders.entity.ZyOrders; +import org.jeecg.modules.demo.zyorders.service.IZyOrdersService; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; @@ -49,6 +51,8 @@ import org.jeecg.common.aspect.annotation.AutoLog; public class OrderGoodsController extends JeecgController { @Autowired private IOrderGoodsService orderGoodsService; + @Autowired + private IZyOrdersService zyOrdersService; /** * 分页列表查询 @@ -65,11 +69,34 @@ public class OrderGoodsController extends JeecgController queryPageList(OrderGoods orderGoods, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap()); - Page page = new Page(pageNo, pageSize); - IPage pageList = orderGoodsService.page(page, queryWrapper); - return Result.OK(pageList); + HttpServletRequest req,@RequestParam(name="orderid",required=true)String orderid,@RequestParam(name="ischild",required=true)String ischild) { + if(orderid.equals("undefined")&&ischild.equals("undefined")){ + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = orderGoodsService.page(page, queryWrapper); + return Result.OK(pageList); + }else if(ischild.equals("0")){ + ZyOrders zyOrders = new ZyOrders(); + QueryWrapper queryWrapper1 = QueryGenerator.initQueryWrapper(zyOrders, req.getParameterMap()); + queryWrapper1.eq("order_id",orderid); + List list = zyOrdersService.list(queryWrapper1); + String ids = ""; + for (int i = 0 ; i < list.size() ; i++){ + ids = ids + list.get(i).getId()+","; + } + QueryWrapper queryWrapper2 = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap()); + queryWrapper2.in("orders_id",ids.substring(0,ids.length()-1).split(",")); + Page page = new Page(pageNo, pageSize); + IPage pageList = orderGoodsService.page(page, queryWrapper2); + return Result.OK(pageList); + }else { + QueryWrapper queryWrapper3 = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap()); + queryWrapper3.eq("orders_id",orderid); + Page page = new Page(pageNo, pageSize); + IPage pageList = orderGoodsService.page(page, queryWrapper3); + return Result.OK(pageList); + } + } /** diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsaccessories/controller/OrderGoodsAccessoriesController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsaccessories/controller/OrderGoodsAccessoriesController.java index 9ee06198..b0cacb91 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsaccessories/controller/OrderGoodsAccessoriesController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsaccessories/controller/OrderGoodsAccessoriesController.java @@ -65,8 +65,9 @@ public class OrderGoodsAccessoriesController extends JeecgController queryPageList(OrderGoodsAccessories orderGoodsAccessories, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { + HttpServletRequest req,String ordergoodsid) { QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(orderGoodsAccessories, req.getParameterMap()); + queryWrapper.eq("order_goods_id",ordergoodsid); Page page = new Page(pageNo, pageSize); IPage pageList = orderGoodsAccessoriesService.page(page, queryWrapper); return Result.OK(pageList); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsfabric/controller/OrderGoodsFabricController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsfabric/controller/OrderGoodsFabricController.java index c3f1f71e..7eeda25f 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsfabric/controller/OrderGoodsFabricController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsfabric/controller/OrderGoodsFabricController.java @@ -65,8 +65,9 @@ public class OrderGoodsFabricController extends JeecgController queryPageList(OrderGoodsFabric orderGoodsFabric, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { + HttpServletRequest req,String ordergoodsid) { QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(orderGoodsFabric, req.getParameterMap()); + queryWrapper.eq("order_goods_id",ordergoodsid); Page page = new Page(pageNo, pageSize); IPage pageList = orderGoodsFabricService.page(page, queryWrapper); return Result.OK(pageList); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsmodule/controller/OrderGoodsModuleController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsmodule/controller/OrderGoodsModuleController.java index caf05345..f8c834e7 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsmodule/controller/OrderGoodsModuleController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsmodule/controller/OrderGoodsModuleController.java @@ -65,8 +65,9 @@ public class OrderGoodsModuleController extends JeecgController queryPageList(OrderGoodsModule orderGoodsModule, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { + HttpServletRequest req,String ordergoodsid) { QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(orderGoodsModule, req.getParameterMap()); + queryWrapper.eq("order_goods_id",ordergoodsid); Page page = new Page(pageNo, pageSize); IPage pageList = orderGoodsModuleService.page(page, queryWrapper); return Result.OK(pageList); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java index 967857d4..2c11750f 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java @@ -100,6 +100,14 @@ public class ZyPlanProcessController extends JeecgController getWuLiaoDetail(ZyPlanProcess zyPlanProcess, + HttpServletRequest req) { + Map map = zyPlanProcessService.getWuLiaoDetail(zyPlanProcess); + return Result.OK(map); + } + @ApiOperation(value = "读取工序", notes = "读取工序") @GetMapping(value = "/syncProductProcess") public Result syncProductProcess(ZyPlanProcess zyPlanProcess, @@ -138,6 +146,14 @@ public class ZyPlanProcessController extends JeecgController sendToRepository(ZyPlanProcess zyPlanProcess, + HttpServletRequest req) { + zyPlanProcessService.sendToRepository(zyPlanProcess); + return Result.OK(); + } + @ApiOperation(value = "计划班组管理-查询产品工序&班组", notes = "计划班组管理-查询产品工序&班组") @GetMapping(value = "/getTeamDatalist") public Result getTeamDatalist(ZyPlanProcess zyPlanProcess, diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanAccessories.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanAccessories.java index 9435045e..f828a94b 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanAccessories.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanAccessories.java @@ -75,6 +75,11 @@ public class ZyPlanAccessories implements Serializable { @ApiModelProperty(value = "辅料id") @Dict(dictTable = "zy_accessories", dicText = "contents", dicCode = "id") private String accessoriesId; + + @Excel(name = "辅料名称", width = 15) + @ApiModelProperty(value = "辅料名称") + private String accessoriesName; + /** * 用量(合计) */ diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanFabric.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanFabric.java index cc008a9f..e8079bc9 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanFabric.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanFabric.java @@ -76,6 +76,10 @@ public class ZyPlanFabric implements Serializable { @ApiModelProperty(value = "面料id") @Dict(dictTable = "zy_fabric", dicText = "name", dicCode = "id") private String fabricId; + + @Excel(name = "面料名称", width = 15) + @ApiModelProperty(value = "面料名称") + private String fabricName; /** * 用量(合计) */ diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessService.java index 80aea3a9..4cc0099a 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessService.java @@ -27,4 +27,7 @@ public interface IZyPlanProcessService extends IService { void createMaterialBill(ZyPlanProcess zyPlanProcess); + Map getWuLiaoDetail(ZyPlanProcess zyPlanProcess); + + void sendToRepository(ZyPlanProcess zyPlanProcess); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java index 1500aefe..63b0afe0 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java @@ -11,6 +11,8 @@ import org.jeecg.modules.demo.accessories.entity.ZyAccessories; import org.jeecg.modules.demo.accessories.service.IZyAccessoriesService; import org.jeecg.modules.demo.base.entity.ZyProcess; import org.jeecg.modules.demo.base.service.IZyProcessService; +import org.jeecg.modules.demo.delivery.entity.Delivery; +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.demo.ordergoods.entity.OrderGoods; @@ -146,6 +148,9 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl getProcessDatalist(ZyPlanProcess zyPlanProcess) { //生产计划id String planId = zyPlanProcess.getPlanId(); @@ -234,12 +239,12 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl planProcessList = this.list(new LambdaQueryWrapper().eq(ZyPlanProcess::getPlanId, zyPlanProcess.getPlanId())); - if(ObjectUtils.isEmpty(planProcessList)) return; + if (ObjectUtils.isEmpty(planProcessList)) return; this.delBillData(zyPlanProcess); List idList = planProcessList.stream().map(ZyPlanProcess::getId).collect(Collectors.toList()); QueryWrapper qw = new QueryWrapper(); - qw.select("fabric_id", "sum(amount) as count"); + qw.select("fabric_id", "fabric_name", "sum(amount) as count"); qw.in("plan_process_id", idList); qw.groupBy("fabric_id"); List> maplist = zyPlanProcessFabricMapper.selectMaps(qw); @@ -248,13 +253,14 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl> maplist2 = zyPlanProcessAccessoriesMapper.selectMaps(qw2); @@ -263,6 +269,7 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl stationList, List machineList) { if (!ObjectUtils.isEmpty(machineList)) { List machineList1 = machineList.stream().map(ZyProcessMachine::getMachineId).collect(Collectors.toList()); @@ -505,12 +513,95 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl fabricList = iZyPlanFabricService.list(new LambdaQueryWrapper() + .eq(ZyPlanFabric::getPlanId, zyPlanProcess.getPlanId())); + List deliveryList4Fabric = new LinkedList<>(); + Optional.ofNullable(fabricList).orElse(new LinkedList<>()).forEach(e -> { + Delivery delivery = new Delivery(); + delivery.setDeliveryReason("0"); + delivery.setDeliveryTime(new Date()); + delivery.setItemType("0"); + delivery.setAmount(e.getAmount().doubleValue()); + delivery.setCarrierId("admin"); + delivery.setAdminId("admin"); + delivery.setStorehouseId("TODO"); + ZyFabric zyFabric = iZyFabricService.getById(e.getFabricId()); + if (!ObjectUtils.isEmpty(zyFabric)) { + delivery.setItemCode(zyFabric.getFabricNumber()); + } + deliveryList4Fabric.add(delivery); + }); + iDeliveryService.saveBatch(deliveryList4Fabric); + + List accessoriesList = iZyPlanAccessoriesService.list(new LambdaQueryWrapper() + .eq(ZyPlanAccessories::getPlanId, zyPlanProcess.getPlanId())); + List deliveryList4accessories = new LinkedList<>(); + Optional.ofNullable(accessoriesList).orElse(new LinkedList<>()).forEach(e -> { + Delivery delivery2 = new Delivery(); + delivery2.setDeliveryReason("0"); + delivery2.setDeliveryTime(new Date()); + delivery2.setItemType("1"); + delivery2.setAmount(e.getAmount().doubleValue()); + delivery2.setCarrierId("admin"); + delivery2.setAdminId("admin"); + delivery2.setStorehouseId("TODO"); + ZyAccessories zyAccessories = iZyAccessoriesService.getById(e.getAccessoriesId()); + if (!ObjectUtils.isEmpty(zyAccessories)) { + delivery2.setItemCode(zyAccessories.getNums()); + } + deliveryList4accessories.add(delivery2); + }); + iDeliveryService.saveBatch(deliveryList4accessories); + } + + + @Override + public Map getWuLiaoDetail(ZyPlanProcess zyPlanProcess) { + String planId = zyPlanProcess.getPlanId(); + ZyProductPlan zyProductPlan = iZyProductPlanService.getById(planId); + if (ObjectUtils.isEmpty(zyProductPlan)) { + throw new JeecgBootException("生产计划不存在!"); + } + + List planProcessList = this.list(new LambdaQueryWrapper() + .eq(ZyPlanProcess::getPlanId, zyPlanProcess.getPlanId())); + + List ids = Optional.ofNullable(planProcessList).orElse(new LinkedList<>()) + .stream().map(ZyPlanProcess::getId).collect(Collectors.toList()); + + Map result = new HashMap<>(); + List fabricList = iZyPlanFabricService.list(new LambdaQueryWrapper() + .eq(ZyPlanFabric::getPlanId, zyPlanProcess.getPlanId())); + result.put("fabricList", fabricList); + + List accessoriesList = iZyPlanAccessoriesService.list(new LambdaQueryWrapper() + .eq(ZyPlanAccessories::getPlanId, zyPlanProcess.getPlanId())); + result.put("accessoriesList", accessoriesList); + + List processFabricList = iZyPlanProcessFabricService.list(new LambdaQueryWrapper() + .in(ZyPlanProcessFabric::getPlanProcessId, ids)); + result.put("processFabricList", processFabricList); + + List processAccessoriesList = iZyPlanProcessAccessoriesService.list(new LambdaQueryWrapper() + .in(ZyPlanProcessAccessories::getPlanProcessId, ids)); + result.put("processAccessoriesList", processAccessoriesList); + return result; + } + @Override public List getTeamDatalist(ZyPlanProcess zyPlanProcess) { //生产计划id String planId = zyPlanProcess.getPlanId(); ZyProductPlan zyProductPlan = iZyProductPlanService.getById(planId); - if (ObjectUtils.isEmpty(zyPlanProcess)) { + if (ObjectUtils.isEmpty(zyProductPlan)) { throw new JeecgBootException("生产计划不存在!"); } //工单id