Compare commits

..

2 Commits

Author SHA1 Message Date
余文财 23ca847b93 Merge remote-tracking branch 'origin/1.0' into 1.0 2025-03-28 21:45:50 +08:00
余文财 4331fe9919 优化 2025-03-28 21:45:46 +08:00
2 changed files with 29 additions and 25 deletions

View File

@ -5,9 +5,13 @@ import com.dpkj.common.dto.LexMarkResultDTO;
import com.dpkj.common.vo.Result; import com.dpkj.common.vo.Result;
import com.dpkj.modules.print.request.ReceiptPrintRequest; import com.dpkj.modules.print.request.ReceiptPrintRequest;
import com.dpkj.modules.print.service.PrintService; import com.dpkj.modules.print.service.PrintService;
import com.dpkj.modules.print.vo.PrinterStatus;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;

View File

@ -54,12 +54,12 @@ public class RegisterServiceImpl implements PrintService {
if (StringUtils.isEmpty(printerConfig.getTimeType())) { if (StringUtils.isEmpty(printerConfig.getTimeType())) {
throw new RRException("获取打印时间格式出错:" + printerConfig.getTimeType()); throw new RRException("获取打印时间格式出错:" + printerConfig.getTimeType());
} }
if ( StringUtils.isEmpty(printerConfig.getTerminalNumber())){ // if ( StringUtils.isEmpty(printerConfig.getTerminalNumber())){
throw new RRException("获取终端号出错:" + printerConfig.getTerminalNumber()); // throw new RRException("获取终端号出错:" + printerConfig.getTerminalNumber());
} // }
// 强行设置终端号 // 强行设置终端号
data.put("terminalNumber", printerConfig.getTerminalNumber()); // data.put("terminalNumber", printerConfig.getTerminalNumber());
// 强行设置终端号和打印时间 // 强行设置终端号和打印时间
SimpleDateFormat sdf = new SimpleDateFormat(printerConfig.getTimeType()); SimpleDateFormat sdf = new SimpleDateFormat(printerConfig.getTimeType());