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

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

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

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

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

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

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

@ -12,4 +12,6 @@ import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
*/ */
public interface IZyClothsStyleService extends IService<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 @Service
public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, ZyClothsStyle> implements IZyClothsStyleService { public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, ZyClothsStyle> implements IZyClothsStyleService {
/**
* 生成编号 类型编号10位+顺序号8位
*
* @param zyClothsStyle
*/
@Override
public String generateNumber(ZyClothsStyle zyClothsStyle) {
//先拿到类型编号
//在来一个顺序号
//生成编码
return null;
}
} }

Loading…
Cancel
Save