diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/controller/WorkformHeadController.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/controller/WorkformHeadController.java deleted file mode 100644 index 87a36fa7..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/controller/WorkformHeadController.java +++ /dev/null @@ -1,369 +0,0 @@ -//package com.ruoyi.ck.controller; -// -//import com.alibaba.druid.util.StringUtils; -//import com.ruoyi.ck.domain.BoxWorkformHead; -//import com.ruoyi.ck.domain.WorkformBoxProduct; -//import com.ruoyi.ck.domain.WorkformHead; -//import com.ruoyi.ck.service.IBoxWorkformHeadService; -//import com.ruoyi.ck.service.IWorkformBoxProductService; -//import com.ruoyi.ck.service.IWorkformHeadService; -//import com.ruoyi.ck.utils.Result; -//import com.ruoyi.common.annotation.Log; -//import com.ruoyi.common.core.controller.BaseController; -//import com.ruoyi.common.core.page.TableDataInfo; -//import com.ruoyi.common.enums.BusinessType; -//import org.apache.shiro.authz.annotation.RequiresPermissions; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.stereotype.Controller; -//import org.springframework.web.bind.annotation.*; -// -//import java.util.HashMap; -//import java.util.List; -//import java.util.Map; -// -///** -// * 数据采集Controller -// * -// * @author sunzhenhu -// * @date 2021-08-05 -// */ -//@Controller -//@RequestMapping("/ck/workform") -//public class WorkformHeadController extends BaseController { -// private String prefix = "ck/workform"; -// -// @Autowired -// private IBoxWorkformHeadService boxWorkformHeadService; -// @Autowired -// private IWorkformHeadService workformHeadService; -// @Autowired -// private IWorkformBoxProductService workformBoxProductService; -// -// -// @RequiresPermissions("ck:workform:view") -// @GetMapping() -// public String workform() { -// return prefix + "/workform"; -// } -// -// -// /** -// * 查询数据采集列表 -// */ -// @RequestMapping("/list") -// @ResponseBody -// public TableDataInfo list(Long boxId) { -// startPage(); -// List list = workformBoxProductService.selectWorkformBoxProductByBoxId(boxId); -// return getDataTable(list); -// } -// -// -// /** -// * 查询数据采集单号 -// */ -// @PostMapping("/queryByCode") -// @ResponseBody -// public Map queryByCode(@RequestBody WorkformHead workformHead) { -// System.out.println(workformHead); -// Map result = new HashMap(); -// WorkformHead workformHead1 = workformHeadService.selectWorkformHeadByCode(workformHead); -// BoxWorkformHead boxWorkformHead = new BoxWorkformHead(); -// boxWorkformHead.setWorkformCode(workformHead.getFormCode()); -// List boxWorkformHeads = boxWorkformHeadService.selectBoxWorkformHeadList(boxWorkformHead); -// result.put("workformHead", workformHead1); -// result.put("boxWorkformHeads", boxWorkformHeads); -// return result; -// } -// -// /** -// * 新增保存数据采集单 -// */ -// @RequiresPermissions("ck:workform:add") -// @Log(title = "数据采集", businessType = BusinessType.INSERT) -// @PostMapping("/add") -// @ResponseBody -// public Map addSave(WorkformHead workformHead) { -// Map map = new HashMap(); -// if (workformHead.getFormCode().equals("")) { -// map.put("value", 0); -// map.put("msg", "添加失败,单号为空"); -// return map; -// } else if (workformHead.getFormNeedNum() == null) { -// map.put("value", 0); -// map.put("msg", "添加失败,数量为空"); -// return map; -// } -// workformHead.setVendor("JASH1"); -// StringBuilder builder = new StringBuilder(); -// builder.append("0001K0001"); -// workformHead.setBatch(builder.toString()); -// workformHead.setFormTemplate("1"); -// workformHead.setPassNum(0); -// workformHead.setFaildNum(0); -// int i = workformHeadService.insertWorkformHead(workformHead); -// if (i > 0) { -//// WorkformHead result= workformHeadService.selectWorkformHeadById(workformHead.getId()); -// map.put("msg", "添加成功"); -// map.put("value", 1); -// map.put("workformHead", workformHead); -// } else { -// map.put("value", 0); -// map.put("msg", "添加失败,单号重复"); -// } -// -// return map; -// } -// -// -// @Log(title = "设置box", businessType = BusinessType.OTHER) -// @PostMapping("/setBox") -// @ResponseBody -// public Map setBoxList(BoxWorkformHead boxWorkformHead) { -// -// int i = boxWorkformHeadService.setBoxNumWorkform(boxWorkformHead); -// List boxWorkformHeads = boxWorkformHeadService.selectBoxWorkformHeadList(boxWorkformHead); -// -// Map map = new HashMap(); -// if (i == 0) { -// map.put("msg", "设置失败"); -// map.put("value", 0); -// } else { -// map.put("msg", "设置成功"); -// map.put("code", 0); -// map.put("boxWorkformHeads", boxWorkformHeads); -// map.put("value", 1); -// } -// return map; -// } -// -// -// /** -// * 导出数据采集列表 -// */ -//// @RequiresPermissions("ck:workform:export") -//// @Log(title = "数据采集", businessType = BusinessType.EXPORT) -//// @PostMapping("/export") -//// @ResponseBody -//// public AjaxResult export(WorkformHead workformHead) -//// { -//// List list = workformHeadService.selectWorkformHeadList(workformHead); -//// ExcelUtil util = new ExcelUtil(WorkformHead.class); -//// return util.exportExcel(list, "数据采集数据"); -//// } -// -//// /** -//// * 修改数据采集 -//// */ -//// @GetMapping("/edit/{id}") -//// public String edit(@PathVariable("id") Integer id, ModelMap mmap) -//// { -//// WorkformHead workformHead = workformHeadService.selectWorkformHeadById(id); -//// mmap.put("workformHead", workformHead); -//// return prefix + "/edit"; -//// } -// -// /** -// * 修改保存数据采集 -// */ -// @Log(title = "数据采集", businessType = BusinessType.UPDATE) -// @PostMapping("/edit") -// @ResponseBody -// public Map editSave(WorkformHead workformHead) { -// Map map = new HashMap(); -// int i = workformHeadService.updateWorkformHead(workformHead); -// if (i > 0) { -// map.put("msg", "修改成功"); -// map.put("value", 1); -// return map; -// } else { -// map.put("msg", "修改失败"); -// map.put("value", 0); -// return map; -// } -// } -// -// /** -// * 删除数据采集 -// */ -// @RequiresPermissions("ck:workform:remove") -// @Log(title = "数据采集", businessType = BusinessType.DELETE) -// @PostMapping("/remove") -// @ResponseBody -// public Result remove(String boxCode)throws Exception { -// if (StringUtils.isEmpty(boxCode)){ -// return Result.getFailResult("箱号不能为空!",null); -// } -// return boxWorkformHeadService.deleteBox(boxCode); -// } -// -// -// @GetMapping("/getBox") -// @ResponseBody -// public Map queryBoxById(Long id) { -// BoxWorkformHead boxWorkformHead = boxWorkformHeadService.selectBoxWorkformHeadById(id); -// Map map = new HashMap(); -// if (boxWorkformHead == null) { -// map.put("msg", "数据异常"); -// map.put("value", 0); -// } else { -// map.put("msg", "查询成功"); -// map.put("boxWorkformHead", boxWorkformHead); -// map.put("value", 1); -// } -// return map; -// } -// -// @RequestMapping("/getProductList") -// @ResponseBody -// public Map getProductList(Long boxId) { -// BoxWorkformHead boxWorkformHead = boxWorkformHeadService.selectBoxWorkformHeadById(boxId); -// WorkformHead workformHead = new WorkformHead(); -// workformHead.setFormCode(boxWorkformHead.getWorkformCode()); -// workformHead = workformHeadService.selectWorkformHeadByCode(workformHead); -// Map map = new HashMap(); -// if (boxWorkformHead == null) { -// map.put("msg", "数据异常"); -// map.put("value", 0); -// } else { -// map.put("msg", "查询成功"); -// map.put("boxWorkformHead", boxWorkformHead); -// map.put("workformHead", workformHead); -// map.put("value", 1); -// } -// return map; -// } -// -// -// /** -// * 新增产品列表 -// */ -//// @RequiresPermissions("ck:product:add") -// @Log(title = "添加sn", businessType = BusinessType.INSERT) -// @PostMapping("/addSn") -// @ResponseBody -// public Map addSn(@RequestBody WorkformBoxProduct workformBoxProduct) { -// Map map = new HashMap(); -// if (workformBoxProduct.getCode().equals("")) { -// map.put("sn", workformBoxProduct.getCode()); -// map.put("msg", "内容为空"); -// map.put("value", 0); -// } -// int i = workformBoxProductService.insertWorkformBoxProduct(workformBoxProduct); -// if (i == 0) { -// map.put("sn", workformBoxProduct.getCode()); -// map.put("msg", "添加失败"); -// map.put("value", 0); -// } else if (i == -1) { -// map.put("sn", workformBoxProduct.getCode()); -// map.put("msg", "不符合规则"); -// map.put("value", -1); -// } else { -// BoxWorkformHead boxWorkformHead = boxWorkformHeadService.selectBoxWorkformHeadById(Long.valueOf(workformBoxProduct.getBoxId())); -// WorkformHead workformHead = new WorkformHead(); -// workformHead.setFormCode(boxWorkformHead.getWorkformCode()); -// workformHead = workformHeadService.selectWorkformHeadByCode(workformHead); -// workformHead.setPassNum(workformHead.getPassNum() + 1); -// workformHeadService.updateWorkformHead(workformHead); -// map.put("msg", "添加成功"); -// map.put("boxWorkformHead", boxWorkformHead); -// map.put("workformHead", workformHead); -// map.put("value", 1); -// } -// return map; -// } -// -// -// //检查上一次产品型号记录 -// @PostMapping("/checkWlCode") -// @ResponseBody -// public Map checkWlCode(@RequestBody WorkformHead workformHead) { -// Map map = new HashMap(); -// BoxWorkformHead boxWorkformHead = workformHeadService.checkWlCode(workformHead); -// if (boxWorkformHead != null) { -// map.put("msg", "查询成功"); -// map.put("boxWorkformHead", boxWorkformHead); -// map.put("value", 1); -// } else { -// map.put("msg", "没有相同型号记录"); -// map.put("value", 0); -// } -// return map; -// } -// -// -// //打印标签 -// @PostMapping("/print") -// @ResponseBody -// public Map print(@RequestBody BoxWorkformHead boxWorkformHead) { -// Map map = new HashMap(); -// boxWorkformHead = boxWorkformHeadService.selectBoxWorkformHeadById(boxWorkformHead.getId()); -// int i = boxWorkformHeadService.printBoxTag(boxWorkformHead); -// if (i > 0) { -// boxWorkformHead = boxWorkformHeadService.selectBoxWorkformHeadById(boxWorkformHead.getId()); -// map.put("msg", "打印成功"); -// map.put("boxWorkformHead", boxWorkformHead); -// map.put("value", 1); -// } else { -// map.put("msg", "异常"); -// map.put("value", 0); -// } -// return map; -// } -// -// //箱号扫码查询 -// @PostMapping("/boxQuery") -// @ResponseBody -// public Map boxQuery(@RequestBody String qr) { -// Map map = new HashMap(); -// //第一位为箱号 -// String[] strings = qr.split(";"); -// BoxWorkformHead boxWorkformHead = new BoxWorkformHead(); -// boxWorkformHead.setBoxCode(strings[0]); -// List boxWorkformHeads = boxWorkformHeadService.selectBoxWorkformHeadList(boxWorkformHead); -// if (boxWorkformHeads.size() > 0) { -// boxWorkformHead = boxWorkformHeads.get(0); -// WorkformHead workformHead = new WorkformHead(); -// workformHead.setFormCode(boxWorkformHead.getWorkformCode()); -// workformHead = workformHeadService.selectWorkformHeadByCode(workformHead); -// -// BoxWorkformHead temp = new BoxWorkformHead(); -// temp.setWorkformCode(workformHead.getFormCode()); -// -// boxWorkformHeads = boxWorkformHeadService.selectBoxWorkformHeadList(temp); -// -// map.put("msg", "查询成功"); -// map.put("boxWorkformHead", boxWorkformHead); -// map.put("boxWorkformHeads", boxWorkformHeads); -// map.put("workformHead", workformHead); -// map.put("value", 1); -// } else { -// map.put("msg", "查询失败"); -// map.put("value", 0); -// } -// return map; -// } -// -// -// //sn查询 -// @PostMapping("/snQuery") -// @ResponseBody -// public Map snQuery(@RequestBody String qr) { -// WorkformBoxProduct workformBoxProduct = new WorkformBoxProduct(); -// workformBoxProduct.setCode(qr); -// List workformBoxProducts = workformBoxProductService.selectWorkformBoxProductList(workformBoxProduct); -// Map map = new HashMap(); -// if (workformBoxProducts.size() > 0) { -// workformBoxProduct = workformBoxProducts.get(0); -// BoxWorkformHead boxWorkformHead = boxWorkformHeadService.selectBoxWorkformHeadById(Long.valueOf(workformBoxProduct.getBoxId())); -// map.put("msg", "查询成功"); -// map.put("boxWorkformHead", boxWorkformHead); -// map.put("workformBoxProduct", workformBoxProduct); -// map.put("value", 1); -// } else { -// map.put("msg", "查询失败"); -// map.put("value", 0); -// } -// return map; -// } -//} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/WorkformBoxProduct.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/WorkformBoxProduct.java deleted file mode 100644 index 54075a51..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/WorkformBoxProduct.java +++ /dev/null @@ -1,135 +0,0 @@ -package com.ruoyi.ck.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; - -/** - * 箱子产品对象 workform_box_product_list - * - * @author sunzhenhu - * @date 2021-08-10 - */ -public class WorkformBoxProduct extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 自增主键 */ - private Long id; - - /** sn号码 */ - @Excel(name = "sn号码") - private String code; - - /** 箱子代码 */ - @Excel(name = "箱子代码") - private String boxCode; - - /** 箱子id */ - @Excel(name = "箱子id") - private Integer boxId; - - /** 备注信息 */ - @Excel(name = "备注信息") - private String remake; - - /** 属于产品 */ - @Excel(name = "属于产品") - private String name; - - /** 完成日期 */ - @Excel(name = "过站日期") - private String space1; - - /** */ - @Excel(name = "测试人员") - private String space2; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setCode(String code) - { - this.code = code; - } - - public String getCode() - { - return code; - } - public void setBoxCode(String boxCode) - { - this.boxCode = boxCode; - } - - public String getBoxCode() - { - return boxCode; - } - public void setBoxId(Integer boxId) - { - this.boxId = boxId; - } - - public Integer getBoxId() - { - return boxId; - } - public void setRemake(String remake) - { - this.remake = remake; - } - - public String getRemake() - { - return remake; - } - public void setName(String name) - { - this.name = name; - } - - public String getName() - { - return name; - } - public void setSpace1(String space1) - { - this.space1 = space1; - } - - public String getSpace1() - { - return space1; - } - public void setSpace2(String space2) - { - this.space2 = space2; - } - - public String getSpace2() - { - return space2; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("code", getCode()) - .append("boxCode", getBoxCode()) - .append("boxId", getBoxId()) - .append("remake", getRemake()) - .append("name", getName()) - .append("space1", getSpace1()) - .append("space2", getSpace2()) - .toString(); - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/WorkformHead.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/WorkformHead.java deleted file mode 100644 index 929cdeaa..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/WorkformHead.java +++ /dev/null @@ -1,206 +0,0 @@ -package com.ruoyi.ck.domain; - -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 数据采集对象 workform_head - * - * @author sunzhenhu - * @date 2021-08-05 - */ -public class WorkformHead extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** */ - private Integer id; - - /** 表单编码 */ - @Excel(name = "表单编码") - private String formCode; - - /** 表单模板对应的id */ - @Excel(name = "表单模板对应的id") - private String formTemplate; - - /** 工单数量 */ - @Excel(name = "工单数量") - private Integer formNeedNum; - - /** 失败数量 */ - @Excel(name = "失败数量") - private Integer faildNum; - - /** 过站数量 */ - @Excel(name = "过站数量") - private Integer passNum; - - /** 产品料号 */ - @Excel(name = "产品料号") - private String wlCode; - - /** 描述信息 */ - @Excel(name = "描述信息") - private String special; - - /** 厂商代码 */ - @Excel(name = "厂商代码") - private String vendor; - - /** 批次 */ - @Excel(name = "批次") - private String batch; - - private String snPrefix; - - private String other; - private String spare1; - private String spare2; - private String spare3; - private String spare4; - - - public void setId(Integer id) - { - this.id = id; - } - - public Integer getId() - { - return id; - } - public void setFormCode(String formCode) - { - this.formCode = formCode; - } - - public String getFormCode() - { - return formCode; - } - public void setFormTemplate(String formTemplate) - { - this.formTemplate = formTemplate; - } - - public String getFormTemplate() - { - return formTemplate; - } - public void setFormNeedNum(Integer formNeedNum) - { - this.formNeedNum = formNeedNum; - } - - public Integer getFormNeedNum() - { - return formNeedNum; - } - public void setFaildNum(Integer faildNum) - { - this.faildNum = faildNum; - } - - public Integer getFaildNum() - { - return faildNum; - } - public void setPassNum(Integer passNum) - { - this.passNum = passNum; - } - - public Integer getPassNum() - { - return passNum; - } - public void setWlCode(String wlCode) - { - this.wlCode = wlCode; - } - - public String getWlCode() - { - return wlCode; - } - public void setSpecial(String special) - { - this.special = special; - } - - public String getSpecial() - { - return special; - } - public void setVendor(String vendor) - { - this.vendor = vendor; - } - - public String getVendor() - { - return vendor; - } - public void setBatch(String batch) - { - this.batch = batch; - } - - public String getBatch() - { - return batch; - } - - public String getSnPrefix() { - return snPrefix; - } - - public void setSnPrefix(String snPrefix) { - this.snPrefix = snPrefix; - } - - public String getSpare1() { - return spare1; - } - - public void setSpare1(String spare1) { - this.spare1 = spare1; - } - - public String getSpare2() { - return spare2; - } - - public void setSpare2(String spare2) { - this.spare2 = spare2; - } - - public String getSpare3() { - return spare3; - } - - public void setSpare3(String spare3) { - this.spare3 = spare3; - } - - public String getSpare4() { - return spare4; - } - - public void setSpare4(String spare4) { - this.spare4 = spare4; - } - - public static long getSerialVersionUID() { - return serialVersionUID; - } - - public String getOther() { - return other; - } - - public void setOther(String other) { - this.other = other; - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/WorkformBoxProductMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/WorkformBoxProductMapper.java deleted file mode 100644 index 9db64640..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/WorkformBoxProductMapper.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.ruoyi.ck.mapper; - -import com.ruoyi.ck.domain.WorkformBoxProduct; - -import java.util.List; - -/** - * 箱子产品Mapper接口 - * - * @author sunzhenhu - * @date 2021-08-10 - */ -public interface WorkformBoxProductMapper -{ - /** - * 查询箱子产品 - * - * @param id 箱子ID - * @return 箱子产品 - */ - public List selectWorkformBoxProductByBoxId(Long id); - - /** - * 查询箱子产品列表 - * - * @param workformBoxProduct 箱子产品 - * @return 箱子产品集合 - */ - public List selectWorkformBoxProductList(WorkformBoxProduct workformBoxProduct); - - /** - * 新增箱子产品 - * - * @param workformBoxProduct 箱子产品 - * @return 结果 - */ - public int insertWorkformBoxProduct(WorkformBoxProduct workformBoxProduct); - - /** - * 修改箱子产品 - * - * @param workformBoxProduct 箱子产品 - * @return 结果 - */ - public int updateWorkformBoxProduct(WorkformBoxProduct workformBoxProduct); - - /** - * 删除箱子产品 - * - * @param id 箱子产品ID - * @return 结果 - */ - public int deleteWorkformBoxProductById(Long id); - - /** - * 批量删除箱子产品 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteWorkformBoxProductByIds(String[] ids); - - public int deleteWorkformBoxProductByBoxId(int boxId); - -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/WorkformHeadMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/WorkformHeadMapper.java deleted file mode 100644 index 764ed492..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/WorkformHeadMapper.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.ruoyi.ck.mapper; - -import com.ruoyi.ck.domain.WorkformHead; - -import java.util.List; - -/** - * 数据采集Mapper接口 - * - * @author sunzhenhu - * @date 2021-08-05 - */ -public interface WorkformHeadMapper -{ - /** - * 查询数据采集 - * - * @param id 数据采集ID - * @return 数据采集 - */ - public WorkformHead selectWorkformHeadById(Integer id); - - /** - * 查询数据采集 - * - * @param workformHead 数据采集Code - * @return 数据采集 - */ - public WorkformHead selectWorkformHeadByCode(WorkformHead workformHead); - - - /** - * 查询相同型号的数据采集 - * - * @param workformHead 型号等相关参数 - * @return 数据采集 - */ - public List selectWorkformHeadByCodeWlCode(WorkformHead workformHead); - - - /** - * 查询数据采集列表 - * - * @param workformHead 数据采集 - * @return 数据采集集合 - */ - public List selectWorkformHeadList(WorkformHead workformHead); - - /** - * 新增数据采集 - * - * @param workformHead 数据采集 - * @return 结果 - */ - public int insertWorkformHead(WorkformHead workformHead); - - /** - * 修改数据采集 - * - * @param workformHead 数据采集 - * @return 结果 - */ - public int updateWorkformHead(WorkformHead workformHead); - - /** - * 删除数据采集 - * - * @param id 数据采集ID - * @return 结果 - */ - public int deleteWorkformHeadById(Integer id); - - /** - * 批量删除数据采集 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteWorkformHeadByIds(String[] ids); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/IWorkformBoxProductService.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/service/IWorkformBoxProductService.java deleted file mode 100644 index 8f75e3a1..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/IWorkformBoxProductService.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.ruoyi.ck.service; - -import com.ruoyi.ck.domain.WorkformBoxProduct; - -import java.util.List; - -/** - * 箱子产品Service接口 - * - * @author sunzhenhu - * @date 2021-08-10 - */ -public interface IWorkformBoxProductService -{ - /** - * 查询箱子产品 - * - * @param id 箱子ID - * @return 箱子产品 - */ - public List selectWorkformBoxProductByBoxId(Long id); - - /** - * 查询箱子产品列表 - * - * @param workformBoxProduct 箱子产品 - * @return 箱子产品集合 - */ - public List selectWorkformBoxProductList(WorkformBoxProduct workformBoxProduct); - - /** - * 新增箱子产品 - * - * @param workformBoxProduct 箱子产品 - * @return 结果 - */ - public int insertWorkformBoxProduct(WorkformBoxProduct workformBoxProduct); - - /** - * 修改箱子产品 - * - * @param workformBoxProduct 箱子产品 - * @return 结果 - */ - public int updateWorkformBoxProduct(WorkformBoxProduct workformBoxProduct); - - /** - * 批量删除箱子产品 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteWorkformBoxProductByIds(String ids); - - /** - * 删除箱子产品信息 - * - * @param id 箱子产品ID - * @return 结果 - */ - public int deleteWorkformBoxProductById(Long id); - - -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/IWorkformHeadService.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/service/IWorkformHeadService.java deleted file mode 100644 index a8c59b3c..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/IWorkformHeadService.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.ruoyi.ck.service; - -import com.ruoyi.ck.domain.BoxWorkformHead; -import com.ruoyi.ck.domain.WorkformHead; - -import java.util.List; - -/** - * 数据采集Service接口 - * - * @author sunzhenhu - * @date 2021-08-05 - */ -public interface IWorkformHeadService -{ - /** - * 查询数据采集 - * - * @param id 数据采集ID - * @return 数据采集 - */ - public WorkformHead selectWorkformHeadById(Integer id); - - /** - * 查询数据采集列表 - * - * @param workformHead 数据采集 - * @return 数据采集集合 - */ - public List selectWorkformHeadList(WorkformHead workformHead); - - /** - * 查询数据采集列表 - * - * @param workformHead 数据采集 - * @return 数据采集集合 - */ - public WorkformHead selectWorkformHeadByCode(WorkformHead workformHead); - - /** - * 新增数据采集 - * - * @param workformHead 数据采集 - * @return 结果 - */ - public int insertWorkformHead(WorkformHead workformHead); - - /** - * 修改数据采集 - * - * @param workformHead 数据采集 - * @return 结果 - */ - public int updateWorkformHead(WorkformHead workformHead); - - /** - * 批量删除数据采集 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteWorkformHeadByIds(String ids); - - /** - * 删除数据采集信息 - * - * @param id 数据采集ID - * @return 结果 - */ - public int deleteWorkformHeadById(Integer id); - - /** - * 根据产品型号查询箱号规则 - * - * @return 结果 - */ - public BoxWorkformHead checkWlCode(WorkformHead workformHead); - - /** - * 查询相同型号的数据采集 - * - * @param workformHead 型号等相关参数 - * @return 数据采集 - */ - public List selectWorkformHeadByCodeWlCode(WorkformHead workformHead); - -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/WorkformBoxProductServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/WorkformBoxProductServiceImpl.java deleted file mode 100644 index 77eac31f..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/WorkformBoxProductServiceImpl.java +++ /dev/null @@ -1,140 +0,0 @@ -package com.ruoyi.ck.service.impl; - -import com.ruoyi.ck.domain.BoxWorkformHead; -import com.ruoyi.ck.domain.WorkformBoxProduct; -import com.ruoyi.ck.domain.WorkformHead; -import com.ruoyi.ck.mapper.BoxWorkformHeadMapper; -import com.ruoyi.ck.mapper.WorkformBoxProductMapper; -import com.ruoyi.ck.mapper.WorkformHeadMapper; -import com.ruoyi.ck.service.IWorkformBoxProductService; -import com.ruoyi.common.core.text.Convert; -import com.ruoyi.common.utils.ShiroUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; - -/** - * 箱子产品Service业务层处理 - * - * @author sunzhenhu - * @date 2021-08-10 - */ -@Service -public class WorkformBoxProductServiceImpl implements IWorkformBoxProductService -{ - @Autowired - private WorkformBoxProductMapper workformBoxProductMapper; - @Autowired - private BoxWorkformHeadMapper boxWorkformHeadMapper; - - @Autowired - private WorkformHeadMapper workformHeadMapper; - - @Override - public List selectWorkformBoxProductByBoxId(Long id) { - return workformBoxProductMapper.selectWorkformBoxProductByBoxId(id); - } - - /** - * 查询箱子产品列表 - * - * @param workformBoxProduct 箱子产品 - * @return 箱子产品 - */ - @Override - public List selectWorkformBoxProductList(WorkformBoxProduct workformBoxProduct) - { - return workformBoxProductMapper.selectWorkformBoxProductList(workformBoxProduct); - } - - /** - * 新增箱子产品 - * - * @param workformBoxProduct 箱子产品 - * @return 结果 - */ - @Override - @Transactional - public int insertWorkformBoxProduct(WorkformBoxProduct workformBoxProduct) { - int i=0; - WorkformBoxProduct temp=new WorkformBoxProduct(); - temp.setCode(workformBoxProduct.getCode()); - //得到添加的箱子,前后端都判断是否满了 - BoxWorkformHead boxWorkformHead=boxWorkformHeadMapper.selectBoxWorkformHeadById(Long.valueOf(workformBoxProduct.getBoxId())); - - WorkformHead workformHead=new WorkformHead(); - workformHead.setFormCode(boxWorkformHead.getWorkformCode()); - workformHead = workformHeadMapper.selectWorkformHeadByCode(workformHead); - String snPrefix = workformHead.getSnPrefix(); - // - if (!workformBoxProduct.getCode().contains(snPrefix)){ - return -1; - } - - //箱子数量满了,结束 - if (boxWorkformHead.getCurrNum()>=boxWorkformHead.getMaxNum()){ - return i; - } - //判断是否扫过sn - List workformBoxProducts = workformBoxProductMapper.selectWorkformBoxProductList(temp); - if (workformBoxProducts.size()>0){ - //扫过,结束 - return i; - } - //初始化日期 - SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - String dateTime=df.format(new Date()); - workformBoxProduct.setSpace1(dateTime); - String userName = ShiroUtils.getSysUser().getUserName(); - workformBoxProduct.setSpace2(userName); - //添加产品 - i=workformBoxProductMapper.insertWorkformBoxProduct(workformBoxProduct); - if (i>0){//添加成功 - boxWorkformHead.setCurrNum(boxWorkformHead.getCurrNum()+1); - i=boxWorkformHeadMapper.updateBoxWorkformHead(boxWorkformHead); - }else {//添加失败 - return i; - } - return i; - } - - /** - * 修改箱子产品 - * - * @param workformBoxProduct 箱子产品 - * @return 结果 - */ - @Override - public int updateWorkformBoxProduct(WorkformBoxProduct workformBoxProduct) - { - return workformBoxProductMapper.updateWorkformBoxProduct(workformBoxProduct); - } - - /** - * 删除箱子产品对象 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - @Override - public int deleteWorkformBoxProductByIds(String ids) - { - return workformBoxProductMapper.deleteWorkformBoxProductByIds(Convert.toStrArray(ids)); - } - - /** - * 删除箱子产品信息 - * - * @param id 箱子产品ID - * @return 结果 - */ - @Override - public int deleteWorkformBoxProductById(Long id) - { - return workformBoxProductMapper.deleteWorkformBoxProductById(id); - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/WorkformHeadServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/WorkformHeadServiceImpl.java deleted file mode 100644 index 8d9dacec..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/WorkformHeadServiceImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -package com.ruoyi.ck.service.impl; - -import com.ruoyi.ck.domain.BoxWorkformHead; -import com.ruoyi.ck.domain.WorkformHead; -import com.ruoyi.ck.mapper.BoxWorkformHeadMapper; -import com.ruoyi.ck.mapper.WorkformHeadMapper; -import com.ruoyi.ck.service.IWorkformHeadService; -import com.ruoyi.ck.utils.Result; -import com.ruoyi.common.core.text.Convert; -import com.ruoyi.common.utils.DateUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * 数据采集Service业务层处理 - * - * @author sunzhenhu - * @date 2021-08-05 - */ -@Service -public class WorkformHeadServiceImpl implements IWorkformHeadService -{ - @Autowired - private WorkformHeadMapper workformHeadMapper; - - @Autowired - private BoxWorkformHeadMapper boxWorkformHeadMapper; - - /** - * 查询数据采集 - * - * @param id 数据采集ID - * @return 数据采集 - */ - @Override - public WorkformHead selectWorkformHeadById(Integer id) - { - return workformHeadMapper.selectWorkformHeadById(id); - } - - /** - * 查询数据采集列表 - * - * @param workformHead 数据采集 - * @return 数据采集 - */ - @Override - public List selectWorkformHeadList(WorkformHead workformHead) - { - return workformHeadMapper.selectWorkformHeadList(workformHead); - } - - @Override - public WorkformHead selectWorkformHeadByCode(WorkformHead workformHead) { - return workformHeadMapper.selectWorkformHeadByCode(workformHead); - } - - /** - * 新增数据采集 - * - * @param workformHead 数据采集 - * @return 结果 - */ - @Override - public int insertWorkformHead(WorkformHead workformHead) - { -// WorkformHead workformHead1 = workformHeadMapper.selectWorkformHeadByCode(temp); - if (workformHead.getSnPrefix()!=null&&!workformHead.getSnPrefix().equals("")){ - WorkformHead isContain = workformHeadMapper.selectWorkformHeadByCode(workformHead); - if (isContain!=null){ - return 0; - }else { - workformHead.setCreateTime(DateUtils.getNowDate()); - } - } - return workformHeadMapper.insertWorkformHead(workformHead); - - } - - /** - * 修改数据采集 - * - * @param workformHead 数据采集 - * @return 结果 - */ - @Override - public int updateWorkformHead(WorkformHead workformHead) - { - return workformHeadMapper.updateWorkformHead(workformHead); - } - - /** - * 删除数据采集对象 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - @Override - public int deleteWorkformHeadByIds(String ids) - { - return workformHeadMapper.deleteWorkformHeadByIds(Convert.toStrArray(ids)); - } - - /** - * 删除数据采集信息 - * - * @param id 数据采集ID - * @return 结果 - */ - @Override - public int deleteWorkformHeadById(Integer id) - { - return workformHeadMapper.deleteWorkformHeadById(id); - } - - - /** - * 根据产品型号查询箱号规则 - * @param workformHead 产品相关信息 - * @return 结果 - */ - @Override - public BoxWorkformHead checkWlCode(WorkformHead workformHead) { - List workformHeadList = workformHeadMapper.selectWorkformHeadByCodeWlCode(workformHead); - System.out.println(workformHeadList); - if (workformHeadList.size()<=0){ - return null; - } - workformHead=workformHeadList.get(workformHeadList.size()-1); - - BoxWorkformHead boxWorkformHead=new BoxWorkformHead(); - boxWorkformHead.setWorkformCode(workformHead.getFormCode()); - List boxWorkformHeadList = boxWorkformHeadMapper.selectBoxWorkformHeadList(boxWorkformHead); - if (boxWorkformHeadList.size()<=0){ - return null; - } - boxWorkformHead=boxWorkformHeadList.get(boxWorkformHeadList.size()-1); - return boxWorkformHead; - } - /** - * 查询相同型号的数据采集 - * - * @param workformHead 型号等相关参数 - * @return 数据采集 - */ - @Override - public List selectWorkformHeadByCodeWlCode(WorkformHead workformHead) { - return workformHeadMapper.selectWorkformHeadByCodeWlCode(workformHead); - } - -} diff --git a/ruoyi-admin/src/main/resources/mapper/ck/WorkformBoxProductMapper.xml b/ruoyi-admin/src/main/resources/mapper/ck/WorkformBoxProductMapper.xml deleted file mode 100644 index 3f7c61ea..00000000 --- a/ruoyi-admin/src/main/resources/mapper/ck/WorkformBoxProductMapper.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - select id, code, box_code, box_id, remake, name, space1, space2 from workform_box_product_list - - - - - - - - - - insert into workform_box_product_list - - code, - box_code, - box_id, - remake, - name, - space1, - space2, - - - #{code}, - #{boxCode}, - #{boxId}, - #{remake}, - #{name}, - #{space1}, - #{space2}, - - - - - update workform_box_product_list - - code = #{code}, - box_code = #{boxCode}, - box_id = #{boxId}, - remake = #{remake}, - name = #{name}, - space1 = #{space1}, - space2 = #{space2}, - - where id = #{id} - - - - delete from workform_box_product_list where id = #{id} - - - - delete from workform_box_product_list where box_id = #{boxId} - - - - delete from workform_box_product_list where id in - - #{id} - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/ck/WorkformHeadMapper.xml b/ruoyi-admin/src/main/resources/mapper/ck/WorkformHeadMapper.xml deleted file mode 100644 index b42acec0..00000000 --- a/ruoyi-admin/src/main/resources/mapper/ck/WorkformHeadMapper.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - select id, form_code, form_template, form_need_num, faild_num, pass_num, create_time, wlCode, special, vendor, batch ,sn_prefix,other,spare1,spare2,spare3,spare4 from workform_head - - - - - - - - - - - insert into workform_head - - form_code, - form_template, - form_need_num, - faild_num, - pass_num, - create_time, - wlCode, - special, - vendor, - batch, - sn_Prefix, - other, - - - #{formCode}, - #{formTemplate}, - #{formNeedNum}, - #{faildNum}, - #{passNum}, - #{createTime}, - #{wlCode}, - #{special}, - #{vendor}, - #{batch}, - #{snPrefix}, - #{other}, - - - - - update workform_head - - form_code = #{formCode}, - form_template = #{formTemplate}, - form_need_num = #{formNeedNum}, - faild_num = #{faildNum}, - pass_num = #{passNum}, - create_time = #{createTime}, - wlCode = #{wlCode}, - special = #{special}, - vendor = #{vendor}, - batch = #{batch}, - sn_Prefix = #{snPrefix}, - other = #{other}, - - where form_code = #{formCode} - - - - delete from workform_head where id = #{id} - - - - delete from workform_head where id in - - #{id} - - - - \ No newline at end of file