| | |
| | | import com.example.erp.dto.mm.FinishedOperateLogDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailProductDTO; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import com.example.erp.entity.sd.*; |
| | | import com.example.erp.entity.userInfo.Log; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper; |
| | | import com.example.erp.mapper.mm.FinishedOperateLogMapper; |
| | | import com.example.erp.mapper.sd.*; |
| | | import com.example.erp.service.mm.FinishedGoodsInventoryService; |
| | | import com.example.erp.service.userInfo.LogService; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Autowired |
| | | FinishedGoodsInventoryMapper finishedGoodsInventoryMapper; |
| | | @Autowired |
| | | FinishedOperateLogMapper finishedOperateLogMapper; |
| | | @Autowired |
| | | DeliveryOtherMoneyMapper deliveryOtherMoneyMapper; |
| | | @Autowired |
| | | LogService logService; |
| | | @Autowired |
| | | SysErrorService sysErrorService; |
| | | @Autowired |
| | | FinishedGoodsInventoryService finishedGoodsInventoryService; |
| | | |
| | | |
| | | public Map<String, Object> getSelectShippingOrder(Integer pageNum, Integer pageSize,List<String> selectDate, Delivery delivery) { |
| | |
| | | } |
| | | |
| | | |
| | | public Boolean updateDeliveryToExamine(Map<String,Object> object) { |
| | | Boolean isinsert=false; |
| | | public String updateDeliveryToExamine(Map<String,Object> object) { |
| | | String saveState = "true"; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | | Log log = new Log(); |
| | | String deliveryId = ""; |
| | | int type =3; |
| | | if (object.get("deliveryId") != null) { |
| | |
| | | type = Integer.parseInt(object.get("type").toString()); |
| | | } |
| | | |
| | | if(Boolean.parseBoolean(object.get("deliveryOutbound").toString())){ |
| | | if(type==2){ |
| | | List<OrderDetail> orderDetaillist=finishedGoodsInventoryMapper.getSelectDeliveryDetailDeliveryId(deliveryId); |
| | | if(!Objects.equals(finishedGoodsInventoryService.deliveryDetailLogic(orderDetaillist,savePoint,object.get("userName").toString()), "true")){ |
| | | return finishedGoodsInventoryService.deliveryDetailLogic(orderDetaillist,savePoint,object.get("userName").toString()); |
| | | } |
| | | }else{ |
| | | List<FinishedOperateLog> finishedOperateLogslist=finishedOperateLogMapper.getSelectStorageRecordDeliveryId(deliveryId,"出库"); |
| | | if(!Objects.equals(finishedGoodsInventoryService.cancelDeliveryDetailLogic(finishedOperateLogslist,savePoint,object.get("userName").toString(),log), "true")){ |
| | | return finishedGoodsInventoryService.cancelDeliveryDetailLogic(finishedOperateLogslist,savePoint,object.get("userName").toString(),log); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | deliveryMapper.updateDeliveryToExamine(deliveryId,type); |
| | | |
| | | Log log = new Log(); |
| | | |
| | | log.setOperatorId(object.get("userId").toString()); |
| | | log.setOperator(object.get("userName").toString()); |
| | | log.setContent(object.toString()); |
| | | log.setFunction("updateDeliveryToExamine修改:"+deliveryId); |
| | | logService.saveLog(log); |
| | | return true; |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e+Arrays.toString(e.getStackTrace())); |
| | | sysError.setFunc("addDeliveryDetail"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = "false"; |
| | | |
| | | } |
| | | return saveState; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | private static final String[] NUMBERS = {"零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"}; |
| | | |
| | | private static final String[] IUNIT = {"元", "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿", "拾", "佰", "仟"}; |