标签打印查询修改

master
zpl 3 years ago
parent dd26cd8e5f
commit 51269282f6

@ -1,5 +1,6 @@
package com.foreverwin.mesnac.common.controller;
import cn.hutool.core.date.DateUtil;
import com.foreverwin.modular.core.exception.BusinessException;
import com.foreverwin.modular.core.util.R;
import com.foreverwin.modular.core.util.FrontPage;
@ -49,6 +50,32 @@ public class PrintLogController {
return R.ok(result);
}
/**
*
*
* @return
*/
@ResponseBody
@PostMapping("/getPrintLogListByCondition")
public R getPrintLogListByCondition(@RequestBody PrintLog printLog){
List<PrintLog> result;
try {
String site = CommonMethods.getSite();
printLog.setSite(site);
if (printLog.getStartFromDate_S() != null) {
printLog.setStartFromDate(DateUtil.parse(printLog.getStartFromDate_S()));
}
if (printLog.getStartToDate_S() != null) {
printLog.setStartToDate(DateUtil.parse(printLog.getStartToDate_S()));
}
result = printLogService.getPrintLogListByCondition(printLog);
} catch (Exception e) {
return R.failed(e.getMessage());
}
return R.ok(result);
}
@ResponseBody
@PostMapping("/labelPrint")
public R labelPrint(@RequestBody List<PrintLog> requestList) {

@ -4,6 +4,8 @@ import com.foreverwin.mesnac.common.model.PrintLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* Mapper
@ -15,4 +17,11 @@ import org.springframework.stereotype.Repository;
@Repository
public interface PrintLogMapper extends BaseMapper<PrintLog> {
/**
*
* @param printLog
* @return
*/
List<PrintLog> getPrintLogListByCondition(PrintLog printLog);
}

@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
/**
@ -124,6 +126,45 @@ public class PrintLog extends Model<PrintLog> {
@TableField(value = "ITEM_DESCRIPTION", exist = false)
private String itemDescription;
private String startFromDate_S;
@TableField(exist = false)
private String startToDate_S;
@TableField(exist = false)
private Date startFromDate;
@TableField(exist = false)
private Date startToDate;
public String getStartFromDate_S() {
return startFromDate_S;
}
public void setStartFromDate_S(String startFromDate_S) {
this.startFromDate_S = startFromDate_S;
}
public String getStartToDate_S() {
return startToDate_S;
}
public void setStartToDate_S(String startToDate_S) {
this.startToDate_S = startToDate_S;
}
public Date getStartFromDate() {
return startFromDate;
}
public void setStartFromDate(Date startFromDate) {
this.startFromDate = startFromDate;
}
public Date getStartToDate() {
return startToDate;
}
public void setStartToDate(Date startToDate) {
this.startToDate = startToDate;
}
public String getHandle() {
return handle;

@ -30,4 +30,11 @@ public interface PrintLogService extends IService<PrintLog> {
* @param printList
*/
void labelPrint(String site, String user, List<PrintLog> printList);
/**
*
* @param printLog
* @return
*/
List<PrintLog> getPrintLogListByCondition(PrintLog printLog);
}

@ -101,4 +101,9 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
printLogService.updateBatchById(printLogList);
}
@Override
public List<PrintLog> getPrintLogListByCondition(PrintLog printLog) {
return printLogMapper.getPrintLogListByCondition(printLog);
}
}
Loading…
Cancel
Save