|
@@ -6,7 +6,9 @@ import com.steerinfo.dil.util.DataChange;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.xml.crypto.Data;
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -65,7 +67,9 @@ public class TmstruckSelfMachineController extends BaseRESTfulController {
|
|
|
Map<String,Object> bigDecimal=new HashMap<>();
|
|
|
bigDecimal.put("printnumber",0);
|
|
|
Map<String,Object> bigDecimal1 = tmstruckSelfMachineService.queryNumber(orderNumber);
|
|
|
- if(bigDecimal1 != null && DataChange.dataToBigDecimal(bigDecimal1.get("printnumber")).intValue() > 5) {
|
|
|
+ if(bigDecimal1 == null
|
|
|
+ || (DataChange.dataToBigDecimal(bigDecimal1.get("printnumber")).intValue() > 5)
|
|
|
+ || (bigDecimal1.get("printDate")!=null && new Date().getTime() - ((Date)bigDecimal1.get("printDate")).getTime() < 1000*60*3)) {
|
|
|
bigDecimal.put("printnumber",1);
|
|
|
}
|
|
|
return bigDecimal;
|