修改编号问题 列表问题及部分问题

zhc4dev
赵玉瑞 2 years ago
parent 06b1f1f262
commit ff8974cadb
  1. 19
      ant-design-vue-jeecg/src/views/process/ZyClothsTypeList.vue
  2. 3
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  3. 2
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java
  4. 2
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/ZyStyleModularMapper.java
  5. 3
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/impl/ZyStyleModularServiceImpl.java
  6. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java
  7. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java
  8. 5
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java
  9. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/controller/ZyStyleAccessoriesController.java
  10. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/service/impl/ZyStyleAccessoriesServiceImpl.java
  11. 17
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
  12. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java
  13. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/service/impl/ZyStyleFabricServiceImpl.java
  14. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/mapper/ZyStyleModelMapper.java
  15. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java
  16. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java
  17. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java
  18. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/service/impl/ZyStyleModuleServiceImpl.java

@ -4,12 +4,12 @@
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="4" :lg="7" :md="8" :sm="24">
<a-form-item label="编号"> <a-form-item label="编号">
<a-input placeholder="请输入编号" v-model="queryParam.nums" ></a-input> <a-input placeholder="请输入编号" v-model="queryParam.nums" ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="5" :lg="7" :md="8" :sm="24">
<a-form-item label="类型名称" > <a-form-item label="类型名称" >
<j-tree-select v-model="queryParam.id" <j-tree-select v-model="queryParam.id"
dict="zy_cloths_type,type_name,id" dict="zy_cloths_type,type_name,id"
@ -22,19 +22,24 @@
<!-- </a-form-item>--> <!-- </a-form-item>-->
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="5" :lg="7" :md="8" :sm="24">
<a-form-item label="上级类型" > <a-form-item label="上级类型" >
<j-dict-select-tag v-model="queryParam.typeId" dictCode="zy_cloths_type, type_name, id" <j-tree-select v-model="queryParam.typeId"
placeholder="上级类型"></j-dict-select-tag> dict="zy_cloths_type,type_name,id"
pidField="type_id"
placeholder="请选择上级类型" >
</j-tree-select>
<!-- <j-dict-select-tag v-model="queryParam.typeId" dictCode="zy_cloths_type, type_name, id"-->
<!-- placeholder="上级类型"></j-dict-select-tag>-->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="5" :lg="7" :md="8" :sm="24">
<a-form-item label="企业名称"> <a-form-item label="企业名称">
<j-select-depart placeholder="请输入企业名称" v-model="queryParam.enterpriseId" /> <j-select-depart placeholder="请输入企业名称" v-model="queryParam.enterpriseId" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="5" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>

@ -7,7 +7,8 @@
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="企业" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="enterpriseId" <a-form-model-item label="企业" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="enterpriseId"
class="label"> class="label">
<j-select-depart v-model="model.enterpriseId" multi @change="bianHao"/> <!-- <j-select-depart v-model="model.enterpriseId" multi @change="bianHao"/>-->
<j-select-depart v-model="model.enterpriseId" @change="bianHao"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>

@ -54,8 +54,6 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZyStyleModularService> { public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZyStyleModularService> {
@Autowired @Autowired
private IZyStyleModularService zyStyleModularService; private IZyStyleModularService zyStyleModularService;
@Resource
private ZyStyleModularMapper zyStyleModularMapper;
/** /**
* 分页列表查询 * 分页列表查询
* *

@ -2,6 +2,7 @@ package org.jeecg.modules.demo.zyStyleModular.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular; import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
@ -13,6 +14,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @Date: 2022-11-14 * @Date: 2022-11-14
* @Version: V1.0 * @Version: V1.0
*/ */
@Mapper
public interface ZyStyleModularMapper extends BaseMapper<ZyStyleModular> { public interface ZyStyleModularMapper extends BaseMapper<ZyStyleModular> {
List<ZyStyleModular> selectListByStyleId(String styleId); List<ZyStyleModular> selectListByStyleId(String styleId);

@ -21,8 +21,7 @@ import java.util.List;
@Service @Service
public class ZyStyleModularServiceImpl extends ServiceImpl<ZyStyleModularMapper, ZyStyleModular> implements IZyStyleModularService { public class ZyStyleModularServiceImpl extends ServiceImpl<ZyStyleModularMapper, ZyStyleModular> implements IZyStyleModularService {
@Autowired
@Resource
private ZyStyleModularMapper zyStyleModularMapper; private ZyStyleModularMapper zyStyleModularMapper;
@Override @Override

@ -38,7 +38,7 @@ import java.util.List;
public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClothsTypeService> { public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClothsTypeService> {
@Autowired @Autowired
private IZyClothsTypeService zyClothsTypeService; private IZyClothsTypeService zyClothsTypeService;
@Resource @Autowired
private ZyClothsTypeMapper zyClothsTypeMapper; private ZyClothsTypeMapper zyClothsTypeMapper;
/** /**

@ -2,6 +2,7 @@ package org.jeecg.modules.demo.base.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.base.entity.ZyClothsType; import org.jeecg.modules.demo.base.entity.ZyClothsType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -12,6 +13,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @Date: 2021-11-10 * @Date: 2021-11-10
* @Version: V1.0 * @Version: V1.0
*/ */
@Mapper
public interface ZyClothsTypeMapper extends BaseMapper<ZyClothsType> { public interface ZyClothsTypeMapper extends BaseMapper<ZyClothsType> {
List<String> selectNumsList(); List<String> selectNumsList();
@ -37,6 +39,6 @@ public interface ZyClothsTypeMapper extends BaseMapper<ZyClothsType> {
String selectNumOne(String id); String selectNumOne(String id);
/**根据type_id拿到类型名称*/ /**根据type_id拿到类型名称*/
@Select("select type_name from zy_cloths_type where type_id = #{id} ") @Select("select type_name from zy_cloths_type where id = #{id} ")
String getNameByTypeId(String id); String getNameByTypeId(String id);
} }

@ -50,6 +50,7 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl<ZyClothsTypeMapper, ZyC
//String sort = zyClothsTypeMapper.sort(); //String sort = zyClothsTypeMapper.sort();
String sort = String.format("%06d", orderNumber()); String sort = String.format("%06d", orderNumber());
String enterpriseName = zyClothsTypeMapper.getEnterprisenameById(enterpriseId); String enterpriseName = zyClothsTypeMapper.getEnterprisenameById(enterpriseId);
//System.out.println("enterpriseName 企业名称: "+enterpriseName);
//根据企业名称拿到企业编号 //根据企业名称拿到企业编号
String enterpriseNums = getEnterpriseNums(enterpriseName); String enterpriseNums = getEnterpriseNums(enterpriseName);
return enterpriseNums+sort; return enterpriseNums+sort;
@ -85,8 +86,10 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl<ZyClothsTypeMapper, ZyC
return "STKD"; return "STKD";
case "黄淮服装定制网": case "黄淮服装定制网":
return "HHDZ"; return "HHDZ";
default:
break;
} }
return enterpriseName; return "NONE";
} }
@Override @Override

@ -56,9 +56,9 @@ public class ZyStyleAccessoriesController extends JeecgController<ZyStyleAccesso
@Autowired @Autowired
private IZyStyleAccessoriesService zyStyleAccessoriesService; private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Resource @Autowired
private ZyStyleAccessoriesMapper zyStyleAccessoriesMapper; private ZyStyleAccessoriesMapper zyStyleAccessoriesMapper;
@Resource @Autowired
private ZyStyleFabricMapper zyStyleFabricMapper; private ZyStyleFabricMapper zyStyleFabricMapper;

@ -28,9 +28,9 @@ public class ZyStyleAccessoriesServiceImpl extends ServiceImpl<ZyStyleAccessorie
@Autowired @Autowired
private IZyClothsStyleService zyClothsStyleService; private IZyClothsStyleService zyClothsStyleService;
@Resource @Autowired
private ZyStyleAccessoriesMapper zyStyleAccessoriesMapper; private ZyStyleAccessoriesMapper zyStyleAccessoriesMapper;
@Resource @Autowired
private ZyStyleFabricMapper zyStyleFabricMapper; private ZyStyleFabricMapper zyStyleFabricMapper;

@ -159,14 +159,19 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
if (StringUtils.isEmpty(zyClothsStyle.getTypeName())) { if (StringUtils.isEmpty(zyClothsStyle.getTypeName())) {
return Result.error("添加失败!服装类型不能为空"); return Result.error("添加失败!服装类型不能为空");
} }
if (StringUtils.isEmpty(zyClothsStyle.getNums())) {
return Result.error("添加失败!编号不能为空");
}
LambdaQueryWrapper<ZyClothsStyle> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ZyClothsStyle> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ZyClothsStyle::getTypeName, zyClothsStyle.getTypeName()); queryWrapper.eq(ZyClothsStyle::getTypeName, zyClothsStyle.getTypeName());
List<ZyClothsStyle> zyClothsStyleList = zyClothsStyleService.list(queryWrapper); int a = zyClothsStyleService.count(queryWrapper);
for (ZyClothsStyle zy : zyClothsStyleList) { if (a >= 1)
if (zyClothsStyle.getStyleNames().equals(zy.getStyleNames())) { return Result.error("存在以添加过的数据!");
return Result.error("添加失败!数据已存在"); // for (ZyClothsStyle zy : zyClothsStyleList) {
} // if (zyClothsStyle.getStyleNames().equals(zy.getStyleNames())) {
} // return Result.error("添加失败!数据已存在");
// }
// }
zyClothsStyleService.save(zyClothsStyle); zyClothsStyleService.save(zyClothsStyle);
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }

@ -50,7 +50,7 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
@Autowired @Autowired
private IZyFabricService zyFabricService; private IZyFabricService zyFabricService;
@Resource @Autowired
private ZyStyleFabricMapper zyStyleFabricMapper; private ZyStyleFabricMapper zyStyleFabricMapper;
/** /**

@ -34,7 +34,7 @@ public class ZyStyleFabricServiceImpl extends ServiceImpl<ZyStyleFabricMapper, Z
@Autowired @Autowired
private IZyFabricService zyFabricService; private IZyFabricService zyFabricService;
@Resource @Autowired
private ZyStyleFabricMapper zyStyleFabricMapper; private ZyStyleFabricMapper zyStyleFabricMapper;
@Override @Override

@ -2,6 +2,7 @@ package org.jeecg.modules.zystylemodel.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
@ -13,6 +14,7 @@ import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
* @Date: 2022-09-17 * @Date: 2022-09-17
* @Version: V1.0 * @Version: V1.0
*/ */
@Mapper
public interface ZyStyleModelMapper extends BaseMapper<ZyStyleModel> { public interface ZyStyleModelMapper extends BaseMapper<ZyStyleModel> {
@Select("SELECT * FROM zy_style_model WHERE style_id = #{id}") @Select("SELECT * FROM zy_style_model WHERE style_id = #{id}")

@ -33,9 +33,9 @@ public class ZyStyleModelServiceImpl extends ServiceImpl<ZyStyleModelMapper, ZyS
@Autowired @Autowired
private IZyClothsStyleService zyClothsStyleService; private IZyClothsStyleService zyClothsStyleService;
@Resource @Autowired
private ZyStyleModelMapper zyStyleModelMapper; private ZyStyleModelMapper zyStyleModelMapper;
@Resource @Autowired
private ZyStyleFabricMapper zyStyleFabricMapper; private ZyStyleFabricMapper zyStyleFabricMapper;
@Override @Override

@ -56,9 +56,9 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@Autowired @Autowired
private IZyClothsStyleService zyClothsStyleService; private IZyClothsStyleService zyClothsStyleService;
@Resource @Autowired
private ZyStyleFabricMapper zyStyleFabricMapper; private ZyStyleFabricMapper zyStyleFabricMapper;
@Resource @Autowired
private ZyStyleModuleMapper zyStyleModuleMapper; private ZyStyleModuleMapper zyStyleModuleMapper;
/** /**
@ -74,7 +74,8 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@ApiOperation(value = "款式模块表-分页列表查询", notes = "款式模块表-分页列表查询") @ApiOperation(value = "款式模块表-分页列表查询", notes = "款式模块表-分页列表查询")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public Result<?> queryPageList(ZyStyleModule zyStyleModule2, public Result<?> queryPageList(ZyStyleModule zyStyleModule2,
@RequestParam(name = "id" )String id,String modularId, @RequestParam(name = "id", required = false) String id,
@RequestParam(name = "modularId", required = false) String modularId,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {

@ -2,6 +2,7 @@ package org.jeecg.modules.zystylemodule.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -14,6 +15,7 @@ import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
* @Date: 2022-09-08 * @Date: 2022-09-08
* @Version: V1.0 * @Version: V1.0
*/ */
@Mapper
public interface ZyStyleModuleMapper extends BaseMapper<ZyStyleModule> { public interface ZyStyleModuleMapper extends BaseMapper<ZyStyleModule> {
/**根据服装款式的id style_id 查询所有*/ /**根据服装款式的id style_id 查询所有*/

@ -38,9 +38,9 @@ public class ZyStyleModuleServiceImpl extends ServiceImpl<ZyStyleModuleMapper, Z
@Autowired @Autowired
private IZyClothsStyleService zyClothsStyleService; private IZyClothsStyleService zyClothsStyleService;
@Resource @Autowired
private ZyStyleFabricMapper zyStyleFabricMapper; private ZyStyleFabricMapper zyStyleFabricMapper;
@Resource @Autowired
private ZyStyleModuleMapper zyStyleModuleMapper; private ZyStyleModuleMapper zyStyleModuleMapper;
@Override @Override

Loading…
Cancel
Save