|
@@ -78,7 +78,7 @@ public class OmstruckOrderSeparateController extends BaseRESTfulController {
|
|
|
BigDecimal orderId = DataChange.dataToBigDecimal(map.get("orderId"));
|
|
|
String orderNumber = (String) map.get("orderNumber");
|
|
|
List<Map<String, Object>> result = null;
|
|
|
- if (orderId.intValue() != 0) {
|
|
|
+ if (orderId != null && orderId.intValue() != 0) {
|
|
|
result = omstruckOrderSeparateService.getOrderResult(orderId);
|
|
|
}
|
|
|
else if(orderNumber != null) {
|
|
@@ -218,12 +218,12 @@ public class OmstruckOrderSeparateController extends BaseRESTfulController {
|
|
|
@PostMapping("/getCapacityAllOrder")
|
|
|
public RESTfulResult getCapacityAllOrder(String capacityNumber,String date){
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
- date += "-01 00:00:00";
|
|
|
map.put("capacityNumber",capacityNumber);
|
|
|
- DateTimeFormatter sdf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
- LocalDateTime ldt = LocalDateTime.parse(date,sdf);
|
|
|
try {
|
|
|
if(date != null){
|
|
|
+ date += "-01 00:00:00";
|
|
|
+ DateTimeFormatter sdf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
+ LocalDateTime ldt = LocalDateTime.parse(date,sdf);
|
|
|
int month = ldt.getMonth().getValue();
|
|
|
int year = ldt.getYear();
|
|
|
// 判断是否是一月,一月则减一年,月份回到12
|