|
@@ -213,9 +213,10 @@ class WasteRecord extends Base {
|
|
|
public function saveRecord($data){
|
|
|
$curtime = getTime();
|
|
|
$data['serial_number'] = get_unique_id();
|
|
|
- if(!$data['create_time']){
|
|
|
- $data['create_time'] = $curtime;
|
|
|
- }
|
|
|
+// if(!$data['create_time']){
|
|
|
+// $data['create_time'] = $curtime;
|
|
|
+// }
|
|
|
+ $data['create_time'] = $curtime;
|
|
|
$data['create_yyyy'] = date('Y',strtotime($data['create_time']));
|
|
|
$data['create_yyyymm'] = date('Ym',strtotime($data['create_time']));
|
|
|
$data['create_yyyymmdd'] = date('Ymd',strtotime($data['create_time']));
|
|
@@ -232,7 +233,7 @@ class WasteRecord extends Base {
|
|
|
'user_id' => $data['user_id'],
|
|
|
'waste_record_id' => $waste_record_id,
|
|
|
];
|
|
|
- $res = Db::name('waste_record_user')->insert( $sdata);
|
|
|
+ $res = Db::name('waste_record_user')->insert($sdata);
|
|
|
if (!$res) {
|
|
|
throw new Exception('保存操作记录失败');
|
|
|
}
|