From 8fcb4a842353232dcd107a04aebc37f2289dfdac Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Tue, 22 Oct 2024 17:23:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A7=E7=89=88=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E6=88=90=E5=93=81=E8=B5=84=E6=96=99=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=20sys=5Ffinish=5Fproduct=E5=92=8C=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E4=B8=AD=E5=AF=B9=E5=BA=94=E7=9A=84=E5=89=8D=E7=AB=AF=E6=89=80?= =?UTF-8?q?=E6=9C=89=E4=BB=A3=E7=A0=81=E5=92=8C=E5=90=8E=E7=AB=AF=E6=89=80?= =?UTF-8?q?=E6=9C=89=E4=BB=A3=E7=A0=81=20=E5=92=8C=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E7=9A=84=E7=B3=BB=E7=BB=9F=E8=8F=9C=E5=8D=95=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=20=E5=88=A0=E9=99=A4=E6=97=A7=E7=89=88=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=20picture=5Fupload=E5=92=8C=E7=B3=BB=E7=BB=9F=E4=B8=AD?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E7=9A=84=E5=89=8D=E7=AB=AF=E6=89=80=E6=9C=89?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=92=8C=E5=90=8E=E7=AB=AF=E6=89=80=E6=9C=89?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=20=E5=92=8C=E5=AF=B9=E5=BA=94=E7=9A=84?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=8F=9C=E5=8D=95=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ck/controller/DataCollectController.java | 28 - .../controller/PictureUploadController.java | 144 ---- .../com/ruoyi/ck/domain/PictureUpload.java | 210 ----- .../java/com/ruoyi/ck/domain/UnitConvert.java | 49 -- .../ruoyi/ck/mapper/PictureUploadMapper.java | 62 -- .../ck/service/IPictureUploadService.java | 66 -- .../impl/PictureUploadServiceImpl.java | 112 --- .../ruoyi/ck/utils/ApplicationRunnerImpl.java | 25 - .../com/ruoyi/ck/utils/UnitConvertUtil.java | 189 ---- .../mapper/ck/PictureUploadMapper.xml | 113 --- .../templates/ck/dataCollect/dataCollect.html | 809 ------------------ .../resources/templates/ck/upload/add.html | 111 --- .../resources/templates/ck/upload/edit.html | 112 --- .../resources/templates/ck/upload/upload.html | 210 ----- .../templates/ck/upload/uploadPicture.html | 274 ------ 15 files changed, 2514 deletions(-) delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/ck/controller/DataCollectController.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/ck/controller/PictureUploadController.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/ck/domain/PictureUpload.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/ck/domain/UnitConvert.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/PictureUploadMapper.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/ck/service/IPictureUploadService.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/PictureUploadServiceImpl.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/ck/utils/ApplicationRunnerImpl.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/ck/utils/UnitConvertUtil.java delete mode 100644 ruoyi-admin/src/main/resources/mapper/ck/PictureUploadMapper.xml delete mode 100644 ruoyi-admin/src/main/resources/templates/ck/dataCollect/dataCollect.html delete mode 100644 ruoyi-admin/src/main/resources/templates/ck/upload/add.html delete mode 100644 ruoyi-admin/src/main/resources/templates/ck/upload/edit.html delete mode 100644 ruoyi-admin/src/main/resources/templates/ck/upload/upload.html delete mode 100644 ruoyi-admin/src/main/resources/templates/ck/upload/uploadPicture.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/controller/DataCollectController.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/controller/DataCollectController.java deleted file mode 100644 index 5b36486d..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/controller/DataCollectController.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.ruoyi.ck.controller; - -import com.ruoyi.common.core.controller.BaseController; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; - -/** - * 物料清单Controller - * - * @author ruoyi - * @date 2021-06-21 - */ -@Controller -@RequestMapping("/ck/dataCollect") -public class DataCollectController extends BaseController { - private String prefix = "ck/dataCollect"; - - - @RequiresPermissions("ck:dataCollect:view") - @GetMapping() - public String bom() { - return prefix + "/dataCollect"; - } - - -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/controller/PictureUploadController.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/controller/PictureUploadController.java deleted file mode 100644 index 9dae3291..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/controller/PictureUploadController.java +++ /dev/null @@ -1,144 +0,0 @@ -package com.ruoyi.ck.controller; - -import com.ruoyi.ck.domain.PictureUpload; -import com.ruoyi.ck.service.IPictureUploadService; -import com.ruoyi.ck.utils.Result; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.file.FileUtils; -import com.ruoyi.common.utils.poi.ExcelUtil; -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.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * 上传图片Controller - * - * @author ruoyi - * @date 2021-12-28 - */ -@Controller -@RequestMapping("/ck/upload") -public class PictureUploadController extends BaseController { - private String prefix = "ck/upload"; - - @Autowired - private IPictureUploadService pictureUploadService; - - @RequiresPermissions("ck:upload:view") - @GetMapping() - public String upload() { - return prefix + "/upload"; - } - - /** - * 查询上传图片列表 - */ - @RequiresPermissions("ck:upload:list") - @PostMapping("/list") - @ResponseBody - public TableDataInfo list(PictureUpload pictureUpload) { - startPage(); - List list = pictureUploadService.selectPictureUploadList(pictureUpload); - return getDataTable(list); - } - - /** - * 导出上传图片列表 - */ - @RequiresPermissions("ck:upload:export") - @Log(title = "上传图片", businessType = BusinessType.EXPORT) - @PostMapping("/export") - @ResponseBody - public AjaxResult export(PictureUpload pictureUpload) { - List list = pictureUploadService.selectPictureUploadList(pictureUpload); - ExcelUtil util = new ExcelUtil(PictureUpload.class); - return util.exportExcel(list, "上传图片数据"); - } - - /** - * 新增上传图片 - */ - @GetMapping("/add") - public String add() { - return prefix + "/add"; - } - - @GetMapping("/toUploadHtml") - public String toUploadHtml() { - return prefix + "/uploadPicture"; - } - - /** - * 新增保存上传图片 - */ - @RequiresPermissions("ck:upload:add") - @Log(title = "上传图片", businessType = BusinessType.INSERT) - @PostMapping("/add") - @ResponseBody - public AjaxResult addSave(PictureUpload pictureUpload) { - return toAjax(pictureUploadService.insertPictureUpload(pictureUpload)); - } - - /** - * 修改上传图片 - */ - @GetMapping("/edit/{id}") - public String edit(@PathVariable("id") Long id, ModelMap mmap) { - PictureUpload pictureUpload = pictureUploadService.selectPictureUploadById(id); - mmap.put("pictureUpload", pictureUpload); - return prefix + "/edit"; - } - - /** - * 修改保存上传图片 - */ - @RequiresPermissions("ck:upload:edit") - @Log(title = "上传图片", businessType = BusinessType.UPDATE) - @PostMapping("/edit") - @ResponseBody - public AjaxResult editSave(PictureUpload pictureUpload) { - return toAjax(pictureUploadService.updatePictureUpload(pictureUpload)); - } - - /** - * 删除上传图片 - */ - @RequiresPermissions("ck:upload:remove") - @Log(title = "上传图片", businessType = BusinessType.DELETE) - @PostMapping("/remove") - @ResponseBody - public AjaxResult remove(String ids) { - return toAjax(pictureUploadService.deletePictureUploadByIds(ids)); - } - - @ResponseBody - @PostMapping("/upload") - public Result upload(@RequestParam("file") MultipartFile file, PictureUpload pictureUpload) throws Exception { - return pictureUploadService.uploadPicture(file, pictureUpload); - } - - /** - * 本地资源通用下载 - */ - @GetMapping("/download") - public void resourceDownload(String path, HttpServletRequest request, HttpServletResponse response) - throws Exception { - response.setCharacterEncoding("utf-8"); - response.setContentType("multipart/form-data"); - response.setHeader("Content-Disposition", - "attachment;fileName=" + FileUtils.setFileDownloadHeader(request, path)); - FileUtils.writeBytes(path, response.getOutputStream()); - } - -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/PictureUpload.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/PictureUpload.java deleted file mode 100644 index a3837ca8..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/PictureUpload.java +++ /dev/null @@ -1,210 +0,0 @@ -package com.ruoyi.ck.domain; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -import java.util.Date; - -/** - * 上传图片对象 picture_upload - * - * @author ruoyi - * @date 2021-12-28 - */ -public class PictureUpload extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 编号 */ - @Excel(name = "编号") - private Long id; - - /** 物料代码 */ - @Excel(name = "物料代码") - private String itemCode; - - /** 图片类型 */ - @Excel(name = "图片类型") - private String type; - - /** 版本 */ - @Excel(name = "版本") - private String version; - - /** 路径 */ - @Excel(name = "路径") - private String path; - - /** 上传日期 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "上传日期", width = 30, dateFormat = "yyyy-MM-dd") - private Date uploadDate; - - /** 上传人 */ - @Excel(name = "上传人") - private String uploadMan; - - /** */ - @Excel(name = "") - private String spare1; - - /** */ - @Excel(name = "") - private String spare2; - - /** */ - @Excel(name = "") - private String spare3; - - /** */ - @Excel(name = "") - private String spare4; - - /** */ - @Excel(name = "") - private String spare5; - - /** */ - @Excel(name = "") - private String spare6; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setItemCode(String itemCode) - { - this.itemCode = itemCode; - } - - public String getItemCode() - { - return itemCode; - } - public void setType(String type) - { - this.type = type; - } - - public String getType() - { - return type; - } - public void setVersion(String version) - { - this.version = version; - } - - public String getVersion() - { - return version; - } - public void setPath(String path) - { - this.path = path; - } - - public String getPath() - { - return path; - } - public void setUploadDate(Date uploadDate) - { - this.uploadDate = uploadDate; - } - - public Date getUploadDate() - { - return uploadDate; - } - public void setUploadMan(String uploadMan) - { - this.uploadMan = uploadMan; - } - - public String getUploadMan() - { - return uploadMan; - } - public void setSpare1(String spare1) - { - this.spare1 = spare1; - } - - public String getSpare1() - { - return spare1; - } - public void setSpare2(String spare2) - { - this.spare2 = spare2; - } - - public String getSpare2() - { - return spare2; - } - public void setSpare3(String spare3) - { - this.spare3 = spare3; - } - - public String getSpare3() - { - return spare3; - } - public void setSpare4(String spare4) - { - this.spare4 = spare4; - } - - public String getSpare4() - { - return spare4; - } - public void setSpare5(String spare5) - { - this.spare5 = spare5; - } - - public String getSpare5() - { - return spare5; - } - public void setSpare6(String spare6) - { - this.spare6 = spare6; - } - - public String getSpare6() - { - return spare6; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("itemCode", getItemCode()) - .append("type", getType()) - .append("version", getVersion()) - .append("path", getPath()) - .append("uploadDate", getUploadDate()) - .append("uploadMan", getUploadMan()) - .append("spare1", getSpare1()) - .append("spare2", getSpare2()) - .append("spare3", getSpare3()) - .append("spare4", getSpare4()) - .append("spare5", getSpare5()) - .append("spare6", getSpare6()) - .toString(); - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/UnitConvert.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/UnitConvert.java deleted file mode 100644 index 9289a157..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/UnitConvert.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.ruoyi.ck.domain; - -import java.math.BigDecimal; - -/** - * @author :pyy - * @date :Created in 2021/12/29 16:24 - * @description: - * @modified By: - * @version: $ - */ -public class UnitConvert { - - private BigDecimal weight; - - private String unit; - - public BigDecimal getWeight() { - return weight; - } - - public UnitConvert(BigDecimal weight, String unit) { - this.weight = weight; - this.unit = unit; - } - - public UnitConvert() { - } - - public void setWeight(BigDecimal weight) { - this.weight = weight; - } - - public String getUnit() { - return unit; - } - - public void setUnit(String unit) { - this.unit = unit; - } - - @Override - public String toString() { - return "unitConvert{" + - "weight=" + weight + - ", unit='" + unit + '\'' + - '}'; - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/PictureUploadMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/PictureUploadMapper.java deleted file mode 100644 index d8e38ac4..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/PictureUploadMapper.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.ruoyi.ck.mapper; - -import com.ruoyi.ck.domain.PictureUpload; - -import java.util.List; - -/** - * 上传图片Mapper接口 - * - * @author ruoyi - * @date 2021-12-28 - */ -public interface PictureUploadMapper -{ - /** - * 查询上传图片 - * - * @param id 上传图片ID - * @return 上传图片 - */ - public PictureUpload selectPictureUploadById(Long id); - - /** - * 查询上传图片列表 - * - * @param pictureUpload 上传图片 - * @return 上传图片集合 - */ - public List selectPictureUploadList(PictureUpload pictureUpload); - - /** - * 新增上传图片 - * - * @param pictureUpload 上传图片 - * @return 结果 - */ - public int insertPictureUpload(PictureUpload pictureUpload); - - /** - * 修改上传图片 - * - * @param pictureUpload 上传图片 - * @return 结果 - */ - public int updatePictureUpload(PictureUpload pictureUpload); - - /** - * 删除上传图片 - * - * @param id 上传图片ID - * @return 结果 - */ - public int deletePictureUploadById(Long id); - - /** - * 批量删除上传图片 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deletePictureUploadByIds(String[] ids); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/IPictureUploadService.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/service/IPictureUploadService.java deleted file mode 100644 index 667818bd..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/IPictureUploadService.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.ruoyi.ck.service; - -import com.ruoyi.ck.domain.PictureUpload; -import com.ruoyi.ck.utils.Result; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; - -/** - * 上传图片Service接口 - * - * @author ruoyi - * @date 2021-12-28 - */ -public interface IPictureUploadService -{ - /** - * 查询上传图片 - * - * @param id 上传图片ID - * @return 上传图片 - */ - public PictureUpload selectPictureUploadById(Long id); - - /** - * 查询上传图片列表 - * - * @param pictureUpload 上传图片 - * @return 上传图片集合 - */ - public List selectPictureUploadList(PictureUpload pictureUpload); - - /** - * 新增上传图片 - * - * @param pictureUpload 上传图片 - * @return 结果 - */ - public int insertPictureUpload(PictureUpload pictureUpload); - - /** - * 修改上传图片 - * - * @param pictureUpload 上传图片 - * @return 结果 - */ - public int updatePictureUpload(PictureUpload pictureUpload); - - /** - * 批量删除上传图片 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deletePictureUploadByIds(String ids); - - /** - * 删除上传图片信息 - * - * @param id 上传图片ID - * @return 结果 - */ - public int deletePictureUploadById(Long id); - - public Result uploadPicture(MultipartFile file,PictureUpload pictureUpload)throws Exception; -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/PictureUploadServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/PictureUploadServiceImpl.java deleted file mode 100644 index 6464163b..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/PictureUploadServiceImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -package com.ruoyi.ck.service.impl; - -import com.ruoyi.ck.domain.PictureUpload; -import com.ruoyi.ck.mapper.PictureUploadMapper; -import com.ruoyi.ck.service.IPictureUploadService; -import com.ruoyi.ck.utils.Result; -import com.ruoyi.common.config.RuoYiConfig; -import com.ruoyi.common.core.text.Convert; -import com.ruoyi.common.utils.security.PermissionUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; - -import java.io.File; -import java.util.Date; -import java.util.List; - -/** - * 上传图片Service业务层处理 - * - * @author ruoyi - * @date 2021-12-28 - */ -@Service -public class PictureUploadServiceImpl implements IPictureUploadService { - @Autowired - private PictureUploadMapper pictureUploadMapper; - - /** - * 查询上传图片 - * - * @param id 上传图片ID - * @return 上传图片 - */ - @Override - public PictureUpload selectPictureUploadById(Long id) { - return pictureUploadMapper.selectPictureUploadById(id); - } - - /** - * 查询上传图片列表 - * - * @param pictureUpload 上传图片 - * @return 上传图片 - */ - @Override - public List selectPictureUploadList(PictureUpload pictureUpload) { - return pictureUploadMapper.selectPictureUploadList(pictureUpload); - } - - /** - * 新增上传图片 - * - * @param pictureUpload 上传图片 - * @return 结果 - */ - @Override - public int insertPictureUpload(PictureUpload pictureUpload) { - return pictureUploadMapper.insertPictureUpload(pictureUpload); - } - - /** - * 修改上传图片 - * - * @param pictureUpload 上传图片 - * @return 结果 - */ - @Override - public int updatePictureUpload(PictureUpload pictureUpload) { - return pictureUploadMapper.updatePictureUpload(pictureUpload); - } - - /** - * 删除上传图片对象 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - @Override - public int deletePictureUploadByIds(String ids) { - return pictureUploadMapper.deletePictureUploadByIds(Convert.toStrArray(ids)); - } - - /** - * 删除上传图片信息 - * - * @param id 上传图片ID - * @return 结果 - */ - @Override - public int deletePictureUploadById(Long id) { - return pictureUploadMapper.deletePictureUploadById(id); - } - - @Override - public Result uploadPicture(MultipartFile file, PictureUpload pictureUpload) throws Exception { - int version = pictureUploadMapper.selectPictureUploadList(pictureUpload).size() + 1; - String path = RuoYiConfig.getProfile() + "/" + pictureUpload.getItemCode() + "/" + pictureUpload.getType() + "/" + version+"/"+file.getOriginalFilename(); - File dir = new File(path); - if (!dir.exists()) { - dir.mkdirs(); - } - file.transferTo(dir); - pictureUpload.setVersion(version+""); - pictureUpload.setPath(path); - pictureUpload.setUploadDate(new Date()); - String userName = (String) PermissionUtils.getPrincipalProperty("userName"); - pictureUpload.setUploadMan(userName); - int i = pictureUploadMapper.insertPictureUpload(pictureUpload); - return Result.getSuccessResult(i); - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/utils/ApplicationRunnerImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/utils/ApplicationRunnerImpl.java deleted file mode 100644 index fec1674b..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/utils/ApplicationRunnerImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.ruoyi.ck.utils; - -import org.springframework.boot.ApplicationArguments; -import org.springframework.boot.ApplicationRunner; - -/** - * Created by sunzhenhu on 2021/7/27 16:53 - */ -//@Component -public class ApplicationRunnerImpl implements ApplicationRunner { -// @Autowired -// private SerialPortUtils serialPort; - public void run(ApplicationArguments args) throws Exception { - // 创建串口必要参数接收类并赋值,赋值串口号,波特率,校验位,数据位,停止位 -// ParamConfig paramConfig = new ParamConfig("COM6", 9600, 0, 8, 1); -// // 初始化设置,打开串口,开始监听读取串口数据 -// try { -// serialPort.init(paramConfig); -// int a=123; -// } catch (Exception e) { -// e.printStackTrace(); -// } - - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/utils/UnitConvertUtil.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/utils/UnitConvertUtil.java deleted file mode 100644 index d5871311..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/utils/UnitConvertUtil.java +++ /dev/null @@ -1,189 +0,0 @@ -package com.ruoyi.ck.utils; - -import com.ruoyi.ck.domain.UnitConvert; - -import java.math.BigDecimal; - -/** - * @author :pyy - * @date :Created in 2021/12/29 15:08 - * @description: - * @modified By: - * @version: $ - */ -public class UnitConvertUtil { - - private static final String G = "克"; - - private static final String KG = "千克"; - - private static final String T = "吨"; - - private static final String ML = "毫升"; - - private static final String L = "升"; - - private static final String M3 = "立方米"; - - private static final String MM = "毫米"; - - private static final String CM = "厘米"; - - private static final String M = "米"; - - private static final BigDecimal ONE = new BigDecimal("1"); - - private static final BigDecimal TEN = new BigDecimal("10"); - - private static final BigDecimal HUNDRED = new BigDecimal("100"); - - private static final BigDecimal KILO = new BigDecimal("1000"); - - public static UnitConvert unitConvert(UnitConvert unitConvert) { - String unit = unitConvert.getUnit(); - if (G.equals(unit)) { - gConvert(unitConvert); - } else if (KG.equals(unit)) { - kgConvert(unitConvert); - } else if (ML.equals(unit)) { - mlConvert(unitConvert); - } else if (L.equals(unit)) { - lConvert(unitConvert); - } else if (MM.equals(unit)) { - mmConvert(unitConvert); - } else if (CM.equals(unit)) { - cmConvert(unitConvert); - } else if (T.equals(unit)) { - tConvert(unitConvert); - } else if (M3.equals(unit)) { - m3Convert(unitConvert); - } else if (M.equals(unit)) { - mConvert(unitConvert); - } - return unitConvert; - } - - private static void gConvert(UnitConvert unitConvert) { - BigDecimal weight = unitConvert.getWeight(); - if (weight.compareTo(KILO) == 1 || weight.compareTo(KILO) == 0) { - weight = weight.divide(KILO); - unitConvert.setUnit(KG); - unitConvert.setWeight(weight); - if (weight.compareTo(KILO) == 1 || weight.compareTo(KILO) == 0) { - weight = weight.divide(KILO); - unitConvert.setUnit(T); - unitConvert.setWeight(weight); - } - } - } - - private static void kgConvert(UnitConvert unitConvert) { - BigDecimal weight = unitConvert.getWeight(); - if (weight.compareTo(KILO) == 1 || weight.compareTo(KILO) == 0) { - weight = weight.divide(KILO); - unitConvert.setUnit(T); - unitConvert.setWeight(weight); - } else if (weight.compareTo(ONE) == -1) { - weight = weight.multiply(KILO); - unitConvert.setWeight(weight); - unitConvert.setUnit(G); - } - } - - private static void tConvert(UnitConvert unitConvert) { - BigDecimal weight = unitConvert.getWeight(); - if (weight.compareTo(ONE) == -1) { - weight = weight.multiply(KILO); - unitConvert.setWeight(weight); - unitConvert.setUnit(KG); - if (weight.compareTo(ONE) == -1) { - weight = weight.multiply(KILO); - unitConvert.setWeight(weight); - unitConvert.setUnit(G); - } - } - } - - private static void mlConvert(UnitConvert unitConvert) { - BigDecimal weight = unitConvert.getWeight(); - if (weight.compareTo(KILO) == 1 || weight.compareTo(KILO) == 0) { - weight = weight.divide(KILO); - unitConvert.setUnit(L); - unitConvert.setWeight(weight); - if (weight.compareTo(KILO) == 1 || weight.compareTo(KILO) == 0) { - weight = weight.divide(KILO); - unitConvert.setUnit(M3); - unitConvert.setWeight(weight); - } - } - } - - private static void lConvert(UnitConvert unitConvert) { - BigDecimal weight = unitConvert.getWeight(); - if (weight.compareTo(KILO) == 1 || weight.compareTo(KILO) == 0) { - weight = weight.divide(KILO); - unitConvert.setUnit(M3); - unitConvert.setWeight(weight); - } else if (weight.compareTo(ONE) == -1) { - weight = weight.multiply(KILO); - unitConvert.setWeight(weight); - unitConvert.setUnit(ML); - } - } - - private static void m3Convert(UnitConvert unitConvert) { - BigDecimal weight = unitConvert.getWeight(); - if (weight.compareTo(ONE) == -1) { - weight = weight.multiply(KILO); - unitConvert.setWeight(weight); - unitConvert.setUnit(L); - if (weight.compareTo(ONE) == -1) { - weight = weight.multiply(KILO); - unitConvert.setWeight(weight); - unitConvert.setUnit(ML); - } - } - } - - private static void mmConvert(UnitConvert unitConvert) { - BigDecimal weight = unitConvert.getWeight(); - if (weight.compareTo(TEN) == 1 || weight.compareTo(TEN) == 0) { - weight = weight.divide(TEN); - unitConvert.setUnit(CM); - unitConvert.setWeight(weight); - if (weight.compareTo(HUNDRED) == 1 || weight.compareTo(HUNDRED) == 0) { - weight = weight.divide(HUNDRED); - unitConvert.setUnit(M); - unitConvert.setWeight(weight); - } - } - } - - private static void cmConvert(UnitConvert unitConvert) { - BigDecimal weight = unitConvert.getWeight(); - if (weight.compareTo(HUNDRED) == 1 || weight.compareTo(HUNDRED) == 0) { - weight = weight.divide(HUNDRED); - unitConvert.setUnit(M); - unitConvert.setWeight(weight); - } else if (weight.compareTo(ONE) == -1) { - weight = weight.multiply(TEN); - unitConvert.setWeight(weight); - unitConvert.setUnit(MM); - } - } - - private static void mConvert(UnitConvert unitConvert) { - BigDecimal weight = unitConvert.getWeight(); - if (weight.compareTo(ONE) == -1) { - weight = weight.multiply(HUNDRED); - unitConvert.setWeight(weight); - unitConvert.setUnit(CM); - if (weight.compareTo(ONE) == -1) { - weight = weight.multiply(TEN); - unitConvert.setWeight(weight); - unitConvert.setUnit(MM); - } - } - } - -} diff --git a/ruoyi-admin/src/main/resources/mapper/ck/PictureUploadMapper.xml b/ruoyi-admin/src/main/resources/mapper/ck/PictureUploadMapper.xml deleted file mode 100644 index 937d26ef..00000000 --- a/ruoyi-admin/src/main/resources/mapper/ck/PictureUploadMapper.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - select id, itemCode, type, version, path, uploadDate, uploadMan, spare1, spare2, spare3, spare4, spare5, spare6 from picture_upload - - - - - - - - insert into picture_upload - - itemCode, - type, - version, - path, - uploadDate, - uploadMan, - spare1, - spare2, - spare3, - spare4, - spare5, - spare6, - - - #{itemCode}, - #{type}, - #{version}, - #{path}, - #{uploadDate}, - #{uploadMan}, - #{spare1}, - #{spare2}, - #{spare3}, - #{spare4}, - #{spare5}, - #{spare6}, - - - - - update picture_upload - - itemCode = #{itemCode}, - type = #{type}, - version = #{version}, - path = #{path}, - uploadDate = #{uploadDate}, - uploadMan = #{uploadMan}, - spare1 = #{spare1}, - spare2 = #{spare2}, - spare3 = #{spare3}, - spare4 = #{spare4}, - spare5 = #{spare5}, - spare6 = #{spare6}, - - where id = #{id} - - - - delete from picture_upload where id = #{id} - - - - delete from picture_upload where id in - - #{id} - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/ck/dataCollect/dataCollect.html b/ruoyi-admin/src/main/resources/templates/ck/dataCollect/dataCollect.html deleted file mode 100644 index 806729db..00000000 --- a/ruoyi-admin/src/main/resources/templates/ck/dataCollect/dataCollect.html +++ /dev/null @@ -1,809 +0,0 @@ - - - - - - - -
-
-
- 当前单号: -
-
- -
-
- -
-
-
-

包装容量: 暂无

-

开始序号: 001 包装等级: 1级 箱子序号:

-

- 箱子代码: 暂未生成代码(该代码会在打印标签的时候生成) -

-

- - - -

- - - - -
-
-

当前装箱数量: 暂无 / 总量

-
-
-
-
-
-
-

标签重打

-

扫描标签

-
-
-
-
-
-
-
-

所属单号: - - - -

-

箱号查询: - - -

-

s  n查询: - -

- - - - - - -
-
-

- 所属产品: xxxxxxxx -

-
-
-

- 工单总数:4522 -

-
-
-
-
-

- 工单类型: 正常工单 -

-
-
-

- 优先级别:一级 -

-
-
-
-
-

- PASS数量: 4000 -

-
-
-

- FAIL数量:0 -

-
-
-
-
-

- 工艺流程: 外协厂包装流程 -

-
-
-

- 是否拼板: -

-
-
- - - - - - - - - - - - -
-
-

- 数据收集方式: 人工/扫描输入 -

-
- -
-
-
-

- 过站条码:: -

-
- -
-
-
- -
-
- - -
-
- - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/ck/upload/add.html b/ruoyi-admin/src/main/resources/templates/ck/upload/add.html deleted file mode 100644 index 0b340509..00000000 --- a/ruoyi-admin/src/main/resources/templates/ck/upload/add.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - -
-
-
- -
- -
-
-
- -
- - 代码生成请选择字典属性 -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/ck/upload/edit.html b/ruoyi-admin/src/main/resources/templates/ck/upload/edit.html deleted file mode 100644 index a910fb90..00000000 --- a/ruoyi-admin/src/main/resources/templates/ck/upload/edit.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -
-
- -
- -
- -
-
-
- -
- - 代码生成请选择字典属性 -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/ck/upload/upload.html b/ruoyi-admin/src/main/resources/templates/ck/upload/upload.html deleted file mode 100644 index bdbba085..00000000 --- a/ruoyi-admin/src/main/resources/templates/ck/upload/upload.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - - -
-
-
-
-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • -  搜索 -  重置 -
  • -
-
-
-
- - -
-
-
-
-
- - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/ck/upload/uploadPicture.html b/ruoyi-admin/src/main/resources/templates/ck/upload/uploadPicture.html deleted file mode 100644 index 353636e3..00000000 --- a/ruoyi-admin/src/main/resources/templates/ck/upload/uploadPicture.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - - - - - -
-
-
- -
-
-
- -
-
- -
- -
-
-
- -
- -
-
-
- - -
-
- - - - - - - - \ No newline at end of file