| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | 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.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.entity.EamPrecisionParameters; |
| | | import org.jeecg.modules.eam.service.IEamPrecisionParametersService; |
| | | import java.util.Date; |
| | | 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.common.system.base.controller.JeecgController; |
| | | 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.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 lombok.extern.slf4j.Slf4j; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.modules.eam.entity.EamPrecisionParameters; |
| | | import org.jeecg.modules.eam.service.IEamPrecisionParametersService; |
| | | import org.jeecg.modules.system.service.ISysBusinessCodeRuleService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * @Description: 精度参数维护 |
| | |
| | | public class EamPrecisionParametersController extends JeecgController<EamPrecisionParameters, IEamPrecisionParametersService> { |
| | | @Autowired |
| | | private IEamPrecisionParametersService eamPrecisionParametersService; |
| | | |
| | | @Autowired |
| | | private ISysBusinessCodeRuleService businessCodeRuleService; |
| | | |
| | | /** |
| | | * 分页列表查询 |
| | |
| | | HttpServletRequest req) { |
| | | QueryWrapper<EamPrecisionParameters> queryWrapper = QueryGenerator.initQueryWrapper(eamPrecisionParameters, req.getParameterMap()); |
| | | Page<EamPrecisionParameters> page = new Page<EamPrecisionParameters>(pageNo, pageSize); |
| | | queryWrapper.eq("del_flag", CommonConstant.DEL_FLAG_0); |
| | | IPage<EamPrecisionParameters> pageList = eamPrecisionParametersService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | |
| | | @ApiOperation(value="精度参数维护-添加", notes="精度参数维护-添加") |
| | | @PostMapping(value = "/add") |
| | | public Result<?> add(@RequestBody EamPrecisionParameters eamPrecisionParameters) { |
| | | String codeSeq = businessCodeRuleService.generateBusinessCodeSeq("PrecisionParametersRule"); |
| | | eamPrecisionParameters.setParameterCode(codeSeq); |
| | | eamPrecisionParameters.setDelFlag(CommonConstant.DEL_FLAG_0); |
| | | eamPrecisionParametersService.save(eamPrecisionParameters); |
| | | return Result.OK("添加成功!"); |
| | | } |