/** +---------------------------------------------------------- * 数据漫游检查 +---------------------------------------------------------- * @access dataRoamCheck +---------------------------------------------------------- * @param string $do 1是点击触发 2是数据自动穿透(钩子) +---------------------------------------------------------- * @param string $type 执行范围 (‘update,insert,delete’) +---------------------------------------------------------- * @param string $do 当即执行标示 +---------------------------------------------------------- * @return false|integer +---------------------------------------------------------- */ private static function dataRoamTargetModelNotice($roamid, $tablename, $where) { //查询此数据漫游所有需要比较的字段 $MisSystemDataRoamCompareDao = M("mis_system_data_roam_compare"); $compareMap = array(); $compareMap['targettable'] = $tablename; $compareMap['roamtype'] = 1; $compareMap['masid'] = $roamid; $MisSystemDataRoamCompareList = $MisSystemDataRoamCompareDao->where($compareMap)->select(); //$MisSystemDataRoamMasAction=A("MisSystemDataRoamMas"); // echo $MisSystemDataRoamCompareDao->getLastSql(); // print_R($MisSystemDataRoamCompareList); //获取selectlist foreach ($MisSystemDataRoamCompareList as $key => $val) { //targettable 目标 $targettableModel = D($val['targettable']); $targetMap = array(); $targetMap['_string'] = $where; //查询字段 $targetList = M($tablename)->query('select * from ' . $tablename . ' ' . $where . ''); //$targetList=$targettableModel->where($targetMap)->find(); // print_R($targettableModel->getLastSql()); $roleexp = getSelectByName('roleexp', $val['roleinexp']); $compare = 0; if ($val['operatetype'] == 1) { //目标表额定字段 $compare = $targetList[$val['compare']]; } else { //定值 $compare = $val['compareval']; } $result = self::autoCaculate($targetList[$val['tfield']], html_entity_decode($roleexp), $compare); if ($result) { if ($val['msginfo']) { return $val['msginfo']; } else { //查询表字段信息 $fieldsAll = $this->changesourcefield($val['targettable'], '1'); return $fieldsAll[$val['tfield']]['showname'] . "(" . getDigits($targetList[$val['tfield']]) . ")【" . getSelectByName('roleinexp', $val['roleinexp']) . "】" . $fieldsAll[$val['compare']]['showname'] . "(" . getDigits($targetList[$val['compare']]) . ")" . "判断不成立,请查证后再提交!"; } } } }
/** * * @Title: financeBusinessInvoice * @Description: todo(财务报表 应收实收) * @author renling * @date 2014-3-31 上午11:36:10 * @throws */ public function financeBusinessInvoice() { $time = transTime(time(), 'Y-m'); $time = str_replace('-', '年', $time); $time = $time . "月"; $this->assign("title", $time . "应收实收账款对比"); //发票表 $MisFinanceBusinessInvoiceModel = D('MisFinanceBusinessInvoice'); // $time="2014年01月"; $time = $time . '-1'; //月开始时间 例如 2013-10-1 0:00:00 $time = str_replace('年', '-', $time); $time = str_replace('月', '', $time); $time = str_replace(' ', '', $time); $begindate = strtotime($time); $endtime = strtotime('next month', $begindate) - 1; //月结束时间 例如 2013-10-31 23:59:59 //查询部门应收实收账款 $MisFinanceBusinessInvoiceList = $MisFinanceBusinessInvoiceModel->query("SELECT SUM(amount) AS 'amount',SUM(financeamount) AS 'financeamount' ,depttype FROM mis_finance_business_invoice WHERE financestatus=1 and createtime>=" . $begindate . " and createtime<=" . $endtime . " GROUP BY (depttype)"); //查询数据不存在 默认为0 if (!$MisFinanceBusinessInvoiceList) { $MisFinanceBusinessInvoiceList[0]['amount'] = 0; $MisFinanceBusinessInvoiceList[0]['financeamount'] = 0; $MisFinanceBusinessInvoiceList[0]['depttype'] = 1; $MisFinanceBusinessInvoiceList[1]['amount'] = 0; $MisFinanceBusinessInvoiceList[1]['financeamount'] = 0; $MisFinanceBusinessInvoiceList[1]['depttype'] = 2; $MisFinanceBusinessInvoiceList[2]['amount'] = 0; $MisFinanceBusinessInvoiceList[2]['financeamount'] = 0; $MisFinanceBusinessInvoiceList[2]['depttype'] = 3; } $FinanceArray[0] = array("name" => "amount", "title" => "应收款"); $FinanceArray[1] = array("name" => "financeamount", "title" => "实收款"); $xAxis = array("categories" => array()); $series = array(); // 系列创建完成 开始创建数据 foreach ($FinanceArray as $fkey => $fval) { $seriesdata = array(); foreach ($MisFinanceBusinessInvoiceList as $key => $val) { if (!in_array($val['depttype'], array_keys($depttype))) { $depttype[$val['depttype']] = 1; $xAxis["categories"][] = getSelectByName('customertype', $val['depttype']); } $seriesdata[] = floatval(str_replace(",", "", getDigits($val[$fval['name']]))); } $series[] = array('name' => $fval['title'], 'data' => $seriesdata); } $this->assign("headerFormat", "<span>{point.key}</span><table>"); $this->assign("pointFormat", "<tr><td >{series.name}: </td><td ><b>{point.y}元</b></td></tr>"); $this->assign("text", "金额(元)"); $this->assign("distype", "column"); $this->assign("xAxis", json_encode($xAxis)); $this->assign("series", json_encode($series)); }
{ $path = base_url() . 'site/views/modules/mod_online/number'; $ret = '<img src="' . $path . '/' . $digit_type . '/' . $digit . '.png"'; $ret .= ' />'; return $ret; } /* ------------------------------------------------------------------------------------------------ */ $rs = $this->online->hits(); $is_online = $this->online->get_is_online(); ?> <div align="center"> <?php $path = base_url() . 'site/mod/mod_online/icon/'; $digit_type = get_params('number', $attr); $number_digits = get_params('total_number', $attr); $arr = getDigits($rs->c_count, $number_digits); foreach ($arr as $digit) { echo showDigitImage($digit_type, $digit); } ?> </div> <h2>Thống kê truy cập</h2> <table class="widget-entry" style="width: 100%;"> <tr> <td style="width: 20px;"><img src="<?php echo $path . 'vall.png'; ?> " alt=""></td> <td><?php echo lang('counter.online'); ?>