已重命名4个文件
已添加32个文件
已修改25个文件
已复制3个文件
已删除192个文件
| | |
| | | "avatar": "", |
| | | "version": "4.9.2", |
| | | "createdTime": "2025-3-10 16:38:19", |
| | | "updatedTime": "2025-6-24 16:55:39", |
| | | "updatedTime": "2025-6-25 17:44:46", |
| | | "dbConns": [], |
| | | "profile": { |
| | | "default": { |
| | |
| | | } |
| | | }, |
| | | "defKey": "pms_process_bill_materials", |
| | | "defName": "å·¥èºBOM", |
| | | "defName": "订åBOM", |
| | | "comment": "", |
| | | "properties": { |
| | | "partitioned by": "(date string)", |
| | |
| | | } |
| | | }, |
| | | "defKey": "cms_edge_grinding", |
| | | "defName": "åå
·ä¿®ç£¨/å磨", |
| | | "defName": "åå
·ä¿®ç£¨", |
| | | "comment": "", |
| | | "properties": { |
| | | "partitioned by": "(date string)", |
| | |
| | | <spring-cloud-alibaba.version>2021.0.1.0</spring-cloud-alibaba.version> |
| | | <alibaba.nacos.version>2.0.4</alibaba.nacos.version> |
| | | |
| | | <xxl-job-core.version>2.2.0</xxl-job-core.version> |
| | | <fastjson.version>1.2.83</fastjson.version> |
| | | <pegdown.version>1.6.0</pegdown.version> |
| | | <knife4j-spring-boot-starter.version>3.0.3</knife4j-spring-boot-starter.version> |
| | |
| | | |
| | | void delSysUploadRelaByBusIdAndBusType(String busId, String busType); |
| | | |
| | | String getUnitNameById(String unitId); |
| | | |
| | | String queryDictTextByKey(String dictCode, String key); |
| | | |
| | |
| | | |
| | | void removeDataVersionById(String id); |
| | | |
| | | String getEnterpriseNameById(String enterpriseId); |
| | | |
| | | List<DataVersion> getLastDataVersion(String businessType, String enterpriseId, String isLastusable); |
| | | |
| | |
| | | package org.jeecg.common.system.query; |
| | | |
| | | import lombok.Getter; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | |
| | | /** |
| | |
| | | * |
| | | * @Author Sunjianlei |
| | | */ |
| | | @Getter |
| | | public enum MatchTypeEnum { |
| | | |
| | | /**æ¥è¯¢é¾æ¥è§å AND*/ |
| | |
| | | this.value = value; |
| | | } |
| | | |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | |
| | | public static MatchTypeEnum getByValue(Object value) { |
| | | if (oConvertUtils.isEmpty(value)) { |
| | | return null; |
| | | } |
| | | return getByValue(value.toString()); |
| | | } |
| | | |
| | | public static MatchTypeEnum getByValue(String value) { |
| | | if (oConvertUtils.isEmpty(value)) { |
| | | return null; |
| | | } |
| | | for (MatchTypeEnum val : values()) { |
| | | if (val.getValue().toLowerCase().equals(value.toLowerCase())) { |
| | | if (val.getValue().equalsIgnoreCase(value)) { |
| | | return val; |
| | | } |
| | | } |
| | |
| | | package org.jeecg.common.system.query; |
| | | |
| | | import lombok.Getter; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | |
| | | /** |
| | |
| | | * @Author Scott |
| | | * @Date 2019å¹´02æ14æ¥ |
| | | */ |
| | | @Getter |
| | | public enum QueryRuleEnum { |
| | | |
| | | /**æ¥è¯¢è§å 大äº*/ |
| | |
| | | this.condition = condition; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public void setMsg(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public String getCondition() { |
| | | return condition; |
| | | } |
| | | |
| | | public void setCondition(String condition) { |
| | | this.condition = condition; |
| | | } |
| | | |
| | | public static QueryRuleEnum getByValue(String value){ |
| | | if(oConvertUtils.isEmpty(value)) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.base.entity.Factory; |
| | | import org.jeecg.modules.base.model.FactoryIdModel; |
| | | import org.jeecg.modules.base.service.IFactoryService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.jeecg.modules.base.model.FactoryTreeModel; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | |
| | | /** |
| | | * @Description: å·¥å/车é´/产线 |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="å·¥å/车é´/产线") |
| | | @RestController |
| | | @RequestMapping("/base/factory") |
| | | @Slf4j |
| | | public class FactoryController extends JeecgController<Factory, IFactoryService> { |
| | | @Autowired |
| | | private IFactoryService factoryService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param factory |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "å·¥å/车é´/产线-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="å·¥å/车é´/产线-å页å表æ¥è¯¢", notes="å·¥å/车é´/产线-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<Factory>> queryPageList(Factory factory, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<Factory> queryWrapper = QueryGenerator.initQueryWrapper(factory, req.getParameterMap()); |
| | | Page<Factory> page = new Page<Factory>(pageNo, pageSize); |
| | | IPage<Factory> pageList = factoryService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param factory |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å·¥å/车é´/产线-æ·»å ") |
| | | @ApiOperation(value="å·¥å/车é´/产线-æ·»å ", notes="å·¥å/车é´/产线-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:base_factory:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<Factory> add(@RequestBody Factory factory) { |
| | | Result<Factory> result = new Result<>(); |
| | | try { |
| | | factoryService.saveFactoryData(factory); |
| | | result.success("æ·»å æåï¼"); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | | result.error500("æä½å¤±è´¥"); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param factory |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å·¥å/车é´/产线-ç¼è¾") |
| | | @ApiOperation(value="å·¥å/车é´/产线-ç¼è¾", notes="å·¥å/车é´/产线-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:base_factory:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody Factory factory) { |
| | | factoryService.updateById(factory); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å·¥å/车é´/产线-éè¿idå é¤") |
| | | @ApiOperation(value="å·¥å/车é´/产线-éè¿idå é¤", notes="å·¥å/车é´/产线-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:base_factory:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<Factory> delete(@RequestParam(name="id",required=true) String id) { |
| | | Result<Factory> result = new Result<>(); |
| | | Factory factory = factoryService.getById(id); |
| | | if (factory == null) { |
| | | result.error500("æªæ¾å°å¯¹åºå®ä½"); |
| | | } else { |
| | | boolean ok = factoryService.delete(id); |
| | | if (ok) { |
| | | result.success("å 餿å!"); |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å·¥å/车é´/产线-æ¹éå é¤") |
| | | @ApiOperation(value="å·¥å/车é´/产线-æ¹éå é¤", notes="å·¥å/车é´/产线-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:base_factory:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.factoryService.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<Factory> queryById(@RequestParam(name="id",required=true) String id) { |
| | | Factory factory = factoryService.getById(id); |
| | | if(factory==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(factory); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param factory |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:base_factory:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, Factory factory) { |
| | | return super.exportXls(request, factory, Factory.class, "å·¥å/车é´/产线"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("base_factory:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, Factory.class); |
| | | } |
| | | |
| | | |
| | | //@AutoLog(value = "产线表-æ å½¢å表") |
| | | @ApiOperation(value = "产线表-æ å½¢å表", notes = "产线表-æ å½¢å表") |
| | | @GetMapping(value = "/queryTreeList") |
| | | public Result<List<FactoryTreeModel>> queryTreeList(@RequestParam(name = "ids", required = false) String ids) { |
| | | Result<List<FactoryTreeModel>> result = new Result<>(); |
| | | try { |
| | | if (oConvertUtils.isNotEmpty(ids)) { |
| | | List<FactoryTreeModel> factoryList = factoryService.queryTreeList(ids); |
| | | result.setResult(factoryList); |
| | | } else { |
| | | List<FactoryTreeModel> list = factoryService.queryTreeList(); |
| | | result.setResult(list); |
| | | } |
| | | result.setSuccess(true); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | //@AutoLog(value = "产线表-idéå") |
| | | @ApiOperation(value = "产线表-idéå", notes = "产线表-idéå") |
| | | @GetMapping(value = "/queryTreeIdList") |
| | | public Result<List<String>> queryTreeIdList() { |
| | | Result<List<String>> result = new Result<>(); |
| | | try { |
| | | List<Factory> factoryList = factoryService.list(new LambdaQueryWrapper<Factory>().eq(Factory::getDelFlag, CommonConstant.DEL_FLAG_0).orderByAsc(Factory::getSorter)); |
| | | List<String> ids = factoryList.stream().map(Factory::getId).collect(Collectors.toList()); |
| | | result.setSuccess(true); |
| | | result.setResult(ids); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | //@AutoLog(value = "产线表-æ¥è¯¢æ å½¢ç»æææäº§çº¿åç§°") |
| | | @ApiOperation(value = "产线表-æ¥è¯¢æ å½¢ç»æææäº§çº¿åç§°", notes = "产线表-æ¥è¯¢æ å½¢ç»æææäº§çº¿åç§°") |
| | | @GetMapping(value = "/queryIdTree") |
| | | public Result<List<FactoryIdModel>> queryIdTree() { |
| | | Result<List<FactoryIdModel>> result = new Result<>(); |
| | | try { |
| | | List<FactoryIdModel> list = factoryService.queryFactoryIdTreeList(); |
| | | result.setResult(list); |
| | | result.setSuccess(true); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.io.IOException; |
| | | 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; |
| | | import org.jeecg.modules.base.entity.LineSideWarehouse; |
| | | import org.jeecg.modules.base.service.ILineSideWarehouseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | | import org.jeecgframework.poi.excel.entity.ImportParams; |
| | | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import com.alibaba.fastjson.JSON; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | |
| | | /** |
| | | * @Description: 线边ä»åºä¿¡æ¯ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="线边ä»åºä¿¡æ¯") |
| | | @RestController |
| | | @RequestMapping("/base/lineSideWarehouse") |
| | | @Slf4j |
| | | public class LineSideWarehouseController extends JeecgController<LineSideWarehouse, ILineSideWarehouseService> { |
| | | @Autowired |
| | | private ILineSideWarehouseService lineSideWarehouseService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param lineSideWarehouse |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "线边ä»åºä¿¡æ¯-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="线边ä»åºä¿¡æ¯-å页å表æ¥è¯¢", notes="线边ä»åºä¿¡æ¯-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<LineSideWarehouse>> queryPageList(LineSideWarehouse lineSideWarehouse, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<LineSideWarehouse> queryWrapper = QueryGenerator.initQueryWrapper(lineSideWarehouse, req.getParameterMap()); |
| | | Page<LineSideWarehouse> page = new Page<LineSideWarehouse>(pageNo, pageSize); |
| | | IPage<LineSideWarehouse> pageList = lineSideWarehouseService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param lineSideWarehouse |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "线边ä»åºä¿¡æ¯-æ·»å ") |
| | | @ApiOperation(value="线边ä»åºä¿¡æ¯-æ·»å ", notes="线边ä»åºä¿¡æ¯-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:base_line_side_warehouse:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody LineSideWarehouse lineSideWarehouse) { |
| | | lineSideWarehouseService.save(lineSideWarehouse); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param lineSideWarehouse |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "线边ä»åºä¿¡æ¯-ç¼è¾") |
| | | @ApiOperation(value="线边ä»åºä¿¡æ¯-ç¼è¾", notes="线边ä»åºä¿¡æ¯-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:base_line_side_warehouse:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody LineSideWarehouse lineSideWarehouse) { |
| | | lineSideWarehouseService.updateById(lineSideWarehouse); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "线边ä»åºä¿¡æ¯-éè¿idå é¤") |
| | | @ApiOperation(value="线边ä»åºä¿¡æ¯-éè¿idå é¤", notes="线边ä»åºä¿¡æ¯-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:base_line_side_warehouse:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | lineSideWarehouseService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "线边ä»åºä¿¡æ¯-æ¹éå é¤") |
| | | @ApiOperation(value="线边ä»åºä¿¡æ¯-æ¹éå é¤", notes="线边ä»åºä¿¡æ¯-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:base_line_side_warehouse:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.lineSideWarehouseService.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<LineSideWarehouse> queryById(@RequestParam(name="id",required=true) String id) { |
| | | LineSideWarehouse lineSideWarehouse = lineSideWarehouseService.getById(id); |
| | | if(lineSideWarehouse==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(lineSideWarehouse); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param lineSideWarehouse |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:base_line_side_warehouse:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, LineSideWarehouse lineSideWarehouse) { |
| | | return super.exportXls(request, lineSideWarehouse, LineSideWarehouse.class, "线边ä»åºä¿¡æ¯"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("base_line_side_warehouse:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, LineSideWarehouse.class); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.base.entity.Shift; |
| | | import org.jeecg.modules.base.service.IShiftService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | | import org.jeecgframework.poi.excel.entity.ImportParams; |
| | | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import com.alibaba.fastjson.JSON; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | |
| | | /** |
| | | * @Description: çæ¬¡ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="çæ¬¡") |
| | | @RestController |
| | | @RequestMapping("/base/shift") |
| | | @Slf4j |
| | | public class ShiftController extends JeecgController<Shift, IShiftService> { |
| | | @Autowired |
| | | private IShiftService shiftService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param shift |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "çæ¬¡-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="çæ¬¡-å页å表æ¥è¯¢", notes="çæ¬¡-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<Shift>> queryPageList(Shift shift, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<Shift> queryWrapper = QueryGenerator.initQueryWrapper(shift, req.getParameterMap()); |
| | | Page<Shift> page = new Page<Shift>(pageNo, pageSize); |
| | | IPage<Shift> pageList = shiftService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param shift |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çæ¬¡-æ·»å ") |
| | | @ApiOperation(value="çæ¬¡-æ·»å ", notes="çæ¬¡-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:base_shift:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody Shift shift) { |
| | | shiftService.save(shift); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param shift |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çæ¬¡-ç¼è¾") |
| | | @ApiOperation(value="çæ¬¡-ç¼è¾", notes="çæ¬¡-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:base_shift:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody Shift shift) { |
| | | shiftService.updateById(shift); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çæ¬¡-éè¿idå é¤") |
| | | @ApiOperation(value="çæ¬¡-éè¿idå é¤", notes="çæ¬¡-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:base_shift:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | shiftService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çæ¬¡-æ¹éå é¤") |
| | | @ApiOperation(value="çæ¬¡-æ¹éå é¤", notes="çæ¬¡-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:base_shift:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.shiftService.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<Shift> queryById(@RequestParam(name="id",required=true) String id) { |
| | | Shift shift = shiftService.getById(id); |
| | | if(shift==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(shift); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param shift |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:base_shift:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, Shift shift) { |
| | | return super.exportXls(request, shift, Shift.class, "çæ¬¡"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("base_shift:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, Shift.class); |
| | | } |
| | | |
| | | /** |
| | | * çæ¬¡è¡¨-æ ¹æ®idä¿®æ¹ç¶æ |
| | | * |
| | | * @param jsonObject |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æ ¹æ®idä¿®æ¹ç¶æ") |
| | | @ApiOperation(value = "æ ¹æ®idä¿®æ¹ç¶æ", notes = "æ ¹æ®idä¿®æ¹ç¶æ") |
| | | @PutMapping("/updateStatusById") |
| | | public Result<?> updateSubStatusById(@RequestBody JSONObject jsonObject) { |
| | | String id = jsonObject.getString("id"); |
| | | String status = jsonObject.getString("status"); |
| | | Shift shift = shiftService.getById(id); |
| | | shift.setShiftStatus(status); |
| | | Boolean flag = shiftService.updateById(shift); |
| | | return flag ? Result.OK("ä¿®æ¹æå") : Result.error("ä¿®æ¹å¤±è´¥"); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.io.IOException; |
| | | 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; |
| | | import org.jeecg.modules.base.entity.ShiftGroup; |
| | | import org.jeecg.modules.base.entity.UserGroup; |
| | | import org.jeecg.modules.base.service.IShiftGroupService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.jeecg.modules.base.service.IUserGroupService; |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | | import org.jeecgframework.poi.excel.entity.ImportParams; |
| | | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import com.alibaba.fastjson.JSON; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | |
| | | /** |
| | | * @Description: çç»äººåä¿¡æ¯ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="çç»äººåä¿¡æ¯") |
| | | @RestController |
| | | @RequestMapping("/base/shiftGroup") |
| | | @Slf4j |
| | | public class ShiftGroupController extends JeecgController<ShiftGroup, IShiftGroupService> { |
| | | @Autowired |
| | | private IShiftGroupService shiftGroupService; |
| | | |
| | | @Autowired |
| | | private IUserGroupService userGroupService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param shiftGroup |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "çç»äººåä¿¡æ¯-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="çç»äººåä¿¡æ¯-å页å表æ¥è¯¢", notes="çç»äººåä¿¡æ¯-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<ShiftGroup>> queryPageList(ShiftGroup shiftGroup, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<ShiftGroup> queryWrapper = QueryGenerator.initQueryWrapper(shiftGroup, req.getParameterMap()); |
| | | Page<ShiftGroup> page = new Page<ShiftGroup>(pageNo, pageSize); |
| | | IPage<ShiftGroup> pageList = shiftGroupService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param shiftGroup |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çç»äººåä¿¡æ¯-æ·»å ") |
| | | @ApiOperation(value="çç»äººåä¿¡æ¯-æ·»å ", notes="çç»äººåä¿¡æ¯-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:base_shift_group:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody ShiftGroup shiftGroup) { |
| | | shiftGroupService.save(shiftGroup); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param shiftGroup |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çç»äººåä¿¡æ¯-ç¼è¾") |
| | | @ApiOperation(value="çç»äººåä¿¡æ¯-ç¼è¾", notes="çç»äººåä¿¡æ¯-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:base_shift_group:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody ShiftGroup shiftGroup) { |
| | | shiftGroupService.updateById(shiftGroup); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çç»äººåä¿¡æ¯-éè¿idå é¤") |
| | | @ApiOperation(value="çç»äººåä¿¡æ¯-éè¿idå é¤", notes="çç»äººåä¿¡æ¯-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:base_shift_group:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | //æ¥è¯¢å
³èå
³ç³»ï¼å¹¶å é¤ |
| | | List<UserGroup> userGroupList = userGroupService.lambdaQuery().eq(UserGroup::getGroupId,id).list(); |
| | | userGroupService.removeBatchByIds(userGroupList); |
| | | shiftGroupService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çç»äººåä¿¡æ¯-æ¹éå é¤") |
| | | @ApiOperation(value="çç»äººåä¿¡æ¯-æ¹éå é¤", notes="çç»äººåä¿¡æ¯-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:base_shift_group:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.shiftGroupService.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<ShiftGroup> queryById(@RequestParam(name="id",required=true) String id) { |
| | | ShiftGroup shiftGroup = shiftGroupService.getById(id); |
| | | if(shiftGroup==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(shiftGroup); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param shiftGroup |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:base_shift_group:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, ShiftGroup shiftGroup) { |
| | | return super.exportXls(request, shiftGroup, ShiftGroup.class, "çç»äººåä¿¡æ¯"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("base_shift_group:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, ShiftGroup.class); |
| | | } |
| | | |
| | | } |
| | |
| | | package org.jeecg.modules.base.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.io.IOException; |
| | | 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; |
| | | import org.jeecg.modules.base.entity.Supplier; |
| | | import org.jeecg.modules.base.service.ISupplierService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | | import org.jeecgframework.poi.excel.entity.ImportParams; |
| | | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.modules.base.entity.Supplier; |
| | | import org.jeecg.modules.base.entity.SupplierCategory; |
| | | import org.jeecg.modules.base.service.ISupplierCategoryService; |
| | | import org.jeecg.modules.base.service.ISupplierService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import com.alibaba.fastjson.JSON; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: ä¾åºå |
| | | * @Author: jeecg-boot |
| | | * @Date: 2023-03-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="ä¾åºå") |
| | | /** |
| | | * @Description: ä¾åºå管ç |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="ä¾åºå管ç") |
| | | @RestController |
| | | @RequestMapping("/eam/supplier") |
| | | @RequestMapping("/base/supplier") |
| | | @Slf4j |
| | | public class SupplierController extends JeecgController<Supplier, ISupplierService> { |
| | | @Autowired |
| | | private ISupplierService inspectionProjectService; |
| | | @Autowired |
| | | private ISupplierCategoryService inspectionProjectCategoryService; |
| | | |
| | | @Autowired |
| | | private ISupplierService supplierService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param supplier |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "ä¾åºå管ç-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="ä¾åºå管ç-å页å表æ¥è¯¢", notes="ä¾åºå管ç-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<Supplier>> queryPageList(Supplier supplier, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<Supplier> queryWrapper = QueryGenerator.initQueryWrapper(supplier, req.getParameterMap()); |
| | | Page<Supplier> page = new Page<Supplier>(pageNo, pageSize); |
| | | IPage<Supplier> pageList = supplierService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param supplier |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¾åºå管ç-æ·»å ") |
| | | @ApiOperation(value="ä¾åºå管ç-æ·»å ", notes="ä¾åºå管ç-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:base_supplier:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody Supplier supplier) { |
| | | supplierService.save(supplier); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param supplier |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¾åºå管ç-ç¼è¾") |
| | | @ApiOperation(value="ä¾åºå管ç-ç¼è¾", notes="ä¾åºå管ç-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:base_supplier:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody Supplier supplier) { |
| | | supplierService.updateById(supplier); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¾åºå管ç-éè¿idå é¤") |
| | | @ApiOperation(value="ä¾åºå管ç-éè¿idå é¤", notes="ä¾åºå管ç-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:base_supplier:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | supplierService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¾åºå管ç-æ¹éå é¤") |
| | | @ApiOperation(value="ä¾åºå管ç-æ¹éå é¤", notes="ä¾åºå管ç-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:base_supplier:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.supplierService.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<Supplier> queryById(@RequestParam(name="id",required=true) String id) { |
| | | Supplier supplier = supplierService.getById(id); |
| | | if(supplier==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(supplier); |
| | | } |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param inspectionProject |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="ä¾åºå-å页å表æ¥è¯¢", notes="ä¾åºå-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<Supplier>> queryPageList(Supplier inspectionProject, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<Supplier> queryWrapper = QueryGenerator.initQueryWrapper(inspectionProject, req.getParameterMap()); |
| | | Page<Supplier> page = new Page<Supplier>(pageNo, pageSize); |
| | | IPage<Supplier> pageList = inspectionProjectService.page(page, queryWrapper); |
| | | List<Supplier> records = pageList.getRecords(); |
| | | for (Supplier record : records) { |
| | | String inspectionProjectTypeId = record.getSupplierCategoryId(); |
| | | SupplierCategory inspectionProjectCategory = inspectionProjectCategoryService.getById(inspectionProjectTypeId); |
| | | if(inspectionProjectCategory != null ){ |
| | | record.setSupplierCategoryNumName(inspectionProjectCategory.getNum()+"/"+ inspectionProjectCategory.getName()); |
| | | }else{ |
| | | record.setSupplierCategoryNumName("/"); |
| | | } |
| | | |
| | | } |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param inspectionProject |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¾åºå-æ·»å ") |
| | | @ApiOperation(value="ä¾åºå-æ·»å ", notes="ä¾åºå-æ·»å ") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody Supplier inspectionProject) { |
| | | inspectionProjectService.save(inspectionProject); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param inspectionProject |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¾åºå-ç¼è¾") |
| | | @ApiOperation(value="ä¾åºå-ç¼è¾", notes="ä¾åºå-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody Supplier inspectionProject) { |
| | | inspectionProjectService.updateById(inspectionProject); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¾åºå-éè¿idå é¤") |
| | | @ApiOperation(value="ä¾åºå-éè¿idå é¤", notes="ä¾åºå-éè¿idå é¤") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | Supplier inspectionProject = inspectionProjectService.getById(id); |
| | | inspectionProject.setDelFlag(1); |
| | | inspectionProjectService.updateById(inspectionProject); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¾åºå-æ¹éå é¤") |
| | | @ApiOperation(value="ä¾åºå-æ¹éå é¤", notes="ä¾åºå-æ¹éå é¤") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | List<String> idList = Arrays.asList(ids.split(",")); |
| | | for (String id : idList) { |
| | | Supplier inspectionProject = inspectionProjectService.getById(id); |
| | | inspectionProject.setDelFlag(1); |
| | | inspectionProjectService.updateById(inspectionProject); |
| | | } |
| | | return Result.OK("æ¹éå 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="ä¾åºå-éè¿idæ¥è¯¢", notes="ä¾åºå-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<Supplier> queryById(@RequestParam(name="id",required=true) String id) { |
| | | Supplier inspectionProject = inspectionProjectService.getById(id); |
| | | if(inspectionProject==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(inspectionProject); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param inspectionProject |
| | | */ |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param supplier |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:base_supplier:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, Supplier inspectionProject) { |
| | | return super.exportXls(request, inspectionProject, Supplier.class, "mom_base_supplier"); |
| | | public ModelAndView exportXls(HttpServletRequest request, Supplier supplier) { |
| | | return super.exportXls(request, supplier, Supplier.class, "ä¾åºå管ç"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("base_supplier:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, Supplier.class); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.io.IOException; |
| | | 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; |
| | | import org.jeecg.modules.base.entity.UserFactory; |
| | | import org.jeecg.modules.base.service.IUserFactoryService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | | import org.jeecgframework.poi.excel.entity.ImportParams; |
| | | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import com.alibaba.fastjson.JSON; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | |
| | | /** |
| | | * @Description: ç¨æ·å·¥å/车é´/产线å
³ç³» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="ç¨æ·å·¥å/车é´/产线å
³ç³»") |
| | | @RestController |
| | | @RequestMapping("/base/userFactory") |
| | | @Slf4j |
| | | public class UserFactoryController extends JeecgController<UserFactory, IUserFactoryService> { |
| | | @Autowired |
| | | private IUserFactoryService userFactoryService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param userFactory |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "ç¨æ·å·¥å/车é´/产线å
³ç³»-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="ç¨æ·å·¥å/车é´/产线å
³ç³»-å页å表æ¥è¯¢", notes="ç¨æ·å·¥å/车é´/产线å
³ç³»-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<UserFactory>> queryPageList(UserFactory userFactory, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<UserFactory> queryWrapper = QueryGenerator.initQueryWrapper(userFactory, req.getParameterMap()); |
| | | Page<UserFactory> page = new Page<UserFactory>(pageNo, pageSize); |
| | | IPage<UserFactory> pageList = userFactoryService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param userFactory |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç¨æ·å·¥å/车é´/产线å
³ç³»-æ·»å ") |
| | | @ApiOperation(value="ç¨æ·å·¥å/车é´/产线å
³ç³»-æ·»å ", notes="ç¨æ·å·¥å/车é´/产线å
³ç³»-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:base_user_factory:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody UserFactory userFactory) { |
| | | userFactoryService.save(userFactory); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param userFactory |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç¨æ·å·¥å/车é´/产线å
³ç³»-ç¼è¾") |
| | | @ApiOperation(value="ç¨æ·å·¥å/车é´/产线å
³ç³»-ç¼è¾", notes="ç¨æ·å·¥å/车é´/产线å
³ç³»-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:base_user_factory:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody UserFactory userFactory) { |
| | | userFactoryService.updateById(userFactory); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç¨æ·å·¥å/车é´/产线å
³ç³»-éè¿idå é¤") |
| | | @ApiOperation(value="ç¨æ·å·¥å/车é´/产线å
³ç³»-éè¿idå é¤", notes="ç¨æ·å·¥å/车é´/产线å
³ç³»-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:base_user_factory:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | userFactoryService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç¨æ·å·¥å/车é´/产线å
³ç³»-æ¹éå é¤") |
| | | @ApiOperation(value="ç¨æ·å·¥å/车é´/产线å
³ç³»-æ¹éå é¤", notes="ç¨æ·å·¥å/车é´/产线å
³ç³»-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:base_user_factory:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.userFactoryService.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<UserFactory> queryById(@RequestParam(name="id",required=true) String id) { |
| | | UserFactory userFactory = userFactoryService.getById(id); |
| | | if(userFactory==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(userFactory); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param userFactory |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:base_user_factory:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, UserFactory userFactory) { |
| | | return super.exportXls(request, userFactory, UserFactory.class, "ç¨æ·å·¥å/车é´/产线å
³ç³»"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("base_user_factory:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, UserFactory.class); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.io.IOException; |
| | | 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; |
| | | import org.jeecg.modules.base.entity.UserGroup; |
| | | import org.jeecg.modules.base.service.IUserGroupService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | | import org.jeecgframework.poi.excel.entity.ImportParams; |
| | | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import com.alibaba.fastjson.JSON; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | |
| | | /** |
| | | * @Description: çç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="çç»") |
| | | @RestController |
| | | @RequestMapping("/base/userGroup") |
| | | @Slf4j |
| | | public class UserGroupController extends JeecgController<UserGroup, IUserGroupService> { |
| | | @Autowired |
| | | private IUserGroupService userGroupService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param userGroup |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "çç»-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="çç»-å页å表æ¥è¯¢", notes="çç»-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<UserGroup>> queryPageList(UserGroup userGroup, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<UserGroup> queryWrapper = QueryGenerator.initQueryWrapper(userGroup, req.getParameterMap()); |
| | | Page<UserGroup> page = new Page<UserGroup>(pageNo, pageSize); |
| | | IPage<UserGroup> pageList = userGroupService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param userGroup |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çç»-æ·»å ") |
| | | @ApiOperation(value="çç»-æ·»å ", notes="çç»-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:base_user_group:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody UserGroup userGroup) { |
| | | userGroupService.save(userGroup); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param userGroup |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çç»-ç¼è¾") |
| | | @ApiOperation(value="çç»-ç¼è¾", notes="çç»-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:base_user_group:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody UserGroup userGroup) { |
| | | userGroupService.updateById(userGroup); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çç»-éè¿idå é¤") |
| | | @ApiOperation(value="çç»-éè¿idå é¤", notes="çç»-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:base_user_group:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | userGroupService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çç»-æ¹éå é¤") |
| | | @ApiOperation(value="çç»-æ¹éå é¤", notes="çç»-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:base_user_group:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.userGroupService.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<UserGroup> queryById(@RequestParam(name="id",required=true) String id) { |
| | | UserGroup userGroup = userGroupService.getById(id); |
| | | if(userGroup==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(userGroup); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param userGroup |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:base_user_group:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, UserGroup userGroup) { |
| | | return super.exportXls(request, userGroup, UserGroup.class, "çç»"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("base_user_group:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, UserGroup.class); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @Description: å·¥å/车é´/产线 |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("base_factory") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="base_factory对象", description="å·¥å/车é´/产线") |
| | | public class Factory implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**å建æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | @TableLogic |
| | | private Integer delFlag = CommonConstant.DEL_FLAG_0; |
| | | /**åç§°*/ |
| | | @Excel(name = "åç§°", width = 15) |
| | | @ApiModelProperty(value = "åç§°") |
| | | private String factoryName; |
| | | /**ç¼ç */ |
| | | @Excel(name = "ç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "ç¼ç ") |
| | | private String factoryCode; |
| | | /**ç¶èç¹*/ |
| | | @Excel(name = "ç¶èç¹", width = 15) |
| | | @ApiModelProperty(value = "ç¶èç¹") |
| | | private String parentId; |
| | | /**ç¶æ*/ |
| | | @Excel(name = "ç¶æ", width = 15) |
| | | @ApiModelProperty(value = "ç¶æ") |
| | | private String factoryStatus; |
| | | /**åç±»ï¼å·¥å/车é´/产线*/ |
| | | @Excel(name = "åç±»ï¼å·¥å/车é´/产线", width = 15) |
| | | @ApiModelProperty(value = "åç±»ï¼å·¥å/车é´/产线") |
| | | private String factoryCategory; |
| | | /**æåº*/ |
| | | @Excel(name = "æåº", width = 15) |
| | | @ApiModelProperty(value = "æåº") |
| | | private Integer sorter; |
| | | /**å°å*/ |
| | | @Excel(name = "å°å", width = 15) |
| | | @ApiModelProperty(value = "å°å") |
| | | private String address; |
| | | /**MDCå±ç¤ºæ è¯*/ |
| | | @Excel(name = "MDCå±ç¤ºæ è¯", width = 15) |
| | | @ApiModelProperty(value = "MDCå±ç¤ºæ è¯") |
| | | private String mdcFlag; |
| | | /**夿³¨*/ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @Description: 线边ä»åºä¿¡æ¯ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("base_line_side_warehouse") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="base_line_side_warehouse对象", description="线边ä»åºä¿¡æ¯") |
| | | public class LineSideWarehouse implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**å建æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | /**ä»åºç¼ç */ |
| | | @Excel(name = "ä»åºç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "ä»åºç¼ç ") |
| | | private String warehouseCode; |
| | | /**ä»åºåç§°*/ |
| | | @Excel(name = "ä»åºåç§°", width = 15) |
| | | @ApiModelProperty(value = "ä»åºåç§°") |
| | | private String warehouseName; |
| | | /**å·¥å/产线ID*/ |
| | | @Excel(name = "å·¥å/产线ID", width = 15) |
| | | @ApiModelProperty(value = "å·¥å/产线ID") |
| | | private String factoryId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @Description: çæ¬¡ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("base_shift") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="base_shift对象", description="çæ¬¡") |
| | | public class Shift implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**å建æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | @TableLogic |
| | | private Integer delFlag = CommonConstant.DEL_FLAG_0; |
| | | /**çæ¬¡åç§°*/ |
| | | @Excel(name = "çæ¬¡åç§°", width = 15) |
| | | @ApiModelProperty(value = "çæ¬¡åç§°") |
| | | private String shiftName; |
| | | /**çæ¬¡ç¼ç */ |
| | | @Excel(name = "çæ¬¡ç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "çæ¬¡ç¼ç ") |
| | | private String shiftCode; |
| | | /**å¼å§æ¶é´*/ |
| | | @Excel(name = "å¼å§æ¶é´", width = 15) |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | private String startTime; |
| | | /**ç»ææ¶é´*/ |
| | | @Excel(name = "ç»ææ¶é´", width = 15) |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | private String endTime; |
| | | /**工使¶é¿(å°æ¶)*/ |
| | | @Excel(name = "工使¶é¿(å°æ¶)", width = 15) |
| | | @ApiModelProperty(value = "工使¶é¿(å°æ¶)") |
| | | private BigDecimal workHours; |
| | | /**çæ¬¡ç¶æ*/ |
| | | @Excel(name = "çæ¬¡ç¶æ", width = 15) |
| | | @ApiModelProperty(value = "çæ¬¡ç¶æ") |
| | | private String shiftStatus; |
| | | /**æ¯å¦è·¨å¤© 1 æ¯ 0 å¦ é»è®¤ 0*/ |
| | | @Excel(name = "æ¯å¦è·¨å¤© 1 æ¯ 0 å¦ é»è®¤ 0", width = 15) |
| | | @ApiModelProperty(value = "æ¯å¦è·¨å¤© 1 æ¯ 0 å¦ é»è®¤ 0") |
| | | private String crossDayFlag; |
| | | /**夿³¨*/ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @Description: çç»äººåä¿¡æ¯ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("base_shift_group") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="base_shift_group对象", description="çç»äººåä¿¡æ¯") |
| | | public class ShiftGroup implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**å建æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | @TableLogic |
| | | private Integer delFlag = CommonConstant.DEL_FLAG_0; |
| | | /**çç»åç§°*/ |
| | | @Excel(name = "çç»åç§°", width = 15) |
| | | @ApiModelProperty(value = "çç»åç§°") |
| | | private String groupName; |
| | | /**çç»ç¼ç */ |
| | | @Excel(name = "çç»ç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "çç»ç¼ç ") |
| | | private String groupCode; |
| | | /**çç»é¿*/ |
| | | @Excel(name = "çç»é¿", width = 15) |
| | | @ApiModelProperty(value = "çç»é¿") |
| | | private String groupManager; |
| | | /**ç¶æ*/ |
| | | @Excel(name = "ç¶æ", width = 15) |
| | | @ApiModelProperty(value = "ç¶æ") |
| | | private String groupStatus; |
| | | /**çæ¬¡ID*/ |
| | | @Excel(name = "çæ¬¡ID", width = 15) |
| | | @ApiModelProperty(value = "çæ¬¡ID") |
| | | private String shiftId; |
| | | /**å·¥å/车é´/产线ID*/ |
| | | @Excel(name = "å·¥å/车é´/产线ID", width = 15) |
| | | @ApiModelProperty(value = "å·¥å/车é´/产线ID") |
| | | private String factoryId; |
| | | /**夿³¨*/ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | } |
| | |
| | | package org.jeecg.modules.base.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.base.entity.JeecgEntity; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @Description: mom_eam_inspection_project |
| | | * @Description: ä¾åºå管ç |
| | | * @Author: jeecg-boot |
| | | * @Date: 2023-03-10 |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("mom_base_supplier") |
| | | @TableName("base_supplier") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value = "mom_base_supplier对象", description = "mom_base_supplier") |
| | | public class Supplier extends JeecgEntity implements Serializable { |
| | | @ApiModel(value="base_supplier对象", description="ä¾åºå管ç") |
| | | public class Supplier implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ç¼ç |
| | | */ |
| | | @Excel(name = "ç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "ç¼ç ") |
| | | private String num; |
| | | /** |
| | | * åç§° |
| | | */ |
| | | @Excel(name = "åç§°", width = 15) |
| | | @ApiModelProperty(value = "åç§°") |
| | | private String name; |
| | | |
| | | /** |
| | | * ç®ç§° |
| | | */ |
| | | @Excel(name = "ç®ç§°", width = 15) |
| | | @ApiModelProperty(value = "ç®ç§°") |
| | | private String abbreviation; |
| | | |
| | | /** |
| | | * ä¾åºåç±»å |
| | | */ |
| | | @Excel(name = "ä¾åºåç±»å", width = 15,dicCode = "supplier_type") |
| | | @ApiModelProperty(value = "ä¾åºåç±»å") |
| | | @Dict(dicCode = "supplier_type") |
| | | private String supplierType; |
| | | |
| | | /** |
| | | * æå±è¡ä¸ |
| | | */ |
| | | @Excel(name = "æå±è¡ä¸", width = 15) |
| | | @ApiModelProperty(value = "æå±è¡ä¸") |
| | | private String affiliationIndustry; |
| | | |
| | | |
| | | /** |
| | | * å°å |
| | | */ |
| | | |
| | | @Excel(name = "å°å",width = 30) |
| | | @ApiModelProperty(value = "å°å") |
| | | private String address; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * ç§æ·id |
| | | */ |
| | | @Excel(name = "ç§æ·id", width = 15) |
| | | @ApiModelProperty(value = "ç§æ·id") |
| | | private String tenantId; |
| | | |
| | | |
| | | /** |
| | | * å é¤ç¶æ(0-æ£å¸¸,1-å·²å é¤) |
| | | */ |
| | | @Excel(name = "å é¤ç¶æ(0-æ£å¸¸,1-å·²å é¤)", width = 15) |
| | | @ApiModelProperty(value = "å é¤ç¶æ(0-æ£å¸¸,1-å·²å é¤)") |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**å建æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | @TableLogic |
| | | private Integer delFlag = CommonConstant.DEL_FLAG_0; |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | /**ä¾åºåç¼ç */ |
| | | @Excel(name = "ä¾åºåç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "ä¾åºåç¼ç ") |
| | | private String supplierCode; |
| | | /**ä¾åºååç§°*/ |
| | | @Excel(name = "ä¾åºååç§°", width = 15) |
| | | @ApiModelProperty(value = "ä¾åºååç§°") |
| | | private String supplierName; |
| | | /**ä¾åºååç§°*/ |
| | | @Excel(name = "ä¾åºååç§°", width = 15) |
| | | @ApiModelProperty(value = "ä¾åºååç§°") |
| | | private String supplierStatus; |
| | | /**å½å®¶*/ |
| | | @Excel(name = "å½å®¶", width = 15) |
| | | @ApiModelProperty(value = "å½å®¶") |
| | | private String country; |
| | | /**ç份*/ |
| | | @Excel(name = "ç份", width = 15) |
| | | @ApiModelProperty(value = "ç份") |
| | | private String province; |
| | | /**åå¸*/ |
| | | @Excel(name = "åå¸", width = 15) |
| | | @ApiModelProperty(value = "åå¸") |
| | | private String city; |
| | | /**详ç»å°å*/ |
| | | @Excel(name = "详ç»å°å", width = 15) |
| | | @ApiModelProperty(value = "详ç»å°å") |
| | | private String address; |
| | | /**é®ç¼*/ |
| | | @Excel(name = "é®ç¼", width = 15) |
| | | @ApiModelProperty(value = "é®ç¼") |
| | | private String postcode; |
| | | /**è系人*/ |
| | | @Excel(name = "è系人", width = 15) |
| | | @ApiModelProperty(value = "è系人") |
| | | private String contact; |
| | | /**ä¼ ç*/ |
| | | @Excel(name = "ä¼ ç", width = 15) |
| | | @ApiModelProperty(value = "ä¼ ç") |
| | | private String fax; |
| | | /**é®ç®±*/ |
| | | @Excel(name = "é®ç®±", width = 15) |
| | | @ApiModelProperty(value = "é®ç®±") |
| | | private String email; |
| | | /**çµè¯*/ |
| | | @Excel(name = "çµè¯", width = 15) |
| | | @ApiModelProperty(value = "çµè¯") |
| | | private String phone; |
| | | /**å
¬å¸çµè¯*/ |
| | | @Excel(name = "å
¬å¸çµè¯", width = 15) |
| | | @ApiModelProperty(value = "å
¬å¸çµè¯") |
| | | private String companyTelephone; |
| | | /**宿¹ç½ç«*/ |
| | | @Excel(name = "宿¹ç½ç«", width = 15) |
| | | @ApiModelProperty(value = "宿¹ç½ç«") |
| | | private String officialWebsite; |
| | | /**夿³¨*/ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | /** |
| | | * å¤ç¨å段1 |
| | | */ |
| | | @Excel(name = "å¤ç¨å段1", width = 15) |
| | | @ApiModelProperty(value = "å¤ç¨å段1") |
| | | private String supplierUda1; |
| | | /** |
| | | * å¤ç¨å段2 |
| | | */ |
| | | @Excel(name = "å¤ç¨å段2", width = 15) |
| | | @ApiModelProperty(value = "å¤ç¨å段2") |
| | | private String supplierUda2; |
| | | /** |
| | | * å¤ç¨å段3 |
| | | */ |
| | | @Excel(name = "å¤ç¨å段3", width = 15) |
| | | @ApiModelProperty(value = "å¤ç¨å段3") |
| | | private String supplierUda3; |
| | | /** |
| | | * å¤ç¨å段4 |
| | | */ |
| | | @Excel(name = "å¤ç¨å段4", width = 15) |
| | | @ApiModelProperty(value = "å¤ç¨å段4") |
| | | private String supplierUda4; |
| | | /** |
| | | * å¤ç¨å段5 |
| | | */ |
| | | @Excel(name = "å¤ç¨å段5", width = 15) |
| | | @ApiModelProperty(value = "å¤ç¨å段5") |
| | | private String supplierUda5; |
| | | /** |
| | | * ç¶æ 0 ç¦ç¨ 1 å¯ç¨ |
| | | */ |
| | | @Excel(name = "ç¶æ 0 ç¦ç¨ 1 å¯ç¨", width = 15) |
| | | @ApiModelProperty(value = "ç¶æ 0 ç¦ç¨ 1 å¯ç¨") |
| | | private String status = CommonConstant.STATUS_1; |
| | | |
| | | /** |
| | | * ä¾åºåç±»åId |
| | | */ |
| | | @Excel(name = "supplier_category_id", width = 15) |
| | | @ApiModelProperty(value = "supplier_category_id") |
| | | private String supplierCategoryId; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "ä¾åºå项ç®åç±»ç¼ç /åç§°") |
| | | @TableField(exist = false) |
| | | private String supplierCategoryNumName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @Description: ç¨æ·å·¥å/车é´/产线å
³ç³» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("base_user_factory") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="base_user_factory对象", description="ç¨æ·å·¥å/车é´/产线å
³ç³»") |
| | | public class UserFactory implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**å建æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**ç¨æ·*/ |
| | | @Excel(name = "ç¨æ·", width = 15) |
| | | @ApiModelProperty(value = "ç¨æ·") |
| | | private String userId; |
| | | /**å·¥å/车é´/产线ID*/ |
| | | @Excel(name = "å·¥å/车é´/产线ID", width = 15) |
| | | @ApiModelProperty(value = "å·¥å/车é´/产线ID") |
| | | private String factoryId; |
| | | |
| | | public UserFactory(String id, String factoryId) { |
| | | this.userId = id; |
| | | this.factoryId = factoryId; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @Description: çç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("base_user_group") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="base_user_group对象", description="çç»") |
| | | public class UserGroup implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**å建æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**çç»ID*/ |
| | | @Excel(name = "çç»ID", width = 15) |
| | | @ApiModelProperty(value = "çç»ID") |
| | | private String groupId; |
| | | /**ç¨æ·ID*/ |
| | | @Excel(name = "ç¨æ·ID", width = 15) |
| | | @ApiModelProperty(value = "ç¨æ·ID") |
| | | private String userId; |
| | | |
| | | public UserGroup(String groupId, String userId) { |
| | | super(); |
| | | this.groupId = groupId; |
| | | this.userId = userId; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.base.entity.Factory; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: å·¥å/车é´/产线 |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface FactoryMapper extends BaseMapper<Factory> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.base.entity.LineSideWarehouse; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: 线边ä»åºä¿¡æ¯ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface LineSideWarehouseMapper extends BaseMapper<LineSideWarehouse> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.base.entity.ShiftGroup; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: çç»äººåä¿¡æ¯ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface ShiftGroupMapper extends BaseMapper<ShiftGroup> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.base.entity.Shift; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: çæ¬¡ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface ShiftMapper extends BaseMapper<Shift> { |
| | | |
| | | } |
| | |
| | | package org.jeecg.modules.base.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.base.entity.Constructor; |
| | | import org.jeecg.modules.base.entity.Supplier; |
| | | import org.jeecg.modules.base.entity.Unit; |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.base.entity.Supplier; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: ä¾åºå管ç |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface SupplierMapper extends BaseMapper<Supplier> { |
| | | /** |
| | | * éè¿ä¾åºååç§°æ¥è¯¢ä¾åºåä¿¡æ¯ |
| | | * @param name |
| | | * @return |
| | | */ |
| | | public Supplier getByName(@Param("name") String name); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.base.entity.UserFactory; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: ç¨æ·å·¥å/车é´/产线å
³ç³» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface UserFactoryMapper extends BaseMapper<UserFactory> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.base.entity.UserGroup; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: çç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface UserGroupMapper extends BaseMapper<UserGroup> { |
| | | |
| | | } |
ÎļþÃû´Ó src/main/java/org/jeecg/modules/base/mapper/xml/MaterialMapper.xml ÐÞ¸Ä |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.base.mapper.MaterialMapper"> |
| | | <mapper namespace="org.jeecg.modules.base.mapper.FactoryMapper"> |
| | | |
| | | </mapper> |
| | | </mapper> |
copy from src/main/java/org/jeecg/modules/base/mapper/xml/MaterialMapper.xml
copy to src/main/java/org/jeecg/modules/base/mapper/xml/LineSideWarehouseMapper.xml
Îļþ´Ó src/main/java/org/jeecg/modules/base/mapper/xml/MaterialMapper.xml ¸´ÖÆ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.base.mapper.MaterialMapper"> |
| | | <mapper namespace="org.jeecg.modules.base.mapper.LineSideWarehouseMapper"> |
| | | |
| | | </mapper> |
| | | </mapper> |
ÎļþÃû´Ó src/main/java/org/jeecg/modules/base/mapper/xml/EncodeRuleMapper.xml ÐÞ¸Ä |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.base.mapper.EncodeRuleMapper"> |
| | | |
| | | <mapper namespace="org.jeecg.modules.base.mapper.ShiftGroupMapper"> |
| | | |
| | | </mapper> |
ÎļþÃû´Ó src/main/java/org/jeecg/modules/base/mapper/xml/ClientMapper.xml ÐÞ¸Ä |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.base.mapper.ClientMapper"> |
| | | <mapper namespace="org.jeecg.modules.base.mapper.ShiftMapper"> |
| | | |
| | | </mapper> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.base.mapper.SupplierMapper"> |
| | | |
| | | |
| | | <!-- æ ¹æ®ä¾åºååç§°æ¥è¯¢ --> |
| | | <select id="getByName" resultType="org.jeecg.modules.base.entity.Supplier"> |
| | | select * from mom_base_supplier where name = #{name} and del_flag = 0 |
| | | </select> |
| | | </mapper> |
copy from src/main/java/org/jeecg/modules/base/mapper/xml/MaterialMapper.xml
copy to src/main/java/org/jeecg/modules/base/mapper/xml/UserFactoryMapper.xml
Îļþ´Ó src/main/java/org/jeecg/modules/base/mapper/xml/MaterialMapper.xml ¸´ÖÆ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.base.mapper.MaterialMapper"> |
| | | <mapper namespace="org.jeecg.modules.base.mapper.UserFactoryMapper"> |
| | | |
| | | </mapper> |
| | | </mapper> |
copy from src/main/java/org/jeecg/modules/base/mapper/xml/MaterialMapper.xml
copy to src/main/java/org/jeecg/modules/base/mapper/xml/UserGroupMapper.xml
Îļþ´Ó src/main/java/org/jeecg/modules/base/mapper/xml/MaterialMapper.xml ¸´ÖÆ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.base.mapper.MaterialMapper"> |
| | | <mapper namespace="org.jeecg.modules.base.mapper.UserGroupMapper"> |
| | | |
| | | </mapper> |
| | | </mapper> |
ÎļþÃû´Ó src/main/java/org/jeecg/modules/system/model/ProductionIdModel.java ÐÞ¸Ä |
| | |
| | | package org.jeecg.modules.system.model; |
| | | package org.jeecg.modules.base.model; |
| | | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.modules.system.entity.MdcProduction; |
| | | import org.jeecg.modules.base.entity.Factory; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.ArrayList; |
| | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | public class ProductionIdModel implements Serializable { |
| | | public class FactoryIdModel implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 6403075134223338239L; |
| | | |
| | |
| | | */ |
| | | private Boolean selectable = true; |
| | | |
| | | List<ProductionIdModel> children = new ArrayList<>(); |
| | | List<FactoryIdModel> children = new ArrayList<>(); |
| | | |
| | | /** |
| | | * å°MdcProductionTreeModelçé¨åæ°æ®æ¾å¨è¯¥å¯¹è±¡å½ä¸ |
| | | * å°FactoryTreeModelçé¨åæ°æ®æ¾å¨è¯¥å¯¹è±¡å½ä¸ |
| | | * |
| | | * @param treeModel |
| | | * @return |
| | | */ |
| | | public ProductionIdModel convert(MdcProductionTreeModel treeModel) { |
| | | public FactoryIdModel convert(FactoryTreeModel treeModel) { |
| | | this.key = treeModel.getId(); |
| | | this.value = treeModel.getId(); |
| | | this.title = treeModel.getProductionName(); |
| | | this.title = treeModel.getFactoryName(); |
| | | return this; |
| | | } |
| | | |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | public ProductionIdModel convertByUserProduction(MdcProduction mdcProduction) { |
| | | this.key = mdcProduction.getId(); |
| | | this.value = mdcProduction.getId(); |
| | | this.title = mdcProduction.getProductionName(); |
| | | public FactoryIdModel convertByUserFactory(Factory factory) { |
| | | this.key = factory.getId(); |
| | | this.value = factory.getId(); |
| | | this.title = factory.getFactoryName(); |
| | | return this; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.model; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.modules.base.entity.Factory; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author: LiuS |
| | | * @create: 2023-03-23 14:16 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "产线表æ ç»ææ°æ®å®ä½", description = "产线表") |
| | | public class FactoryTreeModel implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -1309711609760828658L; |
| | | |
| | | /** |
| | | * 对åºFactoryä¸çidåæ®µ,åç«¯æ°æ®æ ä¸çkey |
| | | */ |
| | | private String key; |
| | | |
| | | /** |
| | | * 对åºFactoryä¸çidåæ®µ,åç«¯æ°æ®æ ä¸çvalue |
| | | */ |
| | | private String value; |
| | | |
| | | /** |
| | | * 对åºfactory_nameåæ®µ,åç«¯æ°æ®æ ä¸çtitle |
| | | */ |
| | | private String title; |
| | | |
| | | private boolean isLeaf; |
| | | |
| | | /** |
| | | * ç±»å |
| | | */ |
| | | private Integer type; |
| | | //以䏿æå段åä¸Factoryç¸å |
| | | |
| | | private String id; |
| | | |
| | | private String parentId; |
| | | |
| | | private String factoryName; |
| | | |
| | | private String address; |
| | | |
| | | private Integer sorter; |
| | | |
| | | private String factoryCode; |
| | | |
| | | private String remark; |
| | | |
| | | private Integer delFlag; |
| | | |
| | | private String createBy; |
| | | |
| | | private Date createTime; |
| | | |
| | | private String updateBy; |
| | | |
| | | private Date updateTime; |
| | | |
| | | private String mdcFlag; |
| | | |
| | | private List<FactoryTreeModel> children = new ArrayList<>(); |
| | | |
| | | public FactoryTreeModel() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * å°Factoryå¯¹è±¡è½¬æ¢æFactoryTreeModel对象 |
| | | * |
| | | * @param factory |
| | | */ |
| | | public FactoryTreeModel(Factory factory) { |
| | | this.key = factory.getId(); |
| | | this.value = factory.getId(); |
| | | this.title = factory.getFactoryName(); |
| | | this.id = factory.getId(); |
| | | this.parentId = factory.getParentId(); |
| | | this.factoryName = factory.getFactoryName(); |
| | | this.address = factory.getAddress(); |
| | | this.sorter = factory.getSorter(); |
| | | this.factoryCode = factory.getFactoryCode(); |
| | | this.remark = factory.getRemark(); |
| | | this.delFlag = factory.getDelFlag(); |
| | | this.createBy = factory.getCreateBy(); |
| | | this.createTime = factory.getCreateTime(); |
| | | this.updateBy = factory.getUpdateBy(); |
| | | this.updateTime = factory.getUpdateTime(); |
| | | this.mdcFlag = factory.getMdcFlag(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.service; |
| | | |
| | | import org.jeecg.modules.base.entity.Factory; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.base.model.FactoryIdModel; |
| | | import org.jeecg.modules.base.model.FactoryTreeModel; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: å·¥å/车é´/产线 |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IFactoryService extends IService<Factory> { |
| | | |
| | | /** |
| | | * ä¿åäº§çº¿æ°æ® |
| | | */ |
| | | void saveFactoryData(Factory factory); |
| | | /** |
| | | * æ¥è¯¢ææäº§çº¿ä¿¡æ¯ï¼å¹¶åèç¹è¿è¡æ¾ç¤º |
| | | */ |
| | | List<FactoryTreeModel> queryTreeList(); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææäº§çº¿ä¿¡æ¯ï¼å¹¶åèç¹è¿è¡æ¾ç¤º |
| | | */ |
| | | List<FactoryTreeModel> queryTreeList(String ids); |
| | | |
| | | /** |
| | | * æ ¹æ®äº§çº¿idå é¤å¹¶å é¤å
¶å¯è½åå¨çå级产线 |
| | | */ |
| | | boolean delete(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææfactoryIdä¿¡æ¯,å¹¶åèç¹è¿è¡æ¾ç¤º |
| | | */ |
| | | List<FactoryIdModel> queryFactoryIdTreeList(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.service; |
| | | |
| | | import org.jeecg.modules.base.entity.LineSideWarehouse; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @Description: 线边ä»åºä¿¡æ¯ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface ILineSideWarehouseService extends IService<LineSideWarehouse> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.service; |
| | | |
| | | import org.jeecg.modules.base.entity.ShiftGroup; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @Description: çç»äººåä¿¡æ¯ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IShiftGroupService extends IService<ShiftGroup> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.service; |
| | | |
| | | import org.jeecg.modules.base.entity.Shift; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @Description: çæ¬¡ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IShiftService extends IService<Shift> { |
| | | |
| | | } |
| | |
| | | package org.jeecg.modules.base.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.base.entity.Supplier; |
| | | import org.jeecg.modules.base.entity.SupplierCategory; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @Description: mom_base_supplier |
| | | * @Description: ä¾åºå管ç |
| | | * @Author: jeecg-boot |
| | | * @Date: 2023-03-10 |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface ISupplierService extends IService<Supplier> { |
| | | |
| | | |
| | | public Supplier getByName(String name); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.service; |
| | | |
| | | import org.jeecg.modules.base.entity.UserFactory; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.base.model.FactoryIdModel; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: ç¨æ·å·¥å/车é´/产线å
³ç³» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IUserFactoryService extends IService<UserFactory> { |
| | | |
| | | /** |
| | | * æ ¹æ®æå®ç¨æ·idæ¥è¯¢äº§çº¿ä¿¡æ¯ |
| | | */ |
| | | List<FactoryIdModel> queryFactoryIdsOfUser(String userId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.service; |
| | | |
| | | import org.jeecg.modules.base.entity.UserGroup; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @Description: çç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IUserGroupService extends IService<UserGroup> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.constant.FillRuleConstant; |
| | | import org.jeecg.common.util.FillRuleUtil; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.base.entity.Factory; |
| | | import org.jeecg.modules.base.entity.UserFactory; |
| | | import org.jeecg.modules.base.mapper.FactoryMapper; |
| | | import org.jeecg.modules.base.mapper.UserFactoryMapper; |
| | | import org.jeecg.modules.base.model.FactoryIdModel; |
| | | import org.jeecg.modules.base.model.FactoryTreeModel; |
| | | import org.jeecg.modules.base.service.IFactoryService; |
| | | import org.jeecg.modules.system.mapper.SysUserMapper; |
| | | import org.jeecg.modules.system.util.FindsProductionsChildrenUtil; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: å·¥å/车é´/产线 |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class FactoryServiceImpl extends ServiceImpl<FactoryMapper, Factory> implements IFactoryService { |
| | | |
| | | @Resource |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Resource |
| | | private UserFactoryMapper userFactoryMapper; |
| | | |
| | | /** |
| | | * saveFactoryData å¯¹åº add ä¿åç¨æ·å¨é¡µé¢æ·»å çæ°çäº§çº¿å¯¹è±¡æ°æ® |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveFactoryData(Factory factory) { |
| | | if (factory != null) { |
| | | if (factory.getParentId() == null) { |
| | | factory.setParentId(""); |
| | | } |
| | | factory.setId(IdWorker.getIdStr(factory)); |
| | | // å
å¤æè¯¥å¯¹è±¡ææ ç¶çº§ID,æåæå³ç䏿¯æé«çº§,å¦åæå³çæ¯æé«çº§ |
| | | // è·åç¶çº§ID |
| | | String parentId = factory.getParentId(); |
| | | JSONObject formData = new JSONObject(); |
| | | formData.put("parentId",parentId); |
| | | String factoryCategory = ""; |
| | | if(StringUtils.isBlank(parentId)){ |
| | | factoryCategory = "1"; |
| | | }else { |
| | | // æ¥è¯¢åºç¶çº§äº§çº¿ |
| | | Factory parentFactory = super.getById(parentId); |
| | | // æ ¹æ®ç¶çº§äº§çº¿ç±»åç®åºå½å产线çç±»å |
| | | factoryCategory = String.valueOf(Integer.valueOf(parentFactory.getFactoryCategory()) + 1); |
| | | } |
| | | factory.setFactoryCategory(factoryCategory); |
| | | factory.setDelFlag(CommonConstant.DEL_FLAG_0); |
| | | this.save(factory); |
| | | |
| | | //å¤çåå¨ç¶åå
³ç³» mdcæ è®°ç»ä¸çé®é¢ |
| | | //1.mdcæ è®° 为 1 å¼å¯ ç¶çº§èç¹è¦ç»ä¸å¼å¯ |
| | | //2.mdcæ è®° 为 0 å
³é å级èç¹è¦ç»ä¸å
³é æ°å¢æä½ ä¸å卿¤æ
åµ |
| | | if(StringUtils.isNotBlank(parentId) && CommonConstant.DEFAULT_1.equals(factory.getMdcFlag())){ |
| | | openParentMdcFlag(parentId); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * queryTreeList å¯¹åº queryTreeList æ¥è¯¢ææçäº§çº¿æ°æ®,以æ ç»æå½¢å¼ååºç»å端 |
| | | */ |
| | | @Override |
| | | //@Cacheable(value = "mdc:cache:production:alldata") |
| | | public List<FactoryTreeModel> queryTreeList() { |
| | | LambdaQueryWrapper<Factory> query = new LambdaQueryWrapper<Factory>(); |
| | | query.eq(Factory::getDelFlag, CommonConstant.DEL_FLAG_0.toString()); |
| | | query.orderByAsc(Factory::getSorter); |
| | | List<Factory> list = this.list(query); |
| | | //è°ç¨wrapTreeDataToTreeListæ¹æ³çææ ç¶æ°æ® |
| | | return FindsProductionsChildrenUtil.wrapTreeDataToTreeList(list); |
| | | } |
| | | |
| | | /** |
| | | * queryTreeList æ ¹æ®äº§çº¿idæ¥è¯¢,åç«¯åæ¾è°ç¨ |
| | | */ |
| | | @Override |
| | | public List<FactoryTreeModel> queryTreeList(String ids) { |
| | | List<FactoryTreeModel> listResult = new ArrayList<>(); |
| | | LambdaQueryWrapper<Factory> query = new LambdaQueryWrapper<Factory>(); |
| | | query.eq(Factory::getDelFlag, CommonConstant.DEL_FLAG_0.toString()); |
| | | if (oConvertUtils.isNotEmpty(ids)) { |
| | | query.in(true, Factory::getId, ids.split(",")); |
| | | } |
| | | query.orderByAsc(Factory::getSorter); |
| | | List<Factory> list = this.list(query); |
| | | for (Factory factory : list) { |
| | | if (factory.getRemark().isEmpty()){ |
| | | factory.setRemark(""); |
| | | } |
| | | listResult.add(new FactoryTreeModel(factory)); |
| | | } |
| | | return listResult; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®äº§çº¿idå é¤å¹¶å é¤å
¶å¯è½åå¨çå级产线 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean delete(String id) { |
| | | List<String> idList = new ArrayList<>(); |
| | | idList.add(id); |
| | | this.checkChildrenExists(id, idList); |
| | | boolean result = this.removeByIds(idList); |
| | | //æ ¹æ®äº§çº¿idå é¤ç¨æ·ä¸äº§çº¿å
³ç³» |
| | | userFactoryMapper.delete(new LambdaQueryWrapper<UserFactory>().in(UserFactory::getFactoryId, idList)); |
| | | //æ ¹æ®äº§çº¿idå é¤äº§çº¿ä¸è®¾å¤å
³ç³» |
| | | //productionEquipmentMapper.delete(new LambdaQueryWrapper<MdcProductionEquipment>().in(MdcProductionEquipment::getProductionId, idList)); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * delete æ¹æ³è°ç¨ é彿¥æ¾åéid |
| | | */ |
| | | private void checkChildrenExists(String id, List<String> idList) { |
| | | LambdaQueryWrapper<Factory> query = new LambdaQueryWrapper<>(); |
| | | query.eq(Factory::getParentId, id); |
| | | List<Factory> factoryList = this.list(query); |
| | | if (factoryList != null && !factoryList.isEmpty()) { |
| | | for (Factory factory : factoryList) { |
| | | idList.add(factory.getId()); |
| | | this.checkChildrenExists(factory.getId(), idList); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | //@Cacheable(value = "mdc:cache:production:allids") |
| | | public List<FactoryIdModel> queryFactoryIdTreeList() { |
| | | LambdaQueryWrapper<Factory> query = new LambdaQueryWrapper<>(); |
| | | query.eq(Factory::getDelFlag, CommonConstant.DEL_FLAG_0.toString()); |
| | | query.orderByAsc(Factory::getSorter); |
| | | List<Factory> list = this.list(query); |
| | | //è°ç¨wrapTreeDataToTreeListæ¹æ³çææ ç¶æ°æ® |
| | | return FindsProductionsChildrenUtil.wrapTreeDataToProductionIdTreeList(list); |
| | | } |
| | | |
| | | /** |
| | | * æå¼ ç¶èç¹ å 以ä¸çmdcæ è®° |
| | | * @param parentId |
| | | */ |
| | | private void openParentMdcFlag(String parentId) { |
| | | List<String> listParentTree = findParentIdsForFactory(parentId, new ArrayList<>()); |
| | | if (!CollectionUtil.isEmpty(listParentTree)) { |
| | | UpdateWrapper<Factory> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.in("id", listParentTree); |
| | | updateWrapper.set("mdc_flag", "1"); |
| | | super.update(updateWrapper); |
| | | } |
| | | } |
| | | |
| | | public List<String> findParentIdsForFactory(String parentId, List<String> idList) { |
| | | if (StringUtils.isEmpty(parentId)) { |
| | | return null; |
| | | } |
| | | if (idList == null || idList.isEmpty()) { |
| | | idList = new ArrayList<>(); |
| | | } |
| | | boolean p = true; |
| | | if (p) { |
| | | Factory en = super.getById(parentId); |
| | | if (en != null) { |
| | | idList.add(0, en.getId()); |
| | | } |
| | | if (StringUtils.isNotBlank(en.getParentId())) { |
| | | parentId = en.getParentId(); |
| | | findParentIdsForFactory(parentId, idList); |
| | | } else { |
| | | p = false; |
| | | return idList; |
| | | } |
| | | } |
| | | return idList; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.service.impl; |
| | | |
| | | import org.jeecg.modules.base.entity.LineSideWarehouse; |
| | | import org.jeecg.modules.base.mapper.LineSideWarehouseMapper; |
| | | import org.jeecg.modules.base.service.ILineSideWarehouseService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @Description: 线边ä»åºä¿¡æ¯ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class LineSideWarehouseServiceImpl extends ServiceImpl<LineSideWarehouseMapper, LineSideWarehouse> implements ILineSideWarehouseService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.service.impl; |
| | | |
| | | import org.jeecg.modules.base.entity.ShiftGroup; |
| | | import org.jeecg.modules.base.mapper.ShiftGroupMapper; |
| | | import org.jeecg.modules.base.service.IShiftGroupService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @Description: çç»äººåä¿¡æ¯ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class ShiftGroupServiceImpl extends ServiceImpl<ShiftGroupMapper, ShiftGroup> implements IShiftGroupService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.service.impl; |
| | | |
| | | import org.jeecg.modules.base.entity.Shift; |
| | | import org.jeecg.modules.base.mapper.ShiftMapper; |
| | | import org.jeecg.modules.base.service.IShiftService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @Description: çæ¬¡ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class ShiftServiceImpl extends ServiceImpl<ShiftMapper, Shift> implements IShiftService { |
| | | |
| | | } |
| | |
| | | package org.jeecg.modules.base.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.jeecg.modules.base.entity.Supplier; |
| | | import org.jeecg.modules.base.mapper.SupplierMapper; |
| | | import org.jeecg.modules.base.mapper.UnitMapper; |
| | | import org.jeecg.modules.base.service.ISupplierService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @Description: mom_base_supplier |
| | | * @Description: ä¾åºå管ç |
| | | * @Author: jeecg-boot |
| | | * @Date: 2023-03-10 |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> implements ISupplierService { |
| | | |
| | | @Resource |
| | | private SupplierMapper supplierMapper; |
| | | @Override |
| | | public Supplier getByName(String name) { |
| | | return supplierMapper.getByName(name); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import org.jeecg.modules.base.entity.Factory; |
| | | import org.jeecg.modules.base.entity.UserFactory; |
| | | import org.jeecg.modules.base.mapper.UserFactoryMapper; |
| | | import org.jeecg.modules.base.model.FactoryIdModel; |
| | | import org.jeecg.modules.base.service.IFactoryService; |
| | | import org.jeecg.modules.base.service.IUserFactoryService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: ç¨æ·å·¥å/车é´/产线å
³ç³» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class UserFactoryServiceImpl extends ServiceImpl<UserFactoryMapper, UserFactory> implements IUserFactoryService { |
| | | |
| | | @Autowired |
| | | private IFactoryService factoryService; |
| | | /** |
| | | * æ ¹æ®ç¨æ·idæ¥è¯¢äº§çº¿ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<FactoryIdModel> queryFactoryIdsOfUser(String userId) { |
| | | LambdaQueryWrapper<UserFactory> queryUserFactory = new LambdaQueryWrapper<>(); |
| | | LambdaQueryWrapper<Factory> queryFactory = new LambdaQueryWrapper<>(); |
| | | try { |
| | | queryUserFactory.eq(UserFactory::getUserId, userId); |
| | | List<String> factoryIdList = new ArrayList<>(); |
| | | List<FactoryIdModel> factoryIdModelList = new ArrayList<>(); |
| | | List<UserFactory> userFactoryList = this.list(queryUserFactory); |
| | | if (userFactoryList != null && !userFactoryList.isEmpty()) { |
| | | for (UserFactory userFactory : userFactoryList) { |
| | | factoryIdList.add(userFactory.getFactoryId()); |
| | | } |
| | | queryFactory.in(Factory::getId, factoryIdList); |
| | | List<Factory> factoryList = factoryService.list(queryFactory); |
| | | if (factoryList != null && !factoryList.isEmpty()) { |
| | | for (Factory factory : factoryList) { |
| | | factoryIdModelList.add(new FactoryIdModel().convertByUserFactory(factory)); |
| | | } |
| | | } |
| | | return factoryIdModelList; |
| | | } |
| | | } catch (Exception e) { |
| | | e.fillInStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.base.service.impl; |
| | | |
| | | import org.jeecg.modules.base.entity.UserGroup; |
| | | import org.jeecg.modules.base.mapper.UserGroupMapper; |
| | | import org.jeecg.modules.base.service.IUserGroupService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @Description: çç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-24 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class UserGroupServiceImpl extends ServiceImpl<UserGroupMapper, UserGroup> implements IUserGroupService { |
| | | |
| | | } |
| | |
| | | import org.jeecg.common.system.util.JwtUtil; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.common.util.*; |
| | | import org.jeecg.modules.base.entity.UserGroup; |
| | | import org.jeecg.modules.base.service.BaseCommonService; |
| | | import org.jeecg.modules.base.service.IUserFactoryService; |
| | | import org.jeecg.modules.base.service.IUserGroupService; |
| | | import org.jeecg.modules.system.entity.*; |
| | | import org.jeecg.modules.system.model.DepartIdModel; |
| | | import org.jeecg.modules.system.model.ProductionIdModel; |
| | | import org.jeecg.modules.base.model.FactoryIdModel; |
| | | import org.jeecg.modules.system.model.SysUserSysDepartModel; |
| | | import org.jeecg.modules.system.service.*; |
| | | import org.jeecg.modules.system.vo.SysDepartUsersVO; |
| | | import org.jeecg.modules.system.vo.SysUserGroupVO; |
| | | import org.jeecg.modules.system.vo.SysUserRoleVO; |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | |
| | | private BaseCommonService baseCommonService; |
| | | |
| | | @Resource |
| | | private IMdcUserProductionService userProductionService; |
| | | private IUserFactoryService userFactoryService; |
| | | |
| | | @Resource |
| | | private IUserGroupService userGroupService; |
| | | |
| | | /** |
| | | * è·åç¨æ·åè¡¨æ°æ® |
| | |
| | | @AutoLog(value = "ç¨æ·è¡¨-æ¥è¯¢æå®ç¨æ·å产线å
³èçæ°æ®") |
| | | @ApiOperation(value = "ç¨æ·è¡¨-æ¥è¯¢æå®ç¨æ·å产线å
³èçæ°æ®", notes = "ç¨æ·è¡¨-æ¥è¯¢æå®ç¨æ·å产线å
³èçæ°æ®") |
| | | @GetMapping(value = "/userProductionList") |
| | | public Result<List<ProductionIdModel>> getUserProductionsList(@RequestParam(name = "userId", required = true) String userId) { |
| | | Result<List<ProductionIdModel>> result = new Result<>(); |
| | | public Result<List<FactoryIdModel>> getUserProductionsList(@RequestParam(name = "userId", required = true) String userId) { |
| | | Result<List<FactoryIdModel>> result = new Result<>(); |
| | | try { |
| | | List<ProductionIdModel> proIdModelList = this.userProductionService.queryProductionIdsOfUser(userId); |
| | | List<FactoryIdModel> proIdModelList = this.userFactoryService.queryFactoryIdsOfUser(userId); |
| | | if (proIdModelList != null && !proIdModelList.isEmpty()) { |
| | | result.setSuccess(true); |
| | | result.setMessage("æ¥æ¾æå"); |
| | |
| | | return ls; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/userGroupList", method = RequestMethod.GET) |
| | | public Result<IPage<SysUser>> userGroupList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { |
| | | Result<IPage<SysUser>> result = new Result<IPage<SysUser>>(); |
| | | Page<SysUser> page = new Page<SysUser>(pageNo, pageSize); |
| | | String groupId = req.getParameter("groupId"); |
| | | String username = req.getParameter("username"); |
| | | IPage<SysUser> pageList = sysUserService.getUserByGroupId(page, groupId, username); |
| | | result.setSuccess(true); |
| | | result.setResult(pageList); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * ç»æå®çç»æ·»å 人å |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | //@RequiresRoles({"admin"}) |
| | | @RequestMapping(value = "/addBaseUserGroup", method = RequestMethod.POST) |
| | | public Result<String> addBaseUserGroup(@RequestBody SysUserGroupVO sysUserGroupVO) { |
| | | Result<String> result = new Result<String>(); |
| | | try { |
| | | String groupId = sysUserGroupVO.getGroupId(); |
| | | for (String userId : sysUserGroupVO.getUserIdList()) { |
| | | UserGroup userGroup = new UserGroup(groupId,userId); |
| | | QueryWrapper<UserGroup> queryWrapper = new QueryWrapper<UserGroup>(); |
| | | queryWrapper.eq("group_id", groupId).eq("user_id", userId); |
| | | UserGroup one = userGroupService.getOne(queryWrapper); |
| | | if (one == null) { |
| | | userGroupService.save(userGroup); |
| | | } |
| | | |
| | | } |
| | | result.setMessage("æ·»å æå!"); |
| | | result.setSuccess(true); |
| | | return result; |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | | result.setSuccess(false); |
| | | result.setMessage("åºéäº: " + e.getMessage()); |
| | | return result; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å 餿å®çç»ç人åå
³ç³» |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | //@RequiresRoles({"admin"}) |
| | | @RequestMapping(value = "/deleteUserGroup", method = RequestMethod.DELETE) |
| | | public Result<UserGroup> deleteUserGroup(@RequestParam(name = "groupId") String groupId, |
| | | @RequestParam(name = "userId", required = true) String userId |
| | | ) { |
| | | Result<UserGroup> result = new Result<UserGroup>(); |
| | | try { |
| | | QueryWrapper<UserGroup> queryWrapper = new QueryWrapper<UserGroup>(); |
| | | queryWrapper.eq("group_id", groupId).eq("user_id", userId); |
| | | userGroupService.remove(queryWrapper); |
| | | result.success("å 餿å!"); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | | result.error500("å é¤å¤±è´¥ï¼"); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå 餿å®çç»ç人åå
³ç³» |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | //@RequiresRoles({"admin"}) |
| | | @RequestMapping(value = "/deleteUserGroupBatch", method = RequestMethod.DELETE) |
| | | public Result<UserGroup> deleteUserGroupBatch( |
| | | @RequestParam(name = "groupId") String groupId, |
| | | @RequestParam(name = "userIds", required = true) String userIds) { |
| | | Result<UserGroup> result = new Result<UserGroup>(); |
| | | try { |
| | | QueryWrapper<UserGroup> queryWrapper = new QueryWrapper<UserGroup>(); |
| | | queryWrapper.eq("group_id", groupId).in("user_id", Arrays.asList(userIds.split(","))); |
| | | userGroupService.remove(queryWrapper); |
| | | result.success("å 餿å!"); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | | result.error500("å é¤å¤±è´¥ï¼"); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.jeecg.common.system.vo.SelectTreeModel; |
| | | import org.jeecg.modules.system.entity.SysDepart; |
| | | import org.jeecg.modules.system.model.SysDepartTreeModel; |
| | | import org.jeecg.modules.system.model.TreeModel; |
| | | import org.springframework.data.repository.query.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | * <p> |
| | | * é¨é¨ Mapper æ¥å£ |
| | | * <p> |
| | | * |
| | | * |
| | | * @Author: Steve |
| | | * @Sinceï¼ 2019-01-22 |
| | | * @Sinceï¼ 2019-01-22 |
| | | */ |
| | | public interface SysDepartMapper extends BaseMapper<SysDepart> { |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDæ¥è¯¢é¨é¨éå |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDæ¥è¯¢é¨é¨éå |
| | | * |
| | | * @param userId ç¨æ·id |
| | | * @return List<SysDepart> |
| | | */ |
| | | public List<SysDepart> queryUserDeparts(@Param("userId") String userId); |
| | | */ |
| | | public List<SysDepart> queryUserDeparts(@Param("userId") String userId); |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·åæ¥è¯¢é¨é¨ |
| | | * |
| | | * @param username |
| | | * @return |
| | | */ |
| | | public List<SysDepart> queryDepartsByUsername(@Param("username") String username); |
| | | /** |
| | | * æ ¹æ®ç¨æ·åæ¥è¯¢é¨é¨ |
| | | * |
| | | * @param username |
| | | * @return |
| | | */ |
| | | public List<SysDepart> queryDepartsByUsername(@Param("username") String username); |
| | | |
| | | /** |
| | | * éè¿é¨é¨ç¼ç è·åé¨é¨id |
| | | * |
| | | * @param orgCode é¨é¨ç¼ç |
| | | * @return String |
| | | */ |
| | | @Select("select id from sys_depart where org_code=#{orgCode}") |
| | | public String queryDepartIdByOrgCode(@Param("orgCode") String orgCode); |
| | | @Select("select id from sys_depart where org_code=#{orgCode}") |
| | | public String queryDepartIdByOrgCode(@Param("orgCode") String orgCode); |
| | | |
| | | /** |
| | | * éè¿é¨é¨id æ¥è¯¢é¨é¨id,ç¶id |
| | | * |
| | | * @param departId é¨é¨id |
| | | * @return |
| | | */ |
| | | @Select("select id,parent_id from sys_depart where id=#{departId}") |
| | | public SysDepart getParentDepartId(@Param("departId") String departId); |
| | | @Select("select id,parent_id from sys_depart where id=#{departId}") |
| | | public SysDepart getParentDepartId(@Param("departId") String departId); |
| | | |
| | | /** |
| | | * æ ¹æ®é¨é¨Idæ¥è¯¢,å½ååä¸çº§ææé¨é¨IDS |
| | | * @param departId |
| | | * @return |
| | | */ |
| | | List<String> getSubDepIdsByDepId(@Param("departId") String departId); |
| | | /** |
| | | * æ ¹æ®é¨é¨Idæ¥è¯¢,å½ååä¸çº§ææé¨é¨IDS |
| | | * |
| | | * @param departId |
| | | * @return |
| | | */ |
| | | List<String> getSubDepIdsByDepId(@Param("departId") String departId); |
| | | |
| | | /** |
| | | * æ ¹æ®é¨é¨ç¼ç è·åé¨é¨ä¸ææIDS |
| | | * @param orgCodes |
| | | * @return |
| | | */ |
| | | List<String> getSubDepIdsByOrgCodes(@org.apache.ibatis.annotations.Param("orgCodes") String[] orgCodes); |
| | | /** |
| | | * æ ¹æ®é¨é¨ç¼ç è·åé¨é¨ä¸ææIDS |
| | | * |
| | | * @param orgCodes |
| | | * @return |
| | | */ |
| | | List<String> getSubDepIdsByOrgCodes(@org.apache.ibatis.annotations.Param("orgCodes") String[] orgCodes); |
| | | |
| | | /** |
| | | * æ ¹æ®parent_idæ¥è¯¢ä¸çº§é¨é¨ |
| | | * |
| | | * @param parentId ç¶id |
| | | * @return List<SysDepart> |
| | | */ |
| | | List<SysDepart> queryTreeListByPid(@Param("parentId") String parentId); |
| | | /** |
| | | * æ ¹æ®idä¸çº§é¨é¨æ°é |
| | | * @param parentId |
| | | * @return |
| | | */ |
| | | @Select("SELECT count(*) FROM sys_depart where del_flag ='0' AND parent_id = #{parentId,jdbcType=VARCHAR}") |
| | | Integer queryCountByPid(@Param("parentId")String parentId); |
| | | /** |
| | | * æ ¹æ®OrgCodæ¥è¯¢æå±å
¬å¸ä¿¡æ¯ |
| | | * @param orgCode |
| | | * @return |
| | | */ |
| | | SysDepart queryCompByOrgCode(@Param("orgCode")String orgCode); |
| | | /** |
| | | * æ ¹æ®idä¸çº§é¨é¨ |
| | | * @param parentId |
| | | * @return |
| | | */ |
| | | @Select("SELECT * FROM sys_depart where del_flag ='0' AND parent_id = #{parentId,jdbcType=VARCHAR}") |
| | | List<SysDepart> queryDeptByPid(@Param("parentId")String parentId); |
| | | |
| | | /** |
| | | * æ ¹æ®idä¸çº§é¨é¨æ°é |
| | | * |
| | | * @param parentId |
| | | * @return |
| | | */ |
| | | @Select("SELECT count(*) FROM sys_depart where del_flag ='0' AND parent_id = #{parentId,jdbcType=VARCHAR}") |
| | | Integer queryCountByPid(@Param("parentId") String parentId); |
| | | |
| | | /** |
| | | * æ ¹æ®OrgCodæ¥è¯¢æå±å
¬å¸ä¿¡æ¯ |
| | | * |
| | | * @param orgCode |
| | | * @return |
| | | */ |
| | | SysDepart queryCompByOrgCode(@Param("orgCode") String orgCode); |
| | | |
| | | /** |
| | | * æ ¹æ®idä¸çº§é¨é¨ |
| | | * |
| | | * @param parentId |
| | | * @return |
| | | */ |
| | | @Select("SELECT * FROM sys_depart where del_flag ='0' AND parent_id = #{parentId,jdbcType=VARCHAR}") |
| | | List<SysDepart> queryDeptByPid(@Param("parentId") String parentId); |
| | | |
| | | List<SysDepart> getDepartListByParentId(List<String> parentIds); |
| | | |
| | | List<SelectTreeModel> getDepartTreeByParentId(String parentId); |
| | | List<SelectTreeModel> getDepartTreeByParentId(String parentId); |
| | | } |
| | |
| | | * @param userNames ç¨æ·åå表ï¼éç¡®ä¿éç©ºï¼ |
| | | */ |
| | | List<SysUser> selectUsersByNames(@Param("userNames") List<String> userNames); |
| | | |
| | | /** |
| | | * æ ¹æ®çç»Idæ¥è¯¢ç¨æ·ä¿¡æ¯ |
| | | * @param page |
| | | * @param groupId çç»id |
| | | * @param username ç¨æ·ç»å½è´¦æ· |
| | | * @return |
| | | */ |
| | | IPage<SysUser> getUserByGroupId(Page page, @Param("groupId") String groupId, @Param("username") String username); |
| | | } |
| | |
| | | </foreach> |
| | | and del_flag='0' |
| | | </select> |
| | | |
| | | <select id="getDepartTreeByParentId" parameterType="String" resultType="org.jeecg.common.system.vo.SelectTreeModel"> |
| | | select |
| | | id as "key", |
| | | depart_name as "title", |
| | | parent_id as parentId |
| | | from sys_depart |
| | | where parent_id = #{parentId} |
| | | and del_flag='0' |
| | | </select> |
| | | </mapper> |
| | |
| | | #{name} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <!-- æ ¹æ®çç»Idæ¥è¯¢ --> |
| | | <select id="getUserByGroupId" resultType="org.jeecg.modules.system.entity.SysUser"> |
| | | select * from sys_user where del_flag = 0 and id in (select user_id from base_user_group where group_id=#{groupId}) |
| | | <if test="username!=null and username!=''"> |
| | | and username = #{username} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | * @return ç¨æ·å->çå®å§åçæ å°ï¼ä¸å卿¶å¼ä¸ºnullï¼ |
| | | */ |
| | | Map<String, String> getUserRealNamesByUserNames(List<String> userNames); |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®çç»Idæ¥è¯¢ |
| | | * @param page |
| | | * @param groupId çç»id |
| | | * @param username ç¨æ·è´¦æ·åç§° |
| | | * @return |
| | | */ |
| | | IPage<SysUser> getUserByGroupId(Page<SysUser> page, String groupId, String username); |
| | | } |
| | |
| | | import org.jeecg.common.system.vo.*; |
| | | import org.jeecg.common.util.*; |
| | | import org.jeecg.common.util.dynamic.db.FreemarkerParseFactory; |
| | | import org.jeecg.modules.base.entity.Unit; |
| | | import org.jeecg.modules.base.service.IEnterpriseService; |
| | | import org.jeecg.modules.base.service.IUnitService; |
| | | import org.jeecg.modules.message.entity.SysMessageTemplate; |
| | | import org.jeecg.modules.message.handle.impl.DdSendMsgHandle; |
| | | import org.jeecg.modules.message.handle.impl.EmailSendMsgHandle; |
| | |
| | | @Autowired |
| | | private IDataVersionService dataVersionService; |
| | | |
| | | @Autowired |
| | | private IUnitService unitService; |
| | | @Autowired |
| | | private IEnterpriseService enterpriseService; |
| | | |
| | | |
| | | @Autowired |
| | |
| | | uploadRelaService.delSysUploadRelaByBusIdAndBusType(busId, busType); |
| | | } |
| | | |
| | | @Override |
| | | public String getUnitNameById(String unitId) { |
| | | Unit unit = unitService.getById(unitId); |
| | | String unitName = ""; |
| | | if(unit != null){ |
| | | unitName = unit.getName(); |
| | | } |
| | | return unitName; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public String queryDictTextByKey(String dictCode, String key) { |
| | |
| | | dataVersionService.removeById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ä¼ä¸IDè·åä¼ä¸åç§° |
| | | * |
| | | * @param enterpriseId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public String getEnterpriseNameById(String enterpriseId) { |
| | | String enterpriseName = enterpriseService.getById(enterpriseId).getName(); |
| | | return enterpriseName; |
| | | } |
| | | |
| | | @Override |
| | | public List<DataVersion> getLastDataVersion(String businessType, String enterpriseId, String isLastusable) { |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.catalina.User; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.constant.CacheConstant; |
| | |
| | | import org.jeecg.common.util.PasswordUtil; |
| | | import org.jeecg.common.util.UUIDGenerator; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.base.entity.UserFactory; |
| | | import org.jeecg.modules.base.mapper.UserFactoryMapper; |
| | | import org.jeecg.modules.base.service.BaseCommonService; |
| | | import org.jeecg.modules.system.entity.*; |
| | | import org.jeecg.modules.system.mapper.*; |
| | |
| | | @Autowired |
| | | SysRoleIndexMapper sysRoleIndexMapper; |
| | | @Resource |
| | | MdcUserProductionMapper mdcUserProductionMapper; |
| | | UserFactoryMapper userFactoryMapper; |
| | | @Resource |
| | | private ISysDictService sysDictService; |
| | | @Resource |
| | |
| | | // 2. å é¤ç¨æ·é¨é¨å
³ç³» |
| | | line += sysUserDepartMapper.delete(new LambdaQueryWrapper<SysUserDepart>().in(SysUserDepart::getUserId, userIds)); |
| | | // 3. å é¤ç¨æ·äº§çº¿å
³ç³» |
| | | line += mdcUserProductionMapper.delete(new LambdaQueryWrapper<MdcUserProduction>().in(MdcUserProduction::getUserId, userIds)); |
| | | line += userFactoryMapper.delete(new LambdaQueryWrapper<UserFactory>().in(UserFactory::getUserId, userIds)); |
| | | //3. å é¤ç¨æ·è§è²å
³ç³» |
| | | line += sysUserRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().in(SysUserRole::getUserId, userIds)); |
| | | //4.忥å é¤ç¬¬ä¸æ¹Appçç¨æ· |
| | |
| | | //step.4 ä¿åæå±äº§çº¿ |
| | | if (oConvertUtils.isNotEmpty(selectedProductions)) { |
| | | arr = selectedProductions.split(","); |
| | | for (String productionId : arr) { |
| | | MdcUserProduction mdcUserProduction = new MdcUserProduction(user.getId(), productionId); |
| | | mdcUserProductionMapper.insert(mdcUserProduction); |
| | | for (String factoryId : arr) { |
| | | UserFactory userFactory = new UserFactory(user.getId(), factoryId); |
| | | userFactoryMapper.insert(userFactory); |
| | | } |
| | | } |
| | | //step.5 ä¿åè®¾å¤æé |
| | |
| | | array = productions.split(","); |
| | | } |
| | | //å
å åå |
| | | mdcUserProductionMapper.delete(new QueryWrapper<MdcUserProduction>().lambda().eq(MdcUserProduction::getUserId, user.getId())); |
| | | userFactoryMapper.delete(new QueryWrapper<UserFactory>().lambda().eq(UserFactory::getUserId, user.getId())); |
| | | if (oConvertUtils.isNotEmpty(productions)) { |
| | | for (String productionId : array) { |
| | | MdcUserProduction mdcUserProduction = new MdcUserProduction(user.getId(), productionId); |
| | | mdcUserProductionMapper.insert(mdcUserProduction); |
| | | for (String factoryId : array) { |
| | | UserFactory userFactory = new UserFactory(user.getId(), factoryId); |
| | | userFactoryMapper.insert(userFactory); |
| | | } |
| | | } |
| | | //step.5 ä¿®æ¹è®¾å¤æé |
| | |
| | | (existing, replacement) -> existing // éå¤é®å¤ç |
| | | )); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®çç»Idæ¥è¯¢ |
| | | * @param page |
| | | * @param groupId çç»id |
| | | * @param username ç¨æ·è´¦æ·åç§° |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<SysUser> getUserByGroupId(Page<SysUser> page, String groupId, String username) { |
| | | return userMapper.getUserByGroupId(page,groupId,username); |
| | | } |
| | | } |
| | |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.system.entity.MdcProduction; |
| | | import org.jeecg.modules.system.model.MdcProductionTreeModel; |
| | | import org.jeecg.modules.system.model.ProductionIdModel; |
| | | import org.jeecg.modules.base.entity.Factory; |
| | | import org.jeecg.modules.base.model.FactoryTreeModel; |
| | | import org.jeecg.modules.base.model.FactoryIdModel; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | * queryTreeListçåæ¹æ³ ====1===== |
| | | * è¯¥æ¹æ³æ¯så°MdcProductionç±»åçlistéåè½¬æ¢æMdcProductionTreeModelç±»åçéå |
| | | */ |
| | | public static List<MdcProductionTreeModel> wrapTreeDataToTreeList(List<MdcProduction> recordList) { |
| | | List<ProductionIdModel> idList = new ArrayList<>(); |
| | | List<MdcProductionTreeModel> records = new ArrayList<>(); |
| | | public static List<FactoryTreeModel> wrapTreeDataToTreeList(List<Factory> recordList) { |
| | | List<FactoryIdModel> idList = new ArrayList<>(); |
| | | List<FactoryTreeModel> records = new ArrayList<>(); |
| | | for (int i = 0; i < recordList.size(); i++) { |
| | | MdcProduction mdcProduction = recordList.get(i); |
| | | if (StrUtil.isEmpty(mdcProduction.getDescription())){ |
| | | mdcProduction.setDescription(""); |
| | | } |
| | | records.add(new MdcProductionTreeModel(mdcProduction)); |
| | | Factory factory = recordList.get(i); |
| | | records.add(new FactoryTreeModel(factory)); |
| | | } |
| | | List<MdcProductionTreeModel> tree = findChildren(records, idList); |
| | | List<FactoryTreeModel> tree = findChildren(records, idList); |
| | | setEmptyChildrenAsNull(tree); |
| | | return tree; |
| | | } |
| | |
| | | * queryTreeListçåæ¹æ³ ====1===== |
| | | * è¯¥æ¹æ³æ¯æ¾å°å¹¶å°è£
顶级ç¶ç±»çèç¹å°TreeListéå |
| | | */ |
| | | public static List<MdcProductionTreeModel> findChildren(List<MdcProductionTreeModel> recordList, List<ProductionIdModel> productionIdList) { |
| | | List<MdcProductionTreeModel> treeList = new ArrayList<>(); |
| | | public static List<FactoryTreeModel> findChildren(List<FactoryTreeModel> recordList, List<FactoryIdModel> productionIdList) { |
| | | List<FactoryTreeModel> treeList = new ArrayList<>(); |
| | | for (int i = 0; i < recordList.size(); i++) { |
| | | MdcProductionTreeModel branch = recordList.get(i); |
| | | FactoryTreeModel branch = recordList.get(i); |
| | | if (oConvertUtils.isEmpty(branch.getParentId())) { |
| | | treeList.add(branch); |
| | | ProductionIdModel productionIdModel = new ProductionIdModel().convert(branch); |
| | | productionIdList.add(productionIdModel); |
| | | FactoryIdModel factoryIdModel = new FactoryIdModel().convert(branch); |
| | | productionIdList.add(factoryIdModel); |
| | | } |
| | | } |
| | | getGrandChildren(treeList, recordList, productionIdList); |
| | |
| | | * queryTreeListçåæ¹æ³====3==== |
| | | *è¯¥æ¹æ³æ¯æ¾å°é¡¶çº§ç¶ç±»ä¸çææåèç¹éåå¹¶å°è£
å°TreeListéå |
| | | */ |
| | | private static void getGrandChildren(List<MdcProductionTreeModel> treeList, List<MdcProductionTreeModel> recordList, List<ProductionIdModel> idList) { |
| | | private static void getGrandChildren(List<FactoryTreeModel> treeList, List<FactoryTreeModel> recordList, List<FactoryIdModel> idList) { |
| | | for (int i = 0; i < treeList.size(); i++) { |
| | | MdcProductionTreeModel model = treeList.get(i); |
| | | ProductionIdModel idModel = idList.get(i); |
| | | FactoryTreeModel model = treeList.get(i); |
| | | FactoryIdModel idModel = idList.get(i); |
| | | for (int i1 = 0; i1 < recordList.size(); i1++) { |
| | | MdcProductionTreeModel m = recordList.get(i1); |
| | | FactoryTreeModel m = recordList.get(i1); |
| | | if (m.getParentId() != null && m.getParentId().equals(model.getId())) { |
| | | model.getChildren().add(m); |
| | | ProductionIdModel pim = new ProductionIdModel().convert(m); |
| | | FactoryIdModel pim = new FactoryIdModel().convert(m); |
| | | idModel.setSelectable(false); |
| | | idModel.getChildren().add(pim); |
| | | } |
| | |
| | | * queryTreeListçåæ¹æ³ ====4==== |
| | | * è¯¥æ¹æ³æ¯å°åèç¹ä¸ºç©ºçListéå设置为Nullå¼ |
| | | */ |
| | | private static void setEmptyChildrenAsNull(List<MdcProductionTreeModel> treeList) { |
| | | private static void setEmptyChildrenAsNull(List<FactoryTreeModel> treeList) { |
| | | for (int i = 0; i < treeList.size(); i++) { |
| | | MdcProductionTreeModel model = treeList.get(i); |
| | | FactoryTreeModel model = treeList.get(i); |
| | | if (model.getChildren().size() == 0) { |
| | | model.setChildren(null); |
| | | model.setLeaf(true); |
| | |
| | | /** |
| | | * è·å DepartIdModel |
| | | */ |
| | | public static List<ProductionIdModel> wrapTreeDataToProductionIdTreeList(List<MdcProduction> recordList) { |
| | | List<ProductionIdModel> idList = new ArrayList<>(); |
| | | List<MdcProductionTreeModel> records = new ArrayList<>(); |
| | | public static List<FactoryIdModel> wrapTreeDataToProductionIdTreeList(List<Factory> recordList) { |
| | | List<FactoryIdModel> idList = new ArrayList<>(); |
| | | List<FactoryTreeModel> records = new ArrayList<>(); |
| | | for (int i = 0; i < recordList.size(); i++) { |
| | | MdcProduction mdcProduction = recordList.get(i); |
| | | records.add(new MdcProductionTreeModel(mdcProduction)); |
| | | Factory factory = recordList.get(i); |
| | | records.add(new FactoryTreeModel(factory)); |
| | | } |
| | | findChildren(records, idList); |
| | | return idList; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.system.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: çç»äººåvo |
| | | * @author: jeecg-boot |
| | | */ |
| | | @Data |
| | | public class SysUserGroupVO implements Serializable{ |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**çç»id*/ |
| | | private String groupId; |
| | | /**对åºçç¨æ·idéå*/ |
| | | private List<String> userIdList; |
| | | |
| | | public SysUserGroupVO() { |
| | | super(); |
| | | } |
| | | |
| | | public SysUserGroupVO(String groupId, List<String> userIdList) { |
| | | super(); |
| | | this.groupId = groupId; |
| | | this.userIdList = userIdList; |
| | | } |
| | | |
| | | } |
| | |
| | | is_verify_token: true |
| | | #å¿
é¡»æ ¡éªæ¹æ³ |
| | | verify_methods: remove,delete,save,add,update |
| | | #xxl-jobé
ç½® |
| | | xxljob: |
| | | enabled: false |
| | | adminAddresses: http://127.0.0.1:9080/xxl-job-admin |
| | | appname: ${spring.application.name} |
| | | accessToken: '' |
| | | address: 127.0.0.1:30007 |
| | | ip: 127.0.0.1 |
| | | port: 30007 |
| | | logPath: logs/jeecg/job/jobhandler/ |
| | | logRetentionDays: 30 |
| | | #åå¸å¼éé
ç½® |
| | | redisson: |
| | | address: 127.0.0.1:6379 |
| | |
| | | namespace: http://service.server.webservice.example.com |
| | | statusMethod: equipmentStatus |
| | | rateMethod: equipmentRate |
| | | #æä»¶ä¸ä¼ ç®å½ï¼æ³¨æLinuxåWindowsä¸çç®å½ç»æä¸åï¼ |
| | | #file.uploadFolder=/root/uploadFiles/ |
| | | #fileHomePath: ${UPLOAD_FOLDER:/jar/lxzn_storage} |
| | | #fileNCPath: ${NC_FOLDER:/jar/NC} # NCæä»¶ä½ç½® |
| | | fileHomePath: ${UPLOAD_FOLDER:d://lxzn_storage} |
| | | fileNCPath: ${NC_FOLDER:D://NC} # NCæä»¶ä½ç½® |
| | | ncSend: |
| | | addOrDelete: false #//æ¯å¦å é¤seed ä¸çä¹åæä»¶ |
| | | #staticAccessPath: /api/ffile/** # å½å项ç®çéæèµæºè®¿é®é
ç½®å¨nginxä¸ |
| | | #å·¥æ§ç½/æ¶å¯ç½é¨ç½²ç¸å
³é
ç½®------------éè¿å
çææ¸¡ |
| | | deploy: |
| | | #å·¥æ§ç½/æ¶å¯ç½é¨ç½² 0为æ¶å¯ç½ 1为工æ§ç½ |
| | | deployType: 0 |
| | | #æ¶å¯ç½ä¼ è¾ncæä»¶å¤¹ |
| | | secretFolder: D:\\opt |
| | | #å·¥æ§ç½çæ§ncæä»¶å¤¹ |
| | | workFolder: D:\\opt |
| | | # SAP RFCæ¹å¼æ¥å£éæ |
| | | sap: |
| | | rfc: |
| | | destination: SAP_RFC_DEST # èªå®ä¹çç®æ å°å RFC ç®æ åç§° |
| | |
| | | connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 |
| | | datasource: |
| | | master: |
| | | url: jdbc:sqlserver://localhost:1433;databasename=LXZN_TEST_COMMON |
| | | url: jdbc:sqlserver://localhost:1433;databasename=LXZN_TEST_XHJ |
| | | username: sa |
| | | password: 123 |
| | | driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | |
| | | is_verify_token: true |
| | | #å¿
é¡»æ ¡éªæ¹æ³ |
| | | verify_methods: remove,delete,save,add,update |
| | | #xxl-jobé
ç½® |
| | | xxljob: |
| | | enabled: false |
| | | adminAddresses: http://127.0.0.1:9080/xxl-job-admin |
| | | appname: ${spring.application.name} |
| | | accessToken: '' |
| | | address: 127.0.0.1:30007 |
| | | ip: 127.0.0.1 |
| | | port: 30007 |
| | | logPath: logs/jeecg/job/jobhandler/ |
| | | logRetentionDays: 30 |
| | | #åå¸å¼éé
ç½® |
| | | redisson: |
| | | address: 127.0.0.1:6379 |
| | |
| | | client-id: ?? |
| | | # appSecret |
| | | client-secret: ?? |
| | | agent-id: ?? |
| | | agent-id: ?? |
| | | # SAP RFCæ¹å¼æ¥å£éæ |
| | | sap: |
| | | rfc: |
| | | destination: SAP_RFC_DEST # èªå®ä¹çç®æ å°å RFC ç®æ åç§° |
| | | ashost: 10.101.0.188 # SAP 主æºå°å |
| | | sysnr: '00' # ç³»ç»ç¼å· |
| | | client: 800 # 客æ·ç«¯ç¼å· |
| | | user: SLSAP_JK # ç¨æ·å |
| | | passwd: 112233 # å¯ç |
| | | lang: ZH # è¯è¨ |
| | | poolSize: 5 # çº¿ç¨æ± æ°é |
| | | expirationTime: 10000 # è¿ææ¶é´ |
| | | peekLimit: 10 # å³°å¼ |
| | |
| | | is_verify_token: true |
| | | #å¿
é¡»æ ¡éªæ¹æ³ |
| | | verify_methods: remove,delete,save,add,update |
| | | #xxl-jobé
ç½® |
| | | xxljob: |
| | | enabled: false |
| | | adminAddresses: http://127.0.0.1:9080/xxl-job-admin |
| | | appname: ${spring.application.name} |
| | | accessToken: '' |
| | | address: 127.0.0.1:30007 |
| | | ip: 127.0.0.1 |
| | | port: 30007 |
| | | logPath: logs/jeecg/job/jobhandler/ |
| | | logRetentionDays: 30 |
| | | #åå¸å¼éé
ç½® |
| | | redisson: |
| | | address: 127.0.0.1:6379 |
| | |
| | | application: |
| | | name: jeecg-system |
| | | profiles: |
| | | # active: '@profile.name@' |
| | | active: dev |
| | | active: '@profile.name@' |
| | | # active: dev |
| | |
| | | |
| | | #SQLServer2005\u4ee5\u4e0a |
| | | diver_name=org.hibernate.dialect.SQLServerDialect |
| | | url=jdbc:sqlserver://192.168.1.118:1433;DatabaseName=LXZN_TEST_HANGYU |
| | | url=jdbc:sqlserver://192.168.1.118:1433;DatabaseName=LXZN_TEST_XHJ |
| | | username=sa |
| | | password=123 |
| | | database_name=LXZN_TEST_HANGYU |
| | | database_name=LXZN_TEST_XHJ |