LargeWasteRewardPunish.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. use think\db;
  5. use think\Request;
  6. use function fast\e;
  7. /**
  8. * 工序大废品惩奖记录接口
  9. */
  10. class LargeWasteRewardPunish extends Api
  11. {
  12. protected $noNeedLogin = ['*'];
  13. protected $noNeedRight = ['*'];
  14. /**
  15. * 首页
  16. *
  17. */
  18. public function index()
  19. {
  20. $this->success('请求成功');
  21. }
  22. /**
  23. * 获取工序大废品惩奖侧边栏
  24. * @ApiMethod (GET)
  25. */
  26. public function getTab()
  27. {
  28. //get请求
  29. if(!$this->request->isGet()){
  30. $this->error('请求方式错误');
  31. }
  32. $rows = db()->table('db_大废品')
  33. ->field('DISTINCT(LEFT(sys_rq, 7)) AS mouth,LEFT(sys_rq, 10) as date, COUNT(*) as counts')
  34. ->group('date')
  35. ->order('UniqId desc')
  36. ->limit(40)
  37. ->select();
  38. $list = [];
  39. foreach($rows as $key=>$value){
  40. if (!isset($list[$value['mouth']])){
  41. $list[$value['mouth']] = [];
  42. }
  43. $arr['date'] = str_replace('-', '.', $rows[$key]['date']);
  44. $arr['counts'] = $rows[$key]['counts'];
  45. array_push($list[$value['mouth']],$arr);
  46. // $list[$value['mouth']]['date'] = str_replace('-', '.', $rows[$key]['date']);
  47. }
  48. $this->success('成功',$list);
  49. }
  50. /**
  51. * 获取工序大废品惩奖侧边栏根据工单
  52. * @ApiMethod (GET)
  53. */
  54. public function getTabByGd()
  55. {
  56. //get请求
  57. if(!$this->request->isGet()){
  58. $this->error('请求方式错误');
  59. }
  60. $rows = db()->table('db_大废品')
  61. ->field('sczl_gdbh,rtrim(g.成品名称) as 成品名称')
  62. ->join('工单_基本资料 g','g.Gd_gdbh=db_大废品.sczl_gdbh','LEFT')
  63. ->group('sczl_gdbh')
  64. ->whereTime('db_大废品.sys_rq', '>=', strtotime('-60 days'))
  65. ->order('sczl_gdbh desc')
  66. ->select();
  67. foreach($rows as $key=>$value){
  68. $data[$key]['label']=$value['sczl_gdbh'].' 【'.$value['成品名称'].'】';
  69. $data[$key]['sczl_gdbh']=$value['sczl_gdbh'];
  70. }
  71. $this->success('成功',$data);
  72. }
  73. /**
  74. * 获取工序大废品惩奖列表
  75. * @ApiMethod (GET)
  76. * @param string $date 时间
  77. */
  78. public function getList()
  79. {
  80. //get请求
  81. if(!$this->request->isGet()){
  82. $this->error('请求方式错误');
  83. }
  84. $req = $this->request->param();
  85. $rq = $req['date'];
  86. $page = 1;
  87. $limit = 15;
  88. if (isset($req['page']) && !empty($req['page'])) $page = $req['page'];
  89. if (isset($req['limit']) && !empty($req['limit'])) $limit = $req['limit'];
  90. $date = substr($req['date'],0,10);
  91. $req['date'] = str_replace('.','-',$date);
  92. $where = [];
  93. if (isset($req['date']) && !empty($req['date'])){
  94. if (preg_match('/[\x{4e00}-\x{9fa5}]/u', $rq)>0){
  95. $where['sys_rq'] = ['LIKE',$req['date'].'%'];
  96. }else{
  97. $where['sczl_rq'] = ['LIKE',$req['date'].'%'];
  98. }
  99. }else{
  100. $this->error('参数错误');
  101. }
  102. $res = db()->table('db_大废品')
  103. ->field('sczl_gdbh, LEFT(sczl_rq, 10) as sczl_rq, rtrim(sczl_numDesc) as sczl_numDesc, sczl_ls, sczl_yjno,
  104. rtrim(责任部门) as 责任部门,sczl_cl,
  105. rtrim(sczl_fplxA) as sczl_fplxA, sczl_fplxB, jl_bzdh, JL_bh1,
  106. sczl_jtbh as sczl_bzdh, sczl_bh1, sczl_je1, sczl_bh2, sczl_je2, rtrim(sys_id) as sys_id, sys_rq, UniqId')
  107. ->where('sczl_gdbh',$req['date'])
  108. ->order('UniqId desc')
  109. ->page($page,$limit)
  110. ->select();
  111. if($res){
  112. $rows=$res;
  113. $total = db()->table('db_大废品')->where('sczl_gdbh',$req['date'])->count();;
  114. }else{
  115. $rows = db()->table('db_大废品')
  116. ->field('sczl_gdbh, LEFT(sczl_rq, 10) as sczl_rq, rtrim(sczl_numDesc) as sczl_numDesc, sczl_ls, sczl_yjno,
  117. rtrim(责任部门) as 责任部门, sczl_cl,
  118. rtrim(sczl_fplxA) as sczl_fplxA, sczl_fplxB, jl_bzdh, JL_bh1,
  119. sczl_jtbh as sczl_bzdh, sczl_bh1, sczl_je1, sczl_bh2, sczl_je2, rtrim(sys_id) as sys_id, sys_rq, UniqId')
  120. ->where($where)
  121. ->order('UniqId desc')
  122. ->page($page,$limit)
  123. ->select();
  124. halt($rows);
  125. $total = db()->table('db_大废品')->where($where)->count();
  126. }
  127. $gd = db()->table('工单_印件资料')->column('Yj_Gdbh, yj_yjmc');
  128. $rs = db()->table('人事_基本资料')->where('员工姓名','<>','通用编号')->column('员工编号, 员工姓名');
  129. foreach ($rows as $key=>$value) {
  130. $rows[$key]['yj_yjmc'] = array_key_exists($value['sczl_gdbh'],$gd) ? sprintf("%02d", $value['sczl_yjno']).'-'.trim($gd[$value['sczl_gdbh']]) : '';
  131. $rows[$key]['JL_bh1'] = array_key_exists($value['JL_bh1'],$rs) ? trim($rs[$value['JL_bh1']]) : '';
  132. $rows[$key]['sczl_bh1'] = array_key_exists($value['sczl_bh1'],$rs) ? trim($rs[$value['sczl_bh1']]) : '';
  133. $rows[$key]['sczl_bh2'] = array_key_exists($value['sczl_bh2'],$rs) ? trim($rs[$value['sczl_bh2']]) : '';
  134. $rows[$key]['sczl_fplxB'] = $value['sczl_fplxB'] == 1 ? '制程废' : '';
  135. if ($rows[$key]['sczl_bh1'] != '' && $value['sczl_je1'] > 0){
  136. $rows[$key]['sczl_bh1'] = $rows[$key]['sczl_bh1'].'(-'.$value['sczl_je1'].')';
  137. }
  138. if ($rows[$key]['sczl_bh2'] != '' && $value['sczl_je2'] > 0){
  139. $rows[$key]['sczl_bh2'] = $rows[$key]['sczl_bh2'].'(-'.$value['sczl_je2'].')';
  140. }
  141. unset($rows[$key]['sczl_yjno']);
  142. }
  143. $data = [
  144. 'total' => $total,
  145. 'rows' => $rows,
  146. ];
  147. $this->success('成功',$data);
  148. }
  149. /**
  150. * 获取工序大废品惩奖信息
  151. * @ApiMethod (GET)
  152. * @param string $UniqId UniqId
  153. */
  154. public function getInfo()
  155. {
  156. //get请求
  157. if(!$this->request->isGet()){
  158. $this->error('请求方式错误');
  159. }
  160. $req = $this->request->param();
  161. if (isset($req['UniqId']) && !empty($req['UniqId'])){
  162. $UniqId = $req['UniqId'];
  163. }else{
  164. $this->error('参数错误');
  165. }
  166. $rows = db()->table('db_大废品')->alias('d')
  167. ->field('sczl_gdbh,rtrim(g.Gd_cpmc) as Gd_cpmc,sczl_yjno,rtrim(yj.yj_yjmc) as yj_yjmc,
  168. rtrim(sczl_gxmc) as sczl_gxmc,sczl_gxh,rtrim(sczl_numDesc) as sczl_numDesc,LEFT(sczl_rq, 10)
  169. as sczl_rq,sczl_cl,sczl_ls,rtrim(sczl_fplxA) as sczl_fplxA,sczl_fplxB,rtrim(责任部门) as 责任部门,
  170. rtrim(jl_bzdh) as Jl_bzdh,jl_jtbh,JL_bh1,JL_bh2,JL_bh3,JL_bh4,JL_bh5,JL_bh6,JL_bh7,JL_bh8,JL_bh9,
  171. rtrim(jl1.员工姓名) as jlname1,rtrim(jl2.员工姓名) as jlname2,rtrim(jl3.员工姓名) as jlname3
  172. ,rtrim(jl4.员工姓名) as jlname4,rtrim(jl5.员工姓名) as jlname5,rtrim(jl6.员工姓名) as jlname6
  173. ,rtrim(jl7.员工姓名) as jlname7,rtrim(jl8.员工姓名) as jlname8,rtrim(jl9.员工姓名) as jlname9
  174. ,JL_Je1,JL_Je2,JL_Je3,JL_Je4,JL_Je5,JL_Je6,JL_Je7,JL_Je8,JL_Je9,rtrim(sczl_bzdh) as sczl_bzdh,
  175. sczl_jtbh,sczl_bh1,sczl_bh2,sczl_bh3,sczl_bh4,sczl_bh5,sczl_bh6,sczl_bh7,sczl_bh8,sczl_bh9,
  176. rtrim(jl_bzdh) as Jl_bzdh,jl_jtbh,JL_bh1,JL_bh2,JL_bh3,JL_bh4,JL_bh5,JL_bh6,JL_bh7,JL_bh8,JL_bh9,
  177. rtrim(zr1.员工姓名) as zrname1,rtrim(zr2.员工姓名) as zrname2,rtrim(zr3.员工姓名) as zrname3
  178. ,rtrim(zr4.员工姓名) as zrname4,rtrim(zr5.员工姓名) as zrname5,rtrim(zr6.员工姓名) as zrname6
  179. ,rtrim(zr7.员工姓名) as zrname7,rtrim(zr8.员工姓名) as zrname8,rtrim(zr9.员工姓名) as zrname9
  180. ,sczl_je1,sczl_je2,sczl_je3,sczl_je4,sczl_je5,sczl_je6,sczl_je7,sczl_je8,sczl_je9')
  181. ->join('工单_基本资料 g','g.Gd_gdbh=db_大废品.sczl_gdbh')
  182. ->join('工单_印件资料 yj','yj.Yj_Gdbh=db_大废品.sczl_gdbh','LEFT')
  183. ->join('人事_基本资料 jl1','jl1.员工编号=db_大废品.JL_bh1','LEFT')
  184. ->join('人事_基本资料 jl2','jl2.员工编号=db_大废品.JL_bh2','LEFT')
  185. ->join('人事_基本资料 jl3','jl3.员工编号=db_大废品.JL_bh3','LEFT')
  186. ->join('人事_基本资料 jl4','jl4.员工编号=db_大废品.JL_bh4','LEFT')
  187. ->join('人事_基本资料 jl5','jl5.员工编号=db_大废品.JL_bh5','LEFT')
  188. ->join('人事_基本资料 jl6','jl6.员工编号=db_大废品.JL_bh6','LEFT')
  189. ->join('人事_基本资料 jl7','jl7.员工编号=db_大废品.JL_bh7','LEFT')
  190. ->join('人事_基本资料 jl8','jl8.员工编号=db_大废品.JL_bh8','LEFT')
  191. ->join('人事_基本资料 jl9','jl9.员工编号=db_大废品.JL_bh9','LEFT')
  192. ->join('人事_基本资料 zr1','zr1.员工编号=db_大废品.sczl_bh1','LEFT')
  193. ->join('人事_基本资料 zr2','zr2.员工编号=db_大废品.sczl_bh2','LEFT')
  194. ->join('人事_基本资料 zr3','zr3.员工编号=db_大废品.sczl_bh3','LEFT')
  195. ->join('人事_基本资料 zr4','zr4.员工编号=db_大废品.sczl_bh4','LEFT')
  196. ->join('人事_基本资料 zr5','zr5.员工编号=db_大废品.sczl_bh5','LEFT')
  197. ->join('人事_基本资料 zr6','zr6.员工编号=db_大废品.sczl_bh6','LEFT')
  198. ->join('人事_基本资料 zr7','zr7.员工编号=db_大废品.sczl_bh7','LEFT')
  199. ->join('人事_基本资料 zr8','zr8.员工编号=db_大废品.sczl_bh8','LEFT')
  200. ->join('人事_基本资料 zr9','zr9.员工编号=db_大废品.sczl_bh9','LEFT')
  201. ->where('d.UniqId',$UniqId)->limit(1)->select();
  202. $this->success('成功',$rows);
  203. }
  204. /**
  205. * 工单编号获取
  206. * @return void
  207. * @throws \think\exception\DbException
  208. * @throws db\exception\DataNotFoundException
  209. * @throws db\exception\ModelNotFoundException
  210. */
  211. public function JunkWorkOrderList()
  212. {
  213. if ($this->request->isGet() === false){
  214. $this->error('非法请求');
  215. }
  216. $params = $this->request->param();
  217. if (empty($params['search'])){
  218. $this->error('参数错误');
  219. }
  220. $list = \db('工单_基本资料')
  221. ->field('rtrim(Gd_gdbh) as 工单编号,rtrim(成品名称) as 产品名称')
  222. ->where('Gd_gdbh','like','%'.$params['search'].'%')
  223. ->select();
  224. if (empty($list)){
  225. $this->success('未找到工单信息');
  226. }
  227. $this->success('成功',$list);
  228. }
  229. /**
  230. * 印件编号获取
  231. * @return void
  232. * @throws \think\exception\DbException
  233. * @throws db\exception\DataNotFoundException
  234. * @throws db\exception\ModelNotFoundException
  235. */
  236. public function PrintCodeList()
  237. {
  238. if ($this->request->isGet() === false){
  239. $this->error('非法请求');
  240. }
  241. $param = $this->request->param();
  242. if (empty($param['workorder'])){
  243. $this->error('参数错误');
  244. }
  245. $list = \db('工单_印件资料')
  246. ->field('rtrim(yj_Yjno) as 印件号,rtrim(yj_yjmc) as 印件名称')
  247. ->where('Yj_Gdbh',$param['workorder'])
  248. ->select();
  249. if (empty($list)){
  250. $this->success('未找到该工单印件');
  251. }
  252. $this->success('成功',$list);
  253. }
  254. /**
  255. * 工单工序获取
  256. * @return void
  257. * @throws \think\exception\DbException
  258. * @throws db\exception\DataNotFoundException
  259. * @throws db\exception\ModelNotFoundException
  260. */
  261. public function ProcessList()
  262. {
  263. if ($this->request->isGet() === false){
  264. $this->error('非法请求');
  265. }
  266. $param = $this->request->param();
  267. if (empty($param['workorder']) || empty($param['yjno'])){
  268. $this->error('参数错误');
  269. }
  270. $list = \db('工单_工艺资料')
  271. ->field('rtrim(Gy0_gxh) as gxh,rtrim(Gy0_gxmc) as gxmc')
  272. ->where('Gy0_gdbh',$param['workorder'])
  273. ->where('Gy0_yjno',$param['yjno'])
  274. ->select();
  275. if (empty($list)){
  276. $this->success('未找到该工单工艺');
  277. }
  278. $data = [];
  279. foreach ($list as $key=>$value){
  280. if ((int)$value['gxh'] < 10){
  281. $value['gxh'] = '0'.$value['gxh'];
  282. }
  283. $data[$key] = $value['gxh'].'-'.$value['gxmc'];
  284. }
  285. $this->success('成功',$data);
  286. }
  287. /**
  288. * 机台编号获取
  289. * @return void
  290. * @throws \think\exception\DbException
  291. * @throws db\exception\DataNotFoundException
  292. * @throws db\exception\ModelNotFoundException
  293. */
  294. public function MachineList()
  295. {
  296. if ($this->request->isGet() === false){
  297. $this->error('非法请求');
  298. }
  299. $param = $this->request->param();
  300. $list = \db('设备_产量计酬')
  301. ->alias('a')
  302. ->join('人事_基本资料 b1','a.sczl_bh1 = b1.员工编号','left')
  303. ->join('人事_基本资料 b2','a.sczl_bh2 = b2.员工编号','left')
  304. ->join('人事_基本资料 b3','a.sczl_bh3 = b3.员工编号','left')
  305. ->join('人事_基本资料 b4','a.sczl_bh4 = b4.员工编号','left')
  306. ->join('人事_基本资料 b5','a.sczl_bh5 = b5.员工编号','left')
  307. ->join('人事_基本资料 b6','a.sczl_bh6 = b6.员工编号','left')
  308. ->join('人事_基本资料 b7','a.sczl_bh7 = b7.员工编号','left')
  309. ->join('人事_基本资料 b8','a.sczl_bh8 = b8.员工编号','left')
  310. ->join('人事_基本资料 b9','a.sczl_bh9 = b9.员工编号','left')
  311. ->join('人事_基本资料 b10','a.sczl_bh10 = b10.员工编号','left')
  312. ->field('a.sczl_gxmc as 工序名称,a.sczl_jtbh as 机台编号,a.sczl_bh1 as 员工编号1,rtrim(b1.员工姓名) as 员工姓名1
  313. ,a.sczl_bh2 as 员工编号2,rtrim(b2.员工姓名) as 员工姓名2,a.sczl_bh3 as 员工编号3,rtrim(b3.员工姓名) as 员工姓名3
  314. ,a.sczl_bh4 as 员工编号4,rtrim(b4.员工姓名) as 员工姓名4,a.sczl_bh5 as 员工编号5,rtrim(b5.员工姓名) as 员工姓名5
  315. ,a.sczl_bh6 as 员工编号6,rtrim(b6.员工姓名) as 员工姓名6,a.sczl_bh7 as 员工编号7,rtrim(b7.员工姓名) as 员工姓名7
  316. ,a.sczl_bh8 as 员工编号8,rtrim(b8.员工姓名) as 员工姓名8,a.sczl_bh9 as 员工编号9,rtrim(b9.员工姓名) as 员工姓名9
  317. ,a.sczl_bh10 as 员工编号10,rtrim(b10.员工姓名) as 员工姓名10')
  318. ->where('a.sczl_gdbh',$param['gdbh'])
  319. ->where('a.sczl_yjno',$param['yjno'])
  320. ->where('a.sczl_bzdh','like',substr($param['bzdh'],0,1).'%')
  321. ->group('机台编号,员工编号1,员工编号2,员工编号3,员工编号4,员工编号5,员工编号6,员工编号7,员工编号8,员工编号9,员工编号10')
  322. ->select();
  323. // $list = \db('设备_基本资料')
  324. // ->field('rtrim(设备编号) as 设备编号')
  325. // ->where('sys_sbID','<>','')
  326. // ->select();
  327. if (empty($list)){
  328. $this->success('未找到机台编号');
  329. }
  330. $this->success('成功',$list);
  331. }
  332. /**
  333. * 机台班组获取
  334. * @return void
  335. * @throws \think\exception\DbException
  336. * @throws db\exception\DataNotFoundException
  337. * @throws db\exception\ModelNotFoundException
  338. */
  339. public function MachineClassList()
  340. {
  341. if ($this->request->isGet() === false){
  342. $this->error('非法请求');
  343. }
  344. $param = $this->request->param();
  345. if (empty($param['machine'])){
  346. $this->error('参数错误');
  347. }
  348. $list = \db('设备_班组资料')
  349. ->where('sczl_jtbh',$param['machine'])
  350. ->field('rtrim(sczl_bh1) as bh1,rtrim(sczl_bh2) as bh2,rtrim(sczl_bh3) as bh3,
  351. rtrim(sczl_bh4) as bh4,rtrim(sczl_bh5) as bh5,rtrim(sczl_bh6) as bh6,
  352. rtrim(sczl_bh7) as bh7,rtrim(sczl_bh8) as bh8,rtrim(sczl_bh9) as bh9,
  353. rtrim(sczl_bh10) as bh10,rtrim(sczl_bzdh) as 班组代号')
  354. ->select();
  355. if (empty($list)){
  356. $this->success('未找到该机台班组');
  357. }
  358. foreach ($list as $key=>$value){
  359. for ($i=1;$i<=10;$i++){
  360. if (!empty($value['bh'.$i])){
  361. $name = \db('人事_基本资料')->where('员工编号',$value['bh'.$i])->field('rtrim(员工姓名) as name')->find();
  362. if (isset($name['name'])){
  363. $list[$key]['组员'.$i] = [
  364. '编号' => $value['bh'.$i],
  365. '姓名' => $name['name']
  366. ];
  367. }
  368. }else{
  369. $list[$key]['组员'.$i] = [
  370. '编号' => '',
  371. '姓名' => ''
  372. ];
  373. }
  374. unset($list[$key]['bh'.$i]);
  375. }
  376. }
  377. $this->success('成功',$list);
  378. }
  379. /**
  380. * 大废品数据修改
  381. * @return void
  382. * @throws \think\Exception
  383. * @throws \think\exception\PDOException
  384. * @throws db\exception\BindParamException
  385. */
  386. public function JunkDetailEdit()
  387. {
  388. if (Request::instance()->isPost() === false){
  389. $this->error('非法请求');
  390. }
  391. $param = Request::instance()->post();
  392. if (empty($param['sczl_gdbh']) || empty($param['UniqId'])){
  393. $this->error('参数错误');
  394. }
  395. $param['mod_rq'] = date('Y-m-d H:i:s',time());
  396. $data = $param;
  397. unset($data['UniqId']);
  398. $sql = \db('db_大废品')
  399. ->where('UniqId',$param['UniqId'])
  400. ->fetchSql(true)
  401. ->update($data);
  402. $res = \db()->query($sql);
  403. if ($res !== false){
  404. $this->success('修改成功');
  405. }else{
  406. $this->error('失败');
  407. }
  408. }
  409. /**
  410. * 大废品数据添加
  411. * @return void
  412. * @throws \think\exception\PDOException
  413. * @throws db\exception\BindParamException
  414. */
  415. public function JunkDetailAdd()
  416. {
  417. if (Request::instance()->isPost() === false){
  418. $this->error('非法请求');
  419. }
  420. $param = Request::instance()->post();
  421. if (empty($param['sczl_gdbh'])){
  422. $this->error('参数错误');
  423. }
  424. $lastID = \db('db_大废品')->order('UniqId desc')->value('UniqId');
  425. $param['sys_rq'] = date('Y-m-d H:i:s',time());
  426. $param['mod_rq'] = '1900-01-01 00:00:00';
  427. $param['UniqId'] = $lastID + 1;
  428. $sql = \db('db_大废品')->fetchSql(true)->insert($param);
  429. $res = \db()->query($sql);
  430. if ($res !== false){
  431. $this->success('添加成功');
  432. }else{
  433. $this->error('失败');
  434. }
  435. }
  436. /**
  437. * 大废品数据删除
  438. * @return void
  439. * @throws \think\Exception
  440. * @throws \think\exception\PDOException
  441. */
  442. public function JunkDetailDel()
  443. {
  444. if ($this->request->isGet() === false){
  445. $this->error('非法请求');
  446. }
  447. $param = $this->request->param();
  448. if (empty($param['UniqId'])){
  449. $this->error('参数错误');
  450. }
  451. $idList = explode(',',$param['UniqId']);
  452. $res = \db('db_大废品')
  453. ->whereIn('UniqId',$idList)
  454. ->delete();
  455. if ($res !== false){
  456. $this->success('删除成功');
  457. }else{
  458. $this->error('失败');
  459. }
  460. }
  461. }