diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 6a5fe28..02b2fdf 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,8 +6,8 @@ spring: druid: # 主库数据源 master: - url: jdbc:oracle:thin:@124.70.0.226:1521:ORCL - username: C##USERNAME + url: jdbc:oracle:thin:@10.100.70.5:1521:aucma + username: haiwei password: 123456 # 从库数据源 slave: @@ -17,11 +17,11 @@ spring: username: imos password: imos # 初始连接数 - initialSize: 5 + initialSize: 3 # 最小连接池数量 - minIdle: 10 + minIdle: 3 # 最大连接池数量 - maxActive: 20 + maxActive: 6 # 配置获取连接等待超时的时间 maxWait: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 diff --git a/ruoyi-admin/src/main/resources/templates/system/base_plan/add.html b/ruoyi-admin/src/main/resources/templates/system/base_plan/add.html new file mode 100644 index 0000000..c090fdd --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/base_plan/add.html @@ -0,0 +1,31 @@ + + + + + + +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/base_plan/base_plan.html b/ruoyi-admin/src/main/resources/templates/system/base_plan/base_plan.html new file mode 100644 index 0000000..57fc92e --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/base_plan/base_plan.html @@ -0,0 +1,90 @@ + + + + + + +
+
+
+
+
+ +
+
+
+ +
+ + + + + 修改 + + + + + + + +
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/base_plan/edit.html b/ruoyi-admin/src/main/resources/templates/system/base_plan/edit.html new file mode 100644 index 0000000..3a5375b --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/base_plan/edit.html @@ -0,0 +1,32 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseBoxPlanController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseBoxPlanController.java new file mode 100644 index 0000000..60abfd7 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseBoxPlanController.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.BaseBoxPlan; +import com.ruoyi.system.service.IBaseBoxPlanService; +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-15 + */ +@Controller +@RequestMapping("/system/base_plan") +public class BaseBoxPlanController extends BaseController +{ + private String prefix = "system/base_plan"; + + @Autowired + private IBaseBoxPlanService baseBoxPlanService; + + @RequiresPermissions("system:base_plan:view") + @GetMapping() + public String base_plan() + { + return prefix + "/base_plan"; + } + + /** + * 查询箱壳计划数量维护列表 + */ + @RequiresPermissions("system:base_plan:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(BaseBoxPlan baseBoxPlan) + { + startPage(); + List list = baseBoxPlanService.selectBaseBoxPlanList(baseBoxPlan); + return getDataTable(list); + } + + /** + * 导出箱壳计划数量维护列表 + */ + @RequiresPermissions("system:base_plan:export") + @Log(title = "箱壳计划数量维护", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(BaseBoxPlan baseBoxPlan) + { + List list = baseBoxPlanService.selectBaseBoxPlanList(baseBoxPlan); + ExcelUtil util = new ExcelUtil(BaseBoxPlan.class); + return util.exportExcel(list, "箱壳计划数量维护数据"); + } + + /** + * 新增箱壳计划数量维护 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存箱壳计划数量维护 + */ + @RequiresPermissions("system:base_plan:add") + @Log(title = "箱壳计划数量维护", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(BaseBoxPlan baseBoxPlan) + { + return toAjax(baseBoxPlanService.insertBaseBoxPlan(baseBoxPlan)); + } + + /** + * 修改箱壳计划数量维护 + */ + @RequiresPermissions("system:base_plan:edit") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Long id, ModelMap mmap) + { + BaseBoxPlan baseBoxPlan = baseBoxPlanService.selectBaseBoxPlanById(id); + mmap.put("baseBoxPlan", baseBoxPlan); + return prefix + "/edit"; + } + + /** + * 修改保存箱壳计划数量维护 + */ + @RequiresPermissions("system:base_plan:edit") + @Log(title = "箱壳计划数量维护", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(BaseBoxPlan baseBoxPlan) + { + return toAjax(baseBoxPlanService.updateBaseBoxPlan(baseBoxPlan)); + } + + /** + * 删除箱壳计划数量维护 + */ + @RequiresPermissions("system:base_plan:remove") + @Log(title = "箱壳计划数量维护", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(baseBoxPlanService.deleteBaseBoxPlanByIds(ids)); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseBoxPlan.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseBoxPlan.java new file mode 100644 index 0000000..bbdb5a6 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseBoxPlan.java @@ -0,0 +1,52 @@ +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_box_plan + * + * @author ruoyi + * @date 2022-07-15 + */ +public class BaseBoxPlan extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 计划数量 */ + @Excel(name = "计划数量") + private String planNumber; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setPlanNumber(String planNumber) + { + this.planNumber = planNumber; + } + + public String getPlanNumber() + { + return planNumber; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("planNumber", getPlanNumber()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/FPStationHourInfo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/FPStationHourInfo.java index 77a6455..d36c6f6 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/FPStationHourInfo.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/FPStationHourInfo.java @@ -5,8 +5,8 @@ package com.ruoyi.system.domain; * @date 2022/7/14 16:06 */ public class FPStationHourInfo { - private String name, station_no, plan_number, qty, rate, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, h12; - + private String name, station_no, plan_number, qty, rate, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, h12,status; + private int target; public String getName() { return name; } @@ -19,6 +19,22 @@ public class FPStationHourInfo { return station_no; } + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public int getTarget() { + return target; + } + + public void setTarget(int target) { + this.target = target; + } + public void setStation_no(String station_no) { this.station_no = station_no; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseBoxPlanMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseBoxPlanMapper.java new file mode 100644 index 0000000..c991e74 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseBoxPlanMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.BaseBoxPlan; + +/** + * 箱壳计划数量维护Mapper接口 + * + * @author ruoyi + * @date 2022-07-15 + */ +public interface BaseBoxPlanMapper +{ + /** + * 查询箱壳计划数量维护 + * + * @param id 箱壳计划数量维护主键 + * @return 箱壳计划数量维护 + */ + public BaseBoxPlan selectBaseBoxPlanById(Long id); + + /** + * 查询箱壳计划数量维护列表 + * + * @param baseBoxPlan 箱壳计划数量维护 + * @return 箱壳计划数量维护集合 + */ + public List selectBaseBoxPlanList(BaseBoxPlan baseBoxPlan); + + /** + * 新增箱壳计划数量维护 + * + * @param baseBoxPlan 箱壳计划数量维护 + * @return 结果 + */ + public int insertBaseBoxPlan(BaseBoxPlan baseBoxPlan); + + /** + * 修改箱壳计划数量维护 + * + * @param baseBoxPlan 箱壳计划数量维护 + * @return 结果 + */ + public int updateBaseBoxPlan(BaseBoxPlan baseBoxPlan); + + /** + * 删除箱壳计划数量维护 + * + * @param id 箱壳计划数量维护主键 + * @return 结果 + */ + public int deleteBaseBoxPlanById(Long id); + + /** + * 批量删除箱壳计划数量维护 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBaseBoxPlanByIds(String[] ids); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseBoxPlanService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseBoxPlanService.java new file mode 100644 index 0000000..951c721 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseBoxPlanService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.BaseBoxPlan; + +/** + * 箱壳计划数量维护Service接口 + * + * @author ruoyi + * @date 2022-07-15 + */ +public interface IBaseBoxPlanService +{ + /** + * 查询箱壳计划数量维护 + * + * @param id 箱壳计划数量维护主键 + * @return 箱壳计划数量维护 + */ + public BaseBoxPlan selectBaseBoxPlanById(Long id); + + /** + * 查询箱壳计划数量维护列表 + * + * @param baseBoxPlan 箱壳计划数量维护 + * @return 箱壳计划数量维护集合 + */ + public List selectBaseBoxPlanList(BaseBoxPlan baseBoxPlan); + + /** + * 新增箱壳计划数量维护 + * + * @param baseBoxPlan 箱壳计划数量维护 + * @return 结果 + */ + public int insertBaseBoxPlan(BaseBoxPlan baseBoxPlan); + + /** + * 修改箱壳计划数量维护 + * + * @param baseBoxPlan 箱壳计划数量维护 + * @return 结果 + */ + public int updateBaseBoxPlan(BaseBoxPlan baseBoxPlan); + + /** + * 批量删除箱壳计划数量维护 + * + * @param ids 需要删除的箱壳计划数量维护主键集合 + * @return 结果 + */ + public int deleteBaseBoxPlanByIds(String ids); + + /** + * 删除箱壳计划数量维护信息 + * + * @param id 箱壳计划数量维护主键 + * @return 结果 + */ + public int deleteBaseBoxPlanById(Long id); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseBoxPlanServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseBoxPlanServiceImpl.java new file mode 100644 index 0000000..a8de1b0 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseBoxPlanServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.BaseBoxPlanMapper; +import com.ruoyi.system.domain.BaseBoxPlan; +import com.ruoyi.system.service.IBaseBoxPlanService; +import com.ruoyi.common.core.text.Convert; + +/** + * 箱壳计划数量维护Service业务层处理 + * + * @author ruoyi + * @date 2022-07-15 + */ +@Service +public class BaseBoxPlanServiceImpl implements IBaseBoxPlanService +{ + @Autowired + private BaseBoxPlanMapper baseBoxPlanMapper; + + /** + * 查询箱壳计划数量维护 + * + * @param id 箱壳计划数量维护主键 + * @return 箱壳计划数量维护 + */ + @Override + public BaseBoxPlan selectBaseBoxPlanById(Long id) + { + return baseBoxPlanMapper.selectBaseBoxPlanById(id); + } + + /** + * 查询箱壳计划数量维护列表 + * + * @param baseBoxPlan 箱壳计划数量维护 + * @return 箱壳计划数量维护 + */ + @Override + public List selectBaseBoxPlanList(BaseBoxPlan baseBoxPlan) + { + return baseBoxPlanMapper.selectBaseBoxPlanList(baseBoxPlan); + } + + /** + * 新增箱壳计划数量维护 + * + * @param baseBoxPlan 箱壳计划数量维护 + * @return 结果 + */ + @Override + public int insertBaseBoxPlan(BaseBoxPlan baseBoxPlan) + { + baseBoxPlan.setCreateTime(DateUtils.getNowDate()); + return baseBoxPlanMapper.insertBaseBoxPlan(baseBoxPlan); + } + + /** + * 修改箱壳计划数量维护 + * + * @param baseBoxPlan 箱壳计划数量维护 + * @return 结果 + */ + @Override + public int updateBaseBoxPlan(BaseBoxPlan baseBoxPlan) + { + return baseBoxPlanMapper.updateBaseBoxPlan(baseBoxPlan); + } + + /** + * 批量删除箱壳计划数量维护 + * + * @param ids 需要删除的箱壳计划数量维护主键 + * @return 结果 + */ + @Override + public int deleteBaseBoxPlanByIds(String ids) + { + return baseBoxPlanMapper.deleteBaseBoxPlanByIds(Convert.toStrArray(ids)); + } + + /** + * 删除箱壳计划数量维护信息 + * + * @param id 箱壳计划数量维护主键 + * @return 结果 + */ + @Override + public int deleteBaseBoxPlanById(Long id) + { + return baseBoxPlanMapper.deleteBaseBoxPlanById(id); + } +} diff --git a/ruoyi-system/src/main/resources/mapper/system/BaseBoxPlanMapper.xml b/ruoyi-system/src/main/resources/mapper/system/BaseBoxPlanMapper.xml new file mode 100644 index 0000000..a18fbef --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/BaseBoxPlanMapper.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + select id, plan_number, create_time from base_box_plan + + + + + + + + + SELECT seq_base_box_plan.NEXTVAL as id FROM DUAL + + insert into base_box_plan + + id, + plan_number, + create_time, + + + #{id}, + #{planNumber}, + #{createTime}, + + + + + update base_box_plan + + plan_number = #{planNumber}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from base_box_plan where id = #{id} + + + + delete from base_box_plan where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/BroadDataMapper.xml b/ruoyi-system/src/main/resources/mapper/system/BroadDataMapper.xml index 215eb02..b5984cb 100644 --- a/ruoyi-system/src/main/resources/mapper/system/BroadDataMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/BroadDataMapper.xml @@ -76,20 +76,7 @@