Cabinet.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace app\index\controller;
  3. use app\index\model\CabinetModel;
  4. use app\index\model\BoxModel;
  5. class Cabinet extends Base{
  6. /**
  7. * 检查取件码
  8. */
  9. public function check_fcode(){
  10. $code = input('param.code');
  11. }
  12. /**
  13. * 自提柜向服务器上报
  14. */
  15. public function record_store(){
  16. $order_sn = input('param.order_sn');
  17. $trunk = input('param.trunk');
  18. $cabinet = input('param.cabinet');
  19. $state = input('param.state');
  20. }
  21. /**
  22. * 自提柜向服务器上报用户取走商品。
  23. */
  24. public function record_fetch(){
  25. $trunk = input('param.trunk');
  26. $cabinet = input('param.cabinet');
  27. $state = input('param.state');
  28. }
  29. /**
  30. * 自提柜批量生产
  31. */
  32. public function add_cabinet(){
  33. $param = input('param.');
  34. $validate = new \app\index\validate\CabinetValidate;
  35. if (!$validate->check($param)) {
  36. return json(json_error_exception('1007',$validate->getError()));
  37. }
  38. $CabinetModel = new CabinetModel();
  39. $flag = $CabinetModel->insertCabinet($param);
  40. if($flag['code'] != 1){
  41. return json(json_error_exception('1006',$flag['msg']));
  42. }
  43. json_return(200,[],'success');
  44. }
  45. }