diff --git a/ant-design-vue-jeecg/src/config/router.config.js b/ant-design-vue-jeecg/src/config/router.config.js index ad108f89..9031de02 100644 --- a/ant-design-vue-jeecg/src/config/router.config.js +++ b/ant-design-vue-jeecg/src/config/router.config.js @@ -642,4 +642,8 @@ export const constantRouterMap = [ path: '/shopping/views/ClothDetail',//这里是你需要设置新窗口打开的页面的路径s component: () => import('@/views/shopping/pages/clothDetail'), }, + { + path: '/shopping/views/person',//这里是你需要设置新窗口打开的页面的路径s + component: () => import('@/views/shopping/pages/gerenzhongxin'), + }, ] 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/shopping/assets/bg05.png b/ant-design-vue-jeecg/src/views/shopping/assets/bg05.png new file mode 100644 index 00000000..bc6bac21 Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/bg05.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/common.css b/ant-design-vue-jeecg/src/views/shopping/assets/common.css index 8e571cd7..78cd8e36 100644 --- a/ant-design-vue-jeecg/src/views/shopping/assets/common.css +++ b/ant-design-vue-jeecg/src/views/shopping/assets/common.css @@ -90,4 +90,8 @@ a { .c_9a9b9b { color: #9A9B9B; -} \ No newline at end of file +} +.c_1B { + color: #1B1B1B; +} +.textfield {overflow: hidden;text-overflow: ellipsis;white-space: nowrap;} \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/details01.png b/ant-design-vue-jeecg/src/views/shopping/assets/details01.png new file mode 100644 index 00000000..f8273718 Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/details01.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/details02.png b/ant-design-vue-jeecg/src/views/shopping/assets/details02.png new file mode 100644 index 00000000..f8273718 Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/details02.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/details03.png b/ant-design-vue-jeecg/src/views/shopping/assets/details03.png new file mode 100644 index 00000000..f8273718 Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/details03.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/details04.png b/ant-design-vue-jeecg/src/views/shopping/assets/details04.png new file mode 100644 index 00000000..f8273718 Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/details04.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.css b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.css index ff38f99a..3439648d 100644 --- a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.css +++ b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 3854415 */ - src: url('iconfont.woff2?t=1673012900302') format('woff2'), - url('iconfont.woff?t=1673012900302') format('woff'), - url('iconfont.ttf?t=1673012900302') format('truetype'); + src: url('iconfont.woff2?t=1673860163583') format('woff2'), + url('iconfont.woff?t=1673860163583') format('woff'), + url('iconfont.ttf?t=1673860163583') format('truetype'); } .iconfont { @@ -13,6 +13,26 @@ -moz-osx-font-smoothing: grayscale; } +.icon-weishoucang:before { + content: "\e603"; +} + +.icon-yishoucang:before { + content: "\e614"; +} + +.icon-ic_jia:before { + content: "\e608"; +} + +.icon-zanting:before { + content: "\e640"; +} + +.icon-biaoqian:before { + content: "\e63d"; +} + .icon-sousuo:before { content: "\e622"; } diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.js b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.js index 9a95f567..8490ccc6 100644 --- a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.js +++ b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_3854415='',function(n){var t=(t=document.getElementsByTagName("script"))[t.length-1],e=t.getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var c,o,i,s,d,a=function(t,e){e.parentNode.insertBefore(t,e)};if(e&&!n.__iconfont__svg__cssinject__){n.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}c=function(){var t,e=document.createElement("div");e.innerHTML=n._iconfont_svg_string_3854415,(e=e.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",e=e,(t=document.body).firstChild?a(e,t.firstChild):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(c,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),c()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(i=c,s=n.document,d=!1,h(),s.onreadystatechange=function(){"complete"==s.readyState&&(s.onreadystatechange=null,l())})}function l(){d||(d=!0,i())}function h(){try{s.documentElement.doScroll("left")}catch(t){return void setTimeout(h,50)}l()}}(window); \ No newline at end of file +window._iconfont_svg_string_3854415='',function(c){var t=(t=document.getElementsByTagName("script"))[t.length-1],e=t.getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var i,o,n,l,a,s=function(t,e){e.parentNode.insertBefore(t,e)};if(e&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}i=function(){var t,e=document.createElement("div");e.innerHTML=c._iconfont_svg_string_3854415,(e=e.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",e=e,(t=document.body).firstChild?s(e,t.firstChild):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),i()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(n=i,l=c.document,a=!1,h(),l.onreadystatechange=function(){"complete"==l.readyState&&(l.onreadystatechange=null,d())})}function d(){a||(a=!0,n())}function h(){try{l.documentElement.doScroll("left")}catch(t){return void setTimeout(h,50)}d()}}(window); \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.json b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.json index acb41baa..622d2a89 100644 --- a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.json +++ b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.json @@ -5,6 +5,41 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "9526741", + "name": "未收藏", + "font_class": "weishoucang", + "unicode": "e603", + "unicode_decimal": 58883 + }, + { + "icon_id": "9526824", + "name": "已收藏", + "font_class": "yishoucang", + "unicode": "e614", + "unicode_decimal": 58900 + }, + { + "icon_id": "5219331", + "name": "衣架", + "font_class": "ic_jia", + "unicode": "e608", + "unicode_decimal": 58888 + }, + { + "icon_id": "887983", + "name": "暂停", + "font_class": "zanting", + "unicode": "e640", + "unicode_decimal": 58944 + }, + { + "icon_id": "1305451", + "name": "标签", + "font_class": "biaoqian", + "unicode": "e63d", + "unicode_decimal": 58941 + }, { "icon_id": "1304890", "name": "搜索", diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.ttf b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.ttf index 57e07f90..45e4eccf 100644 Binary files a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.ttf and b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.ttf differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff index a5ceba4d..6fea7e63 100644 Binary files a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff and b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff2 b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff2 index 6a42ba0b..57a48c17 100644 Binary files a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff2 and b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff2 differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/photo.png b/ant-design-vue-jeecg/src/views/shopping/assets/photo.png new file mode 100644 index 00000000..d6e42647 Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/photo.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/selected01.png b/ant-design-vue-jeecg/src/views/shopping/assets/selected01.png new file mode 100644 index 00000000..58e1c63b Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/selected01.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/selected02.png b/ant-design-vue-jeecg/src/views/shopping/assets/selected02.png new file mode 100644 index 00000000..3b122aea Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/selected02.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/selected03.png b/ant-design-vue-jeecg/src/views/shopping/assets/selected03.png new file mode 100644 index 00000000..4ed8228d Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/selected03.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/selected04.png b/ant-design-vue-jeecg/src/views/shopping/assets/selected04.png new file mode 100644 index 00000000..76cb95f1 Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/selected04.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/selected05.png b/ant-design-vue-jeecg/src/views/shopping/assets/selected05.png new file mode 100644 index 00000000..a054f09f Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/selected05.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/components/Header/HeaderView.vue b/ant-design-vue-jeecg/src/views/shopping/components/Header/HeaderView.vue index c362e53a..429a792f 100644 --- a/ant-design-vue-jeecg/src/views/shopping/components/Header/HeaderView.vue +++ b/ant-design-vue-jeecg/src/views/shopping/components/Header/HeaderView.vue @@ -24,7 +24,7 @@ - +
-
- 详情页衣服id{{ this.$route.query.id }} 详情页衣服title{{ - this.$route.query.title - }} + +
+ + + +
+ + + + +
+ +
+
+
+
+
{{title}}
+

销量:{{sales}}件

+

价格:¥{{price}}

+

优惠:{{favour}}

+

促销:{{sell}}详情>>>

+
+
颜色:{{color}}
+ + + 黑 + + + 灰 + + + 橙 + + +
尺码:尺码参照表 | 找到您的尺寸
+
+ {{item.size}} +
+
+
免费配送与退货服务更多详情
+
+
使用花呗分期,最低每月¥1182.50。详细说明
+
+
加入购物袋
+
立即购买
+ +
+ +
+
+
已选
+
+
+ +

{{item.text}}

+
+
+
+
+
+ 商品介绍 + 加入购物车 +
+ + + + + + + + + + + + + + + + + + + +
商品名称:{{clothDetail.name}}商品编号:{{clothDetail.num}}风格:{{clothDetail.style}}商品毛重:{{clothDetail.weight}}
货号:{{clothDetail.itemNo}}领型:{{clothDetail.collar}}材质:{{clothDetail.material}}适用场景:{{clothDetail.scene}}
版型:{{clothDetail.type}}衣门襟:{{clothDetail.placket}}开衩设计:{{clothDetail.slit}}适用人群:{{clothDetail.people}}
+
+
@@ -24,9 +207,224 @@ } + diff --git a/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue b/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue new file mode 100644 index 00000000..824682e7 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue @@ -0,0 +1,93 @@ + + + + + + + + + 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"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

款式详情

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/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