Merge remote-tracking branch 'origin/master'
commit
cb3c61da6a
@ -0,0 +1,108 @@
|
||||
package com.op.mes.controller;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
//import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.op.common.core.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.op.common.log.annotation.Log;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.log.enums.BusinessType;
|
||||
import com.op.mes.domain.WcsPrintTask;
|
||||
import com.op.mes.service.IWcsPrintTaskService;
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 生产箱码和托盘绑定关系Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/task")
|
||||
public class WcsPrintTaskController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWcsPrintTaskService wcsPrintTaskService;
|
||||
|
||||
/**
|
||||
* 查询生产箱码和托盘绑定关系列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WcsPrintTask wcsPrintTask,@RequestParam(required = false) String beginTime,
|
||||
@RequestParam(required = false) String endTime)
|
||||
{
|
||||
// 直接使用前端传递的完整时间格式
|
||||
if (StringUtils.isNotEmpty(beginTime)){
|
||||
wcsPrintTask.getParams().put("beginTime", beginTime);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(endTime)) {
|
||||
wcsPrintTask.getParams().put("endTime", endTime);
|
||||
}
|
||||
startPage();
|
||||
List<WcsPrintTask> list = wcsPrintTaskService.selectWcsPrintTaskList(wcsPrintTask);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出生产箱码和托盘绑定关系列表
|
||||
*/
|
||||
@Log(title = "生产箱码和托盘绑定关系", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WcsPrintTask wcsPrintTask,@RequestParam(required = false) String beginTime,
|
||||
@RequestParam(required = false) String endTime)
|
||||
{
|
||||
if (StringUtils.isNotEmpty(beginTime) && StringUtils.isNotEmpty(endTime)) {
|
||||
wcsPrintTask.getParams().put("beginTime", beginTime + " 00:00:00");
|
||||
wcsPrintTask.getParams().put("endTime", endTime + " 23:59:59");
|
||||
}
|
||||
|
||||
List<WcsPrintTask> list = wcsPrintTaskService.selectWcsPrintTaskList(wcsPrintTask);
|
||||
ExcelUtil<WcsPrintTask> util = new ExcelUtil<WcsPrintTask>(WcsPrintTask.class);
|
||||
util.exportExcel(response, list, "生产箱码和托盘绑定关系数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生产箱码和托盘绑定关系详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(wcsPrintTaskService.selectWcsPrintTaskById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产箱码和托盘绑定关系
|
||||
*/
|
||||
@Log(title = "生产箱码和托盘绑定关系", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WcsPrintTask wcsPrintTask)
|
||||
{
|
||||
return toAjax(wcsPrintTaskService.insertWcsPrintTask(wcsPrintTask));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产箱码和托盘绑定关系
|
||||
*/
|
||||
@Log(title = "生产箱码和托盘绑定关系", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WcsPrintTask wcsPrintTask)
|
||||
{
|
||||
return toAjax(wcsPrintTaskService.updateWcsPrintTask(wcsPrintTask));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产箱码和托盘绑定关系
|
||||
*/
|
||||
@Log(title = "生产箱码和托盘绑定关系", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(wcsPrintTaskService.deleteWcsPrintTaskByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
package com.op.mes.controller;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
//import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.op.common.log.annotation.Log;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.log.enums.BusinessType;
|
||||
import com.op.mes.domain.WcsTrayBoxs;
|
||||
import com.op.mes.service.IWcsTrayBoxsService;
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/boxs")
|
||||
public class WcsTrayBoxsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWcsTrayBoxsService wcsTrayBoxsService;
|
||||
|
||||
/**
|
||||
* 查询【d打码信息】列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WcsTrayBoxs wcsTrayBoxs, @RequestParam(value = "startTime", required = false)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startTime,
|
||||
@RequestParam(value = "endTime", required = false)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endTime)
|
||||
{
|
||||
// 设置时间范围到查询对象
|
||||
wcsTrayBoxs.setStartTime(startTime);
|
||||
wcsTrayBoxs.setEndTime(endTime);
|
||||
startPage();
|
||||
List<WcsTrayBoxs> list = wcsTrayBoxsService.selectWcsTrayBoxsList(wcsTrayBoxs);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【打码信息】列表
|
||||
*/
|
||||
@Log(title = "【打码信息】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WcsTrayBoxs wcsTrayBoxs)
|
||||
{
|
||||
// 导出逻辑保持不变,底层复用相同的查询方法
|
||||
List<WcsTrayBoxs> list = wcsTrayBoxsService.selectWcsTrayBoxsList(wcsTrayBoxs);
|
||||
ExcelUtil<WcsTrayBoxs> util = new ExcelUtil<>(WcsTrayBoxs.class);
|
||||
util.exportExcel(response, list, "打码信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【打码信息】详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(wcsTrayBoxsService.selectWcsTrayBoxsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【打码信息】
|
||||
*/
|
||||
@Log(title = "【打码信息】", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WcsTrayBoxs wcsTrayBoxs)
|
||||
{
|
||||
return toAjax(wcsTrayBoxsService.insertWcsTrayBoxs(wcsTrayBoxs));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【打码信息】
|
||||
*/
|
||||
@Log(title = "【打码信息】", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WcsTrayBoxs wcsTrayBoxs)
|
||||
{
|
||||
return toAjax(wcsTrayBoxsService.updateWcsTrayBoxs(wcsTrayBoxs));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【打码信息】
|
||||
*/
|
||||
@Log(title = "【打码信息】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(wcsTrayBoxsService.deleteWcsTrayBoxsByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,280 @@
|
||||
package com.op.mes.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 生产箱码和托盘绑定关系对象 wcs_print_task
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-24
|
||||
*/
|
||||
public class WcsPrintTask extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 打印任务ID */
|
||||
private String id;
|
||||
|
||||
/** 工单号 */
|
||||
@Excel(name = "工单号")
|
||||
private String workorderCode;
|
||||
|
||||
/** 打印状态 */
|
||||
@Excel(name = "打印状态")
|
||||
private String printStatus;
|
||||
|
||||
/** 产线编码 */
|
||||
@Excel(name = "产线编码")
|
||||
private String lineCode;
|
||||
|
||||
/** 预留字段1 */
|
||||
@Excel(name = "预留字段1")
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
@Excel(name = "预留字段2")
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
@Excel(name = "预留字段3")
|
||||
private String attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
@Excel(name = "预留字段4")
|
||||
private String attr4;
|
||||
|
||||
/** 删除字段标识(0未删除1删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 打印标签码 */
|
||||
@Excel(name = "打印标签码")
|
||||
private String printLableCode;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private Long quantity;
|
||||
|
||||
/** 序号 */
|
||||
@Excel(name = "序号")
|
||||
private Long inum;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String productName;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String batchCode;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String productDate;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String productUnit;
|
||||
/**
|
||||
* 开始结束日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime beginTime;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
public LocalDateTime getBeginTime() {
|
||||
return beginTime;
|
||||
}
|
||||
|
||||
public void setBeginTime(LocalDateTime beginTime) {
|
||||
this.beginTime = beginTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(LocalDateTime endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setWorkorderCode(String workorderCode)
|
||||
{
|
||||
this.workorderCode = workorderCode;
|
||||
}
|
||||
|
||||
public String getWorkorderCode()
|
||||
{
|
||||
return workorderCode;
|
||||
}
|
||||
public void setPrintStatus(String printStatus)
|
||||
{
|
||||
this.printStatus = printStatus;
|
||||
}
|
||||
|
||||
public String getPrintStatus()
|
||||
{
|
||||
return printStatus;
|
||||
}
|
||||
public void setLineCode(String lineCode)
|
||||
{
|
||||
this.lineCode = lineCode;
|
||||
}
|
||||
|
||||
public String getLineCode()
|
||||
{
|
||||
return lineCode;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(String attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public String getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(String attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public String getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setPrintLableCode(String printLableCode)
|
||||
{
|
||||
this.printLableCode = printLableCode;
|
||||
}
|
||||
|
||||
public String getPrintLableCode()
|
||||
{
|
||||
return printLableCode;
|
||||
}
|
||||
public void setQuantity(Long quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public Long getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
public void setInum(Long inum)
|
||||
{
|
||||
this.inum = inum;
|
||||
}
|
||||
|
||||
public Long getInum()
|
||||
{
|
||||
return inum;
|
||||
}
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
public void setBatchCode(String batchCode)
|
||||
{
|
||||
this.batchCode = batchCode;
|
||||
}
|
||||
|
||||
public String getBatchCode()
|
||||
{
|
||||
return batchCode;
|
||||
}
|
||||
public void setProductDate(String productDate)
|
||||
{
|
||||
this.productDate = productDate;
|
||||
}
|
||||
|
||||
public String getProductDate()
|
||||
{
|
||||
return productDate;
|
||||
}
|
||||
public void setProductUnit(String productUnit)
|
||||
{
|
||||
this.productUnit = productUnit;
|
||||
}
|
||||
|
||||
public String getProductUnit()
|
||||
{
|
||||
return productUnit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("workorderCode", getWorkorderCode())
|
||||
.append("printStatus", getPrintStatus())
|
||||
.append("lineCode", getLineCode())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("printLableCode", getPrintLableCode())
|
||||
.append("quantity", getQuantity())
|
||||
.append("inum", getInum())
|
||||
.append("productName", getProductName())
|
||||
.append("batchCode", getBatchCode())
|
||||
.append("productDate", getProductDate())
|
||||
.append("productUnit", getProductUnit())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.mes.domain.WcsPrintTask;
|
||||
|
||||
/**
|
||||
* 生产箱码和托盘绑定关系Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-24
|
||||
*/
|
||||
public interface WcsPrintTaskMapper
|
||||
{
|
||||
/**
|
||||
* 查询生产箱码和托盘绑定关系
|
||||
*
|
||||
* @param id 生产箱码和托盘绑定关系主键
|
||||
* @return 生产箱码和托盘绑定关系
|
||||
*/
|
||||
public WcsPrintTask selectWcsPrintTaskById(String id);
|
||||
|
||||
/**
|
||||
* 查询生产箱码和托盘绑定关系列表
|
||||
*
|
||||
* @param wcsPrintTask 生产箱码和托盘绑定关系
|
||||
* @return 生产箱码和托盘绑定关系集合
|
||||
*/
|
||||
public List<WcsPrintTask> selectWcsPrintTaskList(WcsPrintTask wcsPrintTask);
|
||||
|
||||
/**
|
||||
* 新增生产箱码和托盘绑定关系
|
||||
*
|
||||
* @param wcsPrintTask 生产箱码和托盘绑定关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWcsPrintTask(WcsPrintTask wcsPrintTask);
|
||||
|
||||
/**
|
||||
* 修改生产箱码和托盘绑定关系
|
||||
*
|
||||
* @param wcsPrintTask 生产箱码和托盘绑定关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWcsPrintTask(WcsPrintTask wcsPrintTask);
|
||||
|
||||
/**
|
||||
* 删除生产箱码和托盘绑定关系
|
||||
*
|
||||
* @param id 生产箱码和托盘绑定关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWcsPrintTaskById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除生产箱码和托盘绑定关系
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWcsPrintTaskByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.mes.domain.WcsTrayBoxs;
|
||||
|
||||
/**
|
||||
* 【打码信息】Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
public interface WcsTrayBoxsMapper
|
||||
{
|
||||
/**
|
||||
* 查询【打码信息】
|
||||
*
|
||||
* @param id 【打码信息】主键
|
||||
* @return 【打码信息】
|
||||
*/
|
||||
public WcsTrayBoxs selectWcsTrayBoxsById(String id);
|
||||
|
||||
/**
|
||||
* 查询【打码信息】列表
|
||||
*
|
||||
* @param wcsTrayBoxs 【打码信息】
|
||||
* @return 【打码信息】集合
|
||||
*/
|
||||
public List<WcsTrayBoxs> selectWcsTrayBoxsList(WcsTrayBoxs wcsTrayBoxs);
|
||||
|
||||
/**
|
||||
* 新增【打码信息】
|
||||
*
|
||||
* @param wcsTrayBoxs 【打码信息】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWcsTrayBoxs(WcsTrayBoxs wcsTrayBoxs);
|
||||
|
||||
/**
|
||||
* 修改【打码信息】
|
||||
*
|
||||
* @param wcsTrayBoxs 【打码信息】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWcsTrayBoxs(WcsTrayBoxs wcsTrayBoxs);
|
||||
|
||||
/**
|
||||
* 删除【打码信息】
|
||||
*
|
||||
* @param id 【打码信息】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWcsTrayBoxsById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除【打码信息】
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWcsTrayBoxsByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.mes.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.mes.domain.WcsTrayBoxs;
|
||||
|
||||
/**
|
||||
* 【打码信息】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
public interface IWcsTrayBoxsService
|
||||
{
|
||||
/**
|
||||
* 查询【打码信息】
|
||||
*
|
||||
* @param id 【打码信息】主键
|
||||
* @return 【打码信息】
|
||||
*/
|
||||
public WcsTrayBoxs selectWcsTrayBoxsById(String id);
|
||||
|
||||
/**
|
||||
* 查询【打码信息】列表
|
||||
*
|
||||
* @param wcsTrayBoxs 【打码信息】
|
||||
* @return 【打码信息】集合
|
||||
*/
|
||||
public List<WcsTrayBoxs> selectWcsTrayBoxsList(WcsTrayBoxs wcsTrayBoxs);
|
||||
|
||||
/**
|
||||
* 新增【打码信息】
|
||||
*
|
||||
* @param wcsTrayBoxs 【打码信息】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWcsTrayBoxs(WcsTrayBoxs wcsTrayBoxs);
|
||||
|
||||
/**
|
||||
* 修改【打码信息】
|
||||
*
|
||||
* @param wcsTrayBoxs 【打码信息】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWcsTrayBoxs(WcsTrayBoxs wcsTrayBoxs);
|
||||
|
||||
/**
|
||||
* 批量删除【打码信息】
|
||||
*
|
||||
* @param ids 需要删除的【打码信息】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWcsTrayBoxsByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除【打码信息】信息
|
||||
*
|
||||
* @param id 【打码信息】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWcsTrayBoxsById(String id);
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.op.mes.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.op.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.op.mes.mapper.WcsPrintTaskMapper;
|
||||
import com.op.mes.domain.WcsPrintTask;
|
||||
import com.op.mes.service.IWcsPrintTaskService;
|
||||
|
||||
/**
|
||||
* 生产箱码和托盘绑定关系Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-24
|
||||
*/
|
||||
@Service
|
||||
public class WcsPrintTaskServiceImpl implements IWcsPrintTaskService
|
||||
{
|
||||
@Autowired
|
||||
private WcsPrintTaskMapper wcsPrintTaskMapper;
|
||||
|
||||
/**
|
||||
* 查询生产箱码和托盘绑定关系
|
||||
*
|
||||
* @param id 生产箱码和托盘绑定关系主键
|
||||
* @return 生产箱码和托盘绑定关系
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public WcsPrintTask selectWcsPrintTaskById(String id)
|
||||
{
|
||||
return wcsPrintTaskMapper.selectWcsPrintTaskById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询生产箱码和托盘绑定关系列表
|
||||
*
|
||||
* @param wcsPrintTask 生产箱码和托盘绑定关系
|
||||
* @return 生产箱码和托盘绑定关系
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<WcsPrintTask> selectWcsPrintTaskList(WcsPrintTask wcsPrintTask)
|
||||
{
|
||||
return wcsPrintTaskMapper.selectWcsPrintTaskList(wcsPrintTask);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产箱码和托盘绑定关系
|
||||
*
|
||||
* @param wcsPrintTask 生产箱码和托盘绑定关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertWcsPrintTask(WcsPrintTask wcsPrintTask)
|
||||
{
|
||||
wcsPrintTask.setCreateTime(DateUtils.getNowDate());
|
||||
return wcsPrintTaskMapper.insertWcsPrintTask(wcsPrintTask);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产箱码和托盘绑定关系
|
||||
*
|
||||
* @param wcsPrintTask 生产箱码和托盘绑定关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateWcsPrintTask(WcsPrintTask wcsPrintTask)
|
||||
{
|
||||
wcsPrintTask.setUpdateTime(DateUtils.getNowDate());
|
||||
return wcsPrintTaskMapper.updateWcsPrintTask(wcsPrintTask);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除生产箱码和托盘绑定关系
|
||||
*
|
||||
* @param ids 需要删除的生产箱码和托盘绑定关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteWcsPrintTaskByIds(String[] ids)
|
||||
{
|
||||
return wcsPrintTaskMapper.deleteWcsPrintTaskByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产箱码和托盘绑定关系信息
|
||||
*
|
||||
* @param id 生产箱码和托盘绑定关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteWcsPrintTaskById(String id)
|
||||
{
|
||||
return wcsPrintTaskMapper.deleteWcsPrintTaskById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package com.op.mes.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.op.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.op.mes.mapper.WcsTrayBoxsMapper;
|
||||
import com.op.mes.domain.WcsTrayBoxs;
|
||||
import com.op.mes.service.IWcsTrayBoxsService;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
@Service
|
||||
public class WcsTrayBoxsServiceImpl implements IWcsTrayBoxsService
|
||||
{
|
||||
@Autowired
|
||||
private WcsTrayBoxsMapper wcsTrayBoxsMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public WcsTrayBoxs selectWcsTrayBoxsById(String id)
|
||||
{
|
||||
return wcsTrayBoxsMapper.selectWcsTrayBoxsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param wcsTrayBoxs 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<WcsTrayBoxs> selectWcsTrayBoxsList(WcsTrayBoxs wcsTrayBoxs)
|
||||
{
|
||||
return wcsTrayBoxsMapper.selectWcsTrayBoxsList(wcsTrayBoxs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param wcsTrayBoxs 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWcsTrayBoxs(WcsTrayBoxs wcsTrayBoxs)
|
||||
{
|
||||
return wcsTrayBoxsMapper.insertWcsTrayBoxs(wcsTrayBoxs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param wcsTrayBoxs 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWcsTrayBoxs(WcsTrayBoxs wcsTrayBoxs)
|
||||
{
|
||||
return wcsTrayBoxsMapper.updateWcsTrayBoxs(wcsTrayBoxs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWcsTrayBoxsByIds(String[] ids)
|
||||
{
|
||||
return wcsTrayBoxsMapper.deleteWcsTrayBoxsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWcsTrayBoxsById(String id)
|
||||
{
|
||||
return wcsTrayBoxsMapper.deleteWcsTrayBoxsById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,155 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.op.mes.mapper.WcsPrintTaskMapper">
|
||||
|
||||
<resultMap type="WcsPrintTask" id="WcsPrintTaskResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="workorderCode" column="workorder_code" />
|
||||
<result property="printStatus" column="print_status" />
|
||||
<result property="lineCode" column="line_code" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="printLableCode" column="print_lable_code" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="inum" column="inum" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="batchCode" column="batch_code" />
|
||||
<result property="productDate" column="product_date" />
|
||||
<result property="productUnit" column="product_unit" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWcsPrintTaskVo">
|
||||
select id, workorder_code, print_status, line_code, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, del_flag, print_lable_code, quantity, inum, product_name, batch_code, product_date, product_unit from wcs_print_task
|
||||
</sql>
|
||||
|
||||
<select id="selectWcsPrintTaskList" parameterType="WcsPrintTask" resultMap="WcsPrintTaskResult">
|
||||
<include refid="selectWcsPrintTaskVo"/>
|
||||
<where>
|
||||
<if test="workorderCode != null and workorderCode != ''"> and workorder_code = #{workorderCode}</if>
|
||||
<if test="printStatus != null and printStatus != ''"> and print_status = #{printStatus}</if>
|
||||
<if test="lineCode != null and lineCode != ''"> and line_code = #{lineCode}</if>
|
||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
||||
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
|
||||
<if test="printLableCode != null and printLableCode != ''"> and print_lable_code = #{printLableCode}</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="inum != null "> and inum = #{inum}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="batchCode != null and batchCode != ''"> and batch_code = #{batchCode}</if>
|
||||
<if test="productDate != null and productDate != ''"> and product_date = #{productDate}</if>
|
||||
<if test="productUnit != null and productUnit != ''"> and product_unit = #{productUnit}</if>
|
||||
<!-- 其他条件 -->
|
||||
<if test="beginTime != null">
|
||||
AND wcs_print_task.create_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
AND wcs_print_task.create_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectWcsPrintTaskById" parameterType="String" resultMap="WcsPrintTaskResult">
|
||||
<include refid="selectWcsPrintTaskVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWcsPrintTask" parameterType="WcsPrintTask">
|
||||
insert into wcs_print_task
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="workorderCode != null and workorderCode != ''">workorder_code,</if>
|
||||
<if test="printStatus != null">print_status,</if>
|
||||
<if test="lineCode != null">line_code,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="printLableCode != null">print_lable_code,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="inum != null">inum,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="batchCode != null">batch_code,</if>
|
||||
<if test="productDate != null">product_date,</if>
|
||||
<if test="productUnit != null">product_unit,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="workorderCode != null and workorderCode != ''">#{workorderCode},</if>
|
||||
<if test="printStatus != null">#{printStatus},</if>
|
||||
<if test="lineCode != null">#{lineCode},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="printLableCode != null">#{printLableCode},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="inum != null">#{inum},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="batchCode != null">#{batchCode},</if>
|
||||
<if test="productDate != null">#{productDate},</if>
|
||||
<if test="productUnit != null">#{productUnit},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWcsPrintTask" parameterType="WcsPrintTask">
|
||||
update wcs_print_task
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="workorderCode != null and workorderCode != ''">workorder_code = #{workorderCode},</if>
|
||||
<if test="printStatus != null">print_status = #{printStatus},</if>
|
||||
<if test="lineCode != null">line_code = #{lineCode},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="printLableCode != null">print_lable_code = #{printLableCode},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="inum != null">inum = #{inum},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="batchCode != null">batch_code = #{batchCode},</if>
|
||||
<if test="productDate != null">product_date = #{productDate},</if>
|
||||
<if test="productUnit != null">product_unit = #{productUnit},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWcsPrintTaskById" parameterType="String">
|
||||
delete from wcs_print_task where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWcsPrintTaskByIds" parameterType="String">
|
||||
delete from wcs_print_task where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.op.mes.mapper.WcsTrayBoxsMapper">
|
||||
|
||||
<resultMap type="WcsTrayBoxs" id="WcsTrayBoxsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="boxCode" column="box_code" />
|
||||
<result property="lineCode" column="line_code" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWcsTrayBoxsVo">
|
||||
select id, tray_code, box_code, line_code, create_time from wcs_tray_boxs
|
||||
</sql>
|
||||
|
||||
<select id="selectWcsTrayBoxsList" parameterType="WcsTrayBoxs" resultMap="WcsTrayBoxsResult">
|
||||
<include refid="selectWcsTrayBoxsVo"/>
|
||||
<where>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="boxCode != null and boxCode != ''"> and box_code = #{boxCode}</if>
|
||||
<if test="lineCode != null and lineCode != ''"> and line_code = #{lineCode}</if>
|
||||
|
||||
<!-- 时间范围查询 -->
|
||||
<if test="startTime != null and endTime != null">
|
||||
AND create_time BETWEEN #{startTime,jdbcType=TIMESTAMP} AND #{endTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectWcsTrayBoxsById" parameterType="String" resultMap="WcsTrayBoxsResult">
|
||||
<include refid="selectWcsTrayBoxsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWcsTrayBoxs" parameterType="WcsTrayBoxs">
|
||||
insert into wcs_tray_boxs
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="boxCode != null">box_code,</if>
|
||||
<if test="lineCode != null">line_code,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="boxCode != null">#{boxCode},</if>
|
||||
<if test="lineCode != null">#{lineCode},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWcsTrayBoxs" parameterType="WcsTrayBoxs">
|
||||
update wcs_tray_boxs
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="boxCode != null">box_code = #{boxCode},</if>
|
||||
<if test="lineCode != null">line_code = #{lineCode},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWcsTrayBoxsById" parameterType="String">
|
||||
delete from wcs_tray_boxs where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWcsTrayBoxsByIds" parameterType="String">
|
||||
delete from wcs_tray_boxs where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue