2022-12-20 产品管理详情接口

zhc4dev
赵玉瑞 2 years ago
parent 311525bfbd
commit d2855d30ee
  1. 2
      ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue
  2. 17
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentListDetail.vue
  3. 20
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularListDetail.vue
  4. 7
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleListDetail.vue
  5. 3
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/IZyStyleModularService.java
  6. 11
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/impl/ZyStyleModularServiceImpl.java
  7. 16
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsComponentController.java
  8. 14
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularController.java
  9. 313
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java
  10. 15
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/vo/ZyClothsComponentDetail.java
  11. 19
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/vo/ZyClothsModularDetail.java
  12. 80
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/vo/ZyProcessModularVo.java
  13. 11
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsModularMapper.java
  14. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java
  15. 20
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/xml/ZyClothsModularMapper.xml
  16. 3
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsComponentService.java
  17. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsModularCompentService.java
  18. 7
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsModularService.java
  19. 77
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsComponentServiceImpl.java
  20. 23
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsModularCompentServiceImpl.java
  21. 77
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsModularServiceImpl.java
  22. 3
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessComponentMapper.java
  23. 10
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/xml/ZyProcessComponentMapper.xml
  24. 3
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/IZyProcessComponentService.java
  25. 35
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessComponentServiceImpl.java
  26. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/controller/ZyStyleAccessoriesController.java
  27. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/mapper/ZyStyleAccessoriesMapper.java
  28. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/service/IZyStyleAccessoriesService.java
  29. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/service/impl/ZyStyleAccessoriesServiceImpl.java
  30. 23
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
  31. 25
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/entity/vo/AllClothStyle.java
  32. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/mapper/ZyClothsStyleMapper.java
  33. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java
  34. 106
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java
  35. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/mapper/ZyStyleFabricMapper.java
  36. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/service/IZyStyleFabricService.java
  37. 51
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/service/impl/ZyStyleFabricServiceImpl.java
  38. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java
  39. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java
  40. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/xml/ZyStyleModuleMapper.xml
  41. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/service/IZyStyleModuleService.java
  42. 67
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/service/impl/ZyStyleModuleServiceImpl.java

@ -270,7 +270,7 @@ export default {
viewVid(record) {
this.$refs.ZyClothsModularCompentList.showModal1();
this.$refs.ZyClothsModularCompentList.edit1(record);
console.log("zyclothsMclist" + record.id);
console.log("制衣模块传给模块部件的id zyclothsMclist" + record.id);
this.$refs.ZyClothsModularCompentList.disableSubmit = false;
},
viewVid2(record) {

@ -93,8 +93,23 @@
showModal(record) {
this.visible = true;
this.model = record
this.$http.get('/base/zyClothsComponent/detail?id='+record.id).then(
res=>{
// this.data = res.result
// this.ProcessData = res.result.zyProcess
// this.basicActionData = res.result.zyClothActions
// this.accessoriesData = res.result.zyFabrics
// this.fabricData = res.result.zyAccessories
console.log('工序详情页')
console.log(this.data)
console.log(this.accessoriesData)
console.log(this.fabricData)
this.img = "http://10.100.200.112/jeecg-boot/sys/common/static/"+this.data.image;
this.mp4 = "http://10.100.200.112/jeecg-boot/sys/common/static/"+this.data.vedio;
}
)
console.log('record')
console.log(record)
console.log(record.id)
},
handleOk(e) {
this.confirmLoading = true;

@ -146,8 +146,24 @@
showModal(record) {
this.visible = true;
this.model = record
console.log('record')
console.log(record)
this.$http.get('/base/zyClothsModular/detail?id='+record.id).then(
res=>{
// this.data = res.result
// this.ProcessData = res.result.zyProcess
// this.basicActionData = res.result.zyClothActions
// this.accessoriesData = res.result.zyFabrics
// this.fabricData = res.result.zyAccessories
console.log('工序详情页')
console.log(this.data)
console.log(this.accessoriesData)
console.log(this.fabricData)
this.img = "http://10.100.200.112/jeecg-boot/sys/common/static/"+this.data.image;
this.mp4 = "http://10.100.200.112/jeecg-boot/sys/common/static/"+this.data.vedio;
}
)
console.log('制衣模块 record id')
console.log(record.id)
},
handleOk(e) {
this.confirmLoading = true;

@ -440,7 +440,12 @@
showModal(record) {
this.visible = true;
this.model = record
console.log('this.model')
this.$http.get('/zyclothsstyle/zyClothsStyle/detail?id='+record.id).then(
res=>{
}
)
console.log('this.model'+record.id)
console.log(this.model)
},
handleOk(e) {

@ -3,6 +3,8 @@ package org.jeecg.modules.demo.zyStyleModular.service;
import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 款式工序表
* @Author: jeecg-boot
@ -11,4 +13,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IZyStyleModularService extends IService<ZyStyleModular> {
List<ZyStyleModular> detail(String id);
}

@ -7,6 +7,9 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import java.util.List;
/**
* @Description: 款式工序表
* @Author: jeecg-boot
@ -16,4 +19,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyStyleModularServiceImpl extends ServiceImpl<ZyStyleModularMapper, ZyStyleModular> implements IZyStyleModularService {
@Resource
private ZyStyleModularMapper zyStyleModularMapper;
@Override
public List<ZyStyleModular> detail(String id) {
List<ZyStyleModular> list = zyStyleModularMapper.selectListByStyleId(id);
return list;
}
}

@ -12,6 +12,8 @@ import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.base.entity.ZyClothsComponent;
import org.jeecg.modules.demo.base.entity.vo.ZyClothsComponentDetail;
import org.jeecg.modules.demo.base.entity.vo.ZyClothsModularDetail;
import org.jeecg.modules.demo.base.entity.vo.ZyProcessVo;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
@ -79,6 +81,20 @@ public class ZyClothsComponentController extends JeecgController<ZyClothsCompone
// return Result.OK(list);
// }
/**
* 制衣部件详情
* @param id 根据制衣部件id进行查询
*/
@AutoLog(value = "制衣部件详情")
@ApiOperation(value = "制衣部件详情", notes = "根据制衣部件详情id进行查询")
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
System.out.println("controller层接受到的id:zy_cloths_component对象 Id: "+id);
ZyClothsComponentDetail detail = zyClothsComponentService.queryDetail(id);
return Result.OK(detail);
}
/**
* 添加
*

@ -12,6 +12,7 @@ import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.entity.vo.ZyClothsModularDetail;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.springframework.beans.factory.annotation.Autowired;
@ -78,6 +79,19 @@ public class ZyClothsModularController extends JeecgController<ZyClothsModular,
return Result.OK(list);
}
/**
* 制衣模块详情
* @param id 根据服装款式id进行查询
*/
@AutoLog(value = "制衣模块详情详情")
@ApiOperation(value = "制衣模块详情详情", notes = "根据制衣模块详情id进行查询")
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
System.out.println("controller层接受到的id: zy_cloths_modularId: "+id);
ZyClothsModularDetail detail = zyClothsModularService.queryDetail(id);
return Result.OK(detail);
}
/**
* 添加
*

@ -4,6 +4,7 @@ import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.accessories.entity.ZyAccessories;
@ -33,180 +34,182 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
/**
* @Description: zy_process
* @Author: jeecg-boot
* @Date: 2021-11-03
* @Date: 2021-11-03
* @Version: V1.0
*/
@Api(tags="zy_process")
@Api(tags = "zy_process")
@RestController
@RequestMapping("/base/zyProcess")
@Slf4j
public class ZyProcessController extends JeecgController<ZyProcess, IZyProcessService> {
@Autowired
private IZyProcessService zyProcessService;
@Autowired
IZyProcessAccessoriesService zyProcessAccessoriesService;
@Autowired
IZyProcessActionService zyProcessActionService;
@Autowired
IZyProcessFabricService zyProcessFabricService;
@Autowired
private IZyDevicetypeService1 zyDevicetypeService;
@Autowired
private IZyToolTypesService zyToolTypesService;
/**
* 分页列表查询
*
* @param zyProcess
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "zy_process-分页列表查询")
@ApiOperation(value="zy_process-分页列表查询", notes="zy_process-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyProcess zyProcess,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyProcess, req.getParameterMap());
//QueryWrapper queryWrapper = new QueryWrapper();
Page<ZyProcess> page = new Page<ZyProcess>(pageNo, pageSize);
IPage<ZyProcess> pageList = zyProcessService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyProcess
* @return
*/
@AutoLog(value = "zy_process-添加")
@ApiOperation(value="zy_process-添加", notes="zy_process-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyProcess zyProcess) {
zyProcess.setCreateTime(null);
QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("process_name",zyProcess.getProcessName());
int a=zyProcessService.count(queryWrapper);
if(a!=0)
return Result.error("添加失败,该工序名称已存在!!!");
zyProcessService.save(zyProcess);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyProcess
* @return
*/
@AutoLog(value = "zy_process-编辑")
@ApiOperation(value="zy_process-编辑", notes="zy_process-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyProcess zyProcess) {
QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("process_name",zyProcess.getProcessName());
int a=zyProcessService.count(queryWrapper);
if(a!=0)
return Result.error("编辑失败,该工序名称已存在!!!");
zyProcessService.updateById(zyProcess);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "zy_process-通过id删除")
@ApiOperation(value="zy_process-通过id删除", notes="zy_process-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
zyProcessService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "zy_process-批量删除")
@ApiOperation(value="zy_process-批量删除", notes="zy_process-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.zyProcessService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "zy_process-通过id查询")
@ApiOperation(value="zy_process-通过id查询", notes="zy_process-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ZyProcess zyProcess=zyProcessService.selectZyprocess(id);
List<ZyAccessories> pageList=zyProcessAccessoriesService.selectByid(id);
List<ZyClothAction> pageList1=zyProcessActionService.selectByid(id);
List<ZyFabric> pageList2=zyProcessFabricService.selectByid(id);
List<ZyDevicetypel> pageList3=zyDevicetypeService.selectByid(id);
List<ZyToolTypes> pageList4=zyToolTypesService.selectByid(id);
ZyAllProcess zyAllProcess=new ZyAllProcess();
zyAllProcess.setZyProcess(zyProcess);
zyAllProcess.setZyClothActions(pageList1);
zyAllProcess.setZyAccessories(pageList);
zyAllProcess.setZyFabrics(pageList2);
zyAllProcess.setZyDevicetypes(pageList3);
zyAllProcess.setZyToolTypes(pageList4);
if(zyAllProcess==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyAllProcess);
}
@Autowired
private IZyProcessService zyProcessService;
@Autowired
IZyProcessAccessoriesService zyProcessAccessoriesService;
@Autowired
IZyProcessActionService zyProcessActionService;
@Autowired
IZyProcessFabricService zyProcessFabricService;
@Autowired
private IZyDevicetypeService1 zyDevicetypeService;
@Autowired
private IZyToolTypesService zyToolTypesService;
/**
* 分页列表查询
*
* @param zyProcess
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "zy_process-分页列表查询")
@ApiOperation(value = "zy_process-分页列表查询", notes = "zy_process-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyProcess zyProcess,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyProcess, req.getParameterMap());
//QueryWrapper queryWrapper = new QueryWrapper();
Page<ZyProcess> page = new Page<ZyProcess>(pageNo, pageSize);
IPage<ZyProcess> pageList = zyProcessService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyProcess
* @return
*/
@AutoLog(value = "zy_process-添加")
@ApiOperation(value = "zy_process-添加", notes = "zy_process-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyProcess zyProcess) {
zyProcess.setCreateTime(null);
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("process_name", zyProcess.getProcessName());
int a = zyProcessService.count(queryWrapper);
if (a != 0)
return Result.error("添加失败,该工序名称已存在!!!");
zyProcessService.save(zyProcess);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyProcess
* @return
*/
@AutoLog(value = "zy_process-编辑")
@ApiOperation(value = "zy_process-编辑", notes = "zy_process-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyProcess zyProcess) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("process_name", zyProcess.getProcessName());
int a = zyProcessService.count(queryWrapper);
if (a != 0)
return Result.error("编辑失败,该工序名称已存在!!!");
zyProcessService.updateById(zyProcess);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "zy_process-通过id删除")
@ApiOperation(value = "zy_process-通过id删除", notes = "zy_process-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
zyProcessService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "zy_process-批量删除")
@ApiOperation(value = "zy_process-批量删除", notes = "zy_process-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.zyProcessService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 导出excel
*
* @param request
* @param zyProcess
*/
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "zy_process-通过id查询")
@ApiOperation(value = "zy_process-通过id查询", notes = "zy_process-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
ZyProcess zyProcess = zyProcessService.selectZyprocess(id);
List<ZyAccessories> pageList = zyProcessAccessoriesService.selectByid(id);
List<ZyClothAction> pageList1 = zyProcessActionService.selectByid(id);
List<ZyFabric> pageList2 = zyProcessFabricService.selectByid(id);
List<ZyDevicetypel> pageList3 = zyDevicetypeService.selectByid(id);
List<ZyToolTypes> pageList4 = zyToolTypesService.selectByid(id);
ZyAllProcess zyAllProcess = new ZyAllProcess();
zyAllProcess.setZyProcess(zyProcess);
zyAllProcess.setZyClothActions(pageList1);
zyAllProcess.setZyAccessories(pageList);
zyAllProcess.setZyFabrics(pageList2);
zyAllProcess.setZyDevicetypes(pageList3);
zyAllProcess.setZyToolTypes(pageList4);
if (zyAllProcess == null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyAllProcess);
}
/**
* 导出excel
*
* @param request
* @param zyProcess
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyProcess zyProcess) {
return super.exportXls(request, zyProcess, ZyProcess.class, "zy_process");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZyProcess.class);
}
@AutoLog(value = "zy_process-顺序查询")
@ApiOperation(value="zy_process-顺序查询", notes="zy_process-顺序查询")
@GetMapping(value = "/sort")
public Result<?> sort(@RequestParam(name="id",required=true) String id) {
String sort=zyProcessService.sort(id);
if(sort==null){
return Result.ok(0);
}
return Result.OK(sort.substring(10,sort.length()));
}
@AutoLog(value = "zy_process-顺序查询")
@ApiOperation(value = "zy_process-顺序查询", notes = "zy_process-顺序查询")
@GetMapping(value = "/sort")
public Result<?> sort(@RequestParam(name = "id", required = true) String id) {
String sort = zyProcessService.sort(id);
if (sort == null) {
return Result.ok(0);
}
return Result.OK(sort.substring(10, sort.length()));
}
}

@ -0,0 +1,15 @@
package org.jeecg.modules.demo.base.entity.vo;
import lombok.Data;
import org.jeecg.modules.demo.base.entity.ZyClothsComponent;
import org.jeecg.modules.demo.pro.entity.ZyProcessComponent;
import java.util.List;
@Data
public class ZyClothsComponentDetail {
/**制衣部件 详情*/
private ZyClothsComponent zyClothsComponent;
/**部件工序 详情*/
private List<ZyProcessComponent> zyProcessComponents;
}

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.base.entity.vo;
import lombok.Data;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent;
import java.util.List;
@Data
public class ZyClothsModularDetail {
/**制衣模块*/
private ZyClothsModular zyClothsModular;
/**模块部件*/
private List<ZyClothsModularCompent> zyClothsModularComponents;
/**模块工序*/
private List<ZyProcessModularVo> zyProcessModularVos;
}

@ -0,0 +1,80 @@
package org.jeecg.modules.demo.base.entity.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 不知道什么原因 在base模块中无法调用ZyProcessModular实体类
* 因此创建这个类来接受数据
* @Description: 模块工序表
*/
@Data
@TableName("zy_process_modular")
public class ZyProcessModularVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**
* 创建日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**
* 更新人
*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**
* 所属部门
*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**
* 模块ID
*/
@ApiModelProperty(value = "模块ID")
//@Dict(dictTable = "zy_cloths_modular", dicText = "modular_name", dicCode = "id")
private java.lang.String modularId;
/**
* 工序ID
*/
@ApiModelProperty(value = "工序ID")
//@Dict(dictTable = "zy_process", dicText = "process_name", dicCode = "id")
private java.lang.String processId;
/**
* 序号
*/
@ApiModelProperty(value = "序号")
private Integer serialnumber;
}

@ -5,6 +5,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.demo.base.entity.vo.ZyProcessModularVo;
/**
* @Description: zy_cloths_modular
@ -16,4 +17,14 @@ public interface ZyClothsModularMapper extends BaseMapper<ZyClothsModular> {
public List<ZyClothsModular> selectByType(@Param("cloths_type_id")String cloths_type_id);
List<String> selectNumsList1();
/**根据cloth_type_id查服装类型名称*/
String getTypeNameById(String clothsTypeId);
/**根据ZyClothsModular的id查询 模块工序 list信息*/
List<ZyProcessModularVo> queryProcessModularList(String id);
String getModularNameByModularId(String modularId);
String getProcessNameByProcessId(String processId);
}

@ -21,8 +21,10 @@ public interface ZyClothsTypeMapper extends BaseMapper<ZyClothsType> {
@Select("select nums from zy_cloths_type where nums like 'QIYE%' order by nums desc limit 0,1 ")
String sort();
/**根据部门id拿到部门名称*/
String getEnterprisenameById(String enterpriseId);
/**根据部门名称拿到部门id*/
String getEnterpriseName(String enterpriseName);

@ -10,4 +10,24 @@
select nums
from zy_cloths_modular
</select>
<select id="getTypeNameById" resultType="java.lang.String">
SELECT type_name
from zy_cloths_type
where id = #{clothsTypeId}
</select>
<select id="queryProcessModularList" resultType="org.jeecg.modules.demo.base.entity.vo.ZyProcessModularVo">
SELECT *
from zy_process_modular
where modular_id =#{id}
</select>
<select id="getModularNameByModularId" resultType="java.lang.String">
SELECT modular_name
from zy_cloths_modular
where id = #{modularId}
</select>
<select id="getProcessNameByProcessId" resultType="java.lang.String">
SELECT process_name
from zy_process
where id = #{processId}
</select>
</mapper>

@ -4,6 +4,7 @@ import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.base.entity.ZyClothsComponent;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.entity.vo.ZyClothsComponentDetail;
import org.jeecg.modules.demo.base.entity.vo.ZyProcessVo;
import java.util.List;
@ -21,4 +22,6 @@ public interface IZyClothsComponentService extends IService<ZyClothsComponent> {
/**编码规则:服装类型(10)+序号(8)*/
String generateNumber(ZyClothsComponent zyClothsComponent);
ZyClothsComponentDetail queryDetail(String id);
}

@ -3,6 +3,8 @@ package org.jeecg.modules.demo.base.service;
import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 制衣模块部件中间表
* @Author: jeecg-boot
@ -13,4 +15,6 @@ public interface IZyClothsModularCompentService extends IService<ZyClothsModular
/**把部件信息查出来 赋给模块部件表*/
ZyClothsModularCompent handleComponent(String componentId);
List<ZyClothsModularCompent> detail(String id);
}

@ -2,6 +2,7 @@ package org.jeecg.modules.demo.base.service;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.demo.base.entity.vo.ZyClothsModularDetail;
import java.util.List;
@ -16,4 +17,10 @@ public interface IZyClothsModularService extends IService<ZyClothsModular> {
/**nums,编号,varchar,18,非空,不重复,编码规则:服装类型(10)+序号(8)*/
String generateNumber(String id);
/**
* 制衣模块详情
* @param id 根据服装款式id进行查询
*/
ZyClothsModularDetail queryDetail(String id);
}

@ -1,17 +1,19 @@
package org.jeecg.modules.demo.base.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.base.entity.ZyClothsComponent;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.entity.vo.ZyClothsComponentDetail;
import org.jeecg.modules.demo.base.entity.vo.ZyProcessVo;
import org.jeecg.modules.demo.base.mapper.ZyClothsComponentMapper;
import org.jeecg.modules.demo.base.mapper.ZyClothsModularMapper;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.pro.entity.ZyProcessComponent;
import org.jeecg.modules.demo.pro.service.IZyProcessComponentService;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
@ -23,20 +25,26 @@ import java.util.regex.Pattern;
/**
* @Description: zy_cloths_component
* @Author: jeecg-boot
* @Date: 2021-11-10
* @Date: 2021-11-10
* @Version: V1.0
*/
@Service
public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentMapper, ZyClothsComponent> implements IZyClothsComponentService {
@Autowired
private IZyProcessComponentService zyProcessComponentService;
@Resource
private ZyClothsComponentMapper zyClothsComponentMapper;
@Resource
ZyClothsTypeMapper zyClothsTypeMapper;
private ZyClothsModularMapper zyClothsModularMapper;
@Resource
private ZyClothsTypeMapper zyClothsTypeMapper;
@Override
public List<ZyProcessVo> selectList(String id) {
List<String> list=baseMapper.selectlistid(id);
List<ZyProcessVo> zyProcessVoList=baseMapper.selectProcessVo(list);
List<String> list = baseMapper.selectlistid(id);
List<ZyProcessVo> zyProcessVoList = baseMapper.selectProcessVo(list);
return zyProcessVoList;
}
@ -58,24 +66,71 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
return nums1 + format;
}
private Long orderNumber() {
@Override
public ZyClothsComponentDetail queryDetail(String id) {
ZyClothsComponentDetail detail = new ZyClothsComponentDetail();
//制衣部件
ZyClothsComponent zyClothsComponent = zyClothsComponentDetail(id);
detail.setZyClothsComponent(zyClothsComponent);
//部件工序
List<ZyProcessComponent> zyProcessComponents = zyProcessComponentService.detail(id);
detail.setZyProcessComponents(zyProcessComponents);
return detail;
}
public ZyClothsComponent zyClothsComponentDetail(String id) {
ZyClothsComponent zyClothsComponent = zyClothsComponentMapper.selectById(id);
//翻译
String clothsTypeId = zyClothsComponent.getClothsTypeId();
if (StringUtils.hasText(clothsTypeId)) {
String typeNameById = zyClothsModularMapper.getTypeNameById(clothsTypeId);
if (StringUtils.hasText(typeNameById)){
zyClothsComponent.setClothsTypeId(typeNameById);
}
}
String name = containChinese(zyClothsComponent.getEnterpriseId());
zyClothsComponent.setEnterpriseId(name);
return zyClothsComponent;
}
//判断字符串中有没有汉字 这个方法的作用就是如果是汉字或者空就直接返回true
//如果是一些编码 那就根据编码查到对应的名字并返回
//汉字:[19968,40869]
public String containChinese(String str) {
if (StringUtils.isEmpty(str)){
return str;
}
for (int i = 0; i < str.length(); i++) {
int n = (int) str.charAt(i);
if (19968 <= n && n <= 40869) {
return str;
}
}
return zyClothsTypeMapper.getEnterprisenameById(str);
}
public Long orderNumber() {
List<String> listString = zyClothsComponentMapper.selectNumsList2();
//System.err.println(listString);
List<Long> listLong = new ArrayList<>();
for (String nums : listString) {
String REGEX = "[^0-9]";
String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim();
if (!StringUtils.hasText(newNums)){
if (!StringUtils.hasText(newNums)) {
newNums = "0";
}
if (newNums.length() > 8) {
String substring = nums.substring(nums.length() - 8);
listLong.add(Long.valueOf(substring));
}else {
} else {
listLong.add(Long.valueOf(newNums));
}
}
System.out.println(listLong);
return Collections.max(listLong)+1;
return Collections.max(listLong) + 1;
}
}

@ -4,6 +4,7 @@ import org.jeecg.modules.demo.base.entity.ZyClothsComponent;
import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent;
import org.jeecg.modules.demo.base.mapper.ZyClothsComponentMapper;
import org.jeecg.modules.demo.base.mapper.ZyClothsModularCompentMapper;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularCompentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -11,6 +12,8 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import java.util.List;
import java.util.regex.Pattern;
/**
* @Description: 制衣模块部件中间表
@ -21,8 +24,13 @@ import javax.annotation.Resource;
@Service
public class ZyClothsModularCompentServiceImpl extends ServiceImpl<ZyClothsModularCompentMapper, ZyClothsModularCompent> implements IZyClothsModularCompentService {
@Autowired
private IZyClothsComponentService zyClothsComponentService;
@Resource
private ZyClothsComponentMapper zyClothsComponentMapper;
@Resource
private ZyClothsModularCompentMapper zyClothsModularCompentMapper;
/**
* 把部件信息查出来 赋给模块部件表
* @param componentId 部件id
@ -37,4 +45,19 @@ public class ZyClothsModularCompentServiceImpl extends ServiceImpl<ZyClothsModul
zy.setComponentId(componentId);
return zy;
}
@Override
public List<ZyClothsModularCompent> detail(String id) {
List<ZyClothsModularCompent> zyClothsModularComponents = zyClothsModularCompentMapper.queryList(id);
//只要数字 如果是纯数字 就把它替换了
Pattern pattern = Pattern.compile("[^0-9]");
for (ZyClothsModularCompent s : zyClothsModularComponents) {
String partsName = s.getPartsName();
if (pattern.matcher(partsName).matches()) {
ZyClothsComponent byId = zyClothsComponentService.getById(partsName);
s.setPartsName(byId.getPartsName());
}
}
return zyClothsModularComponents;
}
}

@ -1,9 +1,13 @@
package org.jeecg.modules.demo.base.service.impl;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.entity.vo.ZyClothsModularDetail;
import org.jeecg.modules.demo.base.entity.vo.ZyProcessModularVo;
import org.jeecg.modules.demo.base.mapper.ZyClothsModularMapper;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import org.jeecg.modules.demo.base.service.IZyClothsModularCompentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -25,10 +29,14 @@ import java.util.regex.Pattern;
*/
@Service
public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMapper, ZyClothsModular> implements IZyClothsModularService {
@Autowired
private IZyClothsModularCompentService zyClothsModularComponentService;
@Resource
private ZyClothsModularMapper zyClothsModularMapper;
@Resource
ZyClothsTypeMapper zyClothsTypeMapper;
private ZyClothsTypeMapper zyClothsTypeMapper;
@Override
public List<ZyClothsModular> selectByType(String cloths_type_id) {
@ -47,6 +55,73 @@ public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMappe
}
/**
* 制衣模块详情
*
* @param id 根据服装款式id进行查询
*/
@Override
public ZyClothsModularDetail queryDetail(String id) {
ZyClothsModularDetail zyClothsModularDetail = new ZyClothsModularDetail();
//制衣模块
ZyClothsModular zyClothsModular = detail(id);
zyClothsModularDetail.setZyClothsModular(zyClothsModular);
//模块部件
List<ZyClothsModularCompent> zyClothsModularComponents = zyClothsModularComponentService.detail(id);
zyClothsModularDetail.setZyClothsModularComponents(zyClothsModularComponents);
//模块工序
List<ZyProcessModularVo> zyProcessModularVos = processModularDetail(id);
zyClothsModularDetail.setZyProcessModularVos(zyProcessModularVos);
return zyClothsModularDetail;
}
private List<ZyProcessModularVo> processModularDetail(String id) {
List<ZyProcessModularVo> zyProcessModularVos = zyClothsModularMapper.queryProcessModularList(id);
for (ZyProcessModularVo zyProcessModularVo: zyProcessModularVos) {
String modularName = zyClothsModularMapper.getModularNameByModularId(zyProcessModularVo.getModularId());
if (StringUtils.hasText(modularName)){
zyProcessModularVo.setModularId(modularName);
}else{
zyProcessModularVo.setModularId("null");
}
String processName = zyClothsModularMapper.getProcessNameByProcessId(zyProcessModularVo.getProcessId());
if (StringUtils.hasText(processName)){
zyProcessModularVo.setProcessId(processName);
}else{
zyProcessModularVo.setProcessId("null");
}
}
return zyProcessModularVos;
}
private ZyClothsModular detail(String id) {
ZyClothsModular zyClothsModular = zyClothsModularMapper.selectById(id);
//翻译服装类型名称 和企业
String clothsTypeId1 = zyClothsModular.getClothsTypeId();
if (StringUtils.isEmpty(clothsTypeId1)){
zyClothsModular.setClothsTypeId("null");
return zyClothsModular;
}
String clothsTypeId = zyClothsModularMapper.getTypeNameById(zyClothsModular.getClothsTypeId());
if (StringUtils.hasText(clothsTypeId)){
zyClothsModular.setClothsTypeId(clothsTypeId);
} else {
zyClothsModular.setClothsTypeId("null");
}
String enterpriseName = zyClothsTypeMapper.getEnterprisenameById(zyClothsModular.getEnterpriseId());
if (StringUtils.hasText(enterpriseName)){
zyClothsModular.setEnterpriseId(enterpriseName);
}else {
zyClothsModular.setEnterpriseId("null");
}
System.out.println("zyClothsModular 服装款式详情"+zyClothsModular);
return zyClothsModular;
}
private Long orderNumber() {
List<String> listString = zyClothsModularMapper.selectNumsList1();
List<Long> listLong = new ArrayList<>();

@ -14,4 +14,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface ZyProcessComponentMapper extends BaseMapper<ZyProcessComponent> {
List<ZyProcessComponent> queryListByComponentId(String id);
String getComponentNameByComponentId(String processId);
}

@ -2,4 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.pro.mapper.ZyProcessComponentMapper">
<select id="queryListByComponentId" resultType="org.jeecg.modules.demo.pro.entity.ZyProcessComponent">
SELECT *
from zy_process_component
where component_id = #{id}
</select>
<select id="getComponentNameByComponentId" resultType="java.lang.String">
SELECT process_name
from zy_process
where id = #{id}
</select>
</mapper>

@ -3,6 +3,8 @@ package org.jeecg.modules.demo.pro.service;
import org.jeecg.modules.demo.pro.entity.ZyProcessComponent;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: zy_process_component
* @Author: jeecg-boot
@ -11,4 +13,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IZyProcessComponentService extends IService<ZyProcessComponent> {
List<ZyProcessComponent> detail(String id);
}

@ -1,19 +1,52 @@
package org.jeecg.modules.demo.pro.service.impl;
import org.jeecg.modules.demo.base.mapper.ZyClothsModularMapper;
import org.jeecg.modules.demo.pro.entity.ZyProcessComponent;
import org.jeecg.modules.demo.pro.mapper.ZyProcessComponentMapper;
import org.jeecg.modules.demo.pro.service.IZyProcessComponentService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.List;
/**
* @Description: zy_process_component
* @Author: jeecg-boot
* @Date: 2021-11-11
* @Date: 2021-11-11
* @Version: V1.0
*/
@Service
public class ZyProcessComponentServiceImpl extends ServiceImpl<ZyProcessComponentMapper, ZyProcessComponent> implements IZyProcessComponentService {
@Resource
private ZyProcessComponentMapper zyProcessComponentMapper;
@Resource
private ZyClothsModularMapper zyClothsModularMapper;
@Override
public List<ZyProcessComponent> detail(String id) {
List<ZyProcessComponent> zyProcessComponents = zyProcessComponentMapper.queryListByComponentId(id);
if (ObjectUtils.isEmpty(zyProcessComponents)) {
return zyProcessComponents;
}
for (ZyProcessComponent processComponent : zyProcessComponents) {
String processName = zyClothsModularMapper.getProcessNameByProcessId(processComponent.getProcessId());
if (StringUtils.hasText(processName)){
processComponent.setProcessId(processName);
}else{
processComponent.setProcessId("null");
}
String componentName = zyProcessComponentMapper.getComponentNameByComponentId(processComponent.getComponentId());
if (StringUtils.hasText(componentName)){
processComponent.setComponentId(componentName);
}else{
processComponent.setComponentId("null");
}
}
return zyProcessComponents;
}
}

@ -53,9 +53,9 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyStyleAccessoriesController extends JeecgController<ZyStyleAccessories, IZyStyleAccessoriesService> {
@Autowired
private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Autowired
private ZyStyleAccessoriesMapper zyStyleAccessoriesMapper;
@Resource
private ZyStyleAccessoriesMapper zyStyleAccessoriesMapper;
@Resource
private ZyStyleFabricMapper zyStyleFabricMapper;

@ -19,4 +19,7 @@ public interface ZyStyleAccessoriesMapper extends BaseMapper<ZyStyleAccessories>
@Select("select count(*) from zy_style_accessories where style_id=#{styleId} and accessories_id=#{accessoriesId}")
int count(@Param("accessoriesId") String accessoriesId, @Param("styleId") String styleId);
@Select("select * from zy_style_accessories where style_id=#{styleId}")
List<ZyStyleAccessories> listByStyleId(String id);
}

@ -3,6 +3,8 @@ package org.jeecg.modules.demo.zyaccessories.service;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 款式辅料管理
* @Author: jeecg-boot
@ -11,4 +13,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IZyStyleAccessoriesService extends IService<ZyStyleAccessories> {
List<ZyStyleAccessories> detail(String id);
}

@ -1,12 +1,17 @@
package org.jeecg.modules.demo.zyaccessories.service.impl;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.demo.zyaccessories.mapper.ZyStyleAccessoriesMapper;
import org.jeecg.modules.demo.zyaccessories.service.IZyStyleAccessoriesService;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import java.util.List;
/**
* @Description: 款式辅料管理
* @Author: jeecg-boot
@ -16,4 +21,18 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyStyleAccessoriesServiceImpl extends ServiceImpl<ZyStyleAccessoriesMapper, ZyStyleAccessories> implements IZyStyleAccessoriesService {
@Resource
private ZyStyleAccessoriesMapper zyStyleAccessoriesMapper;
@Resource
private ZyStyleFabricMapper zyStyleFabricMapper;
@Override
public List<ZyStyleAccessories> detail(String id) {
List<ZyStyleAccessories> list = zyStyleAccessoriesMapper.listByStyleId(id);
for (ZyStyleAccessories zy : list) {
String typeName = zyStyleFabricMapper.getTypeName(zy.getStyleId());
zy.setTypeName(typeName);
}
return list;
}
}

@ -20,17 +20,20 @@ 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.base.entity.ZyClothsComponent;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.accessories.entity.ZyAccessories;
import org.jeecg.modules.demo.base.entity.*;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.jeecg.modules.demo.device.entity.ZyDevicetypel;
import org.jeecg.modules.demo.fabric.entity.ZyFabric;
import org.jeecg.modules.demo.pro.entity.NewZyProcessComponent;
import org.jeecg.modules.demo.pro.entity.ZyProcessComponent;
import org.jeecg.modules.demo.tools.entity.ZyToolTypes;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.entity.vo.AllClothStyle;
import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
@ -117,6 +120,20 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
return Result.OK(list);
}
/**
* 服装款式详情
* @param id 根据服装款式id进行查询
*/
@AutoLog(value = "服装款式详情")
@ApiOperation(value = "服装款式详情", notes = "根据服装款式id进行查询")
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
System.out.println("controller层接受到的id: styleId: "+id);
AllClothStyle allClothStyle = zyClothsStyleService.queryDetail(id);
return Result.OK(allClothStyle);
}
/**
* 制衣部件
*

@ -0,0 +1,25 @@
package org.jeecg.modules.zyclothsstyle.entity.vo;
import lombok.Data;
import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import java.util.List;
@Data
public class AllClothStyle {
/**服装款式*/
private ZyClothsStyle zyClothsStyle;
/**子模块 款式模块*/
private List<NewStyleModule> zyStyleModuleList;
/**子模块 款式面料*/
private List<NewZyStyleFabric> zyStyleFabricList;
/**子模块 款式辅料*/
private List<ZyStyleAccessories> zyStyleAccessoriesList;
/*子模块 款式型号 因风格问题 暂不开发*/
/**子模块 款式工序*/
private List<ZyStyleModular> zyStyleModularList;
}

@ -21,4 +21,7 @@ public interface ZyClothsStyleMapper extends BaseMapper<ZyClothsStyle> {
@Select("select nums from zy_cloths_type where id=#{id} order by create_time DESC limit 0,1")
String sort(String id);
@Select("select depart_name from sys_depart where id=#{enterpriseId}")
String getEnterpriseName(String enterpriseId);
}

@ -3,6 +3,7 @@ package org.jeecg.modules.zyclothsstyle.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.entity.vo.AllClothStyle;
/**
* @Description: 服装款式表
@ -13,7 +14,13 @@ import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
public interface IZyClothsStyleService extends IService<ZyClothsStyle> {
/**生成编号 类型编号(10位)+顺序号(8位)*/
String generateNumber(ZyClothsStyle zyClothsStyle);
//String generateNumber(ZyClothsStyle zyClothsStyle);
String sort(String id);
/**
* 服装类型详情
* @param id 根据服装款式id进行查询
*/
AllClothStyle queryDetail(String id);
}

@ -1,24 +1,25 @@
package org.jeecg.modules.zyclothsstyle.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.bytedeco.javacpp.freenect;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
import org.jeecg.modules.demo.zyStyleModular.service.IZyStyleModularService;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.demo.zyaccessories.service.IZyStyleAccessoriesService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.entity.vo.AllClothStyle;
import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jetbrains.annotations.NotNull;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
@ -31,51 +32,90 @@ import java.util.regex.Pattern;
*/
@Service
public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, ZyClothsStyle> implements IZyClothsStyleService {
@Autowired
private IZyStyleModuleService zyStyleModuleService;
@Autowired
private IZyStyleFabricService zyStyleFabricService;
@Autowired
private IZyStyleModularService zyStyleModularService;
@Autowired
private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Resource
private ZyClothsStyleMapper zyClothsStyleMapper;
@Resource
ZyClothsTypeMapper zyClothsTypeMapper;
/**
* 生成编号 类型编号10位+顺序号8位
* 服装类型详情
*
* @param zyClothsStyle
* @param id 根据服装款式id进行查询
*/
@Override
public String generateNumber(ZyClothsStyle zyClothsStyle) {
//先拿到类型编号
String nums = zyClothsStyle.getTypeId();
ZyClothsType zyClothsType = zyClothsTypeMapper.selectById(nums);
String nums1 = zyClothsType.getNums();
//截取后十位
//String substring = nums.substring(nums.length() - 10);
//再来一个顺序号
String format = String.format("%08d", orderNumber());
//生成编码
return nums1 + format;
public AllClothStyle queryDetail(String id) {
AllClothStyle zyAllClothStyle = new AllClothStyle();
//服装款式详情
ZyClothsStyle zyClothsStyle = detail(id);
zyAllClothStyle.setZyClothsStyle(zyClothsStyle);
//服装 款式 模块详情
List<NewStyleModule> zyStyleModuleList = zyStyleModuleService.detail(id);
zyAllClothStyle.setZyStyleModuleList(zyStyleModuleList);
//服装 面料详情
List<NewZyStyleFabric> zyStyleFabricList = zyStyleFabricService.detail(id);
zyAllClothStyle.setZyStyleFabricList(zyStyleFabricList);
//服装 辅料详情
List<ZyStyleAccessories> zyStyleAccessoriesList = zyStyleAccessoriesService.detail(id);
zyAllClothStyle.setZyStyleAccessoriesList(zyStyleAccessoriesList);
//服装 工序详情
List<ZyStyleModular> zyStyleModularList = zyStyleModularService.detail(id);
zyAllClothStyle.setZyStyleModularList(zyStyleModularList);
return zyAllClothStyle;
}
public ZyClothsStyle detail(String id){
ZyClothsStyle zyClothsStyle = zyClothsStyleMapper.selectById(id);
//翻译规格 shape 和企业
String shape = zyClothsStyle.getShape();
if (shape.equals("1")){
zyClothsStyle.setShape("预制");
}else if (shape.equals("0")){
zyClothsStyle.setShape("定制");
}else {
zyClothsStyle.setShape("null");
}
String enterpriseName = zyClothsStyleMapper.getEnterpriseName(zyClothsStyle.getEnterpriseId());
if (StringUtils.hasText(enterpriseName)){
zyClothsStyle.setEnterpriseId(enterpriseName);
}else {
zyClothsStyle.setEnterpriseId("null");
}
System.out.println("zyClothsStyle 服装款式详情"+zyClothsStyle);
return zyClothsStyle;
}
@Override
public String sort(String id) {
String nums = zyClothsStyleMapper.sort(id);
// System.out.println(nums + " nums");
//System.out.println(nums + " nums");
String format = String.format("%08d", orderNumber());
// System.err.println(format + " format");
//System.err.println(format + " format");
return nums + format;
}
private Long orderNumber() {
List<String> numsList = zyClothsStyleMapper.selectNumsList();
// System.out.println(numsList);
// System.out.println(numsList.size());
/*
System.out.println(numsList);
System.out.println(numsList.size());
*/
List<Long> list = new ArrayList<>();
for (String nums : numsList) {
String REGEX = "[^0-9]";
String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim();
if (newNums.length()>8) {
if (newNums.length() > 8) {
String substring = newNums.substring(newNums.length() - 8);
list.add(Long.valueOf(substring));
continue;
@ -86,8 +126,10 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
list.add(Long.valueOf(newNums));
}
// System.out.println(list);
// System.out.println(list.size());
/*
System.out.println(list);
System.out.println(list.size());
*/
return Collections.max(list) + 1;
}
}

@ -17,8 +17,12 @@ public interface ZyStyleFabricMapper extends BaseMapper<ZyStyleFabric> {
/**
* @param styleId zyClothsStyle 中的id 款式id
* 拿到服装类型名称
* @param styleId zyClothsStyle 中的id 款式id
*/
@Select("select type_name from zy_cloths_style where id = #{styleId}")
String getTypeName(String styleId);
@Select("SELECT * FROM zy_style_fabric WHERE style_id = #{id}")
List<ZyStyleFabric> listByStyleId(String id);
}

@ -2,8 +2,11 @@ package org.jeecg.modules.zystylefabric.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric;
import java.util.List;
/**
* @Description: 款式面料表
* @Author: jeecg-boot
@ -12,4 +15,5 @@ import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric;
*/
public interface IZyStyleFabricService extends IService<ZyStyleFabric> {
List<NewZyStyleFabric> detail(String id);
}

@ -1,12 +1,22 @@
package org.jeecg.modules.zystylefabric.service.impl;
import org.jeecg.modules.demo.fabric.entity.ZyFabric;
import org.jeecg.modules.demo.fabric.service.IZyFabricService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
* @Description: 款式面料表
* @Author: jeecg-boot
@ -16,4 +26,45 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyStyleFabricServiceImpl extends ServiceImpl<ZyStyleFabricMapper, ZyStyleFabric> implements IZyStyleFabricService {
@Autowired
private IZyClothsStyleService zyClothsStyleService;
@Autowired
private IZyFabricService zyFabricService;
@Resource
private ZyStyleFabricMapper zyStyleFabricMapper;
@Override
public List<NewZyStyleFabric> detail(String id) {
List<ZyStyleFabric> list = zyStyleFabricMapper.listByStyleId(id);
List<NewZyStyleFabric> newZyStyleFabrics = new ArrayList<>();
for (ZyStyleFabric zyStyleF : list) {
System.out.println("****" + zyStyleF);
NewZyStyleFabric newZySF = new NewZyStyleFabric();
//编辑回显
newZySF.setId(zyStyleF.getId());
newZySF.setFabricId(zyStyleF.getFabricId());
newZySF.setStyleId(zyStyleF.getStyleId());
//拿到服装类型名称
String typeName = zyStyleFabricMapper.getTypeName(newZySF.getStyleId());
newZySF.setTypeName(typeName);
//款式编号和名称
String styleId = zyStyleF.getStyleId();
ZyClothsStyle styleById = zyClothsStyleService.getById(styleId);
newZySF.setStyleNums(styleById.getNums());
newZySF.setStyleNames(styleById.getStyleNames());
//模块编号和名称
String fabricId = zyStyleF.getFabricId();
ZyFabric fabricById = zyFabricService.getById(fabricId);
newZySF.setFabricNumber(fabricById.getFabricNumber());
newZySF.setFabricName(fabricById.getName());
newZySF.setCreateTime(zyStyleF.getCreateTime());
newZyStyleFabrics.add(newZySF);
}
return newZyStyleFabrics;
}
}

@ -75,7 +75,7 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
List<NewStyleModule> listNewStyleModules = new ArrayList<>();
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
System.err.println("传来的 "+id);
System.err.println("ZyStyleModule 款式模块表 传来的 "+id);
if (id != null) {
queryWrapper.eq("style_id", id);
}

@ -15,5 +15,6 @@ import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
*/
public interface ZyStyleModuleMapper extends BaseMapper<ZyStyleModule> {
/**根据服装款式的id style_id 查询所有*/
List<ZyStyleModule> handWritingList(String id);
}

@ -2,8 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper">
<select id="handWritingList" resultType="org.jeecg.modules.zystylemodule.entity.ZyStyleModule" parameterType="string">
select * from zy_style_module
where style_id = #{id}
<select id="handWritingList" resultType="org.jeecg.modules.zystylemodule.entity.ZyStyleModule"
parameterType="string">
SELECT *
FROM zy_style_module
WHERE style_id = #{id}
</select>
</mapper>

@ -15,5 +15,5 @@ import java.util.List;
*/
public interface IZyStyleModuleService extends IService<ZyStyleModule> {
List<NewStyleModule> detail(String id);
}

@ -1,12 +1,24 @@
package org.jeecg.modules.zystylemodule.service.impl;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
* @Description: 款式模块表
@ -17,4 +29,59 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyStyleModuleServiceImpl extends ServiceImpl<ZyStyleModuleMapper, ZyStyleModule> implements IZyStyleModuleService {
@Autowired
private IZyClothsModularService zyClothsModularService;
@Autowired
private IZyClothsStyleService zyClothsStyleService;
@Resource
private ZyStyleFabricMapper zyStyleFabricMapper;
@Resource
private ZyStyleModuleMapper zyStyleModuleMapper;
@Override
public List<NewStyleModule> detail(String id) {
List<ZyStyleModule> list = zyStyleModuleMapper.handWritingList(id);
List<NewStyleModule> newStyleModuleList = new ArrayList<>();
for (ZyStyleModule zyStyleModule : list) {
NewStyleModule newSeMo = new NewStyleModule();
//编辑回显
newSeMo.setId(zyStyleModule.getId());
newSeMo.setTypeId(zyStyleModule.getTypeId());
newSeMo.setStyleId(zyStyleModule.getStyleId());
newSeMo.setModularId(zyStyleModule.getModularId());
//款式编号和名称
String styleId = zyStyleModule.getStyleId();
ZyClothsStyle styleById = zyClothsStyleService.getById(styleId);
newSeMo.setStyleNums(styleById.getNums());
newSeMo.setStyleNames(styleById.getStyleNames());
//模块编号和名称
String modularId = zyStyleModule.getModularId();
ZyClothsModular modularById = zyClothsModularService.getById(modularId);
if(StringUtils.isEmpty(modularById)){
newSeMo.setModularNums("null");
newSeMo.setModularName("null");
}else {
newSeMo.setModularNums(modularById.getNums());
newSeMo.setModularName(modularById.getModularName());
}
newSeMo.setCreateTime(zyStyleModule.getCreateTime());
//服装类型 服装类型的id 不知道什么情况 传的是zy_cloths_style中的type_id
//String styleId1 = zyStyleModule.getStyleId();
String typeName = zyStyleFabricMapper.getTypeName(zyStyleModule.getStyleId());
//System.out.println(typeId);
//String typeNameByTypeId = zyClothsStyleMapper.getTypeNameByTypeId(typeId);
//System.err.println(typeNameByTypeId);
if (typeName != null){
newSeMo.setTypeName(typeName);
} else {
newSeMo.setTypeName("typeName为空");
}
newStyleModuleList.add(newSeMo);
}
return newStyleModuleList;
}
}

Loading…
Cancel
Save