|
|
@@ -531,19 +531,19 @@ class U8ThirdPartyService extends Service
|
|
|
if(empty($value['lineNum'])) return [false, '行号不能为空'];
|
|
|
if(! is_numeric($value['lineNum'])) return [false, '行号错误'];
|
|
|
if(empty($value['materialCode'])) return [false, '存货编码不能为空'];
|
|
|
- if(empty($value['productDate'])) return [false, '生产日期不能为空'];
|
|
|
- $return = $this->formatAndValidateDate($value['productDate']);
|
|
|
- if(! $return) return [false, '生产日期格式错误'];
|
|
|
- $productDate = $return;
|
|
|
- if(empty($value['failureDate'])) return [false, '失效日期不能为空'];
|
|
|
- $return = $this->formatAndValidateDate($value['failureDate']);
|
|
|
- if(! $return) return [false, '生产日期格式错误'];
|
|
|
- $failureDate= $return;
|
|
|
+// if(empty($value['productDate'])) return [false, '生产日期不能为空'];
|
|
|
+// $return = $this->formatAndValidateDate($value['productDate']);
|
|
|
+// if(! $return) return [false, '生产日期格式错误'];
|
|
|
+// $productDate = $return;
|
|
|
+// if(empty($value['failureDate'])) return [false, '失效日期不能为空'];
|
|
|
+// $return = $this->formatAndValidateDate($value['failureDate']);
|
|
|
+// if(! $return) return [false, '生产日期格式错误'];
|
|
|
+// $failureDate= $return;
|
|
|
if(empty($value['lot'])) return [false, '批号不能为空'];
|
|
|
if(empty($value['iQuantity']) || ! is_numeric($value['iQuantity'])) return [false, '存货数量错误'];
|
|
|
$detail_map[$value['materialCode']][] = [
|
|
|
- 'productDate' => $productDate,
|
|
|
- 'failureDate' => $failureDate,
|
|
|
+// 'productDate' => $productDate,
|
|
|
+// 'failureDate' => $failureDate,
|
|
|
'lot' => $value['lot'],
|
|
|
'iQuantity' => $value['iQuantity'],
|
|
|
];
|
|
|
@@ -614,8 +614,8 @@ class U8ThirdPartyService extends Service
|
|
|
"itaxunitprice" => (float)$taxUnitPrice,
|
|
|
"iunitprice" => (float)$iUnitPrice,
|
|
|
"inatunitprice" => (float)$iUnitPrice,
|
|
|
- "dvDate" => (string)$value['failureDate'], // 示例中只需失效日期
|
|
|
-// "dMDate" => (string)$value['productDate'], // todo
|
|
|
+ "dvDate" => $value['failureDate'] ?? null, // 示例中只需失效日期
|
|
|
+// "dMDate" => (string)$value['productDate'],
|
|
|
"iSOsID" => (int)$item['iSOsID'], // 强制转整型,去掉引号
|
|
|
"cBatch" => (string)$value['lot'],
|
|
|
'cFree1' => $item['cFree1'],
|