|
@@ -19,6 +19,8 @@ class Workshopshow extends Start_Controller
|
|
|
$this->_xdshow();
|
|
$this->_xdshow();
|
|
|
}elseif($arg == 'ordercount'){
|
|
}elseif($arg == 'ordercount'){
|
|
|
$this->_orderCount();
|
|
$this->_orderCount();
|
|
|
|
|
+ }elseif($arg == 'bbcount'){
|
|
|
|
|
+ $this->_bbCount();
|
|
|
}else {
|
|
}else {
|
|
|
$this->_index();
|
|
$this->_index();
|
|
|
}
|
|
}
|
|
@@ -39,8 +41,74 @@ class Workshopshow extends Start_Controller
|
|
|
|
|
|
|
|
//以布标为基准,
|
|
//以布标为基准,
|
|
|
private function _bbCount(){
|
|
private function _bbCount(){
|
|
|
-
|
|
|
|
|
|
|
+ //在产未交公
|
|
|
|
|
+ $zcwjg = $this->_zcwjg();
|
|
|
|
|
+ $wsc = $this->_wsc();
|
|
|
|
|
+ $ycs = $this->_tjycs();
|
|
|
|
|
+ $wjsrk = $this->_xdgxwjs();
|
|
|
|
|
+ $lz3d = $this->_gxlz3();
|
|
|
|
|
+ echo json_encode([
|
|
|
|
|
+ 'code'=>1,
|
|
|
|
|
+ 'msg'=>"success",
|
|
|
|
|
+ 'data'=>[
|
|
|
|
|
+ 'wjg_num'=>$zcwjg,
|
|
|
|
|
+ 'wsc_num'=>$wsc,
|
|
|
|
|
+ 'ycs_num'=>$ycs,
|
|
|
|
|
+ 'wjsrk_num'=>$wjsrk,
|
|
|
|
|
+ 'lz3d_num'=>$lz3d,
|
|
|
|
|
+ ]
|
|
|
|
|
+ ],JSON_UNESCAPED_UNICODE);
|
|
|
|
|
+ die;
|
|
|
|
|
+ }
|
|
|
|
|
+ //在产未交公
|
|
|
|
|
+ private function _zcwjg(){
|
|
|
|
|
+ $month_one = date("Y-m-d", strtotime("-1 month"));
|
|
|
|
|
+ $this->db->where("time >",$month_one);
|
|
|
|
|
+ $this->db->not_like('rk', '11|','before');
|
|
|
|
|
+ $this->db->where("ycrk_type",0);
|
|
|
|
|
+ $num = $this->db->count_all_results('systemtransfer');
|
|
|
|
|
+ return empty($num) ? 0 : $num;
|
|
|
}
|
|
}
|
|
|
|
|
+ //未生产单
|
|
|
|
|
+ private function _wsc(){
|
|
|
|
|
+ $month_one = date("Y-m-d", strtotime("-1 month"));
|
|
|
|
|
+ $this->db->where("printtime >",$month_one);
|
|
|
|
|
+ $this->db->where("rk","|12|");
|
|
|
|
|
+ $this->db->where("ck","|12|");
|
|
|
|
|
+ $this->db->where("ycrk_type",0);
|
|
|
|
|
+ $num = $this->db->count_all_results('systemtransfer');
|
|
|
|
|
+ return empty($num) ? 0 : $num;
|
|
|
|
|
+ }
|
|
|
|
|
+ //已超时
|
|
|
|
|
+ private function _tjycs(){
|
|
|
|
|
+ $month_one = date("Y-m-d", strtotime("-1 month"));
|
|
|
|
|
+ $this->db->where("time >",$month_one);
|
|
|
|
|
+ $this->db->where("type",1);
|
|
|
|
|
+ $this->db->where("ycrk_type",0);
|
|
|
|
|
+ $this->db->where("orver_flag",2);
|
|
|
|
|
+ $this->db->where("is_over",0);
|
|
|
|
|
+ $num = $this->db->count_all_results('systemtransfer_cr');
|
|
|
|
|
+ return empty($num) ? 0 : $num;
|
|
|
|
|
+ }
|
|
|
|
|
+ //下道工序及未及时入库
|
|
|
|
|
+ private function _xdgxwjs(){
|
|
|
|
|
+ $month_one = date("Y-m-d", strtotime("-1 month"));
|
|
|
|
|
+ $this->db->where("time >",$month_one);
|
|
|
|
|
+ $this->db->where_in('extra_status',[1,2]);
|
|
|
|
|
+ $this->db->where("ycrk_type",0);
|
|
|
|
|
+ $num = $this->db->count_all_results('systemtransfer_cr');
|
|
|
|
|
+ return empty($num) ? 0 : $num;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 工序流转超过3天
|
|
|
|
|
+ private function _gxlz3(){
|
|
|
|
|
+ $month_one = date("Y-m-d", strtotime("-1 month"));
|
|
|
|
|
+ $this->db->where("time >",$month_one);
|
|
|
|
|
+ $this->db->where("ycrk_type",0);
|
|
|
|
|
+ $this->db->where_in('extra_status',[2,3]);
|
|
|
|
|
+ $num = $this->db->count_all_results('systemtransfer_cr');
|
|
|
|
|
+ return empty($num) ? 0 : $num;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//以打印发货单的时间为基准, 超七天未出货单
|
|
//以打印发货单的时间为基准, 超七天未出货单
|
|
|
private function _orderCount(){
|
|
private function _orderCount(){
|
|
|
$dlz_r = $this->_tj7daywck("fullorder");
|
|
$dlz_r = $this->_tj7daywck("fullorder");
|