|
|
|
@ -13,6 +13,7 @@ import com.foreverwin.mesnac.common.service.PrintLogService;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
import com.foreverwin.modular.core.exception.BusinessException;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
|
@ -70,6 +71,7 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
|
|
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
|
|
list.get(i).setPrinter(printList.get(i).getPrintName());
|
|
|
|
|
list.get(i).setPrintTemplate(printList.get(i).getPrintTemplate());
|
|
|
|
|
list.get(i).setPrintNum(printList.get(i).getPrintNum());
|
|
|
|
|
}
|
|
|
|
|
String post = HttpUtil.post(printServer, JSON.toJSONString(list), 60000);
|
|
|
|
|
/**
|
|
|
|
@ -91,10 +93,11 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
|
|
|
|
|
printLogOne.setHandle(printLog.getHandle());
|
|
|
|
|
printLogOne.setIsPrint("true");
|
|
|
|
|
Integer printNum = printLog.getPrintNum();
|
|
|
|
|
if (printNum == null){
|
|
|
|
|
printLogOne.setPrintNum(1);
|
|
|
|
|
String getOther1 = printLog.getOther1();
|
|
|
|
|
if (getOther1 == null){
|
|
|
|
|
printLogOne.setOther1("1");
|
|
|
|
|
}else {
|
|
|
|
|
printLogOne.setPrintNum(printNum+1);
|
|
|
|
|
printLogOne.setOther1(String.valueOf(Integer.valueOf(getOther1) + printNum));
|
|
|
|
|
}
|
|
|
|
|
if (!printLog.getCategory().equals(Constants.PRINT_TYPE_SFC)){
|
|
|
|
|
printLogOne.setPrintName(printLog.getPrintName());
|
|
|
|
@ -109,4 +112,13 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
|
|
|
|
|
public List<PrintLog> getPrintLogListByCondition(PrintLog printLog) {
|
|
|
|
|
return printLogMapper.getPrintLogListByCondition(printLog);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 0/3 20 * * ? ")
|
|
|
|
|
public void myTask(){
|
|
|
|
|
List<PrintLog> list = printLogService.list();
|
|
|
|
|
for (PrintLog printLog:list) {
|
|
|
|
|
printLog.setModifiedDateTime(LocalDateTime.now());
|
|
|
|
|
}
|
|
|
|
|
printLogService.updateBatchById(list);
|
|
|
|
|
}
|
|
|
|
|
}
|