diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/broad/BoxBroadController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/broad/BoxBroadController.java index a5248ad..4d5eafe 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/broad/BoxBroadController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/broad/BoxBroadController.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.ruoyi.system.domain.*; import com.ruoyi.system.service.IBroadDataService; +import com.ruoyi.system.service.IBroadDruidService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -23,6 +24,8 @@ import java.util.List; public class BoxBroadController { @Autowired private IBroadDataService service; + @Autowired + private IBroadDruidService BroadDruidServiceImpl; @PostMapping("/planCompletion") @ApiOperation("箱壳查询计划数量完成情况") @@ -65,12 +68,30 @@ public class BoxBroadController { @ApiOperation("箱壳按小时查询产量") public String selectOutputByTime() { List info = service.selectOutputByTime(); + BoxOutput boxOutput= info.get(0); + info.remove(0); + int qty = BroadDruidServiceImpl.selectNowXkOutPut();//实时的数量 + if (info.isEmpty()){//只有7.30 + boxOutput.setName("7:30"); + boxOutput.setQty(qty); + }else { + BoxOutput boxOutputSize = info.get(info.size() - 1); + String hName=boxOutputSize.getName(); + String newName=hName.substring(0,hName.indexOf(":")); + BoxOutput boxOutputNow=new BoxOutput(); + + boxOutputNow.setName((Integer.parseInt(newName)+1)+":30"); + boxOutputNow.setQty(qty-boxOutputSize.getRecord_qty()); + info.add(boxOutputNow); + } String jsonInfo = JSONArray.toJSONString(info); System.out.println("根据型号统计产量:" + jsonInfo); return jsonInfo; } + + @PostMapping("/getProductPlanInfo") @ApiOperation("箱壳工单详情") public String getProductPlanInfo() { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/broad/ZZJXBroadController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/broad/ZZJXBroadController.java index f897544..3c7aa43 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/broad/ZZJXBroadController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/broad/ZZJXBroadController.java @@ -41,7 +41,11 @@ public class ZZJXBroadController { } else { return JSONArray.toJSONString(service.zz_selectProductInByDay()); } - + } + @PostMapping("/selectProductInTarget") + @ApiOperation("成品入库统计-目标") + private String selectProductInTarget() { + return JSONArray.toJSONString(service.zz_selectProductInTarget()); } @PostMapping("/selectLossInfo") @@ -60,5 +64,23 @@ public class ZZJXBroadController { return JSONArray.toJSONString(service.selectOneBadRateByDay()); } } + @PostMapping("/selectOneBadRateMb") + @ApiOperation("一次不合格率目标") + private String selectOneBadRateMb( ){ + + return JSONArray.toJSONString(service.zz_selectOneBadRateMb()); + + } + @PostMapping("/selectInStoreTag") + @ApiOperation("入库节拍") + private String selectInStoreTag(){ + return JSONObject.toJSONString(BroadDruidServiceImpl.zz_selectInStoreTag()); + } + @PostMapping("/selectInStoreOrderInfo") + @ApiOperation("入库执行订单") + private String selectInStoreOrderInfo(){ + return JSONObject.toJSONString(service.zz_selectInStoreOrderInfo()); + } + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseOneUnquqlifiedRateController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseOneUnquqlifiedRateController.java new file mode 100644 index 0000000..da78ec9 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseOneUnquqlifiedRateController.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.BaseOneUnquqlifiedRate; +import com.ruoyi.system.service.IBaseOneUnquqlifiedRateService; +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-22 + */ +@Controller +@RequestMapping("/system/base_rate") +public class BaseOneUnquqlifiedRateController extends BaseController +{ + private String prefix = "system/base_rate"; + + @Autowired + private IBaseOneUnquqlifiedRateService baseOneUnquqlifiedRateService; + + @RequiresPermissions("system:base_rate:view") + @GetMapping() + public String base_rate() + { + return prefix + "/base_rate"; + } + + /** + * 查询一次不合格率维护列表 + */ + @RequiresPermissions("system:base_rate:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate) + { + startPage(); + List list = baseOneUnquqlifiedRateService.selectBaseOneUnquqlifiedRateList(baseOneUnquqlifiedRate); + return getDataTable(list); + } + + /** + * 导出一次不合格率维护列表 + */ + @RequiresPermissions("system:base_rate:export") + @Log(title = "一次不合格率维护", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate) + { + List list = baseOneUnquqlifiedRateService.selectBaseOneUnquqlifiedRateList(baseOneUnquqlifiedRate); + ExcelUtil util = new ExcelUtil(BaseOneUnquqlifiedRate.class); + return util.exportExcel(list, "一次不合格率维护数据"); + } + + /** + * 新增一次不合格率维护 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存一次不合格率维护 + */ + @RequiresPermissions("system:base_rate:add") + @Log(title = "一次不合格率维护", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate) + { + return toAjax(baseOneUnquqlifiedRateService.insertBaseOneUnquqlifiedRate(baseOneUnquqlifiedRate)); + } + + /** + * 修改一次不合格率维护 + */ + @RequiresPermissions("system:base_rate:edit") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Long id, ModelMap mmap) + { + BaseOneUnquqlifiedRate baseOneUnquqlifiedRate = baseOneUnquqlifiedRateService.selectBaseOneUnquqlifiedRateById(id); + mmap.put("baseOneUnquqlifiedRate", baseOneUnquqlifiedRate); + return prefix + "/edit"; + } + + /** + * 修改保存一次不合格率维护 + */ + @RequiresPermissions("system:base_rate:edit") + @Log(title = "一次不合格率维护", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate) + { + return toAjax(baseOneUnquqlifiedRateService.updateBaseOneUnquqlifiedRate(baseOneUnquqlifiedRate)); + } + + /** + * 删除一次不合格率维护 + */ + @RequiresPermissions("system:base_rate:remove") + @Log(title = "一次不合格率维护", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(baseOneUnquqlifiedRateService.deleteBaseOneUnquqlifiedRateByIds(ids)); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseProductQtyController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseProductQtyController.java new file mode 100644 index 0000000..2d15564 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseProductQtyController.java @@ -0,0 +1,132 @@ +package com.ruoyi.system.controller; + +import java.util.List; + +import com.ruoyi.common.utils.ShiroUtils; +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.BaseProductQty; +import com.ruoyi.system.service.IBaseProductQtyService; +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-22 + */ +@Controller +@RequestMapping("/system/base_productqty") +public class BaseProductQtyController extends BaseController { + private String prefix = "system/base_productqty"; + + @Autowired + private IBaseProductQtyService baseProductQtyService; + + @RequiresPermissions("system:base_productqty:view") + @GetMapping() + public String base_productqty() { + return prefix + "/base_productqty"; + } + + /** + * 查询成品产量目标维护列表 + */ + @RequiresPermissions("system:base_productqty:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(BaseProductQty baseProductQty) { + startPage(); + List list = baseProductQtyService.selectBaseProductQtyList(baseProductQty); + return getDataTable(list); + } + + /** + * 导出成品产量目标维护列表 + */ + @RequiresPermissions("system:base_productqty:export") + @Log(title = "成品产量目标维护", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(BaseProductQty baseProductQty) { + List list = baseProductQtyService.selectBaseProductQtyList(baseProductQty); + ExcelUtil util = new ExcelUtil(BaseProductQty.class); + return util.exportExcel(list, "成品产量目标维护数据"); + } + + /** + * 新增成品产量目标维护 + */ + @GetMapping("/add") + public String add() { + return prefix + "/add"; + } + + /** + * 新增保存成品产量目标维护 + */ + @RequiresPermissions("system:base_productqty:add") + @Log(title = "成品产量目标维护", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(BaseProductQty baseProductQty) { + Integer tag = baseProductQtyService.countDay(baseProductQty.getDay()); + if (tag > 0) { + return error("本天 '" + baseProductQty.getDay() + "' 已经存在"); + } + List list = baseProductQtyService.selectBaseProductQtyList(null); + int id = 1; + if (list != null || !list.isEmpty()) { + id = list.size(); + } + baseProductQty.setId(Long.valueOf(id)); + baseProductQty.setCreateBy(ShiroUtils.getLoginName()); + return toAjax(baseProductQtyService.insertBaseProductQty(baseProductQty)); + } + + /** + * 修改成品产量目标维护 + */ + @RequiresPermissions("system:base_productqty:edit") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Long id, ModelMap mmap) { + BaseProductQty baseProductQty = baseProductQtyService.selectBaseProductQtyById(id); + mmap.put("baseProductQty", baseProductQty); + return prefix + "/edit"; + } + + /** + * 修改保存成品产量目标维护 + */ + @RequiresPermissions("system:base_productqty:edit") + @Log(title = "成品产量目标维护", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(BaseProductQty baseProductQty) { + return toAjax(baseProductQtyService.updateBaseProductQty(baseProductQty)); + } + + /** + * 删除成品产量目标维护 + */ + @RequiresPermissions("system:base_productqty:remove") + @Log(title = "成品产量目标维护", businessType = BusinessType.DELETE) + @PostMapping("/remove") + @ResponseBody + public AjaxResult remove(String ids) { + return toAjax(baseProductQtyService.deleteBaseProductQtyByIds(ids)); + } + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseRhythmController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseRhythmController.java new file mode 100644 index 0000000..8297029 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseRhythmController.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.BaseRhythm; +import com.ruoyi.system.service.IBaseRhythmService; +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-22 + */ +@Controller +@RequestMapping("/system/base_rhythm") +public class BaseRhythmController extends BaseController +{ + private String prefix = "system/base_rhythm"; + + @Autowired + private IBaseRhythmService baseRhythmService; + + @RequiresPermissions("system:base_rhythm:view") + @GetMapping() + public String base_rhythm() + { + return prefix + "/base_rhythm"; + } + + /** + * 查询入库节拍维护列表 + */ + @RequiresPermissions("system:base_rhythm:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(BaseRhythm baseRhythm) + { + startPage(); + List list = baseRhythmService.selectBaseRhythmList(baseRhythm); + return getDataTable(list); + } + + /** + * 导出入库节拍维护列表 + */ + @RequiresPermissions("system:base_rhythm:export") + @Log(title = "入库节拍维护", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(BaseRhythm baseRhythm) + { + List list = baseRhythmService.selectBaseRhythmList(baseRhythm); + ExcelUtil util = new ExcelUtil(BaseRhythm.class); + return util.exportExcel(list, "入库节拍维护数据"); + } + + /** + * 新增入库节拍维护 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存入库节拍维护 + */ + @RequiresPermissions("system:base_rhythm:add") + @Log(title = "入库节拍维护", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(BaseRhythm baseRhythm) + { + return toAjax(baseRhythmService.insertBaseRhythm(baseRhythm)); + } + + /** + * 修改入库节拍维护 + */ + @RequiresPermissions("system:base_rhythm:edit") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Long id, ModelMap mmap) + { + BaseRhythm baseRhythm = baseRhythmService.selectBaseRhythmById(id); + mmap.put("baseRhythm", baseRhythm); + return prefix + "/edit"; + } + + /** + * 修改保存入库节拍维护 + */ + @RequiresPermissions("system:base_rhythm:edit") + @Log(title = "入库节拍维护", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(BaseRhythm baseRhythm) + { + return toAjax(baseRhythmService.updateBaseRhythm(baseRhythm)); + } + + /** + * 删除入库节拍维护 + */ + @RequiresPermissions("system:base_rhythm:remove") + @Log(title = "入库节拍维护", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(baseRhythmService.deleteBaseRhythmByIds(ids)); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseTeamController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseTeamController.java index 9b1582b..9793c83 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseTeamController.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseTeamController.java @@ -101,9 +101,9 @@ public class BaseTeamController extends BaseController try { String pathName = FileUploadUtils.upload(filePath, file); List list = baseTeamService.selectBaseTeamList(null); - int id=0; + int id=1; if (list!=null||!list.isEmpty()){ - id= Math.toIntExact(list.get(list.size() - 1).getId())+1; + id=list.size()+1; } baseTeam.setId(Long.valueOf(id)); baseTeam.setPath(pathName); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseOneUnquqlifiedRate.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseOneUnquqlifiedRate.java new file mode 100644 index 0000000..ee95294 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseOneUnquqlifiedRate.java @@ -0,0 +1,50 @@ +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_one_unquqlified_rate + * + * @author ruoyi + * @date 2022-07-22 + */ +public class BaseOneUnquqlifiedRate extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 不合格率 */ + @Excel(name = "不合格率") + private double rate; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public double getRate() { + return rate; + } + + public void setRate(double rate) { + this.rate = rate; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("rate", getRate()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseProductQty.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseProductQty.java new file mode 100644 index 0000000..4d9fd1b --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseProductQty.java @@ -0,0 +1,70 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +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_product_qty + * + * @author ruoyi + * @date 2022-07-22 + */ +public class BaseProductQty extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 天 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "天", width = 30, dateFormat = "yyyy-MM-dd") + private Date day; + + /** 目标数量 */ + @Excel(name = "目标数量") + private Long qty; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setDay(Date day) + { + this.day = day; + } + + public Date getDay() + { + return day; + } + public void setQty(Long qty) + { + this.qty = qty; + } + + public Long getQty() + { + return qty; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("day", getDay()) + .append("qty", getQty()) + .append("createTime", getCreateTime()) + .append("createBy", getCreateBy()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseRhythm.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseRhythm.java new file mode 100644 index 0000000..892e3e1 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseRhythm.java @@ -0,0 +1,51 @@ +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_rhythm + * + * @author ruoyi + * @date 2022-07-22 + */ +public class BaseRhythm extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 节拍 */ + @Excel(name = "节拍") + private Long rhythm; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setRhythm(Long rhythm) + { + this.rhythm = rhythm; + } + + public Long getRhythm() + { + return rhythm; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("rhythm", getRhythm()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseTeam.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseTeam.java index fee28e3..5385a05 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseTeam.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseTeam.java @@ -24,7 +24,7 @@ public class BaseTeam extends BaseEntity /** 分数 */ @Excel(name = "分数") - private Long teamNumber; + private double teamNumber; /** 图片 */ @Excel(name = "图片") @@ -48,12 +48,12 @@ public class BaseTeam extends BaseEntity { return teamName; } - public void setTeamNumber(Long teamNumber) + public void setTeamNumber(double teamNumber) { this.teamNumber = teamNumber; } - public Long getTeamNumber() + public double getTeamNumber() { return teamNumber; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/BoxOutput.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/BoxOutput.java index f5f49c2..26125d7 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/BoxOutput.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/BoxOutput.java @@ -7,6 +7,7 @@ package com.ruoyi.system.domain; public class BoxOutput { private String name; private int qty; + private int record_qty; private double rate; public String getName() { @@ -32,4 +33,12 @@ public class BoxOutput { public void setRate(double rate) { this.rate = rate; } + + public int getRecord_qty() { + return record_qty; + } + + public void setRecord_qty(int record_qty) { + this.record_qty = record_qty; + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseOneUnquqlifiedRateMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseOneUnquqlifiedRateMapper.java new file mode 100644 index 0000000..719172d --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseOneUnquqlifiedRateMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.BaseOneUnquqlifiedRate; + +/** + * 一次不合格率维护Mapper接口 + * + * @author ruoyi + * @date 2022-07-22 + */ +public interface BaseOneUnquqlifiedRateMapper +{ + /** + * 查询一次不合格率维护 + * + * @param id 一次不合格率维护主键 + * @return 一次不合格率维护 + */ + public BaseOneUnquqlifiedRate selectBaseOneUnquqlifiedRateById(Long id); + + /** + * 查询一次不合格率维护列表 + * + * @param baseOneUnquqlifiedRate 一次不合格率维护 + * @return 一次不合格率维护集合 + */ + public List selectBaseOneUnquqlifiedRateList(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate); + + /** + * 新增一次不合格率维护 + * + * @param baseOneUnquqlifiedRate 一次不合格率维护 + * @return 结果 + */ + public int insertBaseOneUnquqlifiedRate(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate); + + /** + * 修改一次不合格率维护 + * + * @param baseOneUnquqlifiedRate 一次不合格率维护 + * @return 结果 + */ + public int updateBaseOneUnquqlifiedRate(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate); + + /** + * 删除一次不合格率维护 + * + * @param id 一次不合格率维护主键 + * @return 结果 + */ + public int deleteBaseOneUnquqlifiedRateById(Long id); + + /** + * 批量删除一次不合格率维护 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBaseOneUnquqlifiedRateByIds(String[] ids); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseProductQtyMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseProductQtyMapper.java new file mode 100644 index 0000000..87211de --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseProductQtyMapper.java @@ -0,0 +1,64 @@ +package com.ruoyi.system.mapper; + +import java.util.Date; +import java.util.List; +import com.ruoyi.system.domain.BaseProductQty; + +/** + * 成品产量目标维护Mapper接口 + * + * @author ruoyi + * @date 2022-07-22 + */ +public interface BaseProductQtyMapper +{ + /** + * 查询成品产量目标维护 + * + * @param id 成品产量目标维护主键 + * @return 成品产量目标维护 + */ + public BaseProductQty selectBaseProductQtyById(Long id); + + /** + * 查询成品产量目标维护列表 + * + * @param baseProductQty 成品产量目标维护 + * @return 成品产量目标维护集合 + */ + public List selectBaseProductQtyList(BaseProductQty baseProductQty); + + /** + * 新增成品产量目标维护 + * + * @param baseProductQty 成品产量目标维护 + * @return 结果 + */ + public int insertBaseProductQty(BaseProductQty baseProductQty); + + /** + * 修改成品产量目标维护 + * + * @param baseProductQty 成品产量目标维护 + * @return 结果 + */ + public int updateBaseProductQty(BaseProductQty baseProductQty); + + /** + * 删除成品产量目标维护 + * + * @param id 成品产量目标维护主键 + * @return 结果 + */ + public int deleteBaseProductQtyById(Long id); + + /** + * 批量删除成品产量目标维护 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBaseProductQtyByIds(String[] ids); + + Integer countDay(Date day); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseRhythmMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseRhythmMapper.java new file mode 100644 index 0000000..11ab713 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseRhythmMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.BaseRhythm; + +/** + * 入库节拍维护Mapper接口 + * + * @author ruoyi + * @date 2022-07-22 + */ +public interface BaseRhythmMapper +{ + /** + * 查询入库节拍维护 + * + * @param id 入库节拍维护主键 + * @return 入库节拍维护 + */ + public BaseRhythm selectBaseRhythmById(Long id); + + /** + * 查询入库节拍维护列表 + * + * @param baseRhythm 入库节拍维护 + * @return 入库节拍维护集合 + */ + public List selectBaseRhythmList(BaseRhythm baseRhythm); + + /** + * 新增入库节拍维护 + * + * @param baseRhythm 入库节拍维护 + * @return 结果 + */ + public int insertBaseRhythm(BaseRhythm baseRhythm); + + /** + * 修改入库节拍维护 + * + * @param baseRhythm 入库节拍维护 + * @return 结果 + */ + public int updateBaseRhythm(BaseRhythm baseRhythm); + + /** + * 删除入库节拍维护 + * + * @param id 入库节拍维护主键 + * @return 结果 + */ + public int deleteBaseRhythmById(Long id); + + /** + * 批量删除入库节拍维护 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBaseRhythmByIds(String[] ids); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BroadDataMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BroadDataMapper.java index a005814..b6b4d8c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BroadDataMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BroadDataMapper.java @@ -74,4 +74,15 @@ public interface BroadDataMapper { List selectOneBadRate(); List selectOneBadRateByDay(); + + BoxOutput selectOutputByTimeDY(); + + + List zz_selectProductInTarget(); + + BoxOutput zz_selectInStoreTag(); + + List zz_selectInStoreOrderInfo(); + + BoxOutput zz_selectOneBadRateMb(); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseOneUnquqlifiedRateService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseOneUnquqlifiedRateService.java new file mode 100644 index 0000000..4cfe6f2 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseOneUnquqlifiedRateService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.BaseOneUnquqlifiedRate; + +/** + * 一次不合格率维护Service接口 + * + * @author ruoyi + * @date 2022-07-22 + */ +public interface IBaseOneUnquqlifiedRateService +{ + /** + * 查询一次不合格率维护 + * + * @param id 一次不合格率维护主键 + * @return 一次不合格率维护 + */ + public BaseOneUnquqlifiedRate selectBaseOneUnquqlifiedRateById(Long id); + + /** + * 查询一次不合格率维护列表 + * + * @param baseOneUnquqlifiedRate 一次不合格率维护 + * @return 一次不合格率维护集合 + */ + public List selectBaseOneUnquqlifiedRateList(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate); + + /** + * 新增一次不合格率维护 + * + * @param baseOneUnquqlifiedRate 一次不合格率维护 + * @return 结果 + */ + public int insertBaseOneUnquqlifiedRate(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate); + + /** + * 修改一次不合格率维护 + * + * @param baseOneUnquqlifiedRate 一次不合格率维护 + * @return 结果 + */ + public int updateBaseOneUnquqlifiedRate(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate); + + /** + * 批量删除一次不合格率维护 + * + * @param ids 需要删除的一次不合格率维护主键集合 + * @return 结果 + */ + public int deleteBaseOneUnquqlifiedRateByIds(String ids); + + /** + * 删除一次不合格率维护信息 + * + * @param id 一次不合格率维护主键 + * @return 结果 + */ + public int deleteBaseOneUnquqlifiedRateById(Long id); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseProductQtyService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseProductQtyService.java new file mode 100644 index 0000000..a3dcb90 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseProductQtyService.java @@ -0,0 +1,64 @@ +package com.ruoyi.system.service; + +import java.util.Date; +import java.util.List; +import com.ruoyi.system.domain.BaseProductQty; + +/** + * 成品产量目标维护Service接口 + * + * @author ruoyi + * @date 2022-07-22 + */ +public interface IBaseProductQtyService +{ + /** + * 查询成品产量目标维护 + * + * @param id 成品产量目标维护主键 + * @return 成品产量目标维护 + */ + public BaseProductQty selectBaseProductQtyById(Long id); + + /** + * 查询成品产量目标维护列表 + * + * @param baseProductQty 成品产量目标维护 + * @return 成品产量目标维护集合 + */ + public List selectBaseProductQtyList(BaseProductQty baseProductQty); + + /** + * 新增成品产量目标维护 + * + * @param baseProductQty 成品产量目标维护 + * @return 结果 + */ + public int insertBaseProductQty(BaseProductQty baseProductQty); + + /** + * 修改成品产量目标维护 + * + * @param baseProductQty 成品产量目标维护 + * @return 结果 + */ + public int updateBaseProductQty(BaseProductQty baseProductQty); + + /** + * 批量删除成品产量目标维护 + * + * @param ids 需要删除的成品产量目标维护主键集合 + * @return 结果 + */ + public int deleteBaseProductQtyByIds(String ids); + + /** + * 删除成品产量目标维护信息 + * + * @param id 成品产量目标维护主键 + * @return 结果 + */ + public int deleteBaseProductQtyById(Long id); + + Integer countDay(Date day); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseRhythmService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseRhythmService.java new file mode 100644 index 0000000..16f1daf --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseRhythmService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.BaseRhythm; + +/** + * 入库节拍维护Service接口 + * + * @author ruoyi + * @date 2022-07-22 + */ +public interface IBaseRhythmService +{ + /** + * 查询入库节拍维护 + * + * @param id 入库节拍维护主键 + * @return 入库节拍维护 + */ + public BaseRhythm selectBaseRhythmById(Long id); + + /** + * 查询入库节拍维护列表 + * + * @param baseRhythm 入库节拍维护 + * @return 入库节拍维护集合 + */ + public List selectBaseRhythmList(BaseRhythm baseRhythm); + + /** + * 新增入库节拍维护 + * + * @param baseRhythm 入库节拍维护 + * @return 结果 + */ + public int insertBaseRhythm(BaseRhythm baseRhythm); + + /** + * 修改入库节拍维护 + * + * @param baseRhythm 入库节拍维护 + * @return 结果 + */ + public int updateBaseRhythm(BaseRhythm baseRhythm); + + /** + * 批量删除入库节拍维护 + * + * @param ids 需要删除的入库节拍维护主键集合 + * @return 结果 + */ + public int deleteBaseRhythmByIds(String ids); + + /** + * 删除入库节拍维护信息 + * + * @param id 入库节拍维护主键 + * @return 结果 + */ + public int deleteBaseRhythmById(Long id); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IBroadDataService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBroadDataService.java index 41e4f91..44b0843 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IBroadDataService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBroadDataService.java @@ -58,4 +58,13 @@ public interface IBroadDataService { List selectOneBadRate(); List selectOneBadRateByDay(); + + BoxOutput selectOutputByTimeDY(); + + + List zz_selectProductInTarget(); + + List zz_selectInStoreOrderInfo(); + + BoxOutput zz_selectOneBadRateMb(); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IBroadDruidService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBroadDruidService.java index 589eb5a..cba0f64 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IBroadDruidService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBroadDruidService.java @@ -13,4 +13,10 @@ public interface IBroadDruidService { int selectTeamGroups(); List zz_selectLossInfo(); + + int selectNowXkOutPut(); + + BoxOutput zz_selectInStoreTag(); + + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseOneUnquqlifiedRateServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseOneUnquqlifiedRateServiceImpl.java new file mode 100644 index 0000000..679b611 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseOneUnquqlifiedRateServiceImpl.java @@ -0,0 +1,94 @@ +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.BaseOneUnquqlifiedRateMapper; +import com.ruoyi.system.domain.BaseOneUnquqlifiedRate; +import com.ruoyi.system.service.IBaseOneUnquqlifiedRateService; +import com.ruoyi.common.core.text.Convert; + +/** + * 一次不合格率维护Service业务层处理 + * + * @author ruoyi + * @date 2022-07-22 + */ +@Service +public class BaseOneUnquqlifiedRateServiceImpl implements IBaseOneUnquqlifiedRateService +{ + @Autowired + private BaseOneUnquqlifiedRateMapper baseOneUnquqlifiedRateMapper; + + /** + * 查询一次不合格率维护 + * + * @param id 一次不合格率维护主键 + * @return 一次不合格率维护 + */ + @Override + public BaseOneUnquqlifiedRate selectBaseOneUnquqlifiedRateById(Long id) + { + return baseOneUnquqlifiedRateMapper.selectBaseOneUnquqlifiedRateById(id); + } + + /** + * 查询一次不合格率维护列表 + * + * @param baseOneUnquqlifiedRate 一次不合格率维护 + * @return 一次不合格率维护 + */ + @Override + public List selectBaseOneUnquqlifiedRateList(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate) + { + return baseOneUnquqlifiedRateMapper.selectBaseOneUnquqlifiedRateList(baseOneUnquqlifiedRate); + } + + /** + * 新增一次不合格率维护 + * + * @param baseOneUnquqlifiedRate 一次不合格率维护 + * @return 结果 + */ + @Override + public int insertBaseOneUnquqlifiedRate(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate) + { + return baseOneUnquqlifiedRateMapper.insertBaseOneUnquqlifiedRate(baseOneUnquqlifiedRate); + } + + /** + * 修改一次不合格率维护 + * + * @param baseOneUnquqlifiedRate 一次不合格率维护 + * @return 结果 + */ + @Override + public int updateBaseOneUnquqlifiedRate(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate) + { + return baseOneUnquqlifiedRateMapper.updateBaseOneUnquqlifiedRate(baseOneUnquqlifiedRate); + } + + /** + * 批量删除一次不合格率维护 + * + * @param ids 需要删除的一次不合格率维护主键 + * @return 结果 + */ + @Override + public int deleteBaseOneUnquqlifiedRateByIds(String ids) + { + return baseOneUnquqlifiedRateMapper.deleteBaseOneUnquqlifiedRateByIds(Convert.toStrArray(ids)); + } + + /** + * 删除一次不合格率维护信息 + * + * @param id 一次不合格率维护主键 + * @return 结果 + */ + @Override + public int deleteBaseOneUnquqlifiedRateById(Long id) + { + return baseOneUnquqlifiedRateMapper.deleteBaseOneUnquqlifiedRateById(id); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseProductQtyServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseProductQtyServiceImpl.java new file mode 100644 index 0000000..3a050f2 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseProductQtyServiceImpl.java @@ -0,0 +1,102 @@ +package com.ruoyi.system.service.impl; + +import java.util.Date; +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.BaseProductQtyMapper; +import com.ruoyi.system.domain.BaseProductQty; +import com.ruoyi.system.service.IBaseProductQtyService; +import com.ruoyi.common.core.text.Convert; + +/** + * 成品产量目标维护Service业务层处理 + * + * @author ruoyi + * @date 2022-07-22 + */ +@Service +public class BaseProductQtyServiceImpl implements IBaseProductQtyService +{ + @Autowired + private BaseProductQtyMapper baseProductQtyMapper; + + /** + * 查询成品产量目标维护 + * + * @param id 成品产量目标维护主键 + * @return 成品产量目标维护 + */ + @Override + public BaseProductQty selectBaseProductQtyById(Long id) + { + return baseProductQtyMapper.selectBaseProductQtyById(id); + } + + /** + * 查询成品产量目标维护列表 + * + * @param baseProductQty 成品产量目标维护 + * @return 成品产量目标维护 + */ + @Override + public List selectBaseProductQtyList(BaseProductQty baseProductQty) + { + return baseProductQtyMapper.selectBaseProductQtyList(baseProductQty); + } + + /** + * 新增成品产量目标维护 + * + * @param baseProductQty 成品产量目标维护 + * @return 结果 + */ + @Override + public int insertBaseProductQty(BaseProductQty baseProductQty) + { + baseProductQty.setCreateTime(DateUtils.getNowDate()); + return baseProductQtyMapper.insertBaseProductQty(baseProductQty); + } + + /** + * 修改成品产量目标维护 + * + * @param baseProductQty 成品产量目标维护 + * @return 结果 + */ + @Override + public int updateBaseProductQty(BaseProductQty baseProductQty) + { + return baseProductQtyMapper.updateBaseProductQty(baseProductQty); + } + + /** + * 批量删除成品产量目标维护 + * + * @param ids 需要删除的成品产量目标维护主键 + * @return 结果 + */ + @Override + public int deleteBaseProductQtyByIds(String ids) + { + return baseProductQtyMapper.deleteBaseProductQtyByIds(Convert.toStrArray(ids)); + } + + /** + * 删除成品产量目标维护信息 + * + * @param id 成品产量目标维护主键 + * @return 结果 + */ + @Override + public int deleteBaseProductQtyById(Long id) + { + return baseProductQtyMapper.deleteBaseProductQtyById(id); + } + + @Override + public Integer countDay(Date day) { + return baseProductQtyMapper.countDay(day); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseRhythmServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseRhythmServiceImpl.java new file mode 100644 index 0000000..48f448f --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseRhythmServiceImpl.java @@ -0,0 +1,94 @@ +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.BaseRhythmMapper; +import com.ruoyi.system.domain.BaseRhythm; +import com.ruoyi.system.service.IBaseRhythmService; +import com.ruoyi.common.core.text.Convert; + +/** + * 入库节拍维护Service业务层处理 + * + * @author ruoyi + * @date 2022-07-22 + */ +@Service +public class BaseRhythmServiceImpl implements IBaseRhythmService +{ + @Autowired + private BaseRhythmMapper baseRhythmMapper; + + /** + * 查询入库节拍维护 + * + * @param id 入库节拍维护主键 + * @return 入库节拍维护 + */ + @Override + public BaseRhythm selectBaseRhythmById(Long id) + { + return baseRhythmMapper.selectBaseRhythmById(id); + } + + /** + * 查询入库节拍维护列表 + * + * @param baseRhythm 入库节拍维护 + * @return 入库节拍维护 + */ + @Override + public List selectBaseRhythmList(BaseRhythm baseRhythm) + { + return baseRhythmMapper.selectBaseRhythmList(baseRhythm); + } + + /** + * 新增入库节拍维护 + * + * @param baseRhythm 入库节拍维护 + * @return 结果 + */ + @Override + public int insertBaseRhythm(BaseRhythm baseRhythm) + { + return baseRhythmMapper.insertBaseRhythm(baseRhythm); + } + + /** + * 修改入库节拍维护 + * + * @param baseRhythm 入库节拍维护 + * @return 结果 + */ + @Override + public int updateBaseRhythm(BaseRhythm baseRhythm) + { + return baseRhythmMapper.updateBaseRhythm(baseRhythm); + } + + /** + * 批量删除入库节拍维护 + * + * @param ids 需要删除的入库节拍维护主键 + * @return 结果 + */ + @Override + public int deleteBaseRhythmByIds(String ids) + { + return baseRhythmMapper.deleteBaseRhythmByIds(Convert.toStrArray(ids)); + } + + /** + * 删除入库节拍维护信息 + * + * @param id 入库节拍维护主键 + * @return 结果 + */ + @Override + public int deleteBaseRhythmById(Long id) + { + return baseRhythmMapper.deleteBaseRhythmById(id); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BroadDataServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BroadDataServiceImpl.java index 9977350..97e41e3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BroadDataServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BroadDataServiceImpl.java @@ -38,6 +38,8 @@ public class BroadDataServiceImpl implements IBroadDataService return mapper.selectOutputByType(); } + + @Override public List getUHullPlanInfo(String id) { return mapper.getUHullPlanInfo(id); @@ -61,6 +63,11 @@ public class BroadDataServiceImpl implements IBroadDataService return mapper.fp_selectOrderExecution(); } + @Override + public BoxOutput selectOutputByTimeDY() { + return mapper.selectOutputByTimeDY(); + } + @Override public List fp_selectDeviceStation() { return mapper.fp_selectDeviceStation(); @@ -137,4 +144,19 @@ public class BroadDataServiceImpl implements IBroadDataService public List selectOneBadRateByDay() { return mapper.selectOneBadRateByDay(); } + + @Override + public List zz_selectProductInTarget() { + return mapper.zz_selectProductInTarget(); + } + + @Override + public List zz_selectInStoreOrderInfo() { + return mapper.zz_selectInStoreOrderInfo(); + } + + @Override + public BoxOutput zz_selectOneBadRateMb() { + return mapper.zz_selectOneBadRateMb(); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BroadDruidServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BroadDruidServiceImpl.java index 3a283a4..42d9a0c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BroadDruidServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BroadDruidServiceImpl.java @@ -18,13 +18,19 @@ import java.util.List; public class BroadDruidServiceImpl implements IBroadDruidService { @Autowired private BroadDataMapper mapper; - +//定时生成产量 public void createWork(){ BoxOutput boxOutput=mapper.selectNowXkOutPut(); int nowOut=boxOutput.getQty(); - int qty=mapper.selectXK_H_QTY(); + int qty=mapper.selectXK_H_QTY(); //上一条 int zsQty=mapper.selectNowXkOutPut1(); - mapper.insertXK_H_QTY(boxOutput.getName(),nowOut,nowOut-qty,zsQty); + int cha=nowOut-qty; + mapper.insertXK_H_QTY(boxOutput.getName(),zsQty,cha<0?0:cha,nowOut); + } + + @Override + public int selectNowXkOutPut() { + return mapper.selectNowXkOutPut1(); } @Override @@ -38,4 +44,9 @@ public class BroadDruidServiceImpl implements IBroadDruidService { mapper.insertTimp1(); return mapper.zz_selectLossInfo(); } + + @Override + public BoxOutput zz_selectInStoreTag() { + return mapper.zz_selectInStoreTag(); + } } diff --git a/ruoyi-system/src/main/resources/createsql/base_productqtyMenu.sql b/ruoyi-system/src/main/resources/createsql/base_productqtyMenu.sql new file mode 100644 index 0000000..58e408c --- /dev/null +++ b/ruoyi-system/src/main/resources/createsql/base_productqtyMenu.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(2040, '成品产量目标维护', '5', '1', '/system/base_productqty', 'C', '0', 'system:base_productqty: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, '成品产量目标维护查询', 2040, '1', '#', 'F', '0', 'system:base_productqty: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, '成品产量目标维护新增', 2040, '2', '#', 'F', '0', 'system:base_productqty: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, '成品产量目标维护修改', 2040, '3', '#', 'F', '0', 'system:base_productqty: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, '成品产量目标维护删除', 2040, '4', '#', 'F', '0', 'system:base_productqty: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, '成品产量目标维护导出', 2040, '5', '#', 'F', '0', 'system:base_productqty:export', '#', 'admin', sysdate, '', null, ''); + +-- base_product_qty主键序列 +create sequence seq_base_product_qty +increment by 1 +start with 10 +nomaxvalue +nominvalue +cache 20; diff --git a/ruoyi-system/src/main/resources/createsql/base_rateMenu.sql b/ruoyi-system/src/main/resources/createsql/base_rateMenu.sql new file mode 100644 index 0000000..9209e01 --- /dev/null +++ b/ruoyi-system/src/main/resources/createsql/base_rateMenu.sql @@ -0,0 +1,20 @@ +-- 菜单 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(2048, '一次不合格率维护', '5', '1', '/system/base_rate', 'C', '0', 'system:base_rate: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, '一次不合格率维护查询', 2048, '1', '#', 'F', '0', 'system:base_rate: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, '一次不合格率维护新增', 2048, '2', '#', 'F', '0', 'system:base_rate: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, '一次不合格率维护修改', 2048, '3', '#', 'F', '0', 'system:base_rate: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, '一次不合格率维护删除', 2048, '4', '#', 'F', '0', 'system:base_rate: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, '一次不合格率维护导出', 2048, '5', '#', 'F', '0', 'system:base_rate:export', '#', 'admin', sysdate, '', null, ''); + diff --git a/ruoyi-system/src/main/resources/createsql/base_rhythmMenu.sql b/ruoyi-system/src/main/resources/createsql/base_rhythmMenu.sql new file mode 100644 index 0000000..344c5e5 --- /dev/null +++ b/ruoyi-system/src/main/resources/createsql/base_rhythmMenu.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(2045, '入库节拍维护', '5', '1', '/system/base_rhythm', 'C', '0', 'system:base_rhythm: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, '入库节拍维护查询', 2045, '1', '#', 'F', '0', 'system:base_rhythm: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, '入库节拍维护新增', 2045, '2', '#', 'F', '0', 'system:base_rhythm: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, '入库节拍维护修改', 2045, '3', '#', 'F', '0', 'system:base_rhythm: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, '入库节拍维护删除', 2045, '4', '#', 'F', '0', 'system:base_rhythm: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, '入库节拍维护导出', 2045, '5', '#', 'F', '0', 'system:base_rhythm:export', '#', 'admin', sysdate, '', null, ''); + +-- base_rhythm主键序列 +create sequence seq_base_rhythm +increment by 1 +start with 10 +nomaxvalue +nominvalue +cache 20; diff --git a/ruoyi-system/src/main/resources/mapper/system/BaseOneUnquqlifiedRateMapper.xml b/ruoyi-system/src/main/resources/mapper/system/BaseOneUnquqlifiedRateMapper.xml new file mode 100644 index 0000000..85fd0a5 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/BaseOneUnquqlifiedRateMapper.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + select id, rate from base_one_unquqlified_rate + + + + + + + + insert into base_one_unquqlified_rate + + id, + rate, + + + #{id}, + #{rate}, + + + + + update base_one_unquqlified_rate + + rate = #{rate}, + + where id = #{id} + + + + delete from base_one_unquqlified_rate where id = #{id} + + + + delete from base_one_unquqlified_rate where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/BaseProductQtyMapper.xml b/ruoyi-system/src/main/resources/mapper/system/BaseProductQtyMapper.xml new file mode 100644 index 0000000..1e4d9c0 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/BaseProductQtyMapper.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + select id, day, qty, create_time, create_by from base_product_qty + + + + + + + + + SELECT seq_base_product_qty.NEXTVAL as id FROM DUAL + + insert into base_product_qty + + id, + day, + qty, + create_time, + create_by, + + + #{id}, + #{day}, + #{qty}, + #{createTime}, + #{createBy}, + + + + + update base_product_qty + + day = #{day}, + qty = #{qty}, + create_time = #{createTime}, + create_by = #{createBy}, + + where id = #{id} + + + + delete from base_product_qty where id = #{id} + + + + delete from base_product_qty where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/BaseRhythmMapper.xml b/ruoyi-system/src/main/resources/mapper/system/BaseRhythmMapper.xml new file mode 100644 index 0000000..f2c3660 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/BaseRhythmMapper.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + select id, rhythm from base_rhythm + + + + + + + + + SELECT seq_base_rhythm.NEXTVAL as id FROM DUAL + + insert into base_rhythm + + id, + rhythm, + + + #{id}, + #{rhythm}, + + + + + update base_rhythm + + rhythm = #{rhythm}, + + where id = #{id} + + + + delete from base_rhythm where id = #{id} + + + + delete from base_rhythm 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 5689877..8be14c5 100644 --- a/ruoyi-system/src/main/resources/mapper/system/BroadDataMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/BroadDataMapper.xml @@ -12,11 +12,17 @@ - + select TO_CHAR(CREATION_DATE, 'hh24') || ':30' as name, + sum(ACTUAL_QTY) as qty + from IMOS_PR_PLAN t + where process_code = 1002 + and delete_flag = '0' + and CREATION_DATE > (select * + from (select CREATE_TIME from HAIWEI.XK_H_QTY order by CREATE_TIME desc) + where ROWNUM = 1) group by TO_CHAR(CREATION_DATE, 'hh24') - order by name + + + @@ -369,10 +380,10 @@ on ta.name = ipr.MATERIAL_NAME order by to_number(STATION_NO) - + delete from haiwei.temp1 - + insert into haiwei.temp1 ( select row_number() over (order by PRODUCTION_DATE) as row_number, PRODUCTION_DATE as day, @@ -386,27 +397,45 @@ - select (TO_CHAR(SYSDATE, 'hh24') || ':30') as name, - nvl(sum(actual_qty), 0) as qty - from IMOS.IMOS_PR_PLAN - where plan_date is not null - and process_code = 1002 - and delete_flag = '0' - and (to_char(plan_date, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd') or - to_char(plan_date, 'yyyy-MM-dd') = to_char(sysdate-1, 'yyyy-MM-dd')) + select (TO_CHAR(SYSDATE, 'hh24')-1 || ':30') as name, + nvl(sum(actual_qty), 0) as qty + from IMOS.IMOS_PR_PLAN xhq + left join (select * from haiwei.BASE_DAY_WBTIME where ROWNUM = 1 order by CREATE_TIME desc) wb on 1 = 1 + where xhq.CREATION_DATE between case when sysdate <= wb.W_END then W_START else W_END end + and case when sysdate <= wb.W_END then W_END else B_END end + and plan_date is not null + and process_code = 1002 + and delete_flag = '0' @@ -550,4 +580,50 @@ order by name + + + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/base_planqty/base_planqty.html b/ruoyi-system/src/main/resources/templates/system/base_planqty/base_planqty.html index 8f7eb9b..07f93a7 100644 --- a/ruoyi-system/src/main/resources/templates/system/base_planqty/base_planqty.html +++ b/ruoyi-system/src/main/resources/templates/system/base_planqty/base_planqty.html @@ -20,18 +20,18 @@
diff --git a/ruoyi-system/src/main/resources/templates/system/base_productqty/add.html b/ruoyi-system/src/main/resources/templates/system/base_productqty/add.html new file mode 100644 index 0000000..953687f --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/base_productqty/add.html @@ -0,0 +1,48 @@ + + + + + + + +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/base_productqty/base_productqty.html b/ruoyi-system/src/main/resources/templates/system/base_productqty/base_productqty.html new file mode 100644 index 0000000..32f5089 --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/base_productqty/base_productqty.html @@ -0,0 +1,100 @@ + + + + + + +
+
+
+
+
+ +
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/base_productqty/edit.html b/ruoyi-system/src/main/resources/templates/system/base_productqty/edit.html new file mode 100644 index 0000000..1279da1 --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/base_productqty/edit.html @@ -0,0 +1,49 @@ + + + + + + + +
+
+ + + + + + + + + + +
+ +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/base_rate/add.html b/ruoyi-system/src/main/resources/templates/system/base_rate/add.html new file mode 100644 index 0000000..5ea9a67 --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/base_rate/add.html @@ -0,0 +1,37 @@ + + + + + + +
+
+ + + + + + +
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/base_rate/base_rate.html b/ruoyi-system/src/main/resources/templates/system/base_rate/base_rate.html new file mode 100644 index 0000000..49fb888 --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/base_rate/base_rate.html @@ -0,0 +1,77 @@ + + + + + + +
+
+
+
+
+ +
+
+
+ +
+ + + + + 修改 + + + + + + + +
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/base_rate/edit.html b/ruoyi-system/src/main/resources/templates/system/base_rate/edit.html new file mode 100644 index 0000000..6b55f90 --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/base_rate/edit.html @@ -0,0 +1,32 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/base_rhythm/add.html b/ruoyi-system/src/main/resources/templates/system/base_rhythm/add.html new file mode 100644 index 0000000..59226c4 --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/base_rhythm/add.html @@ -0,0 +1,31 @@ + + + + + + +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/base_rhythm/base_rhythm.html b/ruoyi-system/src/main/resources/templates/system/base_rhythm/base_rhythm.html new file mode 100644 index 0000000..ef1826d --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/base_rhythm/base_rhythm.html @@ -0,0 +1,86 @@ + + + + + + +
+
+
+
+
+ +
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/base_rhythm/edit.html b/ruoyi-system/src/main/resources/templates/system/base_rhythm/edit.html new file mode 100644 index 0000000..2b4dfe5 --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/base_rhythm/edit.html @@ -0,0 +1,32 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+
+ + + + \ No newline at end of file