2022-12-21 修改产品管理部分问题

zhc4dev
赵玉瑞 2 years ago
parent e326dec258
commit 661cce79cb
  1. 41
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleListDetail.vue
  2. 9
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/ZyStyleModularMapper.java
  3. 6
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/impl/ZyStyleModularServiceImpl.java
  4. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsComponentServiceImpl.java
  5. 8
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsModularCompentServiceImpl.java
  6. 7
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessComponentServiceImpl.java
  7. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/service/impl/ZyStyleAccessoriesServiceImpl.java
  8. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/entity/vo/AllClothStyle.java
  9. 10
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java
  10. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/mapper/ZyStyleFabricMapper.java

@ -48,20 +48,24 @@
<!-- </table>--> <!-- </table>-->
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<h3 style="width: 98%;;margin:0px auto">款式详情</h3> <h3 style="width: 98%;;margin:0px auto">款式详情</h3>
<a-table style="width: 98%;font-size:14px;margin:10px auto" :columns="columns1" :data-source="data1" bordered rowKey="nums" :pagination="false"> <a-table style="width: 98%;font-size:14px;margin:10px auto" :columns="columns1" :data-source="data1" bordered
rowKey="nums" :pagination="false">
</a-table> </a-table>
<h3 style="width: 98%;;margin:20px auto 0">管理模块</h3> <h3 style="width: 98%;;margin:20px auto 0">管理模块</h3>
<a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns" :data-source="data" rowKey="id" bordered :pagination="false"> <a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns" :data-source="data" rowKey="id"
bordered :pagination="false">
</a-table> </a-table>
<h3 style="width: 98%;;margin:20px auto 0">管理面料</h3> <h3 style="width: 98%;;margin:20px auto 0">管理面料</h3>
<a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns2" :data-source="data2" rowKey="id" bordered :pagination="false"> <a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns2" :data-source="data2"
rowKey="id" bordered :pagination="false">
</a-table> </a-table>
<h3 style="width: 98%;;margin:20px auto 0">管理辅料</h3> <h3 style="width: 98%;;margin:20px auto 0">管理辅料</h3>
<a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns3" :data-source="data3" rowKey="id" bordered :pagination="false"> <a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns3" :data-source="data3"
rowKey="id" bordered :pagination="false">
</a-table> </a-table>
@ -71,7 +75,8 @@
<!-- </a-table>--> <!-- </a-table>-->
<h3 style="width: 98%;;margin:20px auto 0">管理工序</h3> <h3 style="width: 98%;;margin:20px auto 0">管理工序</h3>
<a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns5" :data-source="data5" rowKey="id" bordered :pagination="false"> <a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns5" :data-source="data5"
rowKey="id" bordered :pagination="false">
</a-table> </a-table>
</a-spin> </a-spin>
@ -116,7 +121,7 @@
dataIndex: 'createTime', dataIndex: 'createTime',
key: 'createTime', key: 'createTime',
align: 'center' align: 'center'
}, }
]; ];
const columns = [ const columns = [
{ {
@ -340,8 +345,7 @@
data() { data() {
return { return {
visible: false, visible: false,
model:{ model: {},
},
confirmLoading: true, confirmLoading: true,
// //
data: [], data: [],
@ -389,9 +393,10 @@
}); });
} }
this.confirmLoading = false this.confirmLoading = false
if(this.data1.length == 0){ if (this.data1.length === 0) {
this.data1.push(res.result.zyClothsStyle) this.data1.push(res.result.zyClothsStyles)
} }
this.data1 = res.result.zyClothsStyles
this.data2 = res.result.zyStyleFabricList this.data2 = res.result.zyStyleFabricList
this.data3 = res.result.zyStyleAccessoriesList this.data3 = res.result.zyStyleAccessoriesList
this.data = res.result.zyStyleModuleList this.data = res.result.zyStyleModuleList
@ -411,7 +416,17 @@
} }
</script> </script>
<style scoped> <style scoped>
.table{border-color:#d9d9d9;border-radius: 3px} .table {
.table td{padding: 10px 20px;max-width: 380px; } border-color: #d9d9d9;
.table td span{color: #333} border-radius: 3px
}
.table td {
padding: 10px 20px;
max-width: 380px;
}
.table td span {
color: #333
}
</style> </style>

@ -3,6 +3,7 @@ package org.jeecg.modules.demo.zyStyleModular.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular; import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -16,4 +17,12 @@ public interface ZyStyleModularMapper extends BaseMapper<ZyStyleModular> {
List<ZyStyleModular> selectListByStyleId(String styleId); List<ZyStyleModular> selectListByStyleId(String styleId);
/**根据styleId 拿到 款式名称*/
@Select("select style_names from zy_cloths_style where id = #{styleId}")
String getStyleNameByStyleId(String styleId);
/**根据工序id 拿到 工序名称*/
@Select("select process_name from zy_process where id = #{processId}")
String getProcessNameByStyleId(String processId);
} }

@ -25,6 +25,12 @@ public class ZyStyleModularServiceImpl extends ServiceImpl<ZyStyleModularMapper,
@Override @Override
public List<ZyStyleModular> detail(String id) { public List<ZyStyleModular> detail(String id) {
List<ZyStyleModular> list = zyStyleModularMapper.selectListByStyleId(id); List<ZyStyleModular> list = zyStyleModularMapper.selectListByStyleId(id);
for (ZyStyleModular zy : list) {
String styleName = zyStyleModularMapper.getStyleNameByStyleId(zy.getStyleId());
zy.setStyleId(styleName);
String processName = zyStyleModularMapper.getProcessNameByStyleId(zy.getProcessId());
zy.setProcessId(processName);
}
return list; return list;
} }
} }

@ -92,6 +92,10 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
} }
String name = containChinese(zyClothsComponent.getEnterpriseId()); String name = containChinese(zyClothsComponent.getEnterpriseId());
zyClothsComponent.setEnterpriseId(name); zyClothsComponent.setEnterpriseId(name);
String modularName = zyClothsModularMapper.getModularNameByModularId(zyClothsComponent.getModularId());
if (StringUtils.hasText(modularName)) {
zyClothsComponent.setModularId(modularName);
}
return zyClothsComponent; return zyClothsComponent;
} }

@ -4,12 +4,14 @@ import org.jeecg.modules.demo.base.entity.ZyClothsComponent;
import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent; import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent;
import org.jeecg.modules.demo.base.mapper.ZyClothsComponentMapper; import org.jeecg.modules.demo.base.mapper.ZyClothsComponentMapper;
import org.jeecg.modules.demo.base.mapper.ZyClothsModularCompentMapper; import org.jeecg.modules.demo.base.mapper.ZyClothsModularCompentMapper;
import org.jeecg.modules.demo.base.mapper.ZyClothsModularMapper;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService; import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularCompentService; import org.jeecg.modules.demo.base.service.IZyClothsModularCompentService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.StringUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
@ -31,6 +33,8 @@ public class ZyClothsModularCompentServiceImpl extends ServiceImpl<ZyClothsModul
private ZyClothsComponentMapper zyClothsComponentMapper; private ZyClothsComponentMapper zyClothsComponentMapper;
@Resource @Resource
private ZyClothsModularCompentMapper zyClothsModularCompentMapper; private ZyClothsModularCompentMapper zyClothsModularCompentMapper;
@Resource
private ZyClothsModularMapper zyClothsModularMapper;
/** /**
* 把部件信息查出来 赋给模块部件表 * 把部件信息查出来 赋给模块部件表
* @param componentId 部件id * @param componentId 部件id
@ -57,6 +61,10 @@ public class ZyClothsModularCompentServiceImpl extends ServiceImpl<ZyClothsModul
ZyClothsComponent byId = zyClothsComponentService.getById(partsName); ZyClothsComponent byId = zyClothsComponentService.getById(partsName);
s.setPartsName(byId.getPartsName()); s.setPartsName(byId.getPartsName());
} }
if (StringUtils.hasText(s.getModularId())){
String modularName = zyClothsModularMapper.getModularNameByModularId(s.getModularId());
s.setModularId(modularName);
}
} }
return zyClothsModularComponents; return zyClothsModularComponents;
} }

@ -46,6 +46,13 @@ public class ZyProcessComponentServiceImpl extends ServiceImpl<ZyProcessComponen
}else{ }else{
processComponent.setComponentId("null"); processComponent.setComponentId("null");
} }
if (processComponent.getBottleneck().equals("1")){
processComponent.setBottleneck("是");
}else if (processComponent.getBottleneck().equals("2")){
processComponent.setBottleneck("否");
}else {
processComponent.setBottleneck(null);
}
} }
return zyProcessComponents; return zyProcessComponents;
} }

@ -32,6 +32,10 @@ public class ZyStyleAccessoriesServiceImpl extends ServiceImpl<ZyStyleAccessorie
for (ZyStyleAccessories zy : list) { for (ZyStyleAccessories zy : list) {
String typeName = zyStyleFabricMapper.getTypeName(zy.getStyleId()); String typeName = zyStyleFabricMapper.getTypeName(zy.getStyleId());
zy.setTypeName(typeName); zy.setTypeName(typeName);
String styleName = zyStyleFabricMapper.getStyleNameByStyleId(zy.getStyleId());
zy.setStyleId(styleName);
String accessoriesName = zyStyleFabricMapper.getAccessoriesNameByStyleId(zy.getAccessoriesId());
zy.setAccessoriesId(accessoriesName);
} }
return list; return list;
} }

@ -12,7 +12,7 @@ import java.util.List;
@Data @Data
public class AllClothStyle { public class AllClothStyle {
/**服装款式*/ /**服装款式*/
private ZyClothsStyle zyClothsStyle; private List<ZyClothsStyle> zyClothsStyles;
/**子模块 款式模块*/ /**子模块 款式模块*/
private List<NewStyleModule> zyStyleModuleList; private List<NewStyleModule> zyStyleModuleList;
/**子模块 款式面料*/ /**子模块 款式面料*/

@ -53,8 +53,8 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
public AllClothStyle queryDetail(String id) { public AllClothStyle queryDetail(String id) {
AllClothStyle zyAllClothStyle = new AllClothStyle(); AllClothStyle zyAllClothStyle = new AllClothStyle();
//服装款式详情 //服装款式详情
ZyClothsStyle zyClothsStyle = detail(id); List<ZyClothsStyle> zyClothsStyles = detail(id);
zyAllClothStyle.setZyClothsStyle(zyClothsStyle); zyAllClothStyle.setZyClothsStyles(zyClothsStyles);
//服装 款式 模块详情 //服装 款式 模块详情
List<NewStyleModule> zyStyleModuleList = zyStyleModuleService.detail(id); List<NewStyleModule> zyStyleModuleList = zyStyleModuleService.detail(id);
zyAllClothStyle.setZyStyleModuleList(zyStyleModuleList); zyAllClothStyle.setZyStyleModuleList(zyStyleModuleList);
@ -72,7 +72,7 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
return zyAllClothStyle; return zyAllClothStyle;
} }
public ZyClothsStyle detail(String id){ public List<ZyClothsStyle> detail(String id){
ZyClothsStyle zyClothsStyle = zyClothsStyleMapper.selectById(id); ZyClothsStyle zyClothsStyle = zyClothsStyleMapper.selectById(id);
//翻译规格 shape 和企业 //翻译规格 shape 和企业
String shape = zyClothsStyle.getShape(); String shape = zyClothsStyle.getShape();
@ -90,7 +90,9 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
zyClothsStyle.setEnterpriseId("null"); zyClothsStyle.setEnterpriseId("null");
} }
System.out.println("zyClothsStyle 服装款式详情"+zyClothsStyle); System.out.println("zyClothsStyle 服装款式详情"+zyClothsStyle);
return zyClothsStyle; List<ZyClothsStyle> zyClothsStyles = new ArrayList<>();
zyClothsStyles.add(zyClothsStyle);
return zyClothsStyles;
} }

@ -25,4 +25,12 @@ public interface ZyStyleFabricMapper extends BaseMapper<ZyStyleFabric> {
@Select("SELECT * FROM zy_style_fabric WHERE style_id = #{id}") @Select("SELECT * FROM zy_style_fabric WHERE style_id = #{id}")
List<ZyStyleFabric> listByStyleId(String id); List<ZyStyleFabric> listByStyleId(String id);
/**根据styleId 拿到 款式名称*/
@Select("select style_names from zy_cloths_style where id = #{styleId}")
String getStyleNameByStyleId(String styleId);
/**根据styleId 拿到 面料名称*/
@Select("select contents from zy_accessories where id = #{styleId}")
String getAccessoriesNameByStyleId(String styleId);
} }

Loading…
Cancel
Save