/** * 更新箱号长、宽、高、重量 * add time:2014-05-07 * add name:wangminwei */ public function view_putInBoxInfo() { $boxId = isset($_GET['boxId']) ? $_GET['boxId'] : ''; $length = isset($_GET['owlength']) ? $_GET['owlength'] : ''; $width = isset($_GET['owwidth']) ? $_GET['owwidth'] : ''; $hight = isset($_GET['owhight']) ? $_GET['owhight'] : ''; $weight = isset($_GET['owweight']) ? $_GET['owweight'] : ''; if (empty($boxId) || empty($length) || empty($width) || empty($hight) || empty($weight)) { $rtnData['code'] = '502'; $rtnData['msg'] = '参数有误'; echo json_encode($rtnData); } $boxObj = new OwInBoxStockModel(); $netWeight = $boxObj->calcBoxNetWeight($boxId); //计算箱子净重 if ($netWeight >= $weight) { $rtnData['code'] = '201'; $rtnData['msg'] = '箱子净重大于毛重,请复查'; } else { $result = $boxObj->updBoxLWG($boxId, $length, $width, $hight, $weight, $netWeight); if ($result) { $rtnData['code'] = '200'; } else { $rtnData['code'] = '404'; $rtnData['msg'] = '箱号信息更新失败'; } } echo json_encode($rtnData); }