|
|
@@ -203,14 +203,14 @@ class PersonSalaryService extends Service
|
|
|
if(! $status) return [false, $msg];
|
|
|
|
|
|
if($is_add){
|
|
|
- $bool = MonthlyPsOrder::where('code',$data['code'])
|
|
|
- ->where('top_depart_id', $data['top_depart_id'])
|
|
|
+ $bool = MonthlyPsOrder::where('top_depart_id', $data['top_depart_id'])
|
|
|
+ ->where('month', $data['month'])
|
|
|
->where('del_time',0)
|
|
|
->exists();
|
|
|
}else{
|
|
|
if(empty($data['id'])) return [false,'ID不能为空'];
|
|
|
- $bool = MonthlyPsOrder::where('code',$data['code'])
|
|
|
- ->where('top_depart_id', $data['top_depart_id'])
|
|
|
+ $bool = MonthlyPsOrder::where('top_depart_id', $data['top_depart_id'])
|
|
|
+ ->where('month', $data['month'])
|
|
|
->where('id','<>',$data['id'])
|
|
|
->where('del_time',0)
|
|
|
->exists();
|