diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/BoxWorkformHead.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/BoxWorkformHead.java deleted file mode 100644 index 6b44fbb2..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/domain/BoxWorkformHead.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.ruoyi.ck.domain; - -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 箱号对象 box_workform_head - * - * @author sunzhenhu - * @date 2021-07-20 - */ -public class BoxWorkformHead extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** */ - private Long id; - - /** 箱号 */ - @Excel(name = "箱号") - private String boxCode; - - /** 所属单号 */ - @Excel(name = "所属单号") - private String workformCode; - - - /** 最大值 */ - @Excel(name = "最大值") - private Long maxNum; - - @Excel(name = "当前数量") - private Long currNum; - /** */ - @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 setBoxCode(String boxCode) - { - this.boxCode = boxCode; - } - - public String getBoxCode() - { - return boxCode; - } - public void setWorkformCode(String workformCode) - { - this.workformCode = workformCode; - } - - public String getWorkformCode() - { - return workformCode; - } - public void setMaxNum(Long maxNum) - { - this.maxNum = maxNum; - } - - public Long getMaxNum() - { - return maxNum; - } - 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; - } - - public Long getCurrNum() { - return currNum; - } - - public void setCurrNum(Long currNum) { - this.currNum = currNum; - } - - @Override - public String toString() { - return "BoxWorkformHead{" + - "id=" + id + - ", boxCode='" + boxCode + '\'' + - ", workformCode='" + workformCode + '\'' + - ", maxNum=" + maxNum + - ", currNum=" + currNum + - ", space1='" + space1 + '\'' + - ", space2='" + space2 + '\'' + - '}'; - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/BoxWorkformHeadMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/BoxWorkformHeadMapper.java deleted file mode 100644 index 31a5990a..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/BoxWorkformHeadMapper.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.ruoyi.ck.mapper; - -import com.ruoyi.ck.domain.BoxWorkformHead; - -import java.util.List; - -/** - * 箱号Mapper接口 - * - * @author sunzhenhu - * @date 2021-07-20 - */ -public interface BoxWorkformHeadMapper -{ - /** - * 查询箱号 - * - * @param id 箱号ID - * @return 箱号 - */ - public BoxWorkformHead selectBoxWorkformHeadById(Long id); - - - /** - * 返回流水数量 - * - * @return 数量 - */ - public int selectCountByDate(); - - - - - /** - * 查询箱号列表 - * - * @param boxWorkformHead 箱号 - * @return 箱号集合 - */ - public List selectBoxWorkformHeadList(BoxWorkformHead boxWorkformHead); - - /** - * 新增箱号 - * - * @param boxWorkformHead 箱号 - * @return 结果 - */ - public int insertBoxWorkformHead(BoxWorkformHead boxWorkformHead); - - /** - * 修改箱号 - * - * @param boxWorkformHead 箱号 - * @return 结果 - */ - public int updateBoxWorkformHead(BoxWorkformHead boxWorkformHead); - - /** - * 删除箱号 - * - * @param id 箱号ID - * @return 结果 - */ - public int deleteBoxWorkformHeadById(Long id); - - /** - * 批量删除箱号 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteBoxWorkformHeadByIds(String[] ids); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/IBoxWorkformHeadService.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/service/IBoxWorkformHeadService.java deleted file mode 100644 index b8341dc7..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/IBoxWorkformHeadService.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.ruoyi.ck.service; - -import com.ruoyi.ck.domain.BoxWorkformHead; -import com.ruoyi.ck.utils.Result; - -import java.util.List; - -/** - * 箱号Service接口 - * - * @author sunzhenhu - * @date 2021-07-20 - */ -public interface IBoxWorkformHeadService -{ - /** - * 查询箱号 - * - * @param id 箱号ID - * @return 箱号 - */ - public BoxWorkformHead selectBoxWorkformHeadById(Long id); - - /** - * 返回流水数量 - * - * @return 数量 - */ - public int selectCountByDate(); - - /** - * 查询箱号列表 - * - * @param boxWorkformHead 箱号 - * @return 箱号集合 - */ - public List selectBoxWorkformHeadList(BoxWorkformHead boxWorkformHead); - - /** - * 新增箱号 - * - * @param boxWorkformHead 箱号 - * @return 结果 - */ - public int insertBoxWorkformHead(BoxWorkformHead boxWorkformHead); - - /** - * 修改箱号 - * - * @param boxWorkformHead 箱号 - * @return 结果 - */ - public int updateBoxWorkformHead(BoxWorkformHead boxWorkformHead); - - /** - * 批量删除箱号 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteBoxWorkformHeadByIds(String ids); - - /** - * 删除箱号信息 - * - * @param id 箱号ID - * @return 结果 - */ - public int deleteBoxWorkformHeadById(Long id); - - - /** - * 为工单formCode设置n个箱子 - * - * @param boxWorkformHead 箱子相关参数 - * @return 结果 - */ - public int setBoxNumWorkform(BoxWorkformHead boxWorkformHead); - - /** - * 打印盒子标签 - * - * @param boxWorkformHead 箱子相关参数 - * @return 结果 - */ - public int printBoxTag(BoxWorkformHead boxWorkformHead); - - public Result deleteBox(String boxCode)throws Exception; - -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/BoxWorkformHeadServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/BoxWorkformHeadServiceImpl.java deleted file mode 100644 index ee5f5af4..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/BoxWorkformHeadServiceImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -//package com.ruoyi.ck.service.impl; -// -//import com.ruoyi.ck.domain.BoxWorkformHead; -//import com.ruoyi.ck.domain.TagTemplate; -//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.IBoxWorkformHeadService; -//import com.ruoyi.ck.utils.Result; -//import com.ruoyi.common.core.text.Convert; -//import com.ruoyi.common.utils.BartenderUtils; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.stereotype.Service; -// -//import java.text.SimpleDateFormat; -//import java.util.*; -// -///** -// * 箱号Service业务层处理 -// * -// * @author sunzhenhu -// * @date 2021-07-20 -// */ -//@Service -//public class BoxWorkformHeadServiceImpl implements IBoxWorkformHeadService { -// @Autowired -// private BoxWorkformHeadMapper boxWorkformHeadMapper; -// -// @Autowired -// private WorkformHeadMapper workformHeadMapper; -// -// @Autowired -// private BartenderUtils bartenderUtils; -// -// @Autowired -// private WorkformBoxProductMapper workformBoxProductMapper; -// -// /** -// * 查询箱号 -// * -// * @param id 箱号ID -// * @return 箱号 -// */ -// @Override -// public BoxWorkformHead selectBoxWorkformHeadById(Long id) { -// return boxWorkformHeadMapper.selectBoxWorkformHeadById(id); -// } -// -// /** -// * 返回流水数量 -// * -// * @return 数量 -// */ -// @Override -// public int selectCountByDate() { -// return boxWorkformHeadMapper.selectCountByDate(); -// } -// -// /** -// * 查询箱号列表 -// * -// * @param boxWorkformHead 箱号 -// * @return 箱号 -// */ -// @Override -// public List selectBoxWorkformHeadList(BoxWorkformHead boxWorkformHead) { -// return boxWorkformHeadMapper.selectBoxWorkformHeadList(boxWorkformHead); -// } -// -// /** -// * 新增箱号 -// * -// * @param boxWorkformHead 箱号 -// * @return 结果 -// */ -// @Override -// public int insertBoxWorkformHead(BoxWorkformHead boxWorkformHead) { -// return boxWorkformHeadMapper.insertBoxWorkformHead(boxWorkformHead); -// } -// -// /** -// * 修改箱号 -// * -// * @param boxWorkformHead 箱号 -// * @return 结果 -// */ -// @Override -// public int updateBoxWorkformHead(BoxWorkformHead boxWorkformHead) { -// return boxWorkformHeadMapper.updateBoxWorkformHead(boxWorkformHead); -// } -// -// /** -// * 删除箱号对象 -// * -// * @param ids 需要删除的数据ID -// * @return 结果 -// */ -// @Override -// public int deleteBoxWorkformHeadByIds(String ids) { -// return boxWorkformHeadMapper.deleteBoxWorkformHeadByIds(Convert.toStrArray(ids)); -// } -// -// /** -// * 删除箱号信息 -// * -// * @param id 箱号ID -// * @return 结果 -// */ -// @Override -// public int deleteBoxWorkformHeadById(Long id) { -// return boxWorkformHeadMapper.deleteBoxWorkformHeadById(id); -// } -// -// /** -// * 为工单formCode设置n个箱子 -// * -// * @param boxWorkformHead 箱子相关参数 -// * @return 结果 -// */ -// @Override -// public int setBoxNumWorkform(BoxWorkformHead boxWorkformHead) { -// WorkformHead workformHead = new WorkformHead(); -// workformHead.setFormCode(boxWorkformHead.getWorkformCode()); -// workformHead = workformHeadMapper.selectWorkformHeadByCode(workformHead); -// int maxNum = Math.toIntExact(boxWorkformHead.getMaxNum()); -// int sum = workformHead.getFormNeedNum(); -// int boxnum = (sum / maxNum); -// if (sum % maxNum != 0) { -// boxnum++; -// } -// int key = 0; -// boxWorkformHead.setCurrNum((long) 0); -// for (int i = 0; i < boxnum; i++) { -// key = boxWorkformHeadMapper.insertBoxWorkformHead(boxWorkformHead); -// if (key == 0) { -// return key; -// } -// } -// return key; -// } -// -// /** -// * 打印盒子标签 -// * -// * @param boxWorkformHead 箱子相关参数 -// * @return 结果 -// */ -// @Override -// public int printBoxTag(BoxWorkformHead boxWorkformHead) { -// WorkformHead workformHead = new WorkformHead(); -// workformHead.setFormCode(boxWorkformHead.getWorkformCode()); -// workformHead = workformHeadMapper.selectWorkformHeadByCode(workformHead); -// if (workformHead == null) {//以防万一这里继续判断一次 -// return 0; -// } -// SimpleDateFormat df = new SimpleDateFormat("yyMMdd"); -// SimpleDateFormat df02 = new SimpleDateFormat("MM"); -// -// Calendar calendar = Calendar.getInstance(); -// calendar.setTimeInMillis(Calendar.getInstance().getTimeInMillis()); -// Date date = new Date(); -// int year = date.getYear(); -// year = year % 10; -// int count = boxWorkformHeadMapper.selectCountByDate(); -// -// TagTemplate tagTemplate = new TagTemplate(); -// if (boxWorkformHead.getBoxCode() != null && !boxWorkformHead.getBoxCode().equals("")) { -// tagTemplate.setBox_id(boxWorkformHead.getBoxCode()); -// String a = boxWorkformHead.getBoxCode().substring(1); -// tagTemplate.setBox_id_text(a); -// } else { -// tagTemplate.initBoxId_text(workformHead.getVendor(), "A", calendar, count); -// tagTemplate.setBox_id("B" + tagTemplate.getBox_id_text()); -// } -// -// tagTemplate.setVendor_text(workformHead.getVendor()); -// tagTemplate.setVendor("V" + workformHead.getVendor()); -// -// tagTemplate.setBatch_text(year + "" + df02.format(date) + workformHead.getBatch()); -// tagTemplate.setBatch("L" + year + "" + df02.format(date) + workformHead.getBatch()); -// -// tagTemplate.setCreatetime_text(df.format(date)); -// tagTemplate.setCreatetime("D" + (df.format(date))); -// -// tagTemplate.setQuantity_text(String.valueOf(boxWorkformHead.getCurrNum())); -// tagTemplate.setQuantity("Q" + Math.toIntExact(boxWorkformHead.getCurrNum())); -// -// tagTemplate.setWlCode_text(workformHead.getWlCode()); -// tagTemplate.setWlCode("P" + workformHead.getWlCode()); -// -// tagTemplate.setSpecial_text(workformHead.getSpecial()); -// tagTemplate.setSpecial("S" + workformHead.getSpecial()); -// -// tagTemplate.setOther_text(workformHead.getOther()); -// if (workformHead.getOther() == null || workformHead.getOther().equals("")) { -// tagTemplate.setOther_prefix(""); -// } else { -// tagTemplate.setOther_prefix("(O)"); -// tagTemplate.setOther("O" + workformHead.getOther()); -// } -// List tagTemplates = new ArrayList<>(); -// tagTemplates.add(tagTemplate); -// int i = bartenderUtils.printQRcodeLabel(Collections.singletonList(tagTemplates)); -// if (i > 0) { -// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); -// boxWorkformHead.setBoxCode(tagTemplate.getBox_id()); -// boxWorkformHead.setSpace1(format.format(date)); -// return boxWorkformHeadMapper.updateBoxWorkformHead(boxWorkformHead); -// } -// return 0; -// } -// -// @Override -// public Result deleteBox(String boxCode)throws Exception { -// BoxWorkformHead boxWorkformHead = new BoxWorkformHead(); -// boxWorkformHead.setBoxCode(boxCode); -// List list = boxWorkformHeadMapper.selectBoxWorkformHeadList(boxWorkformHead); -// if (list.size() > 1) { -// return Result.getFailResult("箱号查询到多条!", null); -// } -// if (list.size() <= 0){ -// return Result.getFailResult("未查询到该箱号!", null); -// } -// Long id = list.get(0).getId(); -// boxWorkformHeadMapper.deleteBoxWorkformHeadById(id); -// workformBoxProductMapper.deleteWorkformBoxProductByBoxId(Math.toIntExact(id)); -// return Result.getSuccessResult(null); -// } -// -// -//} diff --git a/ruoyi-admin/src/main/resources/mapper/ck/BoxWorkformHeadMapper.xml b/ruoyi-admin/src/main/resources/mapper/ck/BoxWorkformHeadMapper.xml deleted file mode 100644 index 70c18ba4..00000000 --- a/ruoyi-admin/src/main/resources/mapper/ck/BoxWorkformHeadMapper.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - select id, box_code, workform_code, max_num, curr_num, space1, space2 from box_workform_head - - - - - - - - - - - insert into box_workform_head - - box_code, - workform_code, - max_num, - curr_num - - space1, - space2, - - - #{boxCode}, - #{workformCode}, - #{maxNum}, - #{currNum} - - #{space1}, - #{space2}, - - - - - update box_workform_head - - box_code = #{boxCode}, - workform_code = #{workformCode}, - max_num = #{maxNum}, - curr_num = #{currNum}, - space1 = #{space1}, - space2 = #{space2}, - - where id = #{id} - - - - delete from box_workform_head where id = #{id} - - - - delete from box_workform_head where id in - - #{id} - - - - - \ No newline at end of file