diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/broad/MouthController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/broad/MouthController.java index 948adaf..b492974 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/broad/MouthController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/broad/MouthController.java @@ -3,10 +3,8 @@ package com.ruoyi.web.controller.broad; import com.alibaba.fastjson.JSONArray; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.system.domain.BasePictureLocation; -import com.ruoyi.system.service.IBaseNumberQaService; -import com.ruoyi.system.service.IBasePictureLocationService; -import com.ruoyi.system.service.IBaseUserManyiduService; -import com.ruoyi.system.service.IBroadDataService; +import com.ruoyi.system.domain.BaseQi; +import com.ruoyi.system.service.*; import io.swagger.annotations.ApiOperation; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; @@ -37,14 +35,14 @@ public class MouthController { @ResponseBody public String yue_selectProductInStore() { // IMOS_PR_PRODUCT_BARCODE - return JSONArray.toJSONString( service.yue_selectProductInStore()); + return JSONArray.toJSONString(service.yue_selectProductInStore()); } @PostMapping("/selectUserSatisfaction") @ApiOperation("用户满意度") public String yue_selectUserSatisfaction() { // IMOS_PR_PRODUCT_BARCODE - return JSONArray.toJSONString( baseUserManyiduService.yue_selectUserSatisfaction()); + return JSONArray.toJSONString(baseUserManyiduService.yue_selectUserSatisfaction()); } @Autowired @@ -56,22 +54,34 @@ public class MouthController { */ @PostMapping("/selectHighlightProducts") @ApiOperation("亮点产品") - public String yue_selectHighlightProducts() { - return JSONArray.toJSONString(basePictureLocationService.selectBasePictureLocationList(null)); + public String yue_selectHighlightProducts() { + return JSONArray.toJSONString(basePictureLocationService.selectBasePictureLocationList(null)); } @PostMapping("/selectMonthQANumber") @ApiOperation("查询本月异常分布") - private String yue_selectMonthQANumber(){ + private String yue_selectMonthQANumber() { return JSONArray.toJSONString(service.yue_selectMonthQANumber()); } @Autowired private IBaseNumberQaService baseNumberQaService; + @PostMapping("/selectMonthNumberQaS") @ApiOperation("数字化安全") - private String selectMonthNumberQaS(){ + private String selectMonthNumberQaS() { return JSONArray.toJSONString(baseNumberQaService.selectMonthNumberQaS()); } + + @Autowired + private IBaseQiService baseQiService; + + @PostMapping("/selectBaseQilist") + @ApiOperation("品质提升") + public String BaseQilist() { + + return JSONArray.toJSONString(baseQiService.selectBaseQiList1()); + } + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseQiController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseQiController.java new file mode 100644 index 0000000..92153a0 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseQiController.java @@ -0,0 +1,127 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.BaseQi; +import com.ruoyi.system.service.IBaseQiService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 月看板-品质提升维护Controller + * + * @author ruoyi + * @date 2022-07-28 + */ +@Controller +@RequestMapping("/system/base_qi") +public class BaseQiController extends BaseController +{ + private String prefix = "system/base_qi"; + + @Autowired + private IBaseQiService baseQiService; + + @RequiresPermissions("system:base_qi:view") + @GetMapping() + public String base_qi() + { + return prefix + "/base_qi"; + } + + /** + * 查询月看板-品质提升维护列表 + */ + @RequiresPermissions("system:base_qi:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(BaseQi baseQi) + { + startPage(); + List list = baseQiService.selectBaseQiList(baseQi); + return getDataTable(list); + } + + /** + * 导出月看板-品质提升维护列表 + */ + @RequiresPermissions("system:base_qi:export") + @Log(title = "月看板-品质提升维护", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(BaseQi baseQi) + { + List list = baseQiService.selectBaseQiList(baseQi); + ExcelUtil util = new ExcelUtil(BaseQi.class); + return util.exportExcel(list, "月看板-品质提升维护数据"); + } + + /** + * 新增月看板-品质提升维护 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存月看板-品质提升维护 + */ + @RequiresPermissions("system:base_qi:add") + @Log(title = "月看板-品质提升维护", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(BaseQi baseQi) + { + return toAjax(baseQiService.insertBaseQi(baseQi)); + } + + /** + * 修改月看板-品质提升维护 + */ + @RequiresPermissions("system:base_qi:edit") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Long id, ModelMap mmap) + { + BaseQi baseQi = baseQiService.selectBaseQiById(id); + mmap.put("baseQi", baseQi); + return prefix + "/edit"; + } + + /** + * 修改保存月看板-品质提升维护 + */ + @RequiresPermissions("system:base_qi:edit") + @Log(title = "月看板-品质提升维护", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(BaseQi baseQi) + { + return toAjax(baseQiService.updateBaseQi(baseQi)); + } + + /** + * 删除月看板-品质提升维护 + */ + @RequiresPermissions("system:base_qi:remove") + @Log(title = "月看板-品质提升维护", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(baseQiService.deleteBaseQiByIds(ids)); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseQi.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseQi.java new file mode 100644 index 0000000..fbc5176 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseQi.java @@ -0,0 +1,88 @@ +package com.ruoyi.system.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 月看板-品质提升维护对象 base_qi + * + * @author ruoyi + * @date 2022-07-28 + */ +public class BaseQi extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 年份 */ + @Excel(name = "年份") + private Long yearName; + + /** 提升度 */ + @Excel(name = "提升度") + private double rate; + + /** 名称 */ + @Excel(name = "名称") + private Long type; + private String typeName; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setYearName(Long yearName) + { + this.yearName = yearName; + } + + public Long getYearName() + { + return yearName; + } + public void setRate(double rate) + { + this.rate = rate; + } + + public double getRate() + { + return rate; + } + public void setType(Long type) + { + this.type = type; + } + + public Long getType() + { + return type; + } + + public String getTypeName() { + return typeName; + } + + public void setTypeName(String typeName) { + this.typeName = typeName; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("yearName", getYearName()) + .append("rate", getRate()) + .append("type", getType()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseQiMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseQiMapper.java new file mode 100644 index 0000000..3d3d4e5 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseQiMapper.java @@ -0,0 +1,63 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.BaseQi; + +/** + * 月看板-品质提升维护Mapper接口 + * + * @author ruoyi + * @date 2022-07-28 + */ +public interface BaseQiMapper +{ + /** + * 查询月看板-品质提升维护 + * + * @param id 月看板-品质提升维护主键 + * @return 月看板-品质提升维护 + */ + public BaseQi selectBaseQiById(Long id); + + /** + * 查询月看板-品质提升维护列表 + * + * @param baseQi 月看板-品质提升维护 + * @return 月看板-品质提升维护集合 + */ + public List selectBaseQiList(BaseQi baseQi); + + /** + * 新增月看板-品质提升维护 + * + * @param baseQi 月看板-品质提升维护 + * @return 结果 + */ + public int insertBaseQi(BaseQi baseQi); + + /** + * 修改月看板-品质提升维护 + * + * @param baseQi 月看板-品质提升维护 + * @return 结果 + */ + public int updateBaseQi(BaseQi baseQi); + + /** + * 删除月看板-品质提升维护 + * + * @param id 月看板-品质提升维护主键 + * @return 结果 + */ + public int deleteBaseQiById(Long id); + + /** + * 批量删除月看板-品质提升维护 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBaseQiByIds(String[] ids); + + List selectBaseQiList1(); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseQiService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseQiService.java new file mode 100644 index 0000000..4912446 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseQiService.java @@ -0,0 +1,63 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.BaseQi; + +/** + * 月看板-品质提升维护Service接口 + * + * @author ruoyi + * @date 2022-07-28 + */ +public interface IBaseQiService +{ + /** + * 查询月看板-品质提升维护 + * + * @param id 月看板-品质提升维护主键 + * @return 月看板-品质提升维护 + */ + public BaseQi selectBaseQiById(Long id); + + /** + * 查询月看板-品质提升维护列表 + * + * @param baseQi 月看板-品质提升维护 + * @return 月看板-品质提升维护集合 + */ + public List selectBaseQiList(BaseQi baseQi); + + /** + * 新增月看板-品质提升维护 + * + * @param baseQi 月看板-品质提升维护 + * @return 结果 + */ + public int insertBaseQi(BaseQi baseQi); + + /** + * 修改月看板-品质提升维护 + * + * @param baseQi 月看板-品质提升维护 + * @return 结果 + */ + public int updateBaseQi(BaseQi baseQi); + + /** + * 批量删除月看板-品质提升维护 + * + * @param ids 需要删除的月看板-品质提升维护主键集合 + * @return 结果 + */ + public int deleteBaseQiByIds(String ids); + + /** + * 删除月看板-品质提升维护信息 + * + * @param id 月看板-品质提升维护主键 + * @return 结果 + */ + public int deleteBaseQiById(Long id); + + List selectBaseQiList1(); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseQiServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseQiServiceImpl.java new file mode 100644 index 0000000..48039c8 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseQiServiceImpl.java @@ -0,0 +1,99 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.BaseQiMapper; +import com.ruoyi.system.domain.BaseQi; +import com.ruoyi.system.service.IBaseQiService; +import com.ruoyi.common.core.text.Convert; + +/** + * 月看板-品质提升维护Service业务层处理 + * + * @author ruoyi + * @date 2022-07-28 + */ +@Service +public class BaseQiServiceImpl implements IBaseQiService +{ + @Autowired + private BaseQiMapper baseQiMapper; + + /** + * 查询月看板-品质提升维护 + * + * @param id 月看板-品质提升维护主键 + * @return 月看板-品质提升维护 + */ + @Override + public BaseQi selectBaseQiById(Long id) + { + return baseQiMapper.selectBaseQiById(id); + } + + /** + * 查询月看板-品质提升维护列表 + * + * @param baseQi 月看板-品质提升维护 + * @return 月看板-品质提升维护 + */ + @Override + public List selectBaseQiList(BaseQi baseQi) + { + return baseQiMapper.selectBaseQiList(baseQi); + } + + /** + * 新增月看板-品质提升维护 + * + * @param baseQi 月看板-品质提升维护 + * @return 结果 + */ + @Override + public int insertBaseQi(BaseQi baseQi) + { + return baseQiMapper.insertBaseQi(baseQi); + } + + /** + * 修改月看板-品质提升维护 + * + * @param baseQi 月看板-品质提升维护 + * @return 结果 + */ + @Override + public int updateBaseQi(BaseQi baseQi) + { + return baseQiMapper.updateBaseQi(baseQi); + } + + /** + * 批量删除月看板-品质提升维护 + * + * @param ids 需要删除的月看板-品质提升维护主键 + * @return 结果 + */ + @Override + public int deleteBaseQiByIds(String ids) + { + return baseQiMapper.deleteBaseQiByIds(Convert.toStrArray(ids)); + } + + /** + * 删除月看板-品质提升维护信息 + * + * @param id 月看板-品质提升维护主键 + * @return 结果 + */ + @Override + public int deleteBaseQiById(Long id) + { + return baseQiMapper.deleteBaseQiById(id); + } + + @Override + public List selectBaseQiList1() { + return baseQiMapper.selectBaseQiList1(); + } +} diff --git a/ruoyi-system/src/main/resources/createsql/base_qiMenu.sql b/ruoyi-system/src/main/resources/createsql/base_qiMenu.sql new file mode 100644 index 0000000..51d9c81 --- /dev/null +++ b/ruoyi-system/src/main/resources/createsql/base_qiMenu.sql @@ -0,0 +1,27 @@ +-- 菜单 SQL +insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values(2105, '月看板-品质提升维护', '5', '1', '/system/base_qi', 'C', '0', 'system:base_qi:view', '#', 'admin', sysdate, '', null, '月看板-品质提升维护菜单'); + +-- 按钮 SQL +insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values(seq_sys_menu.nextval, '月看板-品质提升维护查询', 2105, '1', '#', 'F', '0', 'system:base_qi:list', '#', 'admin', sysdate, '', null, ''); + +insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values(seq_sys_menu.nextval, '月看板-品质提升维护新增', 2105, '2', '#', 'F', '0', 'system:base_qi:add', '#', 'admin', sysdate, '', null, ''); + +insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values(seq_sys_menu.nextval, '月看板-品质提升维护修改', 2105, '3', '#', 'F', '0', 'system:base_qi:edit', '#', 'admin', sysdate, '', null, ''); + +insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values(seq_sys_menu.nextval, '月看板-品质提升维护删除', 2105, '4', '#', 'F', '0', 'system:base_qi:remove', '#', 'admin', sysdate, '', null, ''); + +insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values(seq_sys_menu.nextval, '月看板-品质提升维护导出', 2105, '5', '#', 'F', '0', 'system:base_qi:export', '#', 'admin', sysdate, '', null, ''); + +-- base_qi主键序列 +create sequence seq_base_qi +increment by 1 +start with 10 +nomaxvalue +nominvalue +cache 20; diff --git a/ruoyi-system/src/main/resources/mapper/system/BaseQiMapper.xml b/ruoyi-system/src/main/resources/mapper/system/BaseQiMapper.xml new file mode 100644 index 0000000..09af041 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/BaseQiMapper.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + select id, year_name, rate, type from base_qi + + + + + + + + + + SELECT seq_base_qi.NEXTVAL as id FROM DUAL + + insert into base_qi + + id, + year_name, + rate, + type, + + + #{id}, + #{yearName}, + #{rate}, + #{type}, + + + + + update base_qi + + year_name = #{yearName}, + rate = #{rate}, + type = #{type}, + + where id = #{id} + + + + delete from base_qi where id = #{id} + + + + delete from base_qi where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/base_qi/add.html b/ruoyi-system/src/main/resources/templates/system/base_qi/add.html new file mode 100644 index 0000000..715c239 --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/base_qi/add.html @@ -0,0 +1,45 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/base_qi/base_qi.html b/ruoyi-system/src/main/resources/templates/system/base_qi/base_qi.html new file mode 100644 index 0000000..9bdf76e --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/base_qi/base_qi.html @@ -0,0 +1,105 @@ + + + + + + +
+
+
+
+
+ +
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/base_qi/edit.html b/ruoyi-system/src/main/resources/templates/system/base_qi/edit.html new file mode 100644 index 0000000..9624b95 --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/base_qi/edit.html @@ -0,0 +1,46 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file