2022-12-1 赵玉瑞 修改相关部分问题

zhc4dev
赵玉瑞 2 years ago
parent f65dfbcd4f
commit 150248b6ac
  1. 24
      ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue
  2. 18
      ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue
  3. 28
      ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue
  4. 21
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue
  5. 11
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularCompentForm.vue
  6. 12
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  7. 328
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
  8. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java
  9. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java

@ -17,7 +17,7 @@
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
@ -68,7 +68,7 @@
</template>
<span slot="action2" slot-scope="text, record" >
<a @click="viewVid2(record)" >查看</a>
<a @click="viewVid2(record)" >管理</a>
</span>
<span slot="action" slot-scope="text, record">
@ -151,11 +151,11 @@
dataIndex: 'componentType'
},
{
title:'描述',
align:"center",
dataIndex: 'description'
},
// {
// title:'',
// align:"center",
// dataIndex: 'description'
// },
{
title:'图片',
align:"center",
@ -167,11 +167,11 @@
align:"center",
dataIndex: 'modularId_dictText'
},
{
title:'制衣模块类型',
align:"center",
dataIndex: 'modularType_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'modularType_dictText'
// },
{
title:'企业',
align:"center",

@ -2,7 +2,7 @@
<!-- <a-card :bordered="false">-->
<a-modal
width="70%"
title="评分项管理"
title="模块部件管理"
:visible="visible"
:confirm-loading="confirmLoading"
@ok="handleOk"
@ -20,14 +20,14 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd1(yid)" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('制衣模块部件中间表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
@change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal"
@handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('制衣模块部件中间表')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal"-->
<!-- @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">

@ -12,14 +12,14 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('zy_cloths_modular')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
@change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('zy_cloths_modular')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal"
@handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal"-->
<!-- @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
@ -77,10 +77,10 @@
</template>
<span slot="action2" slot-scope="text, record">
<a @click="viewVid(record)">查看</a>
<a @click="viewVid(record)">管理</a>
</span>
<span slot="action3" slot-scope="text, record">
<a @click="viewVid2(record)">查看</a>
<a @click="viewVid2(record)">管理</a>
</span>
<span slot="action" slot-scope="text, record">
@ -167,11 +167,11 @@ export default {
// align: "center",
// dataIndex: 'modularType_dictText'
// },
{
title: '描述',
align: "center",
dataIndex: 'description'
},
// {
// title: '',
// align: "center",
// dataIndex: 'description'
// },
{
title: '衣服类型',
align: "center",

@ -3,6 +3,11 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" ></a-input>
@ -33,21 +38,17 @@
<j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="制衣模块类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularType">
<j-dict-select-tag type="list" v-model="model.modularType" dictCode="zyModularType" placeholder="请选择制衣模块类型" />
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="制衣模块类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularType">-->
<!-- <j-dict-select-tag type="list" v-model="model.modularType" dictCode="zyModularType" placeholder="请选择制衣模块类型" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <a-input v-model="model.enterpriseId" placeholder="请输入企业" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>

@ -3,11 +3,7 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编码" ></a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="制衣模块类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularType">-->
<!-- <j-dict-select-tag type="list" v-model="model.modularType" dictCode="zyModularType" placeholder="请选择制衣模块类型" />-->
@ -28,6 +24,11 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编码" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>

@ -3,6 +3,12 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" multi />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<j-popup
@ -97,11 +103,7 @@
<j-dict-select-tag v-model="model.sewingForm" placeholder="请选择缝纫形式" dict-code="sewingForm"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" multi />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>

@ -10,6 +10,7 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
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.common.util.oConvertUtils;
@ -47,196 +48,199 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
/**
* @Description: 服装款式表
* @Author: jeecg-boot
* @Date: 2022-09-04
* @Date: 2022-09-04
* @Version: V1.0
*/
@Api(tags="服装款式表")
@Api(tags = "服装款式表")
@RestController
@RequestMapping("/zyclothsstyle/zyClothsStyle")
@Slf4j
public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyClothsStyleService> {
@Autowired
private IZyClothsStyleService zyClothsStyleService;
@Autowired
private IZyClothsComponentService zyClothsComponentService;
@Autowired
private ISysDepartService sysDepartService;
@Autowired
private IZyClothsModularService zyClothsModularService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
/**
* 分页列表查询
*
* @param zyClothsStyle
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "服装款式表-分页列表查询")
@ApiOperation(value="服装款式表-分页列表查询", notes="服装款式表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyClothsStyle zyClothsStyle,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyClothsStyle> queryWrapper = QueryGenerator.initQueryWrapper(zyClothsStyle, req.getParameterMap());
Page<ZyClothsStyle> page = new Page<ZyClothsStyle>(pageNo, pageSize);
IPage<ZyClothsStyle> pageList = zyClothsStyleService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
*
* @return
*/
@AutoLog(value = "服装款式表-查询所有")
@ApiOperation(value="服装款式表-查询所有", notes="服装款式表-查询所有")
@GetMapping(value = "/findAll")
public Result<?> findAll() {
List<ZyClothsStyle> list = zyClothsStyleService.list();
for(ZyClothsStyle zycl : list){
String id = zycl.getEnterpriseId();
if(id != null){
SysDepart byId = sysDepartService.getById(id);
zycl.setEnterpriseId(byId.getDepartName());
}
}
return Result.OK(list);
}
/**
* 制衣部件
* @return
*/
@AutoLog(value = "服装款式表-制衣部件查询所有")
@ApiOperation(value="服装款式表-制衣部件查询所有", notes="服装款式表-制衣部件查询所有")
@GetMapping(value = "/cloCfindAll")
public Result<?> cloCfindAll() {
List<ZyClothsComponent> list = zyClothsComponentService.list();
for(ZyClothsComponent zycl : list){
String id = zycl.getModularId();
String enterpriseId = zycl.getEnterpriseId();
@Autowired
private IZyClothsStyleService zyClothsStyleService;
@Autowired
private IZyClothsComponentService zyClothsComponentService;
@Autowired
private ISysDepartService sysDepartService;
@Autowired
private IZyClothsModularService zyClothsModularService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
/**
* 分页列表查询
*
* @param zyClothsStyle
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "服装款式表-分页列表查询")
@ApiOperation(value = "服装款式表-分页列表查询", notes = "服装款式表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyClothsStyle zyClothsStyle,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyClothsStyle> queryWrapper = QueryGenerator.initQueryWrapper(zyClothsStyle, req.getParameterMap());
Page<ZyClothsStyle> page = new Page<ZyClothsStyle>(pageNo, pageSize);
IPage<ZyClothsStyle> pageList = zyClothsStyleService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* @return
*/
@AutoLog(value = "服装款式表-查询所有")
@ApiOperation(value = "服装款式表-查询所有", notes = "服装款式表-查询所有")
@GetMapping(value = "/findAll")
public Result<?> findAll() {
List<ZyClothsStyle> list = zyClothsStyleService.list();
for (ZyClothsStyle zycl : list) {
String id = zycl.getEnterpriseId();
if (id != null) {
SysDepart byId = sysDepartService.getById(id);
zycl.setEnterpriseId(byId.getDepartName());
}
}
return Result.OK(list);
}
/**
* 制衣部件
*
* @return
*/
@AutoLog(value = "服装款式表-制衣部件查询所有")
@ApiOperation(value = "服装款式表-制衣部件查询所有", notes = "服装款式表-制衣部件查询所有")
@GetMapping(value = "/cloCfindAll")
public Result<?> cloCfindAll() {
List<ZyClothsComponent> list = zyClothsComponentService.list();
for (ZyClothsComponent zycl : list) {
String id = zycl.getModularId();
String enterpriseId = zycl.getEnterpriseId();
/*if(id!=null || (enterpriseId !=null&&enterpriseId.isEmpty())){
ZyClothsType byId = zyClothsTypeService.getById(id);
SysDepart byId1 = sysDepartService.getById(enterpriseId);
zycl.setClothsTypeId(byId.getTypeName());
zycl.setEnterpriseId(byId1.getDepartName());
}*/
if(id!=null){
ZyClothsModular byId = zyClothsModularService.getById(id);
zycl.setModularId(byId.getModularName());
}
}
if (id != null) {
ZyClothsModular byId = zyClothsModularService.getById(id);
zycl.setModularId(byId.getModularName());
}
}
/*if(id!=null || (enterpriseId !=null&&enterpriseId.isEmpty())){
ZyClothsType byId = zyClothsTypeService.getById(id);
SysDepart byId1 = sysDepartService.getById(enterpriseId);
zycl.setClothsTypeId(byId.getTypeName());
zycl.setEnterpriseId(byId1.getDepartName());
}*/
return Result.OK(list);
}
/**
* 添加
*
* @param zyClothsStyle
* @return
*/
@AutoLog(value = "服装款式表-添加")
@ApiOperation(value="服装款式表-添加", notes="服装款式表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyClothsStyle zyClothsStyle) {
zyClothsStyleService.save(zyClothsStyle);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyClothsStyle
* @return
*/
@AutoLog(value = "服装款式表-编辑")
@ApiOperation(value="服装款式表-编辑", notes="服装款式表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyClothsStyle zyClothsStyle) {
zyClothsStyleService.updateById(zyClothsStyle);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "服装款式表-通过id删除")
@ApiOperation(value="服装款式表-通过id删除", notes="服装款式表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
zyClothsStyleService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "服装款式表-批量删除")
@ApiOperation(value="服装款式表-批量删除", notes="服装款式表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.zyClothsStyleService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "服装款式表-通过id查询")
@ApiOperation(value="服装款式表-通过id查询", notes="服装款式表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(id);
if(zyClothsStyle==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyClothsStyle);
}
return Result.OK(list);
}
/**
* 添加
*
* @param zyClothsStyle
* @return
*/
@AutoLog(value = "服装款式表-添加")
@ApiOperation(value = "服装款式表-添加", notes = "服装款式表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyClothsStyle zyClothsStyle) {
//生成编号 类型编号(10位)+顺序号(8位)在service层处理
zyClothsStyle.setNums(zyClothsStyleService.generateNumber(zyClothsStyle));
zyClothsStyleService.save(zyClothsStyle);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyClothsStyle
* @return
*/
@AutoLog(value = "服装款式表-编辑")
@ApiOperation(value = "服装款式表-编辑", notes = "服装款式表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyClothsStyle zyClothsStyle) {
zyClothsStyleService.updateById(zyClothsStyle);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "服装款式表-通过id删除")
@ApiOperation(value = "服装款式表-通过id删除", notes = "服装款式表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
zyClothsStyleService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "服装款式表-批量删除")
@ApiOperation(value = "服装款式表-批量删除", notes = "服装款式表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.zyClothsStyleService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "服装款式表-通过id查询")
@ApiOperation(value = "服装款式表-通过id查询", notes = "服装款式表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(id);
if (zyClothsStyle == null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyClothsStyle);
}
/**
* 导出excel
*
* @param request
* @param zyClothsStyle
*/
* 导出excel
*
* @param request
* @param zyClothsStyle
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyClothsStyle zyClothsStyle) {
return super.exportXls(request, zyClothsStyle, ZyClothsStyle.class, "服装款式表");
}
/**
* 通过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, ZyClothsStyle.class);

@ -12,4 +12,6 @@ import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
*/
public interface IZyClothsStyleService extends IService<ZyClothsStyle> {
/**生成编号 类型编号(10位)+顺序号(8位)*/
String generateNumber(ZyClothsStyle zyClothsStyle);
}

@ -17,4 +17,17 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, ZyClothsStyle> implements IZyClothsStyleService {
/**
* 生成编号 类型编号10位+顺序号8位
*
* @param zyClothsStyle
*/
@Override
public String generateNumber(ZyClothsStyle zyClothsStyle) {
//先拿到类型编号
//在来一个顺序号
//生成编码
return null;
}
}

Loading…
Cancel
Save