| | |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | wrapper.set("receiver_ids",defectiveHis.getReceiverIds()); |
| | | wrapper.set("receiver_names",defectiveHis.getReceiverNames()); |
| | | wrapper.set("confirm_status",defectiveHis.getConfirmStatus()); |
| | | wrapper.set("bad_product",defectiveHis.getBadProduct()); |
| | | if(defectiveHis.getBadProduct()==0){ |
| | | defectiveHis.setConfirmStatus(2);//不良品数量为0结束 |
| | | }else { |
| | | defectiveHis.setConfirmStatus(1); |
| | | } |
| | | wrapper.set("confirm_status",defectiveHis.getConfirmStatus()); |
| | | wrapper.set("note",defectiveHis.getNote()); |
| | | wrapper.eq("id",defectiveHis.getDeftId()); |
| | | mapper.update(null,wrapper); |
| | |
| | | |
| | | return new Response().set(1,true); |
| | | } |
| | | |
| | | //归档不良品 |
| | | public Response stopDefective(int deftId) { |
| | | //修改当前表记录 |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | wrapper.set("confirm_status",3);//归档 |
| | | wrapper.eq("id",deftId); |
| | | mapper.update(null,wrapper); |
| | | //记录处理记录 |
| | | DefectiveProductsHistory defectiveHis=new DefectiveProductsHistory(); |
| | | defectiveHis.setDeftId(deftId); |
| | | defectiveHis.setConfirmStatus(3); |
| | | defectiveHis.setBadProduct(0); |
| | | defectiveHisService.updateDefective(defectiveHis); |
| | | return new Response().set(1,true); |
| | | } |
| | | } |